Skip to content

Issues when installing a composer-project from scratch #3

@deviationist

Description

@deviationist

Hello!
I really love this, great work! :)

I have an existing composer-based WP project, where i use composer to install WP and plugins. I really would like to implement composer-plugin-language-update into this project so we can easily manage translations with composer as well.

The project is already initialized – the vendor-folder is in place and so is the WP-folder along with all the plugin-folders.

Following your guide works perfect, but – since the packages are already installed or since there are no updates available at the moment – no languages are installed. So to install languages i need to reinstall WP and each plugin.

To avoid doing this manual process, i thought it would be better to trigger a complete re-install by:

  • deleting the plugins folder
  • deleting the WP folder
  • deleting the vendor folder
  • running composer install

When I then run composer install, the "post-package-install"-script runs. Not sure whats causing this, but since the autoload.php is still not generated i get an error which is printed under.
This is how my composer.json looks like: https://pastebin.com/tHhPMF7a

Output when running composer install:

composer install                                                                                                                                                  
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 10 installs, 0 updates, 0 removals
  - Installing composer/installers (v1.4.0): Loading from cache
Class AngryCreative\PostUpdateLanguageUpdate is not autoloadable, can not call post-package-install script
  - Installing johnpbloch/wordpress-core-installer (1.0.0): Loading from cache
Class AngryCreative\PostUpdateLanguageUpdate is not autoloadable, can not call post-package-install script
  - Installing wpackagist-plugin/wordpress-seo (6.0): Loading from cache
Class AngryCreative\PostUpdateLanguageUpdate is not autoloadable, can not call post-package-install script
  - Installing guzzlehttp/promises (v1.3.1): Loading from cache
Class AngryCreative\PostUpdateLanguageUpdate is not autoloadable, can not call post-package-install script
  - Installing psr/http-message (1.0.1): Loading from cache
Class AngryCreative\PostUpdateLanguageUpdate is not autoloadable, can not call post-package-install script
  - Installing guzzlehttp/psr7 (1.4.2): Loading from cache
Class AngryCreative\PostUpdateLanguageUpdate is not autoloadable, can not call post-package-install script
  - Installing guzzlehttp/guzzle (6.3.0): Loading from cache
Class AngryCreative\PostUpdateLanguageUpdate is not autoloadable, can not call post-package-install script
  - Installing angrycreative/composer-plugin-language-update (0.1.2): Cloning c50421a6dd from cache

Warning: Uncaught ErrorException: require(/Volumes/Webserver/sites/wp-site/app/public/vendor/autoload.php): failed to open stream: No such file or directory in /Volumes/Webserver/sites/wp-site/app/public/vendor/Angrycreative/composer-plugin-language-update/src/AngryCreative/PostUpdateLanguageUpdate.php:9
Stack trace:
#0 /Volumes/Webserver/sites/wp-site/app/public/vendor/Angrycreative/composer-plugin-language-update/src/AngryCreative/PostUpdateLanguageUpdate.php(9): Composer\Util\ErrorHandler::handle(2, 'require(/Volume...', '/Volumes/Webser...', 9, Array)
#1 /Volumes/Webserver/sites/wp-site/app/public/vendor/Angrycreative/composer-plugin-language-update/src/AngryCreative/PostUpdateLanguageUpdate.php(9): require()
#2 phar:///usr/local/bin/composer/vendor/composer/ClassLoader.php(444): include('/Volumes/Webser...')
#3 phar:///usr/local/bin/composer/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/Volumes/Webser...')
#4 [internal function]: Composer\Autoload\ClassLoader->loadClass('AngryCreative\\P.. in /Volumes/Webserver/sites/wp-site/app/public/vendor/Angrycreative/composer-plugin-language-update/src/AngryCreative/PostUpdateLanguageUpdate.php on line 9

Fatal error: main(): Failed opening required '/Volumes/Webserver/sites/wp-site/app/public/vendor/autoload.php' (include_path='.:') in /Volumes/Webserver/sites/wp-site/app/public/vendor/Angrycreative/composer-plugin-language-update/src/AngryCreative/PostUpdateLanguageUpdate.php on line 9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions