silverstripe / silverstripe-upgrader

A tool to help upgrade your code to handle API changes in packages you used.
BSD 3-Clause "New" or "Revised" License
39 stars 20 forks source link

RebuildDev class not found #164

Closed chtombleson closed 5 years ago

chtombleson commented 5 years ago

This pull request: https://github.com/silverstripe/silverstripe-upgrader/pull/159 adds RebuildDev, this class is not in the code base.

Running an upgrade-code all --namespace="App\\Bob" --psr4 gives the following error:

PHP Fatal error:  Uncaught Error: Class 'SilverStripe\Upgrader\Composer\Rules\RebuildDev' not found in /home/chris/.config/composer/vendor/silverstripe/upgrader/src/Console/RecomposeCommand.php:167
Stack trace:
#0 /home/chris/.config/composer/vendor/symfony/console/Command/Command.php(255): SilverStripe\Upgrader\Console\RecomposeCommand->execute(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /home/chris/.config/composer/vendor/silverstripe/upgrader/src/Console/AutomatedCommandTrait.php(51): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /home/chris/.config/composer/vendor/silverstripe/upgrader/src/Util/CommandRunner.php(50): SilverStripe\Upgrader\Console\RecomposeCommand->automatedRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /home/chris/.config/composer/vendor/silverstripe/upgrader/src/Console/AllInOneCommand.php(140): SilverStrip in /home/chris/.config/composer/vendor/silverstripe/upgrader/src/Console/RecomposeCommand.php on line 167

Pull request

kinglozzer commented 5 years ago

~Looks like a regression from https://github.com/silverstripe/silverstripe-upgrader/commit/c4c62bbc038ae2ff5b584d6fb9c77c0a1ca3e216~ - you’ve already pointed that out, sorry 🤦‍♂️

kinglozzer commented 5 years ago

cc @maxime-rainville

maxime-rainville commented 5 years ago

:scream: Did an emergency fix here to unstuck people https://github.com/silverstripe/silverstripe-upgrader/pull/167

Looks like I must have forgotten to do a git add before my commit and somehow it managed to get through peer review.

I'll need to do a follow up PR to rewrite that RebuildDev class. I don't think I still have a copy around.

I'll add some quick smoke test that actually tries to call the upgrader to make sure basic stuff actually works.

maxime-rainville commented 5 years ago

Release 1.4.1 is out

robbieaverill commented 5 years ago

I think the 1.4.1 releases fixes this critical bug, so I'm going to close it. The follow up can be treated separately, or we can reopen this issue and lower the triage level

maxime-rainville commented 5 years ago

We still need to re-implement the missing class.

chillu commented 5 years ago

Don't forget to create an upgrader release after this is merged