2017-12-12 20 views
0

는이 오류를 가지고 유지 :에 Fos 사용자 찾을 수 없습니다 클래스, 찌르다 ENVIRONNEMENT

PHP Fatal error: Class 'FOS\UserBundle\FOSUserBundle' not found in AppKernel.

I'am을 찌르다 ENVIRONNEMENT에. symfony 프로젝트는 기존 프로젝트의 하위 디렉토리에 있습니다.

더 이상이 문제를 해결할 생각이 없습니다.

[편집] 주석의 요청에 따라 :

AppKernel 클래스 :

<?php 

use Symfony\Component\HttpKernel\Kernel; 
use Symfony\Component\Config\Loader\LoaderInterface; 

class AppKernel extends Kernel 
{ 
    public function registerBundles() 
    { 
     $bundles = array (
      new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), 
      new Symfony\Bundle\SecurityBundle\SecurityBundle(), 
      new Symfony\Bundle\TwigBundle\TwigBundle(), 
      new Symfony\Bundle\MonologBundle\MonologBundle(), 
      new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), 
      new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), 
      new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), 
      new AppBundle\AppBundle(), 
      new FOS\UserBundle\FOSUserBundle(), 
     ); 

     if (in_array($this->getEnvironment(), ['dev', 'test'], true)) { 
      $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle(); 
      $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); 
      $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); 

      if ('dev' === $this->getEnvironment()) { 
       $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); 
       $bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle(); 
      } 
     } 

     return $bundles; 
    } 

    public function getRootDir() 
    { 
     return __DIR__; 
    } 

    public function getCacheDir() 
    { 
     return dirname(__DIR__).'/var/cache/'.$this->getEnvironment(); 
    } 

    public function getLogDir() 
    { 
     return dirname(__DIR__).'/var/logs'; 
    } 

    public function registerContainerConfiguration(LoaderInterface $loader) 
    { 
     $loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml'); 
    } 
} 

Composer.json :

{ 
    "name": "creafiche/creafiche", 
    "license": "proprietary", 
    "type": "project", 
    "autoload": { 
     "psr-4": { 
      "AppBundle\\": "src/AppBundle" 
     }, 
     "classmap": [ 
      "app/AppKernel.php", 
      "app/AppCache.php" 
     ] 
    }, 
    "autoload-dev": { 
     "psr-4": { 
      "Tests\\": "tests/" 
     }, 
     "files": [ 
      "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php" 
     ] 
    }, 
    "require": { 
     "php": ">=5.5.9", 
     "doctrine/doctrine-bundle": "^1.6", 
     "doctrine/orm": "^2.5", 
     "friendsofsymfony/user-bundle": "dev-master", 
     "incenteev/composer-parameter-handler": "^2.0", 
     "paragonie/random_compat": "^1", 
     "sensio/distribution-bundle": "^5.0.19", 
     "sensio/framework-extra-bundle": "^3.0.2", 
     "symfony/monolog-bundle": "^3.1.0", 
     "symfony/polyfill-apcu": "^1.0", 
     "symfony/swiftmailer-bundle": "^2.3.10", 
     "symfony/symfony": "3.3.13", 
     "symfony/templating": "^2.7", 
     "twig/twig": "^1.0||^2.0" 
    }, 
    "require-dev": { 
     "sensio/generator-bundle": "^3.0", 
     "symfony/phpunit-bridge": "^3.0" 
    }, 
    "scripts": { 
     "symfony-scripts": [ 
      "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget" 
     ], 
     "post-install-cmd": [ 
      "@symfony-scripts" 
     ], 
     "post-update-cmd": [ 
      "@symfony-scripts" 
     ] 
    }, 
    "config": { 
     "sort-packages": true 
    }, 
    "extra": { 
     "symfony-app-dir": "app", 
     "symfony-bin-dir": "bin", 
     "symfony-var-dir": "var", 
     "symfony-web-dir": "web", 
     "symfony-tests-dir": "tests", 
     "symfony-assets-install": "relative", 
     "incenteev-parameters": { 
      "file": "app/config/parameters.yml" 
     }, 
     "branch-alias": null 
    } 
} 
+0

당신은'AppKernel'에 그것을 추가 했습니까? –

+0

예 : 새로운 FOS \ UserBundle \ FOSUserBundle(), –

+0

은 뚜렷한 모드에서 캐시가 더 명확합니까? –

답변

0

가 (이 줄 새로운 FOS \ UserBundle \ FOSUserBundle 제거), appKernel.php 파일을 열고 작곡가 업데이트를하십시오. 그 후에 appKernel.php에 새로운 FOS \ UserBundle \ FOSUserBundle()을 다시 추가하십시오. 그게 당신에게 효과가 있는지 알려주세요. 행운을 빕니다

0

좋아 얘들 아, 내가 문제를 발견

내 서버에 콘솔을 액세스 할 수 없습니다를, 그래서 난 내 자식에서 FTP를 통해 모든 파일을 전송했다. "user_bundle"이 보호되어있어 서버에 폴더가 만들어졌지만 그는 비어있었습니다.

나는이 게시물이 나와 같은 어리석은 실수를 한 사람을 도왔 으면 좋겠다.

어쨌든, 당신의 도움을 주셔서 감사합니다.