From 9d8f9cdf79a217842076361dfd44f3539a654521 Mon Sep 17 00:00:00 2001 From: Jeremy Lindblom Date: Thu, 16 Jan 2014 17:47:40 -0800 Subject: [PATCH 001/100] Added a docblock to the facade to make the Aws::get method work better in IDEs. --- src/Aws/Laravel/AwsFacade.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Aws/Laravel/AwsFacade.php b/src/Aws/Laravel/AwsFacade.php index cf05f7d..4f68da8 100644 --- a/src/Aws/Laravel/AwsFacade.php +++ b/src/Aws/Laravel/AwsFacade.php @@ -16,10 +16,13 @@ namespace Aws\Laravel; +use Aws\Common\Client\AwsClientInterface; use Illuminate\Support\Facades\Facade; /** * Facade for the AWS service + * + * @method static AwsClientInterface get($name, $throwAway = false) Get a client from the service builder */ class AwsFacade extends Facade { From 36c452e3d61163f58ad7d7ca709074cd640a8c52 Mon Sep 17 00:00:00 2001 From: Jeremy Lindblom Date: Mon, 12 May 2014 16:31:32 -0700 Subject: [PATCH 002/100] Update config.php to work with env credentials. --- src/config/config.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/config/config.php b/src/config/config.php index 2d89954..ab9cfd6 100644 --- a/src/config/config.php +++ b/src/config/config.php @@ -22,17 +22,16 @@ |-------------------------------------------------------------------------- | | In order to communicate with an AWS service, you must provide your AWS - | credentials including your AWS Access Key ID and your AWS Secret Key. You - | can obtain these keys by logging into your AWS account and visiting - | https://console.aws.amazon.com/iam/home?#security_credential. + | credentials including your AWS Access Key ID and your AWS Secret Key. | - | To use credentials from your environment or to use IAM Instance Profile - | credentials, please remove these config settings from your config. For - | more information see http://docs.aws.amazon.com/aws-sdk-php-2/guide/latest/configuration.html + | To use credentials from your credentials file or environment or to use + | IAM Instance Profile credentials, please remove these config settings from + | your config or make sure they are null. For more information see: + | http://docs.aws.amazon.com/aws-sdk-php-2/guide/latest/configuration.html | */ - 'key' => 'YOUR_AWS_ACCESS_KEY_ID', - 'secret' => 'YOUR_AWS_SECRET_KEY', + 'key' => null, // Your AWS Access Key ID + 'secret' => null, // Your AWS Secret Access Key /* |-------------------------------------------------------------------------- From 5047f264b381f5f37431981b2c66428c96bcaa58 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Thu, 24 Jul 2014 09:20:50 +0100 Subject: [PATCH 003/100] Fixed Links --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 223addd..a92d5c6 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Latest Stable Version](https://poser.pugx.org/aws/aws-sdk-php-laravel/v/stable.png)](https://packagist.org/packages/aws/aws-sdk-php-laravel) [![Total Downloads](https://poser.pugx.org/aws/aws-sdk-php-laravel/downloads.png)](https://packagist.org/packages/aws/aws-sdk-php-laravel) -A simple [Laravel 4](http://four.laravel.com/) service provider for including the [AWS SDK for PHP](https://github.com/aws/aws-sdk-php). +A simple [Laravel 4](http://laravel.com/) service provider for including the [AWS SDK for PHP](https://github.com/aws/aws-sdk-php). ## Installation @@ -65,7 +65,7 @@ Find the `aliases` key in your `app/config/app.php` and add the AWS facade alias ## Usage In order to use the AWS SDK for PHP within your app, you need to retrieve it from the [Laravel IoC -Container](http://four.laravel.com/docs/ioc). The following example uses the Amazon S3 client to upload a file. +Container](http://laravel.com/docs/ioc). The following example uses the Amazon S3 client to upload a file. ```php $s3 = App::make('aws')->get('s3'); @@ -90,8 +90,8 @@ $s3->putObject(array( ## Links -* [AWS SDK for PHP on Github](http://github.com/aws/aws-sdk-php) +* [AWS SDK for PHP on Github](http://github.com/aws/aws-sdk-php/) * [AWS SDK for PHP website](http://aws.amazon.com/sdkforphp/) -* [AWS on Packagist](https://packagist.org/packages/aws) +* [AWS on Packagist](https://packagist.org/packages/aws/) * [License](http://aws.amazon.com/apache2.0/) -* [Laravel website](http://laravel.com) +* [Laravel website](http://laravel.com/) From d150ee7d04d3b6132783be868a7148205e48c8cc Mon Sep 17 00:00:00 2001 From: mattzuba Date: Fri, 23 Jan 2015 12:25:27 -0700 Subject: [PATCH 004/100] Allow loading of SDK via Dependency Injection (using Aws\Common\Aws typehint) --- src/Aws/Laravel/AwsServiceProvider.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Aws/Laravel/AwsServiceProvider.php b/src/Aws/Laravel/AwsServiceProvider.php index d848114..84779d1 100644 --- a/src/Aws/Laravel/AwsServiceProvider.php +++ b/src/Aws/Laravel/AwsServiceProvider.php @@ -59,6 +59,8 @@ public function register() return $aws; }); + + $this->app->alias('aws', 'Aws\Common\Aws'); } /** From 79c87cc88e33c8a1e07cb9997219a3e5c95b38a5 Mon Sep 17 00:00:00 2001 From: Tom Schlick Date: Tue, 10 Feb 2015 21:57:43 -0500 Subject: [PATCH 005/100] making the service provider Laravel 5 compatible --- README.md | 22 +++++--- composer.json | 11 ++-- {src/config => config}/config.php | 12 ++--- src/{Aws/Laravel => }/AwsFacade.php | 0 src/{Aws/Laravel => }/AwsServiceProvider.php | 56 ++++++++++++-------- 5 files changed, 60 insertions(+), 41 deletions(-) rename {src/config => config}/config.php (93%) rename src/{Aws/Laravel => }/AwsFacade.php (100%) rename src/{Aws/Laravel => }/AwsServiceProvider.php (72%) diff --git a/README.md b/README.md index a92d5c6..9ab04a8 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Latest Stable Version](https://poser.pugx.org/aws/aws-sdk-php-laravel/v/stable.png)](https://packagist.org/packages/aws/aws-sdk-php-laravel) [![Total Downloads](https://poser.pugx.org/aws/aws-sdk-php-laravel/downloads.png)](https://packagist.org/packages/aws/aws-sdk-php-laravel) -A simple [Laravel 4](http://laravel.com/) service provider for including the [AWS SDK for PHP](https://github.com/aws/aws-sdk-php). +A simple [Laravel 5](http://laravel.com/) service provider for including the [AWS SDK for PHP](https://github.com/aws/aws-sdk-php). ## Installation @@ -13,7 +13,7 @@ The AWS Service Provider can be installed via [Composer](http://getcomposer.org) ```json { "require": { - "aws/aws-sdk-php-laravel": "1.*" + "aws/aws-sdk-php-laravel": "~2.0" } } ``` @@ -27,21 +27,29 @@ php composer.phar update To use the AWS Service Provider, you must register the provider when bootstrapping your Laravel application. -Publish the package configuration using Artisan. +By default, the package uses the following environment variables to auto-configure the plugin without modification: +``` +AWS_ACCESS_KEY_ID +AWS_SECRET_ACCESS_KEY +AWS_REGION // default = us-east-1 +AWS_CONFIG_FILE // default = null +``` + +To customize the configuration file, publish the package configuration using Artisan. ```sh -php artisan config:publish aws/aws-sdk-php-laravel +php artisan vendor:publish ``` -Update your settings in the generated `app/config/packages/aws/aws-sdk-php-laravel` configuration file. +Update your settings in the generated `app/config/aws.php` configuration file. ```php -return array( +return [ 'key' => 'YOUR_AWS_ACCESS_KEY_ID', 'secret' => 'YOUR_AWS_SECRET_KEY', 'region' => 'us-east-1', 'config_file' => null, -); +]; ``` Find the `providers` key in your `app/config/app.php` and register the AWS Service Provider. diff --git a/composer.json b/composer.json index c4c8849..9fedfdb 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,8 @@ { "name": "aws/aws-sdk-php-laravel", "homepage": "http://aws.amazon.com/sdkforphp2", - "description": "A simple Laravel 4 service provider for including the AWS SDK for PHP.", - "keywords": ["laravel","laravel 4","aws","amazon","sdk","s3","ec2","dynamodb"], + "description": "A simple Laravel 5 service provider for including the AWS SDK for PHP.", + "keywords": ["laravel", "laravel 5", "aws", "amazon", "sdk", "s3", "ec2", "dynamodb"], "type":"library", "license":"Apache-2.0", "authors":[ @@ -14,13 +14,12 @@ "require": { "php": ">=5.3.3", "aws/aws-sdk-php": "~2.2", - "illuminate/foundation": "4.*", - "illuminate/support": "4.*" + "illuminate/support": "~5.0" }, "require-dev": { - "phpunit/phpunit": "3.7.*" + "phpunit/phpunit": "~4.0" }, "autoload": { - "psr-0": { "Aws\\Laravel": "src/" } + "psr-4": { "Aws\\Laravel\\": "src/" } } } diff --git a/src/config/config.php b/config/config.php similarity index 93% rename from src/config/config.php rename to config/config.php index ab9cfd6..5d69027 100644 --- a/src/config/config.php +++ b/config/config.php @@ -14,7 +14,7 @@ * permissions and limitations under the License. */ -return array( +return [ /* |-------------------------------------------------------------------------- @@ -30,8 +30,8 @@ | http://docs.aws.amazon.com/aws-sdk-php-2/guide/latest/configuration.html | */ - 'key' => null, // Your AWS Access Key ID - 'secret' => null, // Your AWS Secret Access Key + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), /* |-------------------------------------------------------------------------- @@ -46,7 +46,7 @@ | eu-west-1, sa-east-1, ap-northeast-1, ap-southeast-1, ap-southeast-2 | */ - 'region' => 'us-east-1', + 'region' => env('AWS_REGION', 'us-east-1'), /* |-------------------------------------------------------------------------- @@ -61,6 +61,6 @@ | information: http://docs.aws.amazon.com/aws-sdk-php-2/guide/latest/configuration.html#using-a-custom-configuration-file | */ - 'config_file' => null, + 'config_file' => env('AWS_CONFIG_FILE'), -); +]; diff --git a/src/Aws/Laravel/AwsFacade.php b/src/AwsFacade.php similarity index 100% rename from src/Aws/Laravel/AwsFacade.php rename to src/AwsFacade.php diff --git a/src/Aws/Laravel/AwsServiceProvider.php b/src/AwsServiceProvider.php similarity index 72% rename from src/Aws/Laravel/AwsServiceProvider.php rename to src/AwsServiceProvider.php index d848114..a5a5488 100644 --- a/src/Aws/Laravel/AwsServiceProvider.php +++ b/src/AwsServiceProvider.php @@ -28,7 +28,31 @@ */ class AwsServiceProvider extends ServiceProvider { - const VERSION = '1.1.0'; + + const VERSION = '2.0.0'; + + /** + * Indicates if loading of the provider is deferred. + * + * @var bool + */ + protected $defer = true; + + /** + * Bootstrap the configuration + * + * @return void + */ + public function boot() + { + $config = realpath(__DIR__ . '/../config/config.php'); + + $this->mergeConfigFrom($config, 'aws'); + + $this->publishes([ + $config => config_path('aws.php'), + ], 'config'); + } /** * Register the service provider. @@ -37,38 +61,26 @@ class AwsServiceProvider extends ServiceProvider */ public function register() { - $this->app['aws'] = $this->app->share(function ($app) { - // Retrieve the config - $config = $app['config']['aws'] ?: $app['config']['aws::config']; - if (isset($config['config_file'])) { - $config = $config['config_file']; - } + $this->app->singleton('aws', function ($app) { // Instantiate the AWS service builder - $aws = Aws::factory($config); + $aws = Aws::factory($app['config']->get('aws')); // Attach an event listener that will append the Laravel and module version numbers to the user agent string $aws->getEventDispatcher()->addListener('service_builder.create_client', function (Event $event) { $clientConfig = $event['client']->getConfig(); - $commandParams = $clientConfig->get(Client::COMMAND_PARAMS) ?: array(); - $userAgentSuffix = 'Laravel/' . Application::VERSION . ' L4MOD/' . AwsServiceProvider::VERSION; - $clientConfig->set(Client::COMMAND_PARAMS, array_merge_recursive($commandParams, array( + $commandParams = $clientConfig->get(Client::COMMAND_PARAMS) ?: []; + $userAgentSuffix = 'Laravel/' . Application::VERSION . ' L5MOD/' . AwsServiceProvider::VERSION; + + $clientConfig->set(Client::COMMAND_PARAMS, array_merge_recursive($commandParams, [ UserAgentListener::OPTION => $userAgentSuffix, - ))); + ])); }); return $aws; }); - } - /** - * Bootstrap the application events. - * - * @return void - */ - public function boot() - { - $this->package('aws/aws-sdk-php-laravel', 'aws'); + $this->app->alias('aws', 'Aws\Common\Aws'); } /** @@ -78,6 +90,6 @@ public function boot() */ public function provides() { - return array('aws'); + return ['aws']; } } From 6734041520cae389efaed714f9db5f26397bab28 Mon Sep 17 00:00:00 2001 From: Tom Schlick Date: Mon, 16 Feb 2015 06:10:09 -0500 Subject: [PATCH 006/100] require php >= 5.4.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9fedfdb..9f7fc73 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ } ], "require": { - "php": ">=5.3.3", + "php": ">=5.4.0", "aws/aws-sdk-php": "~2.2", "illuminate/support": "~5.0" }, From ba5f302f0ec4287aa115a092d1f509d0669ba4a2 Mon Sep 17 00:00:00 2001 From: Tom Schlick Date: Mon, 16 Feb 2015 06:11:44 -0500 Subject: [PATCH 007/100] Provides 'Aws\Common\Aws' & additional formatting removed blank lines added 'Aws\Common\Aws' to provides additional formatting --- src/AwsServiceProvider.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/AwsServiceProvider.php b/src/AwsServiceProvider.php index a5a5488..3e73263 100644 --- a/src/AwsServiceProvider.php +++ b/src/AwsServiceProvider.php @@ -49,9 +49,7 @@ public function boot() $this->mergeConfigFrom($config, 'aws'); - $this->publishes([ - $config => config_path('aws.php'), - ], 'config'); + $this->publishes([$config => config_path('aws.php')], 'config'); } /** @@ -62,7 +60,6 @@ public function boot() public function register() { $this->app->singleton('aws', function ($app) { - // Instantiate the AWS service builder $aws = Aws::factory($app['config']->get('aws')); @@ -90,6 +87,6 @@ public function register() */ public function provides() { - return ['aws']; + return ['aws', 'Aws\Common\Aws']; } } From 56f50bd84c76780244e743cced9bc47cdc93235f Mon Sep 17 00:00:00 2001 From: Jeremy Lindblom Date: Wed, 18 Feb 2015 14:53:35 -0800 Subject: [PATCH 008/100] Updated tests and removed the user-agent modification code. --- composer.json | 3 +- config/config.php | 28 +----- phpunit.xml | 8 +- src/AwsFacade.php | 23 +---- src/AwsServiceProvider.php | 48 ++-------- tests/Aws/Laravel/Test/AwsFacadeTest.php | 38 -------- .../Laravel/Test/AwsServiceProviderTest.php | 93 ++++++++++++------- .../Test/AwsServiceProviderTestCase.php | 57 ------------ tests/bootstrap.php | 12 --- 9 files changed, 85 insertions(+), 225 deletions(-) delete mode 100644 tests/Aws/Laravel/Test/AwsFacadeTest.php delete mode 100644 tests/Aws/Laravel/Test/AwsServiceProviderTestCase.php delete mode 100644 tests/bootstrap.php diff --git a/composer.json b/composer.json index 9f7fc73..8e93832 100644 --- a/composer.json +++ b/composer.json @@ -13,10 +13,11 @@ ], "require": { "php": ">=5.4.0", - "aws/aws-sdk-php": "~2.2", + "aws/aws-sdk-php": "~2.4", "illuminate/support": "~5.0" }, "require-dev": { + "laravel/framework": "~5.0", "phpunit/phpunit": "~4.0" }, "autoload": { diff --git a/config/config.php b/config/config.php index 5d69027..a8438ad 100644 --- a/config/config.php +++ b/config/config.php @@ -1,20 +1,4 @@ - env('AWS_REGION', 'us-east-1'), diff --git a/phpunit.xml b/phpunit.xml index 4ec0310..9bca1c5 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,7 +1,7 @@ + + + + + + src diff --git a/src/AwsFacade.php b/src/AwsFacade.php index 4f68da8..baa584d 100644 --- a/src/AwsFacade.php +++ b/src/AwsFacade.php @@ -1,20 +1,4 @@ -app->singleton('aws', function ($app) { - // Instantiate the AWS service builder - $aws = Aws::factory($app['config']->get('aws')); + // Retrieve config. + $config = $app['config']->get('aws'); + if (isset($config['config_file'])) { + $config = $config['config_file']; + } - // Attach an event listener that will append the Laravel and module version numbers to the user agent string - $aws->getEventDispatcher()->addListener('service_builder.create_client', function (Event $event) { - $clientConfig = $event['client']->getConfig(); - $commandParams = $clientConfig->get(Client::COMMAND_PARAMS) ?: []; - $userAgentSuffix = 'Laravel/' . Application::VERSION . ' L5MOD/' . AwsServiceProvider::VERSION; - - $clientConfig->set(Client::COMMAND_PARAMS, array_merge_recursive($commandParams, [ - UserAgentListener::OPTION => $userAgentSuffix, - ])); - }); - - return $aws; + return Aws::factory($config); }); $this->app->alias('aws', 'Aws\Common\Aws'); @@ -89,4 +58,5 @@ public function provides() { return ['aws', 'Aws\Common\Aws']; } + } diff --git a/tests/Aws/Laravel/Test/AwsFacadeTest.php b/tests/Aws/Laravel/Test/AwsFacadeTest.php deleted file mode 100644 index a117151..0000000 --- a/tests/Aws/Laravel/Test/AwsFacadeTest.php +++ /dev/null @@ -1,38 +0,0 @@ -setupApplication(); - $this->setupServiceProvider($app); - - // Mount facades - AWS::setFacadeApplication($app); - - // Get an instance of a client (S3) via its facade - $s3 = AWS::get('s3'); - $this->assertInstanceOf('Aws\S3\S3Client', $s3); - } -} diff --git a/tests/Aws/Laravel/Test/AwsServiceProviderTest.php b/tests/Aws/Laravel/Test/AwsServiceProviderTest.php index 288325e..f24b147 100644 --- a/tests/Aws/Laravel/Test/AwsServiceProviderTest.php +++ b/tests/Aws/Laravel/Test/AwsServiceProviderTest.php @@ -1,35 +1,34 @@ -setupApplication(); + $this->setupServiceProvider($app); + + // Mount facades + AWS::setFacadeApplication($app); + + // Get an instance of a client (S3) via its facade + $s3 = AWS::get('s3'); + $this->assertInstanceOf('Aws\S3\S3Client', $s3); + } + + public function testRegisterAwsServiceProviderWithConfigFile() { $app = $this->setupApplication(); $this->setupServiceProvider($app); // Simulate global config; specify config file - $app['config']->set('aws', array( + $app['config']->set('aws', [ 'config_file' => __DIR__ . '/test_services.json' - )); + ]); // Get an instance of a client (S3) /** @var $s3 \Aws\S3\S3Client */ @@ -39,15 +38,9 @@ public function testRegisterAwsServiceProviderWithGlobalConfig() // Verify that the client received the credentials from the global config $this->assertEquals('change_me', $s3->getCredentials()->getAccessKeyId()); $this->assertEquals('change_me', $s3->getCredentials()->getSecretKey()); - - // Make sure the user agent contains Laravel information - $command = $s3->getCommand('ListBuckets'); - $request = $command->prepare(); - $s3->dispatch('command.before_send', array('command' => $command)); - $this->assertRegExp('/.+Laravel\/.+L4MOD\/.+/', (string) $request->getHeader('User-Agent')); } - public function testRegisterAwsServiceProviderWithPackageConfig() + public function testRegisterAwsServiceProviderWithPackageConfigAndEnv() { $app = $this->setupApplication(); $this->setupServiceProvider($app); @@ -58,8 +51,9 @@ public function testRegisterAwsServiceProviderWithPackageConfig() $this->assertInstanceOf('Aws\S3\S3Client', $s3); // Verify that the client received the credentials from the package config - $this->assertEquals('YOUR_AWS_ACCESS_KEY_ID', $s3->getCredentials()->getAccessKeyId()); - $this->assertEquals('YOUR_AWS_SECRET_KEY', $s3->getCredentials()->getSecretKey()); + $this->assertEquals('foo', $s3->getCredentials()->getAccessKeyId()); + $this->assertEquals('bar', $s3->getCredentials()->getSecretKey()); + $this->assertEquals('baz', $s3->getRegion()); } public function testServiceNameIsProvided() @@ -68,4 +62,33 @@ public function testServiceNameIsProvided() $provider = $this->setupServiceProvider($app); $this->assertContains('aws', $provider->provides()); } + + /** + * @return Application + */ + private function setupApplication() + { + // Create the application such that the config is loaded + $app = new Application(); + $app->setBasePath(sys_get_temp_dir()); + $app->instance('config', new Repository()); + + return $app; + } + + /** + * @param Application $app + * + * @return AwsServiceProvider + */ + private function setupServiceProvider(Application $app) + { + // Create and register the provider + $provider = new AwsServiceProvider($app); + $app->register($provider); + $provider->boot(); + + return $provider; + } + } diff --git a/tests/Aws/Laravel/Test/AwsServiceProviderTestCase.php b/tests/Aws/Laravel/Test/AwsServiceProviderTestCase.php deleted file mode 100644 index 0467b8e..0000000 --- a/tests/Aws/Laravel/Test/AwsServiceProviderTestCase.php +++ /dev/null @@ -1,57 +0,0 @@ -instance('path', 'foobar'); - $app->instance('files', new Filesystem); - $app->instance('config', new Repository($app->getConfigLoader(), 'foobar')); - - return $app; - } - - /** - * @param Application $app - * - * @return AwsServiceProvider - */ - protected function setupServiceProvider(Application $app) - { - // Create and register the provider - $provider = new AwsServiceProvider($app); - $app->register($provider); - $provider->boot(); - - return $provider; - } -} diff --git a/tests/bootstrap.php b/tests/bootstrap.php deleted file mode 100644 index e9bc16e..0000000 --- a/tests/bootstrap.php +++ /dev/null @@ -1,12 +0,0 @@ - Date: Wed, 18 Feb 2015 23:33:20 -0500 Subject: [PATCH 009/100] Version references updated for 2.0* beta. --- .gitignore | 2 ++ README.md | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b0def9a..02eb855 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ composer.lock composer.phar vendor +.idea +.DS_Store \ No newline at end of file diff --git a/README.md b/README.md index 9ab04a8..e378b4c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# AWS Service Provider for Laravel 4 +# AWS Service Provider for Laravel 5 [![Latest Stable Version](https://poser.pugx.org/aws/aws-sdk-php-laravel/v/stable.png)](https://packagist.org/packages/aws/aws-sdk-php-laravel) [![Total Downloads](https://poser.pugx.org/aws/aws-sdk-php-laravel/downloads.png)](https://packagist.org/packages/aws/aws-sdk-php-laravel) @@ -13,7 +13,7 @@ The AWS Service Provider can be installed via [Composer](http://getcomposer.org) ```json { "require": { - "aws/aws-sdk-php-laravel": "~2.0" + "aws/aws-sdk-php-laravel": "~2.0@beta" } } ``` From f7c2e45eccc3916fd3c1085b264fac1e2d05e563 Mon Sep 17 00:00:00 2001 From: Jeremy Lindblom Date: Wed, 11 Mar 2015 17:00:46 -0700 Subject: [PATCH 010/100] Added a note about the L4 branch. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index e378b4c..f72fb1a 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ A simple [Laravel 5](http://laravel.com/) service provider for including the [AWS SDK for PHP](https://github.com/aws/aws-sdk-php). +_(Looking for the Laravel 4 service provider? It's still available in the [1.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/1.0).)_ + ## Installation The AWS Service Provider can be installed via [Composer](http://getcomposer.org) by requiring the From b7b02edad8362f1bffa1d33db07937997c90b4e1 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Thu, 12 Mar 2015 02:29:48 +0100 Subject: [PATCH 011/100] travis.yml added --- .travis.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..2a10ceb --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +language: php + +php: + - 5.4 + - 5.5 + - 5.6 + - 7.0 + - hhvm + +install: + - composer install --prefer-source + +script: + - phpunit From a59e908ff4c281d65a00e1a33a62eaa097e4c7e4 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Thu, 12 Mar 2015 02:37:35 +0100 Subject: [PATCH 012/100] Readme: travis badge added --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e378b4c..3d8bf1d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # AWS Service Provider for Laravel 5 +[![Build Status](https://travis-ci.org/aws/aws-sdk-php-laravel.svg)](https://travis-ci.org/aws/aws-sdk-php-laravel) [![Latest Stable Version](https://poser.pugx.org/aws/aws-sdk-php-laravel/v/stable.png)](https://packagist.org/packages/aws/aws-sdk-php-laravel) [![Total Downloads](https://poser.pugx.org/aws/aws-sdk-php-laravel/downloads.png)](https://packagist.org/packages/aws/aws-sdk-php-laravel) From 10510f6cbda2f705d4be620f384013c50ecb9d94 Mon Sep 17 00:00:00 2001 From: Jeremy Lindblom Date: Thu, 12 Mar 2015 09:42:05 -0700 Subject: [PATCH 013/100] Updating Travis config with tricks I learned from @GrahamCampbell --- .travis.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2a10ceb..6350c75 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,14 @@ php: - 7.0 - hhvm -install: - - composer install --prefer-source +sudo: false -script: - - phpunit +install: travis_retry composer install --no-interaction --prefer-source + +script: vendor/bin/phpunit + +matrix: + allow_failures: + - php: 7.0 + - php: hhvm + fast_finish: true From 438895e0fd87ebc4dabaef9ea94dd3df25fab92d Mon Sep 17 00:00:00 2001 From: Jeremy Lindblom Date: Thu, 12 Mar 2015 09:47:18 -0700 Subject: [PATCH 014/100] Updated description of the library on the README. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1b5134f..194047b 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/aws/aws-sdk-php-laravel/v/stable.png)](https://packagist.org/packages/aws/aws-sdk-php-laravel) [![Total Downloads](https://poser.pugx.org/aws/aws-sdk-php-laravel/downloads.png)](https://packagist.org/packages/aws/aws-sdk-php-laravel) -A simple [Laravel 5](http://laravel.com/) service provider for including the [AWS SDK for PHP](https://github.com/aws/aws-sdk-php). +A simple [Laravel 5](http://laravel.com/) service provider for making it easier to include the official [AWS SDK for PHP](https://github.com/aws/aws-sdk-php) into your Laravel application. _(Looking for the Laravel 4 service provider? It's still available in the [1.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/1.0).)_ From 90187392c1a79948a6c7a4bbf9cbe73dab5cc107 Mon Sep 17 00:00:00 2001 From: Jeremy Lindblom Date: Thu, 12 Mar 2015 09:54:55 -0700 Subject: [PATCH 015/100] Updated README badges to the shields.io images --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 194047b..3c3b98b 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # AWS Service Provider for Laravel 5 -[![Build Status](https://travis-ci.org/aws/aws-sdk-php-laravel.svg)](https://travis-ci.org/aws/aws-sdk-php-laravel) -[![Latest Stable Version](https://poser.pugx.org/aws/aws-sdk-php-laravel/v/stable.png)](https://packagist.org/packages/aws/aws-sdk-php-laravel) -[![Total Downloads](https://poser.pugx.org/aws/aws-sdk-php-laravel/downloads.png)](https://packagist.org/packages/aws/aws-sdk-php-laravel) +[![Build Status](https://img.shields.io/travis/aws/aws-sdk-php-laravel.svg)](https://travis-ci.org/aws/aws-sdk-php-laravel) +[![Latest Stable Version](https://img.shields.io/packagist/v/aws/aws-sdk-php-laravel.svg)](https://packagist.org/packages/aws/aws-sdk-php-laravel) +[![Total Downloads](https://img.shields.io/packagist/dt/aws/aws-sdk-php-laravel.svg)](https://packagist.org/packages/aws/aws-sdk-php-laravel) A simple [Laravel 5](http://laravel.com/) service provider for making it easier to include the official [AWS SDK for PHP](https://github.com/aws/aws-sdk-php) into your Laravel application. From 8f946c5320eb21aafc77f036093700d7bd78dbac Mon Sep 17 00:00:00 2001 From: Dwight Watson Date: Fri, 13 Mar 2015 11:42:43 +1100 Subject: [PATCH 016/100] Remove the beta tag from the installation instructions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3c3b98b..ba11c18 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ The AWS Service Provider can be installed via [Composer](http://getcomposer.org) ```json { "require": { - "aws/aws-sdk-php-laravel": "~2.0@beta" + "aws/aws-sdk-php-laravel": "~2.0" } } ``` From d88b7a096e9ac0fe091ee91106a5b0448a88d886 Mon Sep 17 00:00:00 2001 From: Jeremy Lindblom Date: Thu, 12 Mar 2015 19:26:16 -0700 Subject: [PATCH 017/100] Added some more README badges --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index ba11c18..aa08f7b 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ # AWS Service Provider for Laravel 5 +[![@awsforphp on Twitter](http://img.shields.io/badge/twitter-%40awsforphp-blue.svg?style=flat)](https://twitter.com/awsforphp) [![Build Status](https://img.shields.io/travis/aws/aws-sdk-php-laravel.svg)](https://travis-ci.org/aws/aws-sdk-php-laravel) [![Latest Stable Version](https://img.shields.io/packagist/v/aws/aws-sdk-php-laravel.svg)](https://packagist.org/packages/aws/aws-sdk-php-laravel) [![Total Downloads](https://img.shields.io/packagist/dt/aws/aws-sdk-php-laravel.svg)](https://packagist.org/packages/aws/aws-sdk-php-laravel) +[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/aws/aws-sdk-php?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) A simple [Laravel 5](http://laravel.com/) service provider for making it easier to include the official [AWS SDK for PHP](https://github.com/aws/aws-sdk-php) into your Laravel application. From 5dae840e29ae23779a2ccc658405c8cdd1e1a871 Mon Sep 17 00:00:00 2001 From: Jeremy Lindblom Date: Thu, 19 Mar 2015 14:09:30 -0700 Subject: [PATCH 018/100] Rearranged some content in the README to improve installation workflow. --- README.md | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index aa08f7b..bc548f5 100644 --- a/README.md +++ b/README.md @@ -28,10 +28,28 @@ Then run a composer update php composer.phar update ``` -## Configuration - To use the AWS Service Provider, you must register the provider when bootstrapping your Laravel application. +Find the `providers` key in your `config/app.php` and register the AWS Service Provider. + +```php + 'providers' => array( + // ... + 'Aws\Laravel\AwsServiceProvider', + ) +``` + +Find the `aliases` key in your `config/app.php` and add the AWS facade alias. + +```php + 'aliases' => array( + // ... + 'AWS' => 'Aws\Laravel\AwsFacade', + ) +``` + +## Configuration + By default, the package uses the following environment variables to auto-configure the plugin without modification: ``` AWS_ACCESS_KEY_ID @@ -57,24 +75,6 @@ return [ ]; ``` -Find the `providers` key in your `app/config/app.php` and register the AWS Service Provider. - -```php - 'providers' => array( - // ... - 'Aws\Laravel\AwsServiceProvider', - ) -``` - -Find the `aliases` key in your `app/config/app.php` and add the AWS facade alias. - -```php - 'aliases' => array( - // ... - 'AWS' => 'Aws\Laravel\AwsFacade', - ) -``` - ## Usage In order to use the AWS SDK for PHP within your app, you need to retrieve it from the [Laravel IoC From e77f1911580120376404cd643800e0d91762ef2b Mon Sep 17 00:00:00 2001 From: Jeremy Lindblom Date: Mon, 1 Jun 2015 17:29:24 -0700 Subject: [PATCH 019/100] Removing dependency on config_path function. --- src/AwsServiceProvider.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/AwsServiceProvider.php b/src/AwsServiceProvider.php index 1987b8a..91a235f 100644 --- a/src/AwsServiceProvider.php +++ b/src/AwsServiceProvider.php @@ -26,7 +26,9 @@ public function boot() $this->mergeConfigFrom($config, 'aws'); - $this->publishes([$config => config_path('aws.php')], 'config'); + $this->publishes([ + $config => $this->app->make('path.config') . DIRECTORY_SEPARATOR . 'aws.php' + ], 'config'); } /** From 332f79da08341ea5d595bd00207f61fa40d2d83c Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Wed, 10 Jun 2015 19:55:02 +0100 Subject: [PATCH 020/100] Fix lumen support and cleanup config --- src/AwsServiceProvider.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/AwsServiceProvider.php b/src/AwsServiceProvider.php index 91a235f..f830ea3 100644 --- a/src/AwsServiceProvider.php +++ b/src/AwsServiceProvider.php @@ -22,13 +22,13 @@ class AwsServiceProvider extends ServiceProvider { */ public function boot() { - $config = realpath(__DIR__ . '/../config/config.php'); + $source = realpath(__DIR__ . '/../config/aws.php'); - $this->mergeConfigFrom($config, 'aws'); + if (class_exists('Illuminate\Foundation\Application', false)) { + $this->publishes([$source => config_path('aws.php')], 'config'); + } - $this->publishes([ - $config => $this->app->make('path.config') . DIRECTORY_SEPARATOR . 'aws.php' - ], 'config'); + $this->mergeConfigFrom($source, 'aws'); } /** @@ -39,7 +39,6 @@ public function boot() public function register() { $this->app->singleton('aws', function ($app) { - // Retrieve config. $config = $app['config']->get('aws'); if (isset($config['config_file'])) { $config = $config['config_file']; From 0223627b9a0d55f47d16f6f3450e709494399d10 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Wed, 10 Jun 2015 19:55:58 +0100 Subject: [PATCH 021/100] Fixed config file --- config/{config.php => aws.php} | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) rename config/{config.php => aws.php} (99%) diff --git a/config/config.php b/config/aws.php similarity index 99% rename from config/config.php rename to config/aws.php index a8438ad..d4445fa 100644 --- a/config/config.php +++ b/config/aws.php @@ -1,4 +1,6 @@ - Date: Wed, 10 Jun 2015 19:58:57 +0100 Subject: [PATCH 022/100] Removed unneeded param --- src/AwsServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AwsServiceProvider.php b/src/AwsServiceProvider.php index f830ea3..e75678d 100644 --- a/src/AwsServiceProvider.php +++ b/src/AwsServiceProvider.php @@ -25,7 +25,7 @@ public function boot() $source = realpath(__DIR__ . '/../config/aws.php'); if (class_exists('Illuminate\Foundation\Application', false)) { - $this->publishes([$source => config_path('aws.php')], 'config'); + $this->publishes([$source => config_path('aws.php')]); } $this->mergeConfigFrom($source, 'aws'); From 404371bfab6b49f459f6b5e432015c131bc92606 Mon Sep 17 00:00:00 2001 From: Jeremy Lindblom Date: Mon, 1 Jun 2015 17:09:19 -0700 Subject: [PATCH 023/100] Updating the service provider to work with SDKv3 and Laravel 5.1 --- .travis.yml | 8 +--- composer.json | 8 ++-- config/aws.php | 48 +++++-------------- src/AwsFacade.php | 7 +-- src/AwsServiceProvider.php | 14 ++---- .../Laravel/Test/AwsServiceProviderTest.php | 43 +++++------------ tests/Aws/Laravel/Test/test_services.json | 20 -------- 7 files changed, 38 insertions(+), 110 deletions(-) delete mode 100644 tests/Aws/Laravel/Test/test_services.json diff --git a/.travis.yml b/.travis.yml index 6350c75..907edd1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,7 @@ language: php php: - - 5.4 - - 5.5 + - 5.5.9 - 5.6 - 7.0 - hhvm @@ -13,8 +12,3 @@ install: travis_retry composer install --no-interaction --prefer-source script: vendor/bin/phpunit -matrix: - allow_failures: - - php: 7.0 - - php: hhvm - fast_finish: true diff --git a/composer.json b/composer.json index 8e93832..a29fdfb 100644 --- a/composer.json +++ b/composer.json @@ -12,12 +12,12 @@ } ], "require": { - "php": ">=5.4.0", - "aws/aws-sdk-php": "~2.4", - "illuminate/support": "~5.0" + "php": ">=5.5.9", + "aws/aws-sdk-php": "~3.0", + "illuminate/support": "5.1.*" }, "require-dev": { - "laravel/framework": "~5.0", + "laravel/framework": "5.1.*", "phpunit/phpunit": "~4.0" }, "autoload": { diff --git a/config/aws.php b/config/aws.php index d4445fa..9a364eb 100644 --- a/config/aws.php +++ b/config/aws.php @@ -4,47 +4,21 @@ /* |-------------------------------------------------------------------------- - | Your AWS Credentials + | AWS SDK Configuration |-------------------------------------------------------------------------- | - | In order to communicate with an AWS service, you must provide your AWS - | credentials including your AWS Access Key ID and AWS Secret Access Key. - | - | To use credentials from your credentials file or environment or to use - | IAM Instance Profile credentials, please remove these config settings from - | your config or make sure they are null. For more information, see: - | http://docs.aws.amazon.com/aws-sdk-php-2/guide/latest/configuration.html - | - */ - 'key' => env('AWS_ACCESS_KEY_ID'), - 'secret' => env('AWS_SECRET_ACCESS_KEY'), - - /* - |-------------------------------------------------------------------------- - | AWS Region - |-------------------------------------------------------------------------- - | - | Many AWS services are available in multiple regions. You should specify - | the AWS region you would like to use, but please remember that not every - | service is available in every region. To see what regions are available, - | see: http://docs.aws.amazon.com/general/latest/gr/rande.html + | The configuration options set in this file will be passed directly to the + | `Aws\Sdk` object, from which all client objects are created. The minimum + | required options are declared here, but the full set of possible options + | are documented at: + | http://docs.aws.amazon.com/aws-sdk-php/v3/guide/guide/configuration.html | */ + 'credentials' => [ + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + ], 'region' => env('AWS_REGION', 'us-east-1'), - - /* - |-------------------------------------------------------------------------- - | AWS Config File Location - |-------------------------------------------------------------------------- - | - | Instead of specifying your credentials and region here, you can specify - | the location of an AWS SDK for PHP config file to use. These files provide - | more granular control over what credentials and regions you are using for - | each service. If you specify a filepath for this configuration setting, - | the others in this file will be ignored. See the SDK user guide for more - | information: http://docs.aws.amazon.com/aws-sdk-php-2/guide/latest/configuration.html#using-a-custom-configuration-file - | - */ - 'config_file' => env('AWS_CONFIG_FILE'), + 'version' => 'latest', ]; diff --git a/src/AwsFacade.php b/src/AwsFacade.php index baa584d..672c2af 100644 --- a/src/AwsFacade.php +++ b/src/AwsFacade.php @@ -1,14 +1,15 @@ app->singleton('aws', function ($app) { - $config = $app['config']->get('aws'); - if (isset($config['config_file'])) { - $config = $config['config_file']; - } - - return Aws::factory($config); + return new Sdk($app['config']->get('aws')); }); - $this->app->alias('aws', 'Aws\Common\Aws'); + $this->app->alias('aws', 'Aws\Sdk'); } /** diff --git a/tests/Aws/Laravel/Test/AwsServiceProviderTest.php b/tests/Aws/Laravel/Test/AwsServiceProviderTest.php index f24b147..07a5a20 100644 --- a/tests/Aws/Laravel/Test/AwsServiceProviderTest.php +++ b/tests/Aws/Laravel/Test/AwsServiceProviderTest.php @@ -5,7 +5,8 @@ use Illuminate\Config\Repository; use Illuminate\Foundation\Application; -class AwsServiceProviderTest extends \PHPUnit_Framework_TestCase { +class AwsServiceProviderTest extends \PHPUnit_Framework_TestCase +{ public function testFacadeCanBeResolvedToServiceInstance() { @@ -15,44 +16,26 @@ public function testFacadeCanBeResolvedToServiceInstance() // Mount facades AWS::setFacadeApplication($app); - // Get an instance of a client (S3) via its facade - $s3 = AWS::get('s3'); + // Get an instance of a client (S3) via the facade. + $s3 = AWS::createClient('S3'); $this->assertInstanceOf('Aws\S3\S3Client', $s3); } - public function testRegisterAwsServiceProviderWithConfigFile() - { - $app = $this->setupApplication(); - $this->setupServiceProvider($app); - - // Simulate global config; specify config file - $app['config']->set('aws', [ - 'config_file' => __DIR__ . '/test_services.json' - ]); - - // Get an instance of a client (S3) - /** @var $s3 \Aws\S3\S3Client */ - $s3 = $app['aws']->get('s3'); - $this->assertInstanceOf('Aws\S3\S3Client', $s3); - - // Verify that the client received the credentials from the global config - $this->assertEquals('change_me', $s3->getCredentials()->getAccessKeyId()); - $this->assertEquals('change_me', $s3->getCredentials()->getSecretKey()); - } - public function testRegisterAwsServiceProviderWithPackageConfigAndEnv() { $app = $this->setupApplication(); $this->setupServiceProvider($app); - // Get an instance of a client (S3) + // Get an instance of a client (S3). /** @var $s3 \Aws\S3\S3Client */ - $s3 = $app['aws']->get('s3'); + $s3 = $app['aws']->createClient('S3'); $this->assertInstanceOf('Aws\S3\S3Client', $s3); - // Verify that the client received the credentials from the package config - $this->assertEquals('foo', $s3->getCredentials()->getAccessKeyId()); - $this->assertEquals('bar', $s3->getCredentials()->getSecretKey()); + // Verify that the client received the credentials from the package config. + /** @var \Aws\Credentials\CredentialsInterface $credentials */ + $credentials = $s3->getCredentials()->wait(); + $this->assertEquals('foo', $credentials->getAccessKeyId()); + $this->assertEquals('bar', $credentials->getSecretKey()); $this->assertEquals('baz', $s3->getRegion()); } @@ -68,7 +51,7 @@ public function testServiceNameIsProvided() */ private function setupApplication() { - // Create the application such that the config is loaded + // Create the application such that the config is loaded. $app = new Application(); $app->setBasePath(sys_get_temp_dir()); $app->instance('config', new Repository()); @@ -83,7 +66,7 @@ private function setupApplication() */ private function setupServiceProvider(Application $app) { - // Create and register the provider + // Create and register the provider. $provider = new AwsServiceProvider($app); $app->register($provider); $provider->boot(); diff --git a/tests/Aws/Laravel/Test/test_services.json b/tests/Aws/Laravel/Test/test_services.json deleted file mode 100644 index 5a2778d..0000000 --- a/tests/Aws/Laravel/Test/test_services.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "includes": ["_aws"], - "services": { - "default_settings": { - "params": { - "key": "change_me", - "secret": "change_me", - "region": "us-east-1", - "ssl.certificate_authority": true - } - }, - "cloudfront": { - "extends": "cloudfront", - "params": { - "private_key": "change_me", - "key_pair_id": "change_me" - } - } - } -} From b066f172da95a8b6c0bff2325e1281e71607d5af Mon Sep 17 00:00:00 2001 From: Jeremy Lindblom Date: Wed, 10 Jun 2015 12:09:23 -0700 Subject: [PATCH 024/100] Updated README and a few other things. --- README.md | 34 +++++++++++++++++++++++++--------- composer.json | 4 ++-- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index bc548f5..d862f7f 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,16 @@ [![Total Downloads](https://img.shields.io/packagist/dt/aws/aws-sdk-php-laravel.svg)](https://packagist.org/packages/aws/aws-sdk-php-laravel) [![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/aws/aws-sdk-php?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -A simple [Laravel 5](http://laravel.com/) service provider for making it easier to include the official [AWS SDK for PHP](https://github.com/aws/aws-sdk-php) into your Laravel application. +This is a simple [Laravel](http://laravel.com/) service provider for making it easy to include the official +[AWS SDK for PHP](https://github.com/aws/aws-sdk-php) in your Laravel and Lumen applications. -_(Looking for the Laravel 4 service provider? It's still available in the [1.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/1.0).)_ +The master branch of this repository and this README are for version 3.x of the service provider, which is implemented +to work with Version 3 of the AWS SDK for PHP and Laravel 5.1+. + +Past Versions: + +* [2.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/2.0) - For Laravel 5.0 and Version 2 of the AWS SDK for PHP +* [1.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/1.0) - For Laravel 4.x and Version 2 of the AWS SDK for PHP ## Installation @@ -18,7 +25,7 @@ The AWS Service Provider can be installed via [Composer](http://getcomposer.org) ```json { "require": { - "aws/aws-sdk-php-laravel": "~2.0" + "aws/aws-sdk-php-laravel": "~3.0" } } ``` @@ -54,8 +61,7 @@ By default, the package uses the following environment variables to auto-configu ``` AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY -AWS_REGION // default = us-east-1 -AWS_CONFIG_FILE // default = null +AWS_REGION (default = us-east-1) ``` To customize the configuration file, publish the package configuration using Artisan. @@ -68,13 +74,23 @@ Update your settings in the generated `app/config/aws.php` configuration file. ```php return [ - 'key' => 'YOUR_AWS_ACCESS_KEY_ID', - 'secret' => 'YOUR_AWS_SECRET_KEY', - 'region' => 'us-east-1', - 'config_file' => null, + 'credentials' => [ + 'key' => 'YOUR_AWS_ACCESS_KEY_ID', + 'secret' => 'YOUR_AWS_SECRET_ACCESS_KEY', + ], + 'region' => 'us-west-2', + 'version' => 'latest', + + // You can override settings for specific services + 'Ses' => [ + 'region' => 'us-east-1', + ], ]; ``` +Learn more about [configuring the SDK](http://docs.aws.amazon.com/aws-sdk-php/v3/guide/guide/configuration.html) on +the SDK's User Guide. + ## Usage In order to use the AWS SDK for PHP within your app, you need to retrieve it from the [Laravel IoC diff --git a/composer.json b/composer.json index a29fdfb..fb05519 100644 --- a/composer.json +++ b/composer.json @@ -14,10 +14,10 @@ "require": { "php": ">=5.5.9", "aws/aws-sdk-php": "~3.0", - "illuminate/support": "5.1.*" + "illuminate/support": "~5.1" }, "require-dev": { - "laravel/framework": "5.1.*", + "laravel/framework": "~5.1", "phpunit/phpunit": "~4.0" }, "autoload": { From 111dd8f762901d94e132e8cfbd7a94608d35f3df Mon Sep 17 00:00:00 2001 From: Jeremy Lindblom Date: Wed, 10 Jun 2015 12:29:25 -0700 Subject: [PATCH 025/100] Updated with some Lumen compatibility ideas from #67 --- src/AwsServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AwsServiceProvider.php b/src/AwsServiceProvider.php index df0981f..bea9887 100644 --- a/src/AwsServiceProvider.php +++ b/src/AwsServiceProvider.php @@ -53,7 +53,7 @@ public function register() */ public function provides() { - return ['aws', 'Aws\Common\Aws']; + return ['aws', 'Aws\Sdk']; } } From 6c3081671b104777149228f0fbbed6cb634d2aff Mon Sep 17 00:00:00 2001 From: Jeremy Lindblom Date: Wed, 10 Jun 2015 12:41:12 -0700 Subject: [PATCH 026/100] PSR4'd the tests --- composer.json | 3 +++ tests/{Aws/Laravel/Test => }/AwsServiceProviderTest.php | 0 2 files changed, 3 insertions(+) rename tests/{Aws/Laravel/Test => }/AwsServiceProviderTest.php (100%) diff --git a/composer.json b/composer.json index fb05519..5f4e83d 100644 --- a/composer.json +++ b/composer.json @@ -22,5 +22,8 @@ }, "autoload": { "psr-4": { "Aws\\Laravel\\": "src/" } + }, + "autoload-dev": { + "psr-4": { "Aws\\Laravel\\Test\\": "tests/" } } } diff --git a/tests/Aws/Laravel/Test/AwsServiceProviderTest.php b/tests/AwsServiceProviderTest.php similarity index 100% rename from tests/Aws/Laravel/Test/AwsServiceProviderTest.php rename to tests/AwsServiceProviderTest.php From 983310373a9863a58f73abb9aa838da0c836227f Mon Sep 17 00:00:00 2001 From: Jeremy Lindblom Date: Wed, 10 Jun 2015 13:56:22 -0700 Subject: [PATCH 027/100] Clarifying different version on README --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d862f7f..fc6b897 100644 --- a/README.md +++ b/README.md @@ -9,13 +9,14 @@ This is a simple [Laravel](http://laravel.com/) service provider for making it easy to include the official [AWS SDK for PHP](https://github.com/aws/aws-sdk-php) in your Laravel and Lumen applications. -The master branch of this repository and this README are for version 3.x of the service provider, which is implemented -to work with Version 3 of the AWS SDK for PHP and Laravel 5.1+. +This README is for version 3.x of the service provider, which is implemented to work with Version 3 of the AWS SDK for +PHP and Laravel 5.1. -Past Versions: +**Major Versions:** -* [2.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/2.0) - For Laravel 5.0 and Version 2 of the AWS SDK for PHP -* [1.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/1.0) - For Laravel 4.x and Version 2 of the AWS SDK for PHP +* **3.x** (YOU ARE HERE) - For `laravel/framework:~5.1` and `aws/aws-sdk-php:~3.0` +* **2.x** ([2.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/2.0)) - For `laravel/framework:5.0.*` and `aws/aws-sdk-php:~2.4` +* **1.x** ([1.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/1.0)) - For `laravel/framework:4.*` and `aws/aws-sdk-php:~2.4` ## Installation From ce0287805b9cf0353e2a5e3bfa39ecc2bba3071f Mon Sep 17 00:00:00 2001 From: Ben52 Date: Thu, 11 Jun 2015 16:45:19 -0400 Subject: [PATCH 028/100] Updates Readme.md to reflect php-sdk v-3 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fc6b897..baad8c8 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ In order to use the AWS SDK for PHP within your app, you need to retrieve it fro Container](http://laravel.com/docs/ioc). The following example uses the Amazon S3 client to upload a file. ```php -$s3 = App::make('aws')->get('s3'); +$s3 = App::make('aws')->createClient('s3'); $s3->putObject(array( 'Bucket' => 'YOUR_BUCKET', 'Key' => 'YOUR_OBJECT_KEY', @@ -110,7 +110,7 @@ If the AWS facade is registered within the `aliases` section of the application following technique. ```php -$s3 = AWS::get('s3'); +$s3 = AWS::createClient('s3'); $s3->putObject(array( 'Bucket' => 'YOUR_BUCKET', 'Key' => 'YOUR_OBJECT_KEY', From a6e0e843c74ea7c1b72a25cecf951166425d7ad9 Mon Sep 17 00:00:00 2001 From: Jonathan Eskew Date: Wed, 5 Aug 2015 15:45:11 -0700 Subject: [PATCH 029/100] Provide version information to SDK user agent --- config/aws.php | 8 +++++++- src/AwsServiceProvider.php | 1 + tests/AwsServiceProviderTest.php | 17 +++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/config/aws.php b/config/aws.php index 9a364eb..174e50f 100644 --- a/config/aws.php +++ b/config/aws.php @@ -1,5 +1,8 @@ env('AWS_REGION', 'us-east-1'), 'version' => 'latest', - + 'ua_append' => [ + 'Laravel/' . Application::VERSION, + 'L5MOD/' . AwsServiceProvider::VERSION, + ], ]; diff --git a/src/AwsServiceProvider.php b/src/AwsServiceProvider.php index bea9887..3af207f 100644 --- a/src/AwsServiceProvider.php +++ b/src/AwsServiceProvider.php @@ -8,6 +8,7 @@ */ class AwsServiceProvider extends ServiceProvider { + const VERSION = '3.0.1'; /** * Indicates if loading of the provider is deferred. diff --git a/tests/AwsServiceProviderTest.php b/tests/AwsServiceProviderTest.php index 07a5a20..75cc18b 100644 --- a/tests/AwsServiceProviderTest.php +++ b/tests/AwsServiceProviderTest.php @@ -46,6 +46,23 @@ public function testServiceNameIsProvided() $this->assertContains('aws', $provider->provides()); } + public function testVersionInformationIsProvidedToSdkUserAgent() + { + $app = $this->setupApplication(); + $this->setupServiceProvider($app); + $config = $app['config']->get('aws'); + + $this->assertArrayHasKey('ua_append', $config); + $this->assertInternalType('array', $config['ua_append']); + $this->assertNotEmpty($config['ua_append']); + $this->assertNotEmpty(array_filter($config['ua_append'], function ($ua) { + return false !== strpos($ua, Application::VERSION); + })); + $this->assertNotEmpty(array_filter($config['ua_append'], function ($ua) { + return false !== strpos($ua, AwsServiceProvider::VERSION); + })); + } + /** * @return Application */ From e937b1e783b6c112a9e6294c706cad70a7524a19 Mon Sep 17 00:00:00 2001 From: Jonathan Eskew Date: Mon, 10 Aug 2015 14:11:39 -0700 Subject: [PATCH 030/100] Removed usage of a dev dependency --- config/aws.php | 2 -- tests/AwsServiceProviderTest.php | 3 --- 2 files changed, 5 deletions(-) diff --git a/config/aws.php b/config/aws.php index 174e50f..03bb41a 100644 --- a/config/aws.php +++ b/config/aws.php @@ -1,7 +1,6 @@ env('AWS_REGION', 'us-east-1'), 'version' => 'latest', 'ua_append' => [ - 'Laravel/' . Application::VERSION, 'L5MOD/' . AwsServiceProvider::VERSION, ], ]; diff --git a/tests/AwsServiceProviderTest.php b/tests/AwsServiceProviderTest.php index 75cc18b..2216f4d 100644 --- a/tests/AwsServiceProviderTest.php +++ b/tests/AwsServiceProviderTest.php @@ -55,9 +55,6 @@ public function testVersionInformationIsProvidedToSdkUserAgent() $this->assertArrayHasKey('ua_append', $config); $this->assertInternalType('array', $config['ua_append']); $this->assertNotEmpty($config['ua_append']); - $this->assertNotEmpty(array_filter($config['ua_append'], function ($ua) { - return false !== strpos($ua, Application::VERSION); - })); $this->assertNotEmpty(array_filter($config['ua_append'], function ($ua) { return false !== strpos($ua, AwsServiceProvider::VERSION); })); From 043e0b0ef00b2b4866d57bcd85a2ba4db0bf7325 Mon Sep 17 00:00:00 2001 From: Jose Jimenez Date: Tue, 11 Aug 2015 22:48:36 -0400 Subject: [PATCH 031/100] Update providers and alises for 5.1 consistency In Laravel 5.1 they use class name resolution via ::class, this is just to make it consistent with the rest of the `config/app.php`. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index baad8c8..a470f17 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Find the `providers` key in your `config/app.php` and register the AWS Service P ```php 'providers' => array( // ... - 'Aws\Laravel\AwsServiceProvider', + Aws\Laravel\AwsServiceProvider::class, ) ``` @@ -52,7 +52,7 @@ Find the `aliases` key in your `config/app.php` and add the AWS facade alias. ```php 'aliases' => array( // ... - 'AWS' => 'Aws\Laravel\AwsFacade', + 'AWS' => Aws\Laravel\AwsFacade::class, ) ``` From 91353e7104b244e7566977329914670935e043c2 Mon Sep 17 00:00:00 2001 From: Michael Walker Date: Tue, 15 Sep 2015 13:47:09 -0400 Subject: [PATCH 032/100] remove credentials if blank, causing the SDK to use ec2 role --- src/AwsServiceProvider.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/AwsServiceProvider.php b/src/AwsServiceProvider.php index 3af207f..daacd86 100644 --- a/src/AwsServiceProvider.php +++ b/src/AwsServiceProvider.php @@ -41,7 +41,12 @@ public function boot() public function register() { $this->app->singleton('aws', function ($app) { - return new Sdk($app['config']->get('aws')); + $config = $app['config']->get('aws'); + if ( is_null ( $app['config']->get('aws')['credentials']['key'] ) && is_null( $app['config']->get('aws')['credentials']['secret'] ) ) + { + unset( $config['credentials'] ); + } + return new Sdk($config); }); $this->app->alias('aws', 'Aws\Sdk'); From 16398c73e3dbae10c82fe75c7c76fe0de60e2238 Mon Sep 17 00:00:00 2001 From: Michael Walker Date: Tue, 15 Sep 2015 14:04:33 -0400 Subject: [PATCH 033/100] fixing cs issues --- src/AwsServiceProvider.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/AwsServiceProvider.php b/src/AwsServiceProvider.php index daacd86..0c99b49 100644 --- a/src/AwsServiceProvider.php +++ b/src/AwsServiceProvider.php @@ -41,11 +41,10 @@ public function boot() public function register() { $this->app->singleton('aws', function ($app) { - $config = $app['config']->get('aws'); - if ( is_null ( $app['config']->get('aws')['credentials']['key'] ) && is_null( $app['config']->get('aws')['credentials']['secret'] ) ) - { - unset( $config['credentials'] ); - } + $config = $app['config']->get('aws'); + if (is_null($app['config']->get('aws')['credentials']['key']) && is_null($app['config']->get('aws')['credentials']['secret'])) { + unset($config['credentials']); + } return new Sdk($config); }); From a5b543b93b4fb158b7a58ad3b9af9d7b973eb06a Mon Sep 17 00:00:00 2001 From: Michael Walker Date: Tue, 15 Sep 2015 16:58:47 -0400 Subject: [PATCH 034/100] removing credentials from default config, restoring serviceprovider --- config/aws.php | 5 +---- src/AwsServiceProvider.php | 3 --- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/config/aws.php b/config/aws.php index 03bb41a..8f86c66 100644 --- a/config/aws.php +++ b/config/aws.php @@ -16,10 +16,7 @@ | http://docs.aws.amazon.com/aws-sdk-php/v3/guide/guide/configuration.html | */ - 'credentials' => [ - 'key' => env('AWS_ACCESS_KEY_ID'), - 'secret' => env('AWS_SECRET_ACCESS_KEY'), - ], + 'region' => env('AWS_REGION', 'us-east-1'), 'version' => 'latest', 'ua_append' => [ diff --git a/src/AwsServiceProvider.php b/src/AwsServiceProvider.php index 0c99b49..1eb8e73 100644 --- a/src/AwsServiceProvider.php +++ b/src/AwsServiceProvider.php @@ -42,9 +42,6 @@ public function register() { $this->app->singleton('aws', function ($app) { $config = $app['config']->get('aws'); - if (is_null($app['config']->get('aws')['credentials']['key']) && is_null($app['config']->get('aws')['credentials']['secret'])) { - unset($config['credentials']); - } return new Sdk($config); }); From 1f883c7e4939ffe45b42ab1833db116b73fff14f Mon Sep 17 00:00:00 2001 From: Michael Walker Date: Wed, 16 Sep 2015 12:12:58 -0400 Subject: [PATCH 035/100] changing test to allow hhvm failures --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 907edd1..3810144 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,10 @@ php: sudo: false +matrix: + allow_failures: + - php: hhvm + install: travis_retry composer install --no-interaction --prefer-source script: vendor/bin/phpunit From 744ebd0ce94ae2a4f301788e38e53f65258945ce Mon Sep 17 00:00:00 2001 From: Michael Walker Date: Wed, 16 Sep 2015 12:15:45 -0400 Subject: [PATCH 036/100] removing tabs --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3810144..9bcf7bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,8 +9,8 @@ php: sudo: false matrix: - allow_failures: - - php: hhvm + allow_failures: + - php: hhvm install: travis_retry composer install --no-interaction --prefer-source From 6643e8e7dd44da18724aadd52160fda3a3b82c59 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Sat, 16 Jan 2016 10:45:28 +0000 Subject: [PATCH 037/100] Fixed lumen support --- src/AwsServiceProvider.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/AwsServiceProvider.php b/src/AwsServiceProvider.php index 1eb8e73..27fbe21 100644 --- a/src/AwsServiceProvider.php +++ b/src/AwsServiceProvider.php @@ -1,7 +1,9 @@ app instanceof LaravelApplication && $app->runningInConsole()) { $this->publishes([$source => config_path('aws.php')]); + } elseif ($this->app instanceof LumenApplication) { + $app->configure('aws'); } $this->mergeConfigFrom($source, 'aws'); @@ -41,7 +45,8 @@ public function boot() public function register() { $this->app->singleton('aws', function ($app) { - $config = $app['config']->get('aws'); + $config = $app->make('config')->get('aws'); + return new Sdk($config); }); From 11fd1a77cf4108bf53ed044ac6c1ec92867d1307 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Sat, 16 Jan 2016 20:31:01 +0000 Subject: [PATCH 038/100] Fixed typos --- src/AwsServiceProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AwsServiceProvider.php b/src/AwsServiceProvider.php index 27fbe21..3167d17 100644 --- a/src/AwsServiceProvider.php +++ b/src/AwsServiceProvider.php @@ -28,10 +28,10 @@ public function boot() { $source = realpath(__DIR__ . '/../config/aws.php'); - if ($this->app instanceof LaravelApplication && $app->runningInConsole()) { + if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) { $this->publishes([$source => config_path('aws.php')]); } elseif ($this->app instanceof LumenApplication) { - $app->configure('aws'); + $this->app->configure('aws'); } $this->mergeConfigFrom($source, 'aws'); From 684c1e528d61d7b7935acdde5ad3585032464d6a Mon Sep 17 00:00:00 2001 From: Jonathan Eskew Date: Sat, 16 Jan 2016 14:17:34 -0800 Subject: [PATCH 039/100] Add test for using service provider in Lumen --- composer.json | 5 +++-- tests/AwsServiceProviderTest.php | 22 ++++++---------------- tests/LaravelAwsServiceProviderTest.php | 17 +++++++++++++++++ tests/LumenAwsServiceProviderTest.php | 17 +++++++++++++++++ 4 files changed, 43 insertions(+), 18 deletions(-) create mode 100644 tests/LaravelAwsServiceProviderTest.php create mode 100644 tests/LumenAwsServiceProviderTest.php diff --git a/composer.json b/composer.json index 5f4e83d..97ced0c 100644 --- a/composer.json +++ b/composer.json @@ -17,8 +17,9 @@ "illuminate/support": "~5.1" }, "require-dev": { - "laravel/framework": "~5.1", - "phpunit/phpunit": "~4.0" + "laravel/framework": "~5.2", + "phpunit/phpunit": "~4.0", + "laravel/lumen-framework": "~5.2" }, "autoload": { "psr-4": { "Aws\\Laravel\\": "src/" } diff --git a/tests/AwsServiceProviderTest.php b/tests/AwsServiceProviderTest.php index 2216f4d..3686345 100644 --- a/tests/AwsServiceProviderTest.php +++ b/tests/AwsServiceProviderTest.php @@ -2,10 +2,9 @@ use Aws\Laravel\AwsFacade as AWS; use Aws\Laravel\AwsServiceProvider; -use Illuminate\Config\Repository; -use Illuminate\Foundation\Application; +use Illuminate\Container\Container; -class AwsServiceProviderTest extends \PHPUnit_Framework_TestCase +abstract class AwsServiceProviderTest extends \PHPUnit_Framework_TestCase { public function testFacadeCanBeResolvedToServiceInstance() @@ -61,24 +60,16 @@ public function testVersionInformationIsProvidedToSdkUserAgent() } /** - * @return Application + * @return Container */ - private function setupApplication() - { - // Create the application such that the config is loaded. - $app = new Application(); - $app->setBasePath(sys_get_temp_dir()); - $app->instance('config', new Repository()); - - return $app; - } + abstract protected function setupApplication(); /** - * @param Application $app + * @param Container $app * * @return AwsServiceProvider */ - private function setupServiceProvider(Application $app) + private function setupServiceProvider(Container $app) { // Create and register the provider. $provider = new AwsServiceProvider($app); @@ -87,5 +78,4 @@ private function setupServiceProvider(Application $app) return $provider; } - } diff --git a/tests/LaravelAwsServiceProviderTest.php b/tests/LaravelAwsServiceProviderTest.php new file mode 100644 index 0000000..0fbd7f9 --- /dev/null +++ b/tests/LaravelAwsServiceProviderTest.php @@ -0,0 +1,17 @@ +setBasePath(sys_get_temp_dir()); + $app->instance('config', new Repository()); + + return $app; + } +} diff --git a/tests/LumenAwsServiceProviderTest.php b/tests/LumenAwsServiceProviderTest.php new file mode 100644 index 0000000..cb10ed4 --- /dev/null +++ b/tests/LumenAwsServiceProviderTest.php @@ -0,0 +1,17 @@ +instance('config', new Repository()); + + return $app; + } +} From f6b2bbf72f9890b23f17a9669859cdca8b50e6d8 Mon Sep 17 00:00:00 2001 From: Jonathan Eskew Date: Sun, 17 Jan 2016 22:31:42 -0800 Subject: [PATCH 040/100] Test both Laravel and Lumen without requiring either --- .travis.yml | 4 +- CHANGELOG.md | 74 +++++++++++++++++++++++++ Makefile | 41 ++++++++++++++ composer.json | 8 ++- tests/LaravelAwsServiceProviderTest.php | 9 +++ tests/LumenAwsServiceProviderTest.php | 9 +++ 6 files changed, 140 insertions(+), 5 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 Makefile diff --git a/.travis.yml b/.travis.yml index 9bcf7bc..20a49ec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ matrix: allow_failures: - php: hhvm -install: travis_retry composer install --no-interaction --prefer-source +install: travis_retry composer install --no-interaction -script: vendor/bin/phpunit +script: make test diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..0a4c633 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,74 @@ +# CHANGELOG + +## next release + +* Added test coverage for version 5.2 of both Lumen and Laravel. + +## 3.0.3 - 2015-09-18 + +* Added support for configuring credentials with environmental variables, a ini + file at `~/.aws/credentials`, or with Ec2 instance profiles instead of + requiring their inclusion in the `aws.php` config file. + +## 3.0.3 - 2015-08-10 + +* Removed usage of a dev dependency + +## 3.0.1 - 2015-08-05 + +* Provide version information to SDK user agent + +## 3.0.0 - 2015-06-10 + +* Service provider is now compatible with Laravel 5.1 and Version 3 of the AWS + SDK for PHP. + +## 2.0.1 - 2015-06-10 + +* Service provider is now compatible with Lumen + +## 2.0.0 - 2015-03-12 + +* Updated the service provider to work with Laravel 5. + +## 1.1.2 - 2015-02-13 + +* Added alias to support DI from container. + +## 1.1.1 - 2014-05-12 + +* Updated default module config file to make it more compatible with environment + credentials + +## 1.1.0 - 2013-09-03 + +* Added package-level config that can be published with Artisan +* Updated config loading logic to support package-level config +* Updated config loading logic to support AWS SDK for PHP config files via the + `config_file` key +* Updated code, tests, and the README to support the config refactoring +* This module is now following [semver](http://semver.org/) + +## 1.0.4 - 2013-06-20 + +* Added support for the AWS facade +* Updated `composer.json` to require only specific components of Laravel +* Updated `composer.json` to require version 2.2+ of the AWS SDK for PHP + +## 1.0.3 - 2013-04-25 + +* Update Composer dependencies to work with newer version of the AWS SDK for PHP + and Laravel + +## 1.0.2 - 2013-03-11 + +* Fixed an issue with config retrieval + +## 1.0.1 - 2013-03-07 + +* Improved usage instructions in the README +* Fixed logic for retrieving Laravel version + +## 1.0.0 - 2013-02-13 + +* Initial release. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..327cf0f --- /dev/null +++ b/Makefile @@ -0,0 +1,41 @@ +test: test-laravel test-lumen + +test-laravel: + composer require laravel/framework + vendor/bin/phpunit + make uninstall-laravel + +test-lumen: + composer require laravel/lumen-framework + vendor/bin/phpunit + make uninstall-lumen + +uninstall-illuminate: + rm -rf vendor/laravel + rm -rf vendor/illuminate + +uninstall-laravel: uninstall-illuminate + composer remove laravel/framework + +uninstall-lumen: uninstall-illuminate + composer remove laravel/lumen-framework + +# Ensures that the TAG variable was passed to the make command +check-tag: + $(if $(TAG),,$(error TAG is not defined. Pass via "make tag TAG=4.2.1")) + +# Creates a release but does not push it. This task updates the changelog +# with the TAG environment variable, replaces the VERSION constant, ensures +# that the source is still valid after updating, commits the changelog and +# updated VERSION constant, creates an annotated git tag using chag, and +# prints out a diff of the last commit. +tag: check-tag test + @echo Tagging $(TAG) + chag update $(TAG) + sed -i '' -e "s/VERSION = '.*'/VERSION = '$(TAG)'/" src/AwsServiceProvider.php + php -l src/AwsBundle.php + git commit -a -m '$(TAG) release' + chag tag + @echo "Release has been created. Push using 'make release'" + @echo "Changes made in the release commit" + git diff HEAD~1 HEAD diff --git a/composer.json b/composer.json index 97ced0c..35d20ee 100644 --- a/composer.json +++ b/composer.json @@ -17,9 +17,11 @@ "illuminate/support": "~5.1" }, "require-dev": { - "laravel/framework": "~5.2", - "phpunit/phpunit": "~4.0", - "laravel/lumen-framework": "~5.2" + "phpunit/phpunit": "~4.0|~5.0" + }, + "suggest": { + "laravel/framework": "To test the Laravel bindings", + "laravel/lumen-framework": "To test the Lumen bindings" }, "autoload": { "psr-4": { "Aws\\Laravel\\": "src/" } diff --git a/tests/LaravelAwsServiceProviderTest.php b/tests/LaravelAwsServiceProviderTest.php index 0fbd7f9..85f24d6 100644 --- a/tests/LaravelAwsServiceProviderTest.php +++ b/tests/LaravelAwsServiceProviderTest.php @@ -5,6 +5,15 @@ class LaravelAwsServiceProviderTest extends AwsServiceProviderTest { + public function setUp() + { + if (!class_exists(Application::class)) { + $this->markTestSkipped(); + } + + parent::setUp(); + } + protected function setupApplication() { // Create the application such that the config is loaded. diff --git a/tests/LumenAwsServiceProviderTest.php b/tests/LumenAwsServiceProviderTest.php index cb10ed4..ff301c4 100644 --- a/tests/LumenAwsServiceProviderTest.php +++ b/tests/LumenAwsServiceProviderTest.php @@ -6,6 +6,15 @@ class LumenAwsServiceProviderTest extends AwsServiceProviderTest { + public function setUp() + { + if (!class_exists(Application::class)) { + $this->markTestSkipped(); + } + + parent::setUp(); + } + protected function setupApplication() { // Create the application such that the config is loaded. From 3b946892d493b91b4920ec4facc4a0ad7195fb86 Mon Sep 17 00:00:00 2001 From: Jonathan Eskew Date: Sun, 17 Jan 2016 22:57:07 -0800 Subject: [PATCH 041/100] 3.1.0 release --- CHANGELOG.md | 4 ++-- Makefile | 4 ++-- src/AwsServiceProvider.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a4c633..30e006a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # CHANGELOG -## next release +## 3.1.0 - 2016-01-17 -* Added test coverage for version 5.2 of both Lumen and Laravel. +* Added support for Lumen. ## 3.0.3 - 2015-09-18 diff --git a/Makefile b/Makefile index 327cf0f..d401d86 100644 --- a/Makefile +++ b/Makefile @@ -29,11 +29,11 @@ check-tag: # that the source is still valid after updating, commits the changelog and # updated VERSION constant, creates an annotated git tag using chag, and # prints out a diff of the last commit. -tag: check-tag test +tag: check-tag @echo Tagging $(TAG) chag update $(TAG) sed -i '' -e "s/VERSION = '.*'/VERSION = '$(TAG)'/" src/AwsServiceProvider.php - php -l src/AwsBundle.php + php -l src/AwsServiceProvider.php git commit -a -m '$(TAG) release' chag tag @echo "Release has been created. Push using 'make release'" diff --git a/src/AwsServiceProvider.php b/src/AwsServiceProvider.php index 3167d17..2907599 100644 --- a/src/AwsServiceProvider.php +++ b/src/AwsServiceProvider.php @@ -10,7 +10,7 @@ */ class AwsServiceProvider extends ServiceProvider { - const VERSION = '3.0.1'; + const VERSION = '3.1.0'; /** * Indicates if loading of the provider is deferred. From 24b3e9429d248a4002bcff3af50c99a19fb21cd4 Mon Sep 17 00:00:00 2001 From: Jonathan Eskew Date: Sun, 17 Jan 2016 23:19:18 -0800 Subject: [PATCH 042/100] Update Makefile for Travis environment --- .travis.yml | 2 +- Makefile | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 20a49ec..87560a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ matrix: allow_failures: - php: hhvm -install: travis_retry composer install --no-interaction +install: travis_retry composer install --no-interaction --prefer-source script: make test diff --git a/Makefile b/Makefile index d401d86..dbc14c9 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,6 @@ -test: test-laravel test-lumen +test: remove-deps + make test-laravel + make test-lumen test-laravel: composer require laravel/framework @@ -10,14 +12,13 @@ test-lumen: vendor/bin/phpunit make uninstall-lumen -uninstall-illuminate: - rm -rf vendor/laravel - rm -rf vendor/illuminate +remove-deps: + rm -rf vendor -uninstall-laravel: uninstall-illuminate +uninstall-laravel: remove-deps composer remove laravel/framework -uninstall-lumen: uninstall-illuminate +uninstall-lumen: remove-deps composer remove laravel/lumen-framework # Ensures that the TAG variable was passed to the make command From df128d471ada84eb2fc41429ac573d4562268f7e Mon Sep 17 00:00:00 2001 From: nick fan Date: Sat, 30 Jan 2016 11:37:13 +0800 Subject: [PATCH 043/100] modify for in phar support --- src/AwsServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AwsServiceProvider.php b/src/AwsServiceProvider.php index 2907599..47fd45c 100644 --- a/src/AwsServiceProvider.php +++ b/src/AwsServiceProvider.php @@ -26,7 +26,7 @@ class AwsServiceProvider extends ServiceProvider */ public function boot() { - $source = realpath(__DIR__ . '/../config/aws.php'); + $source = dirname(__DIR__).'/config/aws.php'; if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) { $this->publishes([$source => config_path('aws.php')]); From acca382743f673864f164ef44e3cb88c6939fe19 Mon Sep 17 00:00:00 2001 From: chejingy Date: Mon, 11 Jul 2016 22:24:07 -0700 Subject: [PATCH 044/100] Add documentation for credential option when upgrade larval 5.2.0 --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index a470f17..5aaaa5d 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,9 @@ return [ ]; ``` +Referring Laravel 5.2.0 [Upgrade guide](https://laravel.com/docs/5.2/upgrade#upgrade-5.2.0), you must using config
 +file instead of environment variable option if using php artisan `config:cache`. + Learn more about [configuring the SDK](http://docs.aws.amazon.com/aws-sdk-php/v3/guide/guide/configuration.html) on the SDK's User Guide. From aa316aa66ae551004c7b5df057f1ffc9df45f0d7 Mon Sep 17 00:00:00 2001 From: "Jean C. Garcia" Date: Mon, 28 Nov 2016 17:18:24 -0200 Subject: [PATCH 045/100] installation in lumen (#110) * installation in lumen * add a new line * removing rows --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5aaaa5d..6cef693 100644 --- a/README.md +++ b/README.md @@ -36,9 +36,18 @@ Then run a composer update php composer.phar update ``` -To use the AWS Service Provider, you must register the provider when bootstrapping your Laravel application. +To use the AWS Service Provider, you must register the provider when bootstrapping your application. -Find the `providers` key in your `config/app.php` and register the AWS Service Provider. + +### Lumen +In Lumen find the `Register Service Providers` in your `bootstrap/app.php` and register the AWS Service Provider. + +```php + $app->register(Aws\Laravel\AwsServiceProvider::class); +``` + +### Laravel +In Laravel find the `providers` key in your `config/app.php` and register the AWS Service Provider. ```php 'providers' => array( From 40703e9f6336687353fdb90ba4f5488b52e00136 Mon Sep 17 00:00:00 2001 From: Abdelrahman Omran Date: Wed, 14 Jun 2017 14:03:16 +0200 Subject: [PATCH 046/100] Support Auto-Discovery https://medium.com/@taylorotwell/package-auto-discovery-in-laravel-5-5-ea9e3ab20518 --- composer.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/composer.json b/composer.json index 35d20ee..143dfd4 100644 --- a/composer.json +++ b/composer.json @@ -28,5 +28,15 @@ }, "autoload-dev": { "psr-4": { "Aws\\Laravel\\Test\\": "tests/" } + }, + "extra": { + "laravel": { + "providers": [ + "Aws\\Laravel\\AwsServiceProvider" + ], + "aliases": { + "AWS": "Aws\\Laravel\\AwsFacade" + } + } } } From 80dc250e2d21ee66c800043101f4860e694d4509 Mon Sep 17 00:00:00 2001 From: Ilia Smirnov Date: Thu, 2 Nov 2017 15:03:24 +0300 Subject: [PATCH 047/100] added --provider option for vendor:publish command It prevents you from accidentally publishing resources from other service providers (if any) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6cef693..1038d49 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ AWS_REGION (default = us-east-1) To customize the configuration file, publish the package configuration using Artisan. ```sh -php artisan vendor:publish +php artisan vendor:publish --provider="Aws\Laravel\AwsServiceProvider" ``` Update your settings in the generated `app/config/aws.php` configuration file. From dd9e5ea204a5af38dd288a7ab2f01d964505da3d Mon Sep 17 00:00:00 2001 From: Athul B Raj Date: Sat, 23 Dec 2017 12:44:25 +0530 Subject: [PATCH 048/100] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1038d49..ced994e 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Build Status](https://img.shields.io/travis/aws/aws-sdk-php-laravel.svg)](https://travis-ci.org/aws/aws-sdk-php-laravel) [![Latest Stable Version](https://img.shields.io/packagist/v/aws/aws-sdk-php-laravel.svg)](https://packagist.org/packages/aws/aws-sdk-php-laravel) [![Total Downloads](https://img.shields.io/packagist/dt/aws/aws-sdk-php-laravel.svg)](https://packagist.org/packages/aws/aws-sdk-php-laravel) -[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/aws/aws-sdk-php?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/aws/aws-sdk-php?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) This is a simple [Laravel](http://laravel.com/) service provider for making it easy to include the official [AWS SDK for PHP](https://github.com/aws/aws-sdk-php) in your Laravel and Lumen applications. From b99ef74160487b1e3ecd27c71ab0abd752434f29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Melo?= Date: Thu, 26 Apr 2018 18:44:53 +0100 Subject: [PATCH 049/100] Updated location of aws config file in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1038d49..15dcc59 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ To customize the configuration file, publish the package configuration using Art php artisan vendor:publish --provider="Aws\Laravel\AwsServiceProvider" ``` -Update your settings in the generated `app/config/aws.php` configuration file. +Update your settings in the generated `config/aws.php` configuration file. ```php return [ From 61f58397f632595c2f00714796d41fd2bc381e32 Mon Sep 17 00:00:00 2001 From: Howard Lopez Date: Fri, 19 Oct 2018 11:37:43 -0700 Subject: [PATCH 050/100] Fix composer dependency resolution issue for Travis & PHP 5.5.9 --- .travis.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 87560a8..fb2de7f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,10 @@ matrix: allow_failures: - php: hhvm -install: travis_retry composer install --no-interaction --prefer-source +install: + - if [[ ${TRAVIS_PHP_VERSION} == "5.5.9" ]]; + then travis_retry composer require laravel/framework; + else travis_retry composer update --no-interaction --prefer-source; + fi script: make test - From b58031f64bdaf3777dea0a47380dd7ee552748e7 Mon Sep 17 00:00:00 2001 From: Howard Lopez Date: Fri, 19 Oct 2018 11:38:36 -0700 Subject: [PATCH 051/100] Update Travis CI with later PHP versions --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index fb2de7f..4845340 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,13 +4,17 @@ php: - 5.5.9 - 5.6 - 7.0 + - 7.1 + - 7.2 - hhvm + - nightly sudo: false matrix: allow_failures: - php: hhvm + - php: nightly install: - if [[ ${TRAVIS_PHP_VERSION} == "5.5.9" ]]; From 379eb23c62509ea2ddafef86a6d3311e28235bb3 Mon Sep 17 00:00:00 2001 From: Howard Lopez Date: Fri, 19 Oct 2018 16:48:48 -0700 Subject: [PATCH 052/100] 3.2.1 release --- CHANGELOG.md | 12 ++++++++++++ src/AwsServiceProvider.php | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 30e006a..952d560 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # CHANGELOG +## 3.2.1 - 2018-10-19 + +* Update Travis CI with later PHP versions +* Fix composer dependency resolution issue for Travis & PHP 5.5.9 +* Updated location of aws config file in README.md +* Update README.md + +## 3.2.0 - 2018-09-28 + +* Added --provider option for vendor:publish command +* Added support for Laravel Auto-Discovery + ## 3.1.0 - 2016-01-17 * Added support for Lumen. diff --git a/src/AwsServiceProvider.php b/src/AwsServiceProvider.php index 47fd45c..d3a11e9 100644 --- a/src/AwsServiceProvider.php +++ b/src/AwsServiceProvider.php @@ -10,7 +10,7 @@ */ class AwsServiceProvider extends ServiceProvider { - const VERSION = '3.1.0'; + const VERSION = '3.2.1'; /** * Indicates if loading of the provider is deferred. From 4b32304d78b437afca9f065328a150d576a66320 Mon Sep 17 00:00:00 2001 From: Howard Lopez Date: Tue, 6 Nov 2018 16:59:39 -0800 Subject: [PATCH 053/100] Added credentials to config file with preference for .env file --- config/aws.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/aws.php b/config/aws.php index 8f86c66..d39b13b 100644 --- a/config/aws.php +++ b/config/aws.php @@ -16,7 +16,10 @@ | http://docs.aws.amazon.com/aws-sdk-php/v3/guide/guide/configuration.html | */ - + 'credentials' => [ + 'key' => env('AWS_ACCESS_KEY_ID', ''), + 'secret' => env('AWS_SECRET_ACCESS_KEY', ''), + ], 'region' => env('AWS_REGION', 'us-east-1'), 'version' => 'latest', 'ua_append' => [ From 83221a082db4a1472f707742987eb9f599da2e5d Mon Sep 17 00:00:00 2001 From: Howard Lopez Date: Wed, 7 Nov 2018 12:32:06 -0800 Subject: [PATCH 054/100] Update README with config changes --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0064308..398ec4e 100644 --- a/README.md +++ b/README.md @@ -80,15 +80,15 @@ To customize the configuration file, publish the package configuration using Art php artisan vendor:publish --provider="Aws\Laravel\AwsServiceProvider" ``` -Update your settings in the generated `config/aws.php` configuration file. +The settings can be found in the generated `config/aws.php` configuration file. By default, the credentials and region settings will pull from your `.env` file. ```php return [ 'credentials' => [ - 'key' => 'YOUR_AWS_ACCESS_KEY_ID', - 'secret' => 'YOUR_AWS_SECRET_ACCESS_KEY', + 'key' => env('AWS_ACCESS_KEY_ID', ''), + 'secret' => env('AWS_SECRET_ACCESS_KEY', ''), ], - 'region' => 'us-west-2', + 'region' => env('AWS_REGION', 'us-east-1'), 'version' => 'latest', // You can override settings for specific services From ef616fc7bb5a3a3d06d18268fd70f3bc227a1d31 Mon Sep 17 00:00:00 2001 From: Howard Lopez Date: Fri, 9 Nov 2018 15:43:38 -0800 Subject: [PATCH 055/100] README tweak --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 398ec4e..f97f757 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,8 @@ return [ ]; ``` +Note that you can always delete the `credentials` line from this file if you'd like to use the [default SDK Configuration Provider chain](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_credentials.html#default-credential-chain) instead. + Referring Laravel 5.2.0 [Upgrade guide](https://laravel.com/docs/5.2/upgrade#upgrade-5.2.0), you must using config
 file instead of environment variable option if using php artisan `config:cache`. From 16f12cb553ac1ea5f3a0acd95b2d4363fbd317ab Mon Sep 17 00:00:00 2001 From: Howard Lopez Date: Mon, 12 Nov 2018 13:56:17 -0800 Subject: [PATCH 056/100] 3.3.0 release --- CHANGELOG.md | 4 ++++ src/AwsServiceProvider.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 952d560..78a24c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 3.3.0 - 2018-11-12 + +* Adds AWS credentials to published service provider configuration by default + ## 3.2.1 - 2018-10-19 * Update Travis CI with later PHP versions diff --git a/src/AwsServiceProvider.php b/src/AwsServiceProvider.php index d3a11e9..2f5e2b9 100644 --- a/src/AwsServiceProvider.php +++ b/src/AwsServiceProvider.php @@ -10,7 +10,7 @@ */ class AwsServiceProvider extends ServiceProvider { - const VERSION = '3.2.1'; + const VERSION = '3.3.0'; /** * Indicates if loading of the provider is deferred. From 4449ed0434c0748bfa3f1f335b4305c24d5c803a Mon Sep 17 00:00:00 2001 From: Howard Lopez <38118252+howardlopez@users.noreply.github.com> Date: Mon, 3 Dec 2018 14:34:51 -0800 Subject: [PATCH 057/100] Modify service provider to use different config for publishing and default usage (#149) --- config/aws_default.php | 25 +++++++++++++++++++++++++ config/{aws.php => aws_publish.php} | 6 +++--- src/AwsServiceProvider.php | 8 ++++---- 3 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 config/aws_default.php rename config/{aws.php => aws_publish.php} (83%) diff --git a/config/aws_default.php b/config/aws_default.php new file mode 100644 index 0000000..8d02f8d --- /dev/null +++ b/config/aws_default.php @@ -0,0 +1,25 @@ + env('AWS_REGION', 'us-east-1'), + 'version' => 'latest', + 'ua_append' => [ + 'L5MOD/' . AwsServiceProvider::VERSION, + ], +]; diff --git a/config/aws.php b/config/aws_publish.php similarity index 83% rename from config/aws.php rename to config/aws_publish.php index d39b13b..cae7408 100644 --- a/config/aws.php +++ b/config/aws_publish.php @@ -10,9 +10,9 @@ |-------------------------------------------------------------------------- | | The configuration options set in this file will be passed directly to the - | `Aws\Sdk` object, from which all client objects are created. The minimum - | required options are declared here, but the full set of possible options - | are documented at: + | `Aws\Sdk` object, from which all client objects are created. This file + | is published to the application config directory for modification by the + | user. The full set of possible options are documented at: | http://docs.aws.amazon.com/aws-sdk-php/v3/guide/guide/configuration.html | */ diff --git a/src/AwsServiceProvider.php b/src/AwsServiceProvider.php index 2f5e2b9..739e06f 100644 --- a/src/AwsServiceProvider.php +++ b/src/AwsServiceProvider.php @@ -26,15 +26,15 @@ class AwsServiceProvider extends ServiceProvider */ public function boot() { - $source = dirname(__DIR__).'/config/aws.php'; - if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) { - $this->publishes([$source => config_path('aws.php')]); + $this->publishes([ + dirname(__DIR__).'/config/aws_publish.php' => config_path('aws.php') + ]); } elseif ($this->app instanceof LumenApplication) { $this->app->configure('aws'); } - $this->mergeConfigFrom($source, 'aws'); + $this->mergeConfigFrom(dirname(__DIR__).'/config/aws_default.php', 'aws'); } /** From 33ea9fdd86530eeade9ba02ac630524eb89088ac Mon Sep 17 00:00:00 2001 From: Howard Lopez Date: Mon, 3 Dec 2018 14:37:23 -0800 Subject: [PATCH 058/100] 3.3.1 release --- CHANGELOG.md | 4 ++++ src/AwsServiceProvider.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78a24c1..ff38b2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 3.3.1 - 2018-12-3 + +* Modify service provider to use different config for publishing and default usage + ## 3.3.0 - 2018-11-12 * Adds AWS credentials to published service provider configuration by default diff --git a/src/AwsServiceProvider.php b/src/AwsServiceProvider.php index 739e06f..c071a47 100644 --- a/src/AwsServiceProvider.php +++ b/src/AwsServiceProvider.php @@ -10,7 +10,7 @@ */ class AwsServiceProvider extends ServiceProvider { - const VERSION = '3.3.0'; + const VERSION = '3.3.1'; /** * Indicates if loading of the provider is deferred. From 0594ccf58db2c2239332d6566377541b492578c3 Mon Sep 17 00:00:00 2001 From: Matthew Nessworthy Date: Thu, 14 Mar 2019 20:11:44 +0100 Subject: [PATCH 059/100] Align with suggested laravel config practices (#145) --- src/AwsServiceProvider.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/AwsServiceProvider.php b/src/AwsServiceProvider.php index c071a47..2361230 100644 --- a/src/AwsServiceProvider.php +++ b/src/AwsServiceProvider.php @@ -27,14 +27,13 @@ class AwsServiceProvider extends ServiceProvider public function boot() { if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) { - $this->publishes([ - dirname(__DIR__).'/config/aws_publish.php' => config_path('aws.php') - ]); + $this->publishes( + [__DIR__.'/../config/aws_publish.php' => config_path('aws.php')], + 'aws-config' + ); } elseif ($this->app instanceof LumenApplication) { $this->app->configure('aws'); } - - $this->mergeConfigFrom(dirname(__DIR__).'/config/aws_default.php', 'aws'); } /** @@ -44,6 +43,11 @@ public function boot() */ public function register() { + $this->mergeConfigFrom( + __DIR__.'/../config/aws_default.php', + 'aws' + ); + $this->app->singleton('aws', function ($app) { $config = $app->make('config')->get('aws'); From 03124f83f6a96c1460e0487eef2e08795c50b4b9 Mon Sep 17 00:00:00 2001 From: Howard Lopez <38118252+howardlopez@users.noreply.github.com> Date: Thu, 14 Mar 2019 15:07:36 -0700 Subject: [PATCH 060/100] Composer & Travis updates (#155) * Add lumen unit test dependency * Add PHP 7.3 to travis * Travis install tweak * Travis install tweak #2 --- .travis.yml | 12 +++++++++--- composer.json | 3 ++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4845340..19b4f88 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ php: - 7.0 - 7.1 - 7.2 + - 7.3 - hhvm - nightly @@ -17,9 +18,14 @@ matrix: - php: nightly install: - - if [[ ${TRAVIS_PHP_VERSION} == "5.5.9" ]]; - then travis_retry composer require laravel/framework; - else travis_retry composer update --no-interaction --prefer-source; + - if [ ${TRAVIS_PHP_VERSION} == "5.5.9" ]; then + travis_retry composer require laravel/framework "5.2.*"; + elif [ ${TRAVIS_PHP_VERSION} == "5.6" ]; then + travis_retry composer require laravel/framework "5.4.*"; + elif [ ${TRAVIS_PHP_VERSION} == "7.0" ]; then + travis_retry composer require laravel/framework "5.5.*"; + else + travis_retry composer update --no-interaction --prefer-source; fi script: make test diff --git a/composer.json b/composer.json index 143dfd4..2e3ecd2 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,8 @@ "illuminate/support": "~5.1" }, "require-dev": { - "phpunit/phpunit": "~4.0|~5.0" + "phpunit/phpunit": "~4.0|~5.0", + "vlucas/phpdotenv": "~2.0|~3.0" }, "suggest": { "laravel/framework": "To test the Laravel bindings", From 3e8e8801d6666bc60dfaf5429febceb84eed0cec Mon Sep 17 00:00:00 2001 From: Howard Lopez Date: Fri, 15 Mar 2019 10:57:46 -0700 Subject: [PATCH 061/100] 3.3.2 release --- CHANGELOG.md | 5 +++++ src/AwsServiceProvider.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff38b2d..9591150 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # CHANGELOG +## 3.3.2 - 2019-03-15 + +* Align with suggested Laravel configuration practices +* Travis CI updated with PHP 7.3 and dependency resolution fixes + ## 3.3.1 - 2018-12-3 * Modify service provider to use different config for publishing and default usage diff --git a/src/AwsServiceProvider.php b/src/AwsServiceProvider.php index 2361230..3164cbf 100644 --- a/src/AwsServiceProvider.php +++ b/src/AwsServiceProvider.php @@ -10,7 +10,7 @@ */ class AwsServiceProvider extends ServiceProvider { - const VERSION = '3.3.1'; + const VERSION = '3.3.2'; /** * Indicates if loading of the provider is deferred. From 942eadb31005d4a11b1aa0823f550e9761811618 Mon Sep 17 00:00:00 2001 From: Howard Lopez <38118252+howardlopez@users.noreply.github.com> Date: Tue, 7 May 2019 16:19:44 -0700 Subject: [PATCH 062/100] Fix memory_limit issue for travis CI build (#163) --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 19b4f88..74812ec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,6 +17,9 @@ matrix: - php: hhvm - php: nightly +before_install: +- echo "memory_limit=3G" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini + install: - if [ ${TRAVIS_PHP_VERSION} == "5.5.9" ]; then travis_retry composer require laravel/framework "5.2.*"; From 670d375e3a815098d805597e084d8de2e2dd6f2f Mon Sep 17 00:00:00 2001 From: Alex Diehl Date: Wed, 8 May 2019 16:25:56 -0700 Subject: [PATCH 063/100] Adding issue templates (#162) * Adding templates for feature requests and general issues * Making general issue template more inclusive --- .github/ISSUE_TEMPLATE/feature_request.md | 21 +++++++++++++++ .github/ISSUE_TEMPLATE/general_issue.md | 32 +++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/general_issue.md diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..214d7e2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,21 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: feature-request +assignees: '' + +--- + +### Is this related to a problem? +A clear and concise description of the issue, e.g. I'm always frustrated when... + +### Feature description +Describe what you want to happen. + +### Describe alternatives you've considered +Any alternative solutions or features you've considered. + +### Additional context +Add any other context or screenshots about the feature request here. + diff --git a/.github/ISSUE_TEMPLATE/general_issue.md b/.github/ISSUE_TEMPLATE/general_issue.md new file mode 100644 index 0000000..92ee2a6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/general_issue.md @@ -0,0 +1,32 @@ +--- +name: General issue +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +Please fill out the sections below to help us address your issue. + +### Version of AWS SDK for PHP? + + +### Version of AWS Service Provider for Laravel? + + +### Version of Laravel (`php artisan --version`)? + + +### Version of PHP (`php -v`)? + + +### What issue did you see? + + +### Steps to reproduce +If you have a runnable example, please include it as a snippet or link to a repository/gist for larger code examples. + +### Additional context +Any additional information relevant to the issue, for example PHP/environment config settings if the issue is related to memory or performance. + From d4e526752b57c0b1e4b3df2135f34f215ba47d0b Mon Sep 17 00:00:00 2001 From: John Martin <1130387+ptcrash@users.noreply.github.com> Date: Wed, 26 Jun 2019 10:34:59 -0500 Subject: [PATCH 064/100] Corrected dead link (#164) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f97f757..c63d2f8 100644 --- a/README.md +++ b/README.md @@ -108,8 +108,8 @@ the SDK's User Guide. ## Usage -In order to use the AWS SDK for PHP within your app, you need to retrieve it from the [Laravel IoC -Container](http://laravel.com/docs/ioc). The following example uses the Amazon S3 client to upload a file. +In order to use the AWS SDK for PHP within your app, you need to retrieve it from the [Laravel Service +Container](https://laravel.com/docs/container#binding). The following example uses the Amazon S3 client to upload a file. ```php $s3 = App::make('aws')->createClient('s3'); From ddc64ed9ad1f6b841da16cae8237fbbeff7e643a Mon Sep 17 00:00:00 2001 From: Andrew Minion Date: Wed, 3 Jul 2019 19:46:52 -0500 Subject: [PATCH 065/100] add a Lumen example --- README.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c63d2f8..5cd6565 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ return [ ], 'region' => env('AWS_REGION', 'us-east-1'), 'version' => 'latest', - + // You can override settings for specific services 'Ses' => [ 'region' => 'us-east-1', @@ -109,7 +109,7 @@ the SDK's User Guide. ## Usage In order to use the AWS SDK for PHP within your app, you need to retrieve it from the [Laravel Service -Container](https://laravel.com/docs/container#binding). The following example uses the Amazon S3 client to upload a file. +Container](https://laravel.com/docs/container#binding). The following example uses the Amazon S3 client to upload a file (in the full Laravel framework). ```php $s3 = App::make('aws')->createClient('s3'); @@ -121,7 +121,7 @@ $s3->putObject(array( ``` If the AWS facade is registered within the `aliases` section of the application configuration, you can also use the -following technique. +following technique (in the full Laravel framework). ```php $s3 = AWS::createClient('s3'); @@ -132,6 +132,17 @@ $s3->putObject(array( )); ``` +To use in Lumen, you need to retrieve it from the service container a bit differently: + +```php +$s3 = app('aws')->createClient('s3'); +$s3->putObject(array( + 'Bucket' => 'YOUR_BUCKET', + 'Key' => 'YOUR_OBJECT_KEY', + 'SourceFile' => '/the/path/to/the/file/you/are/uploading.ext', +)); +``` + ## Links * [AWS SDK for PHP on Github](http://github.com/aws/aws-sdk-php/) From 390f1e0011587796e2796ea871eebf781bebdd06 Mon Sep 17 00:00:00 2001 From: Howard Lopez <38118252+howardlopez@users.noreply.github.com> Date: Mon, 9 Sep 2019 13:56:23 -0700 Subject: [PATCH 066/100] Laravel 6 support & Travis updates (#170) * Add PHP 7.4 to travis builds * Add illuminate 6.0 to allowed composer versions * Use trusty distribution for Travis CI * Makefile uninstall change * Update README --- .travis.yml | 4 ++++ Makefile | 2 ++ README.md | 2 +- composer.json | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 74812ec..be33e16 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,5 @@ +dist: trusty + language: php php: @@ -7,6 +9,7 @@ php: - 7.1 - 7.2 - 7.3 + - 7.4 - hhvm - nightly @@ -16,6 +19,7 @@ matrix: allow_failures: - php: hhvm - php: nightly + - php: 7.4 before_install: - echo "memory_limit=3G" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini diff --git a/Makefile b/Makefile index dbc14c9..1f286a4 100644 --- a/Makefile +++ b/Makefile @@ -17,9 +17,11 @@ remove-deps: uninstall-laravel: remove-deps composer remove laravel/framework + composer remove illuminate/support uninstall-lumen: remove-deps composer remove laravel/lumen-framework + composer remove illuminate/support # Ensures that the TAG variable was passed to the make command check-tag: diff --git a/README.md b/README.md index c63d2f8..8139321 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ PHP and Laravel 5.1. **Major Versions:** -* **3.x** (YOU ARE HERE) - For `laravel/framework:~5.1` and `aws/aws-sdk-php:~3.0` +* **3.x** (YOU ARE HERE) - For `laravel/framework:~5.1|~6.0` and `aws/aws-sdk-php:~3.0` * **2.x** ([2.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/2.0)) - For `laravel/framework:5.0.*` and `aws/aws-sdk-php:~2.4` * **1.x** ([1.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/1.0)) - For `laravel/framework:4.*` and `aws/aws-sdk-php:~2.4` diff --git a/composer.json b/composer.json index 2e3ecd2..a8ebfc5 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "require": { "php": ">=5.5.9", "aws/aws-sdk-php": "~3.0", - "illuminate/support": "~5.1" + "illuminate/support": "~5.1|~6.0" }, "require-dev": { "phpunit/phpunit": "~4.0|~5.0", From 90f72efd7ec85c1141b397079112f58e0ca0143b Mon Sep 17 00:00:00 2001 From: Howard Lopez Date: Mon, 9 Sep 2019 14:00:25 -0700 Subject: [PATCH 067/100] 3.4.0 release --- CHANGELOG.md | 5 +++++ src/AwsServiceProvider.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9591150..4f7430c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # CHANGELOG +## 3.4.0 - 2019-09-09 + +* Adds support for Laravel 6.0 +* Travis CI configuration updates + ## 3.3.2 - 2019-03-15 * Align with suggested Laravel configuration practices diff --git a/src/AwsServiceProvider.php b/src/AwsServiceProvider.php index 3164cbf..fc53b3c 100644 --- a/src/AwsServiceProvider.php +++ b/src/AwsServiceProvider.php @@ -10,7 +10,7 @@ */ class AwsServiceProvider extends ServiceProvider { - const VERSION = '3.3.2'; + const VERSION = '3.4.0'; /** * Indicates if loading of the provider is deferred. From 6ab12dbe4d5f0280eb7106796b5efd8d1faf1f6e Mon Sep 17 00:00:00 2001 From: Matthew Nessworthy Date: Wed, 11 Mar 2020 20:26:48 +0100 Subject: [PATCH 068/100] Laravel 7 Support (#181) * Laravel 7 Support * Build matrix * double matrix * lumen 7 dev * cache * version constraint update * Update .travis.yml --- .travis.yml | 66 ++++++++++++++++++++++++++++++--------------------- Makefile | 11 +++++---- README.md | 4 ++-- composer.json | 10 ++++---- 4 files changed, 53 insertions(+), 38 deletions(-) diff --git a/.travis.yml b/.travis.yml index be33e16..96f44ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,38 +1,50 @@ dist: trusty -language: php - -php: - - 5.5.9 - - 5.6 - - 7.0 - - 7.1 - - 7.2 - - 7.3 - - 7.4 - - hhvm - - nightly +cache: + directories: + - $HOME/.composer/cache/files -sudo: false +language: php matrix: allow_failures: - - php: hhvm - php: nightly + + include: + - php: 5.5.9 + env: LARAVEL="5.1.*" LUMEN="5.1.*" + - php: hhvm-3.18 + env: LARAVEL="5.1.*" LUMEN="5.1.*" + - php: 7.0 + env: LARAVEL="5.5.*" LUMEN="5.5.*" + - php: 7.1 + env: LARAVEL="^5.5" LUMEN="^5.5" + - php: 7.2 + env: LARAVEL="^5.5" LUMEN="^5.5" + - php: 7.2 + env: LARAVEL="^6.0" LUMEN="^6.0" + - php: 7.2 + env: LARAVEL="^7.0" LUMEN="^7.0@dev" + - php: 7.3 + env: LARAVEL="^6.0" LUMEN="^6.0" + - php: 7.3 + env: LARAVEL="^7.0" LUMEN="^7.0@dev" - php: 7.4 + env: LARAVEL="^6.0" LUMEN="^6.0" + - php: 7.4 + env: LARAVEL="^7.0" LUMEN="^7.0@dev" + - php: nightly + env: LARAVEL="^6.0" LUMEN="^6.0" + - php: nightly + env: LARAVEL="^7.0" LUMEN="^7.0@dev" before_install: -- echo "memory_limit=3G" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - -install: - - if [ ${TRAVIS_PHP_VERSION} == "5.5.9" ]; then - travis_retry composer require laravel/framework "5.2.*"; - elif [ ${TRAVIS_PHP_VERSION} == "5.6" ]; then - travis_retry composer require laravel/framework "5.4.*"; - elif [ ${TRAVIS_PHP_VERSION} == "7.0" ]; then - travis_retry composer require laravel/framework "5.5.*"; - else - travis_retry composer update --no-interaction --prefer-source; - fi + - echo "memory_limit=3G" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini -script: make test +script: + - travis_retry composer require laravel/framework:${LARAVEL} --no-interaction --prefer-dist + - vendor/bin/phpunit + - composer remove laravel/framework + - rm composer.lock + - travis_retry composer require laravel/lumen-framework:${LUMEN} --no-interaction --prefer-dist + - vendor/bin/phpunit diff --git a/Makefile b/Makefile index 1f286a4..f474a25 100644 --- a/Makefile +++ b/Makefile @@ -14,14 +14,17 @@ test-lumen: remove-deps: rm -rf vendor + rm composer.lock -uninstall-laravel: remove-deps +uninstall-laravel: + make remove-deps composer remove laravel/framework - composer remove illuminate/support + make remove-deps -uninstall-lumen: remove-deps +uninstall-lumen: + make remove-deps composer remove laravel/lumen-framework - composer remove illuminate/support + make remove-deps # Ensures that the TAG variable was passed to the make command check-tag: diff --git a/README.md b/README.md index 8139321..565b851 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# AWS Service Provider for Laravel 5 +# AWS Service Provider for Laravel 5/6/7 [![@awsforphp on Twitter](http://img.shields.io/badge/twitter-%40awsforphp-blue.svg?style=flat)](https://twitter.com/awsforphp) [![Build Status](https://img.shields.io/travis/aws/aws-sdk-php-laravel.svg)](https://travis-ci.org/aws/aws-sdk-php-laravel) @@ -14,7 +14,7 @@ PHP and Laravel 5.1. **Major Versions:** -* **3.x** (YOU ARE HERE) - For `laravel/framework:~5.1|~6.0` and `aws/aws-sdk-php:~3.0` +* **3.x** (YOU ARE HERE) - For `laravel/framework:~5.1|~6.0|~7.0` and `aws/aws-sdk-php:~3.0` * **2.x** ([2.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/2.0)) - For `laravel/framework:5.0.*` and `aws/aws-sdk-php:~2.4` * **1.x** ([1.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/1.0)) - For `laravel/framework:4.*` and `aws/aws-sdk-php:~2.4` diff --git a/composer.json b/composer.json index a8ebfc5..a8304a3 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,8 @@ { "name": "aws/aws-sdk-php-laravel", "homepage": "http://aws.amazon.com/sdkforphp2", - "description": "A simple Laravel 5 service provider for including the AWS SDK for PHP.", - "keywords": ["laravel", "laravel 5", "aws", "amazon", "sdk", "s3", "ec2", "dynamodb"], + "description": "A simple Laravel 5/6/7 service provider for including the AWS SDK for PHP.", + "keywords": ["laravel", "laravel 5", "laravel 6", "laravel 7", "aws", "amazon", "sdk", "s3", "ec2", "dynamodb"], "type":"library", "license":"Apache-2.0", "authors":[ @@ -14,11 +14,11 @@ "require": { "php": ">=5.5.9", "aws/aws-sdk-php": "~3.0", - "illuminate/support": "~5.1|~6.0" + "illuminate/support": "^5.1 || ^6.0 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.0|~5.0", - "vlucas/phpdotenv": "~2.0|~3.0" + "phpunit/phpunit": "^4.0 || ^5.0", + "vlucas/phpdotenv": "^1.0 || ^2.0 || ^3.0 || ^4.0" }, "suggest": { "laravel/framework": "To test the Laravel bindings", From 7a3705461c06dc1ce8496fbf9b22ec96f769b3a7 Mon Sep 17 00:00:00 2001 From: Howard Lopez Date: Wed, 11 Mar 2020 12:35:23 -0700 Subject: [PATCH 069/100] 3.5.0 release --- CHANGELOG.md | 5 +++++ src/AwsServiceProvider.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f7430c..77e65cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # CHANGELOG +## 3.5.0 - 2020-03-11 + +* Adds support for Laravel 7.0 +* Travis CI configuration updates + ## 3.4.0 - 2019-09-09 * Adds support for Laravel 6.0 diff --git a/src/AwsServiceProvider.php b/src/AwsServiceProvider.php index fc53b3c..2914f6f 100644 --- a/src/AwsServiceProvider.php +++ b/src/AwsServiceProvider.php @@ -10,7 +10,7 @@ */ class AwsServiceProvider extends ServiceProvider { - const VERSION = '3.4.0'; + const VERSION = '3.5.0'; /** * Indicates if loading of the provider is deferred. From 20c825920b202c554f05e112c4cb7b95086f170f Mon Sep 17 00:00:00 2001 From: Alex Diehl Date: Thu, 26 Mar 2020 13:27:10 -0700 Subject: [PATCH 070/100] Updating issue templates (#182) --- .github/ISSUE_TEMPLATE/bug-report.md | 42 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/documentation.md | 23 +++++++++++++ .github/ISSUE_TEMPLATE/feature-request.md | 20 +++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 21 ------------ .github/ISSUE_TEMPLATE/general_issue.md | 32 ----------------- .github/ISSUE_TEMPLATE/questions-help.md | 29 ++++++++++++++++ 6 files changed, 114 insertions(+), 53 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug-report.md create mode 100644 .github/ISSUE_TEMPLATE/documentation.md create mode 100644 .github/ISSUE_TEMPLATE/feature-request.md delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 .github/ISSUE_TEMPLATE/general_issue.md create mode 100644 .github/ISSUE_TEMPLATE/questions-help.md diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md new file mode 100644 index 0000000..9dceb49 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -0,0 +1,42 @@ +--- +name: "\U0001F41B Bug report" +about: Create a report to help us improve +title: '' +labels: needs-triage, bug report +assignees: '' + +--- + +Confirm by changing [ ] to [x] below to ensure that it's a bug: +- [ ] I've gone though [Developer Guide](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/welcome.html) and [API reference](https://docs.aws.amazon.com/aws-sdk-php/v3/api/index.html) +- [ ] I've checked [AWS Forums](https://forums.aws.amazon.com) and [StackOverflow](https://stackoverflow.com/questions/tagged/aws-php-sdk) for answers +- [ ] I've searched for [previous similar issues](https://github.com/aws/aws-sdk-php-laravel/issues) and didn't find any solution + +**Describe the bug** +A clear and concise description of what the bug is. + +**Version of AWS SDK for PHP?** +Example: v3.133.6 +* get SDK version by printing the output of `Aws\Sdk::VERSION` in your code +* if the SDK was installed via composer you can see the version installed with `composer show -i` + +**Version of AWS Service Provider for Laravel?** + + +**Version of Laravel (`php artisan --version`)?** + + +**Version of PHP (`php -v`)?** + + +**To Reproduce (observed behavior)** +Steps to reproduce the behavior (please share code or minimal repo) + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Additional context** +Any additional information relevant to the issue. Examples include any framework you may be using (e.g. Laravel, Wordpress) in conjunction with the AWS SDK for PHP, or PHP/environment config settings if the issue is related to memory or performance. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/documentation.md b/.github/ISSUE_TEMPLATE/documentation.md new file mode 100644 index 0000000..9dd63f2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation.md @@ -0,0 +1,23 @@ +--- +name: "\U0001F4DDDocumentation" +about: Suggest incorrect/improvement in documentation +title: '' +labels: needs-triage, documentation +assignees: '' + +--- + +**Describe the issue with documentation** +A clear and concise description of what the issue is. + +**To Reproduce (observed behavior)** +Steps to reproduce the behavior (please share code or minimal repo) + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Additional context** +Add any other context about the problem here. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md new file mode 100644 index 0000000..c48cd8f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -0,0 +1,20 @@ +--- +name: "\U0001F680 Feature request" +about: Suggest an idea for this project +title: '' +labels: needs-triage, feature-request +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 214d7e2..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: feature-request -assignees: '' - ---- - -### Is this related to a problem? -A clear and concise description of the issue, e.g. I'm always frustrated when... - -### Feature description -Describe what you want to happen. - -### Describe alternatives you've considered -Any alternative solutions or features you've considered. - -### Additional context -Add any other context or screenshots about the feature request here. - diff --git a/.github/ISSUE_TEMPLATE/general_issue.md b/.github/ISSUE_TEMPLATE/general_issue.md deleted file mode 100644 index 92ee2a6..0000000 --- a/.github/ISSUE_TEMPLATE/general_issue.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: General issue -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - -Please fill out the sections below to help us address your issue. - -### Version of AWS SDK for PHP? - - -### Version of AWS Service Provider for Laravel? - - -### Version of Laravel (`php artisan --version`)? - - -### Version of PHP (`php -v`)? - - -### What issue did you see? - - -### Steps to reproduce -If you have a runnable example, please include it as a snippet or link to a repository/gist for larger code examples. - -### Additional context -Any additional information relevant to the issue, for example PHP/environment config settings if the issue is related to memory or performance. - diff --git a/.github/ISSUE_TEMPLATE/questions-help.md b/.github/ISSUE_TEMPLATE/questions-help.md new file mode 100644 index 0000000..530d8aa --- /dev/null +++ b/.github/ISSUE_TEMPLATE/questions-help.md @@ -0,0 +1,29 @@ +--- +name: "\U0001F4AC Questions / Help" +about: If you have questions, please check AWS Forums or StackOverflow +title: '' +labels: needs-triage, guidance +assignees: '' + +--- + +Confirm by changing [ ] to [x] below: +- [ ] I've gone though [Developer Guide](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/welcome.html) and [API reference](https://docs.aws.amazon.com/aws-sdk-php/v3/api/index.html) +- [ ] I've checked [AWS Forums](https://forums.aws.amazon.com) and [StackOverflow](https://stackoverflow.com/questions/tagged/aws-php-sdk) for answers + +**Version of AWS SDK for PHP?** +Example: v3.133.6 +* get SDK version by printing the output of `Aws\Sdk::VERSION` in your code +* if the SDK was installed via composer you can see the version installed with `composer show -i` + +**Version of AWS Service Provider for Laravel?** + + +**Version of Laravel (`php artisan --version`)?** + + +**Version of PHP (`php -v`)?** + + +**Describe the question** + From f6f49dba60b8f960a10636575040598ff747eee5 Mon Sep 17 00:00:00 2001 From: diehlaws Date: Wed, 22 Apr 2020 21:36:02 -0700 Subject: [PATCH 071/100] Fix labels applied to bug report template --- .github/ISSUE_TEMPLATE/bug-report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 9dceb49..0feab0d 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -2,7 +2,7 @@ name: "\U0001F41B Bug report" about: Create a report to help us improve title: '' -labels: needs-triage, bug report +labels: needs-triage, bug assignees: '' --- From a28391726355179955557a9a9c2c513a212fb7d8 Mon Sep 17 00:00:00 2001 From: Alex Diehl Date: Tue, 26 May 2020 12:21:04 -0700 Subject: [PATCH 072/100] Add stale issue cleanup action (#186) --- .github/workflows/stale_issues.yml | 45 ++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/stale_issues.yml diff --git a/.github/workflows/stale_issues.yml b/.github/workflows/stale_issues.yml new file mode 100644 index 0000000..1156d97 --- /dev/null +++ b/.github/workflows/stale_issues.yml @@ -0,0 +1,45 @@ +name: "Close stale issues" + +# Controls when the action will run. +on: + schedule: + - cron: "0 0 * * *" + +jobs: + cleanup: + runs-on: ubuntu-latest + name: Stale issue job + steps: + - uses: aws-actions/stale-issue-cleanup@v3 + with: + # Setting messages to an empty string will cause the automation to skip + # that category + ancient-issue-message: We have noticed this issue has not recieved attention in 3 years. We will close this issue for now. If you think this is in error, please feel free to comment and reopen the issue. + stale-issue-message: This issue has not recieved a response in 1 week. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled. + + # These labels are required + stale-issue-label: closing-soon + exempt-issue-label: no-autoclose + stale-pr-label: no-pr-activity + exempt-pr-label: awaiting-approval + response-requested-label: response-requested + + # Don't set closed-for-staleness label to skip closing very old issues + # regardless of label + closed-for-staleness-label: closed-for-staleness + + # Issue timing + days-before-stale: 7 + days-before-close: 4 + days-before-ancient: 1095 + + # If you don't want to mark a issue as being ancient based on a + # threshold of "upvotes", you can set this here. An "upvote" is + # the total number of +1, heart, hooray, and rocket reactions + # on an issue. + minimum-upvotes-to-exempt: 10 + + repo-token: ${{ secrets.GITHUB_TOKEN }} + loglevel: DEBUG + # Set dry-run to true to not perform label or close actions. + # dry-run: true \ No newline at end of file From f8b9f153011799ecb4eab6c0eec9524781d93d95 Mon Sep 17 00:00:00 2001 From: Alex Diehl Date: Fri, 17 Jul 2020 23:29:39 +0000 Subject: [PATCH 073/100] Updating common files --- CODE_OF_CONDUCT.md | 4 ++ CONTRIBUTING.md | 120 +++++++++++++++++++++++++++++++++++++++++++++ README.md | 42 +++++++++++++--- 3 files changed, 159 insertions(+), 7 deletions(-) create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..5dccd4c --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,4 @@ +## Code of Conduct +This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). +For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact +opensource-codeofconduct@amazon.com with any additional questions or comments. \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..4322c0c --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,120 @@ +# Contributing to the AWS Service Provider for Laravel + +Thank you for your interest in contributing to the AWS Service Provider for Laravel! +We work hard to provide a high-quality and useful SDK for our AWS services, and +we greatly value feedback and contributions from our community. Whether it's a +new feature, correction, or additional documentation, we welcome your pull requests. +Please submit your [issues][] or [pull requests][pull-requests] through GitHub. + +Jump To: + +* [Bug Reports](_#Bug-Reports_) +* [Feature Requests](_#Feature-Requests_) +* [Code Contributions](_#Code-Contributions_) + +## How to contribute + +*Before you send us a pull request, please be sure that:* + +1. You're working from the latest source on the master branch. +2. You check existing open, and recently closed, pull requests to be sure that + someone else hasn't already addressed the problem. +3. You create an issue before working on a contribution that will take a significant + amount of your time. + +*Creating a Pull Request* + +1. Fork the repository. +2. In your fork, make your change in a branch that's based on this repo's master branch. +3. Commit the change to your fork, using a clear and descriptive commit message. +4. Create a pull request, answering any questions in the pull request form. + +For contributions that will take a significant amount of time, open a new issue to pitch +your idea before you get started. Explain the problem and describe the content you want to +see added to the documentation. Let us know if you'll write it yourself or if you'd like us +to help. We'll discuss your proposal with you and let you know whether we're likely to +accept it. + +## Bug Reports + +Bug reports are accepted through the [Issues][] page. + +Before Submitting: + +* Do a search through the existing issues to make sure it has not already been reported. + If it has, comment your experience or +1 so we prioritize it. +* If possible, upgrade to the latest release of the SDK. It's possible the bug has + already been fixed in the latest version. + +Writing the Bug Report: + +Please ensure that your bug report has the following: + +* A short, descriptive title. Ideally, other community members should be able to get a + good idea of the issue just from reading the title. +* A detailed description of the problem you're experiencing. This should include: + * Expected behavior of the SDK and the actual behavior exhibited. + * Any details of your application environment that may be relevant. + * Debug information, stack trace or logs. +* If you are able to create one, include a Minimal Working Example that reproduces the issue. +* Use Markdown to make the report easier to read; i.e. use code blocks when pasting a + code snippet. + +## Feature Requests + +Open an [issue][issues] with the following: + +* A short, descriptive title. Ideally, other community members should be able to get a + good idea of the feature just from reading the title. +* A detailed description of the the proposed feature. + * Why it should be added to the SDK. + * If possible, example code to illustrate how it should work. +* Use Markdown to make the request easier to read; +* If you intend to implement this feature, indicate that you'd like to the issue to be + assigned to you. + + +## Code Contributions + +Code contributions to the SDK are done through [Pull Requests][pull-requests]. The list below are guidelines to use when submitting pull requests. These are the +same set of guidelines that the core contributors use when submitting changes, and +we ask the same of all community contributions as well: + +1. The SDK is released under the [Apache license][license]. Any code you submit + will be released under that license. For substantial contributions, we may + ask you to sign a [Contributor License Agreement (CLA)][cla]. +2. We follow all of the relevant PSR recommendations from the [PHP Framework + Interop Group][php-fig]. Please submit code that follows these standards. + The [PHP CS Fixer][cs-fixer] tool can be helpful for formatting your code. +3. We maintain a high percentage of code coverage in our unit tests. If you make + changes to the code, please add, update, and/or remove tests as appropriate. +4. Static code analysis with [PHPStan][phpstan] is automatically run on the `src` + directory for submitted pull requests. If there is a case that needs to be + ignored by static analysis, please update the `ignoreErrors` section in the + `phpstan.neon` config file in your PR, and point out why this case warrants + ignoring. +5. If your code does not conform to the PSR standards, does not include adequate + tests, or does not contain a changelog document, we may ask you to update + your pull requests before we accept them. We also reserve the right to deny + any pull requests that do not align with our standards or goals. +6. If you would like to implement support for a significant feature that is not + yet available in the SDK, please talk to us beforehand to avoid any + duplication of effort. +7. We greatly appreciate contributions to our User Guide. The docs are written + as a [Sphinx][] website formatted with [reStructuredText][] (very similar to + Markdown). The User Guide is located in another repository. Please go to the + [awsdocs/aws-php-developers-guide](https://github.com/awsdocs/aws-php-developers-guide/). + repository to suggest edits for the User Guide. +8. If you are working on the SDK, make sure to check out the `Makefile` for some + of the common tasks that we have to do. + + +[issues]: https://github.com/aws/aws-sdk-php-laravel/issues +[pull-requests]: https://github.com/aws/aws-sdk-php-laravel/pulls +[license]: http://aws.amazon.com/apache2.0/ +[cla]: https://github.com/aws/aws-cla/blob/master/amazon-single-contribution-license.txt +[php-fig]: http://php-fig.org +[cs-fixer]: http://cs.sensiolabs.org/ +[phpstan]: https://github.com/phpstan/phpstan +[sphinx]: http://sphinx-doc.org/ +[restructuredtext]: http://sphinx-doc.org/rest.html diff --git a/README.md b/README.md index 565b851..2c618fd 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,15 @@ PHP and Laravel 5.1. * **2.x** ([2.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/2.0)) - For `laravel/framework:5.0.*` and `aws/aws-sdk-php:~2.4` * **1.x** ([1.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/1.0)) - For `laravel/framework:4.*` and `aws/aws-sdk-php:~2.4` -## Installation +Jump To: +* [Getting Started](_#Getting-Started_) +* [Getting Help](_#Getting-Help_) +* [Contributing](_#Contributing_) +* [More Resources](_#Resources_) +## Getting Started + +### Installation The AWS Service Provider can be installed via [Composer](http://getcomposer.org) by requiring the `aws/aws-sdk-php-laravel` package in your project's `composer.json`. @@ -39,14 +46,14 @@ php composer.phar update To use the AWS Service Provider, you must register the provider when bootstrapping your application. -### Lumen +#### Lumen In Lumen find the `Register Service Providers` in your `bootstrap/app.php` and register the AWS Service Provider. ```php $app->register(Aws\Laravel\AwsServiceProvider::class); ``` -### Laravel +#### Laravel In Laravel find the `providers` key in your `config/app.php` and register the AWS Service Provider. ```php @@ -65,7 +72,7 @@ Find the `aliases` key in your `config/app.php` and add the AWS facade alias. ) ``` -## Configuration +### Configuration By default, the package uses the following environment variables to auto-configure the plugin without modification: ``` @@ -100,13 +107,13 @@ return [ Note that you can always delete the `credentials` line from this file if you'd like to use the [default SDK Configuration Provider chain](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_credentials.html#default-credential-chain) instead. -Referring Laravel 5.2.0 [Upgrade guide](https://laravel.com/docs/5.2/upgrade#upgrade-5.2.0), you must using config
 +Referring Laravel 5.2.0 [Upgrade guide](https://laravel.com/docs/5.2/upgrade#upgrade-5.2.0), you must using config file instead of environment variable option if using php artisan `config:cache`. Learn more about [configuring the SDK](http://docs.aws.amazon.com/aws-sdk-php/v3/guide/guide/configuration.html) on the SDK's User Guide. -## Usage +### Usage In order to use the AWS SDK for PHP within your app, you need to retrieve it from the [Laravel Service Container](https://laravel.com/docs/container#binding). The following example uses the Amazon S3 client to upload a file. @@ -132,7 +139,28 @@ $s3->putObject(array( )); ``` -## Links +## Getting Help + +Please use these community resources for getting help. We use the GitHub issues for tracking bugs and feature requests and have limited bandwidth to address them. + +* Ask a question on [StackOverflow](https://stackoverflow.com/) and tag it with [`aws-php-sdk`](http://stackoverflow.com/questions/tagged/aws-php-sdk) +* Come join the AWS SDK for PHP [gitter](https://gitter.im/aws/aws-sdk-php) +* Open a support ticket with [AWS Support](https://console.aws.amazon.com/support/home/) +* If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-php-laravel/issues/new/choose) + +This SDK implements AWS service APIs. For general issues regarding the AWS services and their limitations, you may also take a look at the [Amazon Web Services Discussion Forums](https://forums.aws.amazon.com/). + +### Opening Issues + +If you encounter a bug with `aws-sdk-php-laravel` we would like to hear about it. Search the existing issues and try to make sure your problem doesn’t already exist before opening a new issue. It’s helpful if you include the version of `aws-sdk-php-laravel`, PHP version and OS you’re using. Please include a stack trace and reduced repro case when appropriate, too. + +The GitHub issues are intended for bug reports and feature requests. For help and questions with using `aws-sdk-php` please make use of the resources listed in the Getting Help section. There are limited resources available for handling issues and by keeping the list of open issues lean we can respond in a timely manner. + +## Contributing + +We work hard to provide a high-quality and useful SDK for our AWS services, and we greatly value feedback and contributions from our community. Please review our [contributing guidelines](./CONTRIBUTING.md) before submitting any issues or pull requests to ensure we have all the necessary information to effectively respond to your bug report or contribution. + +## Resources * [AWS SDK for PHP on Github](http://github.com/aws/aws-sdk-php/) * [AWS SDK for PHP website](http://aws.amazon.com/sdkforphp/) From f9ad1298caf5aaf2d7f61e9a8200b37cdc3b497c Mon Sep 17 00:00:00 2001 From: Ben Kuskopf Date: Tue, 15 Sep 2020 03:31:33 +1000 Subject: [PATCH 074/100] Add Laravel 8 support (#191) * Add Laravel 8 to Composer * Update composer.json * Update .travis.yml * Update .travis.yml * Update README.md * Upgrade dev dependancies * Update composer.json --- .travis.yml | 12 +++++++++--- README.md | 4 ++-- composer.json | 8 ++++---- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 96f44ff..12ceee5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,15 +28,21 @@ matrix: - php: 7.3 env: LARAVEL="^6.0" LUMEN="^6.0" - php: 7.3 - env: LARAVEL="^7.0" LUMEN="^7.0@dev" + env: LARAVEL="^7.0" LUMEN="^7.0" + - php: 7.3 + env: LARAVEL="^8.0" LUMEN="^8.0@dev" - php: 7.4 env: LARAVEL="^6.0" LUMEN="^6.0" - php: 7.4 - env: LARAVEL="^7.0" LUMEN="^7.0@dev" + env: LARAVEL="^7.0" LUMEN="^7.0" + - php: 7.4 + env: LARAVEL="^8.0" LUMEN="^8.0@dev" - php: nightly env: LARAVEL="^6.0" LUMEN="^6.0" - php: nightly - env: LARAVEL="^7.0" LUMEN="^7.0@dev" + env: LARAVEL="^7.0" LUMEN="^7.0" + - php: nightly + env: LARAVEL="^8.0" LUMEN="^8.0@dev" before_install: - echo "memory_limit=3G" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini diff --git a/README.md b/README.md index 2c618fd..6b08f68 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# AWS Service Provider for Laravel 5/6/7 +# AWS Service Provider for Laravel 5/6/7/8 [![@awsforphp on Twitter](http://img.shields.io/badge/twitter-%40awsforphp-blue.svg?style=flat)](https://twitter.com/awsforphp) [![Build Status](https://img.shields.io/travis/aws/aws-sdk-php-laravel.svg)](https://travis-ci.org/aws/aws-sdk-php-laravel) @@ -14,7 +14,7 @@ PHP and Laravel 5.1. **Major Versions:** -* **3.x** (YOU ARE HERE) - For `laravel/framework:~5.1|~6.0|~7.0` and `aws/aws-sdk-php:~3.0` +* **3.x** (YOU ARE HERE) - For `laravel/framework:~5.1|~6.0|~7.0|~8.0` and `aws/aws-sdk-php:~3.0` * **2.x** ([2.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/2.0)) - For `laravel/framework:5.0.*` and `aws/aws-sdk-php:~2.4` * **1.x** ([1.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/1.0)) - For `laravel/framework:4.*` and `aws/aws-sdk-php:~2.4` diff --git a/composer.json b/composer.json index a8304a3..427c541 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,8 @@ { "name": "aws/aws-sdk-php-laravel", "homepage": "http://aws.amazon.com/sdkforphp2", - "description": "A simple Laravel 5/6/7 service provider for including the AWS SDK for PHP.", - "keywords": ["laravel", "laravel 5", "laravel 6", "laravel 7", "aws", "amazon", "sdk", "s3", "ec2", "dynamodb"], + "description": "A simple Laravel 5/6/7/8 service provider for including the AWS SDK for PHP.", + "keywords": ["laravel", "laravel 5", "laravel 6", "laravel 7", "laravel 8", "aws", "amazon", "sdk", "s3", "ec2", "dynamodb"], "type":"library", "license":"Apache-2.0", "authors":[ @@ -14,11 +14,11 @@ "require": { "php": ">=5.5.9", "aws/aws-sdk-php": "~3.0", - "illuminate/support": "^5.1 || ^6.0 || ^7.0" + "illuminate/support": "^5.1 || ^6.0 || ^7.0 || ^8.0" }, "require-dev": { "phpunit/phpunit": "^4.0 || ^5.0", - "vlucas/phpdotenv": "^1.0 || ^2.0 || ^3.0 || ^4.0" + "vlucas/phpdotenv": "^1.0 || ^2.0 || ^3.0 || ^4.0 || ^5.0" }, "suggest": { "laravel/framework": "To test the Laravel bindings", From 49bc5d90b1ebfb107d0b650fd49b41b241425a36 Mon Sep 17 00:00:00 2001 From: Howard Lopez Date: Mon, 14 Sep 2020 10:33:55 -0700 Subject: [PATCH 075/100] 3.6.0 release --- CHANGELOG.md | 4 ++++ src/AwsServiceProvider.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77e65cc..863f6d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 3.6.0 - 2020-09-14 + +* Adds support for Laravel 8.0 + ## 3.5.0 - 2020-03-11 * Adds support for Laravel 7.0 diff --git a/src/AwsServiceProvider.php b/src/AwsServiceProvider.php index 2914f6f..05c02f4 100644 --- a/src/AwsServiceProvider.php +++ b/src/AwsServiceProvider.php @@ -10,7 +10,7 @@ */ class AwsServiceProvider extends ServiceProvider { - const VERSION = '3.5.0'; + const VERSION = '3.6.0'; /** * Indicates if loading of the provider is deferred. From 6a13771d07ebcd8bc7219004c1388614b717bd27 Mon Sep 17 00:00:00 2001 From: Somaya Date: Mon, 5 Oct 2020 14:43:38 -0700 Subject: [PATCH 076/100] Add closed issue message github action --- .github/workflows/closed-issue-message.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/closed-issue-message.yml diff --git a/.github/workflows/closed-issue-message.yml b/.github/workflows/closed-issue-message.yml new file mode 100644 index 0000000..3340afb --- /dev/null +++ b/.github/workflows/closed-issue-message.yml @@ -0,0 +1,17 @@ +name: Closed Issue Message +on: + issues: + types: [closed] +jobs: + auto_comment: + runs-on: ubuntu-latest + steps: + - uses: aws-actions/closed-issue-message@v1 + with: + # These inputs are both required + repo-token: "${{ secrets.GITHUB_TOKEN }}" + message: | + ### ⚠️COMMENT VISIBILITY WARNING⚠️ + Comments on closed issues are hard for our team to see. + If you need more assistance, please either tag a team member or open a new issue that references this one. + If you wish to keep having a conversation with other community members under this issue feel free to do so. From 0fd8a3c97deafcd2e9793989ccf9823636e948d2 Mon Sep 17 00:00:00 2001 From: sunaoka Date: Wed, 28 Jul 2021 11:27:51 +0900 Subject: [PATCH 077/100] Add .gitattributes Let's ignore these files and folder while installing this package via composer. --- .gitattributes | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9bef9e3 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,10 @@ +.gitattributes export-ignore +.github export-ignore +.gitignore export-ignore +.travis.yml export-ignore +CHANGELOG.md export-ignore +CONTRIBUTING.md export-ignore +Makefile export-ignore +README.md export-ignore +phpunit.xml export-ignore +tests export-ignore From d7a50eeb9c9567447ca9b3524aae042af6547dba Mon Sep 17 00:00:00 2001 From: SamRemis Date: Mon, 7 Mar 2022 22:33:20 -0500 Subject: [PATCH 078/100] Laravel 9 support (#209) Adds support for the latest version of laravel --- .github/workflows/tests.yml | 84 +++++++++++++++++++++++++++++++++++++ .travis.yml | 56 ------------------------- README.md | 4 +- composer.json | 6 +-- 4 files changed, 89 insertions(+), 61 deletions(-) create mode 100644 .github/workflows/tests.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..0f26ad9 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,84 @@ +name: PHP Composer + +#whenever master has a PR or is pushed to +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + run: + runs-on: ubuntu-18.04 + strategy: + #for each of the following versions of PHP, with and without --prefer-lowest + matrix: + php-versions: ['5.5.0', '5.6.0', '7.0.0', '7.1.0', '7.2.0', '7.2.1', '7.2.2', '7.3.0', '7.3.1', '7.3.2', '7.4.0', '7.4.1', '7.4.2'] + include: + - php-versions: '5.5.0' + laravel-versions: '5.1.*' + - php-versions: '5.6.0' + laravel-versions: '5.1.*' + - php-versions: '7.0.0' + laravel-versions: '5.5.*' + - php-versions: '7.1.0' + laravel-versions: '^5.5' + - php-versions: '7.2.0' + laravel-versions: '^5.5' + - php-versions: '7.2.1' + laravel-versions: '^6.0' + - php-versions: '7.2.2' + laravel-versions: '^7.0' + - php-versions: '7.3.0' + laravel-versions: '^6.0' + - php-versions: '7.3.1' + laravel-versions: '^7.0' + - php-versions: '7.3.2' + laravel-versions: '^8.0' + - php-versions: '7.4.0' + laravel-versions: '^6.0' + - php-versions: '7.4.1' + laravel-versions: '^7.0' + - php-versions: '7.4.2' + laravel-versions: '^8.0' + + #set the name for each job + name: PHP ${{ matrix.php-versions }} + #set up environment variables used by unit tests + env: + AWS_ACCESS_KEY_ID: foo + AWS_SECRET_ACCESS_KEY: bar + AWS_CSM_ENABLED: false + steps: + #sets up the correct version of PHP with necessary config options + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + ini-values: memory_limit=4G, phar.readonly=false + + #checkout the codebase from github + - name: Checkout codebase + uses: actions/checkout@v3 + + #require laravel + - name: Require laravel + run: composer require laravel/framework:${{ matrix.laravel-versions }} --no-interaction --prefer-dist + + #run tests + - name: Run test suite + run: vendor/bin/phpunit + + #remove laravel + - name: Remove laravel + run: | + composer remove laravel/framework + rm composer.lock + + #require lumen + - name: Require lumen + run: composer require laravel/lumen-framework:${{ matrix.laravel-versions }} --no-interaction --prefer-dist + + #run tests + - name: Run test suite + run: vendor/bin/phpunit diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 12ceee5..0000000 --- a/.travis.yml +++ /dev/null @@ -1,56 +0,0 @@ -dist: trusty - -cache: - directories: - - $HOME/.composer/cache/files - -language: php - -matrix: - allow_failures: - - php: nightly - - include: - - php: 5.5.9 - env: LARAVEL="5.1.*" LUMEN="5.1.*" - - php: hhvm-3.18 - env: LARAVEL="5.1.*" LUMEN="5.1.*" - - php: 7.0 - env: LARAVEL="5.5.*" LUMEN="5.5.*" - - php: 7.1 - env: LARAVEL="^5.5" LUMEN="^5.5" - - php: 7.2 - env: LARAVEL="^5.5" LUMEN="^5.5" - - php: 7.2 - env: LARAVEL="^6.0" LUMEN="^6.0" - - php: 7.2 - env: LARAVEL="^7.0" LUMEN="^7.0@dev" - - php: 7.3 - env: LARAVEL="^6.0" LUMEN="^6.0" - - php: 7.3 - env: LARAVEL="^7.0" LUMEN="^7.0" - - php: 7.3 - env: LARAVEL="^8.0" LUMEN="^8.0@dev" - - php: 7.4 - env: LARAVEL="^6.0" LUMEN="^6.0" - - php: 7.4 - env: LARAVEL="^7.0" LUMEN="^7.0" - - php: 7.4 - env: LARAVEL="^8.0" LUMEN="^8.0@dev" - - php: nightly - env: LARAVEL="^6.0" LUMEN="^6.0" - - php: nightly - env: LARAVEL="^7.0" LUMEN="^7.0" - - php: nightly - env: LARAVEL="^8.0" LUMEN="^8.0@dev" - -before_install: - - echo "memory_limit=3G" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - -script: - - travis_retry composer require laravel/framework:${LARAVEL} --no-interaction --prefer-dist - - vendor/bin/phpunit - - composer remove laravel/framework - - rm composer.lock - - travis_retry composer require laravel/lumen-framework:${LUMEN} --no-interaction --prefer-dist - - vendor/bin/phpunit diff --git a/README.md b/README.md index 6b08f68..150a268 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# AWS Service Provider for Laravel 5/6/7/8 +# AWS Service Provider for Laravel 5/6/7/8/9 [![@awsforphp on Twitter](http://img.shields.io/badge/twitter-%40awsforphp-blue.svg?style=flat)](https://twitter.com/awsforphp) [![Build Status](https://img.shields.io/travis/aws/aws-sdk-php-laravel.svg)](https://travis-ci.org/aws/aws-sdk-php-laravel) @@ -14,7 +14,7 @@ PHP and Laravel 5.1. **Major Versions:** -* **3.x** (YOU ARE HERE) - For `laravel/framework:~5.1|~6.0|~7.0|~8.0` and `aws/aws-sdk-php:~3.0` +* **3.x** (YOU ARE HERE) - For `laravel/framework:~5.1|~6.0|~7.0|~8.0|9.0` and `aws/aws-sdk-php:~3.0` * **2.x** ([2.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/2.0)) - For `laravel/framework:5.0.*` and `aws/aws-sdk-php:~2.4` * **1.x** ([1.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/1.0)) - For `laravel/framework:4.*` and `aws/aws-sdk-php:~2.4` diff --git a/composer.json b/composer.json index 427c541..9a79269 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,8 @@ { "name": "aws/aws-sdk-php-laravel", "homepage": "http://aws.amazon.com/sdkforphp2", - "description": "A simple Laravel 5/6/7/8 service provider for including the AWS SDK for PHP.", - "keywords": ["laravel", "laravel 5", "laravel 6", "laravel 7", "laravel 8", "aws", "amazon", "sdk", "s3", "ec2", "dynamodb"], + "description": "A simple Laravel 5/6/7/8/9 service provider for including the AWS SDK for PHP.", + "keywords": ["laravel", "laravel 5", "laravel 6", "laravel 7", "laravel 8", "laravel 9", "aws", "amazon", "sdk", "s3", "ec2", "dynamodb"], "type":"library", "license":"Apache-2.0", "authors":[ @@ -14,7 +14,7 @@ "require": { "php": ">=5.5.9", "aws/aws-sdk-php": "~3.0", - "illuminate/support": "^5.1 || ^6.0 || ^7.0 || ^8.0" + "illuminate/support": "^5.1 || ^6.0 || ^7.0 || ^8.0 || ^9.0" }, "require-dev": { "phpunit/phpunit": "^4.0 || ^5.0", From cfae1e4e770704cf546051c0ba3d480f0031c51f Mon Sep 17 00:00:00 2001 From: Sam Remis Date: Tue, 8 Mar 2022 17:02:03 -0500 Subject: [PATCH 079/100] 3.7.0 release --- CHANGELOG.md | 2 +- src/AwsServiceProvider.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 863f6d1..c9b1095 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # CHANGELOG -## 3.6.0 - 2020-09-14 +## 3.7.0 - 2022-03-08 * Adds support for Laravel 8.0 diff --git a/src/AwsServiceProvider.php b/src/AwsServiceProvider.php index 05c02f4..60b1b69 100644 --- a/src/AwsServiceProvider.php +++ b/src/AwsServiceProvider.php @@ -10,7 +10,7 @@ */ class AwsServiceProvider extends ServiceProvider { - const VERSION = '3.6.0'; + const VERSION = '3.7.0'; /** * Indicates if loading of the provider is deferred. From b3dce011278c04feea944e93825c6453d3ecb6cd Mon Sep 17 00:00:00 2001 From: SamRemis Date: Tue, 15 Mar 2022 13:58:05 -0400 Subject: [PATCH 080/100] Changelog fix (#212) * Fix changelog entry --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9b1095..daf1d91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## 3.7.0 - 2022-03-08 +* Adds support for Laravel 9.0 +* Moves Travis CI tests to GitHub actions + +## 3.6.0 - 2020-09-14 + * Adds support for Laravel 8.0 ## 3.5.0 - 2020-03-11 From d7e771b51355e678a126cbeb810640882652fb91 Mon Sep 17 00:00:00 2001 From: kellertk Date: Thu, 31 Mar 2022 14:23:41 -0700 Subject: [PATCH 081/100] feat: Standardize issue templates for discussions --- .github/ISSUE_TEMPLATE/bug-report.md | 42 ------------- .github/ISSUE_TEMPLATE/bug-report.yml | 73 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 6 ++ .github/ISSUE_TEMPLATE/documentation.md | 23 ------- .github/ISSUE_TEMPLATE/documentation.yml | 23 +++++++ .github/ISSUE_TEMPLATE/feature-request.md | 20 ------ .github/ISSUE_TEMPLATE/feature-request.yml | 59 +++++++++++++++++ .github/ISSUE_TEMPLATE/questions-help.md | 29 --------- 8 files changed, 161 insertions(+), 114 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug-report.md create mode 100644 .github/ISSUE_TEMPLATE/bug-report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml delete mode 100644 .github/ISSUE_TEMPLATE/documentation.md create mode 100644 .github/ISSUE_TEMPLATE/documentation.yml delete mode 100644 .github/ISSUE_TEMPLATE/feature-request.md create mode 100644 .github/ISSUE_TEMPLATE/feature-request.yml delete mode 100644 .github/ISSUE_TEMPLATE/questions-help.md diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md deleted file mode 100644 index 0feab0d..0000000 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -name: "\U0001F41B Bug report" -about: Create a report to help us improve -title: '' -labels: needs-triage, bug -assignees: '' - ---- - -Confirm by changing [ ] to [x] below to ensure that it's a bug: -- [ ] I've gone though [Developer Guide](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/welcome.html) and [API reference](https://docs.aws.amazon.com/aws-sdk-php/v3/api/index.html) -- [ ] I've checked [AWS Forums](https://forums.aws.amazon.com) and [StackOverflow](https://stackoverflow.com/questions/tagged/aws-php-sdk) for answers -- [ ] I've searched for [previous similar issues](https://github.com/aws/aws-sdk-php-laravel/issues) and didn't find any solution - -**Describe the bug** -A clear and concise description of what the bug is. - -**Version of AWS SDK for PHP?** -Example: v3.133.6 -* get SDK version by printing the output of `Aws\Sdk::VERSION` in your code -* if the SDK was installed via composer you can see the version installed with `composer show -i` - -**Version of AWS Service Provider for Laravel?** - - -**Version of Laravel (`php artisan --version`)?** - - -**Version of PHP (`php -v`)?** - - -**To Reproduce (observed behavior)** -Steps to reproduce the behavior (please share code or minimal repo) - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Additional context** -Any additional information relevant to the issue. Examples include any framework you may be using (e.g. Laravel, Wordpress) in conjunction with the AWS SDK for PHP, or PHP/environment config settings if the issue is related to memory or performance. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 0000000..94d19fb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,73 @@ +--- +name: "🐛 Bug Report" +description: Report a bug +title: "(short issue description)" +labels: [bug, needs-triage] +assignees: [] +body: + - type: textarea + id: description + attributes: + label: Describe the bug + description: What is the problem? A clear and concise description of the bug. + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected Behavior + description: | + What did you expect to happen? + validations: + required: true + - type: textarea + id: current + attributes: + label: Current Behavior + description: | + What actually happened? + + Please include full errors, uncaught exceptions, stack traces, and relevant logs. + If service responses are relevant, please include wire logs. + validations: + required: true + - type: textarea + id: reproduction + attributes: + label: Reproduction Steps + description: | + Provide a self-contained, concise snippet of code that can be used to reproduce the issue. + For more complex issues provide a repo with the smallest sample that reproduces the bug. + + Avoid including business logic or unrelated code, it makes diagnosis more difficult. + The code sample should be an SSCCE. See http://sscce.org/ for details. In short, please provide a code sample that we can copy/paste, run and reproduce. + validations: + required: true + - type: textarea + id: solution + attributes: + label: Possible Solution + description: | + Suggest a fix/reason for the bug + validations: + required: false + - type: textarea + id: context + attributes: + label: Additional Information/Context + description: | + Anything else that might be relevant for troubleshooting this bug. Providing context helps us come up with a solution that is most useful in the real world. + validations: + required: false + - type: input + id: sdk-version + attributes: + label: SDK version used + validations: + required: true + - type: input + id: environment + attributes: + label: Environment details (OS name and version, etc.) + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..7c7ea35 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,6 @@ +--- +blank_issues_enabled: false +contact_links: + - name: 💬 General Question + url: https://github.com/aws/aws-sdk-php-laravel/discussions/categories/q-a + about: Please ask and answer questions as a discussion thread \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/documentation.md b/.github/ISSUE_TEMPLATE/documentation.md deleted file mode 100644 index 9dd63f2..0000000 --- a/.github/ISSUE_TEMPLATE/documentation.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: "\U0001F4DDDocumentation" -about: Suggest incorrect/improvement in documentation -title: '' -labels: needs-triage, documentation -assignees: '' - ---- - -**Describe the issue with documentation** -A clear and concise description of what the issue is. - -**To Reproduce (observed behavior)** -Steps to reproduce the behavior (please share code or minimal repo) - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Additional context** -Add any other context about the problem here. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/documentation.yml b/.github/ISSUE_TEMPLATE/documentation.yml new file mode 100644 index 0000000..7d73869 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation.yml @@ -0,0 +1,23 @@ +--- +name: "📕 Documentation Issue" +description: Report an issue in the API Reference documentation or Developer Guide +title: "(short issue description)" +labels: [documentation, needs-triage] +assignees: [] +body: + - type: textarea + id: description + attributes: + label: Describe the issue + description: A clear and concise description of the issue. + validations: + required: true + + - type: textarea + id: links + attributes: + label: Links + description: | + Include links to affected documentation page(s). + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md deleted file mode 100644 index c48cd8f..0000000 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: "\U0001F680 Feature request" -about: Suggest an idea for this project -title: '' -labels: needs-triage, feature-request -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 0000000..60d2431 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,59 @@ +--- +name: 🚀 Feature Request +description: Suggest an idea for this project +title: "(short issue description)" +labels: [feature-request, needs-triage] +assignees: [] +body: + - type: textarea + id: description + attributes: + label: Describe the feature + description: A clear and concise description of the feature you are proposing. + validations: + required: true + - type: textarea + id: use-case + attributes: + label: Use Case + description: | + Why do you need this feature? For example: "I'm always frustrated when..." + validations: + required: true + - type: textarea + id: solution + attributes: + label: Proposed Solution + description: | + Suggest how to implement the addition or change. Please include prototype/workaround/sketch/reference implementation. + validations: + required: false + - type: textarea + id: other + attributes: + label: Other Information + description: | + Any alternative solutions or features you considered, a more detailed explanation, stack traces, related issues, links for context, etc. + validations: + required: false + - type: checkboxes + id: ack + attributes: + label: Acknowledgements + options: + - label: I may be able to implement this feature request + required: false + - label: This feature might incur a breaking change + required: false + - type: input + id: sdk-version + attributes: + label: SDK version used + validations: + required: true + - type: input + id: environment + attributes: + label: Environment details (OS name and version, etc.) + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/questions-help.md b/.github/ISSUE_TEMPLATE/questions-help.md deleted file mode 100644 index 530d8aa..0000000 --- a/.github/ISSUE_TEMPLATE/questions-help.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -name: "\U0001F4AC Questions / Help" -about: If you have questions, please check AWS Forums or StackOverflow -title: '' -labels: needs-triage, guidance -assignees: '' - ---- - -Confirm by changing [ ] to [x] below: -- [ ] I've gone though [Developer Guide](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/welcome.html) and [API reference](https://docs.aws.amazon.com/aws-sdk-php/v3/api/index.html) -- [ ] I've checked [AWS Forums](https://forums.aws.amazon.com) and [StackOverflow](https://stackoverflow.com/questions/tagged/aws-php-sdk) for answers - -**Version of AWS SDK for PHP?** -Example: v3.133.6 -* get SDK version by printing the output of `Aws\Sdk::VERSION` in your code -* if the SDK was installed via composer you can see the version installed with `composer show -i` - -**Version of AWS Service Provider for Laravel?** - - -**Version of Laravel (`php artisan --version`)?** - - -**Version of PHP (`php -v`)?** - - -**Describe the question** - From 581f107a6171e7b48600ece820449be5f713a83f Mon Sep 17 00:00:00 2001 From: Mateus Junges Date: Tue, 14 Feb 2023 17:49:52 -0300 Subject: [PATCH 082/100] Add support for laravel 10 --- README.md | 2 +- composer.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 150a268..67b0b12 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ PHP and Laravel 5.1. **Major Versions:** -* **3.x** (YOU ARE HERE) - For `laravel/framework:~5.1|~6.0|~7.0|~8.0|9.0` and `aws/aws-sdk-php:~3.0` +* **3.x** (YOU ARE HERE) - For `laravel/framework:~5.1|~6.0|~7.0|~8.0|9.0|10.0` and `aws/aws-sdk-php:~3.0` * **2.x** ([2.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/2.0)) - For `laravel/framework:5.0.*` and `aws/aws-sdk-php:~2.4` * **1.x** ([1.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/1.0)) - For `laravel/framework:4.*` and `aws/aws-sdk-php:~2.4` diff --git a/composer.json b/composer.json index 9a79269..2eb8a7e 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "aws/aws-sdk-php-laravel", "homepage": "http://aws.amazon.com/sdkforphp2", "description": "A simple Laravel 5/6/7/8/9 service provider for including the AWS SDK for PHP.", - "keywords": ["laravel", "laravel 5", "laravel 6", "laravel 7", "laravel 8", "laravel 9", "aws", "amazon", "sdk", "s3", "ec2", "dynamodb"], + "keywords": ["laravel", "laravel 5", "laravel 6", "laravel 7", "laravel 8", "laravel 9", "laravel 10", "aws", "amazon", "sdk", "s3", "ec2", "dynamodb"], "type":"library", "license":"Apache-2.0", "authors":[ @@ -14,7 +14,7 @@ "require": { "php": ">=5.5.9", "aws/aws-sdk-php": "~3.0", - "illuminate/support": "^5.1 || ^6.0 || ^7.0 || ^8.0 || ^9.0" + "illuminate/support": "^5.1 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0" }, "require-dev": { "phpunit/phpunit": "^4.0 || ^5.0", From c25070078fab128f931be01eceb64f0355e70ac5 Mon Sep 17 00:00:00 2001 From: Mateus Junges Date: Tue, 14 Feb 2023 17:50:45 -0300 Subject: [PATCH 083/100] Update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 67b0b12..3708dd2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# AWS Service Provider for Laravel 5/6/7/8/9 +# AWS Service Provider for Laravel 5/6/7/8/9/10 [![@awsforphp on Twitter](http://img.shields.io/badge/twitter-%40awsforphp-blue.svg?style=flat)](https://twitter.com/awsforphp) [![Build Status](https://img.shields.io/travis/aws/aws-sdk-php-laravel.svg)](https://travis-ci.org/aws/aws-sdk-php-laravel) From 943174f4ea223a18142d8de34920776d065cd196 Mon Sep 17 00:00:00 2001 From: Mateus Junges Date: Tue, 14 Feb 2023 17:54:18 -0300 Subject: [PATCH 084/100] Allow plugins --- composer.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 2eb8a7e..481f1b4 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,10 @@ "autoload-dev": { "psr-4": { "Aws\\Laravel\\Test\\": "tests/" } }, - "extra": { + "config": { + "allow-plugins": true + }, + "extra": { "laravel": { "providers": [ "Aws\\Laravel\\AwsServiceProvider" From 868fcbd3d080c80a63a9340ce42156f7fc9e853f Mon Sep 17 00:00:00 2001 From: Mateus Junges Date: Tue, 14 Feb 2023 20:32:44 -0300 Subject: [PATCH 085/100] Add `--no-plugins` when installing composer dependencies for tests --- .github/workflows/tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0f26ad9..3f22b4c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -63,7 +63,7 @@ jobs: #require laravel - name: Require laravel - run: composer require laravel/framework:${{ matrix.laravel-versions }} --no-interaction --prefer-dist + run: composer require laravel/framework:${{ matrix.laravel-versions }} --no-interaction --prefer-dist --no-plugins #run tests - name: Run test suite @@ -72,12 +72,12 @@ jobs: #remove laravel - name: Remove laravel run: | - composer remove laravel/framework + composer remove laravel/framework --no-plugins rm composer.lock #require lumen - name: Require lumen - run: composer require laravel/lumen-framework:${{ matrix.laravel-versions }} --no-interaction --prefer-dist + run: composer require laravel/lumen-framework:${{ matrix.laravel-versions }} --no-interaction --prefer-dist --no-plugins #run tests - name: Run test suite From 3055e1f4a9fe4f85fe10dfcd89ad1baeba70b221 Mon Sep 17 00:00:00 2001 From: Mateus Junges Date: Tue, 14 Feb 2023 20:32:56 -0300 Subject: [PATCH 086/100] Revert "Allow plugins" This reverts commit 943174f4ea223a18142d8de34920776d065cd196. --- composer.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 481f1b4..2eb8a7e 100644 --- a/composer.json +++ b/composer.json @@ -30,10 +30,7 @@ "autoload-dev": { "psr-4": { "Aws\\Laravel\\Test\\": "tests/" } }, - "config": { - "allow-plugins": true - }, - "extra": { + "extra": { "laravel": { "providers": [ "Aws\\Laravel\\AwsServiceProvider" From a61fc41970a8a9b176c9ab9a80930702b9b339c8 Mon Sep 17 00:00:00 2001 From: Sean O'Brien Date: Wed, 15 Feb 2023 20:27:51 -0500 Subject: [PATCH 087/100] update CI to run tests against PHP 8-8.2 --- .github/workflows/tests.yml | 49 ++++++++++++++++--------- .gitignore | 3 +- composer.json | 3 +- tests/AwsServiceProviderTest.php | 5 ++- tests/LaravelAwsServiceProviderTest.php | 8 +--- tests/LumenAwsServiceProviderTest.php | 8 +--- 6 files changed, 41 insertions(+), 35 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3f22b4c..b4c1af0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,39 +11,53 @@ jobs: run: runs-on: ubuntu-18.04 strategy: - #for each of the following versions of PHP, with and without --prefer-lowest matrix: - php-versions: ['5.5.0', '5.6.0', '7.0.0', '7.1.0', '7.2.0', '7.2.1', '7.2.2', '7.3.0', '7.3.1', '7.3.2', '7.4.0', '7.4.1', '7.4.2'] include: - - php-versions: '5.5.0' + - php-versions: '5.5' laravel-versions: '5.1.*' - - php-versions: '5.6.0' + - php-versions: '5.6' laravel-versions: '5.1.*' - - php-versions: '7.0.0' + - php-versions: '7.0' laravel-versions: '5.5.*' - - php-versions: '7.1.0' + - php-versions: '7.1' laravel-versions: '^5.5' - - php-versions: '7.2.0' + - php-versions: '7.2' laravel-versions: '^5.5' - - php-versions: '7.2.1' + - php-versions: '7.2' laravel-versions: '^6.0' - - php-versions: '7.2.2' + - php-versions: '7.2' laravel-versions: '^7.0' - - php-versions: '7.3.0' + - php-versions: '7.3' laravel-versions: '^6.0' - - php-versions: '7.3.1' + - php-versions: '7.3' laravel-versions: '^7.0' - - php-versions: '7.3.2' + - php-versions: '7.3' laravel-versions: '^8.0' - - php-versions: '7.4.0' + - php-versions: '7.4' laravel-versions: '^6.0' - - php-versions: '7.4.1' + - php-versions: '7.4' laravel-versions: '^7.0' - - php-versions: '7.4.2' + - php-versions: '7.4' laravel-versions: '^8.0' + - php-versions: '8.0' + laravel-versions: '^7.0' + - php-versions: '8.0' + laravel-versions: '^8.0' + - php-versions: '8.0' + laravel-versions: '^9.0' + - php-versions: '8.1' + laravel-versions: '^8.0' + - php-versions: '8.1' + laravel-versions: '^9.0' + - php-versions: '8.1' + laravel-versions: '^10.0' + - php-versions: '8.2' + laravel-versions: '^9.0' + - php-versions: '8.2' + laravel-versions: '^10.0' #set the name for each job - name: PHP ${{ matrix.php-versions }} + name: PHP ${{ matrix.php-versions }} with Laravel ${{ matrix.laravel-versions }} #set up environment variables used by unit tests env: AWS_ACCESS_KEY_ID: foo @@ -77,8 +91,9 @@ jobs: #require lumen - name: Require lumen + if: ${{ matrix.laravel-versions != '^10.0' && (matrix.php-versions != '^8.0' && matrix.laravel-versions != '^7.0') }} run: composer require laravel/lumen-framework:${{ matrix.laravel-versions }} --no-interaction --prefer-dist --no-plugins #run tests - name: Run test suite - run: vendor/bin/phpunit + run: vendor/bin/phpunit \ No newline at end of file diff --git a/.gitignore b/.gitignore index 02eb855..75f93a5 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ composer.lock composer.phar vendor .idea -.DS_Store \ No newline at end of file +.DS_Store +.phpunit.result.cache \ No newline at end of file diff --git a/composer.json b/composer.json index 2eb8a7e..89960b8 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,8 @@ }, "require-dev": { "phpunit/phpunit": "^4.0 || ^5.0", - "vlucas/phpdotenv": "^1.0 || ^2.0 || ^3.0 || ^4.0 || ^5.0" + "vlucas/phpdotenv": "^1.0 || ^2.0 || ^3.0 || ^4.0 || ^5.0",,, + "yoast/phpunit-polyfills": "^1.0" }, "suggest": { "laravel/framework": "To test the Laravel bindings", diff --git a/tests/AwsServiceProviderTest.php b/tests/AwsServiceProviderTest.php index 3686345..69dd42f 100644 --- a/tests/AwsServiceProviderTest.php +++ b/tests/AwsServiceProviderTest.php @@ -3,8 +3,9 @@ use Aws\Laravel\AwsFacade as AWS; use Aws\Laravel\AwsServiceProvider; use Illuminate\Container\Container; +use Yoast\PHPUnitPolyfills\TestCases\TestCase; -abstract class AwsServiceProviderTest extends \PHPUnit_Framework_TestCase +abstract class AwsServiceProviderTest extends TestCase { public function testFacadeCanBeResolvedToServiceInstance() @@ -52,7 +53,7 @@ public function testVersionInformationIsProvidedToSdkUserAgent() $config = $app['config']->get('aws'); $this->assertArrayHasKey('ua_append', $config); - $this->assertInternalType('array', $config['ua_append']); + $this->assertIsArray($config['ua_append']); $this->assertNotEmpty($config['ua_append']); $this->assertNotEmpty(array_filter($config['ua_append'], function ($ua) { return false !== strpos($ua, AwsServiceProvider::VERSION); diff --git a/tests/LaravelAwsServiceProviderTest.php b/tests/LaravelAwsServiceProviderTest.php index 85f24d6..dc20c09 100644 --- a/tests/LaravelAwsServiceProviderTest.php +++ b/tests/LaravelAwsServiceProviderTest.php @@ -5,17 +5,11 @@ class LaravelAwsServiceProviderTest extends AwsServiceProviderTest { - public function setUp() + protected function setupApplication() { if (!class_exists(Application::class)) { $this->markTestSkipped(); } - - parent::setUp(); - } - - protected function setupApplication() - { // Create the application such that the config is loaded. $app = new Application(); $app->setBasePath(sys_get_temp_dir()); diff --git a/tests/LumenAwsServiceProviderTest.php b/tests/LumenAwsServiceProviderTest.php index ff301c4..e623346 100644 --- a/tests/LumenAwsServiceProviderTest.php +++ b/tests/LumenAwsServiceProviderTest.php @@ -6,17 +6,11 @@ class LumenAwsServiceProviderTest extends AwsServiceProviderTest { - public function setUp() + protected function setupApplication() { if (!class_exists(Application::class)) { $this->markTestSkipped(); } - - parent::setUp(); - } - - protected function setupApplication() - { // Create the application such that the config is loaded. $app = new Application(sys_get_temp_dir()); $app->instance('config', new Repository()); From b7e423a370e8f59b472ad097fbc98a123660a21d Mon Sep 17 00:00:00 2001 From: Sean O'Brien Date: Wed, 15 Feb 2023 20:29:16 -0500 Subject: [PATCH 088/100] fix typo --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 89960b8..1ebaa46 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ }, "require-dev": { "phpunit/phpunit": "^4.0 || ^5.0", - "vlucas/phpdotenv": "^1.0 || ^2.0 || ^3.0 || ^4.0 || ^5.0",,, + "vlucas/phpdotenv": "^1.0 || ^2.0 || ^3.0 || ^4.0 || ^5.0", "yoast/phpunit-polyfills": "^1.0" }, "suggest": { From 8870f9e7deecd4ba67fd62904e95ba1b964696c9 Mon Sep 17 00:00:00 2001 From: Sean O'Brien Date: Wed, 15 Feb 2023 20:31:42 -0500 Subject: [PATCH 089/100] update phpunit --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1ebaa46..012b83a 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "illuminate/support": "^5.1 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0", + "phpunit/phpunit": "^4.0 || ^5.0 || ^9.0", "vlucas/phpdotenv": "^1.0 || ^2.0 || ^3.0 || ^4.0 || ^5.0", "yoast/phpunit-polyfills": "^1.0" }, From 5dbd01ee8bc6730f1256270d29364e7bd2738e13 Mon Sep 17 00:00:00 2001 From: Sean O'Brien <60306702+stobrien89@users.noreply.github.com> Date: Tue, 21 Feb 2023 13:27:13 -0500 Subject: [PATCH 090/100] Update ubuntu image --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0f26ad9..86f78bb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,7 +9,7 @@ on: jobs: run: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 strategy: #for each of the following versions of PHP, with and without --prefer-lowest matrix: From b57460f23db3e4ef601b86d16b2efce26745d079 Mon Sep 17 00:00:00 2001 From: Sean O'Brien <60306702+stobrien89@users.noreply.github.com> Date: Fri, 17 Mar 2023 16:34:34 -0400 Subject: [PATCH 091/100] Enhancement: update anchors, remove broken links --- README.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3708dd2..7315d78 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # AWS Service Provider for Laravel 5/6/7/8/9/10 -[![@awsforphp on Twitter](http://img.shields.io/badge/twitter-%40awsforphp-blue.svg?style=flat)](https://twitter.com/awsforphp) -[![Build Status](https://img.shields.io/travis/aws/aws-sdk-php-laravel.svg)](https://travis-ci.org/aws/aws-sdk-php-laravel) [![Latest Stable Version](https://img.shields.io/packagist/v/aws/aws-sdk-php-laravel.svg)](https://packagist.org/packages/aws/aws-sdk-php-laravel) [![Total Downloads](https://img.shields.io/packagist/dt/aws/aws-sdk-php-laravel.svg)](https://packagist.org/packages/aws/aws-sdk-php-laravel) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/aws/aws-sdk-php?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) @@ -19,10 +17,10 @@ PHP and Laravel 5.1. * **1.x** ([1.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/1.0)) - For `laravel/framework:4.*` and `aws/aws-sdk-php:~2.4` Jump To: -* [Getting Started](_#Getting-Started_) -* [Getting Help](_#Getting-Help_) -* [Contributing](_#Contributing_) -* [More Resources](_#Resources_) +* [Getting Started](#Getting-Started) +* [Getting Help](#Getting-Help) +* [Contributing](#Contributing) +* [More Resources](#Resources) ## Getting Started From f8a734cfe3fbdccd007e5911ccd3feaf6c5e80b1 Mon Sep 17 00:00:00 2001 From: Sean O'Brien <60306702+stobrien89@users.noreply.github.com> Date: Fri, 24 Mar 2023 16:25:01 -0400 Subject: [PATCH 092/100] add trailing forward slash to tests --- .gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 9bef9e3..28b9aaf 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7,4 +7,4 @@ CONTRIBUTING.md export-ignore Makefile export-ignore README.md export-ignore phpunit.xml export-ignore -tests export-ignore +tests/ export-ignore From 2c88407eb595d255dcd8b3cb2df4628f8aa314bb Mon Sep 17 00:00:00 2001 From: shailja Date: Fri, 14 Jul 2023 14:03:52 -0700 Subject: [PATCH 093/100] added workflow for handling answerable discussions --- .github/workflows/handle-stale-discussions.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/handle-stale-discussions.yml diff --git a/.github/workflows/handle-stale-discussions.yml b/.github/workflows/handle-stale-discussions.yml new file mode 100644 index 0000000..2b89f2d --- /dev/null +++ b/.github/workflows/handle-stale-discussions.yml @@ -0,0 +1,18 @@ +name: HandleStaleDiscussions +on: + schedule: + - cron: '0 */4 * * *' + discussion_comment: + types: [created] + +jobs: + handle-stale-discussions: + name: Handle stale discussions + runs-on: ubuntu-latest + permissions: + discussions: write + steps: + - name: Stale discussions action + uses: aws-github-ops/handle-stale-discussions@v1 + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file From 740a71883663c6c8b5d2859ac9d81cb1031affd2 Mon Sep 17 00:00:00 2001 From: Tom Keller Date: Fri, 26 Jan 2024 17:24:18 -0800 Subject: [PATCH 094/100] chore: a more polite closed issue message --- .github/workflows/closed-issue-message.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/closed-issue-message.yml b/.github/workflows/closed-issue-message.yml index 3340afb..3691dea 100644 --- a/.github/workflows/closed-issue-message.yml +++ b/.github/workflows/closed-issue-message.yml @@ -11,7 +11,6 @@ jobs: # These inputs are both required repo-token: "${{ secrets.GITHUB_TOKEN }}" message: | - ### ⚠️COMMENT VISIBILITY WARNING⚠️ Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so. From 1c89035305d7354f318fc19638ce64ed90c854db Mon Sep 17 00:00:00 2001 From: Tom Keller Date: Fri, 26 Jan 2024 17:24:27 -0800 Subject: [PATCH 095/100] chore: relax stale issue timings We received customer feedback that our stale issue timings are too tight. This brings issue timings into line with other AWS SDK teams. --- .github/workflows/stale_issues.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale_issues.yml b/.github/workflows/stale_issues.yml index 1156d97..4741bcb 100644 --- a/.github/workflows/stale_issues.yml +++ b/.github/workflows/stale_issues.yml @@ -29,7 +29,7 @@ jobs: closed-for-staleness-label: closed-for-staleness # Issue timing - days-before-stale: 7 + days-before-stale: 10 days-before-close: 4 days-before-ancient: 1095 From 831e01d4e5e6c08d9b451bed363cc3aa8e6c5e32 Mon Sep 17 00:00:00 2001 From: Erik Telford Date: Mon, 12 Feb 2024 10:17:39 -0600 Subject: [PATCH 096/100] Add support for Laravel 11 * Laravel 11 uses a newer version of PHPUnit so that is included here as well --- README.md | 4 ++-- composer.json | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index aa018a7..6295304 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# AWS Service Provider for Laravel 5/6/7/8/9/10 +# AWS Service Provider for Laravel 5 - 11 [![Latest Stable Version](https://img.shields.io/packagist/v/aws/aws-sdk-php-laravel.svg)](https://packagist.org/packages/aws/aws-sdk-php-laravel) [![Total Downloads](https://img.shields.io/packagist/dt/aws/aws-sdk-php-laravel.svg)](https://packagist.org/packages/aws/aws-sdk-php-laravel) @@ -12,7 +12,7 @@ PHP and Laravel 5.1. **Major Versions:** -* **3.x** (YOU ARE HERE) - For `laravel/framework:~5.1|~6.0|~7.0|~8.0|9.0|10.0` and `aws/aws-sdk-php:~3.0` +* **3.x** (YOU ARE HERE) - For `laravel/framework:5.1|6.0|7.0|8.0|9.0|10.0|11.0` and `aws/aws-sdk-php:~3.0` * **2.x** ([2.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/2.0)) - For `laravel/framework:5.0.*` and `aws/aws-sdk-php:~2.4` * **1.x** ([1.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/1.0)) - For `laravel/framework:4.*` and `aws/aws-sdk-php:~2.4` diff --git a/composer.json b/composer.json index 012b83a..89c028f 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,8 @@ { "name": "aws/aws-sdk-php-laravel", "homepage": "http://aws.amazon.com/sdkforphp2", - "description": "A simple Laravel 5/6/7/8/9 service provider for including the AWS SDK for PHP.", - "keywords": ["laravel", "laravel 5", "laravel 6", "laravel 7", "laravel 8", "laravel 9", "laravel 10", "aws", "amazon", "sdk", "s3", "ec2", "dynamodb"], + "description": "A simple Laravel v5.1 - v11 service provider for including the AWS SDK for PHP.", + "keywords": ["laravel", "laravel 5", "laravel 6", "laravel 7", "laravel 8", "laravel 9", "laravel 10", "laravel 11", "aws", "amazon", "sdk", "s3", "ec2", "dynamodb"], "type":"library", "license":"Apache-2.0", "authors":[ @@ -14,10 +14,10 @@ "require": { "php": ">=5.5.9", "aws/aws-sdk-php": "~3.0", - "illuminate/support": "^5.1 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0" + "illuminate/support": "^5.1 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^9.0", + "phpunit/phpunit": "^4.0 || ^5.0 || ^9.0 || ^10.0", "vlucas/phpdotenv": "^1.0 || ^2.0 || ^3.0 || ^4.0 || ^5.0", "yoast/phpunit-polyfills": "^1.0" }, From c3881685b38979629b1563a868ef2d12e1c2ea12 Mon Sep 17 00:00:00 2001 From: Sean O'Brien Date: Thu, 14 Mar 2024 16:41:23 -0400 Subject: [PATCH 097/100] enhancement: deprecate versions below 7.2.5, add support for PHP 8.3 --- .github/workflows/tests.yml | 27 +++++++++++++-------------- README.md | 2 +- composer.json | 14 +++++++------- phpunit.xml | 18 +++++++++--------- 4 files changed, 30 insertions(+), 31 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 562589f..95780d2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,19 +13,9 @@ jobs: strategy: matrix: include: - - php-versions: '5.5' - laravel-versions: '5.1.*' - - php-versions: '5.6' - laravel-versions: '5.1.*' - - php-versions: '7.0' - laravel-versions: '5.5.*' - - php-versions: '7.1' - laravel-versions: '^5.5' - - php-versions: '7.2' - laravel-versions: '^5.5' - - php-versions: '7.2' + - php-versions: '7.2.5' laravel-versions: '^6.0' - - php-versions: '7.2' + - php-versions: '7.2.5' laravel-versions: '^7.0' - php-versions: '7.3' laravel-versions: '^6.0' @@ -55,6 +45,16 @@ jobs: laravel-versions: '^9.0' - php-versions: '8.2' laravel-versions: '^10.0' + - php-versions: '8.2' + laravel-versions: '^11.0' + - php-versions: '8.3' + laravel-versions: '^9.0' + - php-versions: '8.3' + laravel-versions: '^10.0' + - php-versions: '8.3' + laravel-versions: '^9.0' + - php-versions: '8.3' + laravel-versions: '^11.0' #set the name for each job name: PHP ${{ matrix.php-versions }} with Laravel ${{ matrix.laravel-versions }} @@ -91,8 +91,7 @@ jobs: #require lumen - name: Require lumen - if: ${{ matrix.laravel-versions != '^10.0' && (matrix.php-versions != '^8.0' && matrix.laravel-versions != '^7.0') }} - run: composer require laravel/lumen-framework:${{ matrix.laravel-versions }} --no-interaction --prefer-dist --no-plugins + run: composer require laravel/lumen-framework --no-interaction --prefer-dist --no-plugins #run tests - name: Run test suite diff --git a/README.md b/README.md index 6295304..b3cf392 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ PHP and Laravel 5.1. **Major Versions:** -* **3.x** (YOU ARE HERE) - For `laravel/framework:5.1|6.0|7.0|8.0|9.0|10.0|11.0` and `aws/aws-sdk-php:~3.0` +* **3.x** (YOU ARE HERE) - For `laravel/framework:6.0|7.0|8.0|9.0|10.0|11.0` and `aws/aws-sdk-php:^3.279.0` * **2.x** ([2.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/2.0)) - For `laravel/framework:5.0.*` and `aws/aws-sdk-php:~2.4` * **1.x** ([1.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/1.0)) - For `laravel/framework:4.*` and `aws/aws-sdk-php:~2.4` diff --git a/composer.json b/composer.json index 89c028f..a598ab2 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,8 @@ { "name": "aws/aws-sdk-php-laravel", - "homepage": "http://aws.amazon.com/sdkforphp2", - "description": "A simple Laravel v5.1 - v11 service provider for including the AWS SDK for PHP.", - "keywords": ["laravel", "laravel 5", "laravel 6", "laravel 7", "laravel 8", "laravel 9", "laravel 10", "laravel 11", "aws", "amazon", "sdk", "s3", "ec2", "dynamodb"], + "homepage": "https://aws.amazon.com/sdk-for-php/", + "description": "A simple Laravel 6/7/8/9/10/11 service provider for including the AWS SDK for PHP.", + "keywords": ["laravel", "laravel 6", "laravel 7", "laravel 8", "laravel 9", "laravel 10", "laravel 11", "aws", "amazon", "sdk", "s3", "ec2", "dynamodb"], "type":"library", "license":"Apache-2.0", "authors":[ @@ -12,12 +12,12 @@ } ], "require": { - "php": ">=5.5.9", - "aws/aws-sdk-php": "~3.0", - "illuminate/support": "^5.1 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0" + "php": ">=7.2.5", + "aws/aws-sdk-php": "^3.279.0", + "illuminate/support": "^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^9.0 || ^10.0", + "phpunit/phpunit": "^8.0 || ^9.0", "vlucas/phpdotenv": "^1.0 || ^2.0 || ^3.0 || ^4.0 || ^5.0", "yoast/phpunit-polyfills": "^1.0" }, diff --git a/phpunit.xml b/phpunit.xml index 9bca1c5..59a93f6 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -7,8 +7,7 @@ convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" - stopOnFailure="false" - syntaxCheck="false"> + stopOnFailure="false"> @@ -22,12 +21,13 @@ - - + + src - - vendor - - - + + + vendor + + + From b5d77cbdd1aada19abef7f5e72ff5c190fee5312 Mon Sep 17 00:00:00 2001 From: Ashish Dhingra <67916761+ashishdhingra@users.noreply.github.com> Date: Tue, 10 Sep 2024 17:20:35 -0700 Subject: [PATCH 098/100] chore: Modified bug issue template to add checkbox to report potential regression. --- .github/ISSUE_TEMPLATE/bug-report.yml | 8 +++++ .../workflows/issue-regression-labeler.yml | 32 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .github/workflows/issue-regression-labeler.yml diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 94d19fb..946fd2f 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -12,6 +12,14 @@ body: description: What is the problem? A clear and concise description of the bug. validations: required: true + - type: checkboxes + id: regression + attributes: + label: Regression Issue + description: What is a regression? If it worked in a previous version but doesn't in the latest version, it's considered a regression. In this case, please provide specific version number in the report. + options: + - label: Select this option if this issue appears to be a regression. + required: false - type: textarea id: expected attributes: diff --git a/.github/workflows/issue-regression-labeler.yml b/.github/workflows/issue-regression-labeler.yml new file mode 100644 index 0000000..bd00071 --- /dev/null +++ b/.github/workflows/issue-regression-labeler.yml @@ -0,0 +1,32 @@ +# Apply potential regression label on issues +name: issue-regression-label +on: + issues: + types: [opened, edited] +jobs: + add-regression-label: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - name: Fetch template body + id: check_regression + uses: actions/github-script@v7 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TEMPLATE_BODY: ${{ github.event.issue.body }} + with: + script: | + const regressionPattern = /\[x\] Select this option if this issue appears to be a regression\./i; + const template = `${process.env.TEMPLATE_BODY}` + const match = regressionPattern.test(template); + core.setOutput('is_regression', match); + - name: Manage regression label + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + if [ "${{ steps.check_regression.outputs.is_regression }}" == "true" ]; then + gh issue edit ${{ github.event.issue.number }} --add-label "potential-regression" -R ${{ github.repository }} + else + gh issue edit ${{ github.event.issue.number }} --remove-label "potential-regression" -R ${{ github.repository }} + fi From c1477b1efd43a61238090c0e8f1ede979573dd4b Mon Sep 17 00:00:00 2001 From: Sean O'Brien <60306702+stobrien89@users.noreply.github.com> Date: Wed, 26 Feb 2025 17:25:56 -0500 Subject: [PATCH 099/100] feat: add laravel 12 support (#249) Co-authored-by: Sean O'Brien Co-authored-by: vbergerondev <46461380+vbergerondev@users.noreply.github.com> Co-authored-by: rugaard --- .github/workflows/tests.yml | 62 +++++++++++++++++++++---------------- README.md | 6 ++-- composer.json | 10 +++--- 3 files changed, 44 insertions(+), 34 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 95780d2..aacf1e1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,52 +9,62 @@ on: jobs: run: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest strategy: matrix: include: - - php-versions: '7.2.5' + - php-versions: '8.1' laravel-versions: '^6.0' - - php-versions: '7.2.5' - laravel-versions: '^7.0' - - php-versions: '7.3' + - php-versions: '8.2' laravel-versions: '^6.0' - - php-versions: '7.3' - laravel-versions: '^7.0' - - php-versions: '7.3' - laravel-versions: '^8.0' - - php-versions: '7.4' + - php-versions: '8.3' + laravel-versions: '^6.0' + - php-versions: '8.4' laravel-versions: '^6.0' - - php-versions: '7.4' + - php-versions: '8.1' laravel-versions: '^7.0' - - php-versions: '7.4' - laravel-versions: '^8.0' - - php-versions: '8.0' + - php-versions: '8.2' + laravel-versions: '^7.0' + - php-versions: '8.3' + laravel-versions: '^7.0' + - php-versions: '8.4' laravel-versions: '^7.0' - - php-versions: '8.0' - laravel-versions: '^8.0' - - php-versions: '8.0' - laravel-versions: '^9.0' - php-versions: '8.1' laravel-versions: '^8.0' + - php-versions: '8.2' + laravel-versions: '^8.0' + - php-versions: '8.3' + laravel-versions: '^8.0' + - php-versions: '8.4' + laravel-versions: '^8.0' - php-versions: '8.1' laravel-versions: '^9.0' - - php-versions: '8.1' - laravel-versions: '^10.0' - php-versions: '8.2' laravel-versions: '^9.0' - - php-versions: '8.2' - laravel-versions: '^10.0' - - php-versions: '8.2' - laravel-versions: '^11.0' - php-versions: '8.3' laravel-versions: '^9.0' - - php-versions: '8.3' + - php-versions: '8.4' + laravel-versions: '^9.0' + - php-versions: '8.1' + laravel-versions: '^10.0' + - php-versions: '8.2' laravel-versions: '^10.0' - php-versions: '8.3' - laravel-versions: '^9.0' + laravel-versions: '^10.0' + - php-versions: '8.4' + laravel-versions: '^10.0' + - php-versions: '8.2' + laravel-versions: '^11.0' - php-versions: '8.3' laravel-versions: '^11.0' + - php-versions: '8.4' + laravel-versions: '^11.0' + - php-versions: '8.2' + laravel-versions: '^12.0' + - php-versions: '8.3' + laravel-versions: '^12.0' + - php-versions: '8.4' + laravel-versions: '^12.0' #set the name for each job name: PHP ${{ matrix.php-versions }} with Laravel ${{ matrix.laravel-versions }} diff --git a/README.md b/README.md index b3cf392..ea66dd0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# AWS Service Provider for Laravel 5 - 11 +# AWS Service Provider for Laravel 6 - 12 [![Latest Stable Version](https://img.shields.io/packagist/v/aws/aws-sdk-php-laravel.svg)](https://packagist.org/packages/aws/aws-sdk-php-laravel) [![Total Downloads](https://img.shields.io/packagist/dt/aws/aws-sdk-php-laravel.svg)](https://packagist.org/packages/aws/aws-sdk-php-laravel) @@ -8,11 +8,11 @@ This is a simple [Laravel](http://laravel.com/) service provider for making it e [AWS SDK for PHP](https://github.com/aws/aws-sdk-php) in your Laravel and Lumen applications. This README is for version 3.x of the service provider, which is implemented to work with Version 3 of the AWS SDK for -PHP and Laravel 5.1. +PHP and Laravel 6-12. **Major Versions:** -* **3.x** (YOU ARE HERE) - For `laravel/framework:6.0|7.0|8.0|9.0|10.0|11.0` and `aws/aws-sdk-php:^3.279.0` +* **3.x** (YOU ARE HERE) - For `laravel/framework:6.0|7.0|8.0|9.0|10.0|11.0|12.0` and `aws/aws-sdk-php:^3.338.0` * **2.x** ([2.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/2.0)) - For `laravel/framework:5.0.*` and `aws/aws-sdk-php:~2.4` * **1.x** ([1.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/1.0)) - For `laravel/framework:4.*` and `aws/aws-sdk-php:~2.4` diff --git a/composer.json b/composer.json index a598ab2..6749389 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,8 @@ { "name": "aws/aws-sdk-php-laravel", "homepage": "https://aws.amazon.com/sdk-for-php/", - "description": "A simple Laravel 6/7/8/9/10/11 service provider for including the AWS SDK for PHP.", - "keywords": ["laravel", "laravel 6", "laravel 7", "laravel 8", "laravel 9", "laravel 10", "laravel 11", "aws", "amazon", "sdk", "s3", "ec2", "dynamodb"], + "description": "A simple Laravel 6/7/8/9/10/11/12 service provider for including the AWS SDK for PHP.", + "keywords": ["laravel", "laravel 6", "laravel 7", "laravel 8", "laravel 9", "laravel 10", "laravel 11", "laravel 12", "aws", "amazon", "sdk", "s3", "ec2", "dynamodb"], "type":"library", "license":"Apache-2.0", "authors":[ @@ -12,9 +12,9 @@ } ], "require": { - "php": ">=7.2.5", - "aws/aws-sdk-php": "^3.279.0", - "illuminate/support": "^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0" + "php": ">=8.1", + "aws/aws-sdk-php": "^3.338.0", + "illuminate/support": "^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0" }, "require-dev": { "phpunit/phpunit": "^8.0 || ^9.0", From f6fd2e23c89d4fef1eb0287a548c23f02cebe264 Mon Sep 17 00:00:00 2001 From: Sean O'Brien <60306702+stobrien89@users.noreply.github.com> Date: Mon, 10 Mar 2025 16:47:32 -0400 Subject: [PATCH 100/100] Update handle-stale-discussions.yml (#251) --- .github/workflows/handle-stale-discussions.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/handle-stale-discussions.yml b/.github/workflows/handle-stale-discussions.yml index 2b89f2d..ce9a066 100644 --- a/.github/workflows/handle-stale-discussions.yml +++ b/.github/workflows/handle-stale-discussions.yml @@ -7,6 +7,7 @@ on: jobs: handle-stale-discussions: + if: github.repository_owner == 'aws' name: Handle stale discussions runs-on: ubuntu-latest permissions: @@ -15,4 +16,4 @@ jobs: - name: Stale discussions action uses: aws-github-ops/handle-stale-discussions@v1 env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy