openeuropa / drupal-site-template

OpenEuropa template for Drupal sites.
European Union Public License 1.2
12 stars 10 forks source link

PHP 7.2 required for doctrine/lexer 1.2.0 #58

Closed donquixote closed 4 years ago

donquixote commented 4 years ago

(version debfcbd1284644faa5fecf2cfcb9ec5af14e7126)

When I try to run

docker-compose exec web composer install

I get this

Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - doctrine/lexer 1.2.0 requires php ^7.2 -> your PHP version (7.1.28) does not satisfy that requirement.
    - doctrine/lexer 1.2.0 requires php ^7.2 -> your PHP version (7.1.28) does not satisfy that requirement.
    - Installation request for doctrine/lexer 1.2.0 -> satisfiable by doctrine/lexer[1.2.0].

Changing PHP version to 7.2 fixes this.

brummbar commented 4 years ago

You used your local composer to create the project. Since you have PHP 7.2 locally, the dependencies have been calculated for that PHP version. In this case, it's just a matter to run docker-compose exec web composer update to fix the composer lock file with the correct dependencies. Closing as documentation already says to use docker also for the project creation.

donquixote commented 4 years ago

Thanks! Almost correct. I used the new command that avoids using local php. The command contains a parameter that specifies the php version as 7.1. Unfortunately this did not work for me and I had to change the parameter to 7.2 to make it work. I will try this again and see.

On Thu, 9 Jan 2020, 10:32 Francesco notifications@github.com wrote:

You used your local composer to create the project. Since you have PHP 7.2 locally, the dependencies have been calculated for that PHP version. In this case, it's just a matter to run docker-compose exec web composer update to fix the composer lock file with the correct dependencies. Closing as documentation already says to use docker also for the image creation.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/openeuropa/drupal-site-template/issues/58?email_source=notifications&email_token=AABEUEE5FAQJMNC5LS4KLA3Q43VJNA5CNFSM4KELHJDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIPT3RY#issuecomment-572472775, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABEUEF5MNK6NSLPWBGEJJTQ43VJNANCNFSM4KELHJDA .

brummbar commented 4 years ago

We'll report to the image maintainers that 7.1 has issues on Linux machines. Thanks for the reply, we can confirm that the PHP version is taken into account for package selection thus the error comes from the change of PHP version between project creation and usage.

donquixote commented 4 years ago

I will try this again and see.

I think we should simply use 7.2 instead for this project (EUROFOUND).

brummbar commented 4 years ago

Which PHP version is used in projects hosted in the Commission machines is a decision to be taken with the devops of DIGIT.