Skip to content

✨ PHP 8.1: New PHPCompatibility.Syntax.NewFirstClassCallables sniff#1425

Merged
wimg merged 1 commit intodevelopfrom
php-8.1/new-firstclasscallables-sniff
Dec 5, 2022
Merged

✨ PHP 8.1: New PHPCompatibility.Syntax.NewFirstClassCallables sniff#1425
wimg merged 1 commit intodevelopfrom
php-8.1/new-firstclasscallables-sniff

Conversation

@jrfnl
Copy link
Copy Markdown
Member

@jrfnl jrfnl commented Dec 5, 2022

Closures for callables can now be created using the syntax myFunc(...), which is identical to Closure::fromCallable('myFunc').

Refs:

Includes unit tests.
Includes sniff documentation.

Related to #1299

> Closures for callables can now be created using the syntax `myFunc(...)`, which is identical to `Closure::fromCallable('myFunc')`.

Refs:
* https://www.php.net/manual/en/migration81.new-features.php#migration81.new-features.core.callable-syntax
* https://wiki.php.net/rfc/first_class_callable_syntax
* php/php-src#7019
* php/php-src@d0b09a7

Includes unit tests.
Includes sniff documentation.
@wimg wimg merged commit fc9055b into develop Dec 5, 2022
@wimg wimg deleted the php-8.1/new-firstclasscallables-sniff branch December 5, 2022 12:12
@jrfnl jrfnl added the PHP: 8.1 label Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants