Skip to content

Commit

Permalink
Adaptions for Symfony 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bytehead committed Nov 15, 2017
1 parent b4eea24 commit 9cbf45f
Show file tree
Hide file tree
Showing 31 changed files with 77 additions and 69 deletions.
14 changes: 9 additions & 5 deletions .travis.yml
Expand Up @@ -5,10 +5,8 @@ php:
- 7.1

env:
- SYMFONY_VERSION=2.7.*
- SYMFONY_VERSION=2.8.*
- SYMFONY_VERSION=3.3.*
- SYMFONY_VERSION=4.0.*
- SYMFONY_VERSION=^3.3
- SYMFONY_VERSION=^4.0
- SYMFONY_VERSION=dev-master

cache:
Expand All @@ -18,11 +16,17 @@ cache:
matrix:
allow_failures:
- env: SYMFONY_VERSION=dev-master
exclude:
- php: 7.0
env: SYMFONY_VERSION=^4.0
- php: 7.0
env: SYMFONY_VERSION=dev-master

before_install:
- composer selfupdate
- travis_retry composer selfupdate

before_script:
- if [ "$SYMFONY_VERSION" = "^4.0" ]; then composer config minimum-stability dev; composer config prefer-stable true; fi
- travis_wait composer require symfony/framework-bundle:${SYMFONY_VERSION} --prefer-source
- travis_wait composer install --dev --prefer-source

Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Factory/Adapter/AwsS3V2Factory.php
Expand Up @@ -4,7 +4,7 @@

use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\Reference;
use Oneup\FlysystemBundle\DependencyInjection\Factory\AdapterFactoryInterface;

