Use PHP 8.0 syntax and add CI automation to enforce it#5
Merged
Conversation
kasparsd
commented
May 15, 2026
Contributor
Author
|
The CI checks now pass (need to merge before they run in the context of this repo) https://github.com/kasparsd/did-manager-wordpress/actions/runs/25928537085 |
This was referenced May 15, 2026
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
kasparsd
commented
May 16, 2026
namithj
approved these changes
May 16, 2026
Merged
Make it pass `composer validate --strict` Signed-off-by: Kaspars Dambis <hi@kaspars.net>
kasparsd
commented
May 16, 2026
| "afragen/wordpress-plugin-readme-parser": "^1.2025.12", | ||
| "erusev/parsedown": "^1.7", | ||
| "fairpm/did-manager": ">=0.0.5" | ||
| "fairpm/did-manager": "^0.0.5" |
Contributor
Author
There was a problem hiding this comment.
Make it pass composer validate --strict without require.fairpm/did-manager : unbound version constraints (>=0.0.5) should be avoided.
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
Signed-off-by: Kaspars Dambis <hi@kaspars.net>
kasparsd
commented
May 16, 2026
| */ | ||
| private function contains_markdown(string $content): bool | ||
| { | ||
| $pattern = '/(\*\*[^*]+\*\*|__[^_]+__|`[^`]+`|' |
Contributor
Author
There was a problem hiding this comment.
Splitting this up to not exceed the max line length.
| } | ||
|
|
||
| return $this->parser->warnings ?? []; | ||
| return $this->parser->warnings; |
Contributor
Author
There was a problem hiding this comment.
Reported by phpstan that these are not nullable so ?? doesn't make sense.
This was referenced May 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4.
magoand a few other dependencies require PHP 8.1 (as described in the issue).To ensure consistency with the FAIR plugin requirements for PHP 8.0:
magotophpcsandphpstan.phpcsruleset since that matches the existingmagoruleset.