-
-
Notifications
You must be signed in to change notification settings - Fork 699
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
[PHP 8.0] [Meta] #3127
Comments
get_debug_type() see https://wiki.php.net/rfc/get_debug_type Object-based token_get_all() https://wiki.php.net/rfc/token_as_object |
@staabm Could you provide before/after diff snippet for both of them? So we can make rules of it and focus on that part only |
another merged PR: php/php-src#5427 before php8 $resource = fopen(...); // example way to get a resource
echo (int) $resource; with php8 $resource = fopen(...); // example way to get a resource
echo get_resource_id($resource); |
regarding: Object-based token_get_all() wiki.php.net/rfc/token_as_object before $tokens = token_get_all($code);
foreach ($tokens as $token) {
if (is_array($token)) {
$name = token_name($token[0]);
$text = $token[1];
} else {
$name = null;
$text = $token;
}
} after (php8+) $tokens = PhpToken::getAll($code);
foreach($tokens as $phpToken) {
// it is not necessary to continuously check whether an array or string token is being used.
$name = $phpToken->getTokenName();
$text = $phpToken->text;
} |
AFAIK all cases are resolved now 👍 |
rectorphp/rector-src@8584570 [Php74] Register TypedPropertyFromAssignsRector to php74 config set (#3127)
New Accepted Features
get_resource_id()
mixed
typeconstructor promotion
Generic sources
1.
str_starts_with()
/str_ends_with()
✔️2.
str_contains()
✔️str_contains
#30253.
Stringable
interface for classes with__toString()
✔️4. Attributes v2 ✔️
5.
static
type ✔️6.
::class
on objects ✔️7.
get_debug_type
✔️8.
token_get_all
toPhpToken
✔️9.
catches
without $variable ✔️10.
match
✔️New features, without no path to upgrade
The text was updated successfully, but these errors were encountered: