-
Notifications
You must be signed in to change notification settings - Fork 4
Php84 update #83
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
Php84 update #83
Changes from all commits
3eb6346
7e05b78
9a57c53
00d2856
436ff93
3a84dd8
10934cb
d8d4dba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,13 +10,13 @@ | |
| ], | ||
| "homepage": "https://github.com/selective-php/image-type", | ||
| "require": { | ||
| "php": "^8.1" | ||
| "php": "8.1.* || 8.2.* || 8.3.* || 8.4.*" | ||
| }, | ||
| "require-dev": { | ||
| "friendsofphp/php-cs-fixer": "^3", | ||
| "phpstan/phpstan": "^1", | ||
| "phpstan/phpstan": "^2", | ||
| "phpunit/phpunit": "^10", | ||
| "squizlabs/php_codesniffer": "^3" | ||
| "squizlabs/php_codesniffer": "^4" | ||
| }, | ||
| "autoload": { | ||
| "psr-4": { | ||
|
|
@@ -34,12 +34,10 @@ | |
| }, | ||
| "scripts": { | ||
| "cs:check": [ | ||
| "@putenv PHP_CS_FIXER_IGNORE_ENV=1", | ||
| "php-cs-fixer fix --dry-run --format=txt --verbose --diff --config=.cs.php --ansi" | ||
| "php-cs-fixer fix --dry-run --format=txt --verbose --diff --config=.cs.php --ansi --allow-unsupported-php-version=yes" | ||
| ], | ||
| "cs:fix": [ | ||
| "@putenv PHP_CS_FIXER_IGNORE_ENV=1", | ||
| "php-cs-fixer fix --config=.cs.php --ansi --verbose" | ||
| "php-cs-fixer fix --config=.cs.php --ansi --verbose --allow-unsupported-php-version=yes" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you explain why adding the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see cs:check ... |
||
| ], | ||
| "sniffer:check": "phpcs --standard=phpcs.xml", | ||
| "sniffer:fix": "phpcbf --standard=phpcs.xml", | ||
|
|
@@ -51,6 +49,9 @@ | |
| "@stan", | ||
| "@test" | ||
| ], | ||
| "test:coverage": "php -d xdebug.mode=coverage -r \"require 'vendor/bin/phpunit';\" -- --configuration phpunit.xml --do-not-cache-result --colors=always --coverage-clover build/logs/clover.xml --coverage-html build/coverage" | ||
| "test:coverage": [ | ||
| "@putenv XDEBUG_MODE=coverage", | ||
| "phpunit --configuration phpunit.xml --do-not-cache-result --colors=always --display-warnings --display-deprecations --coverage-clover build/coverage/clover.xml --coverage-html build/coverage --coverage-text" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you explain this change? It seems that the original and modified command are equivalent.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When changing phpunit, I simply adopted Odan's settings. During the first updates, I saw that he had changed it in selective/packages and thought I could do the same. Maybe that was a bit silly. But I liked the changes. |
||
| ] | ||
| } | ||
| } | ||
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.
Could you explain why adding the
--allow-unsupported-php-version=yesoption?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 I run the test with composer cs:check, I get the message,
`root@2df332b08462:/var/www/html# composer cs:check
The same applies to cs:check, and you should now use --allow-unsupported-php-version=yes.
That's why I changed it like this.
Edit: I found it again ... https://cs.symfony.com/doc/usage.html
`The --allow-unsupported-php-version=yes can be used to ignore any environment requirements.
Also possible via PHP_CS_FIXER_IGNORE_ENV environment variable (deprecated), which also allows the Fixer to run with required PHP extensions missing.
`