2017-12-23 2 views
0

3.0에, 나는 3.0.*composer.json의 버전을 변경하지만 작곡가 업데이트가 완료된 후, 나는 콘솔에서 이러한 오류가 있습니다심포니 2.8 마이그레이션

[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command:
PHP Fatal error: Class 'Symfony\Component\HttpKernel\Kernel' not found in
/var/www/html/t/EcoPro/app/AppKernel.php on line 6

+0

앱 (_dev) .php 파일과 작곡가 json을 볼 수 있습니까? – Federkun

답변

0

그것은 당신 같은 소리 코드는 Symfony에서 Kernel 클래스와 싸울 수 없습니다. 아직 거기에 있어야하므로 Symfony repository in the 3.0-branch에서 볼 수 있듯이 업데이트하는 동안 문제가 있다고 생각합니다.

먼저 composer diagnose을 실행하여 작성자 자체가 최신이고 사용자의 composer.json이 구문 적으로 유효한지 확인하는 것이 좋습니다. 다음 단계로 composer show을 실행하여 종속성의 현재 버전을 확인해야합니다. 출력은 다음과 같아야합니다.

$ composer show 
doctrine/annotations     v1.2.7 Docblock Annotations Parser 
doctrine/cache      v1.5.1 Caching library offering an object-oriented API for many cache backends 
doctrine/collections     v1.3.0 Collections Abstraction library 
doctrine/common      v2.5.1 Common Library for Doctrine projects 
doctrine/dbal      v2.5.2 Database Abstraction Layer 
doctrine/doctrine-bundle    1.6.0 Symfony DoctrineBundle 
doctrine/doctrine-cache-bundle  1.2.2 Symfony Bundle for Doctrine Cache 
doctrine/inflector     v1.1.0 Common String Manipulations with regard to casing and singular/plural rules. 
doctrine/instantiator    1.0.5 A small, lightweight utility to instantiate objects in PHP without invoking their constructors 
doctrine/lexer      v1.0.1 Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers. 
doctrine/orm       v2.5.2 Object-Relational-Mapper for PHP 
incenteev/composer-parameter-handler v2.1.2 Composer script handling your ignored parameter file 
jdorn/sql-formatter     v1.2.17 a PHP SQL highlighting library 
monolog/monolog      1.17.2 Sends your logs to files, sockets, inboxes, databases and various web services 
paragonie/random_compat    1.1.0 PHP 5.x polyfill for random_bytes() and random_int() from PHP 7 
psr/log        1.0.0 Common interface for logging libraries 
sensio/distribution-bundle   v5.0.2 Base bundle for Symfony Distributions 
sensio/framework-extra-bundle  v3.0.11 This bundle provides a way to configure your controllers with annotations 
sensio/generator-bundle    v3.0.0 This bundle generates code for you 
sensiolabs/security-checker   v3.0.2 A security checker for your composer.lock 
swiftmailer/swiftmailer    v5.4.1 Swiftmailer, free feature-rich PHP mailer 
symfony/monolog-bundle    v2.8.2 Symfony MonologBundle 
symfony/phpunit-bridge    v2.8.0 Symfony PHPUnit Bridge 
symfony/polyfill-intl-icu   v1.0.0 Symfony polyfill for intl's ICU-related data and classes 
symfony/polyfill-mbstring   v1.0.0 Symfony polyfill for the Mbstring extension 
symfony/polyfill-php56    v1.0.0 Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions 
symfony/polyfill-php70    v1.0.0 Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions 
symfony/polyfill-util    v1.0.0 Symfony utilities for portability of PHP codes 
symfony/swiftmailer-bundle   v2.3.9 Symfony SwiftmailerBundle 
symfony/symfony      v3.0.0 The Symfony PHP framework 
twig/twig       v1.23.1 Twig, the flexible, fast, and secure template language for PHP 

업데이트가 실제로 작동하는지 확인하는 데 도움이됩니다. 모두 괜찮아 보인다면 안전 경로로 돌아가서 코드를 2.8로 되 돌린 다음 composer.json을 변경하는 대신 아래 설명 된대로 업데이트를 수행하십시오!

먼저 기존 응용 프로그램에서 모든 사용 중단을 수정했는지 확인하십시오. UPGRADE-document을 참조로 사용하고 테스트를 실행하고 check the logs for deprecated calls을 사용할 수도 있습니다. 이 버전은 다른 로그 파일과 함께 var/log에서 찾을 수있는 deprecation-log이라는 별개의 버전을 사용하므로 3.3 이상에서는 더 쉽게 사용할 수 있습니다. 당신이 코드를 그냥 사용, 새로운 메이저 버전으로 다음과 같은 작곡가 명령을 실행 합리적으로 확신하면

:

composer require symfony/lts:"^3.0" 

이는 우리가 실수로 어떤 심포니 구성 요소를 설치하지 않는 것이 있는지 확인하는 것입니다을 그 이 과정에서 4.0입니다. Symfony 4로 업그레이드하려면 composer remove symfony/lts을 사용하여이 종속성을 제거한 다음 update를 실행하면됩니다. LTS 메타 패키지가 제자리에 후

당신은 심포니 자체를 업데이트 할 수 있습니다

composer require symfony/symfony:^3.0 

은 당신이 정말로에 의해 단계를 가고 싶은 경우 종속성을 지원하거나 엄격한 제약 조건을 사용하는 최신 3.X로 업데이트 단계 : 당신은 또한 한 번에 모두 일을 할 수

composer require symfony/symfony:3.0.* 

당신이 좋아하는 경우 :

$ composer require symfony/lts:^3.0 symfony/symfony:^3.0 
./composer.json has been updated 
Loading composer repositories with package information 
Updating dependencies (including require-dev) 
Package operations: 5 installs, 2 updates, 0 removals 
- Updating symfony/symfony (v2.8.32 => v3.4.2): Downloading (100%) 
- Installing psr/simple-cache (1.0.0): Loading from cache 
- Installing psr/link (1.0.0): Loading from cache 
- Installing psr/container (1.0.0): Loading from cache 
- Installing psr/cache (1.0.1): Loading from cache 
- Installing fig/link-util (1.0.0): Loading from cache 
Writing lock file 
Generating autoload files 
> Incenteev\ParameterHandler\ScriptHandler::buildParameters 
Updating the "app/config/parameters.yml" file 
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap 
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache 

// Clearing the cache for the dev environment with debug 
// true 


[OK] Cache for the "dev" environment (debug=true) was successfully cleared. 


> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets 

Trying to install assets as relative symbolic links. 


[OK] No assets were provided by any bundle. 


> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile 
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::prepareDeploymentTarget 

이것은 Symfony를 최신 버전으로 사용하기에 충분합니다. Doctrine이나 설치 한 번들과 같은 다른 의존성이있을 것입니다. 업데이트를위한 몇 가지 유용한 명령이 있습니다.

은 첫째로 당신은 한 번에 하나의 종속성을 업데이트 할 수 있습니다

composer update doctrine/orm 

당신이 또한 교리/ORM의 종속성을 업데이트 할 수있는 옵션 --with-dependencies를 추가 할 때.

composer why 또는 composer why-not에 종속성을 지정하고 선택적으로 버전을 지정하여 종속성이 존재하는 이유와 왜 업데이트되지 않는지를 확인할 수 있습니다. 그것을 사용하는 방법을 보려면 composer help why-not을 입력하기 만하면됩니다.이것은 doctrine/orm과 같은 의존성을 업데이트하고자 할 때 특히 유용하지만, 작곡가는 그것을 할 수 없다는 오류를 던집니다.

관련 문제