Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHPUnit lock file is not up to date with composer.json #52844

Closed
asispts opened this issue Dec 1, 2023 · 1 comment
Closed

PHPUnit lock file is not up to date with composer.json #52844

asispts opened this issue Dec 1, 2023 · 1 comment

Comments

@asispts
Copy link
Contributor

asispts commented Dec 1, 2023

Symfony version(s) affected

6.3

Description

When running bin/phpunit install, I encountered this error:

No composer.json found in the current directory, showing available packages from packagist.org
Creating a "phpunit/phpunit" project at "./phpunit-9.6-0"
Installing phpunit/phpunit (9.6.14)
Plugins have been disabled.
  - Installing phpunit/phpunit (9.6.14): Extracting archive
Created project in /var/www/html/vendor/bin/.phpunit/phpunit-9.6-0
composer.json has been updated
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`.
- Required package "symfony/phpunit-bridge" is not present in the lock file.

I think this error is caused by the script adding "symfony/phpunit-bridge": "*@dev" to phpunit's composer.json.

Additional Context

symfony/phpunit-bridge: ^6.3.8 with the latest recipes

@xabbuh
Copy link
Member

xabbuh commented Dec 1, 2023

I guess this is caused by the latest PHPUnit versions shipping the composer.lock file. Thus we need to run composer update instead of composer install (see #52846 for the fix).

In the meantime you can enforce an older PHPUnit version with the SYMFONY_PHPUNIT_VERSION environment variable like this:

SYMFONY_PHPUNIT_VERSION=9.6.13 php ./phpunit install

@xabbuh xabbuh closed this as completed in 735959c Dec 1, 2023
Zombaya added a commit to integr8rs/DoctrineEncryptBundle that referenced this issue Feb 29, 2024
Zombaya added a commit to integr8rs/DoctrineEncryptBundle that referenced this issue Feb 29, 2024
Changes
=======

* Set variable to use correct phpunit to run on lowest
  See symfony/symfony#52844
* Up the minimum-requirement for symfony/flex for demo/sf5.4 to 1.21
* Update minimal version of doctrine/doctrine-bundle to allow installing with prefer-lowest on sf 5.4
alexander-schranz added a commit to alexander-schranz/RestRoutingBundle that referenced this issue Apr 4, 2024
wachterjohannes pushed a commit to handcraftedinthealps/RestRoutingBundle that referenced this issue Apr 4, 2024
* Allow Symfony 7 versions

* Define symfony version in CI run

* Fix issue with symfony/symfony#52844

* Skip test when framework extra bundle is not available
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants