Skip to content

Commit

Permalink
Merge pull request #17 from nielsdraaisma/master
Browse files Browse the repository at this point in the history
Fixed Aws\Constantly error
  • Loading branch information
naderman authored Aug 7, 2019
2 parents db17f3a + fdab1d3 commit 604ed80
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Naderman/Composer/AWS/AwsClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,14 @@ public function s3factory(Config $config)
$s3config['profile'] = getenv('AWS_DEFAULT_PROFILE');
}

if (!function_exists('AWS\manifest')) {
$static_include_path = __DIR__ . '/../../../../../../composer/autoload_static.php';
if ( file_exists( $static_include_path)){
// This file has to be loaded with the exact same name as in the composer static autoloader to avoid
// including it twice, which leads to functions in the AWS Namespace to be declared twice.
$static_include_path = realpath($static_include_path);
$static_include_path = dirname($static_include_path);
require_once $static_include_path . '/../aws/aws-sdk-php/src/functions.php';
} else if (!function_exists('AWS\manifest')) {
require_once __DIR__ . '/../../../../../../aws/aws-sdk-php/src/functions.php';
}

Expand Down

0 comments on commit 604ed80

Please sign in to comment.