Category: PHP


Keeping Up with the Latest Release

by Jeremy Lindblom | on | in PHP | Permalink | Comments |  Share

In the past, we’ve used various means to announce new releases of the AWS SDK
for PHP. We’ve recently evaluated our options to decide which tools work best
with our release process, and are easiest for our users to consume.

The best way to track releases of the SDK is to use the "Releases" page of
our GitHub repo
. This page show links to all of the releases, and if you
navigate to a specific releases page, you can see the excerpt of the CHANGELOG
for that release, and download the aws.phar and aws.zip. GitHub allows you
to link directly to the latest release (i.e.,
https://github.com/aws/aws-sdk-php/releases/latest) and also provides a
Releases atom feed which gets updated each time we tag a release.

We also recommend that you follow @awsforphp on Twitter. We use this
account to make announcements about new releases, blog posts, etc., and often
tweet and retweet other things related to AWS and PHP. We also occasionally like
to ask questions, answer questions, and post tips about the AWS SDK for PHP.

Note: If you are currently subscribed to our PEAR channel’s RSS feed, you
should know that we are no longer making updates to the PEAR channel as of 9/15
(see End of Life of PEAR Channel for more details).

So, subscribe to the Releases atom feed and follow us on Twitter to
stay up-to-date with the SDK and make sure you don’t miss out on any new
features or announcements.

End of Life of PEAR Channel

by Michael Dowling | on | in PHP | Permalink | Comments |  Share

There’s been a noticeable wave of popular PHP projects recently announcing that they will no longer support PEAR as an installation method. Because the AWS SDK for PHP provides a PEAR channel, we’ve been very interested in the discussion in the community on PEAR channel support.

PEAR has been one of the many ways to install the AWS SDK for PHP since 2010. While it’s served us well, better alternatives for installing PHP packages are now available (i.e., Composer) and literally all of the PEAR dependencies of the AWS SDK for PHP are no longer providing updates to their PEAR channels.

Symfony and Pirum

Fabien Potencier recently blogged about the "Rise of Composer and the fall of PEAR", stating that he would soon no longer update the PEAR channels for the packages he maintains (e.g., Symfony, Twig, Swiftmailer, etc.):

I've been using PEAR as a package manager since my first PHP project back
in 2004. I even wrote a popular PEAR channel server,
Pirum (http://pirum.sensiolabs.org/). But today, it's time for me to move
on and announce my plan about the PEAR channels I'm managing.

One of the projects that we rely on to build the PEAR channel for the AWS SDK for PHP is Pirum, and it has made building a PEAR channel slightly less cumbersome. That said, we’ve had to make small modifications to Pirum over the years to suit our needs. With the announcement that Pirum is no longer maintained, we now have much less confidence in relying on it as a tool used to power one of our installation methods.

One of the Symfony project’s Fabien published to a PEAR channel was the Symfony EventDispatcher. The AWS SDK for PHP has a PEAR dependency on the EventDispatcher PEAR channel. Because the channel is no longer updated, users of the SDK via PEAR will not receive any bugfix updates to the EventDispatcher.

PHPUnit

PHPUnit, the most popular unit testing framework for PHP applications, recently stopped updating their PEAR channels:

We are taking the next step in retiring the PEAR installation method with
today's release of PHPUnit 3.7.35 and PHPUnit 4.0.17. These two releases
are the last versions of PHPUnit released as PEAR packages. Installing
them using the PEAR Installer will trigger a deprecation message on every
execution of the commandline test runner.

PHPUnit is the testing framework used to test the AWS SDK for PHP.

Guzzle

Guzzle, another dependency of the AWS SDK for PHP’s PEAR channel, is no longer providing updates to their PEAR channel since the 3.9.0 release.

AWS SDK for PHP PEAR Channel

With all of these contributing factors, we will no longer be providing updates to the AWS SDK for PHP PEAR channel starting on Monday, September 15th, 2014. Our PEAR channel will still be available to download older versions of the SDK, but it will not receive any further updates after this date.

If you are currently using the PEAR channel to install the SDK or build downstream packages (e.g., RPMs), please begin to update your installation mechanism to one of the following alternatives:

  1. Composer (the recommended method).
  2. Our zip package that contains all of the dependencies and autoloader. Available at https://github.com/aws/aws-sdk-php/releases/latest.
  3. Our phar file that contains all of the dependencies and sets up an autoloader. Available at https://github.com/aws/aws-sdk-php/releases/latest.

To stay up to date with important fixes and updates, we strongly recommend migrating to one of the installation methods listed above.

More instructions on installing the AWS SDK for PHP can be found in the user guide.

Release: AWS SDK for PHP – Version 2.6.12

by Jeremy Lindblom | on | in PHP | Permalink | Comments |  Share

We would like to announce the release of version 2.6.12 of the AWS SDK for PHP. This release adds support for new regions to the Kinesis client and new features to the AWS Support and AWS IAM clients.

Install the SDK

Release: AWS SDK for PHP – Version 2.6.11

by Michael Dowling | on | in PHP | Permalink | Comments |  Share

We would like to announce the release of version 2.6.11 of the AWS SDK for PHP.

  • Added support for Amazon Cognito Identity
  • Added support for Amazon Cognito Sync
  • Added support for Amazon CloudWatch Logs
  • Added support for editing existing health checks and associating health checks with tags to the Amazon Route 53 client
  • Added the ModifySubnetAttribute operation to the Amazon EC2 client

Install the SDK

Release: AWS SDK for PHP – Version 2.6.10

by Jeremy Lindblom | on | in PHP | Permalink | Comments |  Share

We would like to announce the release of version 2.6.10 of the AWS SDK for PHP. This release adds support for new regions to the AWS CloudTrail and Amazon Kinesis clients.

Install the SDK

Release: AWS SDK for PHP – Version 2.6.9

by Jeremy Lindblom | on | in PHP | Permalink | Comments |  Share

We would like to announce the release of version 2.6.9 of the AWS SDK for PHP. This release adds support for uploading document batches and submitting search and suggestion requests to an Amazon CloudSearch domain using the new CloudSearch Domain client. It also adds support for configuring delivery notifications to the Amazon SES client, and updates the Amazon CloudFront client to work with the latest API version.

  • Added support for the CloudSearchDomain client, which allows you to search and upload documents to your CloudSearch domains.
  • Added support for delivery notifications to the Amazon SES client.
  • Updated the CloudFront client to support the 2014-05-31 API.
  • Merged PR #316 as a better solution for issue #309.

Install the SDK

Release: AWS SDK for PHP – Version 2.6.8

by Jeremy Lindblom | on | in PHP | Permalink | Comments |  Share

We would like to announce the release of version 2.6.8 of the AWS SDK for PHP. This release updates the Amazon Elastic Transcoder and Amazon EMR clients to use the latest service descriptions, and fixes a few issues.

  • Added support for closed captions to the Elastic Transcoder client.
  • Added support for IAM roles to the Elastic MapReduce client.
  • Updated the S3 PostObject to ease customization.
  • Fixed an issue in some EC2 waiters by merging PR #306.
  • Fixed an issue with the DynamoDB WriteRequestBatch by merging PR #310.
  • Fixed issue #309, where the url_stat() logic in the S3 Stream Wrapper was affected by a change in the latest versions of PHP. If you are running version 5.4.29+, 5.5.13+, or 5.6.0+ of PHP, and you are using the S3 Stream Wrapper, you need to update your SDK in order to prevent runtime errors.

We also released version 2.6.7 last week, but forgot to mention it on the blog. Here are the changes from 2.6.7:

  • Added support for Amazon S3 server-side encryption using customer-provided encryption keys.
  • Updated the Amazon SNS client to support message attributes.
  • Updated the Amazon Redshift client to support new cluster parameters.
  • Updated PHPUnit dev dependency to 4.* to work around a PHP serializing bug.

Install the SDK

Guzzle 4 and the AWS SDK

by Jeremy Lindblom | on | in PHP | Permalink | Comments |  Share

Since Guzzle 4 was released in March (and even before then), we’ve received several requests for us to update the AWS SDK for PHP to use Guzzle 4. Earlier this month, we tweeted about it too and received some pretty positive feedback about the idea. We wanted to take some time to talk about what upgrading Guzzle would mean for the SDK and solicit your feedback.

The SDK relies heavily on Guzzle

If you didn’t already know, the AWS SDK for PHP relies quite heavily on version 3 of Guzzle. The AWS service clients extend from the Guzzle service clients, and we have formatted the entire set of AWS APIs into Guzzle "service descriptions". Roughly 80 percent of what the SDK does is done with Guzzle. We say all this because we want you to understand that updating the SDK to use Guzzle 4 is potentially a big change.

What does Guzzle 4 offer?

We’ve had several requests for Guzzle 4 support, and we agree that it would be great. But what exactly does Guzzle 4 offer — besides it being the new "hotness" — that makes it worth the effort?

We could mention a few things about the code itself: it’s cleaner, it’s better designed, and it has simpler and smaller interfaces. While those are certainly good things, they’re not strong enough reasons to change the SDK. However, Guzzle 4 also includes some notable improvements and new features, including:

  • It’s up to 30 percent faster and consumes less memory than Guzzle 3 when sending requests serially.
  • It no longer requires cURL, but still uses cURL by default, if available.
  • It supports swappable HTTP adapters, which enables you to provide custom adapters. For example, this opens up the possibility for a non-blocking, asynchronous adapter using ReactPHP.
  • It has improved cURL support, including faster and easier handling of parallel requests using a rolling queue approach instead of batching.

These updates would provide great benefits to SDK users, and would allow even more flexible and efficient communications with AWS services.

Guzzle 4 has already been adopted by Drupal, Laravel, Goutte, and other projects. I expect it to be adopted by even more during the rest of this year, and as some of the supplementary Guzzle packages reach stable releases. We definitely want users of the AWS SDK for PHP to be able to use the SDK alongside these other packages without causing conflicts or bloat.

Consequences of updating to Guzzle 4

Because the AWS SDK relies so heavily on Guzzle, the changes to Guzzle will require changes to the SDK.

In Guzzle 4, many things have changed. Classes have been renamed or removed, including classes that are used by the current SDK and SDK users. A few notable examples include the removal of the GuzzleBatch and GuzzleIterator namespaces, and how GuzzleHttpEntityBody has been changed and moved to GuzzleHttpStreamStream.

The event system of Guzzle 4 has also changed significantly. Guzzle has moved away from the Symfony Event Dispatcher, and is now using its own event system, which is pretty nice. This affects any event listeners and subscribers you may have written for Guzzle 3 or the SDK, because they will need a little tweaking to work in Guzzle 4.

Another big change in Guzzle 4 is that it requires PHP 5.4 (or higher). Using Guzzle 4 would mean that the SDK would also require PHP 5.4+.

Most of the changes in Guzzle 4 wouldn’t directly affect SDK users, but there are a few, like the ones just mentioned, that might. Because of this, if the SDK adopted Guzzle 4, it would require a new major version of the SDK: a Version 3.

What are your thoughts?

We think that updating the SDK to use Guzzle 4 is the best thing for the SDK and SDK users. Now that you know the benefits and the consequences, we want to hear from you. Do you have any questions or concerns? What other feedback or ideas do you have? Please join our discussion on GitHub or leave a comment below.

AWS at Laracon 2014

by Jeremy Lindblom | on | in PHP | Permalink | Comments |  Share

I recently had the pleasure to attend and speak at Laracon, which is a conference for users of the Laravel PHP framework.

This is the second year that they have done Laracon. Last year, Laracon (US) was in Washington D.C., but this year they did it in New York City. The thing that impressed me most about this conference was how excited everyone was to be there. The Laravel community is very energetic, and they are growing. I definitely felt that energy, and I believe it helped make the event a good experience for all of the attendees.

I was honored to be able to speak to the attendees about Amazon Web Services. My talk was titled AWS for Artisans, and I focused on "The Cloud", AWS in general, and the AWS SDK for PHP. To tie everything together, I walked through the creation of a simple, but scalable, Laravel application, where pictures of funny faces are uploaded and displayed. I showed how the SDK was used and how AWS Elastic Beanstalk and other AWS services fit into the architecture.

Here are some of my favorite moments/comments from the presentation:

And here are the resources from the presentation:

There were already many existing AWS customers at Laracon, and it was nice to be able to talk to them, answer their questions, and hear their feedback and ideas. I also enjoyed talking to the developers that had yet to try AWS. Use the AWS credits I gave you to do something awesome! :-) Thank you to everyone that I had conversations with.

Release: AWS SDK for PHP – Version 2.6.6

by Jeremy Lindblom | on | in PHP | Permalink | Comments |  Share

We would like to announce the release of version 2.6.6 of the AWS SDK for PHP. This release, combined with the last few releases that we forgot to blog about, contain the following changes:

  • Added support for the Desired Partition Count scaling option to the CloudSearch client. Hebrew is also now a supported language.
  • Updated the STS service description to the latest version.
  • [Docs] Updated some of the documentation about credential profiles.
  • Fixed an issue with the regular expression in the S3Client::isValidBucketName method. See #298.
  • Added cross-region support for the Amazon EC2 CopySnapshot operation.
  • Added AWS Relational Database (RDS) support to the AWS OpsWorks client.
  • Added support for tagging environments to the AWS Elastic Beanstalk client.
  • Refactored the signature version 4 implementation to be able to pre-sign most operations.
  • Added support for lifecycles on versioning enabled buckets to the Amazon S3 client.
  • Fixed an Amazon S3 sync issue which resulted in unnecessary transfers when no $keyPrefix argument was utilized.
  • Corrected the CopySourceIfMatch and CopySourceIfNoneMatch parameter for Amazon S3 to not use a timestamp shape.
  • Corrected the sending of Amazon S3 PutBucketVersioning requests that utilize the MFADelete parameter.
  • Added the ability to modify Amazon SNS topic settings to the UpdateStack operation of the AWS CloudFormation client.
  • Added support for the us-west-1, ap-southeast-2, and eu-west-1 regions to the AWS CloudTrail client.
  • Removed no longer utilized AWS CloudTrail shapes from the model.

Install the SDK