Updated Rector to commit caeeb78f6f

caeeb78f6f Bump Symplify to 10.0.16 + improve complexity (#1725)
This commit is contained in:
Tomas Votruba 2022-01-25 11:43:54 +00:00
parent e9def0d5bc
commit 37ad68b794
40 changed files with 1279 additions and 1306 deletions

View File

@ -0,0 +1,80 @@
<?php
declare (strict_types=1);
namespace Rector\DowngradePhp72\NodeAnalyzer;
use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\Assign;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\Ternary;
use PhpParser\Node\Expr\Variable;
use Rector\Core\PhpParser\Comparing\NodeComparator;
use Rector\Core\PhpParser\Node\BetterNodeFinder;
use Rector\Core\PhpParser\Node\Value\ValueResolver;
use Rector\NodeNameResolver\NodeNameResolver;
final class RegexFuncAnalyzer
{
/**
* @var string[]
*/
private const REGEX_FUNCTION_NAMES = ['preg_match', 'preg_match_all'];
/**
* @readonly
* @var \Rector\NodeNameResolver\NodeNameResolver
*/
private $nodeNameResolver;
/**
* @readonly
* @var \Rector\Core\PhpParser\Node\BetterNodeFinder
*/
private $betterNodeFinder;
/**
* @readonly
* @var \Rector\Core\PhpParser\Comparing\NodeComparator
*/
private $nodeComparator;
/**
* @readonly
* @var \Rector\Core\PhpParser\Node\Value\ValueResolver
*/
private $valueResolver;
public function __construct(\Rector\NodeNameResolver\NodeNameResolver $nodeNameResolver, \Rector\Core\PhpParser\Node\BetterNodeFinder $betterNodeFinder, \Rector\Core\PhpParser\Comparing\NodeComparator $nodeComparator, \Rector\Core\PhpParser\Node\Value\ValueResolver $valueResolver)
{
$this->nodeNameResolver = $nodeNameResolver;
$this->betterNodeFinder = $betterNodeFinder;
$this->nodeComparator = $nodeComparator;
$this->valueResolver = $valueResolver;
}
public function isRegexFunctionNames(\PhpParser\Node\Expr\FuncCall $funcCall) : bool
{
if ($this->nodeNameResolver->isNames($funcCall, self::REGEX_FUNCTION_NAMES)) {
return \true;
}
$variable = $funcCall->name;
if (!$variable instanceof \PhpParser\Node\Expr\Variable) {
return \false;
}
/** @var Assign|null $assignExprVariable */
$assignExprVariable = $this->betterNodeFinder->findFirstPreviousOfNode($funcCall, function (\PhpParser\Node $node) use($variable) : bool {
if (!$node instanceof \PhpParser\Node\Expr\Assign) {
return \false;
}
return $this->nodeComparator->areNodesEqual($node->var, $variable);
});
if (!$assignExprVariable instanceof \PhpParser\Node\Expr\Assign) {
return \false;
}
$expr = $assignExprVariable->expr;
if (!$expr instanceof \PhpParser\Node\Expr\Ternary) {
return \false;
}
if (!$expr->if instanceof \PhpParser\Node\Expr) {
return \false;
}
if (!$this->valueResolver->isValues($expr->if, self::REGEX_FUNCTION_NAMES)) {
return \false;
}
return $this->valueResolver->isValues($expr->else, self::REGEX_FUNCTION_NAMES);
}
}

View File

@ -0,0 +1,58 @@
<?php
declare (strict_types=1);
namespace Rector\DowngradePhp72\NodeManipulator;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\BinaryOp\BitwiseOr;
use PhpParser\Node\Expr\ConstFetch;
use PhpParser\Node\Expr\FuncCall;
use Rector\NodeNameResolver\NodeNameResolver;
final class BitwiseFlagCleaner
{
/**
* @readonly
* @var \Rector\NodeNameResolver\NodeNameResolver
*/
private $nodeNameResolver;
public function __construct(\Rector\NodeNameResolver\NodeNameResolver $nodeNameResolver)
{
$this->nodeNameResolver = $nodeNameResolver;
}
public function cleanFuncCall(\PhpParser\Node\Expr\FuncCall $funcCall, \PhpParser\Node\Expr\BinaryOp\BitwiseOr $bitwiseOr, \PhpParser\Node\Expr $expr = null, string $flag) : void
{
if ($bitwiseOr->left instanceof \PhpParser\Node\Expr\BinaryOp\BitwiseOr) {
/** @var BitwiseOr $leftLeft */
$leftLeft = $bitwiseOr->left;
if ($leftLeft->left instanceof \PhpParser\Node\Expr\ConstFetch && $this->nodeNameResolver->isName($leftLeft->left, $flag)) {
$bitwiseOr = new \PhpParser\Node\Expr\BinaryOp\BitwiseOr($leftLeft->right, $bitwiseOr->right);
}
/** @var BitwiseOr $leftRight */
$leftRight = $bitwiseOr->left;
if ($leftRight->right instanceof \PhpParser\Node\Expr\ConstFetch && $this->nodeNameResolver->isName($leftRight->right, $flag)) {
$bitwiseOr = new \PhpParser\Node\Expr\BinaryOp\BitwiseOr($leftRight->left, $bitwiseOr->right);
}
if ($bitwiseOr->left instanceof \PhpParser\Node\Expr\BinaryOp\BitwiseOr) {
$this->cleanFuncCall($funcCall, $bitwiseOr->left, $bitwiseOr->right, $flag);
return;
}
}
if ($expr instanceof \PhpParser\Node\Expr) {
$bitwiseOr = new \PhpParser\Node\Expr\BinaryOp\BitwiseOr($bitwiseOr, $expr);
}
$this->assignThirdArgsValue($funcCall, $bitwiseOr, $flag);
}
private function assignThirdArgsValue(\PhpParser\Node\Expr\FuncCall $funcCall, \PhpParser\Node\Expr\BinaryOp\BitwiseOr $bitwiseOr, string $flag) : void
{
if ($bitwiseOr->right instanceof \PhpParser\Node\Expr\ConstFetch && $this->nodeNameResolver->isName($bitwiseOr->right, $flag)) {
$bitwiseOr = $bitwiseOr->left;
} elseif ($bitwiseOr->left instanceof \PhpParser\Node\Expr\ConstFetch && $this->nodeNameResolver->isName($bitwiseOr->left, $flag)) {
$bitwiseOr = $bitwiseOr->right;
}
if (!$funcCall->args[3] instanceof \PhpParser\Node\Arg) {
return;
}
$funcCall->args[3]->value = $bitwiseOr;
}
}

View File

@ -5,8 +5,6 @@ namespace Rector\DowngradePhp72\Rector\FuncCall;
use RectorPrefix20220125\Nette\NotImplementedException;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\Assign;
use PhpParser\Node\Expr\BinaryOp\BitwiseOr;
use PhpParser\Node\Expr\BinaryOp\Identical;
@ -14,7 +12,6 @@ use PhpParser\Node\Expr\BooleanNot;
use PhpParser\Node\Expr\Closure;
use PhpParser\Node\Expr\ConstFetch;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\Ternary;
use PhpParser\Node\Expr\Variable;
use PhpParser\Node\Param;
use PhpParser\Node\Scalar\LNumber;
@ -25,6 +22,8 @@ use PhpParser\Node\Stmt\If_;
use Rector\Core\Exception\NotImplementedYetException;
use Rector\Core\NodeManipulator\IfManipulator;
use Rector\Core\Rector\AbstractRector;
use Rector\DowngradePhp72\NodeAnalyzer\RegexFuncAnalyzer;
use Rector\DowngradePhp72\NodeManipulator\BitwiseFlagCleaner;
use Rector\NodeTypeResolver\Node\AttributeKey;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
@ -34,21 +33,30 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
final class DowngradePregUnmatchedAsNullConstantRector extends \Rector\Core\Rector\AbstractRector
{
/**
* @var string[]
*/
private const REGEX_FUNCTION_NAMES = ['preg_match', 'preg_match_all'];
/**
* @see https://www.php.net/manual/en/function.preg-match.php
* @var string
*/
private const FLAG = 'PREG_UNMATCHED_AS_NULL';
private const UNMATCHED_NULL_FLAG = 'PREG_UNMATCHED_AS_NULL';
/**
* @readonly
* @var \Rector\Core\NodeManipulator\IfManipulator
*/
private $ifManipulator;
public function __construct(\Rector\Core\NodeManipulator\IfManipulator $ifManipulator)
/**
* @readonly
* @var \Rector\DowngradePhp72\NodeManipulator\BitwiseFlagCleaner
*/
private $bitwiseFlagCleaner;
/**
* @readonly
* @var \Rector\DowngradePhp72\NodeAnalyzer\RegexFuncAnalyzer
*/
private $regexFuncAnalyzer;
public function __construct(\Rector\Core\NodeManipulator\IfManipulator $ifManipulator, \Rector\DowngradePhp72\NodeManipulator\BitwiseFlagCleaner $bitwiseFlagCleaner, \Rector\DowngradePhp72\NodeAnalyzer\RegexFuncAnalyzer $regexFuncAnalyzer)
{
$this->ifManipulator = $ifManipulator;
$this->bitwiseFlagCleaner = $bitwiseFlagCleaner;
$this->regexFuncAnalyzer = $regexFuncAnalyzer;
}
/**
* @return array<class-string<Node>>
@ -63,9 +71,9 @@ final class DowngradePregUnmatchedAsNullConstantRector extends \Rector\Core\Rect
public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node
{
if ($node instanceof \PhpParser\Node\Stmt\ClassConst) {
return $this->processsClassConst($node);
return $this->refactorClassConst($node);
}
if (!$this->isRegexFunctionNames($node)) {
if (!$this->regexFuncAnalyzer->isRegexFunctionNames($node)) {
return null;
}
$args = $node->args;
@ -76,7 +84,7 @@ final class DowngradePregUnmatchedAsNullConstantRector extends \Rector\Core\Rect
/** @var Variable $variable */
$variable = $args[2]->value;
if ($flags instanceof \PhpParser\Node\Expr\BinaryOp\BitwiseOr) {
$this->cleanBitwiseOrFlags($node, $flags);
$this->bitwiseFlagCleaner->cleanFuncCall($node, $flags, null, self::UNMATCHED_NULL_FLAG);
if (!$this->nodeComparator->areNodesEqual($flags, $args[3]->value)) {
return $this->handleEmptyStringToNullMatch($node, $variable);
}
@ -85,7 +93,7 @@ final class DowngradePregUnmatchedAsNullConstantRector extends \Rector\Core\Rect
if (!$flags instanceof \PhpParser\Node\Expr\ConstFetch) {
return null;
}
if (!$this->isName($flags, self::FLAG)) {
if (!$this->isName($flags, self::UNMATCHED_NULL_FLAG)) {
return null;
}
$node = $this->handleEmptyStringToNullMatch($node, $variable);
@ -119,13 +127,13 @@ class SomeClass
CODE_SAMPLE
)]);
}
private function processsClassConst(\PhpParser\Node\Stmt\ClassConst $classConst) : \PhpParser\Node\Stmt\ClassConst
private function refactorClassConst(\PhpParser\Node\Stmt\ClassConst $classConst) : \PhpParser\Node\Stmt\ClassConst
{
foreach ($classConst->consts as $key => $singleClassConst) {
if (!$singleClassConst->value instanceof \PhpParser\Node\Expr\ConstFetch) {
continue;
}
if (!$this->isName($singleClassConst->value, self::FLAG)) {
if (!$this->isName($singleClassConst->value, self::UNMATCHED_NULL_FLAG)) {
continue;
}
$classConst->consts[$key]->value = new \PhpParser\Node\Scalar\LNumber(512);
@ -133,72 +141,6 @@ CODE_SAMPLE
}
return $classConst;
}
private function isRegexFunctionNames(\PhpParser\Node\Expr\FuncCall $funcCall) : bool
{
if ($this->isNames($funcCall, self::REGEX_FUNCTION_NAMES)) {
return \true;
}
$variable = $funcCall->name;
if (!$variable instanceof \PhpParser\Node\Expr\Variable) {
return \false;
}
/** @var Assign|null $assignExprVariable */
$assignExprVariable = $this->betterNodeFinder->findFirstPreviousOfNode($funcCall, function (\PhpParser\Node $node) use($variable) : bool {
if (!$node instanceof \PhpParser\Node\Expr\Assign) {
return \false;
}
return $this->nodeComparator->areNodesEqual($node->var, $variable);
});
if (!$assignExprVariable instanceof \PhpParser\Node\Expr\Assign) {
return \false;
}
$expr = $assignExprVariable->expr;
if (!$expr instanceof \PhpParser\Node\Expr\Ternary) {
return \false;
}
if (!$expr->if instanceof \PhpParser\Node\Scalar\String_) {
return \false;
}
if (!$expr->else instanceof \PhpParser\Node\Scalar\String_) {
return \false;
}
return \in_array($expr->if->value, self::REGEX_FUNCTION_NAMES, \true) && \in_array($expr->else->value, self::REGEX_FUNCTION_NAMES, \true);
}
private function cleanBitwiseOrFlags(\PhpParser\Node\Expr\FuncCall $funcCall, \PhpParser\Node\Expr\BinaryOp\BitwiseOr $bitwiseOr, \PhpParser\Node\Expr $expr = null) : void
{
if ($bitwiseOr->left instanceof \PhpParser\Node\Expr\BinaryOp\BitwiseOr) {
/** @var BitwiseOr $leftLeft */
$leftLeft = $bitwiseOr->left;
if ($leftLeft->left instanceof \PhpParser\Node\Expr\ConstFetch && $this->isName($leftLeft->left, self::FLAG)) {
$bitwiseOr = new \PhpParser\Node\Expr\BinaryOp\BitwiseOr($leftLeft->right, $bitwiseOr->right);
}
/** @var BitwiseOr $leftRight */
$leftRight = $bitwiseOr->left;
if ($leftRight->right instanceof \PhpParser\Node\Expr\ConstFetch && $this->isName($leftRight->right, self::FLAG)) {
$bitwiseOr = new \PhpParser\Node\Expr\BinaryOp\BitwiseOr($leftRight->left, $bitwiseOr->right);
}
if ($bitwiseOr->left instanceof \PhpParser\Node\Expr\BinaryOp\BitwiseOr) {
$this->cleanBitwiseOrFlags($funcCall, $bitwiseOr->left, $bitwiseOr->right);
return;
}
}
if ($expr instanceof \PhpParser\Node\Expr) {
$bitwiseOr = new \PhpParser\Node\Expr\BinaryOp\BitwiseOr($bitwiseOr, $expr);
}
$this->assignThirdArgsValue($funcCall, $bitwiseOr);
}
private function assignThirdArgsValue(\PhpParser\Node\Expr\FuncCall $funcCall, \PhpParser\Node\Expr\BinaryOp\BitwiseOr $bitwiseOr) : void
{
if ($bitwiseOr->right instanceof \PhpParser\Node\Expr\ConstFetch && $this->isName($bitwiseOr->right, self::FLAG)) {
$bitwiseOr = $bitwiseOr->left;
} elseif ($bitwiseOr->left instanceof \PhpParser\Node\Expr\ConstFetch && $this->isName($bitwiseOr->left, self::FLAG)) {
$bitwiseOr = $bitwiseOr->right;
}
if (!$funcCall->args[3] instanceof \PhpParser\Node\Arg) {
return;
}
$funcCall->args[3]->value = $bitwiseOr;
}
private function handleEmptyStringToNullMatch(\PhpParser\Node\Expr\FuncCall $funcCall, \PhpParser\Node\Expr\Variable $variable) : \PhpParser\Node\Expr\FuncCall
{
$closure = new \PhpParser\Node\Expr\Closure();
@ -210,8 +152,8 @@ CODE_SAMPLE
$if = $this->ifManipulator->createIfExpr(new \PhpParser\Node\Expr\BinaryOp\Identical($variablePass, new \PhpParser\Node\Scalar\String_('')), new \PhpParser\Node\Stmt\Expression($assign));
$closure->stmts[0] = $if;
$arguments = $this->nodeFactory->createArgs([$variable, $closure]);
$replaceEmptystringToNull = $this->nodeFactory->createFuncCall('array_walk_recursive', $arguments);
return $this->processReplace($funcCall, $replaceEmptystringToNull);
$replaceEmptyStringToNull = $this->nodeFactory->createFuncCall('array_walk_recursive', $arguments);
return $this->processReplace($funcCall, $replaceEmptyStringToNull);
}
private function processReplace(\PhpParser\Node\Expr\FuncCall $funcCall, \PhpParser\Node\Expr\FuncCall $replaceEmptystringToNull) : \PhpParser\Node\Expr\FuncCall
{
@ -238,20 +180,20 @@ CODE_SAMPLE
}
return $this->processInIf($if, $funcCall, $replaceEmptystringToNull);
}
private function processInIf(\PhpParser\Node\Stmt\If_ $if, \PhpParser\Node\Expr\FuncCall $funcCall, \PhpParser\Node\Expr\FuncCall $replaceEmptystringToNull) : \PhpParser\Node\Expr\FuncCall
private function processInIf(\PhpParser\Node\Stmt\If_ $if, \PhpParser\Node\Expr\FuncCall $funcCall, \PhpParser\Node\Expr\FuncCall $replaceEmptyStringToNull) : \PhpParser\Node\Expr\FuncCall
{
$cond = $if->cond;
if (!$cond instanceof \PhpParser\Node\Expr\BinaryOp\Identical && !$cond instanceof \PhpParser\Node\Expr\BooleanNot) {
$this->handleNotInIdenticalAndBooleanNot($if, $replaceEmptystringToNull);
$this->handleNotInIdenticalAndBooleanNot($if, $replaceEmptyStringToNull);
}
if ($cond instanceof \PhpParser\Node\Expr\BinaryOp\Identical) {
$valueCompare = $cond->left === $funcCall ? $cond->right : $cond->left;
if ($this->valueResolver->isFalse($valueCompare)) {
$this->nodesToAddCollector->addNodeAfterNode($replaceEmptystringToNull, $if);
$this->nodesToAddCollector->addNodeAfterNode($replaceEmptyStringToNull, $if);
}
}
if ($cond instanceof \PhpParser\Node\Expr\BooleanNot) {
$this->nodesToAddCollector->addNodeAfterNode($replaceEmptystringToNull, $if);
$this->nodesToAddCollector->addNodeAfterNode($replaceEmptyStringToNull, $if);
}
return $funcCall;
}

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = '420dc935ae23551fc020bf10bef66bbce0f4b8f3';
public const PACKAGE_VERSION = 'caeeb78f6f8473434b33aa1d818ec90a8c43fc31';
/**
* @var string
*/
public const RELEASE_DATE = '2022-01-25 10:42:16';
public const RELEASE_DATE = '2022-01-25 11:35:55';
public static function resolvePackageVersion() : string
{
$process = new \RectorPrefix20220125\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);

View File

@ -10,6 +10,7 @@ use Rector\PostRector\Contract\Rector\PostRectorInterface;
use RectorPrefix20220125\Symfony\Component\Console\Command\Command;
use RectorPrefix20220125\Symfony\Component\Console\Input\InputInterface;
use RectorPrefix20220125\Symfony\Component\Console\Output\OutputInterface;
use RectorPrefix20220125\Symplify\PackageBuilder\Console\Command\CommandNaming;
final class ShowCommand extends \RectorPrefix20220125\Symfony\Component\Console\Command\Command
{
/**
@ -33,6 +34,7 @@ final class ShowCommand extends \RectorPrefix20220125\Symfony\Component\Console\
}
protected function configure() : void
{
$this->setName(\RectorPrefix20220125\Symplify\PackageBuilder\Console\Command\CommandNaming::classToName(self::class));
$this->setDescription('Show loaded Rectors with their configuration');
}
protected function execute(\RectorPrefix20220125\Symfony\Component\Console\Input\InputInterface $input, \RectorPrefix20220125\Symfony\Component\Console\Output\OutputInterface $output) : int

View File

@ -13,6 +13,7 @@ use RectorPrefix20220125\Symfony\Component\Console\Input\InputInterface;
use RectorPrefix20220125\Symfony\Component\Console\Output\OutputInterface;
use RectorPrefix20220125\Symplify\EasyParallel\Enum\Action;
use RectorPrefix20220125\Symplify\EasyParallel\Enum\ReactCommand;
use RectorPrefix20220125\Symplify\PackageBuilder\Console\Command\CommandNaming;
/**
* Inspired at: https://github.com/phpstan/phpstan-src/commit/9124c66dcc55a222e21b1717ba5f60771f7dda92
* https://github.com/phpstan/phpstan-src/blob/c471c7b050e0929daf432288770de673b394a983/src/Command/WorkerCommand.php
@ -34,6 +35,7 @@ final class WorkerCommand extends \Rector\Core\Console\Command\AbstractProcessCo
}
protected function configure() : void
{
$this->setName(\RectorPrefix20220125\Symplify\PackageBuilder\Console\Command\CommandNaming::classToName(self::class));
$this->setDescription('(Internal) Support for parallel process');
parent::configure();
}

View File

@ -47,7 +47,7 @@ final class RectorKernel implements \RectorPrefix20220125\Symplify\SymplifyKerne
$compilerPasses = $this->createCompilerPasses();
$configureCallMergingLoaderFactory = new \Rector\Core\Config\Loader\ConfigureCallMergingLoaderFactory($this->configureCallValuesCollector);
$containerBuilderFactory = new \RectorPrefix20220125\Symplify\SymplifyKernel\ContainerBuilderFactory($configureCallMergingLoaderFactory);
$containerBuilder = $containerBuilderFactory->create([], $compilerPasses, $configFiles);
$containerBuilder = $containerBuilderFactory->create($configFiles, $compilerPasses, []);
// @see https://symfony.com/blog/new-in-symfony-4-4-dependency-injection-improvements-part-1
$containerBuilder->setParameter('container.dumper.inline_factories', \true);
// to fix reincluding files again

2
vendor/autoload.php vendored
View File

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit0a0148fc78d37cef2aabcd1b59814168::getLoader();
return ComposerAutoloaderInitd3faf3b21f2dcfec88f6af350c08c862::getLoader();

View File

@ -2007,7 +2007,9 @@ return array(
'Rector\\DowngradePhp72\\NodeAnalyzer\\BuiltInMethodAnalyzer' => $baseDir . '/rules/DowngradePhp72/NodeAnalyzer/BuiltInMethodAnalyzer.php',
'Rector\\DowngradePhp72\\NodeAnalyzer\\FunctionExistsFunCallAnalyzer' => $baseDir . '/rules/DowngradePhp72/NodeAnalyzer/FunctionExistsFunCallAnalyzer.php',
'Rector\\DowngradePhp72\\NodeAnalyzer\\OverrideFromAnonymousClassMethodAnalyzer' => $baseDir . '/rules/DowngradePhp72/NodeAnalyzer/OverrideFromAnonymousClassMethodAnalyzer.php',
'Rector\\DowngradePhp72\\NodeAnalyzer\\RegexFuncAnalyzer' => $baseDir . '/rules/DowngradePhp72/NodeAnalyzer/RegexFuncAnalyzer.php',
'Rector\\DowngradePhp72\\NodeAnalyzer\\SealedClassAnalyzer' => $baseDir . '/rules/DowngradePhp72/NodeAnalyzer/SealedClassAnalyzer.php',
'Rector\\DowngradePhp72\\NodeManipulator\\BitwiseFlagCleaner' => $baseDir . '/rules/DowngradePhp72/NodeManipulator/BitwiseFlagCleaner.php',
'Rector\\DowngradePhp72\\PhpDoc\\NativeParamToPhpDocDecorator' => $baseDir . '/rules/DowngradePhp72/PhpDoc/NativeParamToPhpDocDecorator.php',
'Rector\\DowngradePhp72\\Rector\\ClassMethod\\DowngradeParameterTypeWideningRector' => $baseDir . '/rules/DowngradePhp72/Rector/ClassMethod/DowngradeParameterTypeWideningRector.php',
'Rector\\DowngradePhp72\\Rector\\FuncCall\\DowngradeJsonDecodeNullAssociativeArgRector' => $baseDir . '/rules/DowngradePhp72/Rector/FuncCall/DowngradeJsonDecodeNullAssociativeArgRector.php',

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit0a0148fc78d37cef2aabcd1b59814168
class ComposerAutoloaderInitd3faf3b21f2dcfec88f6af350c08c862
{
private static $loader;
@ -22,15 +22,15 @@ class ComposerAutoloaderInit0a0148fc78d37cef2aabcd1b59814168
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit0a0148fc78d37cef2aabcd1b59814168', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitd3faf3b21f2dcfec88f6af350c08c862', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit0a0148fc78d37cef2aabcd1b59814168', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitd3faf3b21f2dcfec88f6af350c08c862', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit0a0148fc78d37cef2aabcd1b59814168::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitd3faf3b21f2dcfec88f6af350c08c862::getInitializer($loader));
} else {
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
@ -42,12 +42,12 @@ class ComposerAutoloaderInit0a0148fc78d37cef2aabcd1b59814168
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit0a0148fc78d37cef2aabcd1b59814168::$files;
$includeFiles = Composer\Autoload\ComposerStaticInitd3faf3b21f2dcfec88f6af350c08c862::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire0a0148fc78d37cef2aabcd1b59814168($fileIdentifier, $file);
composerRequired3faf3b21f2dcfec88f6af350c08c862($fileIdentifier, $file);
}
return $loader;
@ -59,7 +59,7 @@ class ComposerAutoloaderInit0a0148fc78d37cef2aabcd1b59814168
* @param string $file
* @return void
*/
function composerRequire0a0148fc78d37cef2aabcd1b59814168($fileIdentifier, $file)
function composerRequired3faf3b21f2dcfec88f6af350c08c862($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit0a0148fc78d37cef2aabcd1b59814168
class ComposerStaticInitd3faf3b21f2dcfec88f6af350c08c862
{
public static $files = array (
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
@ -2402,7 +2402,9 @@ class ComposerStaticInit0a0148fc78d37cef2aabcd1b59814168
'Rector\\DowngradePhp72\\NodeAnalyzer\\BuiltInMethodAnalyzer' => __DIR__ . '/../..' . '/rules/DowngradePhp72/NodeAnalyzer/BuiltInMethodAnalyzer.php',
'Rector\\DowngradePhp72\\NodeAnalyzer\\FunctionExistsFunCallAnalyzer' => __DIR__ . '/../..' . '/rules/DowngradePhp72/NodeAnalyzer/FunctionExistsFunCallAnalyzer.php',
'Rector\\DowngradePhp72\\NodeAnalyzer\\OverrideFromAnonymousClassMethodAnalyzer' => __DIR__ . '/../..' . '/rules/DowngradePhp72/NodeAnalyzer/OverrideFromAnonymousClassMethodAnalyzer.php',
'Rector\\DowngradePhp72\\NodeAnalyzer\\RegexFuncAnalyzer' => __DIR__ . '/../..' . '/rules/DowngradePhp72/NodeAnalyzer/RegexFuncAnalyzer.php',
'Rector\\DowngradePhp72\\NodeAnalyzer\\SealedClassAnalyzer' => __DIR__ . '/../..' . '/rules/DowngradePhp72/NodeAnalyzer/SealedClassAnalyzer.php',
'Rector\\DowngradePhp72\\NodeManipulator\\BitwiseFlagCleaner' => __DIR__ . '/../..' . '/rules/DowngradePhp72/NodeManipulator/BitwiseFlagCleaner.php',
'Rector\\DowngradePhp72\\PhpDoc\\NativeParamToPhpDocDecorator' => __DIR__ . '/../..' . '/rules/DowngradePhp72/PhpDoc/NativeParamToPhpDocDecorator.php',
'Rector\\DowngradePhp72\\Rector\\ClassMethod\\DowngradeParameterTypeWideningRector' => __DIR__ . '/../..' . '/rules/DowngradePhp72/Rector/ClassMethod/DowngradeParameterTypeWideningRector.php',
'Rector\\DowngradePhp72\\Rector\\FuncCall\\DowngradeJsonDecodeNullAssociativeArgRector' => __DIR__ . '/../..' . '/rules/DowngradePhp72/Rector/FuncCall/DowngradeJsonDecodeNullAssociativeArgRector.php',
@ -3876,9 +3878,9 @@ class ComposerStaticInit0a0148fc78d37cef2aabcd1b59814168
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit0a0148fc78d37cef2aabcd1b59814168::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit0a0148fc78d37cef2aabcd1b59814168::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit0a0148fc78d37cef2aabcd1b59814168::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitd3faf3b21f2dcfec88f6af350c08c862::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitd3faf3b21f2dcfec88f6af350c08c862::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitd3faf3b21f2dcfec88f6af350c08c862::$classMap;
}, null, ClassLoader::class);
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,12 @@
## [Unreleased]
## [2.0.4] - 2022-01-04
* Fixed: allow calling `isXdebugActive` before class instantiation.
## [3.0.1] - 2022-01-04
* Fixed: error when calling `isXdebugActive` before class instantiation.
## [3.0.0] - 2021-12-23
* Removed: support for legacy PHP versions (< PHP 7.2.5).
* Added: type declarations to arguments and return values.
* Added: strict typing to all classes.
## [2.0.3] - 2021-12-08
* Added: support, type annotations and refactoring for stricter PHPStan analysis.
@ -97,8 +102,9 @@
* Break: the following class was renamed:
- `Composer\XdebugHandler` -> `Composer\XdebugHandler\XdebugHandler`
[Unreleased]: https://github.com/composer/xdebug-handler/compare/2.0.4...HEAD
[2.0.4]: https://github.com/composer/xdebug-handler/compare/2.0.3...2.0.4
[Unreleased]: https://github.com/composer/xdebug-handler/compare/3.0.1...HEAD
[3.0.1]: https://github.com/composer/xdebug-handler/compare/3.0.0...3.0.1
[3.0.0]: https://github.com/composer/xdebug-handler/compare/2.0.3...3.0.0
[2.0.3]: https://github.com/composer/xdebug-handler/compare/2.0.2...2.0.3
[2.0.2]: https://github.com/composer/xdebug-handler/compare/2.0.1...2.0.2
[2.0.1]: https://github.com/composer/xdebug-handler/compare/2.0.0...2.0.1

View File

@ -10,9 +10,11 @@ Restart a CLI process without loading the Xdebug extension, unless `xdebug.mode=
Originally written as part of [composer/composer](https://github.com/composer/composer),
now extracted and made available as a stand-alone library.
### Version 2
### Version 3
Support added for Xdebug3. See [UPGRADE](UPGRADE.md) for more information.
Removed support for legacy PHP versions and added type declarations.
Long term support for version 2 (PHP 5.3.2 - 7.2.4) follows [Composer 2.2 LTS](https://blog.packagist.com/composer-2-2/) policy.
## Installation
@ -24,7 +26,7 @@ $ composer require composer/xdebug-handler
## Requirements
* PHP 5.3.2 minimum, although functionality is disabled below PHP 5.4.0. Using the latest PHP version is highly recommended.
* PHP 7.2.5 minimum, although using the latest PHP version is highly recommended.
## Basic Usage
```php
@ -63,10 +65,10 @@ A temporary ini file is created from the loaded (and scanned) ini files, with an
* The main process exits with the exit code from the restarted process.
#### Signal handling
From PHP 7.1 with the pcntl extension loaded, asynchronous signal handling is automatically enabled. `SIGINT` is set to `SIG_IGN` in the parent
Asynchronous signal handling is automatically enabled if the pcntl extension is loaded. `SIGINT` is set to `SIG_IGN` in the parent
process and restored to `SIG_DFL` in the restarted process (if no other handler has been set).
From PHP 7.4 on Windows, `CTRL+C` and `CTRL+BREAK` handling is ignored in the parent process and automatically enabled in the restarted process.
From PHP 7.4 on Windows, `CTRL+C` and `CTRL+BREAK` handling is automatically enabled in the restarted process and ignored in the parent process.
### Limitations
There are a few things to be aware of when running inside a restarted process.
@ -78,7 +80,7 @@ There are a few things to be aware of when running inside a restarted process.
### Helper methods
These static methods provide information from the current process, regardless of whether it has been restarted or not.
#### _getAllIniFiles()_
#### _getAllIniFiles(): array_
Returns an array of the original ini file locations. Use this instead of calling `php_ini_loaded_file` and `php_ini_scanned_files`, which will report the wrong values in a restarted process.
```php
@ -93,7 +95,7 @@ $scannedInis = $files;
These locations are also available in the `MYAPP_ORIGINAL_INIS` environment variable. This is a path-separated string comprising the location returned from `php_ini_loaded_file`, which could be empty, followed by locations parsed from calling `php_ini_scanned_files`.
#### _getRestartSettings()_
#### _getRestartSettings(): ?array_
Returns an array of settings that can be used with PHP [sub-processes](#sub-processes), or null if the process was not restarted.
```php
@ -113,43 +115,48 @@ $settings = XdebugHandler::getRestartSettings();
*/
```
#### _getSkippedVersion()_
Returns the Xdebug version string that was skipped by the restart, or an empty value if there was no restart (or Xdebug is still loaded, perhaps by an extending class restarting for a reason other than removing Xdebug).
#### _getSkippedVersion(): string_
Returns the Xdebug version string that was skipped by the restart, or an empty string if there was no restart (or Xdebug is still loaded, perhaps by an extending class restarting for a reason other than removing Xdebug).
```php
use Composer\XdebugHandler\XdebugHandler;
$version = XdebugHandler::getSkippedVersion();
# $version: '2.6.0' (for example), or an empty string
# $version: '3.1.1' (for example), or an empty string
```
#### _isXdebugActive()_
#### _isXdebugActive(): bool_
Returns true if Xdebug is loaded and is running in an active mode (if it supports modes). Returns false if Xdebug is not loaded, or it is running with `xdebug.mode=off`.
### Setter methods
These methods implement a fluent interface and must be called before the main `check()` method.
#### _setLogger($logger)_
#### _setLogger(LoggerInterface $logger): self_
Enables the output of status messages to an external PSR3 logger. All messages are reported with either `DEBUG` or `WARNING` log levels. For example (showing the level and message):
```
// No restart
DEBUG Checking MYAPP_ALLOW_XDEBUG
DEBUG The Xdebug extension is loaded (3.1.1) xdebug.mode=off
DEBUG No restart (APP_ALLOW_XDEBUG=0) Allowed by xdebug.mode
// Restart overridden
DEBUG Checking MYAPP_ALLOW_XDEBUG
DEBUG The Xdebug extension is loaded (2.5.0)
DEBUG The Xdebug extension is loaded (3.1.1) xdebug.mode=coverage,debug,develop
DEBUG No restart (MYAPP_ALLOW_XDEBUG=1)
// Failed restart
DEBUG Checking MYAPP_ALLOW_XDEBUG
DEBUG The Xdebug extension is loaded (2.5.0)
DEBUG The Xdebug extension is loaded (3.1.0)
WARNING No restart (Unable to create temp ini file at: ...)
```
Status messages can also be output with `XDEBUG_HANDLER_DEBUG`. See [Troubleshooting](#troubleshooting).
#### _setMainScript($script)_
#### _setMainScript(string $script): self_
Sets the location of the main script to run in the restart. This is only needed in more esoteric use-cases, or if the `argv[0]` location is inaccessible. The script name `--` is supported for standard input.
#### _setPersistent()_
#### _setPersistent(): self_
Configures the restart using [persistent settings](#persistent-settings), so that Xdebug is not loaded in any sub-process.
Use this method if your application invokes one or more PHP sub-process and the Xdebug extension is not needed. This avoids the overhead of implementing specific [sub-process](#sub-processes) strategies.
@ -234,13 +241,13 @@ The following environment settings can be used to troubleshoot unexpected behavi
### Extending the library
The API is defined by classes and their accessible elements that are not annotated as @internal. The main class has two protected methods that can be overridden to provide additional functionality:
#### _requiresRestart($default)_
#### _requiresRestart(bool $default): bool_
By default the process will restart if Xdebug is loaded and not running with `xdebug.mode=off`. Extending this method allows an application to decide, by returning a boolean (or equivalent) value.
It is only called if `MYAPP_ALLOW_XDEBUG` is empty, so it will not be called in the restarted process (where this variable contains internal data), or if the restart has been overridden.
Note that the [setMainScript()](#setmainscriptscript) and [setPersistent()](#setpersistent) setters can be used here, if required.
#### _restart($command)_
#### _restart(array $command): void_
An application can extend this to modify the temporary ini file, its location given in the `tmpIni` property. New settings can be safely appended to the end of the data, which is `PHP_EOL` terminated.
The `$command` parameter is an array of unescaped command-line arguments that will be used for the new process.
@ -262,7 +269,7 @@ class MyRestarter extends XdebugHandler
{
private $required;
protected function requiresRestart($default)
protected function requiresRestart(bool $default): bool
{
if (Command::isHelp()) {
# No need to disable Xdebug for this
@ -273,7 +280,7 @@ class MyRestarter extends XdebugHandler
return $this->required || $default;
}
protected function restart($command)
protected function restart(array $command): void
{
if ($this->required) {
# Add required ini setting to tmpIni

View File

@ -1,30 +0,0 @@
## Upgrading from 1.x
The default behaviour has changed from always restarting if Xdebug is loaded, to only restarting if
Xdebug is _active_. This has been introduced to support Xdebug3
[modes](https://xdebug.org/docs/all_settings#mode). Xdebug is considered active if it is loaded, and
for Xdebug3, if it is running in a mode other than `xdebug.mode=off`.
* Break: removed optional `$colorOption` constructor param and passthru fallback.
Just use `new XdebugHandler('myapp')` to instantiate the class and color support will be
detectable in the restarted process.
* Added: `isXdebugActive()` method to determine if Xdebug is still running in the restart.
Returns true if Xdebug is loaded and is running in an active mode (if it supports modes).
Returns false if Xdebug is not loaded, or it is running with `xdebug.mode=off`.
### Extending classes
* Break: renamed `requiresRestart` param from `$isLoaded` to `$default`.
This reflects the new default behaviour which is to restart only if Xdebug is active.
* Break: changed `restart` param `$command` from a string to an array.
Only important if you modified the string. `$command` is now an array of unescaped arguments.
* Added: Process utility class to the API.
This class was previously annotated as @internal and has been refactored due to recent changes.

View File

@ -18,12 +18,12 @@
"issues": "https:\/\/github.com\/composer\/xdebug-handler\/issues"
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0",
"php": "^7.2.5 || ^8.0",
"psr\/log": "^1 || ^2 || ^3",
"composer\/pcre": "^1"
},
"require-dev": {
"symfony\/phpunit-bridge": "^4.2 || ^5.0 || ^6.0",
"symfony\/phpunit-bridge": "^6.0",
"phpstan\/phpstan": "^1.0",
"phpstan\/phpstan-strict-rules": "^1.1"
},
@ -38,7 +38,7 @@
}
},
"scripts": {
"test": "vendor\/bin\/simple-phpunit",
"phpstan": "vendor\/bin\/phpstan analyse"
"test": "@php vendor\/bin\/simple-phpunit",
"phpstan": "@php vendor\/bin\/phpstan analyse"
}
}

View File

@ -1,5 +1,6 @@
<?php
declare (strict_types=1);
/*
* This file is part of composer/xdebug-handler.
*
@ -22,45 +23,44 @@ class PhpConfig
*
* @return string[] Empty array of PHP cli options
*/
public function useOriginal()
public function useOriginal() : array
{
$this->getDataAndReset();
return array();
return [];
}
/**
* Use standard restart settings
*
* @return string[] PHP cli options
*/
public function useStandard()
public function useStandard() : array
{
$data = $this->getDataAndReset();
if ($data !== null) {
return array('-n', '-c', $data['tmpIni']);
return ['-n', '-c', $data['tmpIni']];
}
return array();
return [];
}
/**
* Use environment variables to persist settings
*
* @return string[] Empty array of PHP cli options
*/
public function usePersistent()
public function usePersistent() : array
{
$data = $this->getDataAndReset();
if ($data !== null) {
$this->updateEnv('PHPRC', $data['tmpIni']);
$this->updateEnv('PHP_INI_SCAN_DIR', '');
}
return array();
return [];
}
/**
* Returns restart data if available and resets the environment
*
* @return array|null
* @phpstan-return restartData|null
*/
private function getDataAndReset()
private function getDataAndReset() : ?array
{
$data = \RectorPrefix20220125\Composer\XdebugHandler\XdebugHandler::getRestartSettings();
if ($data !== null) {
@ -74,10 +74,8 @@ class PhpConfig
*
* @param string $name
* @param string|false $value
*
* @return void
*/
private function updateEnv($name, $value)
private function updateEnv(string $name, $value) : void
{
\RectorPrefix20220125\Composer\XdebugHandler\Process::setEnv($name, \false !== $value ? $value : null);
}

View File

@ -8,6 +8,7 @@
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare (strict_types=1);
namespace RectorPrefix20220125\Composer\XdebugHandler;
use RectorPrefix20220125\Composer\Pcre\Preg;
@ -25,12 +26,10 @@ class Process
* MIT Licensed (c) John Stevenson <john-stevenson@blueyonder.co.uk>
*
* @param string $arg The argument to be escaped
* @param bool $meta Additionally escape cmd.exe meta characters
* @param bool $meta Additionally escape cmd.exe meta characters
* @param bool $module The argument is the module to invoke
*
* @return string The escaped argument
*/
public static function escape($arg, $meta = \true, $module = \false)
public static function escape(string $arg, bool $meta = \true, bool $module = \false) : string
{
if (!\defined('PHP_WINDOWS_VERSION_BUILD')) {
return "'" . \str_replace("'", "'\\''", $arg) . "'";
@ -57,10 +56,8 @@ class Process
* Escapes an array of arguments that make up a shell command
*
* @param string[] $args Argument list, with the module name first
*
* @return string The escaped command line
*/
public static function escapeShellCommand(array $args)
public static function escapeShellCommand(array $args) : string
{
$command = '';
$module = \array_shift($args);
@ -76,11 +73,9 @@ class Process
* Makes putenv environment changes available in $_SERVER and $_ENV
*
* @param string $name
* @param string|null $value A null value unsets the variable
*
* @return bool Whether the environment variable was set
* @param ?string $value A null value unsets the variable
*/
public static function setEnv($name, $value = null)
public static function setEnv(string $name, ?string $value = null) : bool
{
$unset = null === $value;
if (!\putenv($unset ? $name : $name . '=' . $value)) {

View File

@ -8,6 +8,7 @@
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare (strict_types=1);
namespace RectorPrefix20220125\Composer\XdebugHandler;
use RectorPrefix20220125\Psr\Log\LoggerInterface;
@ -39,12 +40,10 @@ class Status
/** @var float */
private $time;
/**
* Constructor
*
* @param string $envAllowXdebug Prefixed _ALLOW_XDEBUG name
* @param bool $debug Whether debug output is required
*/
public function __construct($envAllowXdebug, $debug)
public function __construct(string $envAllowXdebug, bool $debug)
{
$start = \getenv(self::ENV_RESTART);
\RectorPrefix20220125\Composer\XdebugHandler\Process::setEnv(self::ENV_RESTART);
@ -54,43 +53,34 @@ class Status
$this->modeOff = \false;
}
/**
* @param LoggerInterface $logger
* Activates status message output to a PSR3 logger
*
* @return void
*/
public function setLogger(\RectorPrefix20220125\Psr\Log\LoggerInterface $logger)
public function setLogger(\RectorPrefix20220125\Psr\Log\LoggerInterface $logger) : void
{
$this->logger = $logger;
}
/**
* Calls a handler method to report a message
*
* @param string $op The handler constant
* @param null|string $data Data required by the handler
*
* @return void
* @throws \InvalidArgumentException If $op is not known
*/
public function report($op, $data)
public function report(string $op, ?string $data) : void
{
if ($this->logger !== null || $this->debug) {
$callable = array($this, 'report' . $op);
$callable = [$this, 'report' . $op];
if (!\is_callable($callable)) {
throw new \InvalidArgumentException('Unknown op handler: ' . $op);
}
$params = $data !== null ? $data : array();
\call_user_func_array($callable, array($params));
$params = $data !== null ? [$data] : [];
\call_user_func_array($callable, $params);
}
}
/**
* Outputs a status message
*
* @param string $text
* @param string $level
*
* @return void
*/
private function output($text, $level = null)
private function output(string $text, ?string $level = null) : void
{
if ($this->logger !== null) {
$this->logger->log($level !== null ? $level : \RectorPrefix20220125\Psr\Log\LogLevel::DEBUG, $text);
@ -100,63 +90,57 @@ class Status
}
}
/**
* @param string $loaded
*
* @return void
* Checking status message
*/
private function reportCheck($loaded)
private function reportCheck(string $loaded) : void
{
list($version, $mode) = \explode('|', $loaded);
if ($version !== '') {
$this->loaded = '(' . $version . ')' . ($mode !== '' ? ' mode=' . $mode : '');
$this->loaded = '(' . $version . ')' . ($mode !== '' ? ' xdebug.mode=' . $mode : '');
}
$this->modeOff = $mode === 'off';
$this->output('Checking ' . $this->envAllowXdebug);
}
/**
* @param string $error
*
* @return void
* Error status message
*/
private function reportError($error)
private function reportError(string $error) : void
{
$this->output(\sprintf('No restart (%s)', $error), \RectorPrefix20220125\Psr\Log\LogLevel::WARNING);
}
/**
* @param string $info
*
* @return void
* Info status message
*/
private function reportInfo($info)
private function reportInfo(string $info) : void
{
$this->output($info);
}
/**
* @return void
* No restart status message
*/
private function reportNoRestart()
private function reportNoRestart() : void
{
$this->output($this->getLoadedMessage());
if ($this->loaded !== null) {
$text = \sprintf('No restart (%s)', $this->getEnvAllow());
if (!(bool) \getenv($this->envAllowXdebug)) {
$text .= ' Allowed by ' . ($this->modeOff ? 'mode' : 'application');
$text .= ' Allowed by ' . ($this->modeOff ? 'xdebug.mode' : 'application');
}
$this->output($text);
}
}
/**
* @return void
* Restart status message
*/
private function reportRestart()
private function reportRestart() : void
{
$this->output($this->getLoadedMessage());
\RectorPrefix20220125\Composer\XdebugHandler\Process::setEnv(self::ENV_RESTART, (string) \microtime(\true));
}
/**
* @return void
* Restarted status message
*/
private function reportRestarted()
private function reportRestarted() : void
{
$loaded = $this->getLoadedMessage();
$text = \sprintf('Restarted (%d ms). %s', $this->time, $loaded);
@ -164,11 +148,9 @@ class Status
$this->output($text, $level);
}
/**
* @param string $command
*
* @return void
* Restarting status message
*/
private function reportRestarting($command)
private function reportRestarting(string $command) : void
{
$text = \sprintf('Process restarting (%s)', $this->getEnvAllow());
$this->output($text);
@ -177,19 +159,15 @@ class Status
}
/**
* Returns the _ALLOW_XDEBUG environment variable as name=value
*
* @return string
*/
private function getEnvAllow()
private function getEnvAllow() : string
{
return $this->envAllowXdebug . '=' . \getenv($this->envAllowXdebug);
}
/**
* Returns the Xdebug status and version
*
* @return string
*/
private function getLoadedMessage()
private function getLoadedMessage() : string
{
$loaded = $this->loaded !== null ? \sprintf('loaded %s', $this->loaded) : 'not loaded';
return 'The Xdebug extension is ' . $loaded;

View File

@ -8,6 +8,7 @@
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare (strict_types=1);
namespace RectorPrefix20220125\Composer\XdebugHandler;
use RectorPrefix20220125\Composer\Pcre\Preg;
@ -62,9 +63,9 @@ class XdebugHandler
* @param string $envPrefix Value used in environment variables
* @throws \RuntimeException If the parameter is invalid
*/
public function __construct($envPrefix)
public function __construct(string $envPrefix)
{
if (!\is_string($envPrefix) || $envPrefix === '') {
if ($envPrefix === '') {
throw new \RuntimeException('Invalid constructor parameter');
}
self::$name = \strtoupper($envPrefix);
@ -79,34 +80,24 @@ class XdebugHandler
}
/**
* Activates status message output to a PSR3 logger
*
* @param LoggerInterface $logger
*
* @return $this
*/
public function setLogger(\RectorPrefix20220125\Psr\Log\LoggerInterface $logger)
public function setLogger(\RectorPrefix20220125\Psr\Log\LoggerInterface $logger) : self
{
$this->statusWriter->setLogger($logger);
return $this;
}
/**
* Sets the main script location if it cannot be called from argv
*
* @param string $script
*
* @return $this
*/
public function setMainScript($script)
public function setMainScript(string $script) : self
{
$this->script = $script;
return $this;
}
/**
* Persist the settings to keep Xdebug out of sub-processes
*
* @return $this
*/
public function setPersistent()
public function setPersistent() : self
{
$this->persistent = \true;
return $this;
@ -117,10 +108,8 @@ class XdebugHandler
* This behaviour can be disabled by setting the MYAPP_ALLOW_XDEBUG
* environment variable to 1. This variable is used internally so that
* the restarted process is created only once.
*
* @return void
*/
public function check()
public function check() : void
{
$this->notify(\RectorPrefix20220125\Composer\XdebugHandler\Status::CHECK, self::$xdebugVersion . '|' . self::$xdebugMode);
$envArgs = \explode('|', (string) \getenv($this->envAllowXdebug));
@ -162,7 +151,7 @@ class XdebugHandler
*
* @return string[]
*/
public static function getAllIniFiles()
public static function getAllIniFiles() : array
{
if (self::$name !== null) {
$env = \getenv(self::$name . self::SUFFIX_INIS);
@ -170,7 +159,7 @@ class XdebugHandler
return \explode(\PATH_SEPARATOR, $env);
}
}
$paths = array((string) \php_ini_loaded_file());
$paths = [(string) \php_ini_loaded_file()];
$scanned = \php_ini_scanned_files();
if ($scanned !== \false) {
$paths = \array_merge($paths, \array_map('trim', \explode(',', $scanned)));
@ -183,23 +172,20 @@ class XdebugHandler
* Settings will be available if the current process was restarted, or
* called with the settings from an existing restart.
*
* @return array|null
* @phpstan-return restartData|null
*/
public static function getRestartSettings()
public static function getRestartSettings() : ?array
{
$envArgs = \explode('|', (string) \getenv(self::RESTART_SETTINGS));
if (\count($envArgs) !== 6 || !self::$inRestart && \php_ini_loaded_file() !== $envArgs[0]) {
return null;
}
return array('tmpIni' => $envArgs[0], 'scannedInis' => (bool) $envArgs[1], 'scanDir' => '*' === $envArgs[2] ? \false : $envArgs[2], 'phprc' => '*' === $envArgs[3] ? \false : $envArgs[3], 'inis' => \explode(\PATH_SEPARATOR, $envArgs[4]), 'skipped' => $envArgs[5]);
return ['tmpIni' => $envArgs[0], 'scannedInis' => (bool) $envArgs[1], 'scanDir' => '*' === $envArgs[2] ? \false : $envArgs[2], 'phprc' => '*' === $envArgs[3] ? \false : $envArgs[3], 'inis' => \explode(\PATH_SEPARATOR, $envArgs[4]), 'skipped' => $envArgs[5]];
}
/**
* Returns the Xdebug version that triggered a successful restart
*
* @return string
*/
public static function getSkippedVersion()
public static function getSkippedVersion() : string
{
return (string) self::$skipped;
}
@ -208,10 +194,8 @@ class XdebugHandler
*
* true: if Xdebug is loaded and is running in an active mode.
* false: if Xdebug is not loaded, or it is running with xdebug.mode=off.
*
* @return bool
*/
public static function isXdebugActive()
public static function isXdebugActive() : bool
{
self::setXdebugDetails();
return self::$xdebugActive;
@ -220,26 +204,17 @@ class XdebugHandler
* Allows an extending class to decide if there should be a restart
*
* The default is to restart if Xdebug is loaded and its mode is not "off".
* Do not typehint for 1.x compatibility.
*
* @param bool $default The default behaviour
*
* @return bool Whether the process should restart
*/
protected function requiresRestart($default)
protected function requiresRestart(bool $default) : bool
{
return $default;
}
/**
* Allows an extending class to access the tmpIni
*
* Do not typehint for 1.x compatibility
*
* @param string[] $command
*
* @return void
* @param string[] $command *
*/
protected function restart($command)
protected function restart(array $command) : void
{
$this->doRestart($command);
}
@ -247,11 +222,9 @@ class XdebugHandler
* Executes the restarted command then deletes the tmp ini
*
* @param string[] $command
*
* @return void
* @phpstan-return never
*/
private function doRestart(array $command)
private function doRestart(array $command) : void
{
$this->tryEnableSignals();
$this->notify(\RectorPrefix20220125\Composer\XdebugHandler\Status::RESTARTING, \implode(' ', $command));
@ -264,7 +237,7 @@ class XdebugHandler
$cmd = '"' . $cmd . '"';
}
}
$process = \proc_open($cmd, array(), $pipes);
$process = \proc_open($cmd, [], $pipes);
if (\is_resource($process)) {
$exitCode = \proc_close($process);
}
@ -289,10 +262,8 @@ class XdebugHandler
* stop potential recursion:
* - tmp ini file creation
* - environment variable creation
*
* @return bool
*/
private function prepareRestart()
private function prepareRestart() : bool
{
$error = null;
$iniFiles = self::getAllIniFiles();
@ -300,12 +271,8 @@ class XdebugHandler
$tmpDir = \sys_get_temp_dir();
if (!$this->cli) {
$error = 'Unsupported SAPI: ' . \PHP_SAPI;
} elseif (!\defined('PHP_BINARY')) {
$error = 'PHP version is too old: ' . \PHP_VERSION;
} elseif (!$this->checkConfiguration($info)) {
$error = $info;
} elseif (!$this->checkScanDirConfig()) {
$error = 'PHP version does not report scanned inis: ' . \PHP_VERSION;
} elseif (!$this->checkMainScript()) {
$error = 'Unable to access main script: ' . $this->script;
} elseif (!$this->writeTmpIni($iniFiles, $tmpDir, $error)) {
@ -322,12 +289,8 @@ class XdebugHandler
* Returns true if the tmp ini file was written
*
* @param string[] $iniFiles All ini files used in the current process
* @param string $tmpDir The system temporary directory
* @param null|string $error Set by method if ini file cannot be read
*
* @return bool
*/
private function writeTmpIni(array $iniFiles, $tmpDir, &$error)
private function writeTmpIni(array $iniFiles, string $tmpDir, ?string &$error) : bool
{
if (($tmpfile = @\tempnam($tmpDir, '')) === \false) {
return \false;
@ -369,27 +332,24 @@ class XdebugHandler
*
* @return string[]
*/
private function getCommand()
private function getCommand() : array
{
$php = array(\PHP_BINARY);
$php = [\PHP_BINARY];
$args = \array_slice($_SERVER['argv'], 1);
if (!$this->persistent) {
// Use command-line options
\array_push($php, '-n', '-c', $this->tmpIni);
}
return \array_merge($php, array($this->script), $args);
return \array_merge($php, [$this->script], $args);
}
/**
* Returns true if the restart environment variables were set
*
* No need to update $_SERVER since this is set in the restarted process.
*
* @param bool $scannedInis Whether there were scanned ini files
* @param string[] $iniFiles All ini files used in the current process
*
* @return bool
*/
private function setEnvironment($scannedInis, array $iniFiles)
private function setEnvironment(bool $scannedInis, array $iniFiles) : bool
{
$scanDir = \getenv('PHP_INI_SCAN_DIR');
$phprc = \getenv('PHPRC');
@ -404,18 +364,13 @@ class XdebugHandler
}
}
// Flag restarted process and save values for it to use
$envArgs = array(self::RESTART_ID, self::$xdebugVersion, (int) $scannedInis, \false === $scanDir ? '*' : $scanDir, \false === $phprc ? '*' : $phprc);
$envArgs = [self::RESTART_ID, self::$xdebugVersion, (int) $scannedInis, \false === $scanDir ? '*' : $scanDir, \false === $phprc ? '*' : $phprc];
return \putenv($this->envAllowXdebug . '=' . \implode('|', $envArgs));
}
/**
* Logs status messages
*
* @param string $op Status handler constant
* @param null|string $data Optional data
*
* @return void
*/
private function notify($op, $data = null)
private function notify(string $op, ?string $data = null) : void
{
$this->statusWriter->report($op, $data);
}
@ -425,9 +380,8 @@ class XdebugHandler
* @param mixed[] $loadedConfig All current ini settings
* @param mixed[] $iniConfig Settings from user ini files
*
* @return string
*/
private function mergeLoadedConfig(array $loadedConfig, array $iniConfig)
private function mergeLoadedConfig(array $loadedConfig, array $iniConfig) : string
{
$content = '';
foreach ($loadedConfig as $name => $value) {
@ -444,12 +398,10 @@ class XdebugHandler
}
/**
* Returns true if the script name can be used
*
* @return bool
*/
private function checkMainScript()
private function checkMainScript() : bool
{
if (null !== $this->script) {
if ($this->script !== null) {
// Allow an application to set -- for standard input
return \file_exists($this->script) || '--' === $this->script;
}
@ -468,23 +420,18 @@ class XdebugHandler
* Adds restart settings to the environment
*
* @param string[] $envArgs
*
* @return void
*/
private function setEnvRestartSettings($envArgs)
private function setEnvRestartSettings(array $envArgs) : void
{
$settings = array(\php_ini_loaded_file(), $envArgs[2], $envArgs[3], $envArgs[4], \getenv($this->envOriginalInis), self::$skipped);
$settings = [\php_ini_loaded_file(), $envArgs[2], $envArgs[3], $envArgs[4], \getenv($this->envOriginalInis), self::$skipped];
\RectorPrefix20220125\Composer\XdebugHandler\Process::setEnv(self::RESTART_SETTINGS, \implode('|', $settings));
}
/**
* Syncs settings and the environment if called with existing settings
*
* @param array $settings
* @phpstan-param restartData $settings
*
* @return void
*/
private function syncSettings(array $settings)
private function syncSettings(array $settings) : void
{
if (\false === \getenv($this->envOriginalInis)) {
// Called by another app, so make original inis available
@ -493,28 +440,10 @@ class XdebugHandler
self::$skipped = $settings['skipped'];
$this->notify(\RectorPrefix20220125\Composer\XdebugHandler\Status::INFO, 'Process called with existing restart settings');
}
/**
* Returns true if there are scanned inis and PHP is able to report them
*
* php_ini_scanned_files will fail when PHP_CONFIG_FILE_SCAN_DIR is empty.
* Fixed in 7.1.13 and 7.2.1
*
* @return bool
*/
private function checkScanDirConfig()
{
if (\PHP_VERSION_ID >= 70113 && \PHP_VERSION_ID !== 70200) {
return \true;
}
return (string) \getenv('PHP_INI_SCAN_DIR') === '' || \PHP_CONFIG_FILE_SCAN_DIR !== '';
}
/**
* Returns true if there are no known configuration issues
*
* @param string $info Set by method
* @return bool
*/
private function checkConfiguration(&$info)
private function checkConfiguration(?string &$info) : bool
{
if (!\function_exists('proc_open')) {
$info = 'proc_open function is disabled';
@ -547,10 +476,8 @@ class XdebugHandler
* Enables async signals and control interrupts in the restarted process
*
* Available on Unix PHP 7.1+ with the pcntl extension and Windows PHP 7.4+.
*
* @return void
*/
private function tryEnableSignals()
private function tryEnableSignals() : void
{
if (\function_exists('pcntl_async_signals') && \function_exists('pcntl_signal')) {
\pcntl_async_signals(\true);
@ -573,10 +500,8 @@ class XdebugHandler
}
/**
* Sets static properties $xdebugActive, $xdebugVersion and $xdebugMode
*
* @return void
*/
private static function setXdebugDetails()
private static function setXdebugDetails() : void
{
if (self::$xdebugActive !== null) {
return;

View File

@ -9,8 +9,8 @@ $loader = require_once __DIR__.'/autoload.php';
if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) {
spl_autoload_call('RectorPrefix20220125\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInit0a0148fc78d37cef2aabcd1b59814168', false) && !interface_exists('ComposerAutoloaderInit0a0148fc78d37cef2aabcd1b59814168', false) && !trait_exists('ComposerAutoloaderInit0a0148fc78d37cef2aabcd1b59814168', false)) {
spl_autoload_call('RectorPrefix20220125\ComposerAutoloaderInit0a0148fc78d37cef2aabcd1b59814168');
if (!class_exists('ComposerAutoloaderInitd3faf3b21f2dcfec88f6af350c08c862', false) && !interface_exists('ComposerAutoloaderInitd3faf3b21f2dcfec88f6af350c08c862', false) && !trait_exists('ComposerAutoloaderInitd3faf3b21f2dcfec88f6af350c08c862', false)) {
spl_autoload_call('RectorPrefix20220125\ComposerAutoloaderInitd3faf3b21f2dcfec88f6af350c08c862');
}
if (!class_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !interface_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !trait_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false)) {
spl_autoload_call('RectorPrefix20220125\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -71,9 +71,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20220125\print_node(...func_get_args());
}
}
if (!function_exists('composerRequire0a0148fc78d37cef2aabcd1b59814168')) {
function composerRequire0a0148fc78d37cef2aabcd1b59814168() {
return \RectorPrefix20220125\composerRequire0a0148fc78d37cef2aabcd1b59814168(...func_get_args());
if (!function_exists('composerRequired3faf3b21f2dcfec88f6af350c08c862')) {
function composerRequired3faf3b21f2dcfec88f6af350c08c862() {
return \RectorPrefix20220125\composerRequired3faf3b21f2dcfec88f6af350c08c862(...func_get_args());
}
}
if (!function_exists('scanPath')) {

View File

@ -7,14 +7,14 @@
"php": ">=8.0",
"nette\/utils": "^3.2",
"symfony\/dependency-injection": "^5.4|^6.0",
"symplify\/smart-file-system": "^10.0.15",
"symplify\/smart-file-system": "^10.0.16",
"phpstan\/phpstan": "^1.3",
"nikic\/php-parser": "^4.13.2",
"symplify\/package-builder": "^10.0.15",
"symplify\/symplify-kernel": "^10.0.15"
"symplify\/package-builder": "^10.0.16",
"symplify\/symplify-kernel": "^10.0.16"
},
"require-dev": {
"symplify\/easy-testing": "^10.0.15",
"symplify\/easy-testing": "^10.0.16",
"phpunit\/phpunit": "^9.5"
},
"autoload": {
@ -38,35 +38,35 @@
}
},
"conflict": {
"symplify\/composer-json-manipulator": "<10.0.15",
"symplify\/easy-coding-standard": "<10.0.15",
"symplify\/phpstan-rules": "<10.0.15",
"symplify\/easy-testing": "<10.0.15",
"symplify\/rule-doc-generator-contracts": "<10.0.15",
"symplify\/symfony-php-config": "<10.0.15",
"symplify\/simple-php-doc-parser": "<10.0.15",
"symplify\/php-config-printer": "<10.0.15",
"symplify\/console-color-diff": "<10.0.15",
"symplify\/markdown-diff": "<10.0.15",
"symplify\/amnesia": "<10.0.15",
"symplify\/phpstan-extensions": "<10.0.15",
"symplify\/rule-doc-generator": "<10.0.15",
"symplify\/vendor-patches": "<10.0.15",
"symplify\/skipper": "<10.0.15",
"symplify\/composer-json-manipulator": "<10.0.16",
"symplify\/easy-coding-standard": "<10.0.16",
"symplify\/phpstan-rules": "<10.0.16",
"symplify\/easy-testing": "<10.0.16",
"symplify\/rule-doc-generator-contracts": "<10.0.16",
"symplify\/symfony-php-config": "<10.0.16",
"symplify\/simple-php-doc-parser": "<10.0.16",
"symplify\/php-config-printer": "<10.0.16",
"symplify\/console-color-diff": "<10.0.16",
"symplify\/markdown-diff": "<10.0.16",
"symplify\/amnesia": "<10.0.16",
"symplify\/phpstan-extensions": "<10.0.16",
"symplify\/rule-doc-generator": "<10.0.16",
"symplify\/vendor-patches": "<10.0.16",
"symplify\/skipper": "<10.0.16",
"symplify\/smart-file-system": "<9.4.70",
"symplify\/symfony-static-dumper": "<10.0.15",
"symplify\/git-wrapper": "<10.0.15",
"symplify\/symfony-static-dumper": "<10.0.16",
"symplify\/git-wrapper": "<10.0.16",
"symplify\/symplify-kernel": "<9.4.70",
"symplify\/monorepo-builder": "<10.0.15",
"symplify\/config-transformer": "<10.0.15",
"symplify\/easy-ci": "<10.0.15",
"symplify\/coding-standard": "<10.0.15",
"symplify\/latte-phpstan-compiler": "<10.0.15",
"symplify\/template-phpstan-compiler": "<10.0.15",
"symplify\/phpstan-latte-rules": "<10.0.15",
"symplify\/autowire-array-parameter": "<10.0.15",
"symplify\/easy-parallel": "<10.0.15",
"symplify\/neon-config-dumper": "<10.0.15"
"symplify\/monorepo-builder": "<10.0.16",
"symplify\/config-transformer": "<10.0.16",
"symplify\/easy-ci": "<10.0.16",
"symplify\/coding-standard": "<10.0.16",
"symplify\/latte-phpstan-compiler": "<10.0.16",
"symplify\/template-phpstan-compiler": "<10.0.16",
"symplify\/phpstan-latte-rules": "<10.0.16",
"symplify\/autowire-array-parameter": "<10.0.16",
"symplify\/easy-parallel": "<10.0.16",
"symplify\/neon-config-dumper": "<10.0.16"
},
"minimum-stability": "dev",
"prefer-stable": true

View File

@ -6,7 +6,7 @@
"php": ">=8.0",
"nette\/utils": "^3.2",
"symfony\/dependency-injection": "^5.4|^6.0",
"symplify\/package-builder": "^10.0.15"
"symplify\/package-builder": "^10.0.16"
},
"require-dev": {
"phpunit\/phpunit": "^9.5"
@ -27,35 +27,35 @@
}
},
"conflict": {
"symplify\/astral": "<10.0.15",
"symplify\/composer-json-manipulator": "<10.0.15",
"symplify\/easy-coding-standard": "<10.0.15",
"symplify\/phpstan-rules": "<10.0.15",
"symplify\/easy-testing": "<10.0.15",
"symplify\/rule-doc-generator-contracts": "<10.0.15",
"symplify\/symfony-php-config": "<10.0.15",
"symplify\/simple-php-doc-parser": "<10.0.15",
"symplify\/php-config-printer": "<10.0.15",
"symplify\/console-color-diff": "<10.0.15",
"symplify\/markdown-diff": "<10.0.15",
"symplify\/amnesia": "<10.0.15",
"symplify\/phpstan-extensions": "<10.0.15",
"symplify\/rule-doc-generator": "<10.0.15",
"symplify\/vendor-patches": "<10.0.15",
"symplify\/skipper": "<10.0.15",
"symplify\/smart-file-system": "<10.0.15",
"symplify\/symfony-static-dumper": "<10.0.15",
"symplify\/git-wrapper": "<10.0.15",
"symplify\/symplify-kernel": "<10.0.15",
"symplify\/monorepo-builder": "<10.0.15",
"symplify\/config-transformer": "<10.0.15",
"symplify\/easy-ci": "<10.0.15",
"symplify\/coding-standard": "<10.0.15",
"symplify\/latte-phpstan-compiler": "<10.0.15",
"symplify\/template-phpstan-compiler": "<10.0.15",
"symplify\/phpstan-latte-rules": "<10.0.15",
"symplify\/easy-parallel": "<10.0.15",
"symplify\/neon-config-dumper": "<10.0.15"
"symplify\/astral": "<10.0.16",
"symplify\/composer-json-manipulator": "<10.0.16",
"symplify\/easy-coding-standard": "<10.0.16",
"symplify\/phpstan-rules": "<10.0.16",
"symplify\/easy-testing": "<10.0.16",
"symplify\/rule-doc-generator-contracts": "<10.0.16",
"symplify\/symfony-php-config": "<10.0.16",
"symplify\/simple-php-doc-parser": "<10.0.16",
"symplify\/php-config-printer": "<10.0.16",
"symplify\/console-color-diff": "<10.0.16",
"symplify\/markdown-diff": "<10.0.16",
"symplify\/amnesia": "<10.0.16",
"symplify\/phpstan-extensions": "<10.0.16",
"symplify\/rule-doc-generator": "<10.0.16",
"symplify\/vendor-patches": "<10.0.16",
"symplify\/skipper": "<10.0.16",
"symplify\/smart-file-system": "<10.0.16",
"symplify\/symfony-static-dumper": "<10.0.16",
"symplify\/git-wrapper": "<10.0.16",
"symplify\/symplify-kernel": "<10.0.16",
"symplify\/monorepo-builder": "<10.0.16",
"symplify\/config-transformer": "<10.0.16",
"symplify\/easy-ci": "<10.0.16",
"symplify\/coding-standard": "<10.0.16",
"symplify\/latte-phpstan-compiler": "<10.0.16",
"symplify\/template-phpstan-compiler": "<10.0.16",
"symplify\/phpstan-latte-rules": "<10.0.16",
"symplify\/easy-parallel": "<10.0.16",
"symplify\/neon-config-dumper": "<10.0.16"
},
"minimum-stability": "dev",
"prefer-stable": true

View File

@ -9,9 +9,9 @@
"symfony\/config": "^5.4|^6.0",
"symfony\/dependency-injection": "^5.4|^6.0",
"symfony\/filesystem": "^5.4|^6.0",
"symplify\/package-builder": "^10.0.15",
"symplify\/symplify-kernel": "^10.0.15",
"symplify\/smart-file-system": "^10.0.15"
"symplify\/package-builder": "^10.0.16",
"symplify\/symplify-kernel": "^10.0.16",
"symplify\/smart-file-system": "^10.0.16"
},
"require-dev": {
"phpunit\/phpunit": "^9.5"
@ -32,34 +32,34 @@
}
},
"conflict": {
"symplify\/astral": "<10.0.15",
"symplify\/easy-coding-standard": "<10.0.15",
"symplify\/phpstan-rules": "<10.0.15",
"symplify\/easy-testing": "<10.0.15",
"symplify\/rule-doc-generator-contracts": "<10.0.15",
"symplify\/symfony-php-config": "<10.0.15",
"symplify\/simple-php-doc-parser": "<10.0.15",
"symplify\/php-config-printer": "<10.0.15",
"symplify\/console-color-diff": "<10.0.15",
"symplify\/autowire-array-parameter": "<10.0.15",
"symplify\/markdown-diff": "<10.0.15",
"symplify\/amnesia": "<10.0.15",
"symplify\/phpstan-extensions": "<10.0.15",
"symplify\/rule-doc-generator": "<10.0.15",
"symplify\/vendor-patches": "<10.0.15",
"symplify\/skipper": "<10.0.15",
"symplify\/symfony-static-dumper": "<10.0.15",
"symplify\/git-wrapper": "<10.0.15",
"symplify\/astral": "<10.0.16",
"symplify\/easy-coding-standard": "<10.0.16",
"symplify\/phpstan-rules": "<10.0.16",
"symplify\/easy-testing": "<10.0.16",
"symplify\/rule-doc-generator-contracts": "<10.0.16",
"symplify\/symfony-php-config": "<10.0.16",
"symplify\/simple-php-doc-parser": "<10.0.16",
"symplify\/php-config-printer": "<10.0.16",
"symplify\/console-color-diff": "<10.0.16",
"symplify\/autowire-array-parameter": "<10.0.16",
"symplify\/markdown-diff": "<10.0.16",
"symplify\/amnesia": "<10.0.16",
"symplify\/phpstan-extensions": "<10.0.16",
"symplify\/rule-doc-generator": "<10.0.16",
"symplify\/vendor-patches": "<10.0.16",
"symplify\/skipper": "<10.0.16",
"symplify\/symfony-static-dumper": "<10.0.16",
"symplify\/git-wrapper": "<10.0.16",
"symplify\/symplify-kernel": "<9.4.70",
"symplify\/monorepo-builder": "<10.0.15",
"symplify\/config-transformer": "<10.0.15",
"symplify\/easy-ci": "<10.0.15",
"symplify\/coding-standard": "<10.0.15",
"symplify\/latte-phpstan-compiler": "<10.0.15",
"symplify\/template-phpstan-compiler": "<10.0.15",
"symplify\/phpstan-latte-rules": "<10.0.15",
"symplify\/easy-parallel": "<10.0.15",
"symplify\/neon-config-dumper": "<10.0.15"
"symplify\/monorepo-builder": "<10.0.16",
"symplify\/config-transformer": "<10.0.16",
"symplify\/easy-ci": "<10.0.16",
"symplify\/coding-standard": "<10.0.16",
"symplify\/latte-phpstan-compiler": "<10.0.16",
"symplify\/template-phpstan-compiler": "<10.0.16",
"symplify\/phpstan-latte-rules": "<10.0.16",
"symplify\/easy-parallel": "<10.0.16",
"symplify\/neon-config-dumper": "<10.0.16"
},
"minimum-stability": "dev",
"prefer-stable": true

View File

@ -8,7 +8,7 @@
"symfony\/console": "^5.4|^6.0",
"sebastian\/diff": "^4.0",
"symfony\/dependency-injection": "^5.4|^6.0",
"symplify\/package-builder": "^10.0.15"
"symplify\/package-builder": "^10.0.16"
},
"require-dev": {
"phpunit\/phpunit": "^9.5"
@ -29,35 +29,35 @@
}
},
"conflict": {
"symplify\/astral": "<10.0.15",
"symplify\/composer-json-manipulator": "<10.0.15",
"symplify\/easy-coding-standard": "<10.0.15",
"symplify\/phpstan-rules": "<10.0.15",
"symplify\/easy-testing": "<10.0.15",
"symplify\/rule-doc-generator-contracts": "<10.0.15",
"symplify\/symfony-php-config": "<10.0.15",
"symplify\/simple-php-doc-parser": "<10.0.15",
"symplify\/php-config-printer": "<10.0.15",
"symplify\/autowire-array-parameter": "<10.0.15",
"symplify\/markdown-diff": "<10.0.15",
"symplify\/amnesia": "<10.0.15",
"symplify\/phpstan-extensions": "<10.0.15",
"symplify\/rule-doc-generator": "<10.0.15",
"symplify\/vendor-patches": "<10.0.15",
"symplify\/skipper": "<10.0.15",
"symplify\/smart-file-system": "<10.0.15",
"symplify\/symfony-static-dumper": "<10.0.15",
"symplify\/git-wrapper": "<10.0.15",
"symplify\/symplify-kernel": "<10.0.15",
"symplify\/monorepo-builder": "<10.0.15",
"symplify\/config-transformer": "<10.0.15",
"symplify\/easy-ci": "<10.0.15",
"symplify\/coding-standard": "<10.0.15",
"symplify\/latte-phpstan-compiler": "<10.0.15",
"symplify\/template-phpstan-compiler": "<10.0.15",
"symplify\/phpstan-latte-rules": "<10.0.15",
"symplify\/easy-parallel": "<10.0.15",
"symplify\/neon-config-dumper": "<10.0.15"
"symplify\/astral": "<10.0.16",
"symplify\/composer-json-manipulator": "<10.0.16",
"symplify\/easy-coding-standard": "<10.0.16",
"symplify\/phpstan-rules": "<10.0.16",
"symplify\/easy-testing": "<10.0.16",
"symplify\/rule-doc-generator-contracts": "<10.0.16",
"symplify\/symfony-php-config": "<10.0.16",
"symplify\/simple-php-doc-parser": "<10.0.16",
"symplify\/php-config-printer": "<10.0.16",
"symplify\/autowire-array-parameter": "<10.0.16",
"symplify\/markdown-diff": "<10.0.16",
"symplify\/amnesia": "<10.0.16",
"symplify\/phpstan-extensions": "<10.0.16",
"symplify\/rule-doc-generator": "<10.0.16",
"symplify\/vendor-patches": "<10.0.16",
"symplify\/skipper": "<10.0.16",
"symplify\/smart-file-system": "<10.0.16",
"symplify\/symfony-static-dumper": "<10.0.16",
"symplify\/git-wrapper": "<10.0.16",
"symplify\/symplify-kernel": "<10.0.16",
"symplify\/monorepo-builder": "<10.0.16",
"symplify\/config-transformer": "<10.0.16",
"symplify\/easy-ci": "<10.0.16",
"symplify\/coding-standard": "<10.0.16",
"symplify\/latte-phpstan-compiler": "<10.0.16",
"symplify\/template-phpstan-compiler": "<10.0.16",
"symplify\/phpstan-latte-rules": "<10.0.16",
"symplify\/easy-parallel": "<10.0.16",
"symplify\/neon-config-dumper": "<10.0.16"
},
"minimum-stability": "dev",
"prefer-stable": true

View File

@ -9,7 +9,7 @@
"react\/event-loop": "^1.2",
"react\/socket": "^1.10",
"symfony\/console": "^5.4|^6.0",
"symplify\/package-builder": "^10.0.15"
"symplify\/package-builder": "^10.0.16"
},
"require-dev": {
"phpunit\/phpunit": "^9.5"
@ -33,35 +33,35 @@
"platform-check": false
},
"conflict": {
"symplify\/astral": "<10.0.15",
"symplify\/easy-coding-standard": "<10.0.15",
"symplify\/phpstan-rules": "<10.0.15",
"symplify\/easy-testing": "<10.0.15",
"symplify\/rule-doc-generator-contracts": "<10.0.15",
"symplify\/symfony-php-config": "<10.0.15",
"symplify\/simple-php-doc-parser": "<10.0.15",
"symplify\/php-config-printer": "<10.0.15",
"symplify\/autowire-array-parameter": "<10.0.15",
"symplify\/markdown-diff": "<10.0.15",
"symplify\/amnesia": "<10.0.15",
"symplify\/phpstan-extensions": "<10.0.15",
"symplify\/rule-doc-generator": "<10.0.15",
"symplify\/vendor-patches": "<10.0.15",
"symplify\/skipper": "<10.0.15",
"symplify\/symfony-static-dumper": "<10.0.15",
"symplify\/git-wrapper": "<10.0.15",
"symplify\/config-transformer": "<10.0.15",
"symplify\/easy-ci": "<10.0.15",
"symplify\/coding-standard": "<10.0.15",
"symplify\/latte-phpstan-compiler": "<10.0.15",
"symplify\/template-phpstan-compiler": "<10.0.15",
"symplify\/phpstan-latte-rules": "<10.0.15",
"symplify\/composer-json-manipulator": "<10.0.15",
"symplify\/smart-file-system": "<10.0.15",
"symplify\/monorepo-builder": "<10.0.15",
"symplify\/console-color-diff": "<10.0.15",
"symplify\/symplify-kernel": "<10.0.15",
"symplify\/neon-config-dumper": "<10.0.15"
"symplify\/astral": "<10.0.16",
"symplify\/easy-coding-standard": "<10.0.16",
"symplify\/phpstan-rules": "<10.0.16",
"symplify\/easy-testing": "<10.0.16",
"symplify\/rule-doc-generator-contracts": "<10.0.16",
"symplify\/symfony-php-config": "<10.0.16",
"symplify\/simple-php-doc-parser": "<10.0.16",
"symplify\/php-config-printer": "<10.0.16",
"symplify\/autowire-array-parameter": "<10.0.16",
"symplify\/markdown-diff": "<10.0.16",
"symplify\/amnesia": "<10.0.16",
"symplify\/phpstan-extensions": "<10.0.16",
"symplify\/rule-doc-generator": "<10.0.16",
"symplify\/vendor-patches": "<10.0.16",
"symplify\/skipper": "<10.0.16",
"symplify\/symfony-static-dumper": "<10.0.16",
"symplify\/git-wrapper": "<10.0.16",
"symplify\/config-transformer": "<10.0.16",
"symplify\/easy-ci": "<10.0.16",
"symplify\/coding-standard": "<10.0.16",
"symplify\/latte-phpstan-compiler": "<10.0.16",
"symplify\/template-phpstan-compiler": "<10.0.16",
"symplify\/phpstan-latte-rules": "<10.0.16",
"symplify\/composer-json-manipulator": "<10.0.16",
"symplify\/smart-file-system": "<10.0.16",
"symplify\/monorepo-builder": "<10.0.16",
"symplify\/console-color-diff": "<10.0.16",
"symplify\/symplify-kernel": "<10.0.16",
"symplify\/neon-config-dumper": "<10.0.16"
},
"minimum-stability": "dev",
"prefer-stable": true

View File

@ -12,9 +12,9 @@
"symfony\/finder": "^5.4|^6.0",
"symfony\/console": "^5.4|^6.0",
"symfony\/dependency-injection": "^5.4|^6.0",
"symplify\/package-builder": "^10.0.15",
"symplify\/smart-file-system": "^10.0.15",
"symplify\/symplify-kernel": "^10.0.15"
"symplify\/package-builder": "^10.0.16",
"symplify\/smart-file-system": "^10.0.16",
"symplify\/symplify-kernel": "^10.0.16"
},
"require-dev": {
"phpunit\/phpunit": "^9.5"
@ -35,33 +35,33 @@
}
},
"conflict": {
"symplify\/astral": "<10.0.15",
"symplify\/composer-json-manipulator": "<10.0.15",
"symplify\/easy-coding-standard": "<10.0.15",
"symplify\/phpstan-rules": "<10.0.15",
"symplify\/rule-doc-generator-contracts": "<10.0.15",
"symplify\/symfony-php-config": "<10.0.15",
"symplify\/simple-php-doc-parser": "<10.0.15",
"symplify\/php-config-printer": "<10.0.15",
"symplify\/console-color-diff": "<10.0.15",
"symplify\/autowire-array-parameter": "<10.0.15",
"symplify\/markdown-diff": "<10.0.15",
"symplify\/amnesia": "<10.0.15",
"symplify\/phpstan-extensions": "<10.0.15",
"symplify\/rule-doc-generator": "<10.0.15",
"symplify\/vendor-patches": "<10.0.15",
"symplify\/skipper": "<10.0.15",
"symplify\/symfony-static-dumper": "<10.0.15",
"symplify\/git-wrapper": "<10.0.15",
"symplify\/monorepo-builder": "<10.0.15",
"symplify\/config-transformer": "<10.0.15",
"symplify\/easy-ci": "<10.0.15",
"symplify\/coding-standard": "<10.0.15",
"symplify\/latte-phpstan-compiler": "<10.0.15",
"symplify\/template-phpstan-compiler": "<10.0.15",
"symplify\/phpstan-latte-rules": "<10.0.15",
"symplify\/easy-parallel": "<10.0.15",
"symplify\/neon-config-dumper": "<10.0.15"
"symplify\/astral": "<10.0.16",
"symplify\/composer-json-manipulator": "<10.0.16",
"symplify\/easy-coding-standard": "<10.0.16",
"symplify\/phpstan-rules": "<10.0.16",
"symplify\/rule-doc-generator-contracts": "<10.0.16",
"symplify\/symfony-php-config": "<10.0.16",
"symplify\/simple-php-doc-parser": "<10.0.16",
"symplify\/php-config-printer": "<10.0.16",
"symplify\/console-color-diff": "<10.0.16",
"symplify\/autowire-array-parameter": "<10.0.16",
"symplify\/markdown-diff": "<10.0.16",
"symplify\/amnesia": "<10.0.16",
"symplify\/phpstan-extensions": "<10.0.16",
"symplify\/rule-doc-generator": "<10.0.16",
"symplify\/vendor-patches": "<10.0.16",
"symplify\/skipper": "<10.0.16",
"symplify\/symfony-static-dumper": "<10.0.16",
"symplify\/git-wrapper": "<10.0.16",
"symplify\/monorepo-builder": "<10.0.16",
"symplify\/config-transformer": "<10.0.16",
"symplify\/easy-ci": "<10.0.16",
"symplify\/coding-standard": "<10.0.16",
"symplify\/latte-phpstan-compiler": "<10.0.16",
"symplify\/template-phpstan-compiler": "<10.0.16",
"symplify\/phpstan-latte-rules": "<10.0.16",
"symplify\/easy-parallel": "<10.0.16",
"symplify\/neon-config-dumper": "<10.0.16"
},
"minimum-stability": "dev",
"prefer-stable": true

View File

@ -14,6 +14,6 @@ final class EasyTestingKernel extends \RectorPrefix20220125\Symplify\SymplifyKer
public function createFromConfigs(array $configFiles) : \RectorPrefix20220125\Psr\Container\ContainerInterface
{
$configFiles[] = \RectorPrefix20220125\Symplify\EasyTesting\ValueObject\EasyTestingConfig::FILE_PATH;
return $this->create([], [], $configFiles);
return $this->create($configFiles);
}
}

View File

@ -9,8 +9,8 @@
"symfony\/console": "^5.4|^6.0",
"symfony\/dependency-injection": "^5.4|^6.0",
"symfony\/finder": "^5.4|^6.0",
"symplify\/symplify-kernel": "^10.0.15",
"symplify\/easy-testing": "^10.0.15",
"symplify\/symplify-kernel": "^10.0.16",
"symplify\/easy-testing": "^10.0.16",
"nette\/neon": "^3.3.2"
},
"require-dev": {
@ -32,34 +32,34 @@
}
},
"conflict": {
"symplify\/astral": "<10.0.15",
"symplify\/composer-json-manipulator": "<10.0.15",
"symplify\/easy-coding-standard": "<10.0.15",
"symplify\/phpstan-rules": "<10.0.15",
"symplify\/rule-doc-generator-contracts": "<10.0.15",
"symplify\/symfony-php-config": "<10.0.15",
"symplify\/simple-php-doc-parser": "<10.0.15",
"symplify\/php-config-printer": "<10.0.15",
"symplify\/console-color-diff": "<10.0.15",
"symplify\/autowire-array-parameter": "<10.0.15",
"symplify\/markdown-diff": "<10.0.15",
"symplify\/amnesia": "<10.0.15",
"symplify\/phpstan-extensions": "<10.0.15",
"symplify\/rule-doc-generator": "<10.0.15",
"symplify\/vendor-patches": "<10.0.15",
"symplify\/skipper": "<10.0.15",
"symplify\/smart-file-system": "<10.0.15",
"symplify\/symfony-static-dumper": "<10.0.15",
"symplify\/git-wrapper": "<10.0.15",
"symplify\/monorepo-builder": "<10.0.15",
"symplify\/config-transformer": "<10.0.15",
"symplify\/easy-ci": "<10.0.15",
"symplify\/coding-standard": "<10.0.15",
"symplify\/latte-phpstan-compiler": "<10.0.15",
"symplify\/template-phpstan-compiler": "<10.0.15",
"symplify\/phpstan-latte-rules": "<10.0.15",
"symplify\/easy-parallel": "<10.0.15",
"symplify\/neon-config-dumper": "<10.0.15"
"symplify\/astral": "<10.0.16",
"symplify\/composer-json-manipulator": "<10.0.16",
"symplify\/easy-coding-standard": "<10.0.16",
"symplify\/phpstan-rules": "<10.0.16",
"symplify\/rule-doc-generator-contracts": "<10.0.16",
"symplify\/symfony-php-config": "<10.0.16",
"symplify\/simple-php-doc-parser": "<10.0.16",
"symplify\/php-config-printer": "<10.0.16",
"symplify\/console-color-diff": "<10.0.16",
"symplify\/autowire-array-parameter": "<10.0.16",
"symplify\/markdown-diff": "<10.0.16",
"symplify\/amnesia": "<10.0.16",
"symplify\/phpstan-extensions": "<10.0.16",
"symplify\/rule-doc-generator": "<10.0.16",
"symplify\/vendor-patches": "<10.0.16",
"symplify\/skipper": "<10.0.16",
"symplify\/smart-file-system": "<10.0.16",
"symplify\/symfony-static-dumper": "<10.0.16",
"symplify\/git-wrapper": "<10.0.16",
"symplify\/monorepo-builder": "<10.0.16",
"symplify\/config-transformer": "<10.0.16",
"symplify\/easy-ci": "<10.0.16",
"symplify\/coding-standard": "<10.0.16",
"symplify\/latte-phpstan-compiler": "<10.0.16",
"symplify\/template-phpstan-compiler": "<10.0.16",
"symplify\/phpstan-latte-rules": "<10.0.16",
"symplify\/easy-parallel": "<10.0.16",
"symplify\/neon-config-dumper": "<10.0.16"
},
"minimum-stability": "dev",
"prefer-stable": true

View File

@ -17,36 +17,36 @@
}
},
"conflict": {
"symplify\/astral": "<10.0.15",
"symplify\/composer-json-manipulator": "<10.0.15",
"symplify\/easy-coding-standard": "<10.0.15",
"symplify\/phpstan-rules": "<10.0.15",
"symplify\/easy-testing": "<10.0.15",
"symplify\/symfony-php-config": "<10.0.15",
"symplify\/simple-php-doc-parser": "<10.0.15",
"symplify\/php-config-printer": "<10.0.15",
"symplify\/console-color-diff": "<10.0.15",
"symplify\/autowire-array-parameter": "<10.0.15",
"symplify\/markdown-diff": "<10.0.15",
"symplify\/package-builder": "<10.0.15",
"symplify\/amnesia": "<10.0.15",
"symplify\/phpstan-extensions": "<10.0.15",
"symplify\/rule-doc-generator": "<10.0.15",
"symplify\/vendor-patches": "<10.0.15",
"symplify\/skipper": "<10.0.15",
"symplify\/smart-file-system": "<10.0.15",
"symplify\/symfony-static-dumper": "<10.0.15",
"symplify\/git-wrapper": "<10.0.15",
"symplify\/symplify-kernel": "<10.0.15",
"symplify\/monorepo-builder": "<10.0.15",
"symplify\/config-transformer": "<10.0.15",
"symplify\/easy-ci": "<10.0.15",
"symplify\/coding-standard": "<10.0.15",
"symplify\/latte-phpstan-compiler": "<10.0.15",
"symplify\/template-phpstan-compiler": "<10.0.15",
"symplify\/phpstan-latte-rules": "<10.0.15",
"symplify\/easy-parallel": "<10.0.15",
"symplify\/neon-config-dumper": "<10.0.15"
"symplify\/astral": "<10.0.16",
"symplify\/composer-json-manipulator": "<10.0.16",
"symplify\/easy-coding-standard": "<10.0.16",
"symplify\/phpstan-rules": "<10.0.16",
"symplify\/easy-testing": "<10.0.16",
"symplify\/symfony-php-config": "<10.0.16",
"symplify\/simple-php-doc-parser": "<10.0.16",
"symplify\/php-config-printer": "<10.0.16",
"symplify\/console-color-diff": "<10.0.16",
"symplify\/autowire-array-parameter": "<10.0.16",
"symplify\/markdown-diff": "<10.0.16",
"symplify\/package-builder": "<10.0.16",
"symplify\/amnesia": "<10.0.16",
"symplify\/phpstan-extensions": "<10.0.16",
"symplify\/rule-doc-generator": "<10.0.16",
"symplify\/vendor-patches": "<10.0.16",
"symplify\/skipper": "<10.0.16",
"symplify\/smart-file-system": "<10.0.16",
"symplify\/symfony-static-dumper": "<10.0.16",
"symplify\/git-wrapper": "<10.0.16",
"symplify\/symplify-kernel": "<10.0.16",
"symplify\/monorepo-builder": "<10.0.16",
"symplify\/config-transformer": "<10.0.16",
"symplify\/easy-ci": "<10.0.16",
"symplify\/coding-standard": "<10.0.16",
"symplify\/latte-phpstan-compiler": "<10.0.16",
"symplify\/template-phpstan-compiler": "<10.0.16",
"symplify\/phpstan-latte-rules": "<10.0.16",
"symplify\/easy-parallel": "<10.0.16",
"symplify\/neon-config-dumper": "<10.0.16"
},
"minimum-stability": "dev",
"prefer-stable": true

View File

@ -7,11 +7,11 @@
"phpstan\/phpdoc-parser": "^1.2",
"symfony\/dependency-injection": "^5.4|^6.0",
"symfony\/config": "^5.4|^6.0",
"symplify\/package-builder": "^10.0.15"
"symplify\/package-builder": "^10.0.16"
},
"require-dev": {
"phpunit\/phpunit": "^9.5",
"symplify\/easy-testing": "^10.0.15"
"symplify\/easy-testing": "^10.0.16"
},
"autoload": {
"psr-4": {
@ -29,35 +29,35 @@
}
},
"conflict": {
"symplify\/astral": "<10.0.15",
"symplify\/composer-json-manipulator": "<10.0.15",
"symplify\/easy-coding-standard": "<10.0.15",
"symplify\/phpstan-rules": "<10.0.15",
"symplify\/easy-testing": "<10.0.15",
"symplify\/rule-doc-generator-contracts": "<10.0.15",
"symplify\/symfony-php-config": "<10.0.15",
"symplify\/php-config-printer": "<10.0.15",
"symplify\/console-color-diff": "<10.0.15",
"symplify\/autowire-array-parameter": "<10.0.15",
"symplify\/markdown-diff": "<10.0.15",
"symplify\/amnesia": "<10.0.15",
"symplify\/phpstan-extensions": "<10.0.15",
"symplify\/rule-doc-generator": "<10.0.15",
"symplify\/vendor-patches": "<10.0.15",
"symplify\/skipper": "<10.0.15",
"symplify\/smart-file-system": "<10.0.15",
"symplify\/symfony-static-dumper": "<10.0.15",
"symplify\/git-wrapper": "<10.0.15",
"symplify\/symplify-kernel": "<10.0.15",
"symplify\/monorepo-builder": "<10.0.15",
"symplify\/config-transformer": "<10.0.15",
"symplify\/easy-ci": "<10.0.15",
"symplify\/coding-standard": "<10.0.15",
"symplify\/latte-phpstan-compiler": "<10.0.15",
"symplify\/template-phpstan-compiler": "<10.0.15",
"symplify\/phpstan-latte-rules": "<10.0.15",
"symplify\/easy-parallel": "<10.0.15",
"symplify\/neon-config-dumper": "<10.0.15"
"symplify\/astral": "<10.0.16",
"symplify\/composer-json-manipulator": "<10.0.16",
"symplify\/easy-coding-standard": "<10.0.16",
"symplify\/phpstan-rules": "<10.0.16",
"symplify\/easy-testing": "<10.0.16",
"symplify\/rule-doc-generator-contracts": "<10.0.16",
"symplify\/symfony-php-config": "<10.0.16",
"symplify\/php-config-printer": "<10.0.16",
"symplify\/console-color-diff": "<10.0.16",
"symplify\/autowire-array-parameter": "<10.0.16",
"symplify\/markdown-diff": "<10.0.16",
"symplify\/amnesia": "<10.0.16",
"symplify\/phpstan-extensions": "<10.0.16",
"symplify\/rule-doc-generator": "<10.0.16",
"symplify\/vendor-patches": "<10.0.16",
"symplify\/skipper": "<10.0.16",
"symplify\/smart-file-system": "<10.0.16",
"symplify\/symfony-static-dumper": "<10.0.16",
"symplify\/git-wrapper": "<10.0.16",
"symplify\/symplify-kernel": "<10.0.16",
"symplify\/monorepo-builder": "<10.0.16",
"symplify\/config-transformer": "<10.0.16",
"symplify\/easy-ci": "<10.0.16",
"symplify\/coding-standard": "<10.0.16",
"symplify\/latte-phpstan-compiler": "<10.0.16",
"symplify\/template-phpstan-compiler": "<10.0.16",
"symplify\/phpstan-latte-rules": "<10.0.16",
"symplify\/easy-parallel": "<10.0.16",
"symplify\/neon-config-dumper": "<10.0.16"
},
"minimum-stability": "dev",
"prefer-stable": true

View File

@ -9,9 +9,9 @@
"symfony\/dependency-injection": "^5.4|^6.0",
"symfony\/finder": "^5.4|^6.0",
"symfony\/filesystem": "^5.4|^6.0",
"symplify\/package-builder": "^10.0.15",
"symplify\/symplify-kernel": "^10.0.15",
"symplify\/smart-file-system": "^10.0.15"
"symplify\/package-builder": "^10.0.16",
"symplify\/symplify-kernel": "^10.0.16",
"symplify\/smart-file-system": "^10.0.16"
},
"require-dev": {
"phpunit\/phpunit": "^9.5"
@ -32,33 +32,33 @@
}
},
"conflict": {
"symplify\/astral": "<10.0.15",
"symplify\/composer-json-manipulator": "<10.0.15",
"symplify\/easy-coding-standard": "<10.0.15",
"symplify\/phpstan-rules": "<10.0.15",
"symplify\/easy-testing": "<10.0.15",
"symplify\/rule-doc-generator-contracts": "<10.0.15",
"symplify\/symfony-php-config": "<10.0.15",
"symplify\/simple-php-doc-parser": "<10.0.15",
"symplify\/php-config-printer": "<10.0.15",
"symplify\/console-color-diff": "<10.0.15",
"symplify\/autowire-array-parameter": "<10.0.15",
"symplify\/markdown-diff": "<10.0.15",
"symplify\/amnesia": "<10.0.15",
"symplify\/phpstan-extensions": "<10.0.15",
"symplify\/rule-doc-generator": "<10.0.15",
"symplify\/vendor-patches": "<10.0.15",
"symplify\/symfony-static-dumper": "<10.0.15",
"symplify\/git-wrapper": "<10.0.15",
"symplify\/monorepo-builder": "<10.0.15",
"symplify\/config-transformer": "<10.0.15",
"symplify\/easy-ci": "<10.0.15",
"symplify\/coding-standard": "<10.0.15",
"symplify\/latte-phpstan-compiler": "<10.0.15",
"symplify\/template-phpstan-compiler": "<10.0.15",
"symplify\/phpstan-latte-rules": "<10.0.15",
"symplify\/easy-parallel": "<10.0.15",
"symplify\/neon-config-dumper": "<10.0.15"
"symplify\/astral": "<10.0.16",
"symplify\/composer-json-manipulator": "<10.0.16",
"symplify\/easy-coding-standard": "<10.0.16",
"symplify\/phpstan-rules": "<10.0.16",
"symplify\/easy-testing": "<10.0.16",
"symplify\/rule-doc-generator-contracts": "<10.0.16",
"symplify\/symfony-php-config": "<10.0.16",
"symplify\/simple-php-doc-parser": "<10.0.16",
"symplify\/php-config-printer": "<10.0.16",
"symplify\/console-color-diff": "<10.0.16",
"symplify\/autowire-array-parameter": "<10.0.16",
"symplify\/markdown-diff": "<10.0.16",
"symplify\/amnesia": "<10.0.16",
"symplify\/phpstan-extensions": "<10.0.16",
"symplify\/rule-doc-generator": "<10.0.16",
"symplify\/vendor-patches": "<10.0.16",
"symplify\/symfony-static-dumper": "<10.0.16",
"symplify\/git-wrapper": "<10.0.16",
"symplify\/monorepo-builder": "<10.0.16",
"symplify\/config-transformer": "<10.0.16",
"symplify\/easy-ci": "<10.0.16",
"symplify\/coding-standard": "<10.0.16",
"symplify\/latte-phpstan-compiler": "<10.0.16",
"symplify\/template-phpstan-compiler": "<10.0.16",
"symplify\/phpstan-latte-rules": "<10.0.16",
"symplify\/easy-parallel": "<10.0.16",
"symplify\/neon-config-dumper": "<10.0.16"
},
"minimum-stability": "dev",
"prefer-stable": true

View File

@ -28,36 +28,36 @@
}
},
"conflict": {
"symplify\/astral": "<10.0.15",
"symplify\/composer-json-manipulator": "<10.0.15",
"symplify\/easy-coding-standard": "<10.0.15",
"symplify\/phpstan-rules": "<10.0.15",
"symplify\/easy-testing": "<10.0.15",
"symplify\/rule-doc-generator-contracts": "<10.0.15",
"symplify\/symfony-php-config": "<10.0.15",
"symplify\/simple-php-doc-parser": "<10.0.15",
"symplify\/php-config-printer": "<10.0.15",
"symplify\/console-color-diff": "<10.0.15",
"symplify\/autowire-array-parameter": "<10.0.15",
"symplify\/markdown-diff": "<10.0.15",
"symplify\/package-builder": "<10.0.15",
"symplify\/amnesia": "<10.0.15",
"symplify\/phpstan-extensions": "<10.0.15",
"symplify\/rule-doc-generator": "<10.0.15",
"symplify\/vendor-patches": "<10.0.15",
"symplify\/skipper": "<10.0.15",
"symplify\/symfony-static-dumper": "<10.0.15",
"symplify\/git-wrapper": "<10.0.15",
"symplify\/symplify-kernel": "<10.0.15",
"symplify\/monorepo-builder": "<10.0.15",
"symplify\/config-transformer": "<10.0.15",
"symplify\/easy-ci": "<10.0.15",
"symplify\/coding-standard": "<10.0.15",
"symplify\/latte-phpstan-compiler": "<10.0.15",
"symplify\/template-phpstan-compiler": "<10.0.15",
"symplify\/phpstan-latte-rules": "<10.0.15",
"symplify\/easy-parallel": "<10.0.15",
"symplify\/neon-config-dumper": "<10.0.15"
"symplify\/astral": "<10.0.16",
"symplify\/composer-json-manipulator": "<10.0.16",
"symplify\/easy-coding-standard": "<10.0.16",
"symplify\/phpstan-rules": "<10.0.16",
"symplify\/easy-testing": "<10.0.16",
"symplify\/rule-doc-generator-contracts": "<10.0.16",
"symplify\/symfony-php-config": "<10.0.16",
"symplify\/simple-php-doc-parser": "<10.0.16",
"symplify\/php-config-printer": "<10.0.16",
"symplify\/console-color-diff": "<10.0.16",
"symplify\/autowire-array-parameter": "<10.0.16",
"symplify\/markdown-diff": "<10.0.16",
"symplify\/package-builder": "<10.0.16",
"symplify\/amnesia": "<10.0.16",
"symplify\/phpstan-extensions": "<10.0.16",
"symplify\/rule-doc-generator": "<10.0.16",
"symplify\/vendor-patches": "<10.0.16",
"symplify\/skipper": "<10.0.16",
"symplify\/symfony-static-dumper": "<10.0.16",
"symplify\/git-wrapper": "<10.0.16",
"symplify\/symplify-kernel": "<10.0.16",
"symplify\/monorepo-builder": "<10.0.16",
"symplify\/config-transformer": "<10.0.16",
"symplify\/easy-ci": "<10.0.16",
"symplify\/coding-standard": "<10.0.16",
"symplify\/latte-phpstan-compiler": "<10.0.16",
"symplify\/template-phpstan-compiler": "<10.0.16",
"symplify\/phpstan-latte-rules": "<10.0.16",
"symplify\/easy-parallel": "<10.0.16",
"symplify\/neon-config-dumper": "<10.0.16"
},
"minimum-stability": "dev",
"prefer-stable": true

View File

@ -5,8 +5,8 @@
"require": {
"php": ">=8.0",
"symfony\/dependency-injection": "^5.4|^6.0",
"symplify\/symplify-kernel": "^10.0.15",
"symplify\/package-builder": "^10.0.15"
"symplify\/symplify-kernel": "^10.0.16",
"symplify\/package-builder": "^10.0.16"
},
"require-dev": {
"phpunit\/phpunit": "^9.5",
@ -28,34 +28,34 @@
}
},
"conflict": {
"symplify\/astral": "<10.0.15",
"symplify\/composer-json-manipulator": "<10.0.15",
"symplify\/easy-coding-standard": "<10.0.15",
"symplify\/phpstan-rules": "<10.0.15",
"symplify\/easy-testing": "<10.0.15",
"symplify\/rule-doc-generator-contracts": "<10.0.15",
"symplify\/simple-php-doc-parser": "<10.0.15",
"symplify\/php-config-printer": "<10.0.15",
"symplify\/console-color-diff": "<10.0.15",
"symplify\/autowire-array-parameter": "<10.0.15",
"symplify\/markdown-diff": "<10.0.15",
"symplify\/amnesia": "<10.0.15",
"symplify\/phpstan-extensions": "<10.0.15",
"symplify\/rule-doc-generator": "<10.0.15",
"symplify\/vendor-patches": "<10.0.15",
"symplify\/skipper": "<10.0.15",
"symplify\/smart-file-system": "<10.0.15",
"symplify\/symfony-static-dumper": "<10.0.15",
"symplify\/git-wrapper": "<10.0.15",
"symplify\/monorepo-builder": "<10.0.15",
"symplify\/config-transformer": "<10.0.15",
"symplify\/easy-ci": "<10.0.15",
"symplify\/coding-standard": "<10.0.15",
"symplify\/latte-phpstan-compiler": "<10.0.15",
"symplify\/template-phpstan-compiler": "<10.0.15",
"symplify\/phpstan-latte-rules": "<10.0.15",
"symplify\/easy-parallel": "<10.0.15",
"symplify\/neon-config-dumper": "<10.0.15"
"symplify\/astral": "<10.0.16",
"symplify\/composer-json-manipulator": "<10.0.16",
"symplify\/easy-coding-standard": "<10.0.16",
"symplify\/phpstan-rules": "<10.0.16",
"symplify\/easy-testing": "<10.0.16",
"symplify\/rule-doc-generator-contracts": "<10.0.16",
"symplify\/simple-php-doc-parser": "<10.0.16",
"symplify\/php-config-printer": "<10.0.16",
"symplify\/console-color-diff": "<10.0.16",
"symplify\/autowire-array-parameter": "<10.0.16",
"symplify\/markdown-diff": "<10.0.16",
"symplify\/amnesia": "<10.0.16",
"symplify\/phpstan-extensions": "<10.0.16",
"symplify\/rule-doc-generator": "<10.0.16",
"symplify\/vendor-patches": "<10.0.16",
"symplify\/skipper": "<10.0.16",
"symplify\/smart-file-system": "<10.0.16",
"symplify\/symfony-static-dumper": "<10.0.16",
"symplify\/git-wrapper": "<10.0.16",
"symplify\/monorepo-builder": "<10.0.16",
"symplify\/config-transformer": "<10.0.16",
"symplify\/easy-ci": "<10.0.16",
"symplify\/coding-standard": "<10.0.16",
"symplify\/latte-phpstan-compiler": "<10.0.16",
"symplify\/template-phpstan-compiler": "<10.0.16",
"symplify\/phpstan-latte-rules": "<10.0.16",
"symplify\/easy-parallel": "<10.0.16",
"symplify\/neon-config-dumper": "<10.0.16"
},
"minimum-stability": "dev",
"prefer-stable": true

View File

@ -6,10 +6,10 @@
"php": ">=8.0",
"symfony\/console": "^5.4|^6.0",
"symfony\/dependency-injection": "^5.4|^6.0",
"symplify\/smart-file-system": "^10.0.15",
"symplify\/composer-json-manipulator": "^10.0.15",
"symplify\/autowire-array-parameter": "^10.0.15",
"symplify\/package-builder": "^10.0.15",
"symplify\/smart-file-system": "^10.0.16",
"symplify\/composer-json-manipulator": "^10.0.16",
"symplify\/autowire-array-parameter": "^10.0.16",
"symplify\/package-builder": "^10.0.16",
"webmozart\/assert": "^1.10"
},
"require-dev": {
@ -26,32 +26,32 @@
}
},
"conflict": {
"symplify\/astral": "<10.0.15",
"symplify\/easy-coding-standard": "<10.0.15",
"symplify\/phpstan-rules": "<10.0.15",
"symplify\/easy-testing": "<10.0.15",
"symplify\/rule-doc-generator-contracts": "<10.0.15",
"symplify\/symfony-php-config": "<10.0.15",
"symplify\/simple-php-doc-parser": "<10.0.15",
"symplify\/php-config-printer": "<10.0.15",
"symplify\/console-color-diff": "<10.0.15",
"symplify\/markdown-diff": "<10.0.15",
"symplify\/amnesia": "<10.0.15",
"symplify\/phpstan-extensions": "<10.0.15",
"symplify\/rule-doc-generator": "<10.0.15",
"symplify\/vendor-patches": "<10.0.15",
"symplify\/skipper": "<10.0.15",
"symplify\/symfony-static-dumper": "<10.0.15",
"symplify\/git-wrapper": "<10.0.15",
"symplify\/monorepo-builder": "<10.0.15",
"symplify\/config-transformer": "<10.0.15",
"symplify\/easy-ci": "<10.0.15",
"symplify\/coding-standard": "<10.0.15",
"symplify\/latte-phpstan-compiler": "<10.0.15",
"symplify\/template-phpstan-compiler": "<10.0.15",
"symplify\/phpstan-latte-rules": "<10.0.15",
"symplify\/easy-parallel": "<10.0.15",
"symplify\/neon-config-dumper": "<10.0.15"
"symplify\/astral": "<10.0.16",
"symplify\/easy-coding-standard": "<10.0.16",
"symplify\/phpstan-rules": "<10.0.16",
"symplify\/easy-testing": "<10.0.16",
"symplify\/rule-doc-generator-contracts": "<10.0.16",
"symplify\/symfony-php-config": "<10.0.16",
"symplify\/simple-php-doc-parser": "<10.0.16",
"symplify\/php-config-printer": "<10.0.16",
"symplify\/console-color-diff": "<10.0.16",
"symplify\/markdown-diff": "<10.0.16",
"symplify\/amnesia": "<10.0.16",
"symplify\/phpstan-extensions": "<10.0.16",
"symplify\/rule-doc-generator": "<10.0.16",
"symplify\/vendor-patches": "<10.0.16",
"symplify\/skipper": "<10.0.16",
"symplify\/symfony-static-dumper": "<10.0.16",
"symplify\/git-wrapper": "<10.0.16",
"symplify\/monorepo-builder": "<10.0.16",
"symplify\/config-transformer": "<10.0.16",
"symplify\/easy-ci": "<10.0.16",
"symplify\/coding-standard": "<10.0.16",
"symplify\/latte-phpstan-compiler": "<10.0.16",
"symplify\/template-phpstan-compiler": "<10.0.16",
"symplify\/phpstan-latte-rules": "<10.0.16",
"symplify\/easy-parallel": "<10.0.16",
"symplify\/neon-config-dumper": "<10.0.16"
},
"minimum-stability": "dev",
"prefer-stable": true

View File

@ -20,12 +20,14 @@ final class ContainerBuilderFactory
$this->loaderFactory = $loaderFactory;
}
/**
* @param ExtensionInterface[] $extensions
* @param CompilerPassInterface[] $compilerPasses
* @param string[] $configFiles
* @param CompilerPassInterface[] $compilerPasses
* @param ExtensionInterface[] $extensions
*/
public function create(array $extensions, array $compilerPasses, array $configFiles) : \RectorPrefix20220125\Symfony\Component\DependencyInjection\ContainerBuilder
public function create(array $configFiles, array $compilerPasses, array $extensions) : \RectorPrefix20220125\Symfony\Component\DependencyInjection\ContainerBuilder
{
\RectorPrefix20220125\Webmozart\Assert\Assert::allIsAOf($extensions, \RectorPrefix20220125\Symfony\Component\DependencyInjection\Extension\ExtensionInterface::class);
\RectorPrefix20220125\Webmozart\Assert\Assert::allIsAOf($compilerPasses, \RectorPrefix20220125\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface::class);
\RectorPrefix20220125\Webmozart\Assert\Assert::allString($configFiles);
\RectorPrefix20220125\Webmozart\Assert\Assert::allFile($configFiles);
$containerBuilder = new \RectorPrefix20220125\Symfony\Component\DependencyInjection\ContainerBuilder();

View File

@ -3,8 +3,10 @@
declare (strict_types=1);
namespace RectorPrefix20220125\Symplify\SymplifyKernel\HttpKernel;
use RectorPrefix20220125\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use RectorPrefix20220125\Symfony\Component\DependencyInjection\Container;
use RectorPrefix20220125\Symfony\Component\DependencyInjection\ContainerInterface;
use RectorPrefix20220125\Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use RectorPrefix20220125\Symplify\AutowireArrayParameter\DependencyInjection\CompilerPass\AutowireArrayParameterCompilerPass;
use RectorPrefix20220125\Symplify\SymplifyKernel\Config\Loader\ParameterMergingLoaderFactory;
use RectorPrefix20220125\Symplify\SymplifyKernel\ContainerBuilderFactory;
@ -22,13 +24,15 @@ abstract class AbstractSymplifyKernel implements \RectorPrefix20220125\Symplify\
private $container = null;
/**
* @param string[] $configFiles
* @param CompilerPassInterface[] $compilerPasses
* @param ExtensionInterface[] $extensions
*/
public function create(array $extensions, array $compilerPasses, array $configFiles) : \RectorPrefix20220125\Symfony\Component\DependencyInjection\ContainerInterface
public function create(array $configFiles, array $compilerPasses = [], array $extensions = []) : \RectorPrefix20220125\Symfony\Component\DependencyInjection\ContainerInterface
{
$containerBuilderFactory = new \RectorPrefix20220125\Symplify\SymplifyKernel\ContainerBuilderFactory(new \RectorPrefix20220125\Symplify\SymplifyKernel\Config\Loader\ParameterMergingLoaderFactory());
$compilerPasses[] = new \RectorPrefix20220125\Symplify\AutowireArrayParameter\DependencyInjection\CompilerPass\AutowireArrayParameterCompilerPass();
$configFiles[] = \RectorPrefix20220125\Symplify\SymplifyKernel\ValueObject\SymplifyKernelConfig::FILE_PATH;
$containerBuilder = $containerBuilderFactory->create($extensions, $compilerPasses, $configFiles);
$containerBuilder = $containerBuilderFactory->create($configFiles, $compilerPasses, $extensions);
$containerBuilder->compile();
$this->container = $containerBuilder;
return $containerBuilder;

View File

@ -12,8 +12,8 @@
"symfony\/dependency-injection": "^5.4|^6.0",
"sebastian\/diff": "^4.0",
"cweagans\/composer-patches": "^1.7",
"symplify\/composer-json-manipulator": "^10.0.15",
"symplify\/symplify-kernel": "^10.0.15"
"symplify\/composer-json-manipulator": "^10.0.16",
"symplify\/symplify-kernel": "^10.0.16"
},
"require-dev": {
"phpunit\/phpunit": "^9.5"
@ -34,34 +34,34 @@
}
},
"conflict": {
"symplify\/astral": "<10.0.15",
"symplify\/easy-coding-standard": "<10.0.15",
"symplify\/phpstan-rules": "<10.0.15",
"symplify\/easy-testing": "<10.0.15",
"symplify\/rule-doc-generator-contracts": "<10.0.15",
"symplify\/symfony-php-config": "<10.0.15",
"symplify\/simple-php-doc-parser": "<10.0.15",
"symplify\/php-config-printer": "<10.0.15",
"symplify\/console-color-diff": "<10.0.15",
"symplify\/autowire-array-parameter": "<10.0.15",
"symplify\/markdown-diff": "<10.0.15",
"symplify\/package-builder": "<10.0.15",
"symplify\/amnesia": "<10.0.15",
"symplify\/phpstan-extensions": "<10.0.15",
"symplify\/rule-doc-generator": "<10.0.15",
"symplify\/skipper": "<10.0.15",
"symplify\/smart-file-system": "<10.0.15",
"symplify\/symfony-static-dumper": "<10.0.15",
"symplify\/git-wrapper": "<10.0.15",
"symplify\/monorepo-builder": "<10.0.15",
"symplify\/config-transformer": "<10.0.15",
"symplify\/easy-ci": "<10.0.15",
"symplify\/coding-standard": "<10.0.15",
"symplify\/latte-phpstan-compiler": "<10.0.15",
"symplify\/template-phpstan-compiler": "<10.0.15",
"symplify\/phpstan-latte-rules": "<10.0.15",
"symplify\/easy-parallel": "<10.0.15",
"symplify\/neon-config-dumper": "<10.0.15"
"symplify\/astral": "<10.0.16",
"symplify\/easy-coding-standard": "<10.0.16",
"symplify\/phpstan-rules": "<10.0.16",
"symplify\/easy-testing": "<10.0.16",
"symplify\/rule-doc-generator-contracts": "<10.0.16",
"symplify\/symfony-php-config": "<10.0.16",
"symplify\/simple-php-doc-parser": "<10.0.16",
"symplify\/php-config-printer": "<10.0.16",
"symplify\/console-color-diff": "<10.0.16",
"symplify\/autowire-array-parameter": "<10.0.16",
"symplify\/markdown-diff": "<10.0.16",
"symplify\/package-builder": "<10.0.16",
"symplify\/amnesia": "<10.0.16",
"symplify\/phpstan-extensions": "<10.0.16",
"symplify\/rule-doc-generator": "<10.0.16",
"symplify\/skipper": "<10.0.16",
"symplify\/smart-file-system": "<10.0.16",
"symplify\/symfony-static-dumper": "<10.0.16",
"symplify\/git-wrapper": "<10.0.16",
"symplify\/monorepo-builder": "<10.0.16",
"symplify\/config-transformer": "<10.0.16",
"symplify\/easy-ci": "<10.0.16",
"symplify\/coding-standard": "<10.0.16",
"symplify\/latte-phpstan-compiler": "<10.0.16",
"symplify\/template-phpstan-compiler": "<10.0.16",
"symplify\/phpstan-latte-rules": "<10.0.16",
"symplify\/easy-parallel": "<10.0.16",
"symplify\/neon-config-dumper": "<10.0.16"
},
"minimum-stability": "dev",
"prefer-stable": true

View File

@ -15,6 +15,6 @@ final class VendorPatchesKernel extends \RectorPrefix20220125\Symplify\SymplifyK
{
$configFiles[] = __DIR__ . '/../../config/config.php';
$configFiles[] = \RectorPrefix20220125\Symplify\ComposerJsonManipulator\ValueObject\ComposerJsonManipulatorConfig::FILE_PATH;
return $this->create([], [], $configFiles);
return $this->create($configFiles);
}
}