简体   繁体   English

Symfony / Mamp / Mac / DebugClassLoader

[英]Symfony/ Mamp/ Mac/ DebugClassLoader

I am working on a website that as been created with Symfony on a Windows operating system. 我正在使用在Windows操作系统上由Symfony创建的网站上工作。 I have downloaded the folder on my Mac Yosemite using MAMP. 我已经使用MAMP在Mac Yosemite上下载了该文件夹。

I can see the "config.php" page : 我可以看到“ 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.

But when I click on the " BypassConfiguration " an error message appear: 但是,当我单击“ BypassConfiguration ”时,会出现错误消息:

FatalErrorException: Compile Error: Symfony\\Component\\Debug\\DebugClassLoader::loadClass(): Failed opening required '/Applications/MAMP/htdocs/WebsiteDigital/Website/vendor/friendsofsymfony/user-bundle/FOSUserBundle.php' (include_path='.:/Applications/MAMP/bin/php/php5.6.6/lib/php') in /Applications/MAMP/htdocs/WebsiteDigital/Website/vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php line 154 FatalErrorException:编译错误:Symfony \\ Component \\ Debug \\ DebugClassLoader :: loadClass():无法打开所需的'/Applications/MAMP/htdocs/WebsiteDigital/Website/vendor/friendsofsymfony/user-bundle/FOSUserBundle.php'(include_path ='。 :/Applications/MAMP/htdocs/WebsiteDigital/Website/vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassDebuger.php第154行中的/Applications/MAMP/bin/php/php5.6.6/lib/php')


Here is a copy of the DebugClassLoader.php line 154 as it mention on the error msg : 这是DebugClassLoader.php第154行的副本,如错误msg所述:

 **
 * 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();

Does it mean something for somebody? 对某人来说意味着什么吗? I can send you more information If it's needed. 如果需要,我可以向您发送更多信息。

You got an error message with the following content: 您收到一条包含以下内容的错误消息:

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

A vendor file is missing. 供应商文件丢失。

Your application is not properly installed. 您的应用程序未正确安装。

Did you follow all installation steps? 您遵循所有安装步骤了吗?

Did you fetch all dependencies (packages/bundles) via composer install ? 您是否通过composer install获取了所有依赖项(软件包/捆绑包)?

Fetch all dependencies with Composer, then try again. 使用Composer提取所有依赖项,然后重试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM