Skip to content

Commit 6177ba2

Browse files
authored
Merge pull request thephpleague#65 from thephpleague/drop-72
Drop support for PHP 7.1
2 parents 2da43e8 + 57cf035 commit 6177ba2

6 files changed

Lines changed: 39 additions & 40 deletions

File tree

.github/workflows/test.yaml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: flysystem-bundle
22

3-
on: pull_request
3+
on:
4+
pull_request: ~
5+
push:
6+
branches:
7+
- master
48

59
jobs:
610
coding-style:
@@ -15,7 +19,7 @@ jobs:
1519
wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.16.4/php-cs-fixer.phar -q
1620
php php-cs-fixer.phar fix --dry-run --diff
1721
18-
tests-php-7-1-symfony-4-2:
22+
tests-php-7-2-symfony-4-2:
1923
runs-on: ubuntu-latest
2024
env:
2125
SYMFONY_VERSION: 4.2.*
@@ -28,9 +32,8 @@ jobs:
2832
run: |
2933
composer require --no-update symfony/config=$SYMFONY_VERSION symfony/http-kernel=$SYMFONY_VERSION symfony/dependency-injection=$SYMFONY_VERSION symfony/options-resolver=$SYMFONY_VERSION
3034
composer require --no-update --dev symfony/framework-bundle=$SYMFONY_VERSION symfony/yaml=$SYMFONY_VERSION
31-
composer remove --no-update --dev async-aws/flysystem-s3
3235
composer update --prefer-lowest --prefer-dist --no-interaction --no-ansi --no-progress
33-
php vendor/bin/phpunit
36+
php vendor/bin/simple-phpunit
3437
3538
tests-php-7-4-symfony-5-0:
3639
runs-on: ubuntu-latest
@@ -40,26 +43,26 @@ jobs:
4043
- uses: actions/checkout@master
4144
- uses: shivammathur/setup-php@v2
4245
with:
43-
php-version: '7.4'
46+
php-version: '7.3'
4447
- name: PHPUnit
4548
run: |
4649
composer require --no-update symfony/config=$SYMFONY_VERSION symfony/http-kernel=$SYMFONY_VERSION symfony/dependency-injection=$SYMFONY_VERSION symfony/options-resolver=$SYMFONY_VERSION
4750
composer require --no-update --dev symfony/framework-bundle=$SYMFONY_VERSION symfony/yaml=$SYMFONY_VERSION
4851
composer update --prefer-dist --no-interaction --no-ansi --no-progress
49-
php vendor/bin/phpunit
52+
php vendor/bin/simple-phpunit
5053
51-
tests-php-7-4-symfony-5-2:
54+
tests-php-8-0-symfony-5-2:
5255
runs-on: ubuntu-latest
5356
env:
5457
SYMFONY_VERSION: 5.2.*
5558
steps:
5659
- uses: actions/checkout@master
5760
- uses: shivammathur/setup-php@v2
5861
with:
59-
php-version: '7.4'
62+
php-version: '8.0'
6063
- name: PHPUnit
6164
run: |
6265
composer require --no-update symfony/config=$SYMFONY_VERSION symfony/http-kernel=$SYMFONY_VERSION symfony/dependency-injection=$SYMFONY_VERSION symfony/options-resolver=$SYMFONY_VERSION
6366
composer require --no-update --dev symfony/framework-bundle=$SYMFONY_VERSION symfony/yaml=$SYMFONY_VERSION
6467
composer update --prefer-dist --no-interaction --no-ansi --no-progress
65-
php vendor/bin/phpunit
68+
php vendor/bin/simple-phpunit

