10up / wpsnapshots

(DEPRECATED) A project sharing tool for WordPress.
MIT License
216 stars 21 forks source link

Fails to push a snapshot of a codebase that contains the same AWS SDK #91

Open PypWalters opened 3 years ago

PypWalters commented 3 years ago

Describe the bug

If you try to push a snapshot of a theme that uses the same AWS SDK library, you get an error about duplicate functions and are unable to push a snapshot.

Cannot redeclare Aws\constantly() (previously declared in /opt/wpsnapshots/vendor/aws/aws-sdk-php/src/functions.php:19) in /var/www/html/wp-content/themes/{theme_name}/inc/s3/Aws/functions.php on line 22

Steps to Reproduce

  1. Create a theme locally that loads and uses the same AWS SDK.
  2. Push a snapshot (either database only, code only or code and database) and see the error output in the cli.

Expected behavior

WPSnapshots should run independently of the codebase being pushed.

Environment information

Additional context

PypWalters commented 1 year ago

Adding the following flags --skip-plugins or --skip-themes depending on where the AWS SDK is located may circumvent an AWS SDK conflict for anyone who runs into it.