Last active
February 2, 2022 18:35
-
-
Save eerison/128df4abfc94a45a812a056f877e9405 to your computer and use it in GitHub Desktop.
This rule help you to remove the deprecated core bundle from sonata admin project.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$parameters = $containerConfigurator->parameters(); | |
$parameters->set(Option::SKIP, [ | |
StringClassNameToClassConstantRector::class => [ | |
__DIR__ . '/rector.php', | |
], | |
]); | |
// it need to be used with rector php: https://github.com/rectorphp/rector | |
$services = $containerConfigurator->services(); | |
$services->set(RenameNamespaceRector::class) | |
->configure([ | |
'Sonata\CoreBundle\Model\ManagerInterface' => 'Sonata\Doctrine\Model\ManagerInterface', | |
'Sonata\CoreBundle\Form\Type\CollectionType' => 'Sonata\Form\Type\CollectionType', | |
'Sonata\CoreBundle' => '\Please\Do\Not\Use\Things\From\SonataCoreBundle', | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment