mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-20 07:22:43 +02:00
Rerun documentation to remove duplicated lines
This commit is contained in:
parent
87dab55dc8
commit
baa8a09014
@ -14,7 +14,6 @@ Handles method calls in child of Doctrine EntityRepository and moves them to "$t
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Architecture\RepositoryAsService\MoveRepositoryFromParentToConstructorRector
|
||||
|
||||
Turns parent EntityRepository class to constructor dependency
|
||||
@ -39,7 +38,6 @@ namespace App\Repository;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Architecture\RepositoryAsService\ServiceLocatorToDIRector
|
||||
|
||||
Turns "$this->getRepository()" in Symfony Controller to constructor injection and private property access.
|
||||
@ -66,7 +64,6 @@ class ProductController extends Controller
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Architecture\PHPUnit\ArrayToYieldDataProviderRector
|
||||
|
||||
Turns method data providers in PHPUnit from arrays to yield
|
||||
@ -85,7 +82,6 @@ Turns method data providers in PHPUnit from arrays to yield
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Dynamic\MethodNameReplacerRector
|
||||
|
||||
[Dynamic] Turns method names to new ones.
|
||||
@ -99,7 +95,6 @@ $someObject = new SomeClass;
|
||||
+SomeClass::newStaticMethod();
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Dynamic\PropertyToMethodRector
|
||||
|
||||
[Dynamic] Replaces properties assign calls be defined methods.
|
||||
@ -111,7 +106,6 @@ $someObject = new SomeClass;
|
||||
+$object->setProperty($value);
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Dynamic\ClassReplacerRector
|
||||
|
||||
[Dynamic] Replaces defined classes by new ones.
|
||||
@ -121,17 +115,15 @@ $someObject = new SomeClass;
|
||||
+$value = new SomeNewClass;
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\CodeQuality\InArrayAndArrayKeysToArrayKeyExistsRector
|
||||
|
||||
Simplify in_array and array_keys functions combination into array_key_exists when array_keys has one argument only
|
||||
Simplify `in_array` and `array_keys` functions combination into `array_key_exists` when `array_keys` has one argument only
|
||||
|
||||
```diff
|
||||
-in_array("key", array_keys($array), true);
|
||||
+array_key_exists("key", $array);
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Dynamic\ParentTypehintedArgumentRector
|
||||
|
||||
[Dynamic] Changes defined parent class typehints.
|
||||
@ -144,7 +136,6 @@ class SomeClass implements SomeInterface
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Dynamic\ArgumentRector
|
||||
|
||||
[Dynamic] Adds, removes or replaces defined arguments in defined methods and their calls.
|
||||
@ -155,7 +146,6 @@ $containerBuilder = new Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
+$containerBuilder->compile(true);
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Dynamic\FunctionToMethodCallRector
|
||||
|
||||
[Dynamic] Turns defined function calls to local method calls.
|
||||
@ -165,26 +155,24 @@ $containerBuilder = new Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
+$this->render("...", []);
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Nette\Application\InjectPropertyRector
|
||||
|
||||
Turns properties with @inject to private properties and constructor injection
|
||||
|
||||
```diff
|
||||
/**
|
||||
* @var SomeService
|
||||
- * @inject
|
||||
*/
|
||||
- public $someService;
|
||||
+ private $someService;
|
||||
+
|
||||
+ public function __construct(SomeService $someService)
|
||||
+ {
|
||||
+ $this->someService = $someService;
|
||||
+ }
|
||||
* @var SomeService
|
||||
- * @inject
|
||||
*/
|
||||
-public $someService;
|
||||
+private $someService;
|
||||
+
|
||||
+public function __construct(SomeService $someService)
|
||||
+{
|
||||
+ $this->someService = $someService;
|
||||
+}
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Nette\Bootstrap\RemoveConfiguratorConstantsRector
|
||||
|
||||
Turns properties with @inject to private properties and constructor injection
|
||||
@ -194,7 +182,6 @@ Turns properties with @inject to private properties and constructor injection
|
||||
+$value === "development"
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Nette\DI\SetInjectToAddTagRector
|
||||
|
||||
Turns setInject() to tag in Nette\DI\CompilerExtension
|
||||
@ -204,7 +191,6 @@ Turns setInject() to tag in Nette\DI\CompilerExtension
|
||||
+$serviceDefinition->addTag("inject");
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Nette\Utils\NetteObjectToSmartTraitRector
|
||||
|
||||
Checks all Nette\Object instances and turns parent class to trait
|
||||
@ -214,7 +200,6 @@ Checks all Nette\Object instances and turns parent class to trait
|
||||
+class SomeClass { use Nette\SmartObject; }
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Nette\Utils\MagicMethodRector
|
||||
|
||||
Catches @method annotations of Nette\Object instances and converts them to real methods.
|
||||
@ -224,7 +209,6 @@ Catches @method annotations of Nette\Object instances and converts them to real
|
||||
+public function getId() { $this->id; }
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Nette\Application\TemplateMagicInvokeFilterCallRector
|
||||
|
||||
Turns properties with @inject to private properties and constructor injection
|
||||
@ -234,7 +218,6 @@ Turns properties with @inject to private properties and constructor injection
|
||||
+$this->template->getLatte()->invokeFilter("someFilter", ...)
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Nette\Application\TemplateRegisterHelperRector
|
||||
|
||||
Turns properties with @inject to private properties and constructor injection
|
||||
@ -244,7 +227,6 @@ Turns properties with @inject to private properties and constructor injection
|
||||
+$this->template->getLatte()->addFilter("someFilter", ...)
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Nette\DI\SetEntityToStatementRector
|
||||
|
||||
Turns setDefinition() to Nette\DI\Helpers::expand() value in Nette\DI\CompilerExtension
|
||||
@ -254,7 +236,6 @@ Turns setDefinition() to Nette\DI\Helpers::expand() value in Nette\DI\CompilerEx
|
||||
+$definition = new Statement("someEntity", $definition->arguments);
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Nette\DI\ExpandFunctionToParametersArrayRector
|
||||
|
||||
Turns expand() to parameters value in Nette\DI\CompilerExtension
|
||||
@ -267,7 +248,6 @@ Turns expand() to parameters value in Nette\DI\CompilerExtension
|
||||
+$builder->parameters["argument"];
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Nette\DI\ExpandFunctionToStaticExpandFunctionRector
|
||||
|
||||
Turns expand() to Nette\DI\Helpers::expand() value in Nette\DI\CompilerExtension
|
||||
@ -277,7 +257,6 @@ Turns expand() to Nette\DI\Helpers::expand() value in Nette\DI\CompilerExtension
|
||||
+\Nette\DI\Helpers::expand(object|array, $builder->parameters);
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Nette\Forms\ChoiceDefaultValueRector
|
||||
|
||||
Turns checkAllowedValues to method in Nette\Forms Control element
|
||||
@ -287,7 +266,6 @@ Turns checkAllowedValues to method in Nette\Forms Control element
|
||||
+$control->checkDefaultValue(false);
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Nette\Forms\FormNegativeRulesRector
|
||||
|
||||
Turns negative Nette Form rules to their specific new names.
|
||||
@ -297,7 +275,6 @@ Turns negative Nette Form rules to their specific new names.
|
||||
+$form->addRule(Form::NOT_FILLED);
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Nette\Forms\FormCallbackRector
|
||||
|
||||
Turns magic callback assign to callback assign on Nette Form events.
|
||||
@ -307,7 +284,6 @@ Turns magic callback assign to callback assign on Nette Form events.
|
||||
+$form->onSuccess[] = [$this, someMethod;]
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\MagicDisclosure\GetAndSetToMethodCallRector
|
||||
|
||||
[Dynamic] Turns defined __get/__set to specific method calls.
|
||||
@ -320,7 +296,6 @@ Turns magic callback assign to callback assign on Nette Form events.
|
||||
+$container->setService("someService", $someService);
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\MagicDisclosure\UnsetAndIssetToMethodCallRector
|
||||
|
||||
[Dynamic] Turns defined __isset/__unset calls to specific method calls.
|
||||
@ -333,7 +308,6 @@ Turns magic callback assign to callback assign on Nette Form events.
|
||||
+$container->removeService("someKey");
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\PhpParser\IdentifierRector
|
||||
|
||||
Turns node string names to Identifier object in php-parser
|
||||
@ -343,7 +317,6 @@ Turns node string names to Identifier object in php-parser
|
||||
+$constNode = new \PhpParser\Node\Const_; $name = $constNode->name->toString();
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\PhpParser\ParamAndStaticVarNameRector
|
||||
|
||||
Turns old string var to var->name sub-variable in Node of PHP-Parser
|
||||
@ -356,7 +329,6 @@ Turns old string var to var->name sub-variable in Node of PHP-Parser
|
||||
+$staticVarNode->var->name;
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\PhpParser\CatchAndClosureUseNameRector
|
||||
|
||||
Turns $catchNode->var to its new new ->name property in php-parser
|
||||
@ -366,7 +338,6 @@ Turns $catchNode->var to its new new ->name property in php-parser
|
||||
+$catchNode->var->name
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\PhpParser\SetLineRector
|
||||
|
||||
Turns standalone line method to attribute in Node of PHP-Parser
|
||||
@ -376,7 +347,6 @@ Turns standalone line method to attribute in Node of PHP-Parser
|
||||
+$node->setAttribute("line", 5);
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\PhpParser\RemoveNodeRector
|
||||
|
||||
Turns integer return to remove node to constant in NodeVisitor of PHP-Parser
|
||||
@ -386,7 +356,6 @@ Turns integer return to remove node to constant in NodeVisitor of PHP-Parser
|
||||
+public function leaveNode() { return NodeTraverser::REMOVE_NODE; }
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\PhpParser\UseWithAliasRector
|
||||
|
||||
Turns use property to method and $node->alias to last name in UseAlias Node of PHP-Parser
|
||||
@ -399,7 +368,6 @@ Turns use property to method and $node->alias to last name in UseAlias Node of P
|
||||
+$node->alias
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Dynamic\PropertyNameReplacerRector
|
||||
|
||||
[Dynamic] Replaces defined old properties by new ones.
|
||||
@ -409,7 +377,6 @@ Turns use property to method and $node->alias to last name in UseAlias Node of P
|
||||
+$someObject->someNewProperty;
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Dynamic\ClassConstantReplacerRector
|
||||
|
||||
[Dynamic] Replaces defined class constants in their calls.
|
||||
@ -419,7 +386,6 @@ Turns use property to method and $node->alias to last name in UseAlias Node of P
|
||||
+$value = SomeClass::NEW_CONSTANT;
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\PHPUnit\SpecificMethod\AssertNotOperatorRector
|
||||
|
||||
Turns not-operator comparisons to their method name alternatives in PHPUnit TestCase
|
||||
@ -432,7 +398,6 @@ Turns not-operator comparisons to their method name alternatives in PHPUnit Test
|
||||
+$this->assertTrue($foo, "message");
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\PHPUnit\SpecificMethod\AssertComparisonToSpecificMethodRector
|
||||
|
||||
Turns comparison operations to their method name alternatives in PHPUnit TestCase
|
||||
@ -445,7 +410,6 @@ Turns comparison operations to their method name alternatives in PHPUnit TestCas
|
||||
+$this->assertLessThanOrEqual($bar, $foo, "message");
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\PHPUnit\SpecificMethod\AssertTrueFalseToSpecificMethodRector
|
||||
|
||||
Turns true/false comparisons to their method name alternatives in PHPUnit TestCase when possible
|
||||
@ -455,7 +419,6 @@ Turns true/false comparisons to their method name alternatives in PHPUnit TestCa
|
||||
+$this->assertIsReadable($readmeFile, "message");
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\PHPUnit\SpecificMethod\AssertSameBoolNullToSpecificMethodRector
|
||||
|
||||
Turns same bool and null comparisons to their method name alternatives in PHPUnit TestCase
|
||||
@ -468,7 +431,6 @@ Turns same bool and null comparisons to their method name alternatives in PHPUni
|
||||
+$this->assertNotFalse($anything);
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\PHPUnit\SpecificMethod\AssertFalseStrposToContainsRector
|
||||
|
||||
Turns strpos()/stripos() comparisons to their method name alternatives in PHPUnit TestCase
|
||||
@ -481,7 +443,6 @@ Turns strpos()/stripos() comparisons to their method name alternatives in PHPUni
|
||||
+$this->assertContains("foo", $anything, "message");
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\PHPUnit\SpecificMethod\AssertTrueFalseInternalTypeToSpecificMethodRector
|
||||
|
||||
Turns true/false with internal type comparisons to their method name alternatives in PHPUnit TestCase
|
||||
@ -494,7 +455,6 @@ Turns true/false with internal type comparisons to their method name alternative
|
||||
+$this->assertNotInternalType({internal_type}, $anything, "message");
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\PHPUnit\SpecificMethod\AssertCompareToSpecificMethodRector
|
||||
|
||||
Turns vague php-only method in PHPUnit TestCase to more specific
|
||||
@ -516,7 +476,6 @@ Turns vague php-only method in PHPUnit TestCase to more specific
|
||||
+$this->assertNot{function}($value, $anything, "message")
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\PHPUnit\SpecificMethod\AssertIssetToSpecificMethodRector
|
||||
|
||||
Turns isset comparisons to their method name alternatives in PHPUnit TestCase
|
||||
@ -529,7 +488,6 @@ Turns isset comparisons to their method name alternatives in PHPUnit TestCase
|
||||
+$this->assertArrayNotHasKey("foo", $anything, "message");
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\PHPUnit\SpecificMethod\AssertInstanceOfComparisonRector
|
||||
|
||||
Turns instanceof comparisons to their method name alternatives in PHPUnit TestCase
|
||||
@ -542,7 +500,6 @@ Turns instanceof comparisons to their method name alternatives in PHPUnit TestCa
|
||||
+$this->assertNotInstanceOf("Foo", $foo, "message");
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\PHPUnit\SpecificMethod\AssertPropertyExistsRector
|
||||
|
||||
Turns property_exists() comparisons to their method name alternatives in PHPUnit TestCase
|
||||
@ -555,7 +512,6 @@ Turns property_exists() comparisons to their method name alternatives in PHPUnit
|
||||
+$this->assertClassNotHasAttribute("property", "Class", "message");
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\PHPUnit\SpecificMethod\AssertRegExpRector
|
||||
|
||||
Turns preg_match() comparisons to their method name alternatives in PHPUnit TestCase
|
||||
@ -568,7 +524,6 @@ Turns preg_match() comparisons to their method name alternatives in PHPUnit Test
|
||||
+$this->assertNotRegExp("/^Message for ".*"\.$/", $string, $message);
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\PHPUnit\ExceptionAnnotationRector
|
||||
|
||||
Takes setExpectedException() 2nd and next arguments to own methods in PHPUnit.
|
||||
@ -586,7 +541,6 @@ Takes setExpectedException() 2nd and next arguments to own methods in PHPUnit.
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\PHPUnit\GetMockRector
|
||||
|
||||
Turns getMock*() methods to createMock()
|
||||
@ -599,7 +553,6 @@ Turns getMock*() methods to createMock()
|
||||
+$this->createMock("Class"
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Dynamic\PseudoNamespaceToNamespaceRector
|
||||
|
||||
[Dynamic] Replaces defined Pseudo_Namespaces by Namespace\Ones.
|
||||
@ -609,7 +562,6 @@ Turns getMock*() methods to createMock()
|
||||
+$someServie = Some\Object;
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\PHPUnit\DelegateExceptionArgumentsRector
|
||||
|
||||
Takes setExpectedException() 2nd and next arguments to own methods in PHPUnit.
|
||||
@ -621,7 +573,6 @@ Takes setExpectedException() 2nd and next arguments to own methods in PHPUnit.
|
||||
+$this->expectExceptionCode("CODE");
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Dynamic\AnnotationReplacerRector
|
||||
|
||||
[Dynamic] Turns defined annotations above properties and methods to their new values.
|
||||
@ -629,10 +580,9 @@ Takes setExpectedException() 2nd and next arguments to own methods in PHPUnit.
|
||||
```diff
|
||||
-/** @test */
|
||||
+/** @scenario */
|
||||
public function someMethod() {};
|
||||
public function someMethod() {};
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Dynamic\NamespaceReplacerRector
|
||||
|
||||
[Dynamic] Replaces old namespace by new one.
|
||||
@ -642,7 +592,6 @@ Takes setExpectedException() 2nd and next arguments to own methods in PHPUnit.
|
||||
+$someObject = new SomeNewNamespace\SomeClass;
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Sensio\FrameworkExtraBundle\TemplateAnnotationRector
|
||||
|
||||
Turns @Template annotation to explicit method call in Controller of FrameworkExtraBundle in Symfony
|
||||
@ -653,7 +602,6 @@ Turns @Template annotation to explicit method call in Controller of FrameworkExt
|
||||
+ return $this->render("index.html.twig"); }
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Sylius\Review\ReplaceCreateMethodWithoutReviewerRector
|
||||
|
||||
Turns createForSubjectWithReviewer() with null review to standalone method in Sylius
|
||||
@ -663,7 +611,6 @@ Turns createForSubjectWithReviewer() with null review to standalone method in Sy
|
||||
+$this->createForSubject($subject)
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Dynamic\ReturnTypehintRector
|
||||
|
||||
[Dynamic] Changes defined return typehint of method and class.
|
||||
@ -676,7 +623,6 @@ class SomeClass
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Symfony\FrameworkBundle\ContainerGetToConstructorInjectionRector
|
||||
|
||||
Turns fetching of dependencies via $container->get() in ContainerAware to constructor injection in Command and Controller in Symfony
|
||||
@ -701,7 +647,6 @@ Turns fetching of dependencies via $container->get() in ContainerAware to constr
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Symfony\FrameworkBundle\GetParameterToConstructorInjectionRector
|
||||
|
||||
Turns fetching of parameters via getParmaeter() in ContainerAware to constructor injection in Command and Controller in Symfony
|
||||
@ -725,7 +670,6 @@ Turns fetching of parameters via getParmaeter() in ContainerAware to constructor
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Symfony\FrameworkBundle\GetToConstructorInjectionRector
|
||||
|
||||
Turns fetching of dependencies via $this->get() to constructor injection in Command and Controller in Symfony
|
||||
@ -748,7 +692,6 @@ Turns fetching of dependencies via $this->get() to constructor injection in Comm
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Symfony\Controller\RedirectToRouteRector
|
||||
|
||||
Turns redirect to route to short helper method in Controller in Symfony
|
||||
@ -758,7 +701,6 @@ Turns redirect to route to short helper method in Controller in Symfony
|
||||
+$this->redirectToRoute("homepage");
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Symfony\Controller\AddFlashRector
|
||||
|
||||
Turns long flash adding to short helper method in Controller in Symfony
|
||||
@ -768,7 +710,6 @@ Turns long flash adding to short helper method in Controller in Symfony
|
||||
+$this->addflash("success", "something");
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Symfony\HttpKernel\GetRequestRector
|
||||
|
||||
Turns fetching of dependencies via $this->get() to constructor injection in Command and Controller in Symfony
|
||||
@ -787,7 +728,6 @@ Turns fetching of dependencies via $this->get() to constructor injection in Comm
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Symfony\Form\FormTypeGetParentRector
|
||||
|
||||
Turns string Form Type references to their CONSTANT alternatives in getParent() and getExtendedType() methods in Form in Symfony
|
||||
@ -800,7 +740,6 @@ Turns string Form Type references to their CONSTANT alternatives in getParent()
|
||||
+function getExtendedType() { return CollectionType::class; }
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Symfony\Form\OptionNameRector
|
||||
|
||||
Turns old option names to new ones in FormTypes in Form in Symfony
|
||||
@ -810,7 +749,6 @@ Turns old option names to new ones in FormTypes in Form in Symfony
|
||||
+$builder->add("...", ["scale" => "...", "inherit_data" => "..."];
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Symfony\Console\ConsoleExceptionToErrorEventConstantRector
|
||||
|
||||
Turns old event name with EXCEPTION to ERROR constant in Console in Symfony
|
||||
@ -823,7 +761,6 @@ Turns old event name with EXCEPTION to ERROR constant in Console in Symfony
|
||||
+Symfony\Component\Console\ConsoleEvents::ERROR
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Symfony\Validator\ConstraintUrlOptionRector
|
||||
|
||||
Turns true value to Url::CHECK_DNS_TYPE_ANY in Validator in Symfony.
|
||||
@ -833,7 +770,6 @@ Turns true value to Url::CHECK_DNS_TYPE_ANY in Validator in Symfony.
|
||||
+$constraint = new Url(["checkDNS" => Url::CHECK_DNS_TYPE_ANY]);
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Symfony\Form\FormIsValidRector
|
||||
|
||||
Adds $form->isSubmitted() validatoin to all $form->isValid() calls in Form in Symfony
|
||||
@ -843,7 +779,6 @@ Adds $form->isSubmitted() validatoin to all $form->isValid() calls in Form in Sy
|
||||
+if ($form->isSubmitted() && $form->isValid()) { ... };
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Symfony\Form\StringFormTypeToClassRector
|
||||
|
||||
Turns string Form Type references to their CONSTANT alternatives in FormTypes in Form in Symfony
|
||||
@ -853,7 +788,6 @@ Turns string Form Type references to their CONSTANT alternatives in FormTypes in
|
||||
+$form->add("name", \Symfony\Component\Form\Extension\Core\Type\TextType::class);
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Symfony\VarDumper\VarDumperTestTraitMethodArgsRector
|
||||
|
||||
Adds new $format argument in VarDumperTestTrait->assertDumpEquals() in in Validator in Symfony.
|
||||
@ -866,7 +800,6 @@ Adds new $format argument in VarDumperTestTrait->assertDumpEquals() in in Valida
|
||||
+VarDumperTestTrait->assertDumpMatchesFormat($dump, $format, $context = null, $mesage = "");
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Symfony\DependencyInjection\ContainerBuilderCompileEnvArgumentRector
|
||||
|
||||
Turns old default value to parameter in ContinerBuilder->build() method in DI in Symfony
|
||||
@ -876,7 +809,6 @@ Turns old default value to parameter in ContinerBuilder->build() method in DI in
|
||||
+$containerBuilder = new Symfony\Component\DependencyInjection\ContainerBuilder(); $containerBuilder->compile(true);
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Symfony\Process\ProcessBuilderInstanceRector
|
||||
|
||||
Turns ProcessBuilder::instance() to new ProcessBuilder in Process in Symfony. Part of multi-step Rector.
|
||||
@ -886,7 +818,6 @@ Turns ProcessBuilder::instance() to new ProcessBuilder in Process in Symfony. Pa
|
||||
+$processBuilder = new Symfony\Component\Process\ProcessBuilder($args);
|
||||
```
|
||||
|
||||
|
||||
## Rector\Rector\Contrib\Symfony\Process\ProcessBuilderGetProcessRector
|
||||
|
||||
Removes $processBuilder->getProcess() calls to $processBuilder in Process in Symfony, because ProcessBuilder was removed. This is part of multi-step Rector and has very narrow focus.
|
||||
@ -899,4 +830,3 @@ $processBuilder = new Symfony\Component\Process\ProcessBuilder;
|
||||
+$commamdLine = $processBuilder->getCommandLine();
|
||||
```
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user