phabel/src/Target/Php80.php

32 lines
682 B
PHP
Raw Normal View History

2020-08-23 20:54:56 +02:00
<?php
namespace Phabel\Target;
use Phabel\Plugin;
2020-09-01 14:31:23 +02:00
use Phabel\Target\Php80\IssetExpressionFixer;
use Phabel\Target\Php80\NestedExpressionFixer;
2020-08-23 20:54:56 +02:00
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 [
2020-09-01 14:31:23 +02:00
IssetExpressionFixer::class,
NestedExpressionFixer::class,
2020-08-23 20:54:56 +02:00
UnionTypeStripper::class,
];
}
}