-
-
Notifications
You must be signed in to change notification settings - Fork 424
make PhpCompatUtil::getPhpVersion() public #970
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
Conversation
1031504
to
81dd82c
Compare
We already have a global maker-bundle/src/Generator.php Line 175 in 203699d
What additional features are needed in PHP8 that are not covered by these 2 methods? If union return types is needed, adding a |
81dd82c
to
8a295a3
Compare
Hello @jrushlow thanks for your feedback. I indeed felt it was a little bit redundant, and not flexible enough. Here is a fix. Cheers! |
Thanks Nicolas - I like where this ended up :) |
This PR was merged into the 1.0-dev branch. Discussion ---------- [release] prep 1.34.0 # Release Hi Makers! This release contains a few new features, fixes, and improvements under the hood! Most notably, this release introduces PHP Attribute support for `make:entity` including entities using API Platform, support for the new Symfony Password Hasher in `make:reset-password`, & `make:registration`, and implements stronger return types where possible. Diff: v1.33.0...v1.34.0 Happy making! # Changelog ## [v1.34.0](https://github.com/symfony/maker-bundle/releases/tag/v1.34.0) *September 27th, 2021* ### Feature - [#978](#978) - Adding Entity attribute support - *`@simonmarx`*, *`@geekimo`*, *`@adlpz`*, *`@weaverryan`*, *`@jrushlow`* - [#970](#970) - make PhpCompatUtil::getPhpVersion() public - *`@nikophil`* - [#968](#968) - [make:entity] APIP: use new attribute if exists - *`@nikophil`* - [#963](#963) - add return types for symfony 6 - *`@jrushlow`* - [#925](#925) - [templates] Add void return types - *`@seb`-jean* - [#923](#923) - use password hasher for make:registration & make:reset-password, includes other improvements - *`@jrushlow`* ### Bug Fix - [#974](#974) - Fix method call definition - *`@ajgarlag`* - [#973](#973) - Fix we we typo - *`@karser`* - [#933](#933) - [make:entity] Remove deprecated json_array type from available list types. - *`@bdaler`* - [#930](#930) - Add all missed dependencies to make:reset-password - *`@upyx`* - [#870](#870) - [make:crud] Fix templates path use in include - *`@leblanc`-simon* Commits ------- 2ba83b3 [release] prep 1.34.0
This PR was merged into the 1.0-dev branch. Discussion ---------- [release] prep 1.34.0 # Release Hi Makers! This release contains a few new features, fixes, and improvements under the hood! Most notably, this release introduces PHP Attribute support for `make:entity` including entities using API Platform, support for the new Symfony Password Hasher in `make:reset-password`, & `make:registration`, and implements stronger return types where possible. Diff: symfony/maker-bundle@v1.33.0...v1.34.0 Happy making! # Changelog ## [v1.34.0](https://github.com/symfony/maker-bundle/releases/tag/v1.34.0) *September 27th, 2021* ### Feature - [#978](symfony/maker-bundle#978) - Adding Entity attribute support - *`@simonmarx`*, *`@geekimo`*, *`@adlpz`*, *`@weaverryan`*, *`@jrushlow`* - [#970](symfony/maker-bundle#970) - make PhpCompatUtil::getPhpVersion() public - *`@nikophil`* - [#968](symfony/maker-bundle#968) - [make:entity] APIP: use new attribute if exists - *`@nikophil`* - [#963](symfony/maker-bundle#963) - add return types for symfony 6 - *`@jrushlow`* - [#925](symfony/maker-bundle#925) - [templates] Add void return types - *`@seb`-jean* - [#923](symfony/maker-bundle#923) - use password hasher for make:registration & make:reset-password, includes other improvements - *`@jrushlow`* ### Bug Fix - [#974](symfony/maker-bundle#974) - Fix method call definition - *`@ajgarlag`* - [#973](symfony/maker-bundle#973) - Fix we we typo - *`@karser`* - [#933](symfony/maker-bundle#933) - [make:entity] Remove deprecated json_array type from available list types. - *`@bdaler`* - [#930](symfony/maker-bundle#930) - Add all missed dependencies to make:reset-password - *`@upyx`* - [#870](symfony/maker-bundle#870) - [make:crud] Fix templates path use in include - *`@leblanc`-simon* Commits ------- 2ba83b3a [release] prep 1.34.0
Hello,
what do you think if we make the method
PhpCompatUtil::getPhpVersion()
public?This could be needed for some libs which leverage maker bundle
This would be helpful to resolve this problem: api-platform/core#4423 (review)
Another solution for my problem would be to expose a global
is_php8
variable to all templates. but maybe that's not a good solution, because way may need to differentiate minor versions