summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Coevoet <stof@notk.org>2012-10-21 20:55:45 +0200
committerChristophe Coevoet <stof@notk.org>2012-10-21 20:55:45 +0200
commitc6f67a0f533aa34bd7555a016046941c61380ee9 (patch)
tree690588eb1432cd367335794222bab2954271fed6
parenta669d441875a8b8e7f173955817ed2494c5fdcb5 (diff)
Converted the site to composercomposer
-rw-r--r--.gitignore2
-rw-r--r--app/AppKernel.php1
-rw-r--r--app/SymfonyRequirements.php638
-rw-r--r--app/autoload.php45
-rw-r--r--app/bootstrap.php.cache1568
-rw-r--r--app/check.php55
-rw-r--r--app/config/config.yml2
-rw-r--r--bin/build_bootstrap.php56
-rw-r--r--composer.json44
-rw-r--r--composer.lock1410
-rw-r--r--src/Tolkiendil/AssoBundle/Form/Type/DatePickerType.php9
-rw-r--r--src/Tolkiendil/GameBundle/Admin/WordSearchAdmin.php6
-rw-r--r--src/Tolkiendil/GameBundle/Controller/QuizController.php4
-rw-r--r--src/Tolkiendil/GameBundle/Form/QuestionFormType.php49
-rw-r--r--src/Tolkiendil/GameBundle/Form/QuizFormType.php33
-rw-r--r--src/Tolkiendil/GameBundle/Form/Type/Admin/LetterCollectionType.php9
-rw-r--r--src/Tolkiendil/GameBundle/Form/Type/Admin/LetterGridType.php9
-rw-r--r--src/Tolkiendil/GameBundle/Form/Type/Admin/WordCollectionType.php2
-rw-r--r--src/Tolkiendil/GameBundle/Resources/views/WordSearch/Admin/preview.html.twig24
-rw-r--r--src/Tolkiendil/MainBundle/DependencyInjection/TolkiendilMainExtension.php3
m---------vendor/bundles/Doctrine/Bundle/DoctrineBundle0
m---------vendor/bundles/Doctrine/Bundle/FixturesBundle0
m---------vendor/bundles/JMS/DebuggingBundle0
m---------vendor/bundles/Knp/Bundle/MenuBundle0
m---------vendor/bundles/Sensio/Bundle/GeneratorBundle0
m---------vendor/bundles/Sf2gen/Bundle/ConsoleBundle0
m---------vendor/bundles/Sonata/AdminBundle0
m---------vendor/bundles/Sonata/BlockBundle0
m---------vendor/bundles/Sonata/CacheBundle0
m---------vendor/bundles/Sonata/DoctrineORMAdminBundle0
m---------vendor/bundles/Sonata/jQueryBundle0
m---------vendor/bundles/Stof/DoctrineExtensionsBundle0
m---------vendor/bundles/Symfony/Bundle/MonologBundle0
m---------vendor/buzz0
m---------vendor/doctrine0
m---------vendor/doctrine-common0
m---------vendor/doctrine-data-fixtures0
m---------vendor/doctrine-dbal0
m---------vendor/doctrine-migrations0
m---------vendor/gedmo-doctrine-extensions0
m---------vendor/knp-menu0
m---------vendor/monolog0
m---------vendor/symfony0
m---------vendor/twig0
m---------vendor/twig-extensions0
45 files changed, 2224 insertions, 1745 deletions
diff --git a/.gitignore b/.gitignore
index d621294..8e31a47 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,8 @@
.DS_Store
/app/cache/*
/app/logs/*
+/app/bootstrap.php.cache
/app/config/user_config.yml
/app/phpunit.xml
/web/bundles/
+/vendor
diff --git a/app/AppKernel.php b/app/AppKernel.php
index 6aeabdb..22202f6 100644
--- a/app/AppKernel.php
+++ b/app/AppKernel.php
@@ -22,7 +22,6 @@ class AppKernel extends Kernel
new Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle(),
new Sonata\jQueryBundle\SonatajQueryBundle(),
new Sonata\BlockBundle\SonataBlockBundle(),
- new Sonata\CacheBundle\SonataCacheBundle(),
// register your bundles
new Tolkiendil\MainBundle\TolkiendilMainBundle(),
diff --git a/app/SymfonyRequirements.php b/app/SymfonyRequirements.php
new file mode 100644
index 0000000..4df46d1
--- /dev/null
+++ b/app/SymfonyRequirements.php
@@ -0,0 +1,638 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/*
+ * Users of PHP 5.2 should be able to run the requirements checks.
+ * This is why the file and all classes must be compatible with PHP 5.2+
+ * (e.g. not using namespaces and closures).
+ *
+ * ************** CAUTION **************
+ *
+ * DO NOT EDIT THIS FILE as it will be overriden by Composer as part of
+ * the installation/update process. The original file resides in the
+ * SensioDistributionBundle.
+ *
+ * ************** CAUTION **************
+ */
+
+/**
+ * Represents a single PHP requirement, e.g. an installed extension.
+ * It can be a mandatory requirement or an optional recommendation.
+ * There is a special subclass, named PhpIniRequirement, to check a php.ini configuration.
+ *
+ * @author Tobias Schultze <http://tobion.de>
+ */
+class Requirement
+{
+ private $fulfilled;
+ private $testMessage;
+ private $helpText;
+ private $helpHtml;
+ private $optional;
+
+ /**
+ * Constructor that initializes the requirement.
+ *
+ * @param Boolean $fulfilled Whether the requirement is fulfilled
+ * @param string $testMessage The message for testing the requirement
+ * @param string $helpHtml The help text formatted in HTML for resolving the problem
+ * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
+ * @param Boolean $optional Whether this is only an optional recommendation not a mandatory requirement
+ */
+ public function __construct($fulfilled, $testMessage, $helpHtml, $helpText = null, $optional = false)
+ {
+ $this->fulfilled = (Boolean) $fulfilled;
+ $this->testMessage = (string) $testMessage;
+ $this->helpHtml = (string) $helpHtml;
+ $this->helpText = null === $helpText ? strip_tags($this->helpHtml) : (string) $helpText;
+ $this->optional = (Boolean) $optional;
+ }
+
+ /**
+ * Returns whether the requirement is fulfilled.
+ *
+ * @return Boolean true if fulfilled, otherwise false
+ */
+ public function isFulfilled()
+ {
+ return $this->fulfilled;
+ }
+
+ /**
+ * Returns the message for testing the requirement.
+ *
+ * @return string The test message
+ */
+ public function getTestMessage()
+ {
+ return $this->testMessage;
+ }
+
+ /**
+ * Returns the help text for resolving the problem
+ *
+ * @return string The help text
+ */
+ public function getHelpText()
+ {
+ return $this->helpText;
+ }
+
+ /**
+ * Returns the help text formatted in HTML.
+ *
+ * @return string The HTML help
+ */
+ public function getHelpHtml()
+ {
+ return $this->helpHtml;
+ }
+
+ /**
+ * Returns whether this is only an optional recommendation and not a mandatory requirement.
+ *
+ * @return Boolean true if optional, false if mandatory
+ */
+ public function isOptional()
+ {
+ return $this->optional;
+ }
+}
+
+/**
+ * Represents a PHP requirement in form of a php.ini configuration.
+ *
+ * @author Tobias Schultze <http://tobion.de>
+ */
+class PhpIniRequirement extends Requirement
+{
+ /**
+ * Constructor that initializes the requirement.
+ *
+ * @param string $cfgName The configuration name used for ini_get()
+ * @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false,
+ or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
+ * @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
+ This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
+ Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
+ * @param string|null $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
+ * @param string|null $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived)
+ * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
+ * @param Boolean $optional Whether this is only an optional recommendation not a mandatory requirement
+ */
+ public function __construct($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null, $optional = false)
+ {
+ $cfgValue = ini_get($cfgName);
+
+ if (is_callable($evaluation)) {
+ if (null === $testMessage || null === $helpHtml) {
+ throw new InvalidArgumentException('You must provide the parameters testMessage and helpHtml for a callback evaluation.');
+ }
+
+ $fulfilled = call_user_func($evaluation, $cfgValue);
+ } else {
+ if (null === $testMessage) {
+ $testMessage = sprintf('%s %s be %s in php.ini',
+ $cfgName,
+ $optional ? 'should' : 'must',
+ $evaluation ? 'enabled' : 'disabled'
+ );
+ }
+
+ if (null === $helpHtml) {
+ $helpHtml = sprintf('Set <strong>%s</strong> to <strong>%s</strong> in php.ini<a href="#phpini">*</a>.',
+ $cfgName,
+ $evaluation ? 'on' : 'off'
+ );
+ }
+
+ $fulfilled = $evaluation == $cfgValue;
+ }
+
+ parent::__construct($fulfilled || ($approveCfgAbsence && false === $cfgValue), $testMessage, $helpHtml, $helpText, $optional);
+ }
+}
+
+/**
+ * A RequirementCollection represents a set of Requirement instances.
+ *
+ * @author Tobias Schultze <http://tobion.de>
+ */
+class RequirementCollection implements IteratorAggregate
+{
+ private $requirements = array();
+
+ /**
+ * Gets the current RequirementCollection as an Iterator.
+ *
+ * @return Traversable A Traversable interface
+ */
+ public function getIterator()
+ {
+ return new ArrayIterator($this->requirements);
+ }
+
+ /**
+ * Adds a Requirement.
+ *
+ * @param Requirement $requirement A Requirement instance
+ */
+ public function add(Requirement $requirement)
+ {
+ $this->requirements[] = $requirement;
+ }
+
+ /**
+ * Adds a mandatory requirement.
+ *
+ * @param Boolean $fulfilled Whether the requirement is fulfilled
+ * @param string $testMessage The message for testing the requirement
+ * @param string $helpHtml The help text formatted in HTML for resolving the problem
+ * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
+ */
+ public function addRequirement($fulfilled, $testMessage, $helpHtml, $helpText = null)
+ {
+ $this->add(new Requirement($fulfilled, $testMessage, $helpHtml, $helpText, false));
+ }
+
+ /**
+ * Adds an optional recommendation.
+ *
+ * @param Boolean $fulfilled Whether the recommendation is fulfilled
+ * @param string $testMessage The message for testing the recommendation
+ * @param string $helpHtml The help text formatted in HTML for resolving the problem
+ * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
+ */
+ public function addRecommendation($fulfilled, $testMessage, $helpHtml, $helpText = null)
+ {
+ $this->add(new Requirement($fulfilled, $testMessage, $helpHtml, $helpText, true));
+ }
+
+ /**
+ * Adds a mandatory requirement in form of a php.ini configuration.
+ *
+ * @param string $cfgName The configuration name used for ini_get()
+ * @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false,
+ or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
+ * @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
+ This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
+ Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
+ * @param string $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
+ * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived)
+ * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
+ */
+ public function addPhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null)
+ {
+ $this->add(new PhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence, $testMessage, $helpHtml, $helpText, false));
+ }
+
+ /**
+ * Adds an optional recommendation in form of a php.ini configuration.
+ *
+ * @param string $cfgName The configuration name used for ini_get()
+ * @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false,
+ or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
+ * @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
+ This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
+ Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
+ * @param string $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
+ * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived)
+ * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
+ */
+ public function addPhpIniRecommendation($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null)
+ {
+ $this->add(new PhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence, $testMessage, $helpHtml, $helpText, true));
+ }
+
+ /**
+ * Adds a requirement collection to the current set of requirements.
+ *
+ * @param RequirementCollection $collection A RequirementCollection instance
+ */
+ public function addCollection(RequirementCollection $collection)
+ {
+ $this->requirements = array_merge($this->requirements, $collection->all());
+ }
+
+ /**
+ * Returns both requirements and recommendations.
+ *
+ * @return array Array of Requirement instances
+ */
+ public function all()
+ {
+ return $this->requirements;
+ }
+
+ /**
+ * Returns all mandatory requirements.
+ *
+ * @return array Array of Requirement instances
+ */
+ public function getRequirements()
+ {
+ $array = array();
+ foreach ($this->requirements as $req) {
+ if (!$req->isOptional()) {
+ $array[] = $req;
+ }
+ }
+
+ return $array;
+ }
+
+ /**
+ * Returns the mandatory requirements that were not met.
+ *
+ * @return array Array of Requirement instances
+ */
+ public function getFailedRequirements()
+ {
+ $array = array();
+ foreach ($this->requirements as $req) {
+ if (!$req->isFulfilled() && !$req->isOptional()) {
+ $array[] = $req;
+ }
+ }
+
+ return $array;
+ }
+
+ /**
+ * Returns all optional recommmendations.
+ *
+ * @return array Array of Requirement instances
+ */
+ public function getRecommendations()
+ {
+ $array = array();
+ foreach ($this->requirements as $req) {
+ if ($req->isOptional()) {
+ $array[] = $req;
+ }
+ }
+
+ return $array;
+ }
+
+ /**
+ * Returns the recommendations that were not met.
+ *
+ * @return array Array of Requirement instances
+ */
+ public function getFailedRecommendations()
+ {
+ $array = array();
+ foreach ($this->requirements as $req) {
+ if (!$req->isFulfilled() && $req->isOptional()) {
+ $array[] = $req;
+ }
+ }
+
+ return $array;
+ }
+
+ /**
+ * Returns whether a php.ini configuration is not correct.
+ *
+ * @return Boolean php.ini configuration problem?
+ */
+ public function hasPhpIniConfigIssue()
+ {
+ foreach ($this->requirements as $req) {
+ if (!$req->isFulfilled() && $req instanceof PhpIniRequirement) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Returns the PHP configuration file (php.ini) path.
+ *
+ * @return string|false php.ini file path
+ */
+ public function getPhpIniConfigPath()
+ {
+ return get_cfg_var('cfg_file_path');
+ }
+}
+
+/**
+ * This class specifies all requirements and optional recommendations that
+ * are necessary to run the Symfony Standard Edition.
+ *
+ * @author Tobias Schultze <http://tobion.de>
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class SymfonyRequirements extends RequirementCollection
+{
+ const REQUIRED_PHP_VERSION = '5.3.3';
+
+ /**
+ * Constructor that initializes the requirements.
+ */
+ public function __construct()
+ {
+ /* mandatory requirements follow */
+
+ $installedPhpVersion = phpversion();
+
+ $this->addRequirement(
+ version_compare($installedPhpVersion, self::REQUIRED_PHP_VERSION, '>='),
+ sprintf('PHP version must be at least %s (%s installed)', self::REQUIRED_PHP_VERSION, $installedPhpVersion),
+ sprintf('You are running PHP version "<strong>%s</strong>", but Symfony needs at least PHP "<strong>%s</strong>" to run.
+ Before using Symfony, upgrade your PHP installation, preferably to the latest version.',
+ $installedPhpVersion, self::REQUIRED_PHP_VERSION),
+ sprintf('Install PHP %s or newer (installed version is %s)', self::REQUIRED_PHP_VERSION, $installedPhpVersion)
+ );
+
+ $this->addRequirement(
+ version_compare($installedPhpVersion, '5.3.16', '!='),
+ 'PHP version must not be 5.3.16 as Symfony won\'t work properly with it',
+ 'Install PHP 5.3.17 or newer (or downgrade to an earlier PHP version)'
+ );
+
+ $this->addRequirement(
+ is_dir(__DIR__.'/../vendor/composer'),
+ 'Vendor libraries must be installed',
+ 'Vendor libraries are missing. Install composer following instructions from <a href="http://getcomposer.org/">http://getcomposer.org/</a>. ' .
+ 'Then run "<strong>php composer.phar install</strong>" to install them.'
+ );
+
+ $baseDir = basename(__DIR__);
+
+ $this->addRequirement(
+ is_writable(__DIR__.'/cache'),
+ "$baseDir/cache/ directory must be writable",
+ "Change the permissions of the \"<strong>$baseDir/cache/</strong>\" directory so that the web server can write into it."
+ );
+
+ $this->addRequirement(
+ is_writable(__DIR__.'/logs'),
+ "$baseDir/logs/ directory must be writable",
+ "Change the permissions of the \"<strong>$baseDir/logs/</strong>\" directory so that the web server can write into it."
+ );
+
+ $this->addPhpIniRequirement(
+ 'date.timezone', true, false,
+ 'date.timezone setting must be set',
+ 'Set the "<strong>date.timezone</strong>" setting in php.ini<a href="#phpini">*</a> (like Europe/Paris).'
+ );
+
+ if (version_compare($installedPhpVersion, self::REQUIRED_PHP_VERSION, '>=')) {
+ $this->addRequirement(
+ (in_array(date_default_timezone_get(), DateTimeZone::listIdentifiers())),
+ sprintf('Configured default timezone "%s" must be supported by your installation of PHP', date_default_timezone_get()),
+ 'Your default timezone is not supported by PHP. Check for typos in your <strong>php.ini</strong> file and have a look at the list of deprecated timezones at <a href="http://php.net/manual/en/timezones.others.php">http://php.net/manual/en/timezones.others.php</a>.'
+ );
+ }
+
+ $this->addRequirement(
+ function_exists('json_encode'),
+ 'json_encode() must be available',
+ 'Install and enable the <strong>JSON</strong> extension.'
+ );
+
+ $this->addRequirement(
+ function_exists('session_start'),
+ 'session_start() must be available',
+ 'Install and enable the <strong>session</strong> extension.'
+ );
+
+ $this->addRequirement(
+ function_exists('ctype_alpha'),
+ 'ctype_alpha() must be available',
+ 'Install and enable the <strong>ctype</strong> extension.'
+ );
+
+ $this->addRequirement(
+ function_exists('token_get_all'),
+ 'token_get_all() must be available',
+ 'Install and enable the <strong>Tokenizer</strong> extension.'
+ );
+
+ $this->addRequirement(
+ function_exists('simplexml_import_dom'),
+ 'simplexml_import_dom() must be available',
+ 'Install and enable the <strong>SimpleXML</strong> extension.'
+ );
+
+ if (function_exists('apc_store') && ini_get('apc.enabled')) {
+ $this->addRequirement(
+ version_compare(phpversion('apc'), '3.0.17', '>='),
+ 'APC version must be at least 3.0.17',
+ 'Upgrade your <strong>APC</strong> extension (3.0.17+).'
+ );
+ }
+
+ $this->addPhpIniRequirement('detect_unicode', false);
+
+ if (extension_loaded('suhosin')) {
+ $this->addPhpIniRequirement(
+ 'suhosin.executor.include.whitelist',
+ create_function('$cfgValue', 'return false !== stripos($cfgValue, "phar");'),
+ false,
+ 'suhosin.executor.include.whitelist must be configured correctly in php.ini',
+ 'Add "<strong>phar</strong>" to <strong>suhosin.executor.include.whitelist</strong> in php.ini<a href="#phpini">*</a>.'
+ );
+ }
+
+ if (extension_loaded('xdebug')) {
+ $this->addPhpIniRequirement(
+ 'xdebug.show_exception_trace', false, true
+ );
+
+ $this->addPhpIniRequirement(
+ 'xdebug.scream', false, true
+ );
+ }
+
+ $pcreVersion = defined('PCRE_VERSION') ? (float) PCRE_VERSION : null;
+
+ $this->addRequirement(
+ null !== $pcreVersion && $pcreVersion > 8.0,
+ sprintf('PCRE extension must be available and at least 8.0 (%s installed)', $pcreVersion ? $pcreVersion : 'not'),
+ 'Upgrade your <strong>PCRE</strong> extension (8.0+).'
+ );
+
+ /* optional recommendations follow */
+
+ $this->addRecommendation(
+ file_get_contents(__FILE__) === file_get_contents(__DIR__.'/../vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/skeleton/app/SymfonyRequirements.php'),
+ 'Requirements file should be up-to-date',
+ 'Your requirements file is outdated. Run composer install and re-check your configuration.'
+ );
+
+ $this->addRecommendation(
+ version_compare($installedPhpVersion, '5.3.4', '>='),
+ 'You should use at least PHP 5.3.4 due to PHP bug #52083 in earlier versions',
+ 'Your project might malfunction randomly due to PHP bug #52083 ("Notice: Trying to get property of non-object"). Install PHP 5.3.4 or newer.'
+ );
+
+ $this->addRecommendation(
+ version_compare($installedPhpVersion, '5.3.8', '>='),
+ 'When using annotations you should have at least PHP 5.3.8 due to PHP bug #55156',
+ 'Install PHP 5.3.8 or newer if your project uses annotations.'
+ );
+
+ $this->addRecommendation(
+ version_compare($installedPhpVersion, '5.4.0', '!='),
+ 'You should not use PHP 5.4.0 due to the PHP bug #61453',
+ 'Your project might not work properly due to the PHP bug #61453 ("Cannot dump definitions which have method calls"). Install PHP 5.4.1 or newer.'
+ );
+
+ $this->addRecommendation(
+ class_exists('DomDocument'),
+ 'PHP-XML module should be installed',
+ 'Install and enable the <strong>PHP-XML</strong> module.'
+ );
+
+ $this->addRecommendation(
+ function_exists('mb_strlen'),
+ 'mb_strlen() should be available',
+ 'Install and enable the <strong>mbstring</strong> extension.'
+ );
+
+ $this->addRecommendation(
+ function_exists('iconv'),
+ 'iconv() should be available',
+ 'Install and enable the <strong>iconv</strong> extension.'
+ );
+
+ $this->addRecommendation(
+ function_exists('utf8_decode'),
+ 'utf8_decode() should be available',
+ 'Install and enable the <strong>XML</strong> extension.'
+ );
+
+ if (!defined('PHP_WINDOWS_VERSION_BUILD')) {
+ $this->addRecommendation(
+ function_exists('posix_isatty'),
+ 'posix_isatty() should be available',
+ 'Install and enable the <strong>php_posix</strong> extension (used to colorize the CLI output).'
+ );
+ }
+
+ $this->addRecommendation(
+ class_exists('Locale'),
+ 'intl extension should be available',
+ 'Install and enable the <strong>intl</strong> extension (used for validators).'
+ );
+
+ if (class_exists('Collator')) {
+ $this->addRecommendation(
+ null !== new Collator('fr_FR'),
+ 'intl extension should be correctly configured',
+ 'The intl extension does not behave properly. This problem is typical on PHP 5.3.X x64 WIN builds.'
+ );
+ }
+
+ if (class_exists('Locale')) {
+ if (defined('INTL_ICU_VERSION')) {
+ $version = INTL_ICU_VERSION;
+ } else {
+ $reflector = new ReflectionExtension('intl');
+
+ ob_start();
+ $reflector->info();
+ $output = strip_tags(ob_get_clean());
+
+ preg_match('/^ICU version +(?:=> )?(.*)$/m', $output, $matches);
+ $version = $matches[1];
+ }
+
+ $this->addRecommendation(
+ version_compare($version, '4.0', '>='),
+ 'intl ICU version should be at least 4+',
+ 'Upgrade your <strong>intl</strong> extension with a newer ICU version (4+).'
+ );
+ }
+
+ $accelerator =
+ (function_exists('apc_store') && ini_get('apc.enabled'))
+ ||
+ function_exists('eaccelerator_put') && ini_get('eaccelerator.enable')
+ ||
+ function_exists('xcache_set')
+ ;
+
+ $this->addRecommendation(
+ $accelerator,
+ 'a PHP accelerator should be installed',
+ 'Install and enable a <strong>PHP accelerator</strong> like APC (highly recommended).'
+ );
+
+ $this->addPhpIniRecommendation('short_open_tag', false);
+
+ $this->addPhpIniRecommendation('magic_quotes_gpc', false, true);
+
+ $this->addPhpIniRecommendation('register_globals', false, true);
+
+ $this->addPhpIniRecommendation('session.auto_start', false);
+
+ $this->addRecommendation(
+ class_exists('PDO'),
+ 'PDO should be installed',
+ 'Install <strong>PDO</strong> (mandatory for Doctrine).'
+ );
+
+ if (class_exists('PDO')) {
+ $drivers = PDO::getAvailableDrivers();
+ $this->addRecommendation(
+ count($drivers),
+ sprintf('PDO should have some drivers installed (currently available: %s)', count($drivers) ? implode(', ', $drivers) : 'none'),
+ 'Install <strong>PDO drivers</strong> (mandatory for Doctrine).'
+ );
+ }
+ }
+}
diff --git a/app/autoload.php b/app/autoload.php
index 691eeb4..a68e37f 100644
--- a/app/autoload.php
+++ b/app/autoload.php
@@ -1,51 +1,16 @@
<?php
-$vendorDir = __DIR__.'/../vendor';
-
-use Symfony\Component\ClassLoader\UniversalClassLoader;
use Doctrine\Common\Annotations\AnnotationRegistry;
-$loader = new UniversalClassLoader();
-$loader->registerNamespaces(array(
- 'Symfony' => array($vendorDir.'/symfony/src', $vendorDir.'/bundles'),
- 'Tolkiendil' => __DIR__.'/../src/',
- 'Stof' => $vendorDir.'/bundles',
- 'Knp\Bundle' => $vendorDir.'/bundles',
- 'Knp\Menu' => $vendorDir.'/knp-menu/src',
- 'JMS' => $vendorDir.'/bundles',
- 'Sonata' => $vendorDir.'/bundles',
- 'Gedmo' => $vendorDir.'/gedmo-doctrine-extensions/lib',
- 'Doctrine\Bundle' => $vendorDir.'/bundles',
- 'Doctrine\\Common\\DataFixtures' => $vendorDir.'/doctrine-data-fixtures/lib',
- 'Doctrine\\Common' => $vendorDir.'/doctrine-common/lib',
- 'Doctrine\\DBAL\\Migrations' => $vendorDir.'/doctrine-migrations/lib',
- 'Doctrine\\DBAL' => $vendorDir.'/doctrine-dbal/lib',
- 'Doctrine' => $vendorDir.'/doctrine/lib',
- 'Monolog' => $vendorDir.'/monolog/src',
- 'Buzz' => $vendorDir.'/buzz/lib',
- 'Sensio' => $vendorDir.'/bundles',
- 'Sf2gen' => $vendorDir.'/bundles',
-));
-$loader->registerPrefixes(array(
- 'Twig_Extensions_' => $vendorDir.'/twig-extensions/lib',
- 'Twig_' => $vendorDir.'/twig/lib',
- 'SessionHandlerInterface' => $vendorDir.'/symfony/src/Symfony/Component/HttpFoundation/Resources/stubs',
-));
-$loader->register();
+$loader = require __DIR__.'/../vendor/autoload.php';
// intl
if (!function_exists('intl_get_error_code')) {
- require_once __DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';
+ require_once __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';
- $loader->registerPrefixFallbacks(array(__DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs'));
+ $loader->add('', __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs');
}
-// Registering the annotations
-AnnotationRegistry::registerLoader(function($class) use ($loader) {
- $loader->loadClass($class);
+AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
- return class_exists($class, false);
-});
-AnnotationRegistry::registerFile(
- __DIR__.'/../vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php'
-);
+return $loader;
diff --git a/app/bootstrap.php.cache b/app/bootstrap.php.cache
deleted file mode 100644
index 63c8d21..0000000
--- a/app/bootstrap.php.cache
+++ /dev/null
@@ -1,1568 +0,0 @@
-<?php
-
-namespace { require_once __DIR__.'/autoload.php'; }
-
-
-
-
-
-namespace Symfony\Component\DependencyInjection
-{
-
-
-interface ContainerAwareInterface
-{
-
- function setContainer(ContainerInterface $container = null);
-}
-}
-
-
-
-
-namespace Symfony\Component\DependencyInjection
-{
-
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-
-
-interface ContainerInterface
-{
- const EXCEPTION_ON_INVALID_REFERENCE = 1;
- const NULL_ON_INVALID_REFERENCE = 2;
- const IGNORE_ON_INVALID_REFERENCE = 3;
- const SCOPE_CONTAINER = 'container';
- const SCOPE_PROTOTYPE = 'prototype';
-
-
- function set($id, $service, $scope = self::SCOPE_CONTAINER);
-
-
- function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE);
-
-
- function has($id);
-
-
- function getParameter($name);
-
-
- function hasParameter($name);
-
-
- function setParameter($name, $value);
-
-
- function enterScope($name);
-
-
- function leaveScope($name);
-
-
- function addScope(ScopeInterface $scope);
-
-
- function hasScope($name);
-
-
- function isScopeActive($name);
-}
-}
-
-
-
-
-namespace Symfony\Component\DependencyInjection
-{
-
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
-use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
-use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
-use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
-use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
-
-
-class Container implements IntrospectableContainerInterface
-{
- protected $parameterBag;
- protected $services;
- protected $scopes;
- protected $scopeChildren;
- protected $scopedServices;
- protected $scopeStacks;
- protected $loading = array();
-
-
- public function __construct(ParameterBagInterface $parameterBag = null)
- {
- $this->parameterBag = null === $parameterBag ? new ParameterBag() : $parameterBag;
-
- $this->services = array();
- $this->scopes = array();
- $this->scopeChildren = array();
- $this->scopedServices = array();
- $this->scopeStacks = array();
-
- $this->set('service_container', $this);
- }
-
-
- public function compile()
- {
- $this->parameterBag->resolve();
-
- $this->parameterBag = new FrozenParameterBag($this->parameterBag->all());
- }
-
-
- public function isFrozen()
- {
- return $this->parameterBag instanceof FrozenParameterBag;
- }
-
-
- public function getParameterBag()
- {
- return $this->parameterBag;
- }
-
-
- public function getParameter($name)
- {
- return $this->parameterBag->get($name);
- }
-
-
- public function hasParameter($name)
- {
- return $this->parameterBag->has($name);
- }
-
-
- public function setParameter($name, $value)
- {
- $this->parameterBag->set($name, $value);
- }
-
-
- public function set($id, $service, $scope = self::SCOPE_CONTAINER)
- {
- if (self::SCOPE_PROTOTYPE === $scope) {
- throw new InvalidArgumentException('You cannot set services of scope "prototype".');
- }
-
- $id = strtolower($id);
-
- if (self::SCOPE_CONTAINER !== $scope) {
- if (!isset($this->scopedServices[$scope])) {
- throw new RuntimeException('You cannot set services of inactive scopes.');
- }
-
- $this->scopedServices[$scope][$id] = $service;
- }
-
- $this->services[$id] = $service;
- }
-
-
- public function has($id)
- {
- $id = strtolower($id);
-
- return isset($this->services[$id]) || method_exists($this, 'get'.strtr($id, array('_' => '', '.' => '_')).'Service');
- }
-
-
- public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE)
- {
- $id = strtolower($id);
-
- if (isset($this->services[$id])) {
- return $this->services[$id];
- }
-
- if (isset($this->loading[$id])) {
- throw new ServiceCircularReferenceException($id, array_keys($this->loading));
- }
-
- if (method_exists($this, $method = 'get'.strtr($id, array('_' => '', '.' => '_')).'Service')) {
- $this->loading[$id] = true;
-
- try {
- $service = $this->$method();
- } catch (\Exception $e) {
- unset($this->loading[$id]);
- throw $e;
- }
-
- unset($this->loading[$id]);
-
- return $service;
- }
-
- if (self::EXCEPTION_ON_INVALID_REFERENCE === $invalidBehavior) {
- throw new ServiceNotFoundException($id);
- }
- }
-
-
- public function initialized($id)
- {
- return isset($this->services[strtolower($id)]);
- }
-
-
- public function getServiceIds()
- {
- $ids = array();
- $r = new \ReflectionClass($this);
- foreach ($r->getMethods() as $method) {
- if (preg_match('/^get(.+)Service$/', $method->getName(), $match)) {
- $ids[] = self::underscore($match[1]);
- }
- }
-
- return array_unique(array_merge($ids, array_keys($this->services)));
- }
-
-
- public function enterScope($name)
- {
- if (!isset($this->scopes[$name])) {
- throw new InvalidArgumentException(sprintf('The scope "%s" does not exist.', $name));
- }
-
- if (self::SCOPE_CONTAINER !== $this->scopes[$name] && !isset($this->scopedServices[$this->scopes[$name]])) {
- throw new RuntimeException(sprintf('The parent scope "%s" must be active when entering this scope.', $this->scopes[$name]));
- }
-
- if (isset($this->scopedServices[$name])) {
- $services = array($this->services, $name => $this->scopedServices[$name]);
- unset($this->scopedServices[$name]);
-
- foreach ($this->scopeChildren[$name] as $child) {
- $services[$child] = $this->scopedServices[$child];
- unset($this->scopedServices[$child]);
- }
-
- $this->services = call_user_func_array('array_diff_key', $services);
- array_shift($services);
-
- if (!isset($this->scopeStacks[$name])) {
- $this->scopeStacks[$name] = new \SplStack();
- }
- $this->scopeStacks[$name]->push($services);
- }
-
- $this->scopedServices[$name] = array();
- }
-
-
- public function leaveScope($name)
- {
- if (!isset($this->scopedServices[$name])) {
- throw new InvalidArgumentException(sprintf('The scope "%s" is not active.', $name));
- }
-
- $services = array($this->services, $this->scopedServices[$name]);
- unset($this->scopedServices[$name]);
- foreach ($this->scopeChildren[$name] as $child) {
- if (!isset($this->scopedServices[$child])) {
- continue;
- }
-
- $services[] = $this->scopedServices[$child];
- unset($this->scopedServices[$child]);
- }
- $this->services = call_user_func_array('array_diff_key', $services);
-
- if (isset($this->scopeStacks[$name]) && count($this->scopeStacks[$name]) > 0) {
- $services = $this->scopeStacks[$name]->pop();
- $this->scopedServices += $services;
-
- array_unshift($services, $this->services);
- $this->services = call_user_func_array('array_merge', $services);
- }
- }
-
-
- public function addScope(ScopeInterface $scope)
- {
- $name = $scope->getName();
- $parentScope = $scope->getParentName();
-
- if (self::SCOPE_CONTAINER === $name || self::SCOPE_PROTOTYPE === $name) {
- throw new InvalidArgumentException(sprintf('The scope "%s" is reserved.', $name));
- }
- if (isset($this->scopes[$name])) {
- throw new InvalidArgumentException(sprintf('A scope with name "%s" already exists.', $name));
- }
- if (self::SCOPE_CONTAINER !== $parentScope && !isset($this->scopes[$parentScope])) {
- throw new InvalidArgumentException(sprintf('The parent scope "%s" does not exist, or is invalid.', $parentScope));
- }
-
- $this->scopes[$name] = $parentScope;
- $this->scopeChildren[$name] = array();
-
- while ($parentScope !== self::SCOPE_CONTAINER) {
- $this->scopeChildren[$parentScope][] = $name;
- $parentScope = $this->scopes[$parentScope];
- }
- }
-
-
- public function hasScope($name)
- {
- return isset($this->scopes[$name]);
- }
-
-
- public function isScopeActive($name)
- {
- return isset($this->scopedServices[$name]);
- }
-
-
- static public function camelize($id)
- {
- return preg_replace_callback('/(^|_|\.)+(.)/', function ($match) { return ('.' === $match[1] ? '_' : '').strtoupper($match[2]); }, $id);
- }
-
-
- static public function underscore($id)
- {
- return strtolower(preg_replace(array('/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'), array('\\1_\\2', '\\1_\\2'), strtr($id, '_', '.')));
- }
-}
-}
-
-
-
-
-namespace Symfony\Component\HttpKernel
-{
-
-use Symfony\Component\HttpFoundation\Request;
-use Symfony\Component\HttpFoundation\Response;
-
-
-interface HttpKernelInterface
-{
- const MASTER_REQUEST = 1;
- const SUB_REQUEST = 2;
-
-
- function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true);
-}
-}
-
-
-
-
-namespace Symfony\Component\HttpKernel
-{
-
-use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Component\HttpKernel\HttpKernelInterface;
-use Symfony\Component\HttpKernel\Bundle\BundleInterface;
-use Symfony\Component\Config\Loader\LoaderInterface;
-
-
-interface KernelInterface extends HttpKernelInterface, \Serializable
-{
-
- function registerBundles();
-
-
- function registerContainerConfiguration(LoaderInterface $loader);
-
-
- function boot();
-
-
- function shutdown();
-
-
- function getBundles();
-
-
- function isClassInActiveBundle($class);
-
-
- function getBundle($name, $first = true);
-
-
- function locateResource($name, $dir = null, $first = true);
-
-
- function getName();
-
-
- function getEnvironment();
-
-
- function isDebug();
-
-
- function getRootDir();
-
-
- function getContainer();
-
-
- function getStartTime();
-
-
- function getCacheDir();
-
-
- function getLogDir();
-}
-}
-
-
-
-
-namespace Symfony\Component\HttpKernel
-{
-
-use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Dumper\PhpDumper;
-use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
-use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
-use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
-use Symfony\Component\DependencyInjection\Loader\IniFileLoader;
-use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
-use Symfony\Component\DependencyInjection\Loader\ClosureLoader;
-use Symfony\Component\HttpFoundation\Request;
-use Symfony\Component\HttpFoundation\Response;
-use Symfony\Component\HttpKernel\HttpKernelInterface;
-use Symfony\Component\HttpKernel\Bundle\BundleInterface;
-use Symfony\Component\HttpKernel\Config\FileLocator;
-use Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass;
-use Symfony\Component\HttpKernel\DependencyInjection\AddClassesToCachePass;
-use Symfony\Component\HttpKernel\Debug\ErrorHandler;
-use Symfony\Component\HttpKernel\Debug\ExceptionHandler;
-use Symfony\Component\Config\Loader\LoaderResolver;
-use Symfony\Component\Config\Loader\DelegatingLoader;
-use Symfony\Component\Config\ConfigCache;
-use Symfony\Component\ClassLoader\ClassCollectionLoader;
-use Symfony\Component\ClassLoader\DebugClassLoader;
-
-
-abstract class Kernel implements KernelInterface, TerminableInterface
-{
- protected $bundles;
- protected $bundleMap;
- protected $container;
- protected $rootDir;
- protected $environment;
- protected $debug;
- protected $booted;
- protected $name;
- protected $startTime;
- protected $classes;
- protected $errorReportingLevel;
-
- const VERSION = '2.1.0-DEV';
- const VERSION_ID = '20100';
- const MAJOR_VERSION = '2';
- const MINOR_VERSION = '1';
- const RELEASE_VERSION = '0';
- const EXTRA_VERSION = 'DEV';
-
-
- public function __construct($environment, $debug)
- {
- $this->environment = $environment;
- $this->debug = (Boolean) $debug;
- $this->booted = false;
- $this->rootDir = $this->getRootDir();
- $this->name = preg_replace('/[^a-zA-Z0-9_]+/', '', basename($this->rootDir));
- $this->classes = array();
-
- if ($this->debug) {
- $this->startTime = microtime(true);
- }
-
- $this->init();
- }
-
- public function init()
- {
- if ($this->debug) {
- ini_set('display_errors', 1);
- error_reporting(-1);
-
- DebugClassLoader::enable();
- ErrorHandler::register($this->errorReportingLevel);
- if ('cli' !== php_sapi_name()) {
- ExceptionHandler::register();
- }
- } else {
- ini_set('display_errors', 0);
- }
- }
-
- public function __clone()
- {
- if ($this->debug) {
- $this->startTime = microtime(true);
- }
-
- $this->booted = false;
- $this->container = null;
- }
-
-
- public function boot()
- {
- if (true === $this->booted) {
- return;
- }
-
- $this->initializeBundles();
-
- $this->initializeContainer();
-
- foreach ($this->getBundles() as $bundle) {
- $bundle->setContainer($this->container);
- $bundle->boot();
- }
-
- $this->booted = true;
- }
-
-
- public function terminate(Request $request, Response $response)
- {
- if (false === $this->booted) {
- return;
- }
-
- if ($this->getHttpKernel() instanceof TerminableInterface) {
- $this->getHttpKernel()->terminate($request, $response);
- }
- }
-
-
- public function shutdown()
- {
- if (false === $this->booted) {
- return;
- }
-
- $this->booted = false;
-
- foreach ($this->getBundles() as $bundle) {
- $bundle->shutdown();
- $bundle->setContainer(null);
- }
-
- $this->container = null;
- }
-
-
- public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
- {
- if (false === $this->booted) {
- $this->boot();
- }
-
- return $this->getHttpKernel()->handle($request, $type, $catch);
- }
-
-
- protected function getHttpKernel()
- {
- return $this->container->get('http_kernel');
- }
-
-
- public function getBundles()
- {
- return $this->bundles;
- }
-
-
- public function isClassInActiveBundle($class)
- {
- foreach ($this->getBundles() as $bundle) {
- if (0 === strpos($class, $bundle->getNamespace())) {
- return true;
- }
- }
-
- return false;
- }
-
-
- public function getBundle($name, $first = true)
- {
- if (!isset($this->bundleMap[$name])) {
- throw new \InvalidArgumentException(sprintf('Bundle "%s" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() function of your %s.php file?', $name, get_class($this)));
- }
-
- if (true === $first) {
- return $this->bundleMap[$name][0];
- }
-
- return $this->bundleMap[$name];
- }
-
-
- public function locateResource($name, $dir = null, $first = true)
- {
- if ('@' !== $name[0]) {
- throw new \InvalidArgumentException(sprintf('A resource name must start with @ ("%s" given).', $name));
- }
-
- if (false !== strpos($name, '..')) {
- throw new \RuntimeException(sprintf('File name "%s" contains invalid characters (..).', $name));
- }
-
- $bundleName = substr($name, 1);
- $path = '';
- if (false !== strpos($bundleName, '/')) {
- list($bundleName, $path) = explode('/', $bundleName, 2);
- }
-
- $isResource = 0 === strpos($path, 'Resources') && null !== $dir;
- $overridePath = substr($path, 9);
- $resourceBundle = null;
- $bundles = $this->getBundle($bundleName, false);
- $files = array();
-
- foreach ($bundles as $bundle) {
- if ($isResource && file_exists($file = $dir.'/'.$bundle->getName().$overridePath)) {
- if (null !== $resourceBundle) {
- throw new \RuntimeException(sprintf('"%s" resource is hidden by a resource from the "%s" derived bundle. Create a "%s" file to override the bundle resource.',
- $file,
- $resourceBundle,
- $dir.'/'.$bundles[0]->getName().$overridePath
- ));
- }
-
- if ($first) {
- return $file;
- }
- $files[] = $file;
- }
-
- if (file_exists($file = $bundle->getPath().'/'.$path)) {
- if ($first && !$isResource) {
- return $file;
- }
- $files[] = $file;
- $resourceBundle = $bundle->getName();
- }
- }
-
- if (count($files) > 0) {
- return $first && $isResource ? $files[0] : $files;
- }
-
- throw new \InvalidArgumentException(sprintf('Unable to find file "%s".', $name));
- }
-
-
- public function getName()
- {
- return $this->name;
- }
-
-
- public function getEnvironment()
- {
- return $this->environment;
- }
-
-
- public function isDebug()
- {
- return $this->debug;
- }
-
-
- public function getRootDir()
- {
- if (null === $this->rootDir) {
- $r = new \ReflectionObject($this);
- $this->rootDir = dirname($r->getFileName());
- }
-
- return $this->rootDir;
- }
-
-
- public function getContainer()
- {
- return $this->container;
- }
-
-
- public function loadClassCache($name = 'classes', $extension = '.php')
- {
- if (!$this->booted && is_file($this->getCacheDir().'/classes.map')) {
- ClassCollectionLoader::load(include($this->getCacheDir().'/classes.map'), $this->getCacheDir(), $name, $this->debug, false, $extension);
- }
- }
-
-
- public function setClassCache(array $classes)
- {
- file_put_contents($this->getCacheDir().'/classes.map', sprintf('<?php return %s;', var_export($classes, true)));
- }
-
-
- public function getStartTime()
- {
- return $this->debug ? $this->startTime : -INF;
- }
-
-
- public function getCacheDir()
- {
- return $this->rootDir.'/cache/'.$this->environment;
- }
-
-
- public function getLogDir()
- {
- return $this->rootDir.'/logs';
- }
-
-
- protected function initializeBundles()
- {
- $this->bundles = array();
- $topMostBundles = array();
- $directChildren = array();
-
- foreach ($this->registerBundles() as $bundle) {
- $name = $bundle->getName();
- if (isset($this->bundles[$name])) {
- throw new \LogicException(sprintf('Trying to register two bundles with the same name "%s"', $name));
- }
- $this->bundles[$name] = $bundle;
-
- if ($parentName = $bundle->getParent()) {
- if (isset($directChildren[$parentName])) {
- throw new \LogicException(sprintf('Bundle "%s" is directly extended by two bundles "%s" and "%s".', $parentName, $name, $directChildren[$parentName]));
- }
- if ($parentName == $name) {
- throw new \LogicException(sprintf('Bundle "%s" can not extend itself.', $name));
- }
- $directChildren[$parentName] = $name;
- } else {
- $topMostBundles[$name] = $bundle;
- }
- }
-
- if (count($diff = array_values(array_diff(array_keys($directChildren), array_keys($this->bundles))))) {
- throw new \LogicException(sprintf('Bundle "%s" extends bundle "%s", which is not registered.', $directChildren[$diff[0]], $diff[0]));
- }
-
- $this->bundleMap = array();
- foreach ($topMostBundles as $name => $bundle) {
- $bundleMap = array($bundle);
- $hierarchy = array($name);
-
- while (isset($directChildren[$name])) {
- $name = $directChildren[$name];
- array_unshift($bundleMap, $this->bundles[$name]);
- $hierarchy[] = $name;
- }
-
- foreach ($hierarchy as $bundle) {
- $this->bundleMap[$bundle] = $bundleMap;
- array_pop($bundleMap);
- }
- }
-
- }
-
-
- protected function getContainerClass()
- {
- return $this->name.ucfirst($this->environment).($this->debug ? 'Debug' : '').'ProjectContainer';
- }
-
-
- protected function getContainerBaseClass()
- {
- return 'Container';
- }
-
-
- protected function initializeContainer()
- {
- $class = $this->getContainerClass();
- $cache = new ConfigCache($this->getCacheDir().'/'.$class.'.php', $this->debug);
- $fresh = true;
- if (!$cache->isFresh()) {
- $container = $this->buildContainer();
- $this->dumpContainer($cache, $container, $class, $this->getContainerBaseClass());
-
- $fresh = false;
- }
-
- require_once $cache;
-
- $this->container = new $class();
- $this->container->set('kernel', $this);
-
- if (!$fresh && $this->container->has('cache_warmer')) {
- $this->container->get('cache_warmer')->warmUp($this->container->getParameter('kernel.cache_dir'));
- }
- }
-
-
- protected function getKernelParameters()
- {
- $bundles = array();
- foreach ($this->bundles as $name => $bundle) {
- $bundles[$name] = get_class($bundle);
- }
-
- return array_merge(
- array(
- 'kernel.root_dir' => $this->rootDir,
- 'kernel.environment' => $this->environment,
- 'kernel.debug' => $this->debug,
- 'kernel.name' => $this->name,
- 'kernel.cache_dir' => $this->getCacheDir(),
- 'kernel.logs_dir' => $this->getLogDir(),
- 'kernel.bundles' => $bundles,
- 'kernel.charset' => 'UTF-8',
- 'kernel.container_class' => $this->getContainerClass(),
- ),
- $this->getEnvParameters()
- );
- }
-
-
- protected function getEnvParameters()
- {
- $parameters = array();
- foreach ($_SERVER as $key => $value) {
- if (0 === strpos($key, 'SYMFONY__')) {
- $parameters[strtolower(str_replace('__', '.', substr($key, 9)))] = $value;
- }
- }
-
- return $parameters;
- }
-
-
- protected function buildContainer()
- {
- foreach (array('cache' => $this->getCacheDir(), 'logs' => $this->getLogDir()) as $name => $dir) {
- if (!is_dir($dir)) {
- if (false === @mkdir($dir, 0777, true)) {
- throw new \RuntimeException(sprintf("Unable to create the %s directory (%s)\n", $name, $dir));
- }
- } elseif (!is_writable($dir)) {
- throw new \RuntimeException(sprintf("Unable to write in the %s directory (%s)\n", $name, $dir));
- }
- }
-
- $container = $this->getContainerBuilder();
- $extensions = array();
- foreach ($this->bundles as $bundle) {
- if ($extension = $bundle->getContainerExtension()) {
- $container->registerExtension($extension);
- $extensions[] = $extension->getAlias();
- }
-
- if ($this->debug) {
- $container->addObjectResource($bundle);
- }
- }
- foreach ($this->bundles as $bundle) {
- $bundle->build($container);
- }
-
- $container->addObjectResource($this);
-
- $container->getCompilerPassConfig()->setMergePass(new MergeExtensionConfigurationPass($extensions));
-
- if (null !== $cont = $this->registerContainerConfiguration($this->getContainerLoader($container))) {
- $container->merge($cont);
- }
-
- $container->addCompilerPass(new AddClassesToCachePass($this));
- $container->compile();
-
- return $container;
- }
-
-
- protected function getContainerBuilder()
- {
- return new ContainerBuilder(new ParameterBag($this->getKernelParameters()));
- }
-
-
- protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container, $class, $baseClass)
- {
- $dumper = new PhpDumper($container);
- $content = $dumper->dump(array('class' => $class, 'base_class' => $baseClass));
- if (!$this->debug) {
- $content = self::stripComments($content);
- }
-
- $cache->write($content, $container->getResources());
- }
-
-
- protected function getContainerLoader(ContainerInterface $container)
- {
- $locator = new FileLocator($this);
- $resolver = new LoaderResolver(array(
- new XmlFileLoader($container, $locator),
- new YamlFileLoader($container, $locator),
- new IniFileLoader($container, $locator),
- new PhpFileLoader($container, $locator),
- new ClosureLoader($container),
- ));
-
- return new DelegatingLoader($resolver);
- }
-
-
- static public function stripComments($source)
- {
- if (!function_exists('token_get_all')) {
- return $source;
- }
-
- $output = '';
- foreach (token_get_all($source) as $token) {
- if (is_string($token)) {
- $output .= $token;
- } elseif (!in_array($token[0], array(T_COMMENT, T_DOC_COMMENT))) {
- $output .= $token[1];
- }
- }
-
- $output = preg_replace(array('/\s+$/Sm', '/\n+/S'), "\n", $output);
-
- return $output;
- }
-
- public function serialize()
- {
- return serialize(array($this->environment, $this->debug));
- }
-
- public function unserialize($data)
- {
- list($environment, $debug) = unserialize($data);
-
- $this->__construct($environment, $debug);
- }
-}
-}
-
-
-
-
-namespace Symfony\Component\ClassLoader
-{
-
-
-class ClassCollectionLoader
-{
- static private $loaded;
-
-
- static public function load($classes, $cacheDir, $name, $autoReload, $adaptive = false, $extension = '.php')
- {
- if (isset(self::$loaded[$name])) {
- return;
- }
-
- self::$loaded[$name] = true;
-
- if ($adaptive) {
- $classes = array_diff($classes, get_declared_classes(), get_declared_interfaces());
-
- $name = $name.'-'.substr(md5(implode('|', $classes)), 0, 5);
- }
-
- $cache = $cacheDir.'/'.$name.$extension;
-
- $reload = false;
- if ($autoReload) {
- $metadata = $cacheDir.'/'.$name.$extension.'.meta';
- if (!is_file($metadata) || !is_file($cache)) {
- $reload = true;
- } else {
- $time = filemtime($cache);
- $meta = unserialize(file_get_contents($metadata));
-
- if ($meta[1] != $classes) {
- $reload = true;
- } else {
- foreach ($meta[0] as $resource) {
- if (!is_file($resource) || filemtime($resource) > $time) {
- $reload = true;
-
- break;
- }
- }
- }
- }
- }
-
- if (!$reload && is_file($cache)) {
- require_once $cache;
-
- return;
- }
-
- $files = array();
- $content = '';
- foreach ($classes as $class) {
- if (!class_exists($class) && !interface_exists($class) && (!function_exists('trait_exists') || !trait_exists($class))) {
- throw new \InvalidArgumentException(sprintf('Unable to load class "%s"', $class));
- }
-
- $r = new \ReflectionClass($class);
- $files[] = $r->getFileName();
-
- $c = preg_replace(array('/^\s*<\?php/', '/\?>\s*$/'), '', file_get_contents($r->getFileName()));
-
- if (!$r->inNamespace()) {
- $c = "\nnamespace\n{\n".self::stripComments($c)."\n}\n";
- } else {
- $c = self::fixNamespaceDeclarations('<?php '.$c);
- $c = preg_replace('/^\s*<\?php/', '', $c);
- }
-
- $content .= $c;
- }
-
- if (!is_dir(dirname($cache))) {
- mkdir(dirname($cache), 0777, true);
- }
- self::writeCacheFile($cache, '<?php '.$content);
-
- if ($autoReload) {
- self::writeCacheFile($metadata, serialize(array($files, $classes)));
- }
- }
-
-
- static public function fixNamespaceDeclarations($source)
- {
- if (!function_exists('token_get_all')) {
- return $source;
- }
-
- $output = '';
- $inNamespace = false;
- $tokens = token_get_all($source);
-
- for ($i = 0, $max = count($tokens); $i < $max; $i++) {
- $token = $tokens[$i];
- if (is_string($token)) {
- $output .= $token;
- } elseif (in_array($token[0], array(T_COMMENT, T_DOC_COMMENT))) {
- continue;
- } elseif (T_NAMESPACE === $token[0]) {
- if ($inNamespace) {
- $output .= "}\n";
- }
- $output .= $token[1];
-
- while (($t = $tokens[++$i]) && is_array($t) && in_array($t[0], array(T_WHITESPACE, T_NS_SEPARATOR, T_STRING))) {
- $output .= $t[1];
- }
- if (is_string($t) && '{' === $t) {
- $inNamespace = false;
- --$i;
- } else {
- $output = rtrim($output);
- $output .= "\n{";
- $inNamespace = true;
- }
- } else {
- $output .= $token[1];
- }
- }
-
- if ($inNamespace) {
- $output .= "}\n";
- }
-
- return $output;
- }
-
-
- static private function writeCacheFile($file, $content)
- {
- $tmpFile = tempnam(dirname($file), basename($file));
- if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $file)) {
- @chmod($file, 0666 & ~umask());
-
- return;
- }
-
- throw new \RuntimeException(sprintf('Failed to write cache file "%s".', $file));
- }
-
-
- static private function stripComments($source)
- {
- if (!function_exists('token_get_all')) {
- return $source;
- }
-
- $output = '';
- foreach (token_get_all($source) as $token) {
- if (is_string($token)) {
- $output .= $token;
- } elseif (!in_array($token[0], array(T_COMMENT, T_DOC_COMMENT))) {
- $output .= $token[1];
- }
- }
-
- $output = preg_replace(array('/\s+$/Sm', '/\n+/S'), "\n", $output);
-
- return $output;
- }
-}
-}
-
-
-
-
-namespace Symfony\Component\ClassLoader
-{
-
-
-class UniversalClassLoader
-{
- private $namespaces = array();
- private $prefixes = array();
- private $namespaceFallbacks = array();
- private $prefixFallbacks = array();
- private $useIncludePath = false;
-
-
- public function useIncludePath($useIncludePath)
- {
- $this->useIncludePath = $useIncludePath;
- }
-
-
- public function getUseIncludePath()
- {
- return $this->useIncludePath;
- }
-
-
- public function getNamespaces()
- {
- return $this->namespaces;
- }
-
-
- public function getPrefixes()
- {
- return $this->prefixes;
- }
-
-
- public function getNamespaceFallbacks()
- {
- return $this->namespaceFallbacks;
- }
-
-
- public function getPrefixFallbacks()
- {
- return $this->prefixFallbacks;
- }
-
-
- public function registerNamespaceFallbacks(array $dirs)
- {
- $this->namespaceFallbacks = $dirs;
- }
-
-
- public function registerNamespaceFallback($dir)
- {
- $this->namespaceFallbacks[] = $dir;
- }
-
-
- public function registerPrefixFallbacks(array $dirs)
- {
- $this->prefixFallbacks = $dirs;
- }
-
-
- public function registerPrefixFallback($dir)
- {
- $this->prefixFallbacks[] = $dir;
- }
-
-
- public function registerNamespaces(array $namespaces)
- {
- foreach ($namespaces as $namespace => $locations) {
- $this->namespaces[$namespace] = (array) $locations;
- }
- }
-
-
- public function registerNamespace($namespace, $paths)
- {
- $this->namespaces[$namespace] = (array) $paths;
- }
-
-
- public function registerPrefixes(array $classes)
- {
- foreach ($classes as $prefix => $locations) {
- $this->prefixes[$prefix] = (array) $locations;
- }
- }
-
-
- public function registerPrefix($prefix, $paths)
- {
- $this->prefixes[$prefix] = (array) $paths;
- }
-
-
- public function register($prepend = false)
- {
- spl_autoload_register(array($this, 'loadClass'), true, $prepend);
- }
-
-
- public function loadClass($class)
- {
- if ($file = $this->findFile($class)) {
- require $file;
- }
- }
-
-
- public function findFile($class)
- {
- if ('\\' == $class[0]) {
- $class = substr($class, 1);
- }
-
- if (false !== $pos = strrpos($class, '\\')) {
- $namespace = substr($class, 0, $pos);
- $className = substr($class, $pos + 1);
- $normalizedClass = str_replace('\\', DIRECTORY_SEPARATOR, $namespace).DIRECTORY_SEPARATOR.str_replace('_', DIRECTORY_SEPARATOR, $className).'.php';
- foreach ($this->namespaces as $ns => $dirs) {
- if (0 !== strpos($namespace, $ns)) {
- continue;
- }
-
- foreach ($dirs as $dir) {
- $file = $dir.DIRECTORY_SEPARATOR.$normalizedClass;
- if (is_file($file)) {
- return $file;
- }
- }
- }
-
- foreach ($this->namespaceFallbacks as $dir) {
- $file = $dir.DIRECTORY_SEPARATOR.$normalizedClass;
- if (is_file($file)) {
- return $file;
- }
- }
-
- } else {
- $normalizedClass = str_replace('_', DIRECTORY_SEPARATOR, $class).'.php';
- foreach ($this->prefixes as $prefix => $dirs) {
- if (0 !== strpos($class, $prefix)) {
- continue;
- }
-
- foreach ($dirs as $dir) {
- $file = $dir.DIRECTORY_SEPARATOR.$normalizedClass;
- if (is_file($file)) {
- return $file;
- }
- }
- }
-
- foreach ($this->prefixFallbacks as $dir) {
- $file = $dir.DIRECTORY_SEPARATOR.$normalizedClass;
- if (is_file($file)) {
- return $file;
- }
- }
- }
-
- if ($this->useIncludePath && $file = stream_resolve_include_path($normalizedClass)) {
- return $file;
- }
- }
-}
-}
-
-
-
-
-namespace Symfony\Component\HttpKernel\Bundle
-{
-
-use Symfony\Component\DependencyInjection\ContainerAwareInterface;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
-
-
-interface BundleInterface extends ContainerAwareInterface
-{
-
- function boot();
-
-
- function shutdown();
-
-
- function build(ContainerBuilder $container);
-
-
- function getContainerExtension();
-
-
- function getParent();
-
-
- function getName();
-
-
- function getNamespace();
-
-
- function getPath();
-}
-}
-
-
-
-
-namespace Symfony\Component\HttpKernel\Bundle
-{
-
-use Symfony\Component\DependencyInjection\ContainerAware;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Container;
-use Symfony\Component\Console\Application;
-use Symfony\Component\Finder\Finder;
-
-
-abstract class Bundle extends ContainerAware implements BundleInterface
-{
- protected $name;
- protected $reflected;
- protected $extension;
-
-
- public function boot()
- {
- }
-
-
- public function shutdown()
- {
- }
-
-
- public function build(ContainerBuilder $container)
- {
- }
-
-
- public function getContainerExtension()
- {
- if (null === $this->extension) {
- $basename = preg_replace('/Bundle$/', '', $this->getName());
-
- $class = $this->getNamespace().'\\DependencyInjection\\'.$basename.'Extension';
- if (class_exists($class)) {
- $extension = new $class();
-
- $expectedAlias = Container::underscore($basename);
- if ($expectedAlias != $extension->getAlias()) {
- throw new \LogicException(sprintf(
- 'The extension alias for the default extension of a '.
- 'bundle must be the underscored version of the '.
- 'bundle name ("%s" instead of "%s")',
- $expectedAlias, $extension->getAlias()
- ));
- }
-
- $this->extension = $extension;
- } else {
- $this->extension = false;
- }
- }
-
- if ($this->extension) {
- return $this->extension;
- }
- }
-
-
- public function getNamespace()
- {
- if (null === $this->reflected) {
- $this->reflected = new \ReflectionObject($this);
- }
-
- return $this->reflected->getNamespaceName();
- }
-
-
- public function getPath()
- {
- if (null === $this->reflected) {
- $this->reflected = new \ReflectionObject($this);
- }
-
- return dirname($this->reflected->getFileName());
- }
-
-
- public function getParent()
- {
- return null;
- }
-
-
- final public function getName()
- {
- if (null !== $this->name) {
- return $this->name;
- }
-
- $name = get_class($this);
- $pos = strrpos($name, '\\');
-
- return $this->name = false === $pos ? $name : substr($name, $pos + 1);
- }
-
-
- public function registerCommands(Application $application)
- {
- if (!$dir = realpath($this->getPath().'/Command')) {
- return;
- }
-
- $finder = new Finder();
- $finder->files()->name('*Command.php')->in($dir);
-
- $prefix = $this->getNamespace().'\\Command';
- foreach ($finder as $file) {
- $ns = $prefix;
- if ($relativePath = $file->getRelativePath()) {
- $ns .= '\\'.strtr($relativePath, '/', '\\');
- }
- $r = new \ReflectionClass($ns.'\\'.$file->getBasename('.php'));
- if ($r->isSubclassOf('Symfony\\Component\\Console\\Command\\Command') && !$r->isAbstract()) {
- $application->add($r->newInstance());
- }
- }
- }
-}
-}
-
-
-
-
-namespace Symfony\Component\Config
-{
-
-
-class ConfigCache
-{
- private $debug;
- private $file;
-
-
- public function __construct($file, $debug)
- {
- $this->file = $file;
- $this->debug = (Boolean) $debug;
- }
-
-
- public function __toString()
- {
- return $this->file;
- }
-
-
- public function isFresh()
- {
- if (!is_file($this->file)) {
- return false;
- }
-
- if (!$this->debug) {
- return true;
- }
-
- $metadata = $this->file.'.meta';
- if (!is_file($metadata)) {
- return false;
- }
-
- $time = filemtime($this->file);
- $meta = unserialize(file_get_contents($metadata));
- foreach ($meta as $resource) {
- if (!$resource->isFresh($time)) {
- return false;
- }
- }
-
- return true;
- }
-
-
- public function write($content, array $metadata = null)
- {
- $dir = dirname($this->file);
- if (!is_dir($dir)) {
- if (false === @mkdir($dir, 0777, true)) {
- throw new \RuntimeException(sprintf('Unable to create the %s directory', $dir));
- }
- } elseif (!is_writable($dir)) {
- throw new \RuntimeException(sprintf('Unable to write in the %s directory', $dir));
- }
-
- $tmpFile = tempnam(dirname($this->file), basename($this->file));
- if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $this->file)) {
- @chmod($this->file, 0666 & ~umask());
- } else {
- throw new \RuntimeException(sprintf('Failed to write cache file "%s".', $this->file));
- }
-
- if (null !== $metadata && true === $this->debug) {
- $file = $this->file.'.meta';
- $tmpFile = tempnam(dirname($file), basename($file));
- if (false !== @file_put_contents($tmpFile, serialize($metadata)) && @rename($tmpFile, $file)) {
- @chmod($file, 0666 & ~umask());
- }
- }
- }
-}
-}
diff --git a/app/check.php b/app/check.php
new file mode 100644
index 0000000..daa6d0a
--- /dev/null
+++ b/app/check.php
@@ -0,0 +1,55 @@
+<?php
+
+require_once dirname(__FILE__).'/SymfonyRequirements.php';
+
+$symfonyRequirements = new SymfonyRequirements();
+
+$iniPath = $symfonyRequirements->getPhpIniConfigPath();
+
+echo "********************************\n";
+echo "* *\n";
+echo "* Symfony requirements check *\n";
+echo "* *\n";
+echo "********************************\n\n";
+
+echo $iniPath ? sprintf("* Configuration file used by PHP: %s\n\n", $iniPath) : "* WARNING: No configuration file (php.ini) used by PHP!\n\n";
+
+echo "** ATTENTION **\n";
+echo "* The PHP CLI can use a different php.ini file\n";
+echo "* than the one used with your web server.\n";
+if ('\\' == DIRECTORY_SEPARATOR) {
+ echo "* (especially on the Windows platform)\n";
+}
+echo "* To be on the safe side, please also launch the requirements check\n";
+echo "* from your web server using the web/config.php script.\n";
+
+echo_title('Mandatory requirements');
+
+foreach ($symfonyRequirements->getRequirements() as $req) {
+ echo_requirement($req);
+}
+
+echo_title('Optional recommendations');
+
+foreach ($symfonyRequirements->getRecommendations() as $req) {
+ echo_requirement($req);
+}
+
+/**
+ * Prints a Requirement instance
+ */
+function echo_requirement(Requirement $requirement)
+{
+ $result = $requirement->isFulfilled() ? 'OK' : ($requirement->isOptional() ? 'WARNING' : 'ERROR');
+ echo ' ' . str_pad($result, 9);
+ echo $requirement->getTestMessage() . "\n";
+
+ if (!$requirement->isFulfilled()) {
+ echo sprintf(" %s\n\n", $requirement->getHelpText());
+ }
+}
+
+function echo_title($title)
+{
+ echo "\n** $title **\n\n";
+}
diff --git a/app/config/config.yml b/app/config/config.yml
index 15b3648..2910775 100644
--- a/app/config/config.yml
+++ b/app/config/config.yml
@@ -3,7 +3,6 @@ imports:
- { resource: user_config.yml }
framework:
- charset: UTF-8
form: true
csrf_protection: true
secret: xxxxxxxxxx
@@ -15,7 +14,6 @@ framework:
engines: [twig]
default_locale: fr
session:
- auto_start: true
name: Tolkiendil
translator: { fallback: fr }
diff --git a/bin/build_bootstrap.php b/bin/build_bootstrap.php
deleted file mode 100644
index eb94890..0000000
--- a/bin/build_bootstrap.php
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/env php
-<?php
-
-/*
- * This file is part of the Symfony Standard Edition.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-$baseDir = realpath(__DIR__.'/..');
-
-require_once $baseDir.'/vendor/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-use Symfony\Component\ClassLoader\UniversalClassLoader;
-use Symfony\Component\ClassLoader\ClassCollectionLoader;
-
-$loader = new UniversalClassLoader();
-$loader->registerNamespaces(array('Symfony' => $baseDir.'/vendor/symfony/src'));
-$loader->register();
-
-$file = $baseDir.'/app/bootstrap.php.cache';
-if (file_exists($file)) {
- unlink($file);
-}
-
-ClassCollectionLoader::load(array(
- 'Symfony\\Component\\DependencyInjection\\ContainerAwareInterface',
- // Cannot be included because annotations will parse the big compiled class file
- //'Symfony\\Component\\DependencyInjection\\ContainerAware',
- 'Symfony\\Component\\DependencyInjection\\ContainerInterface',
- 'Symfony\\Component\\DependencyInjection\\Container',
- 'Symfony\\Component\\HttpKernel\\HttpKernelInterface',
- 'Symfony\\Component\\HttpKernel\\KernelInterface',
- 'Symfony\\Component\\HttpKernel\\Kernel',
- 'Symfony\\Component\\ClassLoader\\ClassCollectionLoader',
- 'Symfony\\Component\\ClassLoader\\UniversalClassLoader',
- 'Symfony\\Component\\HttpKernel\\Bundle\\BundleInterface',
- 'Symfony\\Component\\HttpKernel\\Bundle\\Bundle',
- 'Symfony\\Component\\Config\\ConfigCache',
- // cannot be included as commands are discovered based on the path to this class via Reflection
- //'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle',
-), dirname($file), basename($file, '.php.cache'), false, false, '.php.cache');
-
-file_put_contents($file, "<?php\n\nnamespace { require_once __DIR__.'/autoload.php'; }\n\n".substr(file_get_contents($file), 5));
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..d8e2b20
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,44 @@
+{
+ "name": "tolkiendil/backend",
+ "autoload": {
+ "psr-0": { "Tolkiendil": "src/" }
+ },
+ "require": {
+ "php": ">=5.3.3",
+ "symfony/symfony": "2.1.*",
+ "doctrine/orm": ">=2.2.3,<2.4-dev",
+ "doctrine/doctrine-bundle": "1.0.*",
+ "doctrine/doctrine-fixtures-bundle": "dev-master",
+ "jms/debugging-bundle": "dev-master",
+ "knplabs/knp-menu-bundle": "1.1.*",
+ "kriswallsmith/buzz": "dev-master",
+ "rapotor/console-bundle": "dev-master",
+ "sonata-project/admin-bundle": "2.1.*",
+ "sonata-project/doctrine-orm-admin-bundle": "dev-master",
+ "stof/doctrine-extensions-bundle": "1.1.*",
+ "symfony/monolog-bundle": "2.1.*",
+ "sensio/distribution-bundle": "2.1.*",
+ "sensio/generator-bundle": "2.1.*",
+ "twig/extensions": "1.0.*"
+ },
+ "scripts": {
+ "post-install-cmd": [
+ "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
+ "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
+ "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
+ "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
+ ],
+ "post-update-cmd": [
+ "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
+ "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
+ "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
+ "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
+ ]
+ },
+ "minimum-stability": "dev",
+ "extra": {
+ "symfony-assets-install": "symlink",
+ "symfony-app-dir": "app",
+ "symfony-web-dir": "web"
+ }
+}
diff --git a/composer.lock b/composer.lock
new file mode 100644
index 0000000..f9de111
--- /dev/null
+++ b/composer.lock
@@ -0,0 +1,1410 @@
+{
+ "hash": "028bf5b266b5294ee49671f73c20e13e",
+ "packages": [
+ {
+ "name": "doctrine/common",
+ "version": "2.3.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/common",
+ "reference": "bb0aebbf234db52df476a2b473d434745b34221c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/doctrine/common/zipball/bb0aebbf234db52df476a2b473d434745b34221c",
+ "reference": "bb0aebbf234db52df476a2b473d434745b34221c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2"
+ },
+ "time": "1348120518",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.3.x-dev"
+ }
+ },
+ "installation-source": "source",
+ "autoload": {
+ "psr-0": {
+ "Doctrine\\Common": "lib/"
+ }
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jonathan Wage",
+ "email": "jonwage@gmail.com",
+ "homepage": "http://www.jwage.com/"
+ },
+ {
+ "name": "Guilherme Blanco",
+ "email": "guilhermeblanco@gmail.com",
+ "homepage": "http://www.instaclick.com"
+ },
+ {
+ "name": "Roman Borschel",
+ "email": "roman@code-factory.org"
+ },
+ {
+ "name": "Benjamin Eberlei",
+ "email": "kontakt@beberlei.de"
+ },
+ {
+ "name": "Johannes M. Schmitt",
+ "email": "schmittjoh@gmail.com",
+ "homepage": "http://jmsyst.com",
+ "role": "Developer of wrapped JMSSerializerBundle"
+ }
+ ],
+ "description": "Common Library for Doctrine projects",
+ "homepage": "http://www.doctrine-project.org",
+ "keywords": [
+ "collections",
+ "spl",
+ "eventmanager",
+ "annotations",
+ "persistence"
+ ]
+ },
+ {
+ "name": "doctrine/data-fixtures",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/data-fixtures.git",
+ "reference": "v1.0.0-ALPHA3"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/doctrine/data-fixtures/zipball/v1.0.0-ALPHA3",
+ "reference": "v1.0.0-ALPHA3",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2"
+ },
+ "time": "1348136794",
+ "type": "library",
+ "installation-source": "source",
+ "autoload": {
+ "psr-0": {
+ "Doctrine\\Common\\DataFixtures": "lib/"
+ }
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jonathan Wage",
+ "email": "jonwage@gmail.com",
+ "homepage": "http://www.jwage.com/"
+ }
+ ],
+ "description": "Data Fixtures for all Doctrine Object Managers",
+ "homepage": "http://www.doctrine-project.org",
+ "keywords": [
+ "database"
+ ]
+ },
+ {
+ "name": "doctrine/dbal",
+ "version": "2.3.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/dbal",
+ "reference": "9395ca33971c0ff875d71a0271e6c0d5b0f01508"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/doctrine/dbal/zipball/9395ca33971c0ff875d71a0271e6c0d5b0f01508",
+ "reference": "9395ca33971c0ff875d71a0271e6c0d5b0f01508",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2",
+ "doctrine/common": "2.3.*"
+ },
+ "time": "1350419590",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.3.x-dev"
+ }
+ },
+ "installation-source": "source",
+ "autoload": {
+ "psr-0": {
+ "Doctrine\\DBAL": "lib/"
+ }
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jonathan Wage",
+ "email": "jonwage@gmail.com",
+ "homepage": "http://www.jwage.com/"
+ },
+ {
+ "name": "Guilherme Blanco",
+ "email": "guilhermeblanco@gmail.com",
+ "homepage": "http://www.instaclick.com"
+ },
+ {
+ "name": "Roman Borschel",
+ "email": "roman@code-factory.org"
+ },
+ {
+ "name": "Benjamin Eberlei",
+ "email": "kontakt@beberlei.de"
+ }
+ ],
+ "description": "Database Abstraction Layer",
+ "homepage": "http://www.doctrine-project.org",
+ "keywords": [
+ "database",
+ "persistence",
+ "dbal",
+ "queryobject"
+ ]
+ },
+ {
+ "name": "doctrine/doctrine-bundle",
+ "version": "dev-master",
+ "target-dir": "Doctrine/Bundle/DoctrineBundle",
+ "source": {
+ "type": "git",
+ "url": "git://github.com/doctrine/DoctrineBundle.git",
+ "reference": "a3b99ec049b7c488c70b8776a67c594e6ddf54cd"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/doctrine/DoctrineBundle/zipball/a3b99ec049b7c488c70b8776a67c594e6ddf54cd",
+ "reference": "a3b99ec049b7c488c70b8776a67c594e6ddf54cd",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2",
+ "doctrine/dbal": ">=2.2,<2.4-dev",
+ "symfony/framework-bundle": ">=2.1,<2.3-dev",
+ "symfony/doctrine-bridge": ">=2.1,<2.3-dev"
+ },
+ "require-dev": {
+ "doctrine/orm": ">=2.2,<2.4-dev",
+ "symfony/yaml": ">=2.1,<2.3-dev",
+ "symfony/validator": ">=2.1,<2.3-dev"
+ },
+ "suggest": {
+ "doctrine/orm": "The Doctrine ORM integration is optional in the bundle."
+ },
+ "time": "1350120716",
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "installation-source": "source",
+ "autoload": {
+ "psr-0": {
+ "Doctrine\\Bundle\\DoctrineBundle": ""
+ }
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "http://symfony.com/contributors"
+ },
+ {
+ "name": "Benjamin Eberlei",
+ "email": "kontakt@beberlei.de"
+ }
+ ],
+ "description": "Symfony DoctrineBundle",
+ "homepage": "http://www.doctrine-project.org",
+ "keywords": [
+ "database",
+ "orm",
+ "persistence",
+ "dbal"
+ ]
+ },
+ {
+ "name": "doctrine/doctrine-fixtures-bundle",
+ "version": "dev-master",
+ "target-dir": "Doctrine/Bundle/FixturesBundle",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/DoctrineFixturesBundle.git",
+ "reference": "1e2c7af26f9f7ac9110d47cee8133d700fb99ae1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/doctrine/DoctrineFixturesBundle/zipball/1e2c7af26f9f7ac9110d47cee8133d700fb99ae1",
+ "reference": "1e2c7af26f9f7ac9110d47cee8133d700fb99ae1",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2",
+ "doctrine/data-fixtures": "*",
+ "doctrine/doctrine-bundle": "1.0.*",
+ "symfony/doctrine-bridge": ">=2.1.0,<2.3-dev"
+ },
+ "time": "1349789605",
+ "type": "symfony-bundle",
+ "installation-source": "source",
+ "autoload": {
+ "psr-0": {
+ "Doctrine\\Bundle\\FixturesBundle": ""
+ }
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "http://symfony.com/contributors"
+ },
+ {
+ "name": "Doctrine Project",
+ "homepage": "http://www.doctrine-project.org"
+ }
+ ],
+ "description": "Symfony DoctrineFixturesBundle",
+ "homepage": "http://www.doctrine-project.org",
+ "keywords": [
+ "persistence",
+ "Fixture"
+ ]
+ },
+ {
+ "name": "doctrine/orm",
+ "version": "2.3.x-dev",
+ "source": {
+ "type": "git",
+ "url": "git://github.com/doctrine/doctrine2.git",
+ "reference": "6bad0109599348c5216df35f62b80a20ba16c507"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/doctrine/doctrine2/zipball/6bad0109599348c5216df35f62b80a20ba16c507",
+ "reference": "6bad0109599348c5216df35f62b80a20ba16c507",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2",
+ "ext-pdo": "*",
+ "symfony/console": "2.*",
+ "doctrine/dbal": "2.3.*"
+ },
+ "suggest": {
+ "symfony/yaml": "If you want to use YAML Metadata Mapping Driver"
+ },
+ "time": "1350071385",
+ "bin": [
+ "bin/doctrine",
+ "bin/doctrine.php"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.3.x-dev"
+ }
+ },
+ "installation-source": "source",
+ "autoload": {
+ "psr-0": {
+ "Doctrine\\ORM": "lib/"
+ }
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jonathan Wage",
+ "email": "jonwage@gmail.com",
+ "homepage": "http://www.jwage.com/"
+ },
+ {
+ "name": "Guilherme Blanco",
+ "email": "guilhermeblanco@gmail.com",
+ "homepage": "http://www.instaclick.com"
+ },
+ {
+ "name": "Roman Borschel",
+ "email": "roman@code-factory.org"
+ },
+ {
+ "name": "Benjamin Eberlei",
+ "email": "kontakt@beberlei.de"
+ }
+ ],
+ "description": "Object-Relational-Mapper for PHP",
+ "homepage": "http://www.doctrine-project.org",
+ "keywords": [
+ "database",
+ "orm"
+ ]
+ },
+ {
+ "name": "gedmo/doctrine-extensions",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "git://github.com/l3pp4rd/DoctrineExtensions.git",
+ "reference": "8eb6bf40c398a2f98d73e5fc56058283a356c2ea"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/l3pp4rd/DoctrineExtensions/zipball/8eb6bf40c398a2f98d73e5fc56058283a356c2ea",
+ "reference": "8eb6bf40c398a2f98d73e5fc56058283a356c2ea",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2",
+ "doctrine/common": ">=2.2,<2.5-dev"
+ },
+ "suggest": {
+ "doctrine/orm": ">=2.1",
+ "doctrine/mongodb-odm": "*"
+ },
+ "time": "1350832294",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.3.x-dev"
+ }
+ },
+ "installation-source": "source",
+ "autoload": {
+ "psr-0": {
+ "Gedmo": "lib/"
+ }
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Gediminas Morkevicius",
+ "email": "gediminas.morkevicius@gmail"
+ }
+ ],
+ "description": "Doctrine2 behavioral extensions",
+ "homepage": "http://gediminasm.org/",
+ "keywords": [
+ "tree",
+ "behaviors",
+ "doctrine2",
+ "extensions",
+ "gedmo",
+ "sluggable",
+ "loggable",
+ "translatable",
+ "nestedset",
+ "sortable",
+ "timestampable"
+ ]
+ },
+ {
+ "name": "jms/debugging-bundle",
+ "version": "dev-master",
+ "target-dir": "JMS/DebuggingBundle",
+ "source": {
+ "type": "git",
+ "url": "git://github.com/schmittjoh/JMSDebuggingBundle.git",
+ "reference": "69a591ad2c70cbba8f217ea26f717f94d1f6b750"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/schmittjoh/JMSDebuggingBundle/zipball/69a591ad2c70cbba8f217ea26f717f94d1f6b750",
+ "reference": "69a591ad2c70cbba8f217ea26f717f94d1f6b750",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2",
+ "symfony/framework-bundle": ">=2.0,<2.3-dev"
+ },
+ "time": "1350245282",
+ "type": "symfony-bundle",
+ "installation-source": "source",
+ "autoload": {
+ "psr-0": {
+ "JMS\\DebuggingBundle": ""
+ }
+ },
+ "license": [
+ "Apache2"
+ ],
+ "authors": [
+ {
+ "name": "Johannes M. Schmitt",
+ "email": "schmittjoh@gmail.com",
+ "homepage": "http://jmsyst.com",
+ "role": "Developer of wrapped JMSSerializerBundle"
+ }
+ ],
+ "description": "This bundle provides advanced debugging tools (for your Symfony2 project).",
+ "homepage": "http://jmsyst.com/bundles/JMSDebuggingBundle",
+ "keywords": [
+ "debugging"
+ ]
+ },
+ {
+ "name": "knplabs/knp-menu",
+ "version": "1.1.x-dev",
+ "source": {
+ "type": "git",
+ "url": "http://github.com/KnpLabs/KnpMenu.git",
+ "reference": "v1.1.2"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/KnpLabs/KnpMenu/zipball/v1.1.2",
+ "reference": "v1.1.2",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "pimple/pimple": "*",
+ "silex/silex": "1.0.*",
+ "twig/twig": ">=1.2,<2.0-dev"
+ },
+ "suggest": {
+ "pimple/pimple": "for the built-in implementations of the menu provider and renderer provider",
+ "silex/silex": "for the integration with your silex application",
+ "twig/twig": "for the TwigRenderer and the integration with your templates"
+ },
+ "time": "1339345240",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1.x-dev"
+ }
+ },
+ "installation-source": "source",
+ "autoload": {
+ "psr-0": {
+ "Knp\\Menu\\": "src/"
+ }
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Christophe Coevoet",
+ "email": "stof@notk.org"
+ },
+ {
+ "name": "Knplabs",
+ "homepage": "http://knplabs.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://github.com/KnpLabs/KnpMenu/contributors"
+ }
+ ],
+ "description": "An object oriented menu library",
+ "homepage": "http://knplabs.com",
+ "keywords": [
+ "menu",
+ "tree"
+ ]
+ },
+ {
+ "name": "knplabs/knp-menu-bundle",
+ "version": "v1.1.0",
+ "target-dir": "Knp/Bundle/MenuBundle",
+ "source": {
+ "type": "git",
+ "url": "http://github.com/KnpLabs/KnpMenuBundle.git",
+ "reference": "v1.1.0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/KnpLabs/KnpMenuBundle/zipball/v1.1.0",
+ "reference": "v1.1.0",
+ "shasum": ""
+ },
+ "require": {
+ "knplabs/knp-menu": "1.1.*",
+ "symfony/framework-bundle": ">=2.0,<2.2-dev"
+ },
+ "time": "2012-05-17 04:56:49",
+ "type": "symfony-bundle",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-0": {
+ "Knp\\Bundle\\MenuBundle": ""
+ }
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Christophe Coevoet",
+ "email": "stof@notk.org"
+ },
+ {
+ "name": "Knplabs",
+ "homepage": "http://knplabs.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://github.com/KnpLabs/KnpMenuBundle/contributors"
+ }
+ ],
+ "description": "This bundle provides an integration of the KnpMenu library",
+ "keywords": [
+ "menu"
+ ]
+ },
+ {
+ "name": "kriswallsmith/buzz",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "http://github.com/kriswallsmith/Buzz.git",
+ "reference": "988bf14201ffbed940f23b42f87302e6adec4c21"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/kriswallsmith/Buzz/zipball/988bf14201ffbed940f23b42f87302e6adec4c21",
+ "reference": "988bf14201ffbed940f23b42f87302e6adec4c21",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "suggest": {
+ "ext-curl": "*"
+ },
+ "time": "1345206213",
+ "type": "library",
+ "installation-source": "source",
+ "autoload": {
+ "psr-0": {
+ "Buzz": "lib/"
+ }
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Kris Wallsmith",
+ "email": "kris.wallsmith@gmail.com",
+ "homepage": "http://kriswallsmith.net/"
+ }
+ ],
+ "description": "Lightweight HTTP client",
+ "homepage": "https://github.com/kriswallsmith/Buzz",
+ "keywords": [
+ "curl",
+ "http client"
+ ]
+ },
+ {
+ "name": "monolog/monolog",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Seldaek/monolog",
+ "reference": "023b31a31f3807fb19bda1501abb96deacea7c84"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/Seldaek/monolog/zipball/023b31a31f3807fb19bda1501abb96deacea7c84",
+ "reference": "023b31a31f3807fb19bda1501abb96deacea7c84",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "mlehner/gelf-php": "1.0.*"
+ },
+ "suggest": {
+ "mlehner/gelf-php": "Allow sending log messages to a GrayLog2 server",
+ "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
+ "ext-mongo": "Allow sending log messages to a MongoDB server"
+ },
+ "time": "1350826548",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.3.x-dev"
+ }
+ },
+ "installation-source": "source",
+ "autoload": {
+ "psr-0": {
+ "Monolog": "src/"
+ }
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "http://seld.be",
+ "role": "Developer"
+ }
+ ],
+ "description": "Logging for PHP 5.3",
+ "homepage": "http://github.com/Seldaek/monolog",
+ "keywords": [
+ "log",
+ "logging"
+ ]
+ },
+ {
+ "name": "rapotor/console-bundle",
+ "version": "dev-master",
+ "target-dir": "Sf2gen/Bundle/ConsoleBundle",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/RapotOR/ConsoleBundle",
+ "reference": "f0de0e66bfd0a0660e483a444b0f44d518cae21e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/RapotOR/ConsoleBundle/zipball/f0de0e66bfd0a0660e483a444b0f44d518cae21e",
+ "reference": "f0de0e66bfd0a0660e483a444b0f44d518cae21e",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3",
+ "symfony/framework-bundle": "2.1.*",
+ "symfony/twig-bundle": "2.1.*",
+ "symfony/console": "2.1.*"
+ },
+ "time": "1348338336",
+ "type": "symfony-bundle",
+ "installation-source": "source",
+ "autoload": {
+ "psr-0": {
+ "Sf2gen\\Bundle\\ConsoleBundle": ""
+ }
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Cédric Lahouste"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://github.com/RapotOR/ConsoleBundle/contributors"
+ }
+ ],
+ "description": "Execute Symfony2 command directly from the application",
+ "homepage": "https://github.com/RapotOR/ConsoleBundle",
+ "keywords": [
+ "console"
+ ]
+ },
+ {
+ "name": "sensio/distribution-bundle",
+ "version": "2.1.x-dev",
+ "target-dir": "Sensio/Bundle/DistributionBundle",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sensio/SensioDistributionBundle",
+ "reference": "v2.1.1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/sensio/SensioDistributionBundle/zipball/v2.1.1",
+ "reference": "v2.1.1",
+ "shasum": ""
+ },
+ "require": {
+ "symfony/framework-bundle": "2.1.*"
+ },
+ "time": "1347340208",
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.1.x-dev"
+ }
+ },
+ "installation-source": "source",
+ "autoload": {
+ "psr-0": {
+ "Sensio\\Bundle\\DistributionBundle": ""
+ }
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ }
+ ],
+ "description": "The base bundle for the Symfony Distributions",
+ "keywords": [
+ "distribution",
+ "configuration"
+ ]
+ },
+ {
+ "name": "sensio/generator-bundle",
+ "version": "2.1.x-dev",
+ "target-dir": "Sensio/Bundle/GeneratorBundle",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sensio/SensioGeneratorBundle",
+ "reference": "3a65c9bf7d31aecacffc15a48f5eb2ece3615ef0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/sensio/SensioGeneratorBundle/zipball/3a65c9bf7d31aecacffc15a48f5eb2ece3615ef0",
+ "reference": "3a65c9bf7d31aecacffc15a48f5eb2ece3615ef0",
+ "shasum": ""
+ },
+ "require": {
+ "symfony/framework-bundle": "2.1.*",
+ "symfony/console": "2.1.*"
+ },
+ "require-dev": {
+ "symfony/doctrine-bridge": "2.1.*",
+ "doctrine/orm": ">=2.1,<2.4-dev",
+ "twig/twig": ">=1.8,<2.0-dev"
+ },
+ "time": "1348030981",
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.1.x-dev"
+ }
+ },
+ "installation-source": "source",
+ "autoload": {
+ "psr-0": {
+ "Sensio\\Bundle\\GeneratorBundle": ""
+ }
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ }
+ ],
+ "description": "This bundle generates code for you"
+ },
+ {
+ "name": "sonata-project/admin-bundle",
+ "version": "dev-master",
+ "target-dir": "Sonata/AdminBundle",
+ "source": {
+ "type": "git",
+ "url": "git://github.com/sonata-project/SonataAdminBundle.git",
+ "reference": "567fc0df42c145148f51899431aa342d7700ab45"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/sonata-project/SonataAdminBundle/zipball/63e95a036d3103a9997fadae8779d5ede345977e",
+ "reference": "63e95a036d3103a9997fadae8779d5ede345977e",
+ "shasum": ""
+ },
+ "require": {
+ "sonata-project/jquery-bundle": "dev-master",
+ "sonata-project/exporter": "dev-master",
+ "sonata-project/block-bundle": "dev-master",
+ "knplabs/knp-menu-bundle": "1.1.*"
+ },
+ "require-dev": {
+ "jms/translation-bundle": "*"
+ },
+ "suggest": {
+ "sonata-project/doctrine-orm-admin-bundle": "dev-master",
+ "sonata-project/intl-bundle": "dev-master"
+ },
+ "time": "1350295667",
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.1-dev"
+ }
+ },
+ "installation-source": "source",
+ "autoload": {
+ "psr-0": {
+ "Sonata\\AdminBundle": ""
+ }
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Thomas Rabaix",
+ "email": "thomas.rabaix@sonata-project.org",
+ "homepage": "http://sonata-project.org"
+ },
+ {
+ "name": "Sonata Community",
+ "homepage": "https://github.com/sonata-project/SonataAdminBundle/contributors"
+ }
+ ],
+ "description": "Symfony SonataAdminBundle",
+ "homepage": "http://sonata-project.org/bundles/admin",
+ "keywords": [
+ "admin",
+ "Admin Generator",
+ "sonata",
+ "bootstrap"
+ ]
+ },
+ {
+ "name": "sonata-project/block-bundle",
+ "version": "dev-master",
+ "target-dir": "Sonata/BlockBundle",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sonata-project/SonataBlockBundle",
+ "reference": "38781ae54bb478293f7ea44caec45c081c2fc40b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/sonata-project/SonataBlockBundle/zipball/38781ae54bb478293f7ea44caec45c081c2fc40b",
+ "reference": "38781ae54bb478293f7ea44caec45c081c2fc40b",
+ "shasum": ""
+ },
+ "require-dev": {
+ "sonata-project/admin-bundle": "dev-master",
+ "sonata-project/cache-bundle": "dev-master"
+ },
+ "suggest": {
+ "sonata-project/admin-bundle": "dev-master",
+ "sonata-project/cache-bundle": "dev-master"
+ },
+ "time": "1350232707",
+ "type": "symfony-bundle",
+ "installation-source": "source",
+ "autoload": {
+ "psr-0": {
+ "Sonata\\BlockBundle": ""
+ }
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Thomas Rabaix",
+ "email": "thomas.rabaix@sonata-project.org",
+ "homepage": "http://sonata-project.org"
+ },
+ {
+ "name": "Sonata Community",
+ "homepage": "https://github.com/sonata-project/SonataBlockBundle/contributors"
+ }
+ ],
+ "description": "Symfony SonataBlockBundle",
+ "homepage": "http://sonata-project.org/bundles/block",
+ "keywords": [
+ "sonata",
+ "block"
+ ]
+ },
+ {
+ "name": "sonata-project/doctrine-orm-admin-bundle",
+ "version": "dev-master",
+ "target-dir": "Sonata/DoctrineORMAdminBundle",
+ "source": {
+ "type": "git",
+ "url": "git://github.com/sonata-project/SonataDoctrineORMAdminBundle.git",
+ "reference": "072d292b9a759cf7dd562a9bb9eba2f48c92d8c2"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/sonata-project/SonataDoctrineORMAdminBundle/zipball/072d292b9a759cf7dd562a9bb9eba2f48c92d8c2",
+ "reference": "072d292b9a759cf7dd562a9bb9eba2f48c92d8c2",
+ "shasum": ""
+ },
+ "require": {
+ "sonata-project/admin-bundle": "dev-master",
+ "doctrine/orm": ">=2.2,<2.4-dev",
+ "symfony/symfony": "2.1.*"
+ },
+ "time": "1348476029",
+ "type": "symfony-bundle",
+ "installation-source": "source",
+ "autoload": {
+ "psr-0": {
+ "Sonata\\DoctrineORMAdminBundle": ""
+ }
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Thomas Rabaix",
+ "email": "thomas.rabaix@sonata-project.org",
+ "homepage": "http://sonata-project.org"
+ },
+ {
+ "name": "Sonata Community",
+ "homepage": "https://github.com/sonata-project/SonataDoctrineORMAdminBundle/contributors"
+ }
+ ],
+ "description": "Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle",
+ "homepage": "http://sonata-project.org/bundles/admin",
+ "keywords": [
+ "admin",
+ "generator",
+ "Admin Generator",
+ "sonata",
+ "bootstrap"
+ ]
+ },
+ {
+ "name": "sonata-project/exporter",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sonata-project/exporter",
+ "reference": "75174b5a41f1014ecb4b4810a518f036b830d862"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/sonata-project/exporter/zipball/75174b5a41f1014ecb4b4810a518f036b830d862",
+ "reference": "75174b5a41f1014ecb4b4810a518f036b830d862",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "suggest": {
+ "ext-curl": "*"
+ },
+ "time": "1346967589",
+ "type": "library",
+ "installation-source": "source",
+ "autoload": {
+ "psr-0": {
+ "Exporter": "lib/"
+ }
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Thomas Rabaix",
+ "email": "thomas.rabaix@gmail.com",
+ "homepage": "http://sonata-project.org/"
+ }
+ ],
+ "description": "Lightweight Exporter library",
+ "homepage": "https://github.com/sonata-project/Exporter",
+ "keywords": [
+ "data",
+ "xls",
+ "csv",
+ "client",
+ "export"
+ ]
+ },
+ {
+ "name": "sonata-project/jquery-bundle",
+ "version": "dev-master",
+ "target-dir": "Sonata/jQueryBundle",
+ "source": {
+ "type": "git",
+ "url": "git://github.com/sonata-project/SonatajQueryBundle.git",
+ "reference": "5f87a761302e6c78304e071416f75d41eb1fb3c2"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/sonata-project/SonatajQueryBundle/zipball/5f87a761302e6c78304e071416f75d41eb1fb3c2",
+ "reference": "5f87a761302e6c78304e071416f75d41eb1fb3c2",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2",
+ "symfony/framework-bundle": "2.*"
+ },
+ "time": "1346283282",
+ "type": "symfony-bundle",
+ "installation-source": "source",
+ "autoload": {
+ "psr-0": {
+ "Sonata\\jQueryBundle": ""
+ }
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Thomas Rabaix",
+ "email": "thomas.rabaix@sonata-project.org",
+ "homepage": "http://sonata-project.org"
+ },
+ {
+ "name": "Sonata Community",
+ "homepage": "https://github.com/sonata-project/SonatajQueryBundle/contributors"
+ }
+ ],
+ "description": "Symfony SonatajQueryBundle",
+ "homepage": "http://sonata-project.org/bundles/jquery",
+ "keywords": [
+ "jquery",
+ "sonata"
+ ]
+ },
+ {
+ "name": "stof/doctrine-extensions-bundle",
+ "version": "dev-master",
+ "target-dir": "Stof/DoctrineExtensionsBundle",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/stof/StofDoctrineExtensionsBundle",
+ "reference": "41d9399e56868f82f871723a1842b5f2053e2e24"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/stof/StofDoctrineExtensionsBundle/zipball/41d9399e56868f82f871723a1842b5f2053e2e24",
+ "reference": "41d9399e56868f82f871723a1842b5f2053e2e24",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2",
+ "symfony/framework-bundle": ">=2.1,<2.3-dev",
+ "gedmo/doctrine-extensions": "2.3.*"
+ },
+ "suggest": {
+ "doctrine/doctrine-bundle": "*",
+ "doctrine/mongodb-odm-bundle": "2.1.*"
+ },
+ "time": "1350324852",
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1.x-dev"
+ }
+ },
+ "installation-source": "source",
+ "autoload": {
+ "psr-0": {
+ "Stof\\DoctrineExtensionsBundle": ""
+ }
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Christophe Coevoet",
+ "email": "stof@notk.org"
+ }
+ ],
+ "description": "Integration of the gedmo/doctrine-extensions with Symfony2",
+ "homepage": "https://github.com/stof/StofDoctrineExtensionsBundle",
+ "keywords": [
+ "tree",
+ "behaviors",
+ "doctrine2",
+ "extensions",
+ "gedmo",
+ "sluggable",
+ "loggable",
+ "translatable",
+ "nestedset",
+ "sortable",
+ "timestampable"
+ ]
+ },
+ {
+ "name": "symfony/monolog-bundle",
+ "version": "dev-master",
+ "target-dir": "Symfony/Bundle/MonologBundle",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/MonologBundle",
+ "reference": "51517152a608926ee6b40ed8cfbba1a708f0a14f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/symfony/MonologBundle/zipball/51517152a608926ee6b40ed8cfbba1a708f0a14f",
+ "reference": "51517152a608926ee6b40ed8cfbba1a708f0a14f",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2",
+ "monolog/monolog": "1.*",
+ "symfony/monolog-bridge": ">=2.1.0,<2.3-dev",
+ "symfony/dependency-injection": ">=2.1.0,<2.3-dev",
+ "symfony/config": ">=2.1.0,<2.3-dev"
+ },
+ "require-dev": {
+ "symfony/yaml": ">=2.1.0,<2.3-dev",
+ "symfony/config": ">=2.1.0,<2.3-dev"
+ },
+ "time": "1348137624",
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.1.x-dev"
+ }
+ },
+ "installation-source": "source",
+ "autoload": {
+ "psr-0": {
+ "Symfony\\Bundle\\MonologBundle": ""
+ }
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "http://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony MonologBundle",
+ "homepage": "http://symfony.com"
+ },
+ {
+ "name": "symfony/symfony",
+ "version": "2.1.x-dev",
+ "source": {
+ "type": "git",
+ "url": "git://github.com/symfony/symfony.git",
+ "reference": "bb636c857abea60ac3a27ce0ab62ea979b3aad58"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/symfony/symfony/zipball/bb636c857abea60ac3a27ce0ab62ea979b3aad58",
+ "reference": "bb636c857abea60ac3a27ce0ab62ea979b3aad58",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3",
+ "doctrine/common": ">2.2,<2.4-dev",
+ "twig/twig": ">=1.9.1,<2.0-dev"
+ },
+ "replace": {
+ "symfony/doctrine-bridge": "self.version",
+ "symfony/monolog-bridge": "self.version",
+ "symfony/propel1-bridge": "self.version",
+ "symfony/swiftmailer-bridge": "self.version",
+ "symfony/twig-bridge": "self.version",
+ "symfony/framework-bundle": "self.version",
+ "symfony/security-bundle": "self.version",
+ "symfony/twig-bundle": "self.version",
+ "symfony/web-profiler-bundle": "self.version",
+ "symfony/browser-kit": "self.version",
+ "symfony/class-loader": "self.version",
+ "symfony/config": "self.version",
+ "symfony/console": "self.version",
+ "symfony/css-selector": "self.version",
+ "symfony/dependency-injection": "self.version",
+ "symfony/dom-crawler": "self.version",
+ "symfony/event-dispatcher": "self.version",
+ "symfony/filesystem": "self.version",
+ "symfony/finder": "self.version",
+ "symfony/form": "self.version",
+ "symfony/http-foundation": "self.version",
+ "symfony/http-kernel": "self.version",
+ "symfony/locale": "self.version",
+ "symfony/options-resolver": "self.version",
+ "symfony/process": "self.version",
+ "symfony/routing": "self.version",
+ "symfony/security": "self.version",
+ "symfony/serializer": "self.version",
+ "symfony/templating": "self.version",
+ "symfony/translation": "self.version",
+ "symfony/validator": "self.version",
+ "symfony/yaml": "self.version"
+ },
+ "require-dev": {
+ "doctrine/dbal": ">=2.2,<2.4-dev",
+ "doctrine/orm": ">=2.2.3,<2.4-dev",
+ "doctrine/data-fixtures": "1.0.*",
+ "propel/propel1": "dev-master",
+ "monolog/monolog": "1.*"
+ },
+ "time": "1350717030",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.1-dev"
+ }
+ },
+ "installation-source": "source",
+ "autoload": {
+ "psr-0": {
+ "Symfony": "src/",
+ "SessionHandlerInterface": "src/Symfony/Component/HttpFoundation/Resources/stubs"
+ }
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "http://symfony.com/contributors"
+ }
+ ],
+ "description": "The Symfony PHP framework",
+ "homepage": "http://symfony.com",
+ "keywords": [
+ "framework"
+ ]
+ },
+ {
+ "name": "twig/extensions",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/fabpot/Twig-extensions",
+ "reference": "dcdff02fbac1282e6b8f4d0558cc7e9580105688"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/fabpot/Twig-extensions/zipball/dcdff02fbac1282e6b8f4d0558cc7e9580105688",
+ "reference": "dcdff02fbac1282e6b8f4d0558cc7e9580105688",
+ "shasum": ""
+ },
+ "require": {
+ "twig/twig": "1.*"
+ },
+ "time": "1349889206",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "installation-source": "source",
+ "autoload": {
+ "psr-0": {
+ "Twig_Extensions_": "lib/"
+ }
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ }
+ ],
+ "description": "Common additional features for Twig that do not directly belong in core",
+ "homepage": "https://github.com/fabpot/Twig-extensions",
+ "keywords": [
+ "debug",
+ "i18n",
+ "text"
+ ]
+ },
+ {
+ "name": "twig/twig",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "git://github.com/fabpot/Twig.git",
+ "reference": "61393dc9fb8982110048624aa573aec4aee0b465"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/fabpot/Twig/zipball/61393dc9fb8982110048624aa573aec4aee0b465",
+ "reference": "61393dc9fb8982110048624aa573aec4aee0b465",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.2.4"
+ },
+ "time": "1350737598",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.11-dev"
+ }
+ },
+ "installation-source": "source",
+ "autoload": {
+ "psr-0": {
+ "Twig_": "lib/"
+ }
+ },
+ "license": [
+ "BSD-3"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Armin Ronacher",
+ "email": "armin.ronacher@active-4.com"
+ }
+ ],
+ "description": "Twig, the flexible, fast, and secure template language for PHP",
+ "homepage": "http://twig.sensiolabs.org",
+ "keywords": [
+ "templating"
+ ]
+ }
+ ],
+ "packages-dev": null,
+ "aliases": [
+
+ ],
+ "minimum-stability": "dev",
+ "stability-flags": {
+ "doctrine/doctrine-fixtures-bundle": 20,
+ "jms/debugging-bundle": 20,
+ "kriswallsmith/buzz": 20,
+ "rapotor/console-bundle": 20,
+ "sonata-project/doctrine-orm-admin-bundle": 20
+ }
+}
diff --git a/src/Tolkiendil/AssoBundle/Form/Type/DatePickerType.php b/src/Tolkiendil/AssoBundle/Form/Type/DatePickerType.php
index 73de9b7..14959c9 100644
--- a/src/Tolkiendil/AssoBundle/Form/Type/DatePickerType.php
+++ b/src/Tolkiendil/AssoBundle/Form/Type/DatePickerType.php
@@ -3,12 +3,13 @@
namespace Tolkiendil\AssoBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
+use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class DatePickerType extends AbstractType
{
- public function getDefaultOptions()
+ public function setDefaultOptions(OptionsResolverInterface $resolver)
{
- return array(
+ $resolver->setDefaults(array(
'widget' => 'single_text',
'format' => 'dd/MM/yy',
'attr' => array(
@@ -16,10 +17,10 @@ class DatePickerType extends AbstractType
'class' => 'tolk_date_picker',
'readonly' => 'readonly',
),
- );
+ ));
}
- public function getParent(array $options)
+ public function getParent()
{
return 'date';
}
diff --git a/src/Tolkiendil/GameBundle/Admin/WordSearchAdmin.php b/src/Tolkiendil/GameBundle/Admin/WordSearchAdmin.php
index 8baf39f..75176df 100644
--- a/src/Tolkiendil/GameBundle/Admin/WordSearchAdmin.php
+++ b/src/Tolkiendil/GameBundle/Admin/WordSearchAdmin.php
@@ -4,6 +4,7 @@ namespace Tolkiendil\GameBundle\Admin;
use Sonata\AdminBundle\Admin\Admin;
use Sonata\AdminBundle\Form\FormMapper;
+use Sonata\AdminBundle\Show\ShowMapper;
use Sonata\AdminBundle\Datagrid\ListMapper;
class WordSearchAdmin extends Admin
@@ -17,6 +18,11 @@ class WordSearchAdmin extends Admin
return array('SonataDoctrineORMAdminBundle:Form:form_admin_fields.html.twig', 'TolkiendilGameBundle:WordSearch/Admin:form.html.twig');
}
+ protected function configureShowFields(ShowMapper $filter)
+ {
+ $filter->add('title');
+ }
+
protected function configureFormFields(FormMapper $formMapper)
{
$formMapper
diff --git a/src/Tolkiendil/GameBundle/Controller/QuizController.php b/src/Tolkiendil/GameBundle/Controller/QuizController.php
index c665234..6147b32 100644
--- a/src/Tolkiendil/GameBundle/Controller/QuizController.php
+++ b/src/Tolkiendil/GameBundle/Controller/QuizController.php
@@ -21,10 +21,10 @@ class QuizController extends Controller
}
/** @var $form \Symfony\Component\Form\Form */
- $form = $this->get('form.factory')->createNamed('tolkiendil_game_quiz', 'quiz', null, array ('quiz' => $quiz));
+ $form = $this->get('form.factory')->createNamed('quiz', 'tolkiendil_game_quiz', null, array ('quiz' => $quiz));
if ('POST' === $request->getMethod()) {
- $form->bindRequest($request);
+ $form->bind($request);
if ($form->isValid()) {
return $this->render('TolkiendilGameBundle:Quiz:check.html.twig', array ('quiz' => $quiz));
}
diff --git a/src/Tolkiendil/GameBundle/Form/QuestionFormType.php b/src/Tolkiendil/GameBundle/Form/QuestionFormType.php
index f0d71ad..f47162c 100644
--- a/src/Tolkiendil/GameBundle/Form/QuestionFormType.php
+++ b/src/Tolkiendil/GameBundle/Form/QuestionFormType.php
@@ -3,51 +3,40 @@
namespace Tolkiendil\GameBundle\Form;
use Symfony\Component\Form\AbstractType;
-use Symfony\Component\Form\FormBuilder;
+use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormView;
use Symfony\Component\Form\FormInterface;
-use Symfony\Component\Form\Exception\FormException;
-use Tolkiendil\GameBundle\Entity\Question;
+use Symfony\Component\OptionsResolver\OptionsResolverInterface;
/**
* Tolkiendil\GameBundle\Form\QuestionFormType
*/
class QuestionFormType extends AbstractType
{
- public function buildForm(FormBuilder $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options)
{
- if (empty($options['question'])) {
- throw new FormException('The "question" option is required');
- }
-
- if (!$options['question'] instanceof Question) {
- throw new FormException('The "question" option must be an instance of "Tolkiendil\GameBundle\Entity\Question".');
- }
-
- $builder->add(
- 'choice',
- 'entity',
- array(
- 'choices' => $options['question']->getAnswersAsArray(),
- 'class' => 'Tolkiendil\GameBundle\Entity\Answer',
- 'expanded' => true,
- 'required' => false
- ));
- $builder->setAttribute('question', $options['question']->getText());
+ $builder->add('choice', 'entity', array(
+ 'choices' => $options['question']->getAnswersAsArray(),
+ 'class' => 'Tolkiendil\GameBundle\Entity\Answer',
+ 'expanded' => true,
+ 'required' => false
+ ));
}
- public function buildView(FormView $view, FormInterface $form)
+ public function buildView(FormView $view, FormInterface $form, array $options)
{
- $view->set('question', $form->getAttribute('question'));
+ $view->vars['question'] = $options['question']->getText();
}
- public function getDefaultOptions()
+ public function setDefaultOptions(OptionsResolverInterface $resolver)
{
- return array(
- 'question' => null,
- 'csrf_protection' => false,
- 'error_bubbling' => false,
- );
+ $resolver->setDefaults(array(
+ 'data_class' => 'Tolkiendil\GameBundle\Entity\Question',
+ 'csrf_protection' => false,
+ 'error_bubbling' => false,
+ ));
+ $resolver->setRequired(array('question'));
+ $resolver->setAllowedTypes(array('question' => 'Tolkiendil\GameBundle\Entity\Question'));
}
public function getName()
diff --git a/src/Tolkiendil/GameBundle/Form/QuizFormType.php b/src/Tolkiendil/GameBundle/Form/QuizFormType.php
index 1317fd5..700202b 100644
--- a/src/Tolkiendil/GameBundle/Form/QuizFormType.php
+++ b/src/Tolkiendil/GameBundle/Form/QuizFormType.php
@@ -3,26 +3,19 @@
namespace Tolkiendil\GameBundle\Form;
use Symfony\Component\Form\AbstractType;
-use Symfony\Component\Form\FormBuilder;
-use Symfony\Component\Form\Exception\FormException;
-use Tolkiendil\GameBundle\Entity\Quiz;
+use Symfony\Component\Form\FormBuilderInterface;
+use Symfony\Component\OptionsResolver\OptionsResolverInterface;
/**
* Tolkiendil\GameBundle\Form\QuizFormtype
*/
class QuizFormType extends AbstractType
{
- public function buildForm(FormBuilder $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options)
{
- if (empty($options['quiz'])) {
- throw new FormException('The "quiz" option is required');
- }
-
- if (!$options['quiz'] instanceof Quiz) {
- throw new FormException('The "quiz" option must be an instance of "Tolkiendil\GameBundle\Entity\Quiz".');
- }
-
- foreach ($options['quiz']->getQuestions() as $index => $question) {
+ /** @var $quiz \Tolkiendil\GameBundle\Entity\Quiz */
+ $quiz = $options['quiz'];
+ foreach ($quiz->getQuestions() as $index => $question) {
$builder->add(
sprintf('question_%d', $question->getPosition()),
'tolkiendil_game_question',
@@ -32,13 +25,15 @@ class QuizFormType extends AbstractType
$builder->setData($options['quiz']);
}
- public function getDefaultOptions()
+ public function setDefaultOptions(OptionsResolverInterface $resolver)
{
- return array(
- 'quiz' => null,
- 'csrf_protection' => false,
- 'error_bubbling' => false,
- );
+ $resolver->setDefaults(array(
+ 'data_class' => 'Tolkiendil\GameBundle\Entity\Quiz',
+ 'csrf_protection' => false,
+ 'error_bubbling' => false,
+ ));
+ $resolver->setRequired(array('quiz'));
+ $resolver->setAllowedTypes(array('quiz' => 'Tolkiendil\GameBundle\Entity\Quiz'));
}
public function getName()
diff --git a/src/Tolkiendil/GameBundle/Form/Type/Admin/LetterCollectionType.php b/src/Tolkiendil/GameBundle/Form/Type/Admin/LetterCollectionType.php
index a7fd94c..c644182 100644
--- a/src/Tolkiendil/GameBundle/Form/Type/Admin/LetterCollectionType.php
+++ b/src/Tolkiendil/GameBundle/Form/Type/Admin/LetterCollectionType.php
@@ -3,22 +3,23 @@
namespace Tolkiendil\GameBundle\Form\Type\Admin;
use Symfony\Component\Form\AbstractType;
+use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class LetterCollectionType extends AbstractType
{
- public function getDefaultOptions()
+ public function setDefaultOptions(OptionsResolverInterface $resolver)
{
- return array(
+ $resolver->setDefaults(array(
'prototype_name' => '__col__',
'options' => array(
'attr' => array(
'maxlength' => 1,
),
),
- );
+ ));
}
- public function getParent(array $options)
+ public function getParent()
{
return 'collection';
}
diff --git a/src/Tolkiendil/GameBundle/Form/Type/Admin/LetterGridType.php b/src/Tolkiendil/GameBundle/Form/Type/Admin/LetterGridType.php
index 6554346..172dcc5 100644
--- a/src/Tolkiendil/GameBundle/Form/Type/Admin/LetterGridType.php
+++ b/src/Tolkiendil/GameBundle/Form/Type/Admin/LetterGridType.php
@@ -3,17 +3,18 @@
namespace Tolkiendil\GameBundle\Form\Type\Admin;
use Symfony\Component\Form\AbstractType;
+use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class LetterGridType extends AbstractType
{
- public function getDefaultOptions()
+ public function setDefaultOptions(OptionsResolverInterface $resolver)
{
- return array(
+ $resolver->setDefaults(array(
'prototype_name' => '__row__',
- );
+ ));
}
- public function getParent(array $options)
+ public function getParent()
{
return 'collection';
}
diff --git a/src/Tolkiendil/GameBundle/Form/Type/Admin/WordCollectionType.php b/src/Tolkiendil/GameBundle/Form/Type/Admin/WordCollectionType.php
index 6730e54..03c321d 100644
--- a/src/Tolkiendil/GameBundle/Form/Type/Admin/WordCollectionType.php
+++ b/src/Tolkiendil/GameBundle/Form/Type/Admin/WordCollectionType.php
@@ -6,7 +6,7 @@ use Symfony\Component\Form\AbstractType;
class WordCollectionType extends AbstractType
{
- public function getParent(array $options)
+ public function getParent()
{
return 'collection';
}
diff --git a/src/Tolkiendil/GameBundle/Resources/views/WordSearch/Admin/preview.html.twig b/src/Tolkiendil/GameBundle/Resources/views/WordSearch/Admin/preview.html.twig
index c8d794a..13fea38 100644
--- a/src/Tolkiendil/GameBundle/Resources/views/WordSearch/Admin/preview.html.twig
+++ b/src/Tolkiendil/GameBundle/Resources/views/WordSearch/Admin/preview.html.twig
@@ -8,20 +8,16 @@
{% block actions %}
<div class="sonata-actions">
- <ul>
- {% if admin.hasRoute('show') and admin.id(object) and admin.isGranted('VIEW')%}
- <li class="btn sonata-action-element"><a href="{{ admin.generateUrl('show', {'id' : admin.id(object)}) }}">{% trans from 'SonataAdminBundle' %}link_action_show{% endtrans %}</a></li>
- {% endif %}
- {% if admin.hasRoute('edit') and admin.isGranted('EDIT')%}
- <li class="btn sonata-action-element"><a href="{{ admin.generateUrl('edit', {'id' : admin.id(object)}) }}">{% trans from 'SonataAdminBundle' %}link_action_edit{% endtrans %}</a></li>
- {% endif %}
- {% if admin.hasRoute('create') and admin.isGranted('CREATE')%}
- <li class="btn sonata-action-element"><a href="{{ admin.generateUrl('create') }}">{% trans from 'SonataAdminBundle' %}link_action_create{% endtrans %}</a></li>
- {% endif %}
- {% if admin.hasRoute('list') and admin.isGranted('LIST')%}
- <li class="btn sonata-action-element"><a href="{{ admin.generateUrl('list') }}">{% trans from 'SonataAdminBundle' %}link_action_list{% endtrans %}</a></li>
- {% endif %}
- </ul>
+ {% if admin.hasRoute('show') and admin.id(object) and admin.isGranted('VIEW')%}
+ <a class="btn sonata-action-element" href="{{ admin.generateUrl('show', {'id' : admin.id(object)}) }}">{% trans from 'SonataAdminBundle' %}link_action_show{% endtrans %}</a>
+ {% endif %}
+ {% if admin.hasRoute('edit') and admin.isGranted('EDIT')%}
+ <a class="btn sonata-action-element" href="{{ admin.generateUrl('edit', {'id' : admin.id(object)}) }}">{% trans from 'SonataAdminBundle' %}link_action_edit{% endtrans %}</a>
+ {% endif %}
+ {% include 'SonataAdminBundle:Core:create_button.html.twig' %}
+ {% if admin.hasRoute('list') and admin.isGranted('LIST')%}
+ <a class="btn sonata-action-element" href="{{ admin.generateUrl('list') }}">{% trans from 'SonataAdminBundle' %}link_action_list{% endtrans %}</a>
+ {% endif %}
</div>
{% endblock %}
diff --git a/src/Tolkiendil/MainBundle/DependencyInjection/TolkiendilMainExtension.php b/src/Tolkiendil/MainBundle/DependencyInjection/TolkiendilMainExtension.php
index 1a32b5c..6cf13c0 100644
--- a/src/Tolkiendil/MainBundle/DependencyInjection/TolkiendilMainExtension.php
+++ b/src/Tolkiendil/MainBundle/DependencyInjection/TolkiendilMainExtension.php
@@ -30,5 +30,8 @@ class TolkiendilMainExtension extends Extension
$container->setParameter('tolkiendil.security.table_prefix', $config['security']['table_prefix']);
$container->setParameter('tolkiendil.security.groups_file', $config['security']['groups_file']);
$container->setParameter('tolkiendil.site', $config['site']);
+
+ // Adding this extra class avoids to have a class map of exactly 4096 bytes which is the case otherwise
+ $this->addClassesToCompile(array('Symfony\Bridge\Twig\Extension\RoutingExtension'));
}
}
diff --git a/vendor/bundles/Doctrine/Bundle/DoctrineBundle b/vendor/bundles/Doctrine/Bundle/DoctrineBundle
deleted file mode 160000
-Subproject 5dad4a6ae187c6d345ec2b02be20ccc33779f53
diff --git a/vendor/bundles/Doctrine/Bundle/FixturesBundle b/vendor/bundles/Doctrine/Bundle/FixturesBundle
deleted file mode 160000
-Subproject 33b267d3068d6c2f8daa0b417285cf76e7f82fc
diff --git a/vendor/bundles/JMS/DebuggingBundle b/vendor/bundles/JMS/DebuggingBundle
deleted file mode 160000
-Subproject 7135e7fb1fcb85ea2f188f3ee63bf5d1510415c
diff --git a/vendor/bundles/Knp/Bundle/MenuBundle b/vendor/bundles/Knp/Bundle/MenuBundle
deleted file mode 160000
-Subproject f77e97924164b5500a15a209243e4c71fe46630
diff --git a/vendor/bundles/Sensio/Bundle/GeneratorBundle b/vendor/bundles/Sensio/Bundle/GeneratorBundle
deleted file mode 160000
-Subproject 423f505811307185eeea38a0a396bede3271349
diff --git a/vendor/bundles/Sf2gen/Bundle/ConsoleBundle b/vendor/bundles/Sf2gen/Bundle/ConsoleBundle
deleted file mode 160000
-Subproject 56f95e054faab9f0d0de7297956098b2787359e
diff --git a/vendor/bundles/Sonata/AdminBundle b/vendor/bundles/Sonata/AdminBundle
deleted file mode 160000
-Subproject b89665e25b669164ce9d02b0cf5b3134b205030
diff --git a/vendor/bundles/Sonata/BlockBundle b/vendor/bundles/Sonata/BlockBundle
deleted file mode 160000
-Subproject c85e73cc439d98ac6415681477dfee5be40be54
diff --git a/vendor/bundles/Sonata/CacheBundle b/vendor/bundles/Sonata/CacheBundle
deleted file mode 160000
-Subproject 5b966e7350636750df7e45920acb30946415ba6
diff --git a/vendor/bundles/Sonata/DoctrineORMAdminBundle b/vendor/bundles/Sonata/DoctrineORMAdminBundle
deleted file mode 160000
-Subproject 52ce03fb45bc8271f5741736f5c8fc6ff909153
diff --git a/vendor/bundles/Sonata/jQueryBundle b/vendor/bundles/Sonata/jQueryBundle
deleted file mode 160000
-Subproject 01ffb8d1a7a4bb3971aed003e4f1ef050a0701a
diff --git a/vendor/bundles/Stof/DoctrineExtensionsBundle b/vendor/bundles/Stof/DoctrineExtensionsBundle
deleted file mode 160000
-Subproject f141a698d65271a18d86469c1f7b29d7e24170d
diff --git a/vendor/bundles/Symfony/Bundle/MonologBundle b/vendor/bundles/Symfony/Bundle/MonologBundle
deleted file mode 160000
-Subproject 51a25acc57f4c027b28f0305976b887e2da6250
diff --git a/vendor/buzz b/vendor/buzz
deleted file mode 160000
-Subproject 1bab480dfdb3e4687dcb60a76eaed5b1e59a20c
diff --git a/vendor/doctrine b/vendor/doctrine
deleted file mode 160000
-Subproject 4ef552e07a98f277c459c6afbf41a7b0958752d
diff --git a/vendor/doctrine-common b/vendor/doctrine-common
deleted file mode 160000
-Subproject 717ea940ff8fa0854e84a2249edadfb998f9140
diff --git a/vendor/doctrine-data-fixtures b/vendor/doctrine-data-fixtures
deleted file mode 160000
-Subproject f201391349f3dc6bd9c9c698927ea7c78104c46
diff --git a/vendor/doctrine-dbal b/vendor/doctrine-dbal
deleted file mode 160000
-Subproject 8fe368ea2087d3c46c85e01ac3b0155060ed273
diff --git a/vendor/doctrine-migrations b/vendor/doctrine-migrations
deleted file mode 160000
-Subproject fe98141b1e460baf5ab52f9139e1ae238101b28
diff --git a/vendor/gedmo-doctrine-extensions b/vendor/gedmo-doctrine-extensions
deleted file mode 160000
-Subproject b5f4b3e3b32beccdfed155bbf020daf99b9499f
diff --git a/vendor/knp-menu b/vendor/knp-menu
deleted file mode 160000
-Subproject 9d2d3cede51f4320f5ae9c5caa1d828a574d1ed
diff --git a/vendor/monolog b/vendor/monolog
deleted file mode 160000
-Subproject 2eb0c0978d290a1c45346a1955188929cb4e5db
diff --git a/vendor/symfony b/vendor/symfony
deleted file mode 160000
-Subproject 18132c18b41637a05a3a13990651a4054cf0ce5
diff --git a/vendor/twig b/vendor/twig
deleted file mode 160000
-Subproject 875fa010ce597edf97c04ce6490be950068e937
diff --git a/vendor/twig-extensions b/vendor/twig-extensions
deleted file mode 160000
-Subproject 446d870272cd87a720e95242eade38a2acf56ea