-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
Requirement checker wrongly detects the version #489
Comments
@greg0ire I would recommend you to build the phar only for the minimum php target version as this phar file will be used for a release. |
It is fine to build the PHAR at a higher version, but only if you are manually setting the PHP platform to a fixed version which matches your lowest constraint. Otherwise you will run into the issue that you have things working with 7.4 because you are in 7.4, but this code does not execute in 7.1. When using it as a lib it does not matter since your dependencies are resolved with your current platform, but when shipping it as a PHAR it is like deploying an application: you need to be aware of the .lock and with what version the dependencies have been resolved |
I just pushed a commit that restricts to 7.1 using I still get 7.2 as the detected version, is that expected? Here is a reproducer: git clone git@github.com:greg0ire/migrations.git
cd migrations
git switch --detach b3a5c519c1f2257349b70ce3f2d9a72683bfadfb
composer install
./download-box.sh && php box.phar compile -vvv
cat download-box.sh If I edit the
|
That's definitely a bug; Could you try with 3.9.0? You will unfortunately need to either build the PHAR manually from the release or wait for the switch to GitHub Actions (which should be done shortly) |
Sadly I still have the issue with that version:
Full output
|
Will check it out ASAP |
I'm also running into this issue. Code is compatible with 7.1, but box is detecting a 7.2 requirement somehow. https://github.com/dbrekelmans/release-action-test-source/runs/1545723577?check_suite_focus=true |
I've done a couple of checks and this should have been fixed now. |
Can't test right now but thanks! |
Bug report
I'm trying to fix the
doctrine/migrations
build, and to migrate it from Travis to Github Actions at the same time.On both CI platforms, and also locally, the requirement checker tells me that the application requires
^7.2
, which looks wrong to me since I can runcomposer install
with PHP 7.1 before that. That works (meaning it tells me the application requires^7.1
) with older versions of box, but these versions give me the following error (which disappears with recent versions that still have the wrong detection):This leaves me no choice but to upgrade
box.json.dist
Output
The text was updated successfully, but these errors were encountered: