lint/php-8.3
Upgrade to PHP 8.3: code a newer PHP removes, deprecates or does better.
add-const-type
Add type to constants based on their value
In the lint-recommended preset and every stricter one. In Rector’s rector/php83 set. Safe fix. Runs only when [php] version is 8.3 or later.
prefer-dynamic-class-constant
constant(Example::class . ‘::’ . $constName) to dynamic class const fetch Example::{$constName}
In the lint-recommended preset and every stricter one. In Rector’s rector/php83 set. Safe fix. Runs only when [php] version is 8.3 or later.
prefer-json-validate
Replace json_decode($json, true) !== null && json_last_error() === JSON_ERROR_NONE with json_validate()
In the lint-recommended preset and every stricter one. In Rector’s rector/php-polyfills, rector/php83 sets. Safe fix. Runs only when [php] version is 8.3 or later.
prefer-ldap-uri
Combine separated host and port on ldap_connect() args
In the lint-recommended preset and every stricter one. In Rector’s rector/php83 set. Safe fix. Runs only when [php] version is 8.3 or later.
prefer-readonly-anonymous-class
Decorate read-only anonymous class with readonly attribute
In the lint-recommended preset and every stricter one. In Rector’s rector/php83 set. Safe fix. Runs only when [php] version is 8.3 or later.
prefer-self-class
Replace calls to get_class() and get_parent_class() without arguments with self::class and parent::class
In the lint-recommended preset and every stricter one. In Rector’s rector/php83 set. Safe fix. Runs only when [php] version is 8.3 or later.