From 9f3d89380d34943f4aaad2d28c6f2cb31032d503 Mon Sep 17 00:00:00 2001 From: Marc Ducobu Date: Tue, 9 Sep 2014 10:46:05 +0200 Subject: [PATCH] First commit --- README.md | 170 ++ UPGRADE-2.2.md | 30 + UPGRADE-2.3.md | 52 + UPGRADE-2.4.md | 9 + UPGRADE.md | 268 +++ app/.htaccess | 7 + app/AppCache.php | 9 + app/AppKernel.php | 35 + app/Resources/views/base.html.twig | 13 + app/SymfonyRequirements.php | 707 +++++++ app/autoload.php | 13 + app/check.php | 142 ++ app/config/config.yml | 69 + app/config/config_dev.yml | 36 + app/config/config_prod.yml | 25 + app/config/config_test.yml | 16 + app/config/parameters.yml.dist | 19 + app/config/routing.yml | 4 + app/config/routing_dev.yml | 14 + app/config/security.yml | 12 + app/console | 27 + app/phpunit.xml.dist | 34 + composer.json | 60 + composer.lock | 1793 +++++++++++++++++ src/.htaccess | 7 + .../CLCustomFieldsBundle.php | 9 + .../Controller/BlopEntityController.php | 248 +++ .../Controller/CustomFieldController.php | 224 ++ .../Controller/DefaultController.php | 13 + .../CLCustomFieldsExtension.php | 28 + .../DependencyInjection/Configuration.php | 29 + .../CustomFieldsBundle/Entity/BlopEntity.php | 142 ++ .../CustomFieldsBundle/Entity/CustomField.php | 113 ++ .../Form/BlopEntityType.php | 54 + .../Form/CustomFieldType.php | 41 + .../JsonCustomFieldToArrayTransformer.php | 18 + .../Form/Type/CustomFieldType.php | 50 + .../config/doctrine/BlopEntity.orm.yml | 19 + .../config/doctrine/CustomField.orm.yml | 19 + .../Resources/config/routing.yml | 8 + .../Resources/config/routing/blopentity.yml | 38 + .../Resources/config/routing/customfield.yml | 30 + .../Resources/config/services.yml | 7 + .../Resources/views/BlopEntity/edit.html.twig | 16 + .../views/BlopEntity/index.html.twig | 45 + .../Resources/views/BlopEntity/new.html.twig | 15 + .../Resources/views/BlopEntity/show.html.twig | 40 + .../views/CustomField/edit.html.twig | 16 + .../views/CustomField/form.html.twig | 5 + .../views/CustomField/index.html.twig | 45 + .../Resources/views/CustomField/new.html.twig | 15 + .../views/CustomField/show.html.twig | 40 + .../Resources/views/Default/index.html.twig | 1 + .../Resources/views/Entity/edit.html.twig | 16 + .../Resources/views/Entity/index.html.twig | 45 + .../Resources/views/Entity/new.html.twig | 15 + .../Resources/views/Entity/show.html.twig | 40 + .../Resources/views/TestEntity/edit.html.twig | 16 + .../views/TestEntity/index.html.twig | 45 + .../Resources/views/TestEntity/new.html.twig | 15 + .../Resources/views/TestEntity/show.html.twig | 40 + .../views/TestExtraColumn/edit.html.twig | 16 + .../views/TestExtraColumn/index.html.twig | 41 + .../views/TestExtraColumn/new.html.twig | 15 + .../views/TestExtraColumn/show.html.twig | 32 + .../Controller/BlopEntityControllerTest.php | 55 + .../Controller/CustomFieldControllerTest.php | 55 + .../Controller/DefaultControllerTest.php | 17 + .../Tests/Controller/EntityControllerTest.php | 55 + .../Controller/TestEntityControllerTest.php | 55 + .../TestExtraColumnControllerTest.php | 55 + web/.htaccess | 52 + web/app.php | 29 + web/app_dev.php | 30 + web/apple-touch-icon.png | Bin 0 -> 10784 bytes web/config.php | 124 ++ web/favicon.ico | Bin 0 -> 1150 bytes web/robots.txt | 4 + 78 files changed, 5766 insertions(+) create mode 100644 README.md create mode 100644 UPGRADE-2.2.md create mode 100644 UPGRADE-2.3.md create mode 100644 UPGRADE-2.4.md create mode 100644 UPGRADE.md create mode 100644 app/.htaccess create mode 100644 app/AppCache.php create mode 100644 app/AppKernel.php create mode 100644 app/Resources/views/base.html.twig create mode 100644 app/SymfonyRequirements.php create mode 100644 app/autoload.php create mode 100644 app/check.php create mode 100644 app/config/config.yml create mode 100644 app/config/config_dev.yml create mode 100644 app/config/config_prod.yml create mode 100644 app/config/config_test.yml create mode 100644 app/config/parameters.yml.dist create mode 100644 app/config/routing.yml create mode 100644 app/config/routing_dev.yml create mode 100644 app/config/security.yml create mode 100755 app/console create mode 100644 app/phpunit.xml.dist create mode 100644 composer.json create mode 100644 composer.lock create mode 100644 src/.htaccess create mode 100644 src/CL/CustomFieldsBundle/CLCustomFieldsBundle.php create mode 100644 src/CL/CustomFieldsBundle/Controller/BlopEntityController.php create mode 100644 src/CL/CustomFieldsBundle/Controller/CustomFieldController.php create mode 100644 src/CL/CustomFieldsBundle/Controller/DefaultController.php create mode 100644 src/CL/CustomFieldsBundle/DependencyInjection/CLCustomFieldsExtension.php create mode 100644 src/CL/CustomFieldsBundle/DependencyInjection/Configuration.php create mode 100644 src/CL/CustomFieldsBundle/Entity/BlopEntity.php create mode 100644 src/CL/CustomFieldsBundle/Entity/CustomField.php create mode 100644 src/CL/CustomFieldsBundle/Form/BlopEntityType.php create mode 100644 src/CL/CustomFieldsBundle/Form/CustomFieldType.php create mode 100644 src/CL/CustomFieldsBundle/Form/DataTransformer/JsonCustomFieldToArrayTransformer.php create mode 100644 src/CL/CustomFieldsBundle/Form/Type/CustomFieldType.php create mode 100644 src/CL/CustomFieldsBundle/Resources/config/doctrine/BlopEntity.orm.yml create mode 100644 src/CL/CustomFieldsBundle/Resources/config/doctrine/CustomField.orm.yml create mode 100644 src/CL/CustomFieldsBundle/Resources/config/routing.yml create mode 100644 src/CL/CustomFieldsBundle/Resources/config/routing/blopentity.yml create mode 100644 src/CL/CustomFieldsBundle/Resources/config/routing/customfield.yml create mode 100644 src/CL/CustomFieldsBundle/Resources/config/services.yml create mode 100644 src/CL/CustomFieldsBundle/Resources/views/BlopEntity/edit.html.twig create mode 100644 src/CL/CustomFieldsBundle/Resources/views/BlopEntity/index.html.twig create mode 100644 src/CL/CustomFieldsBundle/Resources/views/BlopEntity/new.html.twig create mode 100644 src/CL/CustomFieldsBundle/Resources/views/BlopEntity/show.html.twig create mode 100644 src/CL/CustomFieldsBundle/Resources/views/CustomField/edit.html.twig create mode 100644 src/CL/CustomFieldsBundle/Resources/views/CustomField/form.html.twig create mode 100644 src/CL/CustomFieldsBundle/Resources/views/CustomField/index.html.twig create mode 100644 src/CL/CustomFieldsBundle/Resources/views/CustomField/new.html.twig create mode 100644 src/CL/CustomFieldsBundle/Resources/views/CustomField/show.html.twig create mode 100644 src/CL/CustomFieldsBundle/Resources/views/Default/index.html.twig create mode 100644 src/CL/CustomFieldsBundle/Resources/views/Entity/edit.html.twig create mode 100644 src/CL/CustomFieldsBundle/Resources/views/Entity/index.html.twig create mode 100644 src/CL/CustomFieldsBundle/Resources/views/Entity/new.html.twig create mode 100644 src/CL/CustomFieldsBundle/Resources/views/Entity/show.html.twig create mode 100644 src/CL/CustomFieldsBundle/Resources/views/TestEntity/edit.html.twig create mode 100644 src/CL/CustomFieldsBundle/Resources/views/TestEntity/index.html.twig create mode 100644 src/CL/CustomFieldsBundle/Resources/views/TestEntity/new.html.twig create mode 100644 src/CL/CustomFieldsBundle/Resources/views/TestEntity/show.html.twig create mode 100644 src/CL/CustomFieldsBundle/Resources/views/TestExtraColumn/edit.html.twig create mode 100644 src/CL/CustomFieldsBundle/Resources/views/TestExtraColumn/index.html.twig create mode 100644 src/CL/CustomFieldsBundle/Resources/views/TestExtraColumn/new.html.twig create mode 100644 src/CL/CustomFieldsBundle/Resources/views/TestExtraColumn/show.html.twig create mode 100644 src/CL/CustomFieldsBundle/Tests/Controller/BlopEntityControllerTest.php create mode 100644 src/CL/CustomFieldsBundle/Tests/Controller/CustomFieldControllerTest.php create mode 100644 src/CL/CustomFieldsBundle/Tests/Controller/DefaultControllerTest.php create mode 100644 src/CL/CustomFieldsBundle/Tests/Controller/EntityControllerTest.php create mode 100644 src/CL/CustomFieldsBundle/Tests/Controller/TestEntityControllerTest.php create mode 100644 src/CL/CustomFieldsBundle/Tests/Controller/TestExtraColumnControllerTest.php create mode 100644 web/.htaccess create mode 100644 web/app.php create mode 100644 web/app_dev.php create mode 100644 web/apple-touch-icon.png create mode 100644 web/config.php create mode 100644 web/favicon.ico create mode 100644 web/robots.txt diff --git a/README.md b/README.md new file mode 100644 index 000000000..ac829b520 --- /dev/null +++ b/README.md @@ -0,0 +1,170 @@ +Symfony Standard Edition +======================== + +Welcome to the Symfony Standard Edition - a fully-functional Symfony2 +application that you can use as the skeleton for your new applications. + +This document contains information on how to download, install, and start +using Symfony. For a more detailed explanation, see the [Installation][1] +chapter of the Symfony Documentation. + +1) Installing the Standard Edition +---------------------------------- + +When it comes to installing the Symfony Standard Edition, you have the +following options. + +### Use Composer (*recommended*) + +As Symfony uses [Composer][2] to manage its dependencies, the recommended way +to create a new project is to use it. + +If you don't have Composer yet, download it following the instructions on +http://getcomposer.org/ or just run the following command: + + curl -s http://getcomposer.org/installer | php + +Then, use the `create-project` command to generate a new Symfony application: + + php composer.phar create-project symfony/framework-standard-edition path/to/install + +Composer will install Symfony and all its dependencies under the +`path/to/install` directory. + +### Download an Archive File + +To quickly test Symfony, you can also download an [archive][3] of the Standard +Edition and unpack it somewhere under your web server root directory. + +If you downloaded an archive "without vendors", you also need to install all +the necessary dependencies. Download composer (see above) and run the +following command: + + php composer.phar install + +2) Checking your System Configuration +------------------------------------- + +Before starting coding, make sure that your local system is properly +configured for Symfony. + +Execute the `check.php` script from the command line: + + php app/check.php + +The script returns a status code of `0` if all mandatory requirements are met, +`1` otherwise. + +Access the `config.php` script from a browser: + + http://localhost/path-to-project/web/config.php + +If you get any warnings or recommendations, fix them before moving on. + +3) Browsing the Demo Application +-------------------------------- + +Congratulations! You're now ready to use Symfony. + +From the `config.php` page, click the "Bypass configuration and go to the +Welcome page" link to load up your first Symfony page. + +You can also use a web-based configurator by clicking on the "Configure your +Symfony Application online" link of the `config.php` page. + +To see a real-live Symfony page in action, access the following page: + + web/app_dev.php/demo/hello/Fabien + +4) Getting started with Symfony +------------------------------- + +This distribution is meant to be the starting point for your Symfony +applications, but it also contains some sample code that you can learn from +and play with. + +A great way to start learning Symfony is via the [Quick Tour][4], which will +take you through all the basic features of Symfony2. + +Once you're feeling good, you can move onto reading the official +[Symfony2 book][5]. + +A default bundle, `AcmeDemoBundle`, shows you Symfony2 in action. After +playing with it, you can remove it by following these steps: + + * delete the `src/Acme` directory; + + * remove the routing entry referencing AcmeDemoBundle in `app/config/routing_dev.yml`; + + * remove the AcmeDemoBundle from the registered bundles in `app/AppKernel.php`; + + * remove the `web/bundles/acmedemo` directory; + + * empty the `security.yml` file or tweak the security configuration to fit + your needs. + +What's inside? +--------------- + +The Symfony Standard Edition is configured with the following defaults: + + * Twig is the only configured template engine; + + * Doctrine ORM/DBAL is configured; + + * Swiftmailer is configured; + + * Annotations for everything are enabled. + +It comes pre-configured with the following bundles: + + * **FrameworkBundle** - The core Symfony framework bundle + + * [**SensioFrameworkExtraBundle**][6] - Adds several enhancements, including + template and routing annotation capability + + * [**DoctrineBundle**][7] - Adds support for the Doctrine ORM + + * [**TwigBundle**][8] - Adds support for the Twig templating engine + + * [**SecurityBundle**][9] - Adds security by integrating Symfony's security + component + + * [**SwiftmailerBundle**][10] - Adds support for Swiftmailer, a library for + sending emails + + * [**MonologBundle**][11] - Adds support for Monolog, a logging library + + * [**AsseticBundle**][12] - Adds support for Assetic, an asset processing + library + + * **WebProfilerBundle** (in dev/test env) - Adds profiling functionality and + the web debug toolbar + + * **SensioDistributionBundle** (in dev/test env) - Adds functionality for + configuring and working with Symfony distributions + + * [**SensioGeneratorBundle**][13] (in dev/test env) - Adds code generation + capabilities + + * **AcmeDemoBundle** (in dev/test env) - A demo bundle with some example + code + +All libraries and bundles included in the Symfony Standard Edition are +released under the MIT or BSD license. + +Enjoy! + +[1]: http://symfony.com/doc/2.4/book/installation.html +[2]: http://getcomposer.org/ +[3]: http://symfony.com/download +[4]: http://symfony.com/doc/2.4/quick_tour/the_big_picture.html +[5]: http://symfony.com/doc/2.4/index.html +[6]: http://symfony.com/doc/2.4/bundles/SensioFrameworkExtraBundle/index.html +[7]: http://symfony.com/doc/2.4/book/doctrine.html +[8]: http://symfony.com/doc/2.4/book/templating.html +[9]: http://symfony.com/doc/2.4/book/security.html +[10]: http://symfony.com/doc/2.4/cookbook/email.html +[11]: http://symfony.com/doc/2.4/cookbook/logging/monolog.html +[12]: http://symfony.com/doc/2.4/cookbook/assetic/asset_management.html +[13]: http://symfony.com/doc/2.4/bundles/SensioGeneratorBundle/index.html diff --git a/UPGRADE-2.2.md b/UPGRADE-2.2.md new file mode 100644 index 000000000..cad9eeb63 --- /dev/null +++ b/UPGRADE-2.2.md @@ -0,0 +1,30 @@ +UPGRADE FROM 2.1 to 2.2 +======================= + + * The [`web/.htaccess`](https://github.com/symfony/symfony-standard/blob/2.2/web/.htaccess) + file has been enhanced substantially to prevent duplicate content with and + without `/app.php` in the URI. It also improves functionality when using + Apache aliases or when mod_rewrite is not available. So you might want to + update your `.htaccess` file as well. + + * The ``_internal`` route is not used any more. It should then be removed + from both your routing and security configurations. A ``fragments`` key has + been added to the framework configuration and must be specified when ESI or + Hinclude are in use. No security configuration is required for this path as + by default ESI access is only permitted for trusted hosts and Hinclude + access uses an URL signing mechanism. + + ``` + framework: + # ... + fragments: { path: /_proxy } + ``` + +Functional Tests +---------------- + + * The profiler has been disabled by default in the test environment. You can + enable it again by modifying the ``config_test.yml`` configuration file or + even better, you can just enable it for the very next request by calling + ``$client->enableProfiler()`` when you need the profiler in a test (that + speeds up functional tests quite a bit). diff --git a/UPGRADE-2.3.md b/UPGRADE-2.3.md new file mode 100644 index 000000000..eb4b3ec20 --- /dev/null +++ b/UPGRADE-2.3.md @@ -0,0 +1,52 @@ +UPGRADE FROM 2.2 to 2.3 +======================= + +When upgrading Symfony from 2.2 to 2.3, you need to do the following changes +to the code that came from the Standard Edition: + + * The debugging tools are not enabled by default anymore and should be added + to the + [`web/app_dev.php`](https://github.com/symfony/symfony-standard/blob/2.3/web/app_dev.php) + front controller manually, just after including the bootstrap cache: + + use Symfony\Component\Debug\Debug; + + Debug::enable(); + + You also need to enable debugging in the + [`app/console`](https://github.com/symfony/symfony-standard/blob/2.3/app/console) + script, after the `$debug` variable is defined: + + use Symfony\Component\Debug\Debug; + + if ($debug) { + Debug::enable(); + } + + * The `parameters.yml` file can now be managed by the + `incenteev/composer-parameter-handler` bundle that comes with the 2.3 + Standard Edition: + + * add `"incenteev/composer-parameter-handler": "~2.0"` to your + `composer.json` file; + + * add `/app/config/parameters.yml` to your `.gitignore` file; + + * create a + [`app/config/parameters.yml.dist`](https://github.com/symfony/symfony-standard/blob/2.3/app/config/parameters.yml.dist) + file with sensible values for all your parameters. + + * It is highly recommended that you switch the minimum stability to `stable` + in your `composer.json` file. + + * If you are using Apache, have a look at the new + [`.htaccess`](https://github.com/symfony/symfony-standard/blob/2.3/web/.htaccess) + configuration and change yours accordingly. + + * In the + [`app/autoload.php`](https://github.com/symfony/symfony-standard/blob/2.3/app/autoload.php) + file, the section about `intl` should be removed as it is not needed anymore. + +You can also have a look at the +[diff](https://github.com/symfony/symfony-standard/compare/v2.2.0%E2%80%A62.3) +between the 2.2 version of the Standard Edition and the 2.3 version. diff --git a/UPGRADE-2.4.md b/UPGRADE-2.4.md new file mode 100644 index 000000000..a3e33954f --- /dev/null +++ b/UPGRADE-2.4.md @@ -0,0 +1,9 @@ +UPGRADE FROM 2.3 to 2.4 +======================= + +When upgrading Symfony from 2.3 to 2.4, you need to do the following changes +to the code that came from the Standard Edition: + + * We recommend to comment or remove the `firephp` and `chromephp` Monolog + handlers as they might cause issues with some configuration (`chromephp` + with Nginx for instance). diff --git a/UPGRADE.md b/UPGRADE.md new file mode 100644 index 000000000..a206d37fa --- /dev/null +++ b/UPGRADE.md @@ -0,0 +1,268 @@ +Symfony Standard Edition Upgrade +================================ + +From Symfony 2.0 to Symfony 2.1 +------------------------------- + +### Project Dependencies + +As of Symfony 2.1, project dependencies are managed by +[Composer](http://getcomposer.org/): + +* The `bin/vendors` script can be removed as `composer.phar` does all the work + now (it is recommended to install it globally on your machine). + +* The `deps` file need to be replaced with the `composer.json` one. + +* The `composer.lock` is the equivalent of the generated `deps.lock` file and + it is automatically generated by Composer. + +Download the default +[`composer.json`](https://raw.github.com/symfony/symfony-standard/2.1/composer.json) +and +[`composer.lock`](https://raw.github.com/symfony/symfony-standard/2.1/composer.lock) +files for Symfony 2.1 and put them into the main directory of your project. If +you have customized your `deps` file, move the added dependencies to the +`composer.json` file (many bundles and PHP libraries are already available as +Composer packages -- search for them on [Packagist](http://packagist.org/)). + +Remove your current `vendor` directory. + +Finally, run Composer: + + $ composer.phar install + +Note: You must complete the upgrade steps below so composer can successfully generate the autoload files. + +### `app/autoload.php` + +The default `autoload.php` reads as follows (it has been simplified a lot as +autoloading for libraries and bundles declared in your `composer.json` file is +automatically managed by the Composer autoloader): + + add('', __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs'); + } + + AnnotationRegistry::registerLoader(array($loader, 'loadClass')); + + return $loader; + +### `app/config/config.yml` + +The `framework.charset` setting must be removed. If you are not using `UTF-8` +for your application, override the `getCharset()` method in your `AppKernel` +class instead: + + class AppKernel extends Kernel + { + public function getCharset() + { + return 'ISO-8859-1'; + } + + // ... + } + +You might want to add the new `strict_requirements` parameter to +`framework.router` (it avoids fatal errors in the production environment when +a link cannot be generated): + + framework: + router: + strict_requirements: "%kernel.debug%" + +You can even disable the requirements check on production with `null` as you should +know that the parameters for URL generation always pass the requirements, e.g. by +validating them beforehand. This additionally enhances performance. See +[config_prod.yml](https://github.com/symfony/symfony-standard/blob/master/app/config/config_prod.yml). + +The `default_locale` parameter is now a setting of the main `framework` +configuration (it was under the `framework.session` in 2.0): + + framework: + default_locale: "%locale%" + +The `auto_start` setting under `framework.session` must be removed as it is +not used anymore (the session is now always started on-demand). If +`auto_start` was the only setting under the `framework.session` entry, don't +remove it entirely, but set its value to `~` (`~` means `null` in YAML) +instead: + + framework: + session: ~ + +The `trust_proxy_headers` setting was added in the default configuration file +(as it should be set to `true` when you install your application behind a +reverse proxy): + + framework: + trust_proxy_headers: false + +An empty `bundles` entry was added to the `assetic` configuration: + + assetic: + bundles: [] + +The default `swiftmailer` configuration now has the `spool` setting configured +to the `memory` type to defer email sending after the response is sent to the +user (recommended for better end-user performance): + + swiftmailer: + spool: { type: memory } + +The `jms_security_extra` configuration was moved to the `security.yml` +configuration file. + +### `app/config/config_dev.yml` + +An example of how to send all emails to a unique address was added: + + #swiftmailer: + # delivery_address: me@example.com + +### `app/config/config_test.yml` + +The `storage_id` setting must be changed to `session.storage.mock_file`: + + framework: + session: + storage_id: session.storage.mock_file + +### `app/config/parameters.ini` + +The file has been converted to a YAML file which reads as follows: + + parameters: + database_driver: pdo_mysql + database_host: localhost + database_port: ~ + database_name: symfony + database_user: root + database_password: ~ + + mailer_transport: smtp + mailer_host: localhost + mailer_user: ~ + mailer_password: ~ + + locale: en + secret: ThisTokenIsNotSoSecretChangeIt + +Note that if you convert your parameters file to YAML, you must also change +its reference in `app/config/config.yml`. + +### `app/config/routing_dev.yml` + +The `_assetic` entry was removed: + + #_assetic: + # resource: . + # type: assetic + +### `app/config/security.yml` + +Under `security.access_control`, the default rule for internal routes was changed: + + security: + access_control: + #- { path: ^/_internal/secure, roles: IS_AUTHENTICATED_ANONYMOUSLY, ip: 127.0.0.1 } + +Under `security.providers`, the `in_memory` example was updated to the following: + + security: + providers: + in_memory: + memory: + users: + user: { password: userpass, roles: [ 'ROLE_USER' ] } + admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] } + +### `app/AppKernel.php` + +The following bundles have been added to the list of default registered bundles: + + new JMS\AopBundle\JMSAopBundle(), + new JMS\DiExtraBundle\JMSDiExtraBundle($this), + +You must also rename the DoctrineBundle from: + + new Symfony\Bundle\DoctrineBundle\DoctrineBundle(), + +to: + + new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), + +### `web/app.php` + +The default `web/app.php` file now reads as follows: + + register(true); + */ + + require_once __DIR__.'/../app/AppKernel.php'; + //require_once __DIR__.'/../app/AppCache.php'; + + $kernel = new AppKernel('prod', false); + $kernel->loadClassCache(); + //$kernel = new AppCache($kernel); + $request = Request::createFromGlobals(); + $response = $kernel->handle($request); + $response->send(); + $kernel->terminate($request, $response); + +### `web/app_dev.php` + +The default `web/app_dev.php` file now reads as follows: + + loadClassCache(); + $request = Request::createFromGlobals(); + $response = $kernel->handle($request); + $response->send(); + $kernel->terminate($request, $response); diff --git a/app/.htaccess b/app/.htaccess new file mode 100644 index 000000000..fb1de45bd --- /dev/null +++ b/app/.htaccess @@ -0,0 +1,7 @@ + + Require all denied + + + Order deny,allow + Deny from all + diff --git a/app/AppCache.php b/app/AppCache.php new file mode 100644 index 000000000..ddb51db05 --- /dev/null +++ b/app/AppCache.php @@ -0,0 +1,9 @@ +getEnvironment(), array('dev', 'test'))) { + $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); + $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); + $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); + } + + return $bundles; + } + + public function registerContainerConfiguration(LoaderInterface $loader) + { + $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml'); + } +} diff --git a/app/Resources/views/base.html.twig b/app/Resources/views/base.html.twig new file mode 100644 index 000000000..bafd28d3b --- /dev/null +++ b/app/Resources/views/base.html.twig @@ -0,0 +1,13 @@ + + + + + {% block title %}Welcome!{% endblock %} + {% block stylesheets %}{% endblock %} + + + + {% block body %}{% endblock %} + {% block javascripts %}{% endblock %} + + diff --git a/app/SymfonyRequirements.php b/app/SymfonyRequirements.php new file mode 100644 index 000000000..25bc938e2 --- /dev/null +++ b/app/SymfonyRequirements.php @@ -0,0 +1,707 @@ + + * + * 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 overridden 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 + */ +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 + */ +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 %s to %s in php.ini*.', + $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 + */ +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 recommendations. + * + * @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 + * @author Fabien Potencier + */ +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 "%s", but Symfony needs at least PHP "%s" 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 http://getcomposer.org/. ' . + 'Then run "php composer.phar install" to install them.' + ); + + $cacheDir = is_dir(__DIR__.'/../var/cache') ? __DIR__.'/../var/cache' : __DIR__.'/cache'; + + $this->addRequirement( + is_writable($cacheDir), + 'app/cache/ or var/cache/ directory must be writable', + 'Change the permissions of either "app/cache/" or "var/cache/" directory so that the web server can write into it.' + ); + + $logsDir = is_dir(__DIR__.'/../var/logs') ? __DIR__.'/../var/logs' : __DIR__.'/logs'; + + $this->addRequirement( + is_writable($logsDir), + 'app/logs/ or var/logs/ directory must be writable', + 'Change the permissions of either "app/logs/" or "var/logs/" directory so that the web server can write into it.' + ); + + $this->addPhpIniRequirement( + 'date.timezone', true, false, + 'date.timezone setting must be set', + 'Set the "date.timezone" setting in php.ini* (like Europe/Paris).' + ); + + if (version_compare($installedPhpVersion, self::REQUIRED_PHP_VERSION, '>=')) { + $timezones = array(); + foreach (DateTimeZone::listAbbreviations() as $abbreviations) { + foreach ($abbreviations as $abbreviation) { + $timezones[$abbreviation['timezone_id']] = true; + } + } + + $this->addRequirement( + isset($timezones[date_default_timezone_get()]), + 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 php.ini file and have a look at the list of deprecated timezones at http://php.net/manual/en/timezones.others.php.' + ); + } + + $this->addRequirement( + function_exists('json_encode'), + 'json_encode() must be available', + 'Install and enable the JSON extension.' + ); + + $this->addRequirement( + function_exists('session_start'), + 'session_start() must be available', + 'Install and enable the session extension.' + ); + + $this->addRequirement( + function_exists('ctype_alpha'), + 'ctype_alpha() must be available', + 'Install and enable the ctype extension.' + ); + + $this->addRequirement( + function_exists('token_get_all'), + 'token_get_all() must be available', + 'Install and enable the Tokenizer extension.' + ); + + $this->addRequirement( + function_exists('simplexml_import_dom'), + 'simplexml_import_dom() must be available', + 'Install and enable the SimpleXML extension.' + ); + + if (function_exists('apc_store') && ini_get('apc.enabled')) { + if (version_compare($installedPhpVersion, '5.4.0', '>=')) { + $this->addRequirement( + version_compare(phpversion('apc'), '3.1.13', '>='), + 'APC version must be at least 3.1.13 when using PHP 5.4', + 'Upgrade your APC extension (3.1.13+).' + ); + } else { + $this->addRequirement( + version_compare(phpversion('apc'), '3.0.17', '>='), + 'APC version must be at least 3.0.17', + 'Upgrade your APC 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 "phar" to suhosin.executor.include.whitelist in php.ini*.' + ); + } + + if (extension_loaded('xdebug')) { + $this->addPhpIniRequirement( + 'xdebug.show_exception_trace', false, true + ); + + $this->addPhpIniRequirement( + 'xdebug.scream', false, true + ); + + $this->addPhpIniRecommendation( + 'xdebug.max_nesting_level', + create_function('$cfgValue', 'return $cfgValue > 100;'), + true, + 'xdebug.max_nesting_level should be above 100 in php.ini', + 'Set "xdebug.max_nesting_level" to e.g. "250" in php.ini* to stop Xdebug\'s infinite recursion protection erroneously throwing a fatal error in your project.' + ); + } + + $pcreVersion = defined('PCRE_VERSION') ? (float) PCRE_VERSION : null; + + $this->addRequirement( + null !== $pcreVersion, + 'PCRE extension must be available', + 'Install the PCRE extension (version 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( + version_compare($installedPhpVersion, '5.4.11', '>='), + 'When using the logout handler from the Symfony Security Component, you should have at least PHP 5.4.11 due to PHP bug #63379 (as a workaround, you can also set invalidate_session to false in the security logout handler configuration)', + 'Install PHP 5.4.11 or newer if your project uses the logout handler from the Symfony Security Component.' + ); + + $this->addRecommendation( + (version_compare($installedPhpVersion, '5.3.18', '>=') && version_compare($installedPhpVersion, '5.4.0', '<')) + || + version_compare($installedPhpVersion, '5.4.8', '>='), + 'You should use PHP 5.3.18+ or PHP 5.4.8+ to always get nice error messages for fatal errors in the development environment due to PHP bug #61767/#60909', + 'Install PHP 5.3.18+ or PHP 5.4.8+ if you want nice error messages for all fatal errors in the development environment.' + ); + + if (null !== $pcreVersion) { + $this->addRecommendation( + $pcreVersion >= 8.0, + sprintf('PCRE extension should be at least version 8.0 (%s installed)', $pcreVersion), + 'PCRE 8.0+ is preconfigured in PHP since 5.3.2 but you are using an outdated version of it. Symfony probably works anyway but it is recommended to upgrade your PCRE extension.' + ); + } + + $this->addRecommendation( + class_exists('DomDocument'), + 'PHP-XML module should be installed', + 'Install and enable the PHP-XML module.' + ); + + $this->addRecommendation( + function_exists('mb_strlen'), + 'mb_strlen() should be available', + 'Install and enable the mbstring extension.' + ); + + $this->addRecommendation( + function_exists('iconv'), + 'iconv() should be available', + 'Install and enable the iconv extension.' + ); + + $this->addRecommendation( + function_exists('utf8_decode'), + 'utf8_decode() should be available', + 'Install and enable the XML extension.' + ); + + $this->addRecommendation( + function_exists('filter_var'), + 'filter_var() should be available', + 'Install and enable the filter extension.' + ); + + if (!defined('PHP_WINDOWS_VERSION_BUILD')) { + $this->addRecommendation( + function_exists('posix_isatty'), + 'posix_isatty() should be available', + 'Install and enable the php_posix extension (used to colorize the CLI output).' + ); + } + + $this->addRecommendation( + class_exists('Locale'), + 'intl extension should be available', + 'Install and enable the intl 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 intl extension with a newer ICU version (4+).' + ); + } + + $accelerator = + (extension_loaded('eaccelerator') && ini_get('eaccelerator.enable')) + || + (extension_loaded('apc') && ini_get('apc.enabled')) + || + (extension_loaded('Zend Optimizer+') && ini_get('zend_optimizerplus.enable')) + || + (extension_loaded('Zend OPcache') && ini_get('opcache.enable')) + || + (extension_loaded('xcache') && ini_get('xcache.cacher')) + || + (extension_loaded('wincache') && ini_get('wincache.ocenabled')) + ; + + $this->addRecommendation( + $accelerator, + 'a PHP accelerator should be installed', + 'Install and/or enable a PHP accelerator (highly recommended).' + ); + + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + $this->addPhpIniRecommendation( + 'realpath_cache_size', + create_function('$cfgValue', 'return (int) $cfgValue > 1000;'), + false, + 'realpath_cache_size should be above 1024 in php.ini', + 'Set "realpath_cache_size" to e.g. "1024" in php.ini* to improve performance on windows.' + ); + } + + $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 PDO (mandatory for Doctrine).' + ); + + if (class_exists('PDO')) { + $drivers = PDO::getAvailableDrivers(); + $this->addRecommendation( + count($drivers) > 0, + sprintf('PDO should have some drivers installed (currently available: %s)', count($drivers) ? implode(', ', $drivers) : 'none'), + 'Install PDO drivers (mandatory for Doctrine).' + ); + } + } +} diff --git a/app/autoload.php b/app/autoload.php new file mode 100644 index 000000000..70526bb5e --- /dev/null +++ b/app/autoload.php @@ -0,0 +1,13 @@ +getPhpIniConfigPath(); + +echo_title('Symfony2 Requirements Checker'); + +echo '> PHP is using the following php.ini file:'.PHP_EOL; +if ($iniPath) { + echo_style('green', ' '.$iniPath); +} else { + echo_style('warning', ' WARNING: No configuration file (php.ini) used by PHP!'); +} + +echo PHP_EOL.PHP_EOL; + +echo '> Checking Symfony requirements:'.PHP_EOL.' '; + +$messages = array(); +foreach ($symfonyRequirements->getRequirements() as $req) { + /** @var $req Requirement */ + if ($helpText = get_error_message($req, $lineSize)) { + echo_style('red', 'E'); + $messages['error'][] = $helpText; + } else { + echo_style('green', '.'); + } +} + +$checkPassed = empty($messages['error']); + +foreach ($symfonyRequirements->getRecommendations() as $req) { + if ($helpText = get_error_message($req, $lineSize)) { + echo_style('yellow', 'W'); + $messages['warning'][] = $helpText; + } else { + echo_style('green', '.'); + } +} + +if ($checkPassed) { + echo_block('success', 'OK', 'Your system is ready to run Symfony2 projects', true); +} else { + echo_block('error', 'ERROR', 'Your system is not ready to run Symfony2 projects', true); + + echo_title('Fix the following mandatory requirements', 'red'); + + foreach ($messages['error'] as $helpText) { + echo ' * '.$helpText.PHP_EOL; + } +} + +if (!empty($messages['warning'])) { + echo_title('Optional recommendations to improve your setup', 'yellow'); + + foreach ($messages['warning'] as $helpText) { + echo ' * '.$helpText.PHP_EOL; + } +} + +echo PHP_EOL; +echo_style('title', 'Note'); +echo ' The command console could use a different php.ini file'.PHP_EOL; +echo_style('title', '~~~~'); +echo ' than the one used with your web server. To be on the'.PHP_EOL; +echo ' safe side, please check the requirements from your web'.PHP_EOL; +echo ' server using the '; +echo_style('yellow', 'web/config.php'); +echo ' script.'.PHP_EOL; +echo PHP_EOL; + +exit($checkPassed ? 0 : 1); + +function get_error_message(Requirement $requirement, $lineSize) +{ + if ($requirement->isFulfilled()) { + return; + } + + $errorMessage = wordwrap($requirement->getTestMessage(), $lineSize - 3, PHP_EOL.' ').PHP_EOL; + $errorMessage .= ' > '.wordwrap($requirement->getHelpText(), $lineSize - 5, PHP_EOL.' > ').PHP_EOL; + + return $errorMessage; +} + +function echo_title($title, $style = null) +{ + $style = $style ?: 'title'; + + echo PHP_EOL; + echo_style($style, $title.PHP_EOL); + echo_style($style, str_repeat('~', strlen($title)).PHP_EOL); + echo PHP_EOL; +} + +function echo_style($style, $message) +{ + // ANSI color codes + $styles = array( + 'reset' => "\033[0m", + 'red' => "\033[31m", + 'green' => "\033[32m", + 'yellow' => "\033[33m", + 'error' => "\033[37;41m", + 'success' => "\033[37;42m", + 'title' => "\033[34m", + ); + $supports = has_color_support(); + + echo ($supports ? $styles[$style] : '').$message.($supports ? $styles['reset'] : ''); +} + +function echo_block($style, $title, $message) +{ + $message = ' '.trim($message).' '; + $width = strlen($message); + + echo PHP_EOL.PHP_EOL; + + echo_style($style, str_repeat(' ', $width).PHP_EOL); + echo_style($style, str_pad(' ['.$title.']', $width, ' ', STR_PAD_RIGHT).PHP_EOL); + echo_style($style, str_pad($message, $width, ' ', STR_PAD_RIGHT).PHP_EOL); + echo_style($style, str_repeat(' ', $width).PHP_EOL); +} + +function has_color_support() +{ + static $support; + + if (null === $support) { + if (DIRECTORY_SEPARATOR == '\\') { + $support = false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI'); + } else { + $support = function_exists('posix_isatty') && @posix_isatty(STDOUT); + } + } + + return $support; +} diff --git a/app/config/config.yml b/app/config/config.yml new file mode 100644 index 000000000..fcfde1a6e --- /dev/null +++ b/app/config/config.yml @@ -0,0 +1,69 @@ +imports: + - { resource: parameters.yml } + - { resource: security.yml } + +framework: + #esi: ~ + #translator: { fallback: "%locale%" } + secret: "%secret%" + router: + resource: "%kernel.root_dir%/config/routing.yml" + strict_requirements: ~ + form: ~ + csrf_protection: ~ + validation: { enable_annotations: true } + templating: + engines: ['twig'] + #assets_version: SomeVersionScheme + default_locale: "%locale%" + trusted_hosts: ~ + trusted_proxies: ~ + session: + # handler_id set to null will use default session handler from php.ini + handler_id: ~ + fragments: ~ + http_method_override: true + +# Twig Configuration +twig: + debug: "%kernel.debug%" + strict_variables: "%kernel.debug%" + +# Assetic Configuration +assetic: + debug: "%kernel.debug%" + use_controller: false + bundles: [ ] + #java: /usr/bin/java + filters: + cssrewrite: ~ + #closure: + # jar: "%kernel.root_dir%/Resources/java/compiler.jar" + #yui_css: + # jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar" + +# Doctrine Configuration +doctrine: + dbal: + driver: "%database_driver%" + host: "%database_host%" + port: "%database_port%" + dbname: "%database_name%" + user: "%database_user%" + password: "%database_password%" + charset: UTF8 + # if using pdo_sqlite as your database driver, add the path in parameters.yml + # e.g. database_path: "%kernel.root_dir%/data/data.db3" + # path: "%database_path%" + + orm: + auto_generate_proxy_classes: "%kernel.debug%" + auto_mapping: true + +# Swiftmailer Configuration +swiftmailer: + transport: "%mailer_transport%" + host: "%mailer_host%" + username: "%mailer_user%" + password: "%mailer_password%" + spool: { type: memory } diff --git a/app/config/config_dev.yml b/app/config/config_dev.yml new file mode 100644 index 000000000..52b737246 --- /dev/null +++ b/app/config/config_dev.yml @@ -0,0 +1,36 @@ +imports: + - { resource: config.yml } + +framework: + router: + resource: "%kernel.root_dir%/config/routing_dev.yml" + strict_requirements: true + profiler: { only_exceptions: false } + +web_profiler: + toolbar: "%debug_toolbar%" + intercept_redirects: "%debug_redirects%" + +monolog: + handlers: + main: + type: stream + path: "%kernel.logs_dir%/%kernel.environment%.log" + level: debug + console: + type: console + bubble: false + # uncomment to get logging in your browser + # you may have to allow bigger header sizes in your Web server configuration + #firephp: + # type: firephp + # level: info + #chromephp: + # type: chromephp + # level: info + +assetic: + use_controller: "%use_assetic_controller%" + +#swiftmailer: +# delivery_address: me@example.com diff --git a/app/config/config_prod.yml b/app/config/config_prod.yml new file mode 100644 index 000000000..342837a03 --- /dev/null +++ b/app/config/config_prod.yml @@ -0,0 +1,25 @@ +imports: + - { resource: config.yml } + +#framework: +# validation: +# cache: apc + +#doctrine: +# orm: +# metadata_cache_driver: apc +# result_cache_driver: apc +# query_cache_driver: apc + +monolog: + handlers: + main: + type: fingers_crossed + action_level: error + handler: nested + nested: + type: stream + path: "%kernel.logs_dir%/%kernel.environment%.log" + level: debug + console: + type: console diff --git a/app/config/config_test.yml b/app/config/config_test.yml new file mode 100644 index 000000000..2f6d92503 --- /dev/null +++ b/app/config/config_test.yml @@ -0,0 +1,16 @@ +imports: + - { resource: config_dev.yml } + +framework: + test: ~ + session: + storage_id: session.storage.mock_file + profiler: + collect: false + +web_profiler: + toolbar: false + intercept_redirects: false + +swiftmailer: + disable_delivery: true diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist new file mode 100644 index 000000000..ebdabb5a6 --- /dev/null +++ b/app/config/parameters.yml.dist @@ -0,0 +1,19 @@ +parameters: + database_driver: pdo_mysql + database_host: 127.0.0.1 + database_port: ~ + database_name: symfony + database_user: root + database_password: ~ + + mailer_transport: smtp + mailer_host: 127.0.0.1 + mailer_user: ~ + mailer_password: ~ + + locale: en + secret: ThisTokenIsNotSoSecretChangeIt + + debug_toolbar: true + debug_redirects: false + use_assetic_controller: true diff --git a/app/config/routing.yml b/app/config/routing.yml new file mode 100644 index 000000000..593ebdda8 --- /dev/null +++ b/app/config/routing.yml @@ -0,0 +1,4 @@ +cl_custom_fields: + resource: "@CLCustomFieldsBundle/Resources/config/routing.yml" + prefix: / + diff --git a/app/config/routing_dev.yml b/app/config/routing_dev.yml new file mode 100644 index 000000000..ff93a02ba --- /dev/null +++ b/app/config/routing_dev.yml @@ -0,0 +1,14 @@ +_wdt: + resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml" + prefix: /_wdt + +_profiler: + resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml" + prefix: /_profiler + +_configurator: + resource: "@SensioDistributionBundle/Resources/config/routing/webconfigurator.xml" + prefix: /_configurator + +_main: + resource: routing.yml diff --git a/app/config/security.yml b/app/config/security.yml new file mode 100644 index 000000000..2bf63f330 --- /dev/null +++ b/app/config/security.yml @@ -0,0 +1,12 @@ +security: + providers: + in_memory: + memory: ~ + + firewalls: + dev: + pattern: ^/(_(profiler|wdt)|css|images|js)/ + security: false + + default: + anonymous: ~ diff --git a/app/console b/app/console new file mode 100755 index 000000000..fa6a36e24 --- /dev/null +++ b/app/console @@ -0,0 +1,27 @@ +#!/usr/bin/env php +getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev'); +$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(array('--no-debug', '')) && $env !== 'prod'; + +if ($debug) { + Debug::enable(); +} + +$kernel = new AppKernel($env, $debug); +$application = new Application($kernel); +$application->run($input); diff --git a/app/phpunit.xml.dist b/app/phpunit.xml.dist new file mode 100644 index 000000000..4a831565a --- /dev/null +++ b/app/phpunit.xml.dist @@ -0,0 +1,34 @@ + + + + + + + ../src/*/*Bundle/Tests + ../src/*/Bundle/*Bundle/Tests + + + + + + + + ../src + + ../src/*/*Bundle/Resources + ../src/*/*Bundle/Tests + ../src/*/Bundle/*Bundle/Resources + ../src/*/Bundle/*Bundle/Tests + + + + diff --git a/composer.json b/composer.json new file mode 100644 index 000000000..ff76f53ca --- /dev/null +++ b/composer.json @@ -0,0 +1,60 @@ +{ + "name": "symfony/framework-standard-edition", + "license": "MIT", + "type": "project", + "description": "The \"Symfony Standard Edition\" distribution", + "minimum-stability": "dev", + "autoload": { + "psr-0": { "": "src/", "SymfonyStandard": "app/" } + }, + "require": { + "php": ">=5.3.3", + "symfony/symfony": "2.5.*", + "doctrine/orm": "2.5.x-dev", + "doctrine/doctrine-bundle": "~1.2", + "twig/extensions": "~1.0", + "symfony/assetic-bundle": "~2.3", + "symfony/swiftmailer-bundle": "~2.3", + "symfony/monolog-bundle": "~2.4", + "sensio/distribution-bundle": "~3.0", + "sensio/framework-extra-bundle": "~3.0", + "incenteev/composer-parameter-handler": "~2.0" + }, + "require-dev": { + "sensio/generator-bundle": "~2.3" + }, + "scripts": { + "post-root-package-install": [ + "SymfonyStandard\\Composer::hookRootPackageInstall" + ], + "post-install-cmd": [ + "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles" + ], + "post-update-cmd": [ + "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles" + ] + }, + "config": { + "bin-dir": "bin" + }, + "extra": { + "symfony-app-dir": "app", + "symfony-web-dir": "web", + "incenteev-parameters": { + "file": "app/config/parameters.yml" + }, + "branch-alias": { + "dev-master": "2.5-dev" + } + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 000000000..5d28ff16e --- /dev/null +++ b/composer.lock @@ -0,0 +1,1793 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "hash": "6f86c5d551cb4fffc0e4261cdbf98c47", + "packages": [ + { + "name": "doctrine/annotations", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "e93f3b718c421daddff58c4a4af1aee574472cd6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/e93f3b718c421daddff58c4a4af1aee574472cd6", + "reference": "e93f3b718c421daddff58c4a4af1aee574472cd6", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "php": ">=5.3.2" + }, + "require-dev": { + "doctrine/cache": "1.*", + "phpunit/phpunit": "4.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Annotations\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "time": "2014-07-27 16:33:24" + }, + { + "name": "doctrine/cache", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/doctrine/cache.git", + "reference": "daba57d377f2620ce0355797acad538fc682e3a4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/cache/zipball/daba57d377f2620ce0355797acad538fc682e3a4", + "reference": "daba57d377f2620ce0355797acad538fc682e3a4", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "conflict": { + "doctrine/common": ">2.2,<2.4" + }, + "require-dev": { + "phpunit/phpunit": ">=3.7", + "satooshi/php-coveralls": "~0.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Cache\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Caching library offering an object-oriented API for many cache backends", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "cache", + "caching" + ], + "time": "2014-08-30 05:24:19" + }, + { + "name": "doctrine/collections", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/doctrine/collections.git", + "reference": "432240f56fbc9a811dbf1ff8a45c1a1047ba1c0a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/collections/zipball/432240f56fbc9a811dbf1ff8a45c1a1047ba1c0a", + "reference": "432240f56fbc9a811dbf1ff8a45c1a1047ba1c0a", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Collections\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Collections Abstraction library", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "array", + "collections", + "iterator" + ], + "time": "2014-07-29 20:07:28" + }, + { + "name": "doctrine/common", + "version": "2.4.x-dev", + "source": { + "type": "git", + "url": "https://github.com/doctrine/common.git", + "reference": "ae92d076442e27b6910dd86a1292a8867cf5cfe4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/common/zipball/ae92d076442e27b6910dd86a1292a8867cf5cfe4", + "reference": "ae92d076442e27b6910dd86a1292a8867cf5cfe4", + "shasum": "" + }, + "require": { + "doctrine/annotations": "1.*", + "doctrine/cache": "1.*", + "doctrine/collections": "1.*", + "doctrine/inflector": "1.*", + "doctrine/lexer": "1.*", + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~3.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com", + "homepage": "http://www.jwage.com/", + "role": "Creator" + }, + { + "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 Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh", + "role": "Developer of wrapped JMSSerializerBundle" + } + ], + "description": "Common Library for Doctrine projects", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "annotations", + "collections", + "eventmanager", + "persistence", + "spl" + ], + "time": "2014-05-21 19:29:23" + }, + { + "name": "doctrine/dbal", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/doctrine/dbal.git", + "reference": "fabf5c5316cb1fbbe2558d98e9d51454cbf05360" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/fabf5c5316cb1fbbe2558d98e9d51454cbf05360", + "reference": "fabf5c5316cb1fbbe2558d98e9d51454cbf05360", + "shasum": "" + }, + "require": { + "doctrine/common": "2.4.*", + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "4.0.*", + "symfony/console": "2.*" + }, + "suggest": { + "symfony/console": "For helpful console commands such as SQL execution and import of files." + }, + "bin": [ + "bin/doctrine-dbal" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\DBAL\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + } + ], + "description": "Database Abstraction Layer", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "database", + "dbal", + "persistence", + "queryobject" + ], + "time": "2014-09-02 10:05:11" + }, + { + "name": "doctrine/doctrine-bundle", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/doctrine/DoctrineBundle.git", + "reference": "f4672bf856259f5665e8144cddf3eb0924f23d63" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/f4672bf856259f5665e8144cddf3eb0924f23d63", + "reference": "f4672bf856259f5665e8144cddf3eb0924f23d63", + "shasum": "" + }, + "require": { + "doctrine/dbal": "~2.3", + "doctrine/doctrine-cache-bundle": "~1.0", + "jdorn/sql-formatter": "~1.1", + "php": ">=5.3.2", + "symfony/doctrine-bridge": "~2.2", + "symfony/framework-bundle": "~2.2" + }, + "require-dev": { + "doctrine/orm": "~2.3", + "phpunit/php-code-coverage": "~1.2", + "phpunit/phpunit": "~3.7", + "phpunit/phpunit-mock-objects": "~1.2", + "satooshi/php-coveralls": "~0.6.1", + "symfony/validator": "~2.2", + "symfony/yaml": "~2.2", + "twig/twig": "~1" + }, + "suggest": { + "doctrine/orm": "The Doctrine ORM integration is optional in the bundle.", + "symfony/web-profiler-bundle": "to use the data collector" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Bundle\\DoctrineBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Doctrine Project", + "homepage": "http://www.doctrine-project.org/" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony DoctrineBundle", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "database", + "dbal", + "orm", + "persistence" + ], + "time": "2014-08-26 07:35:11" + }, + { + "name": "doctrine/doctrine-cache-bundle", + "version": "dev-master", + "target-dir": "Doctrine/Bundle/DoctrineCacheBundle", + "source": { + "type": "git", + "url": "https://github.com/doctrine/DoctrineCacheBundle.git", + "reference": "03b4890d61580d1bee710445abdf158bb224b251" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/DoctrineCacheBundle/zipball/03b4890d61580d1bee710445abdf158bb224b251", + "reference": "03b4890d61580d1bee710445abdf158bb224b251", + "shasum": "" + }, + "require": { + "doctrine/cache": "~1.3", + "doctrine/inflector": "~1.0", + "php": ">=5.3.2", + "symfony/doctrine-bridge": "~2.2", + "symfony/framework-bundle": "~2.2", + "symfony/security": "~2.2" + }, + "require-dev": { + "instaclick/coding-standard": "~1.1", + "instaclick/object-calisthenics-sniffs": "dev-master", + "instaclick/symfony2-coding-standard": "dev-remaster", + "phpunit/phpunit": "~3.7", + "satooshi/php-coveralls": "~0.6.1", + "squizlabs/php_codesniffer": "dev-master", + "symfony/validator": "~2.2", + "symfony/yaml": "~2.2" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Bundle\\DoctrineCacheBundle": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Fabio B. Silva", + "email": "fabio.bat.silva@gmail.com" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@hotmail.com" + }, + { + "name": "Doctrine Project", + "homepage": "http://www.doctrine-project.org/" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony2 Bundle for Doctrine Cache", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "cache", + "caching" + ], + "time": "2014-07-30 14:46:58" + }, + { + "name": "doctrine/inflector", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "64de2fe36d578c5d5f3807ac7984547bbba5f7c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/64de2fe36d578c5d5f3807ac7984547bbba5f7c5", + "reference": "64de2fe36d578c5d5f3807ac7984547bbba5f7c5", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "4.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Inflector\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com", + "homepage": "http://www.jwage.com/", + "role": "Creator" + }, + { + "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 Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh", + "role": "Developer of wrapped JMSSerializerBundle" + } + ], + "description": "Common String Manipulations with regard to casing and singular/plural rules.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "inflection", + "pluralize", + "singularize", + "string" + ], + "time": "2014-04-23 12:36:11" + }, + { + "name": "doctrine/instantiator", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "26404e0c90565b614ee76b988b9bc8790d77f590" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/26404e0c90565b614ee76b988b9bc8790d77f590", + "reference": "26404e0c90565b614ee76b988b9bc8790d77f590", + "shasum": "" + }, + "require": { + "php": "~5.3" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "2.0.*@ALPHA" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Instantiator\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2014-08-25 15:09:25" + }, + { + "name": "doctrine/lexer", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "db77c80d33d72e33a62b80581e9d150af85de556" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/db77c80d33d72e33a62b80581e9d150af85de556", + "reference": "db77c80d33d72e33a62b80581e9d150af85de556", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Lexer\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com", + "homepage": "http://www.instaclick.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh", + "role": "Developer of wrapped JMSSerializerBundle" + } + ], + "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "lexer", + "parser" + ], + "time": "2014-06-11 23:09:27" + }, + { + "name": "doctrine/orm", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/doctrine/doctrine2.git", + "reference": "d9b43dc6492b163fc46f40c0555e2a7015ef5b68" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/d9b43dc6492b163fc46f40c0555e2a7015ef5b68", + "reference": "d9b43dc6492b163fc46f40c0555e2a7015ef5b68", + "shasum": "" + }, + "require": { + "doctrine/collections": "~1.2", + "doctrine/dbal": ">=2.5-dev,<2.6-dev", + "doctrine/instantiator": "~1.0.1", + "ext-pdo": "*", + "php": ">=5.3.2", + "symfony/console": "2.*" + }, + "require-dev": { + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master", + "symfony/yaml": "~2.1" + }, + "suggest": { + "symfony/yaml": "If you want to use YAML Metadata Mapping Driver" + }, + "bin": [ + "bin/doctrine", + "bin/doctrine.php" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\ORM\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + } + ], + "description": "Object-Relational-Mapper for PHP", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "database", + "orm" + ], + "time": "2014-08-30 02:22:47" + }, + { + "name": "incenteev/composer-parameter-handler", + "version": "dev-master", + "target-dir": "Incenteev/ParameterHandler", + "source": { + "type": "git", + "url": "https://github.com/Incenteev/ParameterHandler.git", + "reference": "ea15f3dd22e5720eec244afb9bf2d5737a0b6c76" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Incenteev/ParameterHandler/zipball/ea15f3dd22e5720eec244afb9bf2d5737a0b6c76", + "reference": "ea15f3dd22e5720eec244afb9bf2d5737a0b6c76", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/yaml": "~2.0" + }, + "require-dev": { + "composer/composer": "1.0.*@dev", + "phpspec/prophecy-phpunit": "~1.0", + "symfony/filesystem": "~2.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1.x-dev" + } + }, + "autoload": { + "psr-0": { + "Incenteev\\ParameterHandler": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christophe Coevoet", + "email": "stof@notk.org" + } + ], + "description": "Composer script handling your ignored parameter file", + "homepage": "https://github.com/Incenteev/ParameterHandler", + "keywords": [ + "parameters management" + ], + "time": "2014-08-20 22:30:03" + }, + { + "name": "jdorn/sql-formatter", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/jdorn/sql-formatter.git", + "reference": "ff0515fa8ce7d97d6cba279e8ed9d51d3eaa0316" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jdorn/sql-formatter/zipball/ff0515fa8ce7d97d6cba279e8ed9d51d3eaa0316", + "reference": "ff0515fa8ce7d97d6cba279e8ed9d51d3eaa0316", + "shasum": "" + }, + "require": { + "php": ">=5.2.4" + }, + "require-dev": { + "phpunit/phpunit": "3.7.*" + }, + "bin": [ + "bin/sql-formatter" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "lib" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeremy Dorn", + "email": "jeremy@jeremydorn.com", + "homepage": "http://jeremydorn.com/" + } + ], + "description": "a PHP SQL highlighting library", + "homepage": "https://github.com/jdorn/sql-formatter/", + "keywords": [ + "highlight", + "sql" + ], + "time": "2014-07-28 13:45:38" + }, + { + "name": "kriswallsmith/assetic", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/kriswallsmith/assetic.git", + "reference": "7c9639d93558c96ade44f60a4d201b29d68c4d7b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kriswallsmith/assetic/zipball/7c9639d93558c96ade44f60a4d201b29d68c4d7b", + "reference": "7c9639d93558c96ade44f60a4d201b29d68c4d7b", + "shasum": "" + }, + "require": { + "php": ">=5.3.1", + "symfony/process": "~2.1" + }, + "require-dev": { + "cssmin/cssmin": "*", + "joliclic/javascript-packer": "*", + "kamicane/packager": "*", + "leafo/lessphp": "*", + "leafo/scssphp": "*", + "leafo/scssphp-compass": "*", + "mrclay/minify": "*", + "patchwork/jsqueeze": "*", + "phpunit/phpunit": "~3.7", + "psr/log": "~1.0", + "ptachoire/cssembed": "*", + "twig/twig": "~1.6" + }, + "suggest": { + "leafo/lessphp": "Assetic provides the integration with the lessphp LESS compiler", + "leafo/scssphp": "Assetic provides the integration with the scssphp SCSS compiler", + "leafo/scssphp-compass": "Assetic provides the integration with the SCSS compass plugin", + "patchwork/jsqueeze": "Assetic provides the integration with the JSqueeze JavaScript compressor", + "ptachoire/cssembed": "Assetic provides the integration with phpcssembed to embed data uris", + "twig/twig": "Assetic provides the integration with the Twig templating engine" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-0": { + "Assetic": "src/" + }, + "files": [ + "src/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kris Wallsmith", + "email": "kris.wallsmith@gmail.com", + "homepage": "http://kriswallsmith.net/" + } + ], + "description": "Asset Management for PHP", + "homepage": "https://github.com/kriswallsmith/assetic", + "keywords": [ + "assets", + "compression", + "minification" + ], + "time": "2014-08-27 14:48:43" + }, + { + "name": "monolog/monolog", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "12545cda2f7a0bd82a110f742ef455fe735e60cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/12545cda2f7a0bd82a110f742ef455fe735e60cf", + "reference": "12545cda2f7a0bd82a110f742ef455fe735e60cf", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "psr/log": "~1.0" + }, + "provide": { + "psr/log-implementation": "1.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "~2.4, >2.4.8", + "doctrine/couchdb": "~1.0@dev", + "graylog2/gelf-php": "~1.0", + "phpunit/phpunit": "~3.7.0", + "raven/raven": "~0.5", + "ruflin/elastica": "0.90.*", + "videlalvaro/php-amqplib": "~2.4" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-mongo": "Allow sending log messages to a MongoDB server", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "raven/raven": "Allow sending log messages to a Sentry server", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server", + "videlalvaro/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.11.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "http://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "time": "2014-07-31 22:12:22" + }, + { + "name": "psr/log", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "a78d6504ff5d4367497785ab2ade91db3a9fbe11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/a78d6504ff5d4367497785ab2ade91db3a9fbe11", + "reference": "a78d6504ff5d4367497785ab2ade91db3a9fbe11", + "shasum": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Psr\\Log\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2014-01-18 15:33:09" + }, + { + "name": "sensio/distribution-bundle", + "version": "dev-master", + "target-dir": "Sensio/Bundle/DistributionBundle", + "source": { + "type": "git", + "url": "https://github.com/sensiolabs/SensioDistributionBundle.git", + "reference": "ad10123f2532f6e311e583cce203ef368eedc469" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/ad10123f2532f6e311e583cce203ef368eedc469", + "reference": "ad10123f2532f6e311e583cce203ef368eedc469", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sensiolabs/security-checker": "~2.0", + "symfony/class-loader": "~2.2", + "symfony/form": "~2.2", + "symfony/framework-bundle": "~2.4", + "symfony/process": "~2.2", + "symfony/validator": "~2.2", + "symfony/yaml": "~2.2" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Sensio\\Bundle\\DistributionBundle": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Base bundle for Symfony Distributions", + "keywords": [ + "configuration", + "distribution" + ], + "time": "2014-08-26 13:14:47" + }, + { + "name": "sensio/framework-extra-bundle", + "version": "dev-master", + "target-dir": "Sensio/Bundle/FrameworkExtraBundle", + "source": { + "type": "git", + "url": "https://github.com/sensiolabs/SensioFrameworkExtraBundle.git", + "reference": "9b22aaee517e80aad3238ea0328458b6f964066f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/9b22aaee517e80aad3238ea0328458b6f964066f", + "reference": "9b22aaee517e80aad3238ea0328458b6f964066f", + "shasum": "" + }, + "require": { + "doctrine/common": "~2.2", + "symfony/framework-bundle": "~2.3" + }, + "require-dev": { + "symfony/expression-language": "~2.4", + "symfony/security-bundle": "~2.4" + }, + "suggest": { + "symfony/expression-language": "", + "symfony/security-bundle": "" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Sensio\\Bundle\\FrameworkExtraBundle": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "This bundle provides a way to configure your controllers with annotations", + "keywords": [ + "annotations", + "controllers" + ], + "time": "2014-09-02 07:11:30" + }, + { + "name": "sensiolabs/security-checker", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sensiolabs/security-checker.git", + "reference": "5b4eb4743ebe68276c911c84101ecdf4a9ae76ee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/5b4eb4743ebe68276c911c84101ecdf4a9ae76ee", + "reference": "5b4eb4743ebe68276c911c84101ecdf4a9ae76ee", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "symfony/console": "~2.0" + }, + "bin": [ + "security-checker" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-0": { + "SensioLabs\\Security": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien.potencier@gmail.com" + } + ], + "description": "A security checker for your composer.lock", + "time": "2014-07-19 10:52:35" + }, + { + "name": "swiftmailer/swiftmailer", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/swiftmailer/swiftmailer.git", + "reference": "8a2bcc6045e92acfbfea252cb6b444bc8c3f171e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/8a2bcc6045e92acfbfea252cb6b444bc8c3f171e", + "reference": "8a2bcc6045e92acfbfea252cb6b444bc8c3f171e", + "shasum": "" + }, + "require": { + "php": ">=5.2.4" + }, + "require-dev": { + "mockery/mockery": "~0.9.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.2-dev" + } + }, + "autoload": { + "files": [ + "lib/swift_required.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Corbyn" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Swiftmailer, free feature-rich PHP mailer", + "homepage": "http://swiftmailer.org", + "keywords": [ + "mail", + "mailer" + ], + "time": "2014-08-27 09:29:44" + }, + { + "name": "symfony/assetic-bundle", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/AsseticBundle.git", + "reference": "02d4ba289d2e758bb69dc4d78cd4e99160673132" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/AsseticBundle/zipball/02d4ba289d2e758bb69dc4d78cd4e99160673132", + "reference": "02d4ba289d2e758bb69dc4d78cd4e99160673132", + "shasum": "" + }, + "require": { + "kriswallsmith/assetic": "~1.2", + "php": ">=5.3.0", + "symfony/framework-bundle": "~2.1" + }, + "require-dev": { + "symfony/class-loader": "~2.1", + "symfony/console": "~2.1", + "symfony/css-selector": "~2.1", + "symfony/dom-crawler": "~2.1", + "symfony/form": "~2.1", + "symfony/twig-bundle": "~2.1", + "symfony/yaml": "~2.1" + }, + "suggest": { + "kriswallsmith/spork": "v0.2", + "symfony/twig-bundle": "~2.1" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Bundle\\AsseticBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kris Wallsmith", + "email": "kris.wallsmith@gmail.com", + "homepage": "http://kriswallsmith.net/" + } + ], + "description": "Integrates Assetic into Symfony2", + "homepage": "https://github.com/symfony/AsseticBundle", + "keywords": [ + "assets", + "compression", + "minification" + ], + "time": "2014-06-30 11:57:15" + }, + { + "name": "symfony/icu", + "version": "1.2.x-dev", + "target-dir": "Symfony/Component/Icu", + "source": { + "type": "git", + "url": "https://github.com/symfony/Icu.git", + "reference": "d4d85d6055b87f394d941b45ddd3a9173e1e3d2a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Icu/zipball/d4d85d6055b87f394d941b45ddd3a9173e1e3d2a", + "reference": "d4d85d6055b87f394d941b45ddd3a9173e1e3d2a", + "shasum": "" + }, + "require": { + "ext-intl": "*", + "lib-icu": ">=4.4", + "php": ">=5.3.3", + "symfony/intl": "~2.3" + }, + "type": "library", + "autoload": { + "psr-0": { + "Symfony\\Component\\Icu\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Contains an excerpt of the ICU data and classes to load it.", + "homepage": "http://symfony.com", + "keywords": [ + "icu", + "intl" + ], + "time": "2014-07-25 09:58:17" + }, + { + "name": "symfony/monolog-bundle", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/MonologBundle.git", + "reference": "1a34465d5f33a2b559dcae7eddd1ef838114994e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/MonologBundle/zipball/1a34465d5f33a2b559dcae7eddd1ef838114994e", + "reference": "1a34465d5f33a2b559dcae7eddd1ef838114994e", + "shasum": "" + }, + "require": { + "monolog/monolog": "~1.8", + "php": ">=5.3.2", + "symfony/config": "~2.3", + "symfony/dependency-injection": "~2.3", + "symfony/http-kernel": "~2.3", + "symfony/monolog-bridge": "~2.3" + }, + "require-dev": { + "symfony/console": "~2.3", + "symfony/yaml": "~2.3" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "2.6.x-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Bundle\\MonologBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony MonologBundle", + "homepage": "http://symfony.com", + "keywords": [ + "log", + "logging" + ], + "time": "2014-08-31 13:44:52" + }, + { + "name": "symfony/swiftmailer-bundle", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/SwiftmailerBundle.git", + "reference": "bff639d4cbe9787272967f4cb3e3accdfbb2653c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/SwiftmailerBundle/zipball/bff639d4cbe9787272967f4cb3e3accdfbb2653c", + "reference": "bff639d4cbe9787272967f4cb3e3accdfbb2653c", + "shasum": "" + }, + "require": { + "php": ">=5.3.2", + "swiftmailer/swiftmailer": ">=4.2.0,~5.0", + "symfony/swiftmailer-bridge": "~2.1" + }, + "require-dev": { + "symfony/config": "~2.1", + "symfony/dependency-injection": "~2.1", + "symfony/http-kernel": "~2.1", + "symfony/yaml": "~2.1" + }, + "suggest": { + "psr/log": "Allows logging" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Bundle\\SwiftmailerBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + } + ], + "description": "Symfony SwiftmailerBundle", + "homepage": "http://symfony.com", + "time": "2014-07-09 09:12:30" + }, + { + "name": "symfony/symfony", + "version": "2.5.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/symfony.git", + "reference": "afb82e83afc94bbae81c68a64cc45a4709ca5edd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/symfony/zipball/afb82e83afc94bbae81c68a64cc45a4709ca5edd", + "reference": "afb82e83afc94bbae81c68a64cc45a4709ca5edd", + "shasum": "" + }, + "require": { + "doctrine/common": "~2.2", + "php": ">=5.3.3", + "psr/log": "~1.0", + "symfony/icu": "~1.0", + "twig/twig": "~1.12" + }, + "replace": { + "symfony/browser-kit": "self.version", + "symfony/class-loader": "self.version", + "symfony/config": "self.version", + "symfony/console": "self.version", + "symfony/css-selector": "self.version", + "symfony/debug": "self.version", + "symfony/dependency-injection": "self.version", + "symfony/doctrine-bridge": "self.version", + "symfony/dom-crawler": "self.version", + "symfony/event-dispatcher": "self.version", + "symfony/expression-language": "self.version", + "symfony/filesystem": "self.version", + "symfony/finder": "self.version", + "symfony/form": "self.version", + "symfony/framework-bundle": "self.version", + "symfony/http-foundation": "self.version", + "symfony/http-kernel": "self.version", + "symfony/intl": "self.version", + "symfony/locale": "self.version", + "symfony/monolog-bridge": "self.version", + "symfony/options-resolver": "self.version", + "symfony/process": "self.version", + "symfony/propel1-bridge": "self.version", + "symfony/property-access": "self.version", + "symfony/proxy-manager-bridge": "self.version", + "symfony/routing": "self.version", + "symfony/security": "self.version", + "symfony/security-acl": "self.version", + "symfony/security-bundle": "self.version", + "symfony/security-core": "self.version", + "symfony/security-csrf": "self.version", + "symfony/security-http": "self.version", + "symfony/serializer": "self.version", + "symfony/stopwatch": "self.version", + "symfony/swiftmailer-bridge": "self.version", + "symfony/templating": "self.version", + "symfony/translation": "self.version", + "symfony/twig-bridge": "self.version", + "symfony/twig-bundle": "self.version", + "symfony/validator": "self.version", + "symfony/web-profiler-bundle": "self.version", + "symfony/yaml": "self.version" + }, + "require-dev": { + "doctrine/data-fixtures": "1.0.*", + "doctrine/dbal": "~2.2", + "doctrine/orm": "~2.2,>=2.2.3", + "egulias/email-validator": "~1.2", + "ircmaxell/password-compat": "1.0.*", + "monolog/monolog": "~1.3", + "ocramius/proxy-manager": ">=0.3.1,<0.6-dev", + "propel/propel1": "1.6.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\": "src/" + }, + "classmap": [ + "src/Symfony/Component/HttpFoundation/Resources/stubs", + "src/Symfony/Component/Intl/Resources/stubs" + ], + "files": [ + "src/Symfony/Component/Intl/Resources/stubs/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "The Symfony PHP framework", + "homepage": "http://symfony.com", + "keywords": [ + "framework" + ], + "time": "2014-09-03 12:51:22" + }, + { + "name": "twig/extensions", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/fabpot/Twig-extensions.git", + "reference": "b092fb785ef82eb99132deadaf8ca1823a4d75dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fabpot/Twig-extensions/zipball/b092fb785ef82eb99132deadaf8ca1823a4d75dd", + "reference": "b092fb785ef82eb99132deadaf8ca1823a4d75dd", + "shasum": "" + }, + "require": { + "twig/twig": "~1.12" + }, + "require-dev": { + "symfony/translation": "~2.3" + }, + "suggest": { + "symfony/translation": "Allow the time_diff output to be translated" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-0": { + "Twig_Extensions_": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "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": [ + "i18n", + "text" + ], + "time": "2014-08-08 06:16:10" + }, + { + "name": "twig/twig", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/fabpot/Twig.git", + "reference": "084ca201a737de82323f7613665e7229789aa434" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fabpot/Twig/zipball/084ca201a737de82323f7613665e7229789aa434", + "reference": "084ca201a737de82323f7613665e7229789aa434", + "shasum": "" + }, + "require": { + "php": ">=5.2.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.16-dev" + } + }, + "autoload": { + "psr-0": { + "Twig_": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + }, + { + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "role": "Project Founder" + }, + { + "name": "Twig Team", + "homepage": "https://github.com/fabpot/Twig/graphs/contributors", + "role": "Contributors" + } + ], + "description": "Twig, the flexible, fast, and secure template language for PHP", + "homepage": "http://twig.sensiolabs.org", + "keywords": [ + "templating" + ], + "time": "2014-09-02 14:08:17" + } + ], + "packages-dev": [ + { + "name": "sensio/generator-bundle", + "version": "dev-master", + "target-dir": "Sensio/Bundle/GeneratorBundle", + "source": { + "type": "git", + "url": "https://github.com/sensiolabs/SensioGeneratorBundle.git", + "reference": "dd102e9fa7d95440ad0adaf80ee0b64b3d2cce05" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sensiolabs/SensioGeneratorBundle/zipball/dd102e9fa7d95440ad0adaf80ee0b64b3d2cce05", + "reference": "dd102e9fa7d95440ad0adaf80ee0b64b3d2cce05", + "shasum": "" + }, + "require": { + "symfony/console": "~2.0", + "symfony/framework-bundle": "~2.2" + }, + "require-dev": { + "doctrine/orm": "~2.2,>=2.2.3", + "symfony/doctrine-bridge": "~2.2", + "twig/twig": "~1.11" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "2.3.x-dev" + } + }, + "autoload": { + "psr-0": { + "Sensio\\Bundle\\GeneratorBundle": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "This bundle generates code for you", + "time": "2014-09-01 11:55:41" + } + ], + "aliases": [], + "minimum-stability": "dev", + "stability-flags": { + "doctrine/orm": 20 + }, + "prefer-stable": false, + "platform": { + "php": ">=5.3.3" + }, + "platform-dev": [] +} diff --git a/src/.htaccess b/src/.htaccess new file mode 100644 index 000000000..fb1de45bd --- /dev/null +++ b/src/.htaccess @@ -0,0 +1,7 @@ + + Require all denied + + + Order deny,allow + Deny from all + diff --git a/src/CL/CustomFieldsBundle/CLCustomFieldsBundle.php b/src/CL/CustomFieldsBundle/CLCustomFieldsBundle.php new file mode 100644 index 000000000..a1d19190e --- /dev/null +++ b/src/CL/CustomFieldsBundle/CLCustomFieldsBundle.php @@ -0,0 +1,9 @@ +getDoctrine()->getManager(); + + $entities = $em->getRepository('CLCustomFieldsBundle:BlopEntity')->findAll(); + + return $this->render('CLCustomFieldsBundle:BlopEntity:index.html.twig', array( + 'entities' => $entities, + )); + } + + public function cfSetAction($id,$key,$value) + { + $em = $this->getDoctrine()->getManager(); + $entity = $em->getRepository('CLCustomFieldsBundle:BlopEntity')->find($id); + echo $entity->cfSet($key,$value); + var_dump($entity->getCustomField()); + $em->persist($entity); + $em->flush(); + return null;//$entity->cfSet($key,$value); + } + + public function cfGetAction($id,$key) + { + $em = $this->getDoctrine()->getManager(); + $entity = $em->getRepository('CLCustomFieldsBundle:BlopEntity')->find($id); + echo $entity->cfGet($key); + return null;//return $entity->cfGet($key); + } + + /** + * Creates a new BlopEntity entity. + * + */ + public function createAction(Request $request) + { + $entity = new BlopEntity(); + $form = $this->createCreateForm($entity); + $form->handleRequest($request); + + if ($form->isValid()) { + $em = $this->getDoctrine()->getManager(); + $em->persist($entity); + $em->flush(); + + return $this->redirect($this->generateUrl('blopentity_show', array('id' => $entity->getId()))); + } + + return $this->render('CLCustomFieldsBundle:BlopEntity:new.html.twig', array( + 'entity' => $entity, + 'form' => $form->createView(), + )); + } + + /** + * Creates a form to create a BlopEntity entity. + * + * @param BlopEntity $entity The entity + * + * @return \Symfony\Component\Form\Form The form + */ + private function createCreateForm(BlopEntity $entity) + { + $form = $this->createForm(new BlopEntityType(), $entity, array( + 'action' => $this->generateUrl('blopentity_create'), + 'method' => 'POST', + 'em' => $this->getDoctrine()->getManager(), + )); + + + + $form->add('submit', 'submit', array('label' => 'Create')); + + return $form; + } + + /** + * Displays a form to create a new BlopEntity entity. + * + */ + public function newAction() + { + $entity = new BlopEntity(); + $form = $this->createCreateForm($entity); + + return $this->render('CLCustomFieldsBundle:BlopEntity:new.html.twig', array( + 'entity' => $entity, + 'form' => $form->createView(), + )); + } + + /** + * Finds and displays a BlopEntity entity. + * + */ + public function showAction($id) + { + $em = $this->getDoctrine()->getManager(); + + $entity = $em->getRepository('CLCustomFieldsBundle:BlopEntity')->find($id); + + if (!$entity) { + throw $this->createNotFoundException('Unable to find BlopEntity entity.'); + } + + $deleteForm = $this->createDeleteForm($id); + + return $this->render('CLCustomFieldsBundle:BlopEntity:show.html.twig', array( + 'entity' => $entity, + 'delete_form' => $deleteForm->createView(), + )); + } + + /** + * Displays a form to edit an existing BlopEntity entity. + * + */ + public function editAction($id) + { + $em = $this->getDoctrine()->getManager(); + + $entity = $em->getRepository('CLCustomFieldsBundle:BlopEntity')->find($id); + + if (!$entity) { + throw $this->createNotFoundException('Unable to find BlopEntity entity.'); + } + + $editForm = $this->createEditForm($entity); + $deleteForm = $this->createDeleteForm($id); + + return $this->render('CLCustomFieldsBundle:BlopEntity:edit.html.twig', array( + 'entity' => $entity, + 'edit_form' => $editForm->createView(), + 'delete_form' => $deleteForm->createView(), + )); + } + + /** + * Creates a form to edit a BlopEntity entity. + * + * @param BlopEntity $entity The entity + * + * @return \Symfony\Component\Form\Form The form + */ + private function createEditForm(BlopEntity $entity) + { + $form = $this->createForm(new BlopEntityType(), $entity, array( + 'action' => $this->generateUrl('blopentity_update', array('id' => $entity->getId())), + 'method' => 'PUT', + 'em' => $this->getDoctrine()->getManager(), + )); + + $form->add('submit', 'submit', array('label' => 'Update')); + + return $form; + } + /** + * Edits an existing BlopEntity entity. + * + */ + public function updateAction(Request $request, $id) + { + $em = $this->getDoctrine()->getManager(); + + $entity = $em->getRepository('CLCustomFieldsBundle:BlopEntity')->find($id); + + if (!$entity) { + throw $this->createNotFoundException('Unable to find BlopEntity entity.'); + } + + $deleteForm = $this->createDeleteForm($id); + $editForm = $this->createEditForm($entity); + $editForm->handleRequest($request); + + if ($editForm->isValid()) { + $em->flush(); + + return $this->redirect($this->generateUrl('blopentity_edit', array('id' => $id))); + } + + return $this->render('CLCustomFieldsBundle:BlopEntity:edit.html.twig', array( + 'entity' => $entity, + 'edit_form' => $editForm->createView(), + 'delete_form' => $deleteForm->createView(), + )); + } + /** + * Deletes a BlopEntity entity. + * + */ + public function deleteAction(Request $request, $id) + { + $form = $this->createDeleteForm($id); + $form->handleRequest($request); + + if ($form->isValid()) { + $em = $this->getDoctrine()->getManager(); + $entity = $em->getRepository('CLCustomFieldsBundle:BlopEntity')->find($id); + + if (!$entity) { + throw $this->createNotFoundException('Unable to find BlopEntity entity.'); + } + + $em->remove($entity); + $em->flush(); + } + + return $this->redirect($this->generateUrl('blopentity')); + } + + /** + * Creates a form to delete a BlopEntity entity by id. + * + * @param mixed $id The entity id + * + * @return \Symfony\Component\Form\Form The form + */ + private function createDeleteForm($id) + { + return $this->createFormBuilder() + ->setAction($this->generateUrl('blopentity_delete', array('id' => $id))) + ->setMethod('DELETE') + ->add('submit', 'submit', array('label' => 'Delete')) + ->getForm() + ; + } +} diff --git a/src/CL/CustomFieldsBundle/Controller/CustomFieldController.php b/src/CL/CustomFieldsBundle/Controller/CustomFieldController.php new file mode 100644 index 000000000..3df531544 --- /dev/null +++ b/src/CL/CustomFieldsBundle/Controller/CustomFieldController.php @@ -0,0 +1,224 @@ +getDoctrine()->getManager(); + + $entities = $em->getRepository('CLCustomFieldsBundle:CustomField')->findAll(); + + return $this->render('CLCustomFieldsBundle:CustomField:index.html.twig', array( + 'entities' => $entities, + )); + } + /** + * Creates a new CustomField entity. + * + */ + public function createAction(Request $request) + { + $entity = new CustomField(); + $form = $this->createCreateForm($entity); + $form->handleRequest($request); + + if ($form->isValid()) { + $em = $this->getDoctrine()->getManager(); + $em->persist($entity); + $em->flush(); + + return $this->redirect($this->generateUrl('customfield_show', array('id' => $entity->getId()))); + } + + return $this->render('CLCustomFieldsBundle:CustomField:new.html.twig', array( + 'entity' => $entity, + 'form' => $form->createView(), + )); + } + + /** + * Creates a form to create a CustomField entity. + * + * @param CustomField $entity The entity + * + * @return \Symfony\Component\Form\Form The form + */ + private function createCreateForm(CustomField $entity) + { + $form = $this->createForm(new CustomFieldType(), $entity, array( + 'action' => $this->generateUrl('customfield_create'), + 'method' => 'POST', + )); + + $form->add('submit', 'submit', array('label' => 'Create')); + + return $form; + } + + /** + * Displays a form to create a new CustomField entity. + * + */ + public function newAction() + { + $entity = new CustomField(); + $form = $this->createCreateForm($entity); + + return $this->render('CLCustomFieldsBundle:CustomField:new.html.twig', array( + 'entity' => $entity, + 'form' => $form->createView(), + )); + } + + /** + * Finds and displays a CustomField entity. + * + */ + public function showAction($id) + { + $em = $this->getDoctrine()->getManager(); + + $entity = $em->getRepository('CLCustomFieldsBundle:CustomField')->find($id); + + if (!$entity) { + throw $this->createNotFoundException('Unable to find CustomField entity.'); + } + + $deleteForm = $this->createDeleteForm($id); + + return $this->render('CLCustomFieldsBundle:CustomField:show.html.twig', array( + 'entity' => $entity, + 'delete_form' => $deleteForm->createView(), + )); + } + + /** + * Displays a form to edit an existing CustomField entity. + * + */ + public function editAction($id) + { + $em = $this->getDoctrine()->getManager(); + + $entity = $em->getRepository('CLCustomFieldsBundle:CustomField')->find($id); + + if (!$entity) { + throw $this->createNotFoundException('Unable to find CustomField entity.'); + } + + $editForm = $this->createEditForm($entity); + $deleteForm = $this->createDeleteForm($id); + + return $this->render('CLCustomFieldsBundle:CustomField:edit.html.twig', array( + 'entity' => $entity, + 'edit_form' => $editForm->createView(), + 'delete_form' => $deleteForm->createView(), + )); + } + + /** + * Creates a form to edit a CustomField entity. + * + * @param CustomField $entity The entity + * + * @return \Symfony\Component\Form\Form The form + */ + private function createEditForm(CustomField $entity) + { + $form = $this->createForm(new CustomFieldType(), $entity, array( + 'action' => $this->generateUrl('customfield_update', array('id' => $entity->getId())), + 'method' => 'PUT', + )); + + $form->add('submit', 'submit', array('label' => 'Update')); + + return $form; + } + /** + * Edits an existing CustomField entity. + * + */ + public function updateAction(Request $request, $id) + { + $em = $this->getDoctrine()->getManager(); + + $entity = $em->getRepository('CLCustomFieldsBundle:CustomField')->find($id); + + if (!$entity) { + throw $this->createNotFoundException('Unable to find CustomField entity.'); + } + + $deleteForm = $this->createDeleteForm($id); + $editForm = $this->createEditForm($entity); + $editForm->handleRequest($request); + + if ($editForm->isValid()) { + $em->flush(); + + return $this->redirect($this->generateUrl('customfield_edit', array('id' => $id))); + } + + return $this->render('CLCustomFieldsBundle:CustomField:edit.html.twig', array( + 'entity' => $entity, + 'edit_form' => $editForm->createView(), + 'delete_form' => $deleteForm->createView(), + )); + } + /** + * Deletes a CustomField entity. + * + */ + public function deleteAction(Request $request, $id) + { + $form = $this->createDeleteForm($id); + $form->handleRequest($request); + + if ($form->isValid()) { + $em = $this->getDoctrine()->getManager(); + $entity = $em->getRepository('CLCustomFieldsBundle:CustomField')->find($id); + + if (!$entity) { + throw $this->createNotFoundException('Unable to find CustomField entity.'); + } + + $em->remove($entity); + $em->flush(); + } + + return $this->redirect($this->generateUrl('customfield')); + } + + /** + * Creates a form to delete a CustomField entity by id. + * + * @param mixed $id The entity id + * + * @return \Symfony\Component\Form\Form The form + */ + private function createDeleteForm($id) + { + return $this->createFormBuilder() + ->setAction($this->generateUrl('customfield_delete', array('id' => $id))) + ->setMethod('DELETE') + ->add('submit', 'submit', array('label' => 'Delete')) + ->getForm() + ; + } +} diff --git a/src/CL/CustomFieldsBundle/Controller/DefaultController.php b/src/CL/CustomFieldsBundle/Controller/DefaultController.php new file mode 100644 index 000000000..111631032 --- /dev/null +++ b/src/CL/CustomFieldsBundle/Controller/DefaultController.php @@ -0,0 +1,13 @@ +render('CLCustomFieldsBundle:Default:index.html.twig', array('name' => $name)); + } +} diff --git a/src/CL/CustomFieldsBundle/DependencyInjection/CLCustomFieldsExtension.php b/src/CL/CustomFieldsBundle/DependencyInjection/CLCustomFieldsExtension.php new file mode 100644 index 000000000..dc19e7a77 --- /dev/null +++ b/src/CL/CustomFieldsBundle/DependencyInjection/CLCustomFieldsExtension.php @@ -0,0 +1,28 @@ +processConfiguration($configuration, $configs); + + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); + $loader->load('services.yml'); + } +} diff --git a/src/CL/CustomFieldsBundle/DependencyInjection/Configuration.php b/src/CL/CustomFieldsBundle/DependencyInjection/Configuration.php new file mode 100644 index 000000000..0bbd92503 --- /dev/null +++ b/src/CL/CustomFieldsBundle/DependencyInjection/Configuration.php @@ -0,0 +1,29 @@ +root('cl_custom_fields'); + + // Here you should define the parameters that are allowed to + // configure your bundle. See the documentation linked above for + // more information on that topic. + + return $treeBuilder; + } +} diff --git a/src/CL/CustomFieldsBundle/Entity/BlopEntity.php b/src/CL/CustomFieldsBundle/Entity/BlopEntity.php new file mode 100644 index 000000000..bbd6324c7 --- /dev/null +++ b/src/CL/CustomFieldsBundle/Entity/BlopEntity.php @@ -0,0 +1,142 @@ +id; + } + + /** + * Set field1 + * + * @param string $field1 + * + * @return BlopEntity + */ + public function setField1($field1) + { + $this->field1 = $field1; + + return $this; + } + + /** + * Get field1 + * + * @return string + */ + public function getField1() + { + return $this->field1; + } + + /** + * Set field2 + * + * @param string $field2 + * + * @return BlopEntity + */ + public function setField2($field2) + { + $this->field2 = $field2; + + return $this; + } + + /** + * Get field2 + * + * @return string + */ + public function getField2() + { + return $this->field2; + } + + /** + * Set customField + * + * @param array $customField + * + * @return BlopEntity + */ + public function setCustomField($customField) + { + $this->customField = $customField; + + return $this; + } + + /** + * Get customField + * + * @return array + */ + public function getCustomField() + { + return $this->customField; + } + + public function cfGet($key) + { + echo "
-1-
"; + echo gettype($this->customField); + echo "
-2-
"; + echo $this->customField; + echo "
-3-
"; + var_dump(json_decode($this->customField)); + echo "
-4-
"; + echo json_last_error_msg(); + + $customFieldArray = json_decode($this->customField, true); + + if(array_key_exists($key, $customFieldArray)) { + return $customFieldArray[$key]; + } else { + return null; + } + } + + public function cfSet($key, $value) + { + echo "-"; + $customFieldArray = json_decode($this->customField, true); + $customFieldArray[$key] = $value; + $this->setCustomField(json_encode($customFieldArray)); + var_dump($customFieldArray); + } +} + diff --git a/src/CL/CustomFieldsBundle/Entity/CustomField.php b/src/CL/CustomFieldsBundle/Entity/CustomField.php new file mode 100644 index 000000000..524d3f71d --- /dev/null +++ b/src/CL/CustomFieldsBundle/Entity/CustomField.php @@ -0,0 +1,113 @@ +id; + } + + /** + * Set label + * + * @param string $label + * + * @return CustomField + */ + public function setLabel($label) + { + $this->label = $label; + + return $this; + } + + /** + * Get label + * + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Set type + * + * @param string $type + * + * @return CustomField + */ + public function setType($type) + { + $this->type = $type; + + return $this; + } + + /** + * Get type + * + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Set active + * + * @param boolean $active + * + * @return CustomField + */ + public function setActive($active) + { + $this->active = $active; + + return $this; + } + + /** + * Get active + * + * @return boolean + */ + public function getActive() + { + return $this->active; + } +} + diff --git a/src/CL/CustomFieldsBundle/Form/BlopEntityType.php b/src/CL/CustomFieldsBundle/Form/BlopEntityType.php new file mode 100644 index 000000000..ea38d1dc6 --- /dev/null +++ b/src/CL/CustomFieldsBundle/Form/BlopEntityType.php @@ -0,0 +1,54 @@ +add('field1') + ->add('field2') + ->add('customField',new CustomFieldType($entityManager)) + ; + } + + /** + * @param OptionsResolverInterface $resolver + */ + public function setDefaultOptions(OptionsResolverInterface $resolver) + { + $resolver->setDefaults(array( + 'data_class' => 'CL\CustomFieldsBundle\Entity\BlopEntity' + )); + + // supprimer ça en definissant dans services + $resolver->setRequired(array( + 'em', + )); + + $resolver->setAllowedTypes(array( + 'em' => 'Doctrine\Common\Persistence\ObjectManager', + )); + + } + + /** + * @return string + */ + public function getName() + { + return 'cl_customfieldsbundle_blopentity'; + } +} diff --git a/src/CL/CustomFieldsBundle/Form/CustomFieldType.php b/src/CL/CustomFieldsBundle/Form/CustomFieldType.php new file mode 100644 index 000000000..2f2e6b339 --- /dev/null +++ b/src/CL/CustomFieldsBundle/Form/CustomFieldType.php @@ -0,0 +1,41 @@ +add('label') + ->add('type') + ->add('active') + ; + } + + /** + * @param OptionsResolverInterface $resolver + */ + public function setDefaultOptions(OptionsResolverInterface $resolver) + { + $resolver->setDefaults(array( + 'data_class' => 'CL\CustomFieldsBundle\Entity\CustomField' + )); + } + + /** + * @return string + */ + public function getName() + { + return 'cl_customfieldsbundle_customfield'; + } +} diff --git a/src/CL/CustomFieldsBundle/Form/DataTransformer/JsonCustomFieldToArrayTransformer.php b/src/CL/CustomFieldsBundle/Form/DataTransformer/JsonCustomFieldToArrayTransformer.php new file mode 100644 index 000000000..14097e1cc --- /dev/null +++ b/src/CL/CustomFieldsBundle/Form/DataTransformer/JsonCustomFieldToArrayTransformer.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace CL\CustomFieldsBundle\Form\Type; + +use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\FormBuilderInterface; +use CL\CustomFieldsBundle\Form\DataTransformer\JsonCustomFieldToArrayTransformer; +use Doctrine\Common\Persistence\ObjectManager; + +class CustomFieldType extends AbstractType +{ + /** + * @var ObjectManager + */ + private $om; + + /** + * @param ObjectManager $om + */ + public function __construct(ObjectManager $om) + { + $this->om = $om; + } + + public function buildForm(FormBuilderInterface $builder, array $options) + { + $customFields = $this->om + ->getRepository('CLCustomFieldsBundle:CustomField') + ->findAll(); + + foreach ($customFields as $cf) { + $builder->add($cf->getLabel(), $cf->getType()); + } + $builder->addViewTransformer(new JsonCustomFieldToArrayTransformer()); + } + + public function getName() + { + return 'custom_field'; + } +} \ No newline at end of file diff --git a/src/CL/CustomFieldsBundle/Resources/config/doctrine/BlopEntity.orm.yml b/src/CL/CustomFieldsBundle/Resources/config/doctrine/BlopEntity.orm.yml new file mode 100644 index 000000000..edba3af69 --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/config/doctrine/BlopEntity.orm.yml @@ -0,0 +1,19 @@ +CL\CustomFieldsBundle\Entity\BlopEntity: + type: entity + table: blop_entity + id: + id: + type: integer + id: true + generator: + strategy: AUTO + fields: + field1: + type: string + length: 255 + field2: + type: string + length: 255 + customField: + type: json_array + lifecycleCallbacks: { } diff --git a/src/CL/CustomFieldsBundle/Resources/config/doctrine/CustomField.orm.yml b/src/CL/CustomFieldsBundle/Resources/config/doctrine/CustomField.orm.yml new file mode 100644 index 000000000..55e238dcd --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/config/doctrine/CustomField.orm.yml @@ -0,0 +1,19 @@ +CL\CustomFieldsBundle\Entity\CustomField: + type: entity + table: null + id: + id: + type: integer + id: true + generator: + strategy: AUTO + fields: + label: + type: string + length: 255 + type: + type: string + length: 255 + active: + type: boolean + lifecycleCallbacks: { } diff --git a/src/CL/CustomFieldsBundle/Resources/config/routing.yml b/src/CL/CustomFieldsBundle/Resources/config/routing.yml new file mode 100644 index 000000000..2c158cc05 --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/config/routing.yml @@ -0,0 +1,8 @@ +cl_custom_fields_customfield: + resource: "@CLCustomFieldsBundle/Resources/config/routing/customfield.yml" + prefix: /customfield + +cl_custom_fields_blopentity: + resource: "@CLCustomFieldsBundle/Resources/config/routing/blopentity.yml" + prefix: / + diff --git a/src/CL/CustomFieldsBundle/Resources/config/routing/blopentity.yml b/src/CL/CustomFieldsBundle/Resources/config/routing/blopentity.yml new file mode 100644 index 000000000..696095e6f --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/config/routing/blopentity.yml @@ -0,0 +1,38 @@ +blopentity: + path: / + defaults: { _controller: "CLCustomFieldsBundle:BlopEntity:index" } + +blopentity_show: + path: /{id}/show + defaults: { _controller: "CLCustomFieldsBundle:BlopEntity:show" } + +blopentity_new: + path: /new + defaults: { _controller: "CLCustomFieldsBundle:BlopEntity:new" } + +blopentity_create: + path: /create + defaults: { _controller: "CLCustomFieldsBundle:BlopEntity:create" } + requirements: { _method: post } + +blopentity_edit: + path: /{id}/edit + defaults: { _controller: "CLCustomFieldsBundle:BlopEntity:edit" } + +blopentity_update: + path: /{id}/update + defaults: { _controller: "CLCustomFieldsBundle:BlopEntity:update" } + requirements: { _method: post|put } + +blopentity_delete: + path: /{id}/delete + defaults: { _controller: "CLCustomFieldsBundle:BlopEntity:delete" } + requirements: { _method: post|delete } + +blopentity_cfget: + path: /{id}/cfget/{key} + defaults: { _controller: "CLCustomFieldsBundle:BlopEntity:cfGet" } + +blopentity_cfset: + path: /{id}/cfset/{key}/{value} + defaults: { _controller: "CLCustomFieldsBundle:BlopEntity:cfSet" } \ No newline at end of file diff --git a/src/CL/CustomFieldsBundle/Resources/config/routing/customfield.yml b/src/CL/CustomFieldsBundle/Resources/config/routing/customfield.yml new file mode 100644 index 000000000..c1d128c3d --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/config/routing/customfield.yml @@ -0,0 +1,30 @@ +customfield: + path: / + defaults: { _controller: "CLCustomFieldsBundle:CustomField:index" } + +customfield_show: + path: /{id}/show + defaults: { _controller: "CLCustomFieldsBundle:CustomField:show" } + +customfield_new: + path: /new + defaults: { _controller: "CLCustomFieldsBundle:CustomField:new" } + +customfield_create: + path: /create + defaults: { _controller: "CLCustomFieldsBundle:CustomField:create" } + requirements: { _method: post } + +customfield_edit: + path: /{id}/edit + defaults: { _controller: "CLCustomFieldsBundle:CustomField:edit" } + +customfield_update: + path: /{id}/update + defaults: { _controller: "CLCustomFieldsBundle:CustomField:update" } + requirements: { _method: post|put } + +customfield_delete: + path: /{id}/delete + defaults: { _controller: "CLCustomFieldsBundle:CustomField:delete" } + requirements: { _method: post|delete } diff --git a/src/CL/CustomFieldsBundle/Resources/config/services.yml b/src/CL/CustomFieldsBundle/Resources/config/services.yml new file mode 100644 index 000000000..a033f9c55 --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/config/services.yml @@ -0,0 +1,7 @@ +parameters: +# cl_custom_fields.example.class: CL\CustomFieldsBundle\Example + +services: +# cl_custom_fields.example: +# class: %cl_custom_fields.example.class% +# arguments: [@service_id, "plain_value", %parameter%] diff --git a/src/CL/CustomFieldsBundle/Resources/views/BlopEntity/edit.html.twig b/src/CL/CustomFieldsBundle/Resources/views/BlopEntity/edit.html.twig new file mode 100644 index 000000000..1e842fc8c --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/views/BlopEntity/edit.html.twig @@ -0,0 +1,16 @@ +{% extends '::base.html.twig' %} + +{% block body -%} +