Expand All @@ -18,7 +18,7 @@ public function getKey()
public function create(ContainerBuilder $container, $id, array $config)
{
$definition = $container
->setDefinition($id, new DefinitionDecorator('oneup_flysystem.adapter.awss3v2'))
->setDefinition($id, new ChildDefinition('oneup_flysystem.adapter.awss3v2'))
->replaceArgument(0, new Reference($config['client']))
->replaceArgument(1, $config['bucket'])
->replaceArgument(2, $config['prefix'])
Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Factory/Adapter/AwsS3V3Factory.php
Expand Up @@ -4,7 +4,7 @@

use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\Reference;
use Oneup\FlysystemBundle\DependencyInjection\Factory\AdapterFactoryInterface;

Expand All @@ -18,7 +18,7 @@ public function getKey()
public function create(ContainerBuilder $container, $id, array $config)
{
$definition = $container
->setDefinition($id, new DefinitionDecorator('oneup_flysystem.adapter.awss3v3'))
->setDefinition($id, new ChildDefinition('oneup_flysystem.adapter.awss3v3'))
->replaceArgument(0, new Reference($config['client']))
->replaceArgument(1, $config['bucket'])
->replaceArgument(2, $config['prefix'])
Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Factory/Adapter/DropboxFactory.php
Expand Up @@ -4,7 +4,7 @@

use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\Reference;
use Oneup\FlysystemBundle\DependencyInjection\Factory\AdapterFactoryInterface;

Expand All @@ -18,7 +18,7 @@ public function getKey()
public function create(ContainerBuilder $container, $id, array $config)
{
$definition = $container
->setDefinition($id, new DefinitionDecorator('oneup_flysystem.adapter.dropbox'))
->setDefinition($id, new ChildDefinition('oneup_flysystem.adapter.dropbox'))
->replaceArgument(0, new Reference($config['client']))
->replaceArgument(1, $config['prefix'])
;
Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Factory/Adapter/FallbackFactory.php
Expand Up @@ -4,7 +4,7 @@

use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\Reference;
use Oneup\FlysystemBundle\DependencyInjection\Factory\AdapterFactoryInterface;

Expand All @@ -18,7 +18,7 @@ public function getKey()
public function create(ContainerBuilder $container, $id, array $config)
{
$definition = $container
->setDefinition($id, new DefinitionDecorator('oneup_flysystem.adapter.fallback'))
->setDefinition($id, new ChildDefinition('oneup_flysystem.adapter.fallback'))
->replaceArgument(0, new Reference(sprintf('oneup_flysystem.%s_adapter', $config['mainAdapter'])))
->replaceArgument(1, new Reference(sprintf('oneup_flysystem.%s_adapter', $config['fallback'])))
->replaceArgument(2, $config['forceCopyOnMain'])
Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Factory/Adapter/FtpFactory.php
Expand Up @@ -4,7 +4,7 @@

use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Oneup\FlysystemBundle\DependencyInjection\Factory\AdapterFactoryInterface;

class FtpFactory implements AdapterFactoryInterface
Expand All @@ -17,7 +17,7 @@ public function getKey()
public function create(ContainerBuilder $container, $id, array $config)
{
$definition = $container
->setDefinition($id, new DefinitionDecorator('oneup_flysystem.adapter.ftp'))
->setDefinition($id, new ChildDefinition('oneup_flysystem.adapter.ftp'))
->replaceArgument(0, $config)
;
}
Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Factory/Adapter/GaufretteFactory.php
Expand Up @@ -4,7 +4,7 @@

use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\Reference;
use Oneup\FlysystemBundle\DependencyInjection\Factory\AdapterFactoryInterface;

Expand All @@ -18,7 +18,7 @@ public function getKey()
public function create(ContainerBuilder $container, $id, array $config)
{
$definition = $container
->setDefinition($id, new DefinitionDecorator('oneup_flysystem.adapter.gaufrette'))
->setDefinition($id, new ChildDefinition('oneup_flysystem.adapter.gaufrette'))
->replaceArgument(0, new Reference($config['adapter']))
;
}
Expand Down
Expand Up @@ -4,7 +4,7 @@

use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\Reference;
use Oneup\FlysystemBundle\DependencyInjection\Factory\AdapterFactoryInterface;

Expand All @@ -18,7 +18,7 @@ public function getKey()
public function create(ContainerBuilder $container, $id, array $config)
{
$definition = $container
->setDefinition($id, new DefinitionDecorator('oneup_flysystem.adapter.googlecloudstorage'))
->setDefinition($id, new ChildDefinition('oneup_flysystem.adapter.googlecloudstorage'))
->replaceArgument(0, new Reference($config['client']))
->replaceArgument(1, new Reference($config['bucket']))
->replaceArgument(2, $config['prefix'])
Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Factory/Adapter/GridFSFactory.php
Expand Up @@ -4,7 +4,7 @@

use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\Reference;
use Oneup\FlysystemBundle\DependencyInjection\Factory\AdapterFactoryInterface;

Expand All @@ -18,7 +18,7 @@ public function getKey()
public function create(ContainerBuilder $container, $id, array $config)
{
$definition = $container
->setDefinition($id, new DefinitionDecorator('oneup_flysystem.adapter.gridfs'))
->setDefinition($id, new ChildDefinition('oneup_flysystem.adapter.gridfs'))
->replaceArgument(0, new Reference($config['client']))
;
}
Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Factory/Adapter/LocalFactory.php
Expand Up @@ -4,7 +4,7 @@

use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Oneup\FlysystemBundle\DependencyInjection\Factory\AdapterFactoryInterface;
use League\Flysystem\Adapter\Local;

Expand All @@ -18,7 +18,7 @@ public function getKey()
public function create(ContainerBuilder $container, $id, array $config)
{
$container
->setDefinition($id, new DefinitionDecorator('oneup_flysystem.adapter.local'))
->setDefinition($id, new ChildDefinition('oneup_flysystem.adapter.local'))
->setLazy($config['lazy'])
->replaceArgument(0, $config['directory'])
->replaceArgument(1, $config['writeFlags'])
Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Factory/Adapter/MemoryAdapterFactory.php
Expand Up @@ -4,7 +4,7 @@

use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Oneup\FlysystemBundle\DependencyInjection\Factory\AdapterFactoryInterface;

class MemoryAdapterFactory implements AdapterFactoryInterface
Expand All @@ -17,7 +17,7 @@ public function getKey()
public function create(ContainerBuilder $container, $id, array $config)
{
$container
->setDefinition($id, new DefinitionDecorator('oneup_flysystem.adapter.memory'))
->setDefinition($id, new ChildDefinition('oneup_flysystem.adapter.memory'))
;
}

Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Factory/Adapter/NullAdapterFactory.php
Expand Up @@ -4,7 +4,7 @@

use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Oneup\FlysystemBundle\DependencyInjection\Factory\AdapterFactoryInterface;

class NullAdapterFactory implements AdapterFactoryInterface
Expand All @@ -17,7 +17,7 @@ public function getKey()
public function create(ContainerBuilder $container, $id, array $config)
{
$container
->setDefinition($id, new DefinitionDecorator('oneup_flysystem.adapter.nulladapter'))
->setDefinition($id, new ChildDefinition('oneup_flysystem.adapter.nulladapter'))
;
}

Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Factory/Adapter/RackspaceFactory.php
Expand Up @@ -4,7 +4,7 @@

use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\Reference;
use Oneup\FlysystemBundle\DependencyInjection\Factory\AdapterFactoryInterface;

Expand All @@ -18,7 +18,7 @@ public function getKey()
public function create(ContainerBuilder $container, $id, array $config)
{
$definition = $container
->setDefinition($id, new DefinitionDecorator('oneup_flysystem.adapter.rackspace'))
->setDefinition($id, new ChildDefinition('oneup_flysystem.adapter.rackspace'))
->setLazy($config['lazy'])
->replaceArgument(0, new Reference($config['container']))
->replaceArgument(1, $config['prefix'])
Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Factory/Adapter/ReplicateFactory.php
Expand Up @@ -4,7 +4,7 @@

use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\Reference;
use Oneup\FlysystemBundle\DependencyInjection\Factory\AdapterFactoryInterface;

Expand All @@ -18,7 +18,7 @@ public function getKey()
public function create(ContainerBuilder $container, $id, array $config)
{
$definition = $container
->setDefinition($id, new DefinitionDecorator('oneup_flysystem.adapter.replicate'))
->setDefinition($id, new ChildDefinition('oneup_flysystem.adapter.replicate'))
->replaceArgument(0, new Reference(sprintf('oneup_flysystem.%s_adapter', $config['sourceAdapter'])))
->replaceArgument(1, new Reference(sprintf('oneup_flysystem.%s_adapter', $config['replicaAdapter'])))
;
Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Factory/Adapter/SftpFactory.php
Expand Up @@ -4,7 +4,7 @@

use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Oneup\FlysystemBundle\DependencyInjection\Factory\AdapterFactoryInterface;

class SftpFactory implements AdapterFactoryInterface
Expand All @@ -17,7 +17,7 @@ public function getKey()
public function create(ContainerBuilder $container, $id, array $config)
{
$definition = $container
->setDefinition($id, new DefinitionDecorator('oneup_flysystem.adapter.sftp'))
->setDefinition($id, new ChildDefinition('oneup_flysystem.adapter.sftp'))
->replaceArgument(0, $config)
;
}
Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Factory/Adapter/WebDavFactory.php
Expand Up @@ -4,7 +4,7 @@

use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\Reference;
use Oneup\FlysystemBundle\DependencyInjection\Factory\AdapterFactoryInterface;

Expand All @@ -18,7 +18,7 @@ public function getKey()
public function create(ContainerBuilder $container, $id, array $config)
{
$definition = $container
->setDefinition($id, new DefinitionDecorator('oneup_flysystem.adapter.webdav'))
->setDefinition($id, new ChildDefinition('oneup_flysystem.adapter.webdav'))
->replaceArgument(0, new Reference($config['client']))
->replaceArgument(1, $config['prefix'])
;
Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Factory/Adapter/ZipFactory.php
Expand Up @@ -4,7 +4,7 @@

use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\Reference;
use Oneup\FlysystemBundle\DependencyInjection\Factory\AdapterFactoryInterface;

Expand All @@ -20,7 +20,7 @@ public function create(ContainerBuilder $container, $id, array $config)
$archive = !is_null($config['archive']) ? new Reference($config['archive']) : null;

$definition = $container
->setDefinition($id, new DefinitionDecorator('oneup_flysystem.adapter.zip'))
->setDefinition($id, new ChildDefinition('oneup_flysystem.adapter.zip'))
->replaceArgument(0, $config['location'])
->replaceArgument(1, $archive)
->replaceArgument(2, $config['prefix'])
Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Factory/Cache/AdapterFactory.php
Expand Up @@ -4,7 +4,7 @@

use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\Reference;
use Oneup\FlysystemBundle\DependencyInjection\Factory\CacheFactoryInterface;

Expand All @@ -18,7 +18,7 @@ public function getKey()
public function create(ContainerBuilder $container, $id, array $config)
{
$container
->setDefinition($id, new DefinitionDecorator('oneup_flysystem.cache.adapter'))
->setDefinition($id, new ChildDefinition('oneup_flysystem.cache.adapter'))
->replaceArgument(0, new Reference(sprintf('oneup_flysystem.%s_adapter', $config['adapter'])))
->replaceArgument(1, $config['key'])
->replaceArgument(2, $config['expires'])
Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Factory/Cache/MemcachedFactory.php
Expand Up @@ -4,7 +4,7 @@

use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\Reference;
use Oneup\FlysystemBundle\DependencyInjection\Factory\CacheFactoryInterface;

Expand All @@ -18,7 +18,7 @@ public function getKey()
public function create(ContainerBuilder $container, $id, array $config)
{
$container
->setDefinition($id, new DefinitionDecorator('oneup_flysystem.cache.memcached'))
->setDefinition($id, new ChildDefinition('oneup_flysystem.cache.memcached'))
->replaceArgument(0, new Reference($config['client']))
->replaceArgument(1, $config['key'])
->replaceArgument(2, $config['expires'])
Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Factory/Cache/MemoryFactory.php
Expand Up @@ -4,7 +4,7 @@

use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Oneup\FlysystemBundle\DependencyInjection\Factory\CacheFactoryInterface;

class MemoryFactory implements CacheFactoryInterface
Expand All @@ -17,7 +17,7 @@ public function getKey()
public function create(ContainerBuilder $container, $id, array $config)
{
$container
->setDefinition($id, new DefinitionDecorator('oneup_flysystem.cache.memory'))
->setDefinition($id, new ChildDefinition('oneup_flysystem.cache.memory'))
;
}

Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Factory/Cache/NoopFactory.php
Expand Up @@ -4,7 +4,7 @@

use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Oneup\FlysystemBundle\DependencyInjection\Factory\CacheFactoryInterface;

class NoopFactory implements CacheFactoryInterface
Expand All @@ -17,7 +17,7 @@ public function getKey()
public function create(ContainerBuilder $container, $id, array $config)
{
$container
->setDefinition($id, new DefinitionDecorator('oneup_flysystem.cache.noop'))
->setDefinition($id, new ChildDefinition('oneup_flysystem.cache.noop'))
;
}

Expand Down

0 comments on commit 9cbf45f

Please sign in to comment.