32 lines
682 B
PHP
32 lines
682 B
PHP
<?php
|
|
|
|
namespace Phabel\Target;
|
|
|
|
use Phabel\Plugin;
|
|
use Phabel\Target\Php80\IssetExpressionFixer;
|
|
use Phabel\Target\Php80\NestedExpressionFixer;
|
|
use Phabel\UnionTypeStripper;
|
|
|
|
/**
|
|
* Makes changes necessary to polyfill PHP 8.0 and run on PHP 7.4 and below.
|
|
*
|
|
* @author Daniil Gentili <daniil@daniil.it>
|
|
* @license MIT
|
|
*/
|
|
class Php80 extends Plugin
|
|
{
|
|
public static function composerRequires(): array
|
|
{
|
|
return ['symfony/polyfill-php80' => '*'];
|
|
}
|
|
|
|
public static function runWithAfter(): array
|
|
{
|
|
return [
|
|
IssetExpressionFixer::class,
|
|
NestedExpressionFixer::class,
|
|
UnionTypeStripper::class,
|
|
];
|
|
}
|
|
}
|