【问题标题】:Symfony/ Mamp/ Mac/ DebugClassLoaderSymfony/ Mamp/ Mac/ DebugClassLoader
【发布时间】:2015-06-01 00:10:14
【问题描述】:

我正在开发一个在 Windows 操作系统上使用 Symfony 创建的网站。我已经使用 MAMP 在我的 Mac Yosemite 上下载了该文件夹。

我可以看到“config.php”页面

Welcome!

Welcome to your new Symfony project.

This script will guide you through the basic configuration of your project.    
You can also do the same by editing the ‘app/config/parameters.yml’ file directly.

Your configuration looks good to run Symfony.

Configure your Symfony Application online
Bypass configuration and go to the Welcome page
Symfony Standard Edition.

但是当我点击“BypassConfiguration”时出现错误信息:

FatalErrorException:编译错误: Symfony\Component\Debug\DebugClassLoader::loadClass():打开失败 必需的 '/Applications/MAMP/htdocs/WebsiteDigital/Website/vendor/friendsofsymfony/user-bundle/FOSUserBundle.php' (include_path='.:/Applications/MAMP/bin/php/php5.6.6/lib/php') 在 /Applications/MAMP/htdocs/WebsiteDigital/Website/vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php 第 154 行


这是 DebugClassLoader.php 第 154 行的副本,因为它在错误消息中提到:

 **
 * Loads the given class or interface.
 *
 * @param string $class The name of the class
 *
 * @return bool|null    True, if loaded
 *
 * @throws \RuntimeException
 */
public function loadClass($class)
{
    ErrorHandler::stackErrors();

    try {
        if ($this->isFinder) {
            if ($file = $this->classLoader[0]->findFile($class)) {
                require $file;
            }
        } else {
            call_user_func($this->classLoader, $class);
            $file = false;
        }
    } catch (\Exception $e) {
        ErrorHandler::unstackErrors();

        throw $e;
    }

    ErrorHandler::unstackErrors();

这对某人有什么意义吗? 如果需要,我可以向您发送更多信息。

【问题讨论】:

  • 如果你在phpinfo();中搜索是否启用了xdebug?

标签: php macos symfony mamp


【解决方案1】:

您收到包含以下内容的错误消息:

需要打开失败... vendor/friendsofsymfony/user-bundle/FOSUserBundle.php

缺少供应商文件。

您的应用程序未正确安装。

您是否遵循所有安装步骤?

您是否通过composer install 获取所有依赖项(包/捆绑包)?

使用 Composer 获取所有依赖项,然后重试。

【讨论】:

    猜你喜欢
    • 2021-02-01
    • 2021-08-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-03
    • 2015-04-20
    • 1970-01-01
    相关资源
    最近更新 更多