-
Notifications
You must be signed in to change notification settings - Fork 173
Open
Labels
Description
Pint Version
1.15.1 - current
PHP Version
=8.2
Description
We use Pint locally and in a Bitbucket pipeline. Pint is started via a Makefile.
However, the pint fixing was now terminated in the pipeline with an exit code of 1, but there was no other output explaining why it failed.
Makefile:
cs-fix-style: ## Run pint for automatic code style fixes
$(PHP) $(PINT_FILE) --config=dev-ops/pint.json --format=junit > .build/fix-style.junit.xml
Output:
> /usr/bin/php -derror_reporting=0 tools/pint/vendor/bin/pint --config=tools/pint.json --format=junit > .build/fix-style.junit.xml
make: *** [Makefile:...: cs-fix-style] Error 1
The cause was:
PHP 8.2 is used in the pipeline. However, typed class constants were used in one of the PHP classes, which is a feature of PHP 8.3.
When I removed the output formatting and increased the verbosity level to 3, it was reported that it had actually detected the syntax error.
Expected Behavior:
Pint should not simply stop without error messages.
Steps To Reproduce
Create a class with type constants and run pint with php 8.2 .
GertjanRoke