TwigBridge
TwigBridge copied to clipboard
Quick'n'Dirty fix for command reflection exceptions after upgrading to 5.5-dev branch of Laravel
I just noticed that the package breaks with 5.5-dev because the fire method was changed into handle. (see https://laravel.com/docs/master/upgrade)
[ReflectionException]
Method TwigBridge\Command\TwigBridge::handle() does not exist
I'am not a hardcore Laravel developer, but adding this to the 3 commands (TwigBridge,Clean and Lint) fixed my reflection errors after I upgraded from 5.4 -> 5.5 issue.
Guess this way the same package can be used by 5.4 and 5.5.
public function handle() {
return $this->fire();
}
Can you make a PR to rename to fire?
Really? A PR for a change that can be done using the github editor?
To be honest, it would take me more time to clone, setup local git, change code, push it and make a pull request than it would take somebody with write access on this repo to open the 3 files and change the name of the method ;)
You can make the edits through the github editor also. Just edit the file and choose to fork it. Then go to your repo to the patch-x branch, edit the other files and click the PR button.
Come to think of it, renaming the methods would cause more damage then adding the above code since renaming would render the bridge useless for projects that can't make the move to 5.5.
I think older versions support both names.
This commit to Laravel is the first instance of both fire
and handle
being acceptable: https://github.com/laravel/framework/commit/970836c5368642d975c56aa71f8aecafddcd3fd8#diff-2aaa23817a4aeafde63888bd631364e7
This change seems to have been applicable since Laravel 5.0.0 (up until the current version of Laravel, 5.5 of course).
With this, would it be best to just go with the pull request garret-gunter pushed, or change the method names from fire
to handle
?
Hi, can you fix(rename fire->handle) it and release new version ?
for twig:lint and twig:clean
Method TwigBridge\Command\Lint::handle() does not exist
now it;s not possible to use TwigBridge package in newest Laravel 5.5 because alias handle>fire disappeared.
Thx
Hi
I have the same issue. Laravel 5.5 doesn't support the fire()
method. Please, fix it