我目前正在使用Wordpress,PHP和Docker。我正在尝试集成s3-uploads插件。 S3-uploads使用aws-sdk-php
,而另一个插入mu-plugins/send-me-nyc
也会使用docker-wp s3-uploads verif
,这会造成两者之间的冲突。
运行PHP Fatal error: Cannot redeclare Aws\manifest() (previously declared in /var/www/html/vendor/aws/aws-sdk-php/src/functions.php:342) in /var/www/html/wp-content/mu-plugins/send-me-nyc/third-party/AWS/Aws/functions.php on line 320
Fatal error: Cannot redeclare Aws\manifest() (previously declared in /var/www/html/vendor/aws/aws-sdk-php/src/functions.php:342) in /var/www/html/wp-content/mu-plugins/send-me-nyc/third-party/AWS/Aws/functions.php on line 320
时出现以下错误
Cannot redeclare Aws\manifest()
因此,如链接文章中所述,错误消息aws-sdk-php
可以通过使用!function_exist的解决方案来解决。但是,我认为这不是解决问题的正确方法,因为这将直接写在aws-sdk-php
的代码上。像Issue所示,{
"name": "aws/aws-sdk-php",
"homepage": "http://aws.amazon.com/sdkforphp",
"description": "AWS SDK for PHP - Use Amazon Web Services in your PHP project",
"keywords": ["aws","amazon","sdk","s3","ec2","dynamodb","cloud","glacier"],
"type": "library",
"license": "Apache-2.0",
"authors": [
{
"name": "Amazon Web Services",
"homepage": "http://aws.amazon.com"
}
],
"support": {
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
"issues": "https://github.com/aws/aws-sdk-php/issues"
},
"require": {
"php": ">=5.5",
"guzzlehttp/guzzle": "^5.3.3|^6.2.1",
"guzzlehttp/psr7": "^1.4.1",
"guzzlehttp/promises": "~1.0",
"mtdowling/jmespath.php": "~2.2",
"ext-pcre": "*",
"ext-json": "*",
"ext-simplexml": "*"
},
的管理员拒绝了这样的补丁。
我该如何解决这个问题?
aws-sdk-php / composer.json:
require()