-
Notifications
You must be signed in to change notification settings - Fork 6k
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
PHP 7.2 #8534
PHP 7.2 #8534
Conversation
some rules around whitespace have been disabled, since we don't have a great deal of control over whitespace that is emitted when template values are empty.
Can someone please merge this pull request, it is still an issue! |
Just wanted to pass on that we were able to get this pull request merged with the OpenAPI project over at OpenAPITools/openapi-generator#769. I'm a user of both OpenAPI and this project, and would love to see PHP7.2 support for my v2 spec clients! Please don't hesitate to reach out if I can be of any assistance. |
thanks a lot @mattmelling!!! |
Why wasn't this bundled in any of the 3.0.* releases? |
@HugoMario we use cli v3.20, still the same problem any answer how, which executable to use without having this issue? |
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.3.0.0
branch for changes related to OpenAPI spec 3.0. Default:master
.Description of the PR
Fixes #8533. The PHP client uses
friendsofphp/php-cs-fixer
v1.12 for PSR2 analysis. 1,12 doesn't supports PHP up to < 7.2.PHP >= 7.2 support was added in
php-cs-fixer
v2 which made some changes to the API and default fixers/rules.This PR upgrades
php-cs-fixer
to v2.12. The fixers/rules have been aligned for PSR2 as desired in the original PR (#3863). I've changed defaults for some of the rules to prevent lots of whitespace warnings fromphp-cs-fixer
, these typically seem to be down to blank template values and are not raised when using the configuration in master.Notes
php-cs-fixer
added the idea of "risky" fixers in v2. Since thestrict_param
andstrict_comparison
fixers are considered risky, we must alter the command line tovendor/bin/php-cs-fixer fix --dry-run --diff -vvv --allow-risky yes
even when using --dry-run./cc @dkarlovi, @mandrean