Bug Report
| Subject |
Details |
| Rector version |
v0.7.2 |
| Installed as |
prefixed Rector PHAR |
In #2883 we added a rector to replace some deprecated classes with a namespaced one. It works if I install rector directly, but it adds the HumbugBox-prefix to the namespace when I use the prefixed-version of rector.
Minimal PHP Code Causing Issue
Since the set is not available on https://getrector.org/demo/ yet, I added a small repo, to reproduce the issue, check this out: https://github.com/alfredbez/rector-issue
After running composer install you can run the set like:
vendor/bin/rector process src --set oxid60 --dry-run
Actual Output

or as text:
$ vendor/bin/rector process src --set oxid60 --dry-run
Rector v0.7.2
3/3 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
1 file with changes
===================
1) src/Core/Foo.php
---------- begin diff ----------
--- Original
+++ New
@@ -6,6 +6,6 @@
{
public function makeSomethingWithCategories()
{
- $category = oxNew('oxcategory');
+ $category = oxNew(\_HumbugBoxaf3b4563b2b8\OxidEsales\Eshop\Application\Model\Category::class);
}
}
----------- end diff -----------
Applied rules:
* Rector\Oxid\Rector\FuncCall\OxidReplaceBackwardsCompatabilityClassRector
[OK] Rector is done! 1 file would have changed (dry-run).
Expected Behaviour
I didn't expect to see the prefix \_HumbugBoxaf3b4563b2b8 in front of \OxidEsales\Eshop\Application\Model\Category.
I'm not sure if this is related only to this Rector.
Bug Report
In #2883 we added a rector to replace some deprecated classes with a namespaced one. It works if I install rector directly, but it adds the
HumbugBox-prefix to the namespace when I use the prefixed-version of rector.Minimal PHP Code Causing Issue
Since the set is not available on https://getrector.org/demo/ yet, I added a small repo, to reproduce the issue, check this out: https://github.com/alfredbez/rector-issue
After running
composer installyou can run the set like:Actual Output
or as text:
Expected Behaviour
I didn't expect to see the prefix
\_HumbugBoxaf3b4563b2b8in front of\OxidEsales\Eshop\Application\Model\Category.I'm not sure if this is related only to this Rector.