composer.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,19 @@
2828
"symfony/options-resolver": "^4.2|^5.0"
2929
},
3030
"require-dev": {
31-
"async-aws/flysystem-s3": "^0.3",
31+
"league/flysystem-async-aws-s3": "^2.0",
3232
"league/flysystem-aws-s3-v3": "^2.0",
3333
"league/flysystem-ftp": "^2.0",
3434
"league/flysystem-google-cloud-storage": "^2.0",
3535
"league/flysystem-memory": "^2.0",
3636
"league/flysystem-sftp": "^2.0",
37-
"phpunit/phpunit": "^7.4",
3837
"symfony/dotenv": "^4.2|^5.0",
3938
"symfony/framework-bundle": "^4.2|^5.0",
39+
"symfony/phpunit-bridge": "^5.2",
4040
"symfony/var-dumper": "^4.1|^5.0",
4141
"symfony/yaml": "^4.2|^5.0"
4242
},
4343
"conflict": {
44-
"league/flysystem-aws-s3-v3": "<1.0.22",
4544
"league/flysystem-cached-adapter": "<1.0.9"
4645
},
4746
"config": {

phpunit.xml.dist

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,21 @@
66
backupGlobals="false"
77
colors="true"
88
bootstrap="vendor/autoload.php">
9-
<php>
10-
<ini name="error_reporting" value="-1" />
11-
<env name="SHELL_VERBOSITY" value="-1" />
12-
</php>
9+
<php>
10+
<ini name="error_reporting" value="-1" />
11+
<env name="SHELL_VERBOSITY" value="-1" />
12+
<env name="SYMFONY_DEPRECATIONS_HELPER" value="9999" />
13+
</php>
1314

14-
<testsuites>
15-
<testsuite name="FlysystemBundle Test Suite">
16-
<directory>tests/</directory>
17-
</testsuite>
18-
</testsuites>
15+
<testsuites>
16+
<testsuite name="FlysystemBundle Test Suite">
17+
<directory>tests/</directory>
18+
</testsuite>
19+
</testsuites>
1920

20-
<filter>
21-
<whitelist>
22-
<directory>./src/</directory>
23-
</whitelist>
24-
</filter>
21+
<filter>
22+
<whitelist>
23+
<directory>./src/</directory>
24+
</whitelist>
25+
</filter>
2526
</phpunit>

src/Adapter/Builder/AsyncAwsAdapterDefinitionBuilder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace League\FlysystemBundle\Adapter\Builder;
1313

14-
use AsyncAws\Flysystem\S3\S3FilesystemV2;
14+
use League\Flysystem\AsyncAwsS3\AsyncAwsS3Adapter;
1515
use Symfony\Component\DependencyInjection\Definition;
1616
use Symfony\Component\DependencyInjection\Reference;
1717
use Symfony\Component\OptionsResolver\OptionsResolver;
@@ -32,7 +32,7 @@ public function getName(): string
3232
protected function getRequiredPackages(): array
3333
{
3434
return [
35-
S3FilesystemV2::class => 'async-aws/flysystem-s3',
35+
AsyncAwsS3Adapter::class => 'league/flysystem-async-aws-s3',
3636
];
3737
}
3838

@@ -50,7 +50,7 @@ protected function configureOptions(OptionsResolver $resolver)
5050

5151
protected function configureDefinition(Definition $definition, array $options)
5252
{
53-
$definition->setClass(S3FilesystemV2::class);
53+
$definition->setClass(AsyncAwsS3Adapter::class);
5454
$definition->setArgument(0, new Reference($options['client']));
5555
$definition->setArgument(1, $options['bucket']);
5656
$definition->setArgument(2, $options['prefix']);

tests/Adapter/AdapterDefinitionFactoryTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Tests\League\FlysystemBundle\Adapter;
1313

14-
use AsyncAws\Flysystem\S3\S3FilesystemV2;
1514
use League\FlysystemBundle\Adapter\AdapterDefinitionFactory;
1615
use PHPUnit\Framework\TestCase;
1716
use Symfony\Component\DependencyInjection\Definition;
@@ -24,10 +23,6 @@ public function provideConfigOptions()
2423
$config = Yaml::parseFile(__DIR__.'/options.yaml');
2524

2625
foreach ($config as $fs) {
27-
if ('asyncaws' === $fs['adapter'] && !class_exists(S3FilesystemV2::class)) {
28-
continue;
29-
}
30-
3126
yield $fs['adapter'] => [$fs['adapter'], $fs['options'] ?? []];
3227
}
3328
}

tests/Adapter/Builder/AsyncAwsAdapterDefinitionBuilderTest.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111

1212
namespace Tests\League\FlysystemBundle\Adapter\Builder;
1313

14-
use AsyncAws\Flysystem\S3\S3FilesystemV2;
14+
use League\Flysystem\AsyncAwsS3\AsyncAwsS3Adapter;
1515
use League\FlysystemBundle\Adapter\Builder\AsyncAwsAdapterDefinitionBuilder;
1616
use PHPUnit\Framework\TestCase;
17+
use Symfony\Component\DependencyInjection\Reference;
1718

1819
/**
1920
* @requires PHP 7.2
@@ -44,10 +45,10 @@ public function provideValidOptions()
4445
*/
4546
public function testCreateDefinition($options)
4647
{
47-
if (!class_exists(S3FilesystemV2::class)) {
48-
$this->markTestSkipped();
49-
}
50-
51-
$this->assertSame(S3FilesystemV2::class, $this->createBuilder()->createDefinition($options)->getClass());
48+
$definition = $this->createBuilder()->createDefinition($options);
49+
$this->assertSame(AsyncAwsS3Adapter::class, $definition->getClass());
50+
$this->assertInstanceOf(Reference::class, $definition->getArgument(0));
51+
$this->assertSame('my_client', (string) $definition->getArgument(0));
52+
$this->assertSame('bucket', $definition->getArgument(1));
5253
}
5354
}

0 commit comments

Comments
 (0)