-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
[9.0.x] PHPLint Docker image should be able to lint all PHP 8 supported syntaxes #180
Comments
Only one Docker image is necessary to check all PHP 8 features. BTW, the current build workflow use PHP 8.0 as base. |
You've also perharps noticed that action of So I'll apply a little change to enable it by See commit 0d36c3a |
This issue is only related to Docker distribution so no more necessary to publish a new version 9.0.4 First image that solve it has Digest Run examples:
|
@llaville About this:
I believe it would be good to have a choice to choose the exact version, like I suggested in #179 For example, we could have a project that is on PHP 8.0, and hasn't upgraded production to use PHP 8.2 yet. If a developer starts using an enum, and has PHP 8.1 installed on their machine, all works fine, but then it goes to Production, and it crashes, because the Production server only has PHP 8.0 installed. If we had a phplint docker image with "8.0" as the tag, at least we would find that the enum can't be used at the moment. Thanks for your fix above! :) |
@ghnp5 I know your point of view, but I'm 👎 to manage multiple docker images. Let me explain my point of view. If you really want to know what your source code used as PHP features, and learn about minimum requirements, I suggest to have a look on my project https://github.com/llaville/php-compatinfo (no PHAR or Docker distributions yet, but it will come) And If you want to lint only files to check if your platform support them, I recommend to use the PHAR distribution of PHPLint rather than Docker image. |
@ghnp5 Related to this subject, here is how we can check PHP syntax by following PHP runtime defined with PHAR alternative on a GitHub Actions Workflow => #181 (comment) |
New Issue
Output of `docker inspect overtrue/phplint:latest` command
Summary
Docker image with tag
latest
on version9.0.3
is not able to check PHP 8.1 or 8.2 features syntaxes without error.Expected behaviour
Be able to lint files with PHP 8.1 or 8.2 syntax without error.
Actual behaviour
With PHP 8.1 feature Enums
Running command :
docker run --rm -it -v "${PWD}":/workdir -w /workdir overtrue/phplint:latest tests/fixtures/php-8.1_syntax.php
Prints following output
With PHP 8.2 feature Type System
Running command :
docker run --rm -it -v "${PWD}":/workdir -w /workdir overtrue/phplint:latest tests/fixtures/php-8.2_syntax.php
Prints following output
Credits
Thanks to @ghnp5 for bringing this to my attention on issue report #179
The text was updated successfully, but these errors were encountered: