diff --git a/StorageBundle/DependencyInjection/Configuration.php b/StorageBundle/DependencyInjection/Configuration.php index caad062..2084ac9 100644 --- a/StorageBundle/DependencyInjection/Configuration.php +++ b/StorageBundle/DependencyInjection/Configuration.php @@ -15,7 +15,7 @@ class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); + $treeBuilder = new TreeBuilder('storage'); $root = $treeBuilder->root('storage'); $root->useAttributeAsKey('storage_name') ->prototype('array') diff --git a/StorageBundle/DependencyInjection/StorageExtension.php b/StorageBundle/DependencyInjection/StorageExtension.php index 055b4eb..7af35e0 100644 --- a/StorageBundle/DependencyInjection/StorageExtension.php +++ b/StorageBundle/DependencyInjection/StorageExtension.php @@ -20,9 +20,13 @@ class StorageExtension extends Extension { $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Ressources/config')); $loader->load('services.yaml'); + $sLoader = new YamlFileLoader($container, new FileLocator('/config/packages/bluesquare')); + $sLoader->load('storage.yaml'); $configuration = $this->getConfiguration($configs, $container); $config = $this->processConfiguration($configuration, $configs); + dump($sLoader, $container, $configuration, $config); die; + $definition = $container->getDefinition('bluesquare.storage'); $definition->setArgument(0, $config); diff --git a/StorageBundle/Ressources/config/services.yaml b/StorageBundle/Ressources/config/services.yaml index 61a4dec..2866b66 100644 --- a/StorageBundle/Ressources/config/services.yaml +++ b/StorageBundle/Ressources/config/services.yaml @@ -5,3 +5,5 @@ services: public: true arguments: ['user_storage'] Bluesquare\StorageBundle\Storage: '@bluesquare.storage' + imports: + - { ressource: config/bluesquare/storage.yaml } diff --git a/StorageBundle/Storage.php b/StorageBundle/Storage.php index e6223e3..8a62ae6 100644 --- a/StorageBundle/Storage.php +++ b/StorageBundle/Storage.php @@ -23,6 +23,7 @@ class Storage public function __construct(array $user_config = []) { + dump($user_config); die; $this->config_storage = $user_config; } diff --git a/composer.lock b/composer.lock index eeef08c..8d8311e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ee1506d010b16feb41b779df9e156bc2", + "content-hash": "e0fd4d7a1648530618008debe3b39eb2", "packages": [ { "name": "aws/aws-sdk-php", - "version": "3.87.14", + "version": "3.87.15", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "1d442bd93d3648e403ab895b5e1f464b4aa1b376" + "reference": "21a4dd314e2a3c44b5538dd56d3770733a3d03e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/1d442bd93d3648e403ab895b5e1f464b4aa1b376", - "reference": "1d442bd93d3648e403ab895b5e1f464b4aa1b376", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/21a4dd314e2a3c44b5538dd56d3770733a3d03e6", + "reference": "21a4dd314e2a3c44b5538dd56d3770733a3d03e6", "shasum": "" }, "require": { @@ -86,7 +86,81 @@ "s3", "sdk" ], - "time": "2019-02-19T19:08:06+00:00" + "time": "2019-02-20T19:11:08+00:00" + }, + { + "name": "doctrine/event-manager", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/event-manager.git", + "reference": "a520bc093a0170feeb6b14e9d83f3a14452e64b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/a520bc093a0170feeb6b14e9d83f3a14452e64b3", + "reference": "a520bc093a0170feeb6b14e9d83f3a14452e64b3", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "conflict": { + "doctrine/common": "<2.9@dev" + }, + "require-dev": { + "doctrine/coding-standard": "^4.0", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "Doctrine Event Manager component", + "homepage": "https://www.doctrine-project.org/projects/event-manager.html", + "keywords": [ + "event", + "eventdispatcher", + "eventmanager" + ], + "time": "2018-06-11T11:59:03+00:00" }, { "name": "guzzlehttp/guzzle",