mirror of https://github.com/rectorphp/rector.git
[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'
|
||||
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 }}"
|
||||
|
||||
|
|
|
@ -49,3 +49,13 @@ if (! interface_exists('UnitEnum')) {
|
|||
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": {
|
||||
"php": "^7.1|^8.0",
|
||||
"phpstan/phpstan": "0.12.98"
|
||||
"phpstan/phpstan": "0.12.99"
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
"nette/utils": "^3.2",
|
||||
"nikic/php-parser": "4.12.0",
|
||||
"phpstan/phpdoc-parser": "^0.5.5",
|
||||
"phpstan/phpstan": "0.12.98",
|
||||
"phpstan/phpstan": "0.12.99",
|
||||
"phpstan/phpstan-phpunit": "^0.12.22",
|
||||
"rector/extension-installer": "^0.11.0",
|
||||
"rector/rector-cakephp": "^0.11.3",
|
||||
|
|
|
@ -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