Installing Symfony project with PHP 7.3 version

发布时间:2022-04-30 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了Installing Symfony project with PHP 7.3 version脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

参考地址:https://CMSdk.COM/PHP/installing-symfony-PRoject-wITh-PHP-7-3-version.htML

 

Tryng to install (and after updating composer):

composer create-project symfony-cmf/sandBox cmf-sandBox

I have those errors:

Installing symfony-cmf/sandBox (2.0.0) - Installing symfony-cmf/sandBox (2.0.0): Loading From cache Created project in cmf-sandBox Loading composer repositories with package information Installing dePEndencies (including require-dev) from lock file Your requirements Could not be resolved to an installable set of packages. Problem 1 - Installation request for PHPcr/PHPcr-utils 1.3.0 -> satisfiable by PHPcr/PHPcr-utils[1.3.0]. - PHPcr/PHPcr-utils 1.3.0 requires PHP ^5.6|7.0.x|7.1.x -> your PHP version (7.3.0) does not satisfy that requirement. Problem 2 - PHPcr/PHPcr-utils 1.3.0 requires PHP ^5.6|7.0.x|7.1.x -> your PHP version (7.3.0) does not satisfy that requirement. - doctrine/PHPcr-odm 1.4.2 requires PHPcr/PHPcr-utils ^1.2.8 -> satisfiable by PHPcr/PHPcr-utils[1.3.0]. - Installation request for doctrine/PHPcr-odm 1.4.2 -> satisfiable by doctrine/PHPcr-odm[1.4.2].

Edit: Continuing the recommendation of Timo,I was able to install the project by executing the following:

composer create-project --ignore-platform-reqs symfony-cmf/sandBox cmf-sandBox

but I have oBTained the following errors:

PHP Fatal error: Uncaught Symfony\component\Debug\Exception\ContextErrorException: Warning: count(): Parameter must be an array or an object that implements Countable in /srv/http/symfony/cmf-sandBox/vendor/symfony-cmf/routing/src/ChainRouter.PHP:101 Stack trace: #0 /srv/http/symfony/cmf-sandBox/vendor/symfony-cmf/routing/src/ChainRouter.PHP(308): Symfony\Cmf\Component\Routing\ChainRouter->all() #1 /srv/http/symfony/cmf-sandBox/VAR/cache/dev/appDevDebugProjectContainer.PHP(1670): Symfony\Cmf\Component\Routing\ChainRouter->setContext(Object(Symfony\Component\Routing\RequestContext)) #2 /srv/http/symfony/cmf-sandBox/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.PHP(335): appDevDebugProjectContainer->getCmfRouting_RouterService() #3 /srv/http/symfony/cmf-sandBox/var/cache/dev/appDevDebugProjectContainer.PHP(4955): Symfony\Component\DependencyInjection\Container->get(‘cmf_routing.rou...‘) #4 /srv/http/symfony/cmf-sandBox/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.PHP(33 in /srv/http/symfony/cmf-sandBox/vendor/symfony-cmf/routing/src/ChainRouter.PHP on line 101

The project uses a Symfony version 3 structure and may have some incompatibility with PHP 7.3 (as Timo says).

Answer 1

You can tell Composer to ignore the PHP version requirements by adding --ignore-platform-reqs to the composer create-project command.

Else,you‘ll probably have to wait until the dependencies of symfony-cmf/sandBox get bumped to a later version.

脚本宝典总结

以上是脚本宝典为你收集整理的Installing Symfony project with PHP 7.3 version全部内容,希望文章能够帮你解决Installing Symfony project with PHP 7.3 version所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。