Given this input
<?php
use Symfony\Component\Validator\Constraints as Assert;
$constraint = new Assert\Blank();
Rector would apply this change
--- Original
+++ New
@@ -1,4 +1,5 @@
<?php
+use Symfony\Component\Validator\Constraints\Blank;
use Symfony\Component\Validator\Constraints as Assert;
-$constraint = new Assert\Blank();
+$constraint = new Blank();
How to prevent rector to refactor towards fully qualified imports?
We need failing test case for that here: https://github.com/rectorphp/rector/tree/c915743c3e3a4eb21dc33204a4c485b0afba36c9/rules/coding-style/tests/Rector/Namespace_/ImportFullyQualifiedNamesRector/Fixture
What can I do to help? Open a PR with the test case?
Yes :+1:
@TomasVotruba here we go: #3360