Bug #82665
closedComposer Dependency Problem with PHP 7.0
100%
Description
I discovered a dependency-problem while installing current TYPO3 8.7.7 via composer, using PHP 7.0
Running composer install [composer install]
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 doctrine/annotations v1.5.0 -> satisfiable by doctrine/annotations[v1.5.0].
- doctrine/annotations v1.5.0 requires php ^7.1 -> your PHP version (7.0.22) does not satisfy that requirement.
Problem 2
- Installation request for doctrine/cache v1.7.1 -> satisfiable by doctrine/cache[v1.7.1].
- doctrine/cache v1.7.1 requires php ~7.1 -> your PHP version (7.0.22) does not satisfy that requirement.
Problem 3
- Installation request for doctrine/collections v1.5.0 -> satisfiable by doctrine/collections[v1.5.0].
- doctrine/collections v1.5.0 requires php ^7.1 -> your PHP version (7.0.22) does not satisfy that requirement.
Problem 4
- doctrine/annotations v1.5.0 requires php ^7.1 -> your PHP version (7.0.22) does not satisfy that requirement.
- doctrine/common v2.7.3 requires doctrine/annotations 1.* -> satisfiable by doctrine/annotations[v1.5.0].
- Installation request for doctrine/common v2.7.3 -> satisfiable by doctrine/common[v2.7.3].
An error occured executing composer install [Exit code: 2]
So TYPO3 8.7.7 has PHP 7.0 - 7.1.x as dependency, but dependent packages from doctrine requires PHP 7.1 - so TYPO3 8 is not installable with PHP 7.0.
Updated by Benni Mack about 7 years ago
Hey Tobias,
did you type in `composer require typo3/cms`?
Updated by Benni Mack about 7 years ago
- Status changed from New to Needs Feedback
Updated by Anonymous about 7 years ago
Hi Benni,
well I copied the composer.json from an other project. Following your advice results in a change from:
"typo3/cms": "^8.7.7",
to
"typo3/cms": "^8.7",
BUT the composer result is still the same.
Updated by Anonymous about 7 years ago
my composer.json
{
"repositories": [
{
"type": "composer",
"url": "https://composer.typo3.org/"
}
],
"name": "Project",
"description": "TYPO3",
"license": "GPL-2.0+",
"minimum-stability": "alpha",
"require": {
"typo3/cms": "^8.7",
"dmitryd/typo3-realurl": "^2.2",
"webdevops/metaseo": "^3.0"
},
"extra": {
"typo3/cms": {
"cms-package-dir": "{$vendor-dir}/typo3/cms",
"web-dir": "web"
}
}
}
Updated by Benni Mack about 7 years ago
Hey Tobias,
well, the main issue is that you have a PHP 7.1 where you run "composer update" and then another system (build server, live system) where you do a "composer install" which is PHP 7.0.
composer install takes the information from composer.lock, but composer update checks against the current running systems.
We usually do it like this in our company:
- Either define a hard "platform" config option in composer.json https://getcomposer.org/doc/06-config.md#platform
- Call composer update typo3/cms --ignore-platform-reqs
Hope this helps
Updated by Anonymous about 7 years ago
- % Done changed from 0 to 100
Hi Benni,
you are absolutly right. I deleted my composer.lock and run composer install again locally with PHP 7.0 -> then it run also on the Deploy-Server. Thanks for the help and also for the very useful additional informations. Cheers!
Updated by Nicole Cordes about 7 years ago
- Status changed from Needs Feedback to Resolved