To make life easier for developers I would suppose. Aws also has packages designed to be used with other popular framework.
If a package is designed well you should be able to pass a configuration into the the package to avoid it loading it from a specific file directory. I use my service providers to read config files and pass variables to the classes performing the actual work. This allows anyone to pass in the condig option s they desire.
Using the two packages you have linked to in your example. The aws-sdk-php-laravel package is simply a thin wrapper around the more generic aws-sdk-php package.
So, the idea is you first develop a generic package, then, you build the custom framework specific wrapper to work with a particular framework (ei, register services etc). You will also find other examples for other frameworks, Symfony for instance: https://packagist.org/packages/platinumpixs/aws-symfony2-bundle
This is the best option, as frameworks don't currently have a common ground in relation to how services are loaded.
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us