Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninstalling this package throws an exception #2

Closed
rbayliss opened this issue Feb 17, 2017 · 12 comments
Closed

Uninstalling this package throws an exception #2

rbayliss opened this issue Feb 17, 2017 · 12 comments

Comments

@rbayliss
Copy link
Contributor

Steps to reproduce

Using the following minimal composer.json, run composer install followed by composer install --no-dev. Observe a fatal error: The "" directory does not exist is thrown during uninstallation.

Suggested Resolution

As a temporary fix, exit Drupal\Console\Composer\Plugin\Extender::processPackages() immediately if $directory doesn't exist. As a permanent fix, use the PackageEvent to determine the paths to vendor and the package root instead of hard-coding them.

@rbayliss
Copy link
Contributor Author

Err, and the composer.json:

{
    "name": "rbayliss/console-extend-plugin-error-demo",
    "type": "project",
    "minimum-stability": "dev",
    "prefer-stable": true,
    "require-dev": {
        "drupal/console": "^1.0.0-rc16"
    },
    "require": {}
}

@rbayliss
Copy link
Contributor Author

For anybody affected by this, I've rolled the temporary fix in a fork. You can use it by adding the following to the "repositories" in composer.json:

{
    "type": "vcs",
    "url": "https://github.com/rbayliss/drupal-console-extend-plugin.git"
}

And the following to your require-dev:

"drupal/console-extend-plugin": "dev-temp_fix_uninstall_error as 0.4.1",

I'll be submitting the permanent fix as a PR shortly.

@grasmash
Copy link

grasmash commented Apr 5, 2017

I'm hitting this issue pretty frequently.

@jmolivas
Copy link
Member

jmolivas commented May 2, 2017

PR #3 merged and new released tagged 0.5.0 @rbayliss does this fix the issue?

@thom8
Copy link

thom8 commented May 2, 2017

@jmolivas I think this might have broken https://github.com/drupal-composer/drupal-project

After a clean install I'm getting

ubuntu@box1107:~/drupal-project$ composer validate
PHP Warning:  Uncaught ErrorException: require_once(ExtenderManager.php): failed to open stream: No such file or directory in phar:///usr/local/bin/composer/src/Composer/Plugin/PluginManager.php(195) : eval()'d code:16
Stack trace:
#0 phar:///usr/local/bin/composer/src/Composer/Plugin/PluginManager.php(195) : eval()'d code(16): Composer\Util\ErrorHandler::handle(2, 'require_once(Ex...', 'phar:///usr/loc...', 16, Array)
#1 phar:///usr/local/bin/composer/src/Composer/Plugin/PluginManager.php(195) : eval()'d code(16): require_once()
#2 phar:///usr/local/bin/composer/src/Composer/Plugin/PluginManager.php(195): eval()
#3 phar:///usr/local/bin/composer/src/Composer/Plugin/PluginManager.php(261): Composer\Plugin\PluginManager->registerPackage(Object(Composer\Package\CompletePackage))
#4 phar:///usr/local/bin/composer/src/Composer/Plugin/PluginManager.php(76): Composer\Plugin\PluginManager->loadRepository(Object(Composer\Repository\InstalledFilesystemRepository))
#5 phar:///usr/local/bin/composer/src/Composer/Factory.php(377): Com in phar:///usr/local/bin/composer/src/Composer/Plugin/PluginManager.php(195) : eval()'d code on line 16

@thom8
Copy link

thom8 commented May 2, 2017

Here's a example CI build -- https://circleci.com/gh/thom8/drupal-project/18

just trying to revert to 0.4.0 and run a test

@thom8
Copy link

thom8 commented May 2, 2017

Yeah fixed by reverting to 0.4.0 -- https://circleci.com/gh/thom8/drupal-project/20

@webflo
Copy link
Contributor

webflo commented May 2, 2017

@thom8 Please review #8 Thanks!

@jmolivas
Copy link
Member

jmolivas commented May 2, 2017

@webflo
Copy link
Contributor

webflo commented May 2, 2017

Thanks 👍

@thom8
Copy link

thom8 commented May 2, 2017

And builds are working, thanks @jmolivas

@jmolivas
Copy link
Member

jmolivas commented May 2, 2017

Closing this one. Feel free to re-open if still happening after updating to the latest version.

Nice work all. I just marge the PR and tag a new release ;)

@jmolivas jmolivas closed this as completed May 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants