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

Issue fork gesso-3447412

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

anudeep.tummala created an issue. See original summary.

aaron.ferris’s picture

Seems 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?

aaron.ferris’s picture

Status: Active » Needs review
anudeep.tummala’s picture

I 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.

aaron.ferris’s picture

Status: Needs review » Needs work

immaculatexavier made their first commit to this issue’s fork.

immaculatexavier’s picture

Status: Needs work » Needs review
jasonmce’s picture

Version: 5.3.2 » 5.x-dev
StatusFileSize
new2.11 KB
new711 bytes

This 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]