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

[Hotfix] Fix Phar building #70

Merged
merged 2 commits into from
Dec 1, 2021

Conversation

jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented Oct 10, 2021

Upgrade to Box 3 for Phar generation

Box 2 is no longer maintained and will not be made compatible with more recent PHP versions.

Refs:

PHP 8.1: fix Phar building

For the time being, until box-project/box#567 has been fixed:

  1. Disable the addition of the requirement checker from Box as the version included in the last release of Box is not compatible with PHP 8.1.
  2. Change the PHP version used to generate the Phar to PHP 8.0 to get round the problem the PHP compactor has with attributes.
    Note: the generated Phar file should still be compatible with all supported PHP versions.

Fixes #69
Closes #39
Closes #36

@grogy A release with a Phar generated after this fix has been merged would be appreciated as anyone currently using this tool to lint their files against PHP 8.1 (in CI or otherwise) is affected by this issue.

@jrfnl jrfnl force-pushed the feature/69-fix-phar-building branch 4 times, most recently from 2330dc0 to 327a273 Compare October 11, 2021 00:44
@jrfnl
Copy link
Collaborator Author

jrfnl commented Oct 11, 2021

Argh... there is nothing in this PR which could cause the failures on PHP 5.3 - 5.5, so I just did a test (re)build of master and looks like the tests are failing on PHP 5.3 -5.5 on master as well.

I've gone through everything in the script to try and figure out what is causing it, but so far haven't found the cause yet.

  • OS is approximately the same as the previous build of master, i.e ubuntu-20.04.2 vs 20.04.3.
  • PHP versions are the same.
  • Downloaded dependencies are at the same version.

@jrfnl
Copy link
Collaborator Author

jrfnl commented Oct 31, 2021

@grogy Bump...

@jrfnl
Copy link
Collaborator Author

jrfnl commented Nov 1, 2021

FYI: I will rebase this PR once PR #71 has been merged.

For the time being, until box-project/box#567 has been fixed:
1. Disable the addition of the requirement checker from Box as the version included in the last release of Box is not compatible with PHP 8.1.
2. Change the PHP version used to generate the Phar to PHP 8.0 to get round the problem the PHP compactor has with attributes.
    Note: the generated Phar file should still be compatible with all supported PHP versions.
@jrfnl jrfnl force-pushed the feature/69-fix-phar-building branch from 327a273 to daf0dfa Compare December 1, 2021 15:24
@jrfnl
Copy link
Collaborator Author

jrfnl commented Dec 1, 2021

Rebased now #71 has been merged.

@grogy
Copy link
Member

grogy commented Dec 1, 2021

Thank you, I tried created PHAR with 7.4 server and works ok

@grogy grogy merged commit 927df66 into php-parallel-lint:master Dec 1, 2021
@grogy grogy mentioned this pull request Dec 1, 2021
@jrfnl jrfnl deleted the feature/69-fix-phar-building branch December 1, 2021 15:48
@jrfnl
Copy link
Collaborator Author

jrfnl commented Dec 1, 2021

Thank you, I tried created PHAR with 7.4 server and works ok

The Phar is also being tested against all supported PHP versions in the test workflow, so we should be good.

@jrfnl jrfnl added this to the 1.x Next milestone Feb 17, 2022
jrfnl added a commit that referenced this pull request Jun 27, 2022
The box project has released Box 4.0.0 (and 4.0.1).

Most notable changes:
* New minimum PHP version of PHP 8.1.
* The sodium extension has become a requirement.
* The requirements checker now has a minimum PHP version of PHP 7.2.4.

We already disabled the requirements checker previously due to PHP 8.1 incompatibilities (PR #70), I've not added a comment to document not to turn it on again as that would make the Parallel Lint PHAR incompatible with PHP < 7.2.

Refs: https://github.com/box-project/box/releases/tag/4.0.0
jrfnl added a commit that referenced this pull request Jun 27, 2022
The box project has released Box 4.0.0 (and 4.0.1).

Most notable changes:
* New minimum PHP version of PHP 8.1.
* The sodium extension has become a requirement.
* The requirements checker now has a minimum PHP version of PHP 7.2.4.

We already disabled the requirements checker previously due to PHP 8.1 incompatibilities (PR #70), I've not added a comment to document not to turn it on again as that would make the Parallel Lint PHAR incompatible with PHP < 7.2.

Refs: https://github.com/box-project/box/releases/tag/4.0.0
grogy pushed a commit that referenced this pull request Jul 25, 2022
The box project has released Box 4.0.0 (and 4.0.1).

Most notable changes:
* New minimum PHP version of PHP 8.1.
* The sodium extension has become a requirement.
* The requirements checker now has a minimum PHP version of PHP 7.2.4.

We already disabled the requirements checker previously due to PHP 8.1 incompatibilities (PR #70), I've not added a comment to document not to turn it on again as that would make the Parallel Lint PHAR incompatible with PHP < 7.2.

Refs: https://github.com/box-project/box/releases/tag/4.0.0
grogy pushed a commit that referenced this pull request Jul 25, 2022
The box project has released Box 4.0.0 (and 4.0.1).

Most notable changes:
* New minimum PHP version of PHP 8.1.
* The sodium extension has become a requirement.
* The requirements checker now has a minimum PHP version of PHP 7.2.4.

We already disabled the requirements checker previously due to PHP 8.1 incompatibilities (PR #70), I've not added a comment to document not to turn it on again as that would make the Parallel Lint PHAR incompatible with PHP < 7.2.

Refs: https://github.com/box-project/box/releases/tag/4.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Phar for 1.3.1 does not contain version 1.3.1 Make box config compatible with humbug/box
2 participants