Skip to content

Conversation

@jrfnl
Copy link
Member

@jrfnl jrfnl commented Jan 8, 2023

PHP 8.2 | NewParamTypeDeclarations: add support for null and false as stand-alone types

PHP 8.2 | NewReturnTypeDeclarations: add support for null and false as stand-alone types

PHP 8.2 | NewTypedProperties: add support for null and false as stand-alone types

Type System Improvements

It is now possible to use null and false as stand-alone types.

The sniff already contained tests for the use of null and false as stand-alone types and would throw an error when detected.
This detection has now been limited to only throw an error when PHP 8.0/8.1 needs to be supported and the error message has been adjusted.

Ref:

PHP 8.2 | NewParamTypeDeclarations: add support for the true type

PHP 8.2 | NewReturnTypeDeclarations: add support for the true type

PHP 8.2 | NewTypedProperties: add support for the true type

Type System Improvements

The true type has been added

Detect use of true as a property type.

Ref:

Related to #1348

jrfnl added 6 commits January 8, 2023 16:51
…` as stand-alone types

> Type System Improvements
>
> It is now possible to use `null` and `false` as stand-alone types.

The sniff already contained tests for the use of `null` and `false` as stand-alone types and would throw an error when detected.
This detection has now been limited to only throw an error when PHP 8.0/8.1 needs to be supported and the error message has been adjusted.

Ref:
* https://wiki.php.net/rfc/null-false-standalone-types
* https://www.php.net/manual/en/migration82.new-features.php#migration82.new-features.core.type-system
* php/php-src@6039c07
…e` as stand-alone types

> Type System Improvements
>
> It is now possible to use `null` and `false` as stand-alone types.

The sniff already contained tests for the use of `null` and `false` as stand-alone types and would throw an error when detected.
This detection has now been limited to only throw an error when PHP 8.0/8.1 needs to be supported and the error message has been adjusted.

Ref:
* https://wiki.php.net/rfc/null-false-standalone-types
* https://www.php.net/manual/en/migration82.new-features.php#migration82.new-features.core.type-system
* php/php-src@6039c07
…tand-alone types

> Type System Improvements
>
> It is now possible to use `null` and `false` as stand-alone types.

The sniff already contained tests for the use of `null` and `false` as stand-alone types and would throw an error when detected.
This detection has now been limited to only throw an error when PHP 8.0/8.1 needs to be supported and the error message has been adjusted.

Ref:
* https://wiki.php.net/rfc/null-false-standalone-types
* https://www.php.net/manual/en/migration82.new-features.php#migration82.new-features.core.type-system
* php/php-src@6039c07
@jrfnl jrfnl added Type: enhancement PR: quick merge PR only contains relatively simple changes PR: ready for review labels Jan 8, 2023
@jrfnl jrfnl added this to the 10.0.0 milestone Jan 8, 2023
@jrfnl jrfnl requested a review from wimg January 8, 2023 15:59
@wimg wimg merged commit 04fecec into develop Jan 8, 2023
@wimg wimg deleted the php-8.2/various-support-and-detect-standalone-false-null-true branch January 8, 2023 20:34
@github-actions github-actions bot removed PR: ready for review PR: quick merge PR only contains relatively simple changes labels Jan 8, 2023
@jrfnl jrfnl added the PHP: 8.2 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.

3 participants