Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Drupal console changed the way commands work in the mean time.
This task is about using drupal console to create scaffolding for the existing commands and re-implement the logic.
Comment | File | Size | Author |
---|---|---|---|
#7 | config_split-fix_console-2830660-7.patch | 13.65 KB | kmajzlik |
|
Comments
Comment #3
bircherFirst WIP patch to get the commands working again.
Especially the translated messages are not working yet and we need to use the injected services.
Contributions welcome...
PS: For people preferring github: https://github.com/nuvoleweb/config_split/tree/2830660-console-command
But remember to comment here at least.
Comment #4
kmajzlik CreditAttribution: kmajzlik commentedI am getting
PHP Fatal error: Trait 'Drupal\Console\Command\Shared\ContainerAwareCommandTrait' not found in /var/www/modules/contrib/config_split/src/Command/ExportCommand.php on line 19
with console RC14
Comment #5
kmajzlik CreditAttribution: kmajzlik at Ciklum Western Europe commentedOk, this exactly can be fixed by:
But it starts producing
TypeError: Argument 3 passed to Drupal\Console\Command\Config\DeleteCommand::__construct() must be an instance of Drupal\Core\Config\FileStorage, instance of Drupal\config_split\Config\StorageWrapper given in /var/www/vendor/drupal/console/src/Command/Config/DeleteCommand.php on line 48
then i just tried
Sorry, I am OOP newbie and do not know if this is issue to Console or can be fixed in config_split code. I think it is in console - why use exactly FileStorage instead of any storage type.
And we also need to change:
Comment #6
kmajzlik CreditAttribution: kmajzlik at Ciklum Western Europe commentedThe problem about using fileStorage in Console is fixed in dev (and will be in RC15), thanks to @jmolivas.
I will re-roll above patch on monday (currently it works for me).
Comment #7
kmajzlik CreditAttribution: kmajzlik at Ciklum Western Europe commentedConsole RC15 released yesterday. With patch atteched now i have Console RC15 working. I can see there both commands for config_split. At this moment i do not know exactly if they work properly(not tested yet). Just tested that Console is not failing.
Comment #8
kmajzlik CreditAttribution: kmajzlik at Ciklum Western Europe commentedComposer:
Console:
Comment #9
kmajzlik CreditAttribution: kmajzlik at Ciklum Western Europe commentedComment #10
kmajzlik CreditAttribution: kmajzlik at Ciklum Western Europe commentedComment #11
kmajzlik CreditAttribution: kmajzlik at Ciklum Western Europe commentedAfter a week of working both with Drush and Console i do not see any difference with Console RC15 and patch from #7
@bircher - can be commited please?
Comment #13
bircherThanks karlos007
I was on vacations and didn't have time to review your patch before, I committed it now. Thanks for your contribution!