-
-
Notifications
You must be signed in to change notification settings - Fork 17
Ignore platform requirements object #46
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
Ignore platform requirements object #46
Conversation
@_@ what |
Keeping BC 🤷🏼♂️ |
If we started supporting |
Imho, having |
f92abe4
to
e283436
Compare
This will now output the following matrix when no further
So while keeping BC compatibility by providing If we want to merge this, I will prepare a PR within the CI action afterwards. |
e283436
to
ca4cf0a
Compare
@@ -32,7 +32,8 @@ export class Command { | |||
extensions: this.extensions, | |||
ini: this.ini, | |||
dependencies: this.dependencies, | |||
ignore_platform_reqs_8: this.ignore_platform_reqs_8, | |||
ignore_platform_reqs_8: this.ignore_php_platform_requirement, |
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.
When running a job on PHP 7.4, it is absolutely fine to provide ignore_platform_reqs8
as false
or true
depending on the PHP 7.4 configuration.
The action itself will only apply this to the composer command if the PHP version used in the action is PHP 8.0 and thus, we are good to go.
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.
This is good - it will ensure that the CI container doesn't need immediate changes, and we can update it after this is already released.
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.
This is good - it will ensure that the CI container doesn't need immediate changes, and we can update it after this is already released.
Yup, that was the idea. This change is fully BC compatible.
This PR contains changes from #47 |
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.
Overall, this is good. I'd like to get #47 merged first, so that the diff on the README.md
file is less, before merging this one.
As to the comments by @Ocramius - this is about installing dependencies. There's a fair number of dependencies of ours that do not have their PHP constraints updated, though they work fine with it. By applying the --ignore-platform-req
option, we can still test against them.
That said, we should likely start seeing if we can test without that flag as we start the PHP 8.1 rollout, though it will be tempered by needing it for 8.1 tests ... which this patch would allow for.
@@ -32,7 +32,8 @@ export class Command { | |||
extensions: this.extensions, | |||
ini: this.ini, | |||
dependencies: this.dependencies, | |||
ignore_platform_reqs_8: this.ignore_platform_reqs_8, | |||
ignore_platform_reqs_8: this.ignore_php_platform_requirement, |
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.
This is good - it will ensure that the CI container doesn't need immediate changes, and we can update it after this is already released.
…ected location Signed-off-by: Maximilian Bösing <[email protected]>
… message Signed-off-by: Maximilian Bösing <[email protected]>
…as-ci.json` The `ignore_php_platform_requirements` can be an object containing the PHP version to ignore along with the instruction to either ignore the requirements or not. This also deprecates the old `ignore_platform_reqs_8` configuration. Signed-off-by: Maximilian Bösing <[email protected]>
…requirement flags Signed-off-by: Maximilian Bösing <[email protected]>
ca4cf0a
to
e62c34e
Compare
@@ -10,7 +10,7 @@ import {Validator} from "@cfworker/json-schema"; | |||
* Do early composer.json schema validation to avoid unnecessary ramp-ups of jobs which may fail | |||
* due to an incompatible composer.json. | |||
*/ | |||
if (fs.existsSync('composer.json')) { | |||
if (fs.existsSync('composer.json') && fs.existsSync('/action/composer.schema.json')) { |
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.
This is kinda unrelated but it always bit me when running this locally due to the absolute path requirement.
I can drop this again.
@@ -20,10 +20,7 @@ if (fs.existsSync('composer.json')) { | |||
|
|||
if (!validationResult.valid) { | |||
validationResult.errors.forEach(function (outputUnit) { | |||
core.error("There is an error in the keyword located by {0}: {1}".format( |
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.
This is also deprecated but when I tried to add https://github.com/laminas/laminas-ci-matrix-action/pull/46/files#diff-e727e4bdf3657fd1d798edcd6b099d6e092f8573cba266154583a746bba0f346R48-R50, I had issues with String.format
and thus, I wanted to ensure that this will definitely work.
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.
One nit-pick, and thien this is ready.
…passed as PHP version Signed-off-by: Maximilian Bösing <[email protected]>
Description
With one of the earlier versions, we introduced
ignore_platform_reqs_8
to ignore PHP 8.0 composer dependency conflicts.Since we will need this for PHP 8.1 as well, this PR adds a new way to ignore platform requirements for any PHP version.
New format now is:
PHP 8.0 and PHP 8.1 are enabled by default or do we want to change default behavior for PHP 8.0 with the next release?
This PR also deprecates the usage of
ignore_platform_reqs_8
in projects and will add a warning to the actions output.