Skip to content

Commit bb12265

Browse files
committed
Update dependencies, add a phpfmt command, and run it
1 parent 42740df commit bb12265

File tree

10 files changed

+36
-36
lines changed

10 files changed

+36
-36
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
test:
2+
vendor/bin/phpunit
3+
4+
phpfmt:
5+
vendor/bin/phpcbf --standard=PSR2 src/ tests/ build/ \
6+
--ignore=tests/fixtures/cache/

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,11 @@ aws.cognitoidentity | [Aws\CognitoIdentity\CognitoIdentityClient](http://docs.aw
7373
aws.cognitosync | [Aws\CognitoSync\CognitoSyncClient](http://docs.aws.amazon.com/aws-sdk-php/v3/api/class-Aws.CognitoSync.CognitoSyncClient.html)
7474
aws.configservice | [Aws\ConfigService\ConfigServiceClient](http://docs.aws.amazon.com/aws-sdk-php/v3/api/class-Aws.ConfigService.ConfigServiceClient.html)
7575
aws.datapipeline | [Aws\DataPipeline\DataPipelineClient](http://docs.aws.amazon.com/aws-sdk-php/v3/api/class-Aws.DataPipeline.DataPipelineClient.html)
76+
aws.devicefarm | [Aws\DeviceFarm\DeviceFarmClient](http://docs.aws.amazon.com/aws-sdk-php/v3/api/class-Aws.DeviceFarm.DeviceFarmClient.html)
7677
aws.directconnect | [Aws\DirectConnect\DirectConnectClient](http://docs.aws.amazon.com/aws-sdk-php/v3/api/class-Aws.DirectConnect.DirectConnectClient.html)
7778
aws.directoryservice | [Aws\DirectoryService\DirectoryServiceClient](http://docs.aws.amazon.com/aws-sdk-php/v3/api/class-Aws.DirectoryService.DirectoryServiceClient.html)
7879
aws.dynamodb | [Aws\DynamoDb\DynamoDbClient](http://docs.aws.amazon.com/aws-sdk-php/v3/api/class-Aws.DynamoDb.DynamoDbClient.html)
80+
aws.dynamodbstreams | [Aws\DynamoDbStreams\DynamoDbStreamsClient](http://docs.aws.amazon.com/aws-sdk-php/v3/api/class-Aws.DynamoDbStreams.DynamoDbStreamsClient.html)
7981
aws.ec2 | [Aws\Ec2\Ec2Client](http://docs.aws.amazon.com/aws-sdk-php/v3/api/class-Aws.Ec2.Ec2Client.html)
8082
aws.ecs | [Aws\Ecs\EcsClient](http://docs.aws.amazon.com/aws-sdk-php/v3/api/class-Aws.Ecs.EcsClient.html)
8183
aws.efs | [Aws\Efs\EfsClient](http://docs.aws.amazon.com/aws-sdk-php/v3/api/class-Aws.Efs.EfsClient.html)

build/ReadMeUpdater.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,8 @@ class ReadMeUpdater
1616

1717
public static function updateReadMe(Event $e)
1818
{
19-
$vendorDir = $e->getComposer()->getConfig()->get('vendor-dir');
20-
$projectRoot = dirname($vendorDir);
21-
22-
require "$vendorDir/autoload.php";
23-
24-
(new static($projectRoot))->doUpdateReadMe();
19+
(new static(dirname($e->getComposer()->getConfig()->get('vendor-dir'))))
20+
->doUpdateReadMe();
2521
}
2622

2723
public function __construct($projectRoot = '..')
@@ -89,12 +85,12 @@ protected function getContainer()
8985
static $container = null;
9086

9187
if (empty($container)) {
92-
require_once $this->projectRoot . '/tests/fixtures/AppKernel.php';
88+
require_once $this->projectRoot . '/tests/bootstrap.php';
9389
$kernel = new \AppKernel('test', true);
9490
$kernel->boot();
9591
$container = $kernel->getContainer();
9692
}
9793

9894
return $container;
9995
}
100-
}
96+
}

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"phpunit/phpunit": "~4.7",
2121
"symfony/framework-bundle": "~2.3",
2222
"symfony/finder": "~2.3",
23-
"symfony/yaml": "~2.3"
23+
"symfony/yaml": "~2.3",
24+
"squizlabs/php_codesniffer": "^2.3"
2425
},
2526
"autoload": {
2627
"psr-4": {

src/AwsBundle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
class AwsBundle extends Bundle
88
{
99

10-
}
10+
}

src/DependencyInjection/AwsExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ private function inflateServicesInConfig(array &$config)
7171
}
7272
});
7373
}
74-
}
74+
}

src/DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ public function getConfigTreeBuilder()
1919

2020
return $treeBuilder;
2121
}
22-
}
22+
}

tests/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
'fixtures',
1010
'cache',
1111
'test',
12-
]));
12+
]));

tests/fixtures/AppKernel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ private function getTestConfigFile($extension)
3939
{
4040
return __DIR__ . '/config.' . $extension;
4141
}
42-
}
42+
}

tests/fixtures/config.php

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,25 @@
99
$container->loadFromExtension('aws', [
1010
'version' => 'latest',
1111
'region' => 'us-east-1',
12-
'credentials' =>
13-
array (
14-
'key' => 'not-a-real-key',
15-
'secret' => '@@not-a-real-secret', // this will be escaped as '@not-a-real-secret'
16-
),
17-
'DynamoDb' =>
18-
array (
19-
'region' => 'us-west-2',
20-
),
21-
'S3' =>
22-
array (
23-
'version' => '2006-03-01',
24-
),
25-
'Sqs' =>
26-
array (
27-
'credentials' => new Reference('a_service'), // '@a_service' would also work in a PHP config
28-
),
29-
'CloudSearchDomain' =>
30-
array (
31-
'endpoint' => 'http://search-with-some-subdomain.us-east-1.cloudsearch.amazonaws.com',
32-
),
12+
'credentials' => [
13+
'key' => 'not-a-real-key',
14+
'secret' => '@@not-a-real-secret', // this will be escaped as '@not-a-real-secret'
15+
],
16+
'DynamoDb' =>[
17+
'region' => 'us-west-2',
18+
],
19+
'S3' => [
20+
'version' => '2006-03-01',
21+
],
22+
'Sqs' =>[
23+
'credentials' => new Reference('a_service'), // '@a_service' would also work in a PHP config
24+
],
25+
'CloudSearchDomain' => [
26+
'endpoint' => 'http://search-with-some-subdomain.us-east-1.cloudsearch.amazonaws.com',
27+
],
3328
]);
3429

3530
$container
3631
->register('a_service', 'Aws\\Credentials\\Credentials')
3732
->addArgument('a-different-fake-key')
38-
->addArgument('a-different-fake-secret');
33+
->addArgument('a-different-fake-secret');

0 commit comments

Comments
 (0)