:sparkles: PHP 8.1: New `PHPCompatibility.InitialValue.NewNewInInitializers` sniff by jrfnl · Pull Request #1464 · PHPCompatibility/PHPCompatibility
Navigation Menu
{{ message }}
PHPCompatibility / PHPCompatibility Public
- Notifications You must be signed in to change notification settings
- Fork 204
Conversation
Copy link Copy Markdown
Member
jrfnl
commented
Jan 3, 2023
jrfnl
commented
newin InitializersIt is now possible to use
new ClassName()expressions as the default value of a parameter, static variable, global constant initializers, and as attribute arguments.
Refs:
- https://wiki.php.net/rfc/new_in_initializers
- https://www.php.net/manual/en/migration81.new-features.php#migration81.new-features.core.new-in-initializer
- New in initializers (reduced version) php/php-src#7153
- php/php-src@52d3d0d
Includes unit tests.
Related to #1299
…niff > `new` in Initializers > > It is now possible to use `new ClassName()` expressions as the default value of a parameter, static variable, global constant initializers, and as attribute arguments. Refs: * https://wiki.php.net/rfc/new_in_initializers * https://www.php.net/manual/en/migration81.new-features.php#migration81.new-features.core.new-in-initializer * php/php-src#7153 * php/php-src@52d3d0d Includes unit tests.
jrfnl
added
Type: enhancement
PR: ready for review
labels
jrfnl
added this to the
10.0.0 milestone
jrfnl
requested a review
from wimg
jrfnl
mentioned this pull request
47 tasks
wimg approved these changes Jan 8, 2023
wimg
merged commit
94e73ef
into
develop
wimg
deleted the
php-8.1/new-newininitializers-sniff-2
branch
github-actions
bot
removed
the
PR: ready for review
label
jrfnl
added
the
PHP: 8.1
label
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment