PHP 8.0 | Add support for and detection of union types in param, return and property types by jrfnl · Pull Request #1444 · PHPCompatibility/PHPCompatibility
added 14 commits
December 25, 2022 04:41* Add tests with union types. * Add the new `false` and `null` types to the `$newTypes` array. * Explode the type received from the `FunctionDeclarations::getParameters()` method on the `|` bitwise or operator and do the existing checks for each type found. This maintains the existing behaviour, while allowing for union types.
* Add tests with union types. * Add the new `false` and `null` types to the `$newTypes` array. * Explode the type received from the `FunctionDeclarations::getProperties()` method on the `|` bitwise or operator and do the existing checks for each type found. This maintains the existing behaviour, while allowing for union types.
* Add tests with union types. * Add the new `false` and `null` types to the `$newTypes` array. * Explode the type received from the `Variables::getMemberProperties()` method on the `|` bitwise or operator and do the existing checks for each type found. This maintains the existing behaviour, while allowing for union types.
jrfnl
mentioned this pull request
40 tasks
wimg approved these changes Dec 25, 2022
wimg
deleted the
php-8.0/various-support-and-detect-union-types
branch
jrfnl
mentioned this pull request
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