-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
Documentation: add warning about Composer 2.3 #656
Comments
Hi @jrfnl! Sorry for the very late reply, I could not check any GitHub related notification for a while. Since it's Composer itself introducing this limitation, I am wondering if it's worth going against it, especially since the next release of Box will require 8.1. I'm also a bit torn regarding the requirement checker tool if it should really stay to 5.3 or can simply be bumped as well. I however do like the idea of a warning at generation time that the PHAR minimum PHP version supported may not match the desired one. |
As Composer 2.3 is dropping PHP 5.3 and requires 7.2.5+ as the minimum PHP version, so does Box. In theory it would be possible to keep the 5.3 compatibility, but that would require non trivial efforts as it would require to make the bundle requirement checker work without Composer autoloading _and_ keeping track of Composer Semver too. Since 7.2.5 is now the minimum, the requirement checker has been pimped up a bit. Closes #656
@theofidry Sorry to hear you'll be dropping support for older PHP versions, but I respect your decision. I'll keep an eye on the releases to make sure projects I'm involved with, which still support PHP < 7.2, will remain on an older version of Box. |
I'm not too happy about it either to be honest. The main reason is just the amount of work. At the moment the way the requirement checker is built is relying on Composer (and there is the scoping process afterwards as well). But if the dumped scoped requirement checker Getting there though is a significant amount of work and I'm not 100% sure on how to do this neither. |
Box 2 is no longer maintained and will not be made compatible with more recent PHP versions. #### Config * Updated the Box configuration for changes made in Box 3 and 4. * Removed the `*.php8` and `*.pem` extensions from the finder config as those are not used in this project. * Explicitly set `check-requirements` to `false` as the requirements checker in Box 4 is not compatible with PHP < 7.2. #### GH Actions workflows * Updated the PHP setup to have the necessary PHP version, extensions and ini config needed to generate the PHAR. * Explicitly set the required Composer version to `2.2` as the autoload files generated with Composer 2.3+ are not compatible with PHP 5.5. * Updated the PHAR generation command. * Added validation and debug steps for the PHAR generation. * Added a step to upload the Phar as a build artifact. The PHAR files uploaded in this way will remain accessible for 60 days. * Added a job to test that the Phar is minimally functional against the high/middle/low supported PHP versions. Refs: * https://github.com/box-project/box/blob/master/UPGRADE.md * https://github.com/box-project/box/blob/master/doc/configuration.md * https://github.com/box-project/box/blob/master/doc/requirement-checker.md#requirements-checker * box-project/box#656 (comment)
Box 2 is no longer maintained and will not be made compatible with more recent PHP versions. #### Config * Updated the Box configuration for changes made in Box 3 and 4. * Explicitly set `check-requirements` to `false` as the requirements checker in Box 4 is not compatible with PHP < 7.2. #### GH Actions workflows * Updated the PHP setup to have the necessary PHP version, extensions and ini config needed to generate the PHAR. * Explicitly set the required Composer version to `2.2` as the autoload files generated with Composer 2.3+ are not compatible with PHP 5.5. * Updated the PHAR generation command. * Added validation and debug steps for the PHAR generation. * Added a step to upload the Phar as a build artifact. The PHAR files uploaded in this way will remain accessible for 60 days. * Added a job to test that the Phar is minimally functional against the high/middle/low supported PHP versions. Refs: * https://github.com/box-project/box/blob/master/UPGRADE.md * https://github.com/box-project/box/blob/master/doc/configuration.md * https://github.com/box-project/box/blob/master/doc/requirement-checker.md#requirements-checker * box-project/box#656 (comment)
Box 2 is no longer maintained and will not be made compatible with more recent PHP versions. #### Config * Updated the Box configuration for changes made in Box 3 and 4. * Explicitly set `check-requirements` to `false` as the requirements checker in Box 4 is not compatible with PHP < 7.2. #### GH Actions workflows * Install the dependencies on the minimum supported PHP version. * Updated the PHP setup to have the necessary PHP version, extensions and ini config needed to generate the PHAR with Box 4. * Explicitly set the required Composer version to `2.2` as the autoload files generated with Composer 2.3+ are not compatible with PHP 5.5. * Updated the PHAR generation command. * Added validation and debug steps for the PHAR generation. * Added a step to upload the Phar as a build artifact. The PHAR files uploaded in this way will remain accessible for 60 days. * Added a job to test that the Phar is minimally functional against the high/middle/low supported PHP versions. Refs: * https://github.com/box-project/box/blob/master/UPGRADE.md * https://github.com/box-project/box/blob/master/doc/configuration.md * https://github.com/box-project/box/blob/master/doc/requirement-checker.md#requirements-checker * box-project/box#656 (comment)
* Upgrade PHAR generation to Box 4.x Box 2 is no longer maintained and will not be made compatible with more recent PHP versions. #### Config * Updated the Box configuration for changes made in Box 3 and 4. * Explicitly set `check-requirements` to `false` as the requirements checker in Box 4 is not compatible with PHP < 7.2. #### GH Actions workflows * Install the dependencies on the minimum supported PHP version. * Updated the PHP setup to have the necessary PHP version, extensions and ini config needed to generate the PHAR with Box 4. * Explicitly set the required Composer version to `2.2` as the autoload files generated with Composer 2.3+ are not compatible with PHP 5.5. * Updated the PHAR generation command. * Added validation and debug steps for the PHAR generation. * Added a step to upload the Phar as a build artifact. The PHAR files uploaded in this way will remain accessible for 60 days. * Added a job to test that the Phar is minimally functional against the high/middle/low supported PHP versions. Refs: * https://github.com/box-project/box/blob/master/UPGRADE.md * https://github.com/box-project/box/blob/master/doc/configuration.md * https://github.com/box-project/box/blob/master/doc/requirement-checker.md#requirements-checker * box-project/box#656 (comment) * GH Actions: PHAR generation tweaks ... after PR review. Co-authored-by: jrfnl <[email protected]>
👋🏻 Hiya,
I'm not sure where to add this, but I believe it would be prudent to add a warning somewhere in the documentation about Composer 2.3.
Context
Composer 2.3 drops support for PHP 7.2 and the autoload files generated with Composer 2.3 are no longer compatible with PHP < 7.0.
The problem
A lot of projects which create PHAR files will include the composer
autoload
files in the PHAR and use them for the autoloading of the files within the PHAR.If a project does so AND needs their PHAR to be runnable of PHP < 7.0, this will break if Composer 2.3 was used to prepare the files to be boxed up.
As Box itself has a minimum of PHP 7.4 and the PHAR file is often generated via a GH Actions workflow, this can be problematic as Composer 2.3 will be installed by default on PHP 7.2+.
The solution
The solution is quite straight-forward: make sure Composer 2.2 is used to prepare the files to be boxed up.
In GH Actions, this would typically be done like this (specifically the last two lines):
The text was updated successfully, but these errors were encountered: