Merge branch 'franck' into admin

Conflicts:
	composer.lock
	core/lib/Thelia/Core/Thelia.php
This commit is contained in:
franck
2013-06-10 16:35:49 +02:00
10 changed files with 681 additions and 77 deletions

View File

@@ -21,7 +21,14 @@
"symfony/routing" : "2.2.*",
"symfony/filesystem" : "2.2.*",
"symfony/yaml" : "2.2.*",
"symfony-cmf/routing": "1.0.0"
"symfony-cmf/routing": "1.0.0",
"symfony/form": "2.2.*",
"symfony/validator": "2.2.*",
"symfony/security": "2.2.*",
"symfony/templating": "2.2.*",
"smarty/smarty": "v3.1.13"
},
"require-dev" : {
"fzaninotto/faker": "dev-master"

667
composer.lock generated
View File

@@ -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": "70ffc474830be26b4d7e156dd2aa5c31",
"hash": "d0f7befd92333c17dbe9fbb5a8e2c77e",
"packages": [
{
"name": "ezyang/htmlpurifier",
@@ -31,7 +31,7 @@
"library/HTMLPurifier.composer.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"notification-url": "http://packagist.org/downloads/",
"license": [
"LGPL"
],
@@ -69,14 +69,14 @@
"lib/password.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"notification-url": "http://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Anthony Ferrara",
"email": "ircmaxell@ircmaxell.com",
"email": "ircmaxell@php.net",
"homepage": "http://blog.ircmaxell.com"
}
],
@@ -114,7 +114,7 @@
"classes/phing/"
]
},
"notification-url": "https://packagist.org/downloads/",
"notification-url": "http://packagist.org/downloads/",
"include-path": [
"classes"
],
@@ -174,7 +174,7 @@
"generator/lib"
]
},
"notification-url": "https://packagist.org/downloads/",
"notification-url": "http://packagist.org/downloads/",
"include-path": [
"runtime/lib",
"generator/lib"
@@ -220,7 +220,7 @@
"Psr\\Log\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"notification-url": "http://packagist.org/downloads/",
"license": [
"MIT"
],
@@ -238,6 +238,49 @@
],
"time": "2012-12-21 11:40:51"
},
{
"name": "smarty/smarty",
"version": "v3.1.13",
"source": {
"type": "svn",
"url": "http://smarty-php.googlecode.com/svn",
"reference": "/tags/v3.1.13/@4699"
},
"require": {
"php": ">=5.2"
},
"type": "library",
"autoload": {
"classmap": [
"distribution/libs/Smarty.class.php",
"distribution/libs/SmartyBC.class.php"
]
},
"notification-url": "http://packagist.org/downloads/",
"license": [
"LGPL-3.0"
],
"authors": [
{
"name": "Monte Ohrt",
"email": "monte@ohrt.com"
},
{
"name": "Uwe Tews",
"email": "uwe.tews@googlemail.com"
},
{
"name": "Rodney Rehm",
"email": "rodney.rehm@medialize.de"
}
],
"description": "Smarty - the compiling PHP template engine",
"homepage": "http://www.smarty.net",
"keywords": [
"templating"
],
"time": "2013-01-26 12:03:52"
},
{
"name": "symfony-cmf/routing",
"version": "1.0.0",
@@ -269,7 +312,7 @@
"Symfony\\Cmf\\Component\\Routing": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"notification-url": "http://packagist.org/downloads/",
"license": [
"MIT"
],
@@ -488,17 +531,17 @@
},
{
"name": "symfony/event-dispatcher",
"version": "v2.2.1",
"version": "v2.2.2",
"target-dir": "Symfony/Component/EventDispatcher",
"source": {
"type": "git",
"url": "https://github.com/symfony/EventDispatcher.git",
"reference": "v2.2.1"
"reference": "v2.2.2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/v2.2.1",
"reference": "v2.2.1",
"url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/v2.2.2",
"reference": "v2.2.2",
"shasum": ""
},
"require": {
@@ -587,19 +630,78 @@
"homepage": "http://symfony.com",
"time": "2013-05-06 20:02:13"
},
{
"name": "symfony/form",
"version": "v2.2.2",
"target-dir": "Symfony/Component/Form",
"source": {
"type": "git",
"url": "https://github.com/symfony/Form.git",
"reference": "v2.2.2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Form/zipball/v2.2.2",
"reference": "v2.2.2",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"symfony/event-dispatcher": ">=2.1,<3.0",
"symfony/locale": ">=2.0,<3.0",
"symfony/options-resolver": ">=2.1,<2.3-dev",
"symfony/property-access": ">=2.2,<2.3-dev"
},
"require-dev": {
"symfony/http-foundation": ">=2.1,<2.3-dev",
"symfony/validator": ">=2.2,<2.3-dev"
},
"suggest": {
"symfony/http-foundation": "2.2.*",
"symfony/validator": "2.2.*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.2-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\Form\\": ""
}
},
"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 Form Component",
"homepage": "http://symfony.com",
"time": "2013-06-02 12:05:41"
},
{
"name": "symfony/http-foundation",
"version": "v2.2.1",
"version": "v2.2.2",
"target-dir": "Symfony/Component/HttpFoundation",
"source": {
"type": "git",
"url": "https://github.com/symfony/HttpFoundation.git",
"reference": "v2.2.1"
"reference": "v2.2.2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/v2.2.1",
"reference": "v2.2.1",
"url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/v2.2.2",
"reference": "v2.2.2",
"shasum": ""
},
"require": {
@@ -635,7 +737,7 @@
],
"description": "Symfony HttpFoundation Component",
"homepage": "http://symfony.com",
"time": "2013-04-06 10:15:43"
"time": "2013-05-27 14:47:40"
},
{
"name": "symfony/http-kernel",
@@ -706,19 +808,301 @@
"homepage": "http://symfony.com",
"time": "2013-06-02 13:03:09"
},
{
"name": "symfony/icu",
"version": "v1.0.0",
"target-dir": "Symfony/Component/Icu",
"source": {
"type": "git",
"url": "https://github.com/symfony/Icu.git",
"reference": "v1.0.0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Icu/zipball/v1.0.0",
"reference": "v1.0.0",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"symfony/intl": ">=2.3,<3.0"
},
"type": "library",
"autoload": {
"psr-0": {
"Symfony\\Component\\Icu\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Bernhard Schussek",
"email": "bschussek@gmail.com"
}
],
"description": "Contains an excerpt of the ICU data and classes to load it.",
"homepage": "http://symfony.com",
"keywords": [
"icu",
"intl"
],
"time": "2013-06-03 18:32:07"
},
{
"name": "symfony/intl",
"version": "v2.3.0",
"target-dir": "Symfony/Component/Intl",
"source": {
"type": "git",
"url": "https://github.com/symfony/Intl.git",
"reference": "v2.3.0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Intl/zipball/v2.3.0",
"reference": "v2.3.0",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"symfony/icu": ">=1.0-RC,<2.0"
},
"require-dev": {
"symfony/filesystem": ">=2.1"
},
"suggest": {
"ext-intl": "to use the component with locales other than \"en\""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.3-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\Intl\\": ""
},
"classmap": [
"Symfony/Component/Intl/Resources/stubs"
],
"files": [
"Symfony/Component/Intl/Resources/stubs/functions.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Igor Wiedler",
"email": "igor@wiedler.ch",
"homepage": "http://wiedler.ch/igor/"
},
{
"name": "Bernhard Schussek",
"email": "bschussek@gmail.com"
},
{
"name": "Eriksen Costa",
"email": "eriksen.costa@infranology.com.br"
}
],
"description": "A PHP replacement layer for the C intl extension that includes additional data from the ICU library.",
"homepage": "http://symfony.com",
"keywords": [
"i18n",
"icu",
"internationalization",
"intl",
"l10n",
"localization"
],
"time": "2013-05-18 11:21:22"
},
{
"name": "symfony/locale",
"version": "v2.3.0",
"target-dir": "Symfony/Component/Locale",
"source": {
"type": "git",
"url": "https://github.com/symfony/Locale.git",
"reference": "v2.3.0-RC1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Locale/zipball/v2.3.0-RC1",
"reference": "v2.3.0-RC1",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"symfony/intl": ">=2.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.3-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\Locale\\": ""
}
},
"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 Locale Component",
"homepage": "http://symfony.com",
"time": "2013-04-11 09:29:25"
},
{
"name": "symfony/options-resolver",
"version": "v2.2.2",
"target-dir": "Symfony/Component/OptionsResolver",
"source": {
"type": "git",
"url": "https://github.com/symfony/OptionsResolver.git",
"reference": "v2.2.2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/OptionsResolver/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\\OptionsResolver\\": ""
}
},
"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 OptionsResolver Component",
"homepage": "http://symfony.com",
"keywords": [
"config",
"configuration",
"options"
],
"time": "2013-01-17 15:25:59"
},
{
"name": "symfony/property-access",
"version": "v2.2.2",
"target-dir": "Symfony/Component/PropertyAccess",
"source": {
"type": "git",
"url": "https://github.com/symfony/PropertyAccess.git",
"reference": "v2.2.2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/PropertyAccess/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\\PropertyAccess\\": ""
}
},
"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 PropertyAccess Component",
"homepage": "http://symfony.com",
"keywords": [
"access",
"array",
"extraction",
"index",
"injection",
"object",
"property",
"property path",
"reflection"
],
"time": "2013-04-07 22:02:49"
},
{
"name": "symfony/routing",
"version": "v2.2.1",
"version": "v2.2.2",
"target-dir": "Symfony/Component/Routing",
"source": {
"type": "git",
"url": "https://github.com/symfony/Routing.git",
"reference": "v2.2.1"
"reference": "v2.2.2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Routing/zipball/v2.2.1",
"reference": "v2.2.1",
"url": "https://api.github.com/repos/symfony/Routing/zipball/v2.2.2",
"reference": "v2.2.2",
"shasum": ""
},
"require": {
@@ -762,7 +1146,236 @@
],
"description": "Symfony Routing Component",
"homepage": "http://symfony.com",
"time": "2013-03-23 12:03:22"
"time": "2013-05-10 16:49:00"
},
{
"name": "symfony/security",
"version": "v2.2.2",
"target-dir": "Symfony/Component/Security",
"source": {
"type": "git",
"url": "https://github.com/symfony/Security.git",
"reference": "v2.2.2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Security/zipball/v2.2.2",
"reference": "v2.2.2",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"symfony/event-dispatcher": ">=2.1,<3.0",
"symfony/http-foundation": ">=2.1,<2.3-dev",
"symfony/http-kernel": ">=2.1,<=2.3-dev"
},
"require-dev": {
"doctrine/common": ">=2.2,<3.0",
"doctrine/dbal": ">=2.2,<3.0",
"psr/log": ">=1.0,<2.0",
"symfony/form": ">=2.0,<3.0",
"symfony/routing": ">=2.2,<2.3-dev",
"symfony/validator": ">=2.2,<2.3-dev"
},
"suggest": {
"doctrine/dbal": "to use the built-in ACL implementation",
"symfony/class-loader": "2.2.*",
"symfony/finder": "2.2.*",
"symfony/form": "2.2.*",
"symfony/routing": "2.2.*",
"symfony/validator": "2.2.*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.2-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\Security\\": ""
}
},
"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 Security Component",
"homepage": "http://symfony.com",
"time": "2013-05-27 14:47:40"
},
{
"name": "symfony/templating",
"version": "v2.2.2",
"target-dir": "Symfony/Component/Templating",
"source": {
"type": "git",
"url": "https://github.com/symfony/Templating.git",
"reference": "v2.2.2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Templating/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\\Templating\\": ""
}
},
"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 Templating Component",
"homepage": "http://symfony.com",
"time": "2013-04-17 05:27:14"
},
{
"name": "symfony/translation",
"version": "v2.3.0",
"target-dir": "Symfony/Component/Translation",
"source": {
"type": "git",
"url": "https://github.com/symfony/Translation.git",
"reference": "v2.3.0-RC1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Translation/zipball/v2.3.0-RC1",
"reference": "v2.3.0-RC1",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"symfony/config": ">=2.0,<3.0",
"symfony/yaml": ">=2.2,<3.0"
},
"suggest": {
"symfony/config": "",
"symfony/yaml": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.3-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\Translation\\": ""
}
},
"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 Translation Component",
"homepage": "http://symfony.com",
"time": "2013-05-13 14:36:40"
},
{
"name": "symfony/validator",
"version": "v2.2.2",
"target-dir": "Symfony/Component/Validator",
"source": {
"type": "git",
"url": "https://github.com/symfony/Validator.git",
"reference": "v2.2.2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Validator/zipball/v2.2.2",
"reference": "v2.2.2",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"symfony/translation": ">=2.0,<3.0"
},
"require-dev": {
"symfony/config": ">=2.2,<2.3-dev",
"symfony/http-foundation": ">=2.1,<3.0",
"symfony/locale": ">=2.0,<3.0",
"symfony/yaml": ">=2.0,<3.0"
},
"suggest": {
"doctrine/common": "~2.2",
"symfony/config": "2.2.*",
"symfony/http-foundation": "2.2.*",
"symfony/locale": "2.2.*",
"symfony/yaml": "2.2.*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.2-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\Validator\\": ""
}
},
"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 Validator Component",
"homepage": "http://symfony.com",
"time": "2013-06-02 12:05:41"
},
{
"name": "symfony/yaml",
@@ -819,12 +1432,12 @@
"source": {
"type": "git",
"url": "https://github.com/fzaninotto/Faker.git",
"reference": "fac6c177c87bb5d10d256d9caa6933046fbac999"
"reference": "v1.2.0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fzaninotto/Faker/zipball/fac6c177c87bb5d10d256d9caa6933046fbac999",
"reference": "fac6c177c87bb5d10d256d9caa6933046fbac999",
"url": "https://api.github.com/repos/fzaninotto/Faker/zipball/v1.2.0",
"reference": "v1.2.0",
"shasum": ""
},
"require": {
@@ -833,7 +1446,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.1.x-dev"
"dev-master": "1.2.x-dev"
}
},
"autoload": {
@@ -857,7 +1470,7 @@
"faker",
"fixtures"
],
"time": "2013-05-31 17:07:37"
"time": "2013-06-09 18:05:57"
}
],
"aliases": [

View File

@@ -5,10 +5,12 @@
* @file
* Functions needed for Thelia bootstrap
*/
define('THELIA_ROOT', realpath(__DIR__ .'/../') . "/");
define('THELIA_CONF_DIR', THELIA_ROOT . '/local/config');
define('THELIA_MODULE_DIR', THELIA_ROOT . '/local/modules');
define('THELIA_TEMPLATE_DIR', THELIA_ROOT . 'templates/');
define('THELIA_ROOT' , rtrim(realpath(__DIR__ .'/../'),'/') . "/");
define('THELIA_LOCAL_DIR' , THELIA_ROOT . '/local/');
define('THELIA_CONF_DIR' , THELIA_LOCAL_DIR . 'config/');
define('THELIA_MODULE_DIR' , THELIA_LOCAL_DIR . 'modules/');
define('THELIA_TEMPLATE_DIR' , THELIA_ROOT . '/web/templates/');
$loader = require __DIR__ . "/vendor/autoload.php";

View File

@@ -44,7 +44,7 @@
<service id="router.admin" class="%router.class%">
<argument type="service" id="router.admin.xmlLoader"/>
<argument>routing.xml</argument>
<argument>admin.xml</argument>
<argument type="collection">
<argument key="cache_dir">%kernel.cache_dir%</argument>
<argument key="debug">%kernel.debug%</argument>
@@ -56,10 +56,12 @@
<call method="setContext">
<argument type="service" id="request.context"/>
</call>
<!--
<call method="add">
<argument type="service" id="router.default_route"/>
<argument>-255</argument>
</call>
-->
<call method="add">
<argument type="service" id="router.admin"/>
<argument>0</argument>

View File

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<routes xmlns="http://symfony.com/schema/routing"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
<route id="blog" path="/">
<default key="_controller">Thelia\Controller\Admin</default>
</route>
</routes>

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<routes xmlns="http://symfony.com/schema/routing"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
<import resource="admin_routing.xml" prefix="/admin" />
</routes>

View File

@@ -123,12 +123,12 @@ class Thelia extends Kernel
foreach ($modules as $module) {
try {
$loader = new XmlFileLoader($container, new FileLocator(THELIA_MODULE_DIR . "/" . ucfirst($module->getCode()) . "/Config"));
$loader->load("config.xml");
} catch(\InvalidArgumentException $e) {
}
try {
$loader = new XmlFileLoader($container, new FileLocator(THELIA_MODULE_DIR . "/" . ucfirst($module->getCode()) . "/Config"));
$loader->load("config.xml");
}
catch(\InvalidArgumentException $e) {
// FIXME: process module configuration exception
}
}
@@ -229,7 +229,7 @@ class Thelia extends Kernel
{
$bundles = array(
/* TheliaBundle contain all the dependency injection description */
new Bundle\TheliaBundle()
new Bundle\TheliaBundle(),
);
/**

View File

@@ -1,5 +1,4 @@
<?php
use Symfony\Component\HttpFoundation\Request;
use Thelia\Core\Thelia;

View File

@@ -1,5 +1,4 @@
<?php
use Symfony\Component\HttpFoundation\Request;
use Thelia\Core\Thelia;