BlopEntity edit

+ + {{ form(edit_form) }} + + +{% endblock %} diff --git a/src/CL/CustomFieldsBundle/Resources/views/BlopEntity/index.html.twig b/src/CL/CustomFieldsBundle/Resources/views/BlopEntity/index.html.twig new file mode 100644 index 000000000..438f8890f --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/views/BlopEntity/index.html.twig @@ -0,0 +1,45 @@ +{% extends '::base.html.twig' %} + +{% block body -%} +

BlopEntity list

+ + + + + + + + + + + + + {% for entity in entities %} + + + + + + + + {% endfor %} + +
IdField1Field2CustomfieldActions
{{ entity.id }}{{ entity.field1 }}{{ entity.field2 }}{{ entity.customField }} + +
+ + + {% endblock %} diff --git a/src/CL/CustomFieldsBundle/Resources/views/BlopEntity/new.html.twig b/src/CL/CustomFieldsBundle/Resources/views/BlopEntity/new.html.twig new file mode 100644 index 000000000..9d9d15292 --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/views/BlopEntity/new.html.twig @@ -0,0 +1,15 @@ +{% extends '::base.html.twig' %} + +{% block body -%} +

BlopEntity creation

+ + {{ form(form) }} + + +{% endblock %} diff --git a/src/CL/CustomFieldsBundle/Resources/views/BlopEntity/show.html.twig b/src/CL/CustomFieldsBundle/Resources/views/BlopEntity/show.html.twig new file mode 100644 index 000000000..a5978c07a --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/views/BlopEntity/show.html.twig @@ -0,0 +1,40 @@ +{% extends '::base.html.twig' %} + +{% block body -%} +

