-
-
Notifications
You must be signed in to change notification settings - Fork 437
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
Issue with PHP < 8.1 in composer.json #2378
Issue with PHP < 8.1 in composer.json #2378
Conversation
This solves the issue related to php versions > 8.1
If we do this we have to make sure all compatibility issues with PHP 8.1 were resolved. @luigifab was working on a PR a long time ago but it was abandoned. I'm already using PHP 8.1 with OM 19 for a few months now and I'm not noticing any issues, but only locally and not in production. As a side note if you don't know it already, you can ignore the PHP requirement with the flag |
I use version 8.1 from January in a test environment. I haven't faced any issues, but I haven't used OM fully to be able to say that 8.1 can be used. I think that the other versions are not 100% guaranteed either. Obviously, we can use that flag but it must be mentioned in the README file considering that more and more new versions of operating systems provide PHP 8.1 packages, Ubuntu 22.04 is one of them. Whoever resumes Debian 10 or 11 does not have this issue because the first comes with PHP 7.3 and it has LTS until 2024, the second comes with PHP 7.4 and it has LTS until 2026. These two I am using in production. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved, because we are close enough to supporting it.
There might still be issues, but we do not need to have fixed 100% of edge cases
composer.lock update is needed: |
Here it is debated whether composer.lock should be deleted from repo #2341. As a rule I run If necessary I can add this file and I would make the modification manually in line 1271 without altering the content of the file. |
Run You can also run |
No, not as a rule. (this is what #2341 is about) Imho there are two points of view ... Developer (this project here): I dont want to have a composer.lock because i want to install it on every supported php version running From customer/end-user/agency view: I want to have a commited composer.lock that matchs production/develop server and local environment for all devs. Also here i'd just use |
Also https://github.com/PHPCompatibility/PHPCompatibility does only complain about a few things ... but nothing related to php8.1. |
since composer.lock is on the repo as of this day it needs to be updated or all the workflows will fail |
composer build failed :-( |
The change should preferably be done with command @sreichel posted, since it also recomputes the |
Please check the new version of composer.lock file from my environment and let me know if it works. |
My bad ... dependencies have been updated b/c missing flag |
I propose to close this PR and let it be recreated by someone who uses Composer in OpenMage. I created it based on the error received in Ubuntu 22.04, but I am not able to operate everyone's requirements. The most important thing is that there is an issue and we must have a remedy and PHP is no longer limited to 8.1 nor has it passed 7.4. |
If tests pass it should be okay. Dependencies are now locked for 8.1 (latest version as @colinmollenhour suggested). |
What I did was to move the modified composer.json file to Ubuntu 22.04 and run the |
Difference between No special reviews required. As long the lock-file is there and test run with |
* Merge PR #2342 * Revert "Add basic text for Ukraine (#2074)" (#2325) This reverts commit 33dfa26. * Mage_Catalog_Model_Product_Attribute_Backend_Groupprice_Abstract: avoid loading all websites when using only the current one (#2351) * Added support for HTTP2 to Mage_HTTP_Client_Curl (#1137) * Blocked access to all dot files (#2349) * Capitalization Adjustment Regarding CamelCase in Method Names (#2365) * refactor: Adjusted capitalization of two public methods. * refactor: Adjusted capitalization of one protected method. * refactor: Adjusted capitalization of where call. * chore: Removed fixed error from phpstan baseline. * Some microoptimization (#2335) * Avoid duplicate method calls * Replaced array_push() * Changed substr() third parameter * Use array_key_exists() * php7 opcode - internal functions * Enclosed error with <pre> tag for prettier error print (if developer mode is enabled). (#2368) * Updated phpstan to 1.8.2 (#2367) * Escape product titles in MSRP JavaScript (#2366) * Product names were not escaped. If contained a double quote, would break the JavaScript for MSRP/MAP * update contribution list * Update boxes.css (#2330) * Force describeTable() to use read DB adapter (#2371) * Do not install n98/n98_layouthelper (#2373) * Add apt update to XML validation workflow (#2376) * Merged PR #2375 * Replace remaining "sizeof" calls with "count" (#2369) * Remove DISCLAIMER and change Magento -> OpenMage in header (#2297) * Added label for phpstan cosmetic changes (#2384) * Added weight to salesOrderShipmentAddTrack API (#1377) * PHPStan/DOCBlock fixes (#2336) * Updated docs for email addTo() (#2382) * Updated phpstan experimental (#2386) * Cosmetic changes to Mage_Payment_Model_Method_Abstract::validate() (#2388) * Replaced join() calls with implode() (#2389) * Hidden empty sub menu from backend (#2391) * Remove Thumbs.db file (#2394) * Support PHP 8.1 in composer.json (#2378) * php condition in composer.json This solves the issue related to php versions > 8.1 * Reduced condition for PHP requirement * Changed PHP requirement * Updated version in Ubuntu 22.04 based on PHP 8.1.2 * Composer.lock updated in Ubuntu 20.04 (PHP 8.1.2) * Update composer.lock * Update composer.lock * Blocked various file types in .htaccess (#2359) * Color swatches work with disparate product IDs (#2390) * Move Credit Memo at the end of the buttons list (#2392) * Version bump (#2387) * Minor fixes on 'filter_condition_callback' method _filterStoreCondition() (#2362) * add ReturnTypeWillChange to various Files catched by code style checker #2302 * Phpstan fixes (#2396) * Fixed addCrumb() * Fixed initForm() and _needToAddDummy() * Fixed addLink() * Fixed addLinkRel() * Fixed canUseCanonicalTag() * Fixed getAddUrl...() * Fixed rollBack() camelCase error reported by phpstan (#2403) * Changes default root dir in composer.json (#2401) * Fixed targetNamespace for WS-I Compliant SOAP APIs (#2405) * Updated phpstan baseline Co-authored-by: sv3n <[email protected]> Co-authored-by: Fabian Blechschmidt <[email protected]> Co-authored-by: Colin Mollenhour <[email protected]> Co-authored-by: Kevin Jakob <[email protected]> Co-authored-by: Ng Kiat Siong <[email protected]> Co-authored-by: Scott Moore <[email protected]> Co-authored-by: ADDISON <[email protected]> Co-authored-by: Justin Beaty <[email protected]> Co-authored-by: luigifab <[email protected]> Co-authored-by: Daniel Fahlke <[email protected]> Co-authored-by: leissbua <[email protected]>
In the composer.json file there is the following condition for the PHP version:
If you use Ubuntu 22.04 as a server, today the PHP version installed by default is 8.1.2. Running the command
composer update
will have the following negative effect:By changing the condition of the PHP version from 8.1 to 8.2, the
composer update
command will run without issues. The result is as follows: