feat(laravel): Add Laravel 13 and PHP 8.5 support (#259)
Signed-off-by: Marjo Wenzel van Lier marjo.vanlier@gmail.com Co-authored-by: stobrien89 N60306702+stobrien89@users.noreply.github.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号
AWS Service Provider for Laravel 9 - 13
This is a simple Laravel service provider for making it easy to include the official AWS SDK for 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 9-13.
Major Versions:
laravel/framework:9.0|10.0|11.0|12.0|13.0andaws/aws-sdk-php:^3.338.0laravel/framework:5.0.*andaws/aws-sdk-php:~2.4laravel/framework:4.*andaws/aws-sdk-php:~2.4Jump To:
Getting Started
Installation
The AWS Service Provider can be installed via Composer by requiring the
aws/aws-sdk-php-laravelpackage in your project’scomposer.json.Then run a composer update
To use the AWS Service Provider, you must register the provider when bootstrapping your application.
Lumen
In Lumen find the
Register Service Providersin yourbootstrap/app.phpand register the AWS Service Provider.Laravel
In Laravel find the
providerskey in yourconfig/app.phpand register the AWS Service Provider.Find the
aliaseskey in yourconfig/app.phpand add the AWS facade alias.Configuration
By default, the package uses the following environment variables to auto-configure the plugin without modification:
To customize the configuration file, publish the package configuration using Artisan.
The settings can be found in the generated
config/aws.phpconfiguration file. By default, the credentials and region settings will pull from your.envfile.Note that you can always delete the
credentialsline from this file if you’d like to use the default SDK Configuration Provider chain instead.Referring Laravel 5.2.0 Upgrade guide, you must using config file instead of environment variable option if using php artisan
config:cache.Learn more about configuring the SDK 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 Service Container. The following example uses the Amazon S3 client to upload a file.
If the AWS facade is registered within the
aliasessection of the application configuration, you can also use the following technique.To use in Lumen, you need to retrieve it from the service container a bit differently:
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.
aws-php-sdkThis 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.
Opening Issues
If you encounter a bug with
aws-sdk-php-laravelwe 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 ofaws-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-phpplease 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 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