0

前提・実現したいこと

現在、既存の作成されたWebアプリのsymfonyバージョンを上げる作業をしております。
composer requireでパッケージを指定したダウンロードを行いたいのですが、
Nothing to install or updateとなり、インストールできません。
原因は何でしょうか。

発生している問題・composer requireの文章

[vagrant@localhost Symfony]$ php -d memory_limit=-1 /usr/local/bin/composer require symfony/intl:2.8.52
Initializing PEAR repository http://pear.php.net
Warning: Accessing pear.php.net over http which is an insecure protocol.
./composer.json has been updated
Loading composer repositories with package information
Initializing PEAR repository http://pear.php.net
Warning: Accessing pear.php.net over http which is an insecure protocol.
Updating dependencies (including require-dev)
Nothing to install or update
Package phpoffice/phpexcel is abandoned, you should avoid using it. Use phpoffice/phpspreadsheet instead.
Package sensio/distribution-bundle is abandoned, you should avoid using it. No replacement was suggested.
Package sensio/generator-bundle is abandoned, you should avoid using it. Use symfony/maker-bundle instead.
Package symfony/webpack-encore-pack is abandoned, you should avoid using it. Use symfony/webpack-encore-bundle instead.
Package twig/extensions is abandoned, you should avoid using it. No replacement was suggested.
Writing lock file
Generating autoload files
12 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
PHP Fatal error:  Class 'Symfony\Component\HttpKernel\Kernel' not found in /home/vagrant/Symfony/app/AppKernel.php on line 7
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception

Installation failed, reverting ./composer.json to its original content.
  [RuntimeException]
  An error occurred when executing the "'cache:clear --no-warmup'" command:
  PHP Fatal error:  Class 'Symfony\Component\HttpKernel\Kernel' not found in /home/vagrant/Symfony/app/AppKernel.php on line 7

require [--dev] [--prefer-source] [--prefer-dist] [--fixed] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

試したこと

他のパッケージは同様の操作でインストールできています。
また、バージョンを指定しないと下記のような文章が出ます。
composer show symfony/intlで確認しましたが、 [InvalidArgumentException] Package symfony/intl not foundと出ました。

[vagrant@localhost Symfony]$ php -d memory_limit=-1 /usr/local/bin/composer require symfony/intl
Initializing PEAR repository http://pear.php.net
Warning: Accessing pear.php.net over http which is an insecure protocol.
Using version ^3.4 for symfony/intl
./composer.json has been updated
Loading composer repositories with package information
Initializing PEAR repository http://pear.php.net
Warning: Accessing pear.php.net over http which is an insecure protocol.
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: remove symfony/symfony v2.8.52
    - Conclusion: don't install symfony/symfony v2.8.52
   ・
   ・
   ・
    - don't install symfony/intl v3.4.0|don't install symfony/symfony v2.8.5
    ・
   ・
   ・
    - Installation request for symfony/symfony 2.8.* -> satisfiable by symfony/symfony[v2.8.0, v2.8.1, v2.8.10, v2.8.11, v2.8.12, v2.8.13, v2.8.14, v2.8.15, v2.8.16, v2.8.17, v2.8.18, v2.8.19, v2.8.2, v2.8.20, v2.8.21, v2.8.22, v2.8.23, v2.8.24, v2.8.25, v2.8.26, v2.8.27, v2.8.28, v2.8.29, v2.8.3, v2.8.30, v2.8.31, v2.8.32, v2.8.33, v2.8.34, v2.8.35, v2.8.36, v2.8.37, v2.8.38, v2.8.39, v2.8.4, v2.8.40, v2.8.41, v2.8.42, v2.8.43, v2.8.44, v2.8.45, v2.8.46, v2.8.47, v2.8.48, v2.8.49, v2.8.5, v2.8.50, v2.8.51, v2.8.52, v2.8.6, v2.8.7, v2.8.8, v2.8.9].
    - Installation request for symfony/intl ^3.4 -> satisfiable by symfony/intl[v3.4.0, v3.4.1, v3.4.10, v3.4.11, v3.4.12, v3.4.13, v3.4.14, v3.4.15, v3.4.16, v3.4.17, v3.4.18, v3.4.19, v3.4.2, v3.4.20, v3.4.21, v3.4.22, v3.4.23, v3.4.24, v3.4.25, v3.4.26, v3.4.27, v3.4.28, v3.4.29, v3.4.3, v3.4.30, v3.4.31, v3.4.32, v3.4.33, v3.4.34, v3.4.35, v3.4.36, v3.4.37, v3.4.38, v3.4.39, v3.4.4, v3.4.40, v3.4.41, v3.4.42, v3.4.43, v3.4.44, v3.4.45, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9].


Installation failed, reverting ./composer.json to its original content.

補足情報(FW/ツールのバージョンなど)

CentOS 6.7
composer 1.10
symfony 2.8.52
PHP 5.6.40

※同様の質問を teratail にてしております。そちらで解決しましたら、こちらでも共有いたします。

2

1 件の回答 1

0

composer requireでエラーが出たパッケージをバージョン指定して、どんどん追加することでアップデートできました。最終的に行った命令文を記載します。phpのバージョンは5.6でした。
php -d memory_limit=-1 /usr/local/bin/composer require --update-with-dependencies --prefer-dist symfony/symfony "3.0." symfony/framework-bundle "3.0." doctrine/doctrine-bundle " ~1.4" jms/aop-bundle "1.2." jms/di-extra-bundle "1.7." jms/security-extra-bundle "1.6." liuggio/excelbundle "2.1.0" sensio/distribution-bundle "5.0." sensio/framework-extra-bundle "3.0." sensio/generator-bundle "3.0." symfony/monolog-bundle "3.0." symfony/console "3.0." doctrine/orm "2.5." symfony/intl "3.0."

この質問に回答するには、ログインする必要があります。

求めていた回答ではありませんか? のタグが付いた他の質問を参照する。