Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"require": {
"php": ">=8.0",
"fairpm/did-manager-wordpress": "0.0.4-a"
"fairpm/did-manager-wordpress": "^0.0.7"
},
"require-dev": {
"yoast/phpunit-polyfills": "*",
Expand All @@ -38,6 +38,7 @@
"@format:phpcs",
"@format:phpstan"
],
"detect-min-php": "sh -c 'for v in 5.4 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4; do echo Testing PHP $v...; if docker run --rm -v \"$PWD:/app\" -w /app php:${v}-cli sh -c \"find . -type f -name \\\"*.php\\\" -not -path \\\"*/vendor/*\\\" -print0 | xargs -0 -n1 php -l\" >/dev/null 2>&1; then echo Minimum supported PHP version: $v; exit 0; fi; done; echo No supported PHP version detected; exit 1'",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This currently excludes vendor content but the PHP compatibility issue was actually in a vendor dependency so this script wouldn't catch that.

Secondly, this relies on bash. Considering that we already have php-compatability checks, it should be enough to run those as part of the CI test matrix of all supported versions of PHP to catch any issues. It is important to run it also against the vendor contents which it doesn't do by default, if I'm not mistaken.

Finally, if we do keep it in as a convenience feature, let's reduce the range of PHP to 8.0 and above.

"phpstan-baseline": "phpstan analyse --generate-baseline=tests/phpstan-baseline.neon --memory-limit=2G",
"test": [
"Composer\\Config::disableProcessTimeout",
Expand Down
Loading
Loading