BlopEntity

+ + + + + + + + + + + + + + + + + + + + +
Id{{ entity.id }}
Field1{{ entity.field1 }}
Field2{{ entity.field2 }}
Customfield{{ entity.customField }}
+ + +{% endblock %} diff --git a/src/CL/CustomFieldsBundle/Resources/views/CustomField/edit.html.twig b/src/CL/CustomFieldsBundle/Resources/views/CustomField/edit.html.twig new file mode 100644 index 000000000..bfbe14f58 --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/views/CustomField/edit.html.twig @@ -0,0 +1,16 @@ +{% extends '::base.html.twig' %} + +{% block body -%} +

CustomField edit

+ + {{ form(edit_form) }} + + +{% endblock %} diff --git a/src/CL/CustomFieldsBundle/Resources/views/CustomField/form.html.twig b/src/CL/CustomFieldsBundle/Resources/views/CustomField/form.html.twig new file mode 100644 index 000000000..efa52428d --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/views/CustomField/form.html.twig @@ -0,0 +1,5 @@ +{% extends '::base.html.twig' %} + +{% block body -%} + {{ form(form) }} +{% endblock %} diff --git a/src/CL/CustomFieldsBundle/Resources/views/CustomField/index.html.twig b/src/CL/CustomFieldsBundle/Resources/views/CustomField/index.html.twig new file mode 100644 index 000000000..f084ed9f6 --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/views/CustomField/index.html.twig @@ -0,0 +1,45 @@ +{% extends '::base.html.twig' %} + +{% block body -%} +

CustomField list

+ + + + + + + + + + + + + {% for entity in entities %} + + + + + + + + {% endfor %} + +
IdLabelTypeActiveActions
{{ entity.id }}{{ entity.label }}{{ entity.type }}{{ entity.active }} + +
+ + + {% endblock %} diff --git a/src/CL/CustomFieldsBundle/Resources/views/CustomField/new.html.twig b/src/CL/CustomFieldsBundle/Resources/views/CustomField/new.html.twig new file mode 100644 index 000000000..2661a94cd --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/views/CustomField/new.html.twig @@ -0,0 +1,15 @@ +{% extends '::base.html.twig' %} + +{% block body -%} +

CustomField creation

+ + {{ form(form) }} + + +{% endblock %} diff --git a/src/CL/CustomFieldsBundle/Resources/views/CustomField/show.html.twig b/src/CL/CustomFieldsBundle/Resources/views/CustomField/show.html.twig new file mode 100644 index 000000000..b1cea0b3d --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/views/CustomField/show.html.twig @@ -0,0 +1,40 @@ +{% extends '::base.html.twig' %} + +{% block body -%} +

CustomField

+ + + + + + + + + + + + + + + + + + + + +
Id{{ entity.id }}
Label{{ entity.label }}
Type{{ entity.type }}
Active{{ entity.active }}
+ + +{% endblock %} diff --git a/src/CL/CustomFieldsBundle/Resources/views/Default/index.html.twig b/src/CL/CustomFieldsBundle/Resources/views/Default/index.html.twig new file mode 100644 index 000000000..4ce626e9b --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/views/Default/index.html.twig @@ -0,0 +1 @@ +Hello {{ name }}! diff --git a/src/CL/CustomFieldsBundle/Resources/views/Entity/edit.html.twig b/src/CL/CustomFieldsBundle/Resources/views/Entity/edit.html.twig new file mode 100644 index 000000000..0376acef2 --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/views/Entity/edit.html.twig @@ -0,0 +1,16 @@ +{% extends '::base.html.twig' %} + +{% block body -%} +

Entity edit

+ + {{ form(edit_form) }} + + +{% endblock %} diff --git a/src/CL/CustomFieldsBundle/Resources/views/Entity/index.html.twig b/src/CL/CustomFieldsBundle/Resources/views/Entity/index.html.twig new file mode 100644 index 000000000..9c9c55093 --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/views/Entity/index.html.twig @@ -0,0 +1,45 @@ +{% extends '::base.html.twig' %} + +{% block body -%} +

Entity list

+ + + + + + + + + + + + + {% for entity in entities %} + + + + + + + + {% endfor %} + +
IdField1Field2CustomfieldsActions
{{ entity.id }}{{ entity.field1 }}{{ entity.field2 }}{{ entity.customFields }} + +
+ + + {% endblock %} diff --git a/src/CL/CustomFieldsBundle/Resources/views/Entity/new.html.twig b/src/CL/CustomFieldsBundle/Resources/views/Entity/new.html.twig new file mode 100644 index 000000000..cee1c0b8e --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/views/Entity/new.html.twig @@ -0,0 +1,15 @@ +{% extends '::base.html.twig' %} + +{% block body -%} +

Entity creation

+ + {{ form(form) }} + + +{% endblock %} diff --git a/src/CL/CustomFieldsBundle/Resources/views/Entity/show.html.twig b/src/CL/CustomFieldsBundle/Resources/views/Entity/show.html.twig new file mode 100644 index 000000000..3ed82f14a --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/views/Entity/show.html.twig @@ -0,0 +1,40 @@ +{% extends '::base.html.twig' %} + +{% block body -%} +

Entity

+ + + + + + + + + + + + + + + + + + + + +
Id{{ entity.id }}
Field1{{ entity.field1 }}
Field2{{ entity.field2 }}
Customfields{{ entity.customFields }}
+ + +{% endblock %} diff --git a/src/CL/CustomFieldsBundle/Resources/views/TestEntity/edit.html.twig b/src/CL/CustomFieldsBundle/Resources/views/TestEntity/edit.html.twig new file mode 100644 index 000000000..2cac0777d --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/views/TestEntity/edit.html.twig @@ -0,0 +1,16 @@ +{% extends '::base.html.twig' %} + +{% block body -%} +

TestEntity edit

+ + {{ form(edit_form) }} + + +{% endblock %} diff --git a/src/CL/CustomFieldsBundle/Resources/views/TestEntity/index.html.twig b/src/CL/CustomFieldsBundle/Resources/views/TestEntity/index.html.twig new file mode 100644 index 000000000..d5f7e5359 --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/views/TestEntity/index.html.twig @@ -0,0 +1,45 @@ +{% extends '::base.html.twig' %} + +{% block body -%} +

TestEntity list

+ + + + + + + + + + + + + {% for entity in entities %} + + + + + + + + {% endfor %} + +
IdField1Field2CustomfieldsActions
{{ entity.id }}{{ entity.field1 }}{{ entity.field2 }}{{ entity.customFields }} + +
+ + + {% endblock %} diff --git a/src/CL/CustomFieldsBundle/Resources/views/TestEntity/new.html.twig b/src/CL/CustomFieldsBundle/Resources/views/TestEntity/new.html.twig new file mode 100644 index 000000000..d17621c81 --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/views/TestEntity/new.html.twig @@ -0,0 +1,15 @@ +{% extends '::base.html.twig' %} + +{% block body -%} +

TestEntity creation

+ + {{ form(form) }} + + +{% endblock %} diff --git a/src/CL/CustomFieldsBundle/Resources/views/TestEntity/show.html.twig b/src/CL/CustomFieldsBundle/Resources/views/TestEntity/show.html.twig new file mode 100644 index 000000000..d03ebfb22 --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/views/TestEntity/show.html.twig @@ -0,0 +1,40 @@ +{% extends '::base.html.twig' %} + +{% block body -%} +

TestEntity

+ + + + + + + + + + + + + + + + + + + + +
Id{{ entity.id }}
Field1{{ entity.field1 }}
Field2{{ entity.field2 }}
Customfields{{ entity.customFields }}
+ + +{% endblock %} diff --git a/src/CL/CustomFieldsBundle/Resources/views/TestExtraColumn/edit.html.twig b/src/CL/CustomFieldsBundle/Resources/views/TestExtraColumn/edit.html.twig new file mode 100644 index 000000000..144c0e5a9 --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/views/TestExtraColumn/edit.html.twig @@ -0,0 +1,16 @@ +{% extends '::base.html.twig' %} + +{% block body -%} +

TestExtraColumn edit

+ + {{ form(edit_form) }} + + +{% endblock %} diff --git a/src/CL/CustomFieldsBundle/Resources/views/TestExtraColumn/index.html.twig b/src/CL/CustomFieldsBundle/Resources/views/TestExtraColumn/index.html.twig new file mode 100644 index 000000000..97c61931e --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/views/TestExtraColumn/index.html.twig @@ -0,0 +1,41 @@ +{% extends '::base.html.twig' %} + +{% block body -%} +

TestExtraColumn list

+ + + + + + + + + + + {% for entity in entities %} + + + + + + {% endfor %} + +
IdNameActions
{{ entity.id }}{{ entity.name }} + +
+ + + {% endblock %} diff --git a/src/CL/CustomFieldsBundle/Resources/views/TestExtraColumn/new.html.twig b/src/CL/CustomFieldsBundle/Resources/views/TestExtraColumn/new.html.twig new file mode 100644 index 000000000..3d79e65e3 --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/views/TestExtraColumn/new.html.twig @@ -0,0 +1,15 @@ +{% extends '::base.html.twig' %} + +{% block body -%} +

TestExtraColumn creation

+ + {{ form(form) }} + + +{% endblock %} diff --git a/src/CL/CustomFieldsBundle/Resources/views/TestExtraColumn/show.html.twig b/src/CL/CustomFieldsBundle/Resources/views/TestExtraColumn/show.html.twig new file mode 100644 index 000000000..1e1c570a4 --- /dev/null +++ b/src/CL/CustomFieldsBundle/Resources/views/TestExtraColumn/show.html.twig @@ -0,0 +1,32 @@ +{% extends '::base.html.twig' %} + +{% block body -%} +

TestExtraColumn

