2020-08-13 18:30:12 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Phabel\Target;
|
|
|
|
|
|
|
|
use Phabel\Plugin;
|
|
|
|
use Phabel\Target\Php71\ArrayList;
|
|
|
|
use Phabel\Target\Php71\ClassConstantVisibilityModifiersRemover;
|
|
|
|
use Phabel\Target\Php71\ListKey;
|
|
|
|
use Phabel\Target\Php71\MultipleCatchReplacer;
|
|
|
|
use Spatie\Php7to5\NodeVisitors\NullableTypeRemover;
|
|
|
|
|
|
|
|
/**
|
2020-08-13 21:34:59 +02:00
|
|
|
* Makes changes necessary to polyfill PHP 7.1 and run on PHP 7.0 and below.
|
|
|
|
*
|
2020-08-13 18:30:12 +02:00
|
|
|
* @author Daniil Gentili <daniil@daniil.it>
|
2020-08-13 21:34:59 +02:00
|
|
|
* @license MIT
|
2020-08-13 18:30:12 +02:00
|
|
|
*/
|
|
|
|
class Php71 extends Plugin
|
|
|
|
{
|
2020-08-13 21:34:59 +02:00
|
|
|
public static function composerRequires(): array
|
|
|
|
{
|
|
|
|
return ['symfony/polyfill-php70' => '*'];
|
|
|
|
}
|
2020-08-13 18:30:12 +02:00
|
|
|
public static function runWithAfter(): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
ArrayList::class,
|
|
|
|
ClassConstantVisibilityModifiersRemover::class,
|
|
|
|
ListKey::class,
|
|
|
|
MultipleCatchReplacer::class,
|
|
|
|
NullableTypeRemover::class
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|