Problem/Motivation
Drush gesso "New theme" - Command Not working
Steps to reproduce
1. drush gesso "example_gesso"
Result:
Error: Class "Webmozart\PathUtil\Path" not found in Drupal\gesso_helper\Commands\GessoHelperCommands->gesso() (line 116 of /var/www/html/docroot/themes/contrib/gesso/gesso_helper/src/Commands/GessoHelperCommands.php).
116 line: $gesso_path = Path::join($drupalRoot, $this->themeHandler->getPath('gesso'));
Proposed resolution
Seems like "use Webmozart\PathUtil\Path;" is not used by Drush 12.5 anymore.
Remaining tasks
Propose: "use Symfony\Component\Filesystem\Path;"
User interface changes
API changes
Data model changes
Comments
Comment #2
aaron.ferris commentedSeems to have been replaced in Drush 11.3+ and is a direct drop in as per https://github.com/drush-ops/drush/issues/4935
We can of course replace, but we'd need to do something to make sure older versions of Drush don't start falling over. New release for Drush 11+ rather than a direct dependency?
Comment #4
aaron.ferris commentedComment #5
anudeep.tummala commentedI still see issues after replacing
"use Webmozart\PathUtil\Path;"
To
"use Symfony\Component\Filesystem\Path;"
during the test
I fixed the other issue with getTheme and pushed the commit.
Comment #6
aaron.ferris commentedComment #8
immaculatexavier commentedComment #9
jasonmce commentedThis fixes the gesso_path method chaining syntax that was throwing the error:
[error] Error: Class "Webmozart\PathUtil\Path" not found in Drupal\gesso_helper\Commands\GessoHelperCommands->gesso() (line 116 of /app/web/themes/contrib/gesso/gesso_helper/src/Commands/GessoHelperCommands.php) #0 [internal function]