laravel/framework — pull request #3758 by dcarrith (2014-03-02 19:26:00+00:00)
Title: Updated SqsQueue so it builds the QueueUrl automatically using sqs->getB...

...aseUrl along with a new 'account' variable in the sqs connection config. Also switched order of job and queue parameters of SqsJob to be inline with the order used by the other two 3rd party queue providers.

Here's the background for why I feel like this should be a welcomed change. When I was initially testing out the 3 main queue providers, IronMQ, Beanstalkd and Sqs, I thought it was strange that for the first two, the queue name was all that was needed to listen for and push onto the queues. But, for Sqs, it didn't work with just the queue name (e.g. 'emails'). Instead, I had to use the entire QueueURL. That was not only confusing initially, but I feel like it also goes against the idea of providing "a unified API across a variety of different queue services." So, with the changes I made in this PR, all a user would have to do is add a new "account" config variable in app/config/queue.php. For example:

```php
'sqs' => array(
'driver' => 'sqs',
'account' => '1234567891011',
'key' => 'AMAZONSQSKEY',
'secret' => 'zBPh+8ymO9P2UwD5+eM4ISYCZm3MSU1ExNBS98Uy',
'queue' => 'emails',
'region' => 'us-east-1',
),
```
Since the SqsClient already provides a getBaseUrl() which will get the base url of the QueueUrl, I used that along with the new account config + the "queue" (i.e. Queue Name) to build the full QueueURL. Now, I can switch between all three queue providers because the API is more unified.