+ + + + + + + + + + + + +
Id{{ entity.id }}
Name{{ entity.name }}
+ + +{% endblock %} diff --git a/src/CL/CustomFieldsBundle/Tests/Controller/BlopEntityControllerTest.php b/src/CL/CustomFieldsBundle/Tests/Controller/BlopEntityControllerTest.php new file mode 100644 index 000000000..e9271ae96 --- /dev/null +++ b/src/CL/CustomFieldsBundle/Tests/Controller/BlopEntityControllerTest.php @@ -0,0 +1,55 @@ +request('GET', '/blopentity/'); + $this->assertEquals(200, $client->getResponse()->getStatusCode(), "Unexpected HTTP status code for GET /blopentity/"); + $crawler = $client->click($crawler->selectLink('Create a new entry')->link()); + + // Fill in the form and submit it + $form = $crawler->selectButton('Create')->form(array( + 'cl_customfieldsbundle_blopentity[field_name]' => 'Test', + // ... other fields to fill + )); + + $client->submit($form); + $crawler = $client->followRedirect(); + + // Check data in the show view + $this->assertGreaterThan(0, $crawler->filter('td:contains("Test")')->count(), 'Missing element td:contains("Test")'); + + // Edit the entity + $crawler = $client->click($crawler->selectLink('Edit')->link()); + + $form = $crawler->selectButton('Update')->form(array( + 'cl_customfieldsbundle_blopentity[field_name]' => 'Foo', + // ... other fields to fill + )); + + $client->submit($form); + $crawler = $client->followRedirect(); + + // Check the element contains an attribute with value equals "Foo" + $this->assertGreaterThan(0, $crawler->filter('[value="Foo"]')->count(), 'Missing element [value="Foo"]'); + + // Delete the entity + $client->submit($crawler->selectButton('Delete')->form()); + $crawler = $client->followRedirect(); + + // Check the entity has been delete on the list + $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent()); + } + + */ +} diff --git a/src/CL/CustomFieldsBundle/Tests/Controller/CustomFieldControllerTest.php b/src/CL/CustomFieldsBundle/Tests/Controller/CustomFieldControllerTest.php new file mode 100644 index 000000000..787e63236 --- /dev/null +++ b/src/CL/CustomFieldsBundle/Tests/Controller/CustomFieldControllerTest.php @@ -0,0 +1,55 @@ +request('GET', '/customfield/'); + $this->assertEquals(200, $client->getResponse()->getStatusCode(), "Unexpected HTTP status code for GET /customfield/"); + $crawler = $client->click($crawler->selectLink('Create a new entry')->link()); + + // Fill in the form and submit it + $form = $crawler->selectButton('Create')->form(array( + 'cl_customfieldsbundle_customfield[field_name]' => 'Test', + // ... other fields to fill + )); + + $client->submit($form); + $crawler = $client->followRedirect(); + + // Check data in the show view + $this->assertGreaterThan(0, $crawler->filter('td:contains("Test")')->count(), 'Missing element td:contains("Test")'); + + // Edit the entity + $crawler = $client->click($crawler->selectLink('Edit')->link()); + + $form = $crawler->selectButton('Update')->form(array( + 'cl_customfieldsbundle_customfield[field_name]' => 'Foo', + // ... other fields to fill + )); + + $client->submit($form); + $crawler = $client->followRedirect(); + + // Check the element contains an attribute with value equals "Foo" + $this->assertGreaterThan(0, $crawler->filter('[value="Foo"]')->count(), 'Missing element [value="Foo"]'); + + // Delete the entity + $client->submit($crawler->selectButton('Delete')->form()); + $crawler = $client->followRedirect(); + + // Check the entity has been delete on the list + $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent()); + } + + */ +} diff --git a/src/CL/CustomFieldsBundle/Tests/Controller/DefaultControllerTest.php b/src/CL/CustomFieldsBundle/Tests/Controller/DefaultControllerTest.php new file mode 100644 index 000000000..1e61605f7 --- /dev/null +++ b/src/CL/CustomFieldsBundle/Tests/Controller/DefaultControllerTest.php @@ -0,0 +1,17 @@ +request('GET', '/hello/Fabien'); + + $this->assertTrue($crawler->filter('html:contains("Hello Fabien")')->count() > 0); + } +} diff --git a/src/CL/CustomFieldsBundle/Tests/Controller/EntityControllerTest.php b/src/CL/CustomFieldsBundle/Tests/Controller/EntityControllerTest.php new file mode 100644 index 000000000..bb0cdaa02 --- /dev/null +++ b/src/CL/CustomFieldsBundle/Tests/Controller/EntityControllerTest.php @@ -0,0 +1,55 @@ +request('GET', '/entity/'); + $this->assertEquals(200, $client->getResponse()->getStatusCode(), "Unexpected HTTP status code for GET /entity/"); + $crawler = $client->click($crawler->selectLink('Create a new entry')->link()); + + // Fill in the form and submit it + $form = $crawler->selectButton('Create')->form(array( + 'cl_customfieldsbundle_entity[field_name]' => 'Test', + // ... other fields to fill + )); + + $client->submit($form); + $crawler = $client->followRedirect(); + + // Check data in the show view + $this->assertGreaterThan(0, $crawler->filter('td:contains("Test")')->count(), 'Missing element td:contains("Test")'); + + // Edit the entity + $crawler = $client->click($crawler->selectLink('Edit')->link()); + + $form = $crawler->selectButton('Update')->form(array( + 'cl_customfieldsbundle_entity[field_name]' => 'Foo', + // ... other fields to fill + )); + + $client->submit($form); + $crawler = $client->followRedirect(); + + // Check the element contains an attribute with value equals "Foo" + $this->assertGreaterThan(0, $crawler->filter('[value="Foo"]')->count(), 'Missing element [value="Foo"]'); + + // Delete the entity + $client->submit($crawler->selectButton('Delete')->form()); + $crawler = $client->followRedirect(); + + // Check the entity has been delete on the list + $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent()); + } + + */ +} diff --git a/src/CL/CustomFieldsBundle/Tests/Controller/TestEntityControllerTest.php b/src/CL/CustomFieldsBundle/Tests/Controller/TestEntityControllerTest.php new file mode 100644 index 000000000..196c5aff6 --- /dev/null +++ b/src/CL/CustomFieldsBundle/Tests/Controller/TestEntityControllerTest.php @@ -0,0 +1,55 @@ +request('GET', '/testentity/'); + $this->assertEquals(200, $client->getResponse()->getStatusCode(), "Unexpected HTTP status code for GET /testentity/"); + $crawler = $client->click($crawler->selectLink('Create a new entry')->link()); + + // Fill in the form and submit it + $form = $crawler->selectButton('Create')->form(array( + 'cl_customfieldsbundle_testentity[field_name]' => 'Test', + // ... other fields to fill + )); + + $client->submit($form); + $crawler = $client->followRedirect(); + + // Check data in the show view + $this->assertGreaterThan(0, $crawler->filter('td:contains("Test")')->count(), 'Missing element td:contains("Test")'); + + // Edit the entity + $crawler = $client->click($crawler->selectLink('Edit')->link()); + + $form = $crawler->selectButton('Update')->form(array( + 'cl_customfieldsbundle_testentity[field_name]' => 'Foo', + // ... other fields to fill + )); + + $client->submit($form); + $crawler = $client->followRedirect(); + + // Check the element contains an attribute with value equals "Foo" + $this->assertGreaterThan(0, $crawler->filter('[value="Foo"]')->count(), 'Missing element [value="Foo"]'); + + // Delete the entity + $client->submit($crawler->selectButton('Delete')->form()); + $crawler = $client->followRedirect(); + + // Check the entity has been delete on the list + $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent()); + } + + */ +} diff --git a/src/CL/CustomFieldsBundle/Tests/Controller/TestExtraColumnControllerTest.php b/src/CL/CustomFieldsBundle/Tests/Controller/TestExtraColumnControllerTest.php new file mode 100644 index 000000000..9da60bc9c --- /dev/null +++ b/src/CL/CustomFieldsBundle/Tests/Controller/TestExtraColumnControllerTest.php @@ -0,0 +1,55 @@ +request('GET', '/testextracolumn/'); + $this->assertEquals(200, $client->getResponse()->getStatusCode(), "Unexpected HTTP status code for GET /testextracolumn/"); + $crawler = $client->click($crawler->selectLink('Create a new entry')->link()); + + // Fill in the form and submit it + $form = $crawler->selectButton('Create')->form(array( + 'cl_customfieldsbundle_testextracolumn[field_name]' => 'Test', + // ... other fields to fill + )); + + $client->submit($form); + $crawler = $client->followRedirect(); + + // Check data in the show view + $this->assertGreaterThan(0, $crawler->filter('td:contains("Test")')->count(), 'Missing element td:contains("Test")'); + + // Edit the entity + $crawler = $client->click($crawler->selectLink('Edit')->link()); + + $form = $crawler->selectButton('Update')->form(array( + 'cl_customfieldsbundle_testextracolumn[field_name]' => 'Foo', + // ... other fields to fill + )); + + $client->submit($form); + $crawler = $client->followRedirect(); + + // Check the element contains an attribute with value equals "Foo" + $this->assertGreaterThan(0, $crawler->filter('[value="Foo"]')->count(), 'Missing element [value="Foo"]'); + + // Delete the entity + $client->submit($crawler->selectButton('Delete')->form()); + $crawler = $client->followRedirect(); + + // Check the entity has been delete on the list + $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent()); + } + + */ +} diff --git a/web/.htaccess b/web/.htaccess new file mode 100644 index 000000000..0c5f37def --- /dev/null +++ b/web/.htaccess @@ -0,0 +1,52 @@ +# Use the front controller as index file. It serves as a fallback solution when +# every other rewrite/redirect fails (e.g. in an aliased environment without +# mod_rewrite). Additionally, this reduces the matching process for the +# start page (path "/") because otherwise Apache will apply the rewriting rules +# to each configured DirectoryIndex file (e.g. index.php, index.html, index.pl). +DirectoryIndex app.php + + + RewriteEngine On + + # Determine the RewriteBase automatically and set it as environment variable. + # If you are using Apache aliases to do mass virtual hosting or installed the + # project in a subdirectory, the base path will be prepended to allow proper + # resolution of the app.php file and to redirect to the correct URI. It will + # work in environments without path prefix as well, providing a safe, one-size + # fits all solution. But as you do not need it in this case, you can comment + # the following 2 lines to eliminate the overhead. + RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$ + RewriteRule ^(.*) - [E=BASE:%1] + + # Redirect to URI without front controller to prevent duplicate content + # (with and without `/app.php`). Only do this redirect on the initial + # rewrite by Apache and not on subsequent cycles. Otherwise we would get an + # endless redirect loop (request -> rewrite to front controller -> + # redirect -> request -> ...). + # So in case you get a "too many redirects" error or you always get redirected + # to the start page because your Apache does not expose the REDIRECT_STATUS + # environment variable, you have 2 choices: + # - disable this feature by commenting the following 2 lines or + # - use Apache >= 2.3.9 and replace all L flags by END flags and remove the + # following RewriteCond (best solution) + RewriteCond %{ENV:REDIRECT_STATUS} ^$ + RewriteRule ^app\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L] + + # If the requested filename exists, simply serve it. + # We only want to let Apache serve files and not directories. + RewriteCond %{REQUEST_FILENAME} -f + RewriteRule .? - [L] + + # Rewrite all other queries to the front controller. + RewriteRule .? %{ENV:BASE}/app.php [L] + + + + + # When mod_rewrite is not available, we instruct a temporary redirect of + # the start page to the front controller explicitly so that the website + # and the generated links can still be used. + RedirectMatch 302 ^/$ /app.php/ + # RedirectTemp cannot be used instead + + diff --git a/web/app.php b/web/app.php new file mode 100644 index 000000000..4f591c107 --- /dev/null +++ b/web/app.php @@ -0,0 +1,29 @@ +unregister(); +$apcLoader->register(true); +*/ + +require_once __DIR__.'/../app/AppKernel.php'; +//require_once __DIR__.'/../app/AppCache.php'; + +$kernel = new AppKernel('prod', false); +$kernel->loadClassCache(); +//$kernel = new AppCache($kernel); + +// When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter +//Request::enableHttpMethodParameterOverride(); +$request = Request::createFromGlobals(); +$response = $kernel->handle($request); +$response->send(); +$kernel->terminate($request, $response); diff --git a/web/app_dev.php b/web/app_dev.php new file mode 100644 index 000000000..e0279c2ae --- /dev/null +++ b/web/app_dev.php @@ -0,0 +1,30 @@ +loadClassCache(); +$request = Request::createFromGlobals(); +$response = $kernel->handle($request); +$response->send(); +$kernel->terminate($request, $response); diff --git a/web/apple-touch-icon.png b/web/apple-touch-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..11f17e6d89ee3b416218ede42b66ec1dd81507f2 GIT binary patch literal 10784 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 f!getFailedRequirements(); +$minorProblems = $symfonyRequirements->getFailedRecommendations(); + +?> + + + + + + Symfony Configuration + + + + + +
+
+ + + +
+ +
+
+
+

Welcome!

+

Welcome to your new Symfony project.

+

+ This script will guide you through the basic configuration of your project. + You can also do the same by editing the ‘app/config/parameters.yml’ file directly. +

+ + +

Major problems

+

Major problems have been detected and must be fixed before continuing:

+
    + +
  1. getHelpHtml() ?>
  2. + +
+ + + +

Recommendations

+

+ Additionally, toTo enhance your Symfony experience, + it’s recommended that you fix the following: +

+
    + +
  1. getHelpHtml() ?>
  2. + +
+ + + hasPhpIniConfigIssue()): ?> +

* + getPhpIniConfigPath()): ?> + Changes to the php.ini file must be done in "getPhpIniConfigPath() ?>". + + To change settings, create a "php.ini". + +

+ + + +

Your configuration looks good to run Symfony.

+ + + +
+
+
+
Symfony Standard Edition
+
+ + diff --git a/web/favicon.ico b/web/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..864803618e0888f8463c0b30038633c018f939cc GIT binary patch literal 1150 zcmaizUr1AN6vuy3^oL%AsH~?RBQobI=ccaNk~J)QQD?41%~lUl4?1&O#PTUgotA-9 zsDZB9Dx!CTsTlUUw?V5x4YK5>5M*n+r|-FL<1!X8KKK0Y+4-K|Ip_DgLX_ZFS}O27 zD6VZ4Vy_V55P%DwO+Snf_;2^FO_X=lLt9ZPzz)z@c~ldI{Q@#slCUp96W9qfs%tQ*oXL6(4`+eocJ>~>XTi!Tx6`NE0#k>{2Oo} ztK9}W2EBZ;)|i=(L{i>6UU}sHFa>93DOU?()OGNh>)?K^U==8P)fsB(g!Z`H)Oe2K zAL8V3c}P=UQK;p237iK()-qO$m3q1_)5Uf>)l?g3abZDzzr3uhc^8WX1k|b(vZuwUYd`2nOcXxJ?f6`A^uQ+Js>k0*)1Z4Ms zn^LJ1IeVQ{e)veSS*BUf_2AsdWHfQT>0~mg)MIP0(fZmtg+pPwU~40@=~Q74tpCV* z?ho@%#bU9aI76NxIeHwFNF*?aMWwIcY>?`WCUqU3p`BrU7P-H#KQlGy-*EQ!{qC?| zBHyTwqR}XwX|T}E>o*E#8G_CNzUOjq9hiOEpwp*$E~o3w^mcAenG2uk(7mCIUZ>~% zB=me1mhaCn;Cq#;BX2o}t+|y3?+$Lc6{R^^&pjZF^ literal 0 HcmV?d00001 diff --git a/web/robots.txt b/web/robots.txt new file mode 100644 index 000000000..214e41196 --- /dev/null +++ b/web/robots.txt @@ -0,0 +1,4 @@ +# www.robotstxt.org/ +# www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449 + +User-agent: *