PhilippHeuer / wordpress-heroku

This project is a template for installing and running WordPress 5.x on Heroku.
MIT License
273 stars 316 forks source link

dependency johnpbloch/wordpress moved to a new configuration causing issues #6

Closed simonghales closed 7 years ago

simonghales commented 7 years ago

Description of your issue

When following along with the custom deployment steps everything works fine, the site deploys to Heroku with no issues. However upon updating WordPress' version, or simply installing a new plugin, the site will to fail to deploy. The issue arises once you have to update your composer.json / composer.lock files.

From my investigation this is due to changes made to the johnpbloch/wordpress dependency, which you can also read about here: https://discourse.roots.io/t/johnpbloch-wordpress-moved-to-a-new-configuration-and-wp-goes-missing/9124

I've followed along with the recommendation made in the thread to

However I am seeing this error in Heroku's logs:

2017-06-03T16:26:04.495459+00:00 app[web.1]: [03-Jun-2017 16:26:04 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function WP_CLI\Dispatcher\get_path() in /app/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php:49
2017-06-03T16:26:04.495475+00:00 app[web.1]: Stack trace:
2017-06-03T16:26:04.495584+00:00 app[web.1]: #0 /app/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CompositeCommand.php(37): WP_CLI\Runner->register_early_invoke('before_wp_load', Object(WP_CLI\Dispatcher\Subcommand))
2017-06-03T16:26:04.495723+00:00 app[web.1]: #1 /app/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php(20): WP_CLI\Dispatcher\CompositeCommand->__construct(Object(WP_CLI\Dispatcher\RootCommand), 'server', Object(WP_CLI\DocParser))
2017-06-03T16:26:04.495842+00:00 app[web.1]: #2 /app/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(73): WP_CLI\Dispatcher\Subcommand->__construct(Object(WP_CLI\Dispatcher\RootCommand), 'server', Object(WP_CLI\DocParser), Object(Closure))
2017-06-03T16:26:04.495950+00:00 app[web.1]: #3 /app/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(34): WP_CLI\Dispatcher\CommandFactory::create_subcommand(Object(WP_CLI\Dispatcher\RootCommand), 'server', Array, Object(ReflectionMethod))
2017-06-03T16:26:04.496047+00:00 app[web.1]: #4 /app/vendor/wp-cli/wp-cli/php/class-wp-cli.php(466): WP_CLI\Dispatcher\CommandFactory::create('serve in /app/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php on line 49

Steps to Reproduce

Other Information

Git Commit/Version: Running off of the latest which at this time is: https://github.com/PhilippHeuer/wordpress-heroku/commit/e8ed1d355397f57b55fe4cf90ed94f56d4e9e332

Thanks for putting this template together, I'm looking forward to getting everything work.

PhilippHeuer commented 7 years ago

Hey, thanks for your report.

I could reproduce your error, i didn't specifiy the exact version in the dependencies - so it updated WP CLI from 1.1.0 to 1.2.0 which broke it. I still need to look at what changed to get it working with the new version, but for now i set the dependency version to 1.1.0 so that it works again.

I specified exact versions for all dependencies to prevent sth. like this from happening again.

simonghales commented 7 years ago

Sweet, thanks mate.