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
Upgraded consolidation/annotated-command to a version >= 4.5.7 (4.6.0, in my case).
Run vendor/bin/robo list
I've tracked down the issue to this commit from this list of commits. I can see it skip over the command in my debugger because the class of the initially loaded robo file does not match the extended one.
I believe it boils down to the way I've structured the RoboFile, which may be an anti-pattern, and I'm open to any suggestions.
In the RoboFile, I extend another RoboFile. The original RoboFile is used to to override methods from the extended file. This wasn't done so much to completely replace a command but instead override the helper functions that were not commands but had full access to robo.
RoboFile.php
require_once 'RoboFileSite.php';
class RoboFile extends \RoboFileSite
{
}
RoboFileSite.php
class RoboFileSite
{
function hello(\Robo\Symfony\ConsoleIO $io, array $world)
{
$io->say("Hello, " . implode(', ', $world));
}
}
Expected behavior
The 'hello' command is listed.
Actual behavior
The 'hello' command is not listed.
System Configuration
Linux PHP 8.1 wodby/php:8.1-dev-4.32.7
The text was updated successfully, but these errors were encountered:
See consolidation/annotated-command#277; this should be resolved on the next release of consolidation/annotated-command. As a workaround, pin to an older release.
Steps to reproduce
I've tracked down the issue to this commit from this list of commits. I can see it skip over the command in my debugger because the class of the initially loaded robo file does not match the extended one.
I believe it boils down to the way I've structured the RoboFile, which may be an anti-pattern, and I'm open to any suggestions.
In the RoboFile, I extend another RoboFile. The original RoboFile is used to to override methods from the extended file. This wasn't done so much to completely replace a command but instead override the helper functions that were not commands but had full access to robo.
RoboFile.php
RoboFileSite.php
Expected behavior
The 'hello' command is listed.
Actual behavior
The 'hello' command is not listed.
System Configuration
Linux PHP 8.1 wodby/php:8.1-dev-4.32.7
The text was updated successfully, but these errors were encountered: