You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 12, 2020. It is now read-only.
I get this error when I tried to fix class names on SyliusPaymentsBundle:
git clone [email protected]:Sylius/SyliusPaymentsBundle.git
cd SyliusPaymentсBundle
refactor.phar fix-class-names .
[RuntimeException]
Adding more than one operation to line 21 is not allowed.
Exception trace:
() at phar:///usr/local/bin/refactor.phar/src/main/QafooLabs/Patches/PatchBuilder.php:165
QafooLabs\Patches\PatchBuilder->assertValidOriginalLine() at phar:///usr/local/bin/refactor.phar/src/main/QafooLabs/Patches/PatchBuilder.php:72
QafooLabs\Patches\PatchBuilder->changeToken() at phar:///usr/local/bin/refactor.phar/src/main/QafooLabs/Refactoring/Adapters/Patches/PatchBuffer.php:45
QafooLabs\Refactoring\Adapters\Patches\PatchBuffer->replaceString() at phar:///usr/local/bin/refactor.phar/src/main/QafooLabs/Refactoring/Application/FixClassNames.php:84
QafooLabs\Refactoring\Application\FixClassNames->refactor() at phar:///usr/local/bin/refactor.phar/src/main/QafooLabs/Refactoring/Adapters/Symfony/Commands/FixClassNamesCommand.php:70
QafooLabs\Refactoring\Adapters\Symfony\Commands\FixClassNamesCommand->execute() at phar:///usr/local/bin/refactor.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:244
Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/refactor.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:899
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/refactor.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:191
Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/refactor.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:121
Symfony\Component\Console\Application->run() at phar:///usr/local/bin/refactor.phar/src/bin/refactor:10
require() at /usr/local/bin/refactor.phar:5
fix-class-names dir
The text was updated successfully, but these errors were encountered:
@umpirsky the replaceString call needs to accept an array of changes and perform them together (a new method actually). Building patches can always only change one line. But in your case it wants to change the same line multiple times.
@umpirsky I just realized, this will not work on bundles, because by using 'target-dir' - they are normally not PSR-0 in their github repository structure.
I did fix a bunch of bugs with the renaming and for a repository with PSR-0 directory structures, it should work much better now. I havened fixed the not allowing 2 changes to one line though, this might be a bit more tricky.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I get this error when I tried to fix class names on SyliusPaymentsBundle:
The text was updated successfully, but these errors were encountered: