From c4d8aef9626455591c9a2d2097f7dd6cd2953030 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Mon, 3 Jun 2013 12:18:16 +0200 Subject: [PATCH] update composer dependencies and add filsesystem component --- composer.json | 1 + composer.lock | 117 ++++++++++++------ .../Loader/XmlFileLoader.php | 20 +++ .../Loader/schema/dic/config/thelia-1.0.xsd | 10 ++ 4 files changed, 113 insertions(+), 35 deletions(-) diff --git a/composer.json b/composer.json index 3cb4e6bf1..52732105a 100644 --- a/composer.json +++ b/composer.json @@ -19,6 +19,7 @@ "symfony/event-dispatcher" : "2.2.*", "symfony/http-kernel" : "2.2.*", "symfony/routing" : "2.2.*", + "symfony/filesystem" : "2.2.*", "symfony/yaml" : "2.2.*", "symfony-cmf/routing": "1.0.0" }, diff --git a/composer.lock b/composer.lock index 8b5668da7..a7322090a 100644 --- a/composer.lock +++ b/composer.lock @@ -3,7 +3,7 @@ "This file locks the dependencies of your project to a known state", "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" ], - "hash": "fed0f90bca039760e3021c1febd59371", + "hash": "70ffc474830be26b4d7e156dd2aa5c31", "packages": [ { "name": "ezyang/htmlpurifier", @@ -289,17 +289,17 @@ }, { "name": "symfony/class-loader", - "version": "v2.2.1", + "version": "v2.2.2", "target-dir": "Symfony/Component/ClassLoader", "source": { "type": "git", "url": "https://github.com/symfony/ClassLoader.git", - "reference": "v2.2.1" + "reference": "v2.2.2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/ClassLoader/zipball/v2.2.1", - "reference": "v2.2.1", + "url": "https://api.github.com/repos/symfony/ClassLoader/zipball/v2.2.2", + "reference": "v2.2.2", "shasum": "" }, "require": { @@ -335,21 +335,21 @@ ], "description": "Symfony ClassLoader Component", "homepage": "http://symfony.com", - "time": "2013-03-19 08:32:26" + "time": "2013-05-06 20:02:13" }, { "name": "symfony/config", - "version": "v2.2.1", + "version": "v2.2.2", "target-dir": "Symfony/Component/Config", "source": { "type": "git", "url": "https://github.com/symfony/Config.git", - "reference": "v2.2.1" + "reference": "v2.2.2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Config/zipball/v2.2.1", - "reference": "v2.2.1", + "url": "https://api.github.com/repos/symfony/Config/zipball/v2.2.2", + "reference": "v2.2.2", "shasum": "" }, "require": { @@ -382,21 +382,21 @@ ], "description": "Symfony Config Component", "homepage": "http://symfony.com", - "time": "2013-03-01 10:42:10" + "time": "2013-05-10 18:08:31" }, { "name": "symfony/console", - "version": "v2.2.1", + "version": "v2.2.2", "target-dir": "Symfony/Component/Console", "source": { "type": "git", "url": "https://github.com/symfony/Console.git", - "reference": "v2.2.1" + "reference": "v2.2.2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/v2.2.1", - "reference": "v2.2.1", + "url": "https://api.github.com/repos/symfony/Console/zipball/v2.2.2", + "reference": "v2.2.2", "shasum": "" }, "require": { @@ -429,21 +429,21 @@ ], "description": "Symfony Console Component", "homepage": "http://symfony.com", - "time": "2013-03-19 20:48:08" + "time": "2013-05-27 14:47:40" }, { "name": "symfony/dependency-injection", - "version": "v2.2.1", + "version": "v2.2.2", "target-dir": "Symfony/Component/DependencyInjection", "source": { "type": "git", "url": "https://github.com/symfony/DependencyInjection.git", - "reference": "v2.2.1" + "reference": "v2.2.2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/v2.2.1", - "reference": "v2.2.1", + "url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/v2.2.2", + "reference": "v2.2.2", "shasum": "" }, "require": { @@ -484,7 +484,7 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "http://symfony.com", - "time": "2013-03-23 07:49:54" + "time": "2013-05-06 08:37:50" }, { "name": "symfony/event-dispatcher", @@ -540,6 +540,53 @@ "homepage": "http://symfony.com", "time": "2013-02-11 11:26:43" }, + { + "name": "symfony/filesystem", + "version": "v2.2.2", + "target-dir": "Symfony/Component/Filesystem", + "source": { + "type": "git", + "url": "https://github.com/symfony/Filesystem.git", + "reference": "v2.2.2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Filesystem/zipball/v2.2.2", + "reference": "v2.2.2", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Filesystem\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "http://symfony.com", + "time": "2013-05-06 20:02:13" + }, { "name": "symfony/http-foundation", "version": "v2.2.1", @@ -592,17 +639,17 @@ }, { "name": "symfony/http-kernel", - "version": "v2.2.1", + "version": "v2.2.2", "target-dir": "Symfony/Component/HttpKernel", "source": { "type": "git", "url": "https://github.com/symfony/HttpKernel.git", - "reference": "v2.2.1" + "reference": "v2.2.2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/v2.2.1", - "reference": "v2.2.1", + "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/v2.2.2", + "reference": "v2.2.2", "shasum": "" }, "require": { @@ -657,7 +704,7 @@ ], "description": "Symfony HttpKernel Component", "homepage": "http://symfony.com", - "time": "2013-04-06 10:16:33" + "time": "2013-06-02 13:03:09" }, { "name": "symfony/routing", @@ -719,17 +766,17 @@ }, { "name": "symfony/yaml", - "version": "v2.2.1", + "version": "v2.2.2", "target-dir": "Symfony/Component/Yaml", "source": { "type": "git", "url": "https://github.com/symfony/Yaml.git", - "reference": "v2.2.1" + "reference": "v2.2.2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/v2.2.1", - "reference": "v2.2.1", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/v2.2.2", + "reference": "v2.2.2", "shasum": "" }, "require": { @@ -762,7 +809,7 @@ ], "description": "Symfony Yaml Component", "homepage": "http://symfony.com", - "time": "2013-03-23 07:49:54" + "time": "2013-05-10 18:08:31" } ], "packages-dev": [ @@ -772,12 +819,12 @@ "source": { "type": "git", "url": "https://github.com/fzaninotto/Faker.git", - "reference": "202c8517478011464e0e50923cab2bcd6344453b" + "reference": "fac6c177c87bb5d10d256d9caa6933046fbac999" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/202c8517478011464e0e50923cab2bcd6344453b", - "reference": "202c8517478011464e0e50923cab2bcd6344453b", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/fac6c177c87bb5d10d256d9caa6933046fbac999", + "reference": "fac6c177c87bb5d10d256d9caa6933046fbac999", "shasum": "" }, "require": { @@ -810,7 +857,7 @@ "faker", "fixtures" ], - "time": "2013-05-20 20:34:10" + "time": "2013-05-31 17:07:37" } ], "aliases": [ diff --git a/core/lib/Thelia/Core/DependencyInjection/Loader/XmlFileLoader.php b/core/lib/Thelia/Core/DependencyInjection/Loader/XmlFileLoader.php index b7522d104..e4ba1501d 100644 --- a/core/lib/Thelia/Core/DependencyInjection/Loader/XmlFileLoader.php +++ b/core/lib/Thelia/Core/DependencyInjection/Loader/XmlFileLoader.php @@ -63,9 +63,29 @@ class XmlFileLoader extends FileLoader $this->parseParameters($xml); + $this->parseCommands($xml); + $this->parseDefinitions($xml, $path); } + protected function parseCommands(SimpleXMLElement $xml) + { + if (false === $commands = $xml->xpath('//config:commands/config:command')) { + return; + } + try { + $commandConfig = $this->container->getParameter("command.definition"); + } catch (\Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException $e) { + $commandConfig = array(); + } + + foreach ($commands as $command) { + array_push($commandConfig, $command->getAttributeAsPhp("class")); + } + + $this->container->setParameter("command.definition", $commandConfig); + } + /** * Parses parameters * diff --git a/core/lib/Thelia/Core/DependencyInjection/Loader/schema/dic/config/thelia-1.0.xsd b/core/lib/Thelia/Core/DependencyInjection/Loader/schema/dic/config/thelia-1.0.xsd index 430a82362..a3b4bd83f 100644 --- a/core/lib/Thelia/Core/DependencyInjection/Loader/schema/dic/config/thelia-1.0.xsd +++ b/core/lib/Thelia/Core/DependencyInjection/Loader/schema/dic/config/thelia-1.0.xsd @@ -64,6 +64,16 @@ + + + + + + + + + +