mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 19:53:14 +01:00
DynamicRector tests: add arguments
This commit is contained in:
parent
5ecd2e4d5c
commit
53e3e68231
@ -1,4 +1,6 @@
|
||||
services:
|
||||
Rector\Rector\Dynamic\AnnotationReplacerRector:
|
||||
PHPUnit\Framework\TestCase:
|
||||
scenario: test
|
||||
arguments:
|
||||
$classToAnnotationMap:
|
||||
PHPUnit\Framework\TestCase:
|
||||
scenario: test
|
||||
|
@ -1,33 +1,34 @@
|
||||
services:
|
||||
Rector\Rector\Dynamic\ArgumentReplacerRector:
|
||||
# added default value
|
||||
-
|
||||
class: 'Symfony\Component\DependencyInjection\ContainerBuilder'
|
||||
method: 'compile'
|
||||
type: 'changed'
|
||||
position: 0
|
||||
default_value: false
|
||||
$argumentChangesByMethodAndType:
|
||||
# added default value
|
||||
-
|
||||
class: 'Symfony\Component\DependencyInjection\ContainerBuilder'
|
||||
method: 'compile'
|
||||
type: 'changed'
|
||||
position: 0
|
||||
default_value: false
|
||||
|
||||
# added default value
|
||||
-
|
||||
class: 'Symfony\Component\DependencyInjection\ContainerBuilder'
|
||||
method: 'addCompilerPass'
|
||||
type: 'changed'
|
||||
position: 2
|
||||
default_value: 0
|
||||
# added default value
|
||||
-
|
||||
class: 'Symfony\Component\DependencyInjection\ContainerBuilder'
|
||||
method: 'addCompilerPass'
|
||||
type: 'changed'
|
||||
position: 2
|
||||
default_value: 0
|
||||
|
||||
# remove argument
|
||||
-
|
||||
class: 'Doctrine\ORM\Persisters\Entity\AbstractEntityInheritancePersister'
|
||||
method: 'getSelectJoinColumnSQL'
|
||||
position: 4
|
||||
type: 'removed'
|
||||
# remove argument
|
||||
-
|
||||
class: 'Doctrine\ORM\Persisters\Entity\AbstractEntityInheritancePersister'
|
||||
method: 'getSelectJoinColumnSQL'
|
||||
position: 4
|
||||
type: 'removed'
|
||||
|
||||
# replace default value
|
||||
-
|
||||
class: 'Symfony\Component\DependencyInjection\Definition'
|
||||
method: 'setScope'
|
||||
position: 0
|
||||
type: 'replace_default_value'
|
||||
replace_map:
|
||||
'Symfony\Component\DependencyInjection\ContainerBuilder::SCOPE_PROTOTYPE': false
|
||||
# replace default value
|
||||
-
|
||||
class: 'Symfony\Component\DependencyInjection\Definition'
|
||||
method: 'setScope'
|
||||
position: 0
|
||||
type: 'replace_default_value'
|
||||
replace_map:
|
||||
'Symfony\Component\DependencyInjection\ContainerBuilder::SCOPE_PROTOTYPE': false
|
||||
|
@ -1,6 +1,7 @@
|
||||
services:
|
||||
Rector\Rector\Dynamic\ClassConstantReplacerRector:
|
||||
'Symfony\Component\Form\FormEvents':
|
||||
'PRE_BIND': 'PRE_SUBMIT'
|
||||
'BIND': 'SUBMIT'
|
||||
'POST_BIND': 'POST_SUBMIT'
|
||||
$oldToNewConstantsByClass:
|
||||
'Symfony\Component\Form\FormEvents':
|
||||
'PRE_BIND': 'PRE_SUBMIT'
|
||||
'BIND': 'SUBMIT'
|
||||
'POST_BIND': 'POST_SUBMIT'
|
||||
|
@ -1,5 +1,6 @@
|
||||
services:
|
||||
Rector\Rector\Dynamic\ClassReplacerRector:
|
||||
OldClass: NewClass
|
||||
'PhpParser\BuilderAbstract': 'PhpParser\Builder'
|
||||
'Twig_Extension': 'Twig\Extension\AbstractExtension'
|
||||
$oldToNewClasses:
|
||||
OldClass: NewClass
|
||||
'PhpParser\BuilderAbstract': 'PhpParser\Builder'
|
||||
'Twig_Extension': 'Twig\Extension\AbstractExtension'
|
||||
|
@ -1,8 +1,9 @@
|
||||
services:
|
||||
Rector\Rector\Dynamic\MethodNameReplacerRector:
|
||||
'Symfony\Component\Form\AbstractType':
|
||||
'setDefaultOptions': 'configureOptions'
|
||||
'Nette\Utils\Html':
|
||||
'add': 'addHtml'
|
||||
'Nette\Bridges\FormsLatte\FormMacros':
|
||||
'renderFormBegin': ['Nette\Bridges\FormsLatte\Runtime', 'renderFormBegin']
|
||||
$perClassOldToNewMethods:
|
||||
'Symfony\Component\Form\AbstractType':
|
||||
'setDefaultOptions': 'configureOptions'
|
||||
'Nette\Utils\Html':
|
||||
'add': 'addHtml'
|
||||
'Nette\Bridges\FormsLatte\FormMacros':
|
||||
'renderFormBegin': ['Nette\Bridges\FormsLatte\Runtime', 'renderFormBegin']
|
||||
|
@ -1,6 +1,7 @@
|
||||
services:
|
||||
Rector\Rector\Dynamic\NamespaceReplacerRector:
|
||||
'OldNamespace': 'NewNamespace'
|
||||
'OldNamespaceWith\OldSplitNamespace': 'NewNamespaceWith\NewSplitNamespace'
|
||||
'Old\Long\AnyNamespace': 'Short\AnyNamespace'
|
||||
'PHPUnit_Framework_': 'PHPUnit\Framework\'
|
||||
$oldToNewNamespaces:
|
||||
'OldNamespace': 'NewNamespace'
|
||||
'OldNamespaceWith\OldSplitNamespace': 'NewNamespaceWith\NewSplitNamespace'
|
||||
'Old\Long\AnyNamespace': 'Short\AnyNamespace'
|
||||
'PHPUnit_Framework_': 'PHPUnit\Framework\'
|
||||
|
@ -1,8 +1,9 @@
|
||||
services:
|
||||
Rector\Rector\Dynamic\ParentTypehintedArgumentRector:
|
||||
'PhpParser\Parser':
|
||||
'parse':
|
||||
'code': 'string'
|
||||
'Doctrine\ORM\Mapping\ClassMetadataFactory':
|
||||
'setEntityManager':
|
||||
'em': 'Doctrine\ORM\EntityManagerInterface'
|
||||
$typehintForArgumentByMethodAndClass:
|
||||
'PhpParser\Parser':
|
||||
'parse':
|
||||
'code': 'string'
|
||||
'Doctrine\ORM\Mapping\ClassMetadataFactory':
|
||||
'setEntityManager':
|
||||
'em': 'Doctrine\ORM\EntityManagerInterface'
|
||||
|
@ -1,4 +1,5 @@
|
||||
services:
|
||||
Rector\Rector\Dynamic\PropertyNameReplacerRector:
|
||||
'SomeClass':
|
||||
'oldProperty': 'newProperty'
|
||||
$perClassOldToNewProperties:
|
||||
'SomeClass':
|
||||
'oldProperty': 'newProperty'
|
||||
|
@ -1,6 +1,7 @@
|
||||
services:
|
||||
Rector\Rector\Dynamic\PropertyToMethodRector:
|
||||
'Translator':
|
||||
'locale':
|
||||
'get': 'getLocale'
|
||||
'set': 'setLocale'
|
||||
$perClassOldToNewProperties:
|
||||
'Translator':
|
||||
'locale':
|
||||
'get': 'getLocale'
|
||||
'set': 'setLocale'
|
||||
|
@ -1,5 +1,6 @@
|
||||
services:
|
||||
Rector\Rector\Dynamic\PseudoNamespaceToNamespaceRector:
|
||||
- 'PHPUnit_'
|
||||
# exclude this class
|
||||
- '!PHPUnit_Framework_MockObject_MockObject'
|
||||
$configuration:
|
||||
- 'PHPUnit_'
|
||||
# exclude this class
|
||||
- '!PHPUnit_Framework_MockObject_MockObject'
|
||||
|
@ -1,3 +1,4 @@
|
||||
services:
|
||||
Rector\Rector\Dynamic\ValueObjectRemoverRector:
|
||||
'SomeNamespace\SomeValueObject': 'string'
|
||||
$valueObjectsToSimpleTypes:
|
||||
'SomeNamespace\SomeValueObject': 'string'
|
||||
|
Loading…
x
Reference in New Issue
Block a user