mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-03 09:50:49 +00:00
[PHPStan] Update to PHPStan 0.12.99 (#874)
* [PHPStan] Update to PHPStan 0.12.99 * add BackedEnum to stub * final touch: comment * final touch: move to next if * final touch: clean up
This commit is contained in:
parent
430041fd55
commit
41dfd36407
|
@ -26,7 +26,7 @@ jobs:
|
||||||
|
|
||||||
-
|
-
|
||||||
name: 'Along PHPStan'
|
name: 'Along PHPStan'
|
||||||
install: composer require phpstan/phpstan:^0.12.98 --dev --ansi
|
install: composer require phpstan/phpstan:^0.12.99 --dev --ansi
|
||||||
|
|
||||||
name: "PHP ${{ matrix.php_version }}"
|
name: "PHP ${{ matrix.php_version }}"
|
||||||
|
|
||||||
|
|
|
@ -49,3 +49,13 @@ if (! interface_exists('UnitEnum')) {
|
||||||
public static function cases(): array;
|
public static function cases(): array;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! interface_exists('BackedEnum')) {
|
||||||
|
/**
|
||||||
|
* @since 8.1
|
||||||
|
*/
|
||||||
|
interface BackedEnum extends UnitEnum {
|
||||||
|
public static function from(int|string $value): static;
|
||||||
|
public static function tryFrom(int|string $value): ?static;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.1|^8.0",
|
"php": "^7.1|^8.0",
|
||||||
"phpstan/phpstan": "0.12.98"
|
"phpstan/phpstan": "0.12.99"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"files": [
|
"files": [
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
"nette/utils": "^3.2",
|
"nette/utils": "^3.2",
|
||||||
"nikic/php-parser": "4.12.0",
|
"nikic/php-parser": "4.12.0",
|
||||||
"phpstan/phpdoc-parser": "^0.5.5",
|
"phpstan/phpdoc-parser": "^0.5.5",
|
||||||
"phpstan/phpstan": "0.12.98",
|
"phpstan/phpstan": "0.12.99",
|
||||||
"phpstan/phpstan-phpunit": "^0.12.22",
|
"phpstan/phpstan-phpunit": "^0.12.22",
|
||||||
"rector/extension-installer": "^0.11.0",
|
"rector/extension-installer": "^0.11.0",
|
||||||
"rector/rector-cakephp": "^0.11.3",
|
"rector/rector-cakephp": "^0.11.3",
|
||||||
|
|
15
stubs/Php/BackedEnum.php
Normal file
15
stubs/Php/BackedEnum.php
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
if (interface_exists('BackedEnum')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 8.1
|
||||||
|
*/
|
||||||
|
interface BackedEnum extends UnitEnum {
|
||||||
|
public static function from(int|string $value): static;
|
||||||
|
public static function tryFrom(int|string $value): ?static;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user