Symfony upgrade to 2.1-RC2
Signed-off-by: Gergely POLONKAI (W00d5t0ck) <polesz@w00d5t0ck.info>
This commit is contained in:
		
							
								
								
									
										34
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										34
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1 +1,33 @@ | ||||
| .*.sw? | ||||
| # Bootstrap | ||||
| app/bootstrap* | ||||
| app/SymfonyRequirements.php | ||||
|  | ||||
| # Symfony directories | ||||
| vendor/* | ||||
| app/logs/* | ||||
| app/cache/* | ||||
| web/uploads/* | ||||
| web/bundles/* | ||||
|  | ||||
| # Configuration files | ||||
| app/config/parameters.ini | ||||
|  | ||||
| # Composer related files | ||||
| composer.lock | ||||
| vendor/composer/installed.json | ||||
|  | ||||
| # Assetic-generated .js and .css files | ||||
| web/js/* | ||||
| web/css/* | ||||
|  | ||||
| # Project's upload directory | ||||
| web/upload/* | ||||
|  | ||||
| # Spool directory | ||||
| spool/* | ||||
|  | ||||
| # Backup files | ||||
| *~ | ||||
|  | ||||
| #NetBeans private files | ||||
| /nbproject/private/ | ||||
|   | ||||
							
								
								
									
										51
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										51
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							| @@ -1,51 +0,0 @@ | ||||
| [submodule "vendor/symfony"] | ||||
| 	path = vendor/symfony | ||||
| 	url = http://github.com/symfony/symfony.git | ||||
| [submodule "vendor/twig"] | ||||
| 	path = vendor/twig | ||||
| 	url = http://github.com/fabpot/Twig.git | ||||
| [submodule "vendor/monolog"] | ||||
| 	path = vendor/monolog | ||||
| 	url = http://github.com/Seldaek/monolog.git | ||||
| [submodule "vendor/doctrine-common"] | ||||
| 	path = vendor/doctrine-common | ||||
| 	url = http://github.com/doctrine/common.git | ||||
| [submodule "vendor/doctrine-dbal"] | ||||
| 	path = vendor/doctrine-dbal | ||||
| 	url = http://github.com/doctrine/dbal.git | ||||
| [submodule "vendor/doctrine"] | ||||
| 	path = vendor/doctrine | ||||
| 	url = http://github.com/doctrine/doctrine2.git | ||||
| [submodule "vendor/swiftmailer"] | ||||
| 	path = vendor/swiftmailer | ||||
| 	url = http://github.com/swiftmailer/swiftmailer.git | ||||
| [submodule "vendor/assetic"] | ||||
| 	path = vendor/assetic | ||||
| 	url = http://github.com/kriswallsmith/assetic.git | ||||
| [submodule "vendor/twig-extensions"] | ||||
| 	path = vendor/twig-extensions | ||||
| 	url = http://github.com/fabpot/Twig-extensions.git | ||||
| [submodule "vendor/metadata"] | ||||
| 	path = vendor/metadata | ||||
| 	url = http://github.com/schmittjoh/metadata.git | ||||
| [submodule "vendor/bundles/Sensio/Bundle/FrameworkExtraBundle"] | ||||
| 	path = vendor/bundles/Sensio/Bundle/FrameworkExtraBundle | ||||
| 	url = http://github.com/sensio/SensioFrameworkExtraBundle.git | ||||
| [submodule "vendor/bundles/JMS/SecurityExtraBundle"] | ||||
| 	path = vendor/bundles/JMS/SecurityExtraBundle | ||||
| 	url = http://github.com/schmittjoh/JMSSecurityExtraBundle.git | ||||
| [submodule "vendor/bundles/Sensio/Bundle/DistributionBundle"] | ||||
| 	path = vendor/bundles/Sensio/Bundle/DistributionBundle | ||||
| 	url = http://github.com/sensio/SensioDistributionBundle.git | ||||
| [submodule "vendor/bundles/Sensio/Bundle/GeneratorBundle"] | ||||
| 	path = vendor/bundles/Sensio/Bundle/GeneratorBundle | ||||
| 	url = http://github.com/sensio/SensioGeneratorBundle.git | ||||
| [submodule "vendor/bundles/Symfony/Bundle/AsseticBundle"] | ||||
| 	path = vendor/bundles/Symfony/Bundle/AsseticBundle | ||||
| 	url = http://github.com/symfony/AsseticBundle.git | ||||
| [submodule "vendor/tcpdf"] | ||||
| 	path = vendor/tcpdf | ||||
| 	url = git://tcpdf.git.sourceforge.net/gitroot/tcpdf/tcpdf | ||||
| [submodule "vendor/bundles/Io/TcpdfBundle"] | ||||
| 	path = vendor/bundles/Io/TcpdfBundle | ||||
| 	url = git://github.com/ioalessio/IoTcpdfBundle.git | ||||
							
								
								
									
										223
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										223
									
								
								README.md
									
									
									
									
									
								
							| @@ -2,146 +2,173 @@ Symfony Standard Edition | ||||
| ======================== | ||||
|  | ||||
| Welcome to the Symfony Standard Edition - a fully-functional Symfony2 | ||||
| application that you can use as the skeleton for your new app. If you want | ||||
| to learn more about the features included, see the "What's Inside?" section. | ||||
| application that you can use as the skeleton for your new applications. | ||||
|  | ||||
| This document contains information on how to download and start using Symfony. | ||||
| For a more detailed explanation, see the | ||||
| [Installation chapter](http://symfony.com/doc/current/book/installation.html) | ||||
| of the Symfony Documentation. | ||||
| 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) Download the Standard Edition | ||||
| -------------------------------- | ||||
| 1) Installing the Standard Edition | ||||
| ---------------------------------- | ||||
|  | ||||
| If you've already downloaded the standard edition, and unpacked it somewhere | ||||
| within your web root directory, then move on to the "Installation" section. | ||||
| When it comes to installing the Symfony Standard Edition, you have the | ||||
| following options. | ||||
|  | ||||
| To download the standard edition, you have two options: | ||||
| ### Use Composer (*recommended*) | ||||
|  | ||||
| ### Download an archive file (*recommended*) | ||||
| As Symfony uses [Composer][2] to manage its dependencies, the recommended way | ||||
| to create a new project is to use it. | ||||
|  | ||||
| The easiest way to get started is to download an archive of the standard edition | ||||
| (http://symfony.com/download). Unpack it somewhere under your web server root | ||||
| directory and you're done. The web root is wherever your web server (e.g. Apache) | ||||
| looks when you access `http://localhost` in a browser. | ||||
| If you don't have Composer yet, download it following the instructions on | ||||
| http://getcomposer.org/ or just run the following command: | ||||
|  | ||||
| ### Clone the git Repository | ||||
|     curl -s http://getcomposer.org/installer | php | ||||
|  | ||||
| We highly recommend that you download the packaged version of this distribution. | ||||
| But if you still want to use Git, you are on your own. | ||||
| Then, use the `create-project` command to generate a new Symfony application: | ||||
|  | ||||
| Run the following commands: | ||||
|     php composer.phar create-project symfony/framework-standard-edition path/to/install | ||||
|  | ||||
|     git clone http://github.com/symfony/symfony-standard.git | ||||
|     cd symfony-standard | ||||
|     rm -rf .git | ||||
| Composer will install Symfony and all its dependencies under the | ||||
| `path/to/install` directory. | ||||
|  | ||||
| 2) Installation | ||||
| --------------- | ||||
| ### Download an Archive File | ||||
|  | ||||
| Once you've downloaded the standard edition, installation is easy, and basically | ||||
| involves making sure your system is ready for Symfony. | ||||
| 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. | ||||
|  | ||||
| ### a) Check your System Configuration | ||||
| 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: | ||||
|  | ||||
| Before you begin, make sure that your local system is properly configured | ||||
| for Symfony. To do this, execute the following: | ||||
|     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 | ||||
|  | ||||
| If you get any warnings or recommendations, fix these now before moving on. | ||||
| Access the `config.php` script from a browser: | ||||
|  | ||||
| ### b) Install the Vendor Libraries | ||||
|     http://localhost/path/to/symfony/app/web/config.php | ||||
|  | ||||
| If you downloaded the archive "without vendors" or installed via git, then | ||||
| you need to download all of the necessary vendor libraries. If you're not | ||||
| sure if you need to do this, check to see if you have a ``vendor/`` directory. | ||||
| If you don't, or if that directory is empty, run the following: | ||||
| If you get any warnings or recommendations, fix them before moving on. | ||||
|  | ||||
|     php bin/vendors install | ||||
| 3) Browsing the Demo Application | ||||
| -------------------------------- | ||||
|  | ||||
| Note that you **must** have git installed and be able to execute the `git` | ||||
| command to execute this script. If you don't have git available, either install | ||||
| it or download Symfony with the vendor libraries already included. | ||||
| Congratulations! You're now ready to use Symfony. | ||||
|  | ||||
| ### c) Access the Application via the Browser | ||||
|  | ||||
| Congratulations! You're now ready to use Symfony. If you've unzipped Symfony | ||||
| in the web root of your computer, then you should be able to access the | ||||
| web version of the Symfony requirements check via: | ||||
|  | ||||
|     http://localhost/Symfony/web/config.php | ||||
|  | ||||
| If everything looks good, click the "Bypass configuration and go to the Welcome page" | ||||
| link to load up your first Symfony page. | ||||
| 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. | ||||
| 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 | ||||
|  | ||||
| 3) Learn about Symfony! | ||||
| ----------------------- | ||||
| 4) Getting started with Symfony | ||||
| ------------------------------- | ||||
|  | ||||
| This distribution is meant to be the starting point for your application, | ||||
| but it also contains some sample code that you can learn from and play with. | ||||
| 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](http://symfony.com/doc/current/quick_tour/the_big_picture.html), | ||||
| which will take you through all the basic features of Symfony2 and the test | ||||
| pages that are available in the standard edition. | ||||
| 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](http://symfony.com/doc/current/). | ||||
| [Symfony2 book][5]. | ||||
|  | ||||
| Using this Edition as the Base of your Application | ||||
| -------------------------------------------------- | ||||
|  | ||||
| Since the standard edition is fully-configured and comes with some examples, | ||||
| you'll need to make a few changes before using it to build your application. | ||||
|  | ||||
| The distribution 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. | ||||
|  | ||||
| A default bundle, ``AcmeDemoBundle``, shows you Symfony2 in action. After | ||||
| 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 entries referencing AcmeBundle in ``app/config/routing_dev.yml``; | ||||
| * remove the AcmeBundle from the registered bundles in ``app/AppKernel.php``; | ||||
|   * delete the `src/Acme` directory; | ||||
|  | ||||
|   * remove the routing entries referencing AcmeBundle in | ||||
|     `app/config/routing_dev.yml`; | ||||
|  | ||||
|   * remove the AcmeBundle from the registered bundles in `app/AppKernel.php`; | ||||
|  | ||||
|   * remove the `web/bundles/acmedemo` directory; | ||||
|  | ||||
|   * remove the `security.providers`, `security.firewalls.login` and | ||||
|     `security.firewalls.secured_area` entries in the `security.yml` file or | ||||
|     tweak the security configuration to fit your needs. | ||||
|  | ||||
| What's inside? | ||||
| --------------- | ||||
| The Symfony Standard Edition comes pre-configured with the following bundles: | ||||
|  | ||||
| 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** - Adds several enhancements, including template | ||||
|   and routing annotation capability ([documentation](http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/index.html)) | ||||
| * **DoctrineBundle** - Adds support for the Doctrine ORM | ||||
|   ([documentation](http://symfony.com/doc/current/book/doctrine.html)) | ||||
| * **TwigBundle** - Adds support for the Twig templating engine | ||||
|   ([documentation](http://symfony.com/doc/current/book/templating.html)) | ||||
| * **SecurityBundle** - Adds security by integrating Symfony's security component | ||||
|   ([documentation](http://symfony.com/doc/current/book/security.html)) | ||||
| * **SwiftmailerBundle** - Adds support for Swiftmailer, a library for sending emails | ||||
|   ([documentation](http://symfony.com/doc/2.0/cookbook/email.html)) | ||||
| * **MonologBundle** - Adds support for Monolog, a logging library | ||||
|   ([documentation](http://symfony.com/doc/2.0/cookbook/logging/monolog.html)) | ||||
| * **AsseticBundle** - Adds support for Assetic, an asset processing library | ||||
|   ([documentation](http://symfony.com/doc/2.0/cookbook/assetic/asset_management.html)) | ||||
| * **JMSSecurityExtraBundle** - Allows security to be added via annotations | ||||
|   ([documentation](http://symfony.com/doc/current/bundles/JMSSecurityExtraBundle/index.html)) | ||||
|  | ||||
|   * [**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 | ||||
|  | ||||
|   * [**JMSSecurityExtraBundle**][13] - Allows security to be added via | ||||
|     annotations | ||||
|  | ||||
|   * [**JMSDiExtraBundle**][14] - Adds more powerful dependency injection | ||||
|     features | ||||
|  | ||||
|   * **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** (in dev/test env) - Adds code generation capabilities | ||||
|   ([documentation](http://symfony.com/doc/current/bundles/SensioGeneratorBundle/index.html)) | ||||
| * **AcmeDemoBundle** (in dev/test env) - A demo bundle with some example code | ||||
|  | ||||
|   * **SensioDistributionBundle** (in dev/test env) - Adds functionality for | ||||
|     configuring and working with Symfony distributions | ||||
|  | ||||
|   * [**SensioGeneratorBundle**][15] (in dev/test env) - Adds code generation | ||||
|     capabilities | ||||
|  | ||||
|   * **AcmeDemoBundle** (in dev/test env) - A demo bundle with some example | ||||
|     code | ||||
|  | ||||
| Enjoy! | ||||
|  | ||||
| [1]:  http://symfony.com/doc/2.1/book/installation.html | ||||
| [2]:  http://getcomposer.org/ | ||||
| [3]:  http://symfony.com/download | ||||
| [4]:  http://symfony.com/doc/2.1/quick_tour/the_big_picture.html | ||||
| [5]:  http://symfony.com/doc/2.1/index.html | ||||
| [6]:  http://symfony.com/doc/2.1/bundles/SensioFrameworkExtraBundle/index.html | ||||
| [7]:  http://symfony.com/doc/2.1/book/doctrine.html | ||||
| [8]:  http://symfony.com/doc/2.1/book/templating.html | ||||
| [9]:  http://symfony.com/doc/2.1/book/security.html | ||||
| [10]: http://symfony.com/doc/2.1/cookbook/email.html | ||||
| [11]: http://symfony.com/doc/2.1/cookbook/logging/monolog.html | ||||
| [12]: http://symfony.com/doc/2.1/cookbook/assetic/asset_management.html | ||||
| [13]: http://jmsyst.com/bundles/JMSSecurityExtraBundle/master | ||||
| [14]: http://jmsyst.com/bundles/JMSDiExtraBundle/master | ||||
| [15]: http://symfony.com/doc/2.1/bundles/SensioGeneratorBundle/index.html | ||||
|   | ||||
							
								
								
									
										257
									
								
								UPGRADE.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										257
									
								
								UPGRADE.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,257 @@ | ||||
| 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/master/composer.json) | ||||
| and | ||||
| [`composer.lock`](https://raw.github.com/symfony/symfony-standard/master/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 | ||||
|  | ||||
| ### `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): | ||||
|  | ||||
|     <?php | ||||
|  | ||||
|     use Doctrine\Common\Annotations\AnnotationRegistry; | ||||
|  | ||||
|     $loader = include __DIR__.'/../vendor/autoload.php'; | ||||
|  | ||||
|     // intl | ||||
|     if (!function_exists('intl_get_error_code')) { | ||||
|         require_once __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php'; | ||||
|  | ||||
|         $loader->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), | ||||
|  | ||||
| ### `web/app.php` | ||||
|  | ||||
| The default `web/app.php` file now reads as follows: | ||||
|  | ||||
|     <?php | ||||
|  | ||||
|     use Symfony\Component\ClassLoader\ApcClassLoader; | ||||
|     use Symfony\Component\HttpFoundation\Request; | ||||
|  | ||||
|     $loader = require_once __DIR__.'/../app/bootstrap.php.cache'; | ||||
|  | ||||
|     // Use APC for autoloading to improve performance | ||||
|     // Change 'sf2' by the prefix you want in order to prevent key conflict with another application | ||||
|     /* | ||||
|     $loader = new ApcClassLoader('sf2', $loader); | ||||
|     $loader->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: | ||||
|  | ||||
|     <?php | ||||
|  | ||||
|     use Symfony\Component\HttpFoundation\Request; | ||||
|  | ||||
|     // If you don't want to setup permissions the proper way, just uncomment the following PHP line | ||||
|     // read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information | ||||
|     //umask(0000); | ||||
|  | ||||
|     // This check prevents access to debug front controllers that are deployed by accident to production servers. | ||||
|     // Feel free to remove this, extend it, or make something more sophisticated. | ||||
|     if (isset($_SERVER['HTTP_CLIENT_IP']) | ||||
|         || isset($_SERVER['HTTP_X_FORWARDED_FOR']) | ||||
|         || !in_array(@$_SERVER['REMOTE_ADDR'], array( | ||||
|             '127.0.0.1', | ||||
|             '::1', | ||||
|         )) | ||||
|     ) { | ||||
|         header('HTTP/1.0 403 Forbidden'); | ||||
|         exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.'); | ||||
|     } | ||||
|  | ||||
|     $loader = require_once __DIR__.'/../app/bootstrap.php.cache'; | ||||
|     require_once __DIR__.'/../app/AppKernel.php'; | ||||
|  | ||||
|     $kernel = new AppKernel('dev', true); | ||||
|     $kernel->loadClassCache(); | ||||
|     $request = Request::createFromGlobals(); | ||||
|     $response = $kernel->handle($request); | ||||
|     $response->send(); | ||||
|     $kernel->terminate($request, $response); | ||||
| @@ -13,9 +13,11 @@ class AppKernel extends Kernel | ||||
|             new Symfony\Bundle\TwigBundle\TwigBundle(), | ||||
|             new Symfony\Bundle\MonologBundle\MonologBundle(), | ||||
|             new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), | ||||
|             new Symfony\Bundle\DoctrineBundle\DoctrineBundle(), | ||||
|             new Symfony\Bundle\AsseticBundle\AsseticBundle(), | ||||
|             new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), | ||||
|             new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), | ||||
|             new JMS\AopBundle\JMSAopBundle(), | ||||
|             new JMS\DiExtraBundle\JMSDiExtraBundle($this), | ||||
|             new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(), | ||||
| 	    new Io\TcpdfBundle\IoTcpdfBundle(), | ||||
|             new GergelyPolonkai\FrontBundle\GergelyPolonkaiFrontBundle(), | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|         <meta charset="UTF-8" /> | ||||
|         <title>{% block title %}Welcome!{% endblock %}</title> | ||||
|         {% block stylesheets %}{% endblock %} | ||||
|         <link rel="shortcut icon" href="{{ asset('favicon.ico') }}" /> | ||||
|         <link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" /> | ||||
|     </head> | ||||
|     <body> | ||||
|         {% block body %}{% endblock %} | ||||
|   | ||||
| @@ -1,48 +1,16 @@ | ||||
| <?php | ||||
|  | ||||
| use Symfony\Component\ClassLoader\UniversalClassLoader; | ||||
| use Doctrine\Common\Annotations\AnnotationRegistry; | ||||
|  | ||||
| require_once __DIR__.'/../vendor/tcpdf/tcpdf.php'; | ||||
|  | ||||
| $loader = new UniversalClassLoader(); | ||||
| $loader->registerNamespaces(array( | ||||
|     'Symfony'          => array(__DIR__.'/../vendor/symfony/src', __DIR__.'/../vendor/bundles'), | ||||
|     'Sensio'           => __DIR__.'/../vendor/bundles', | ||||
|     'JMS'              => __DIR__.'/../vendor/bundles', | ||||
|     'Doctrine\\Common' => __DIR__.'/../vendor/doctrine-common/lib', | ||||
|     'Doctrine\\DBAL'   => __DIR__.'/../vendor/doctrine-dbal/lib', | ||||
|     'Doctrine'         => __DIR__.'/../vendor/doctrine/lib', | ||||
|     'Monolog'          => __DIR__.'/../vendor/monolog/src', | ||||
|     'Assetic'          => __DIR__.'/../vendor/assetic/src', | ||||
|     'Metadata'         => __DIR__.'/../vendor/metadata/src', | ||||
|     'Io'               => __DIR__.'/../vendor/bundles', | ||||
| )); | ||||
| $loader->registerPrefixes(array( | ||||
|     'Twig_Extensions_' => __DIR__.'/../vendor/twig-extensions/lib', | ||||
|     'Twig_'            => __DIR__.'/../vendor/twig/lib', | ||||
| )); | ||||
| $loader = require __DIR__.'/../vendor/autoload.php'; | ||||
|  | ||||
| // intl | ||||
| if (!function_exists('intl_get_error_code')) { | ||||
|     require_once __DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php'; | ||||
|     require_once __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php'; | ||||
|  | ||||
|     $loader->registerPrefixFallbacks(array(__DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs')); | ||||
|     $loader->add('', __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs'); | ||||
| } | ||||
|  | ||||
| $loader->registerNamespaceFallbacks(array( | ||||
|     __DIR__.'/../src', | ||||
| )); | ||||
| $loader->register(); | ||||
|  | ||||
| AnnotationRegistry::registerLoader(function($class) use ($loader) { | ||||
|     $loader->loadClass($class); | ||||
|     return class_exists($class, false); | ||||
| }); | ||||
| AnnotationRegistry::registerFile(__DIR__.'/../vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php'); | ||||
|  | ||||
| // Swiftmailer needs a special autoloader to allow | ||||
| // the lazy loading of the init file (which is expensive) | ||||
| require_once __DIR__.'/../vendor/swiftmailer/lib/classes/Swift.php'; | ||||
| Swift::registerAutoload(__DIR__.'/../vendor/swiftmailer/lib/swift_init.php'); | ||||
| AnnotationRegistry::registerLoader(array($loader, 'loadClass')); | ||||
|  | ||||
| return $loader; | ||||
|   | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										2
									
								
								app/cache/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								app/cache/.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1,2 +0,0 @@ | ||||
| * | ||||
| !.gitignore | ||||
| @@ -1,104 +1,51 @@ | ||||
| <?php | ||||
|  | ||||
| if (!$iniPath = get_cfg_var('cfg_file_path')) { | ||||
|     $iniPath = 'WARNING: not using a php.ini file'; | ||||
| } | ||||
| require_once dirname(__FILE__).'/SymfonyRequirements.php'; | ||||
|  | ||||
| $symfonyRequirements = new SymfonyRequirements(); | ||||
|  | ||||
| $iniPath = $symfonyRequirements->getPhpIniConfigPath(); | ||||
|  | ||||
| echo "********************************\n"; | ||||
| echo "*                              *\n"; | ||||
| echo "*  Symfony requirements check  *\n"; | ||||
| echo "*                              *\n"; | ||||
| echo "********************************\n\n"; | ||||
| echo sprintf("php.ini used by PHP: %s\n\n", $iniPath); | ||||
|  | ||||
| echo "** WARNING **\n"; | ||||
| echo $iniPath ? sprintf("* Configuration file used by PHP: %s\n\n", $iniPath) : "* WARNING: No configuration file (php.ini) used by PHP!\n\n"; | ||||
|  | ||||
| echo "** ATTENTION **\n"; | ||||
| echo "*  The PHP CLI can use a different php.ini file\n"; | ||||
| echo "*  than the one used with your web server.\n"; | ||||
| if ('\\' == DIRECTORY_SEPARATOR) { | ||||
|     echo "*  (especially on the Windows platform)\n"; | ||||
| } | ||||
| echo "*  If this is the case, please ALSO launch this\n"; | ||||
| echo "*  utility from your web server.\n"; | ||||
| echo "** WARNING **\n"; | ||||
| echo "*  To be on the safe side, please also launch the requirements check\n"; | ||||
| echo "*  from your web server using the web/config.php script.\n"; | ||||
|  | ||||
| // mandatory | ||||
| echo_title("Mandatory requirements"); | ||||
| check(version_compare(phpversion(), '5.3.2', '>='), sprintf('Checking that PHP version is at least 5.3.2 (%s installed)', phpversion()), 'Install PHP 5.3.2 or newer (current version is '.phpversion(), true); | ||||
| check(ini_get('date.timezone'), 'Checking that the "date.timezone" setting is set', 'Set the "date.timezone" setting in php.ini (like Europe/Paris)', true); | ||||
| check(is_writable(__DIR__.'/../app/cache'), sprintf('Checking that app/cache/ directory is writable'), 'Change the permissions of the app/cache/ directory so that the web server can write in it', true); | ||||
| check(is_writable(__DIR__.'/../app/logs'), sprintf('Checking that the app/logs/ directory is writable'), 'Change the permissions of the app/logs/ directory so that the web server can write in it', true); | ||||
| check(function_exists('json_encode'), 'Checking that the json_encode() is available', 'Install and enable the json extension', true); | ||||
| check(class_exists('SQLite3') || in_array('sqlite', PDO::getAvailableDrivers()), 'Checking that the SQLite3 or PDO_SQLite extension is available', 'Install and enable the SQLite3 or PDO_SQLite extension.', true); | ||||
| check(function_exists('session_start'), 'Checking that the session_start() is available', 'Install and enable the session extension', true); | ||||
| check(function_exists('ctype_alpha'), 'Checking that the ctype_alpha() is available', 'Install and enable the ctype extension', true); | ||||
| check(function_exists('token_get_all'), 'Checking that the token_get_all() is available', 'Install and enable the tokenizer extension', true); | ||||
| check(!(function_exists('apc_store') && ini_get('apc.enabled')) || version_compare(phpversion('apc'), '3.0.17', '>='), 'Checking that the APC version is at least 3.0.17', 'Upgrade your APC extension (3.0.17+)', true); | ||||
| echo_title('Mandatory requirements'); | ||||
|  | ||||
| // warnings | ||||
| echo_title("Optional checks"); | ||||
| check(class_exists('DomDocument'), 'Checking that the PHP-XML module is installed', 'Install and enable the php-xml module', false); | ||||
| check(function_exists('token_get_all'), 'Checking that the token_get_all() function is available', 'Install and enable the Tokenizer extension (highly recommended)', false); | ||||
| check(function_exists('mb_strlen'), 'Checking that the mb_strlen() function is available', 'Install and enable the mbstring extension', false); | ||||
| check(function_exists('iconv'), 'Checking that the iconv() function is available', 'Install and enable the iconv extension', false); | ||||
| check(function_exists('utf8_decode'), 'Checking that the utf8_decode() is available', 'Install and enable the XML extension', false); | ||||
| if (PHP_OS != 'WINNT') { | ||||
|     check(function_exists('posix_isatty'), 'Checking that the posix_isatty() is available', 'Install and enable the php_posix extension (used to colorized the CLI output)', false); | ||||
| } | ||||
| check(class_exists('Locale'), 'Checking that the intl extension is available', 'Install and enable the intl extension (used for validators)', false); | ||||
| if (class_exists('Locale')) { | ||||
|     $version = ''; | ||||
|  | ||||
|     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]; | ||||
| foreach ($symfonyRequirements->getRequirements() as $req) { | ||||
|     echo_requirement($req); | ||||
| } | ||||
|  | ||||
|     check(version_compare($version, '4.0', '>='), 'Checking that the intl ICU version is at least 4+', 'Upgrade your intl extension with a newer ICU version (4+)', false); | ||||
| } | ||||
| echo_title('Optional recommendations'); | ||||
|  | ||||
| $accelerator =  | ||||
|     (function_exists('apc_store') && ini_get('apc.enabled')) | ||||
|     || | ||||
|     function_exists('eaccelerator_put') && ini_get('eaccelerator.enable') | ||||
|     || | ||||
|     function_exists('xcache_set') | ||||
| ; | ||||
| check($accelerator, 'Checking that a PHP accelerator is installed', 'Install a PHP accelerator like APC (highly recommended)', false); | ||||
|  | ||||
| check(!ini_get('short_open_tag'), 'Checking that php.ini has short_open_tag set to off', 'Set short_open_tag to off in php.ini', false); | ||||
| check(!ini_get('magic_quotes_gpc'), 'Checking that php.ini has magic_quotes_gpc set to off', 'Set magic_quotes_gpc to off in php.ini', false); | ||||
| check(!ini_get('register_globals'), 'Checking that php.ini has register_globals set to off', 'Set register_globals to off in php.ini', false); | ||||
| check(!ini_get('session.auto_start'), 'Checking that php.ini has session.auto_start set to off', 'Set session.auto_start to off in php.ini', false); | ||||
|  | ||||
| echo_title("Optional checks (Doctrine)"); | ||||
|  | ||||
| check(class_exists('PDO'), 'Checking that PDO is installed', 'Install PDO (mandatory for Doctrine)', false); | ||||
| if (class_exists('PDO')) { | ||||
|     $drivers = PDO::getAvailableDrivers(); | ||||
|     check(count($drivers), 'Checking that PDO has some drivers installed: '.implode(', ', $drivers), 'Install PDO drivers (mandatory for Doctrine)'); | ||||
| foreach ($symfonyRequirements->getRecommendations() as $req) { | ||||
|     echo_requirement($req); | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * Checks a configuration. | ||||
|  * Prints a Requirement instance | ||||
|  */ | ||||
| function check($boolean, $message, $help = '', $fatal = false) | ||||
| function echo_requirement(Requirement $requirement) | ||||
| { | ||||
|     echo $boolean ? "  OK        " : sprintf("\n\n[[%s]] ", $fatal ? ' ERROR ' : 'WARNING'); | ||||
|     echo sprintf("$message%s\n", $boolean ? '' : ': FAILED'); | ||||
|     $result = $requirement->isFulfilled() ? 'OK' : ($requirement->isOptional() ? 'WARNING' : 'ERROR'); | ||||
|     echo ' ' . str_pad($result, 9); | ||||
|     echo $requirement->getTestMessage() . "\n"; | ||||
|  | ||||
|     if (!$boolean) { | ||||
|         echo "            *** $help ***\n"; | ||||
|         if ($fatal) { | ||||
|             exit("You must fix this problem before resuming the check.\n"); | ||||
|         } | ||||
|     if (!$requirement->isFulfilled()) { | ||||
|         echo sprintf("          %s\n\n", $requirement->getHelpText()); | ||||
|     } | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -1,20 +1,21 @@ | ||||
| imports: | ||||
|     - { resource: parameters.ini } | ||||
|     - { resource: parameters.yml } | ||||
|     - { resource: security.yml } | ||||
|  | ||||
| framework: | ||||
|     #esi:             ~ | ||||
|     #translator:      { fallback: %locale% } | ||||
|     secret:          %secret% | ||||
|     charset:         UTF-8 | ||||
|     router:          { resource: "%kernel.root_dir%/config/routing.yml" } | ||||
|     router: | ||||
|         resource: "%kernel.root_dir%/config/routing.yml" | ||||
|         strict_requirements: %kernel.debug% | ||||
|     form:            true | ||||
|     csrf_protection: true | ||||
|     validation:      { enable_annotations: true } | ||||
|     templating:      { engines: ['twig'] } #assets_version: SomeVersionScheme | ||||
|     session: | ||||
|     default_locale:  %locale% | ||||
|         auto_start:     true | ||||
|     trust_proxy_headers: false # Whether or not the Request object should trust proxy headers (X_FORWARDED_FOR/HTTP_CLIENT_IP) | ||||
|     session:         ~ | ||||
|  | ||||
| # Twig Configuration | ||||
| twig: | ||||
| @@ -25,13 +26,14 @@ twig: | ||||
| assetic: | ||||
|     debug:          %kernel.debug% | ||||
|     use_controller: false | ||||
|     bundles:        [ ] | ||||
|     #java: /usr/bin/java | ||||
|     filters: | ||||
|         cssrewrite: ~ | ||||
|         #closure: | ||||
|         #     jar: %kernel.root_dir%/java/compiler.jar | ||||
|         #    jar: %kernel.root_dir%/Resources/java/compiler.jar | ||||
|         #yui_css: | ||||
|         #     jar: %kernel.root_dir%/java/yuicompressor-2.4.2.jar | ||||
|         #    jar: %kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar | ||||
|  | ||||
| # Doctrine Configuration | ||||
| doctrine: | ||||
| @@ -54,7 +56,4 @@ swiftmailer: | ||||
|     host:      %mailer_host% | ||||
|     username:  %mailer_user% | ||||
|     password:  %mailer_password% | ||||
|  | ||||
| jms_security_extra: | ||||
|     secure_controllers:  true | ||||
|     secure_all_services: false | ||||
|     spool:     { type: memory } | ||||
|   | ||||
| @@ -21,3 +21,6 @@ monolog: | ||||
|  | ||||
| assetic: | ||||
|     use_controller: true | ||||
|  | ||||
| #swiftmailer: | ||||
| #    delivery_address: me@example.com | ||||
|   | ||||
| @@ -1,6 +1,14 @@ | ||||
| imports: | ||||
|     - { resource: config.yml } | ||||
|  | ||||
| # In production environment you should know that the parameters for URL generation | ||||
| # always pass the requirements. Otherwise it would break your link (or even site with | ||||
| # strict_requirements = true). So we can disable the requirements check completely for | ||||
| # enhanced performance with strict_requirements = null. | ||||
| framework: | ||||
|     router: | ||||
|         strict_requirements: null | ||||
|  | ||||
| #doctrine: | ||||
| #    orm: | ||||
| #        metadata_cache_driver: apc | ||||
|   | ||||
| @@ -4,7 +4,7 @@ imports: | ||||
| framework: | ||||
|     test: ~ | ||||
|     session: | ||||
|         storage_id: session.storage.filesystem | ||||
|         storage_id: session.storage.mock_file | ||||
|  | ||||
| web_profiler: | ||||
|     toolbar: false | ||||
|   | ||||
| @@ -1,19 +0,0 @@ | ||||
| ; These parameters can be imported into other config files | ||||
| ; by enclosing the key with % (like %database_user%) | ||||
| ; Comments start with ';', as in php.ini | ||||
| [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 | ||||
							
								
								
									
										15
									
								
								app/config/parameters.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								app/config/parameters.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| 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 | ||||
| @@ -1,7 +1,3 @@ | ||||
| _assetic: | ||||
|     resource: . | ||||
|     type:     assetic | ||||
|  | ||||
| _wdt: | ||||
|     resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml" | ||||
|     prefix:   /_wdt | ||||
|   | ||||
| @@ -1,3 +1,7 @@ | ||||
| jms_security_extra: | ||||
|     secure_all_services: false | ||||
|     expressions: true | ||||
|  | ||||
| security: | ||||
|     encoders: | ||||
|         Symfony\Component\Security\Core\User\User: plaintext | ||||
| @@ -8,6 +12,7 @@ security: | ||||
|  | ||||
|     providers: | ||||
|         in_memory: | ||||
|             memory: | ||||
|                 users: | ||||
|                     user:  { password: userpass, roles: [ 'ROLE_USER' ] } | ||||
|                     admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] } | ||||
| @@ -35,4 +40,4 @@ security: | ||||
|  | ||||
|     access_control: | ||||
|         #- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https } | ||||
|         #- { path: ^/_internal, roles: IS_AUTHENTICATED_ANONYMOUSLY, ip: 127.0.0.1 } | ||||
|         #- { path: ^/_internal/secure, roles: IS_AUTHENTICATED_ANONYMOUSLY, ip: 127.0.0.1 } | ||||
|   | ||||
| @@ -15,8 +15,8 @@ use Symfony\Component\Console\Input\ArgvInput; | ||||
|  | ||||
| $input = new ArgvInput(); | ||||
| $env = $input->getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev'); | ||||
| $debug = !$input->hasParameterOption(array('--no-debug', '')); | ||||
| $debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(array('--no-debug', '')) && $env !== 'prod'; | ||||
|  | ||||
| $kernel = new AppKernel($env, $debug); | ||||
| $application = new Application($kernel); | ||||
| $application->run(); | ||||
| $application->run($input); | ||||
|   | ||||
							
								
								
									
										2
									
								
								app/logs/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								app/logs/.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1,2 +0,0 @@ | ||||
| * | ||||
| !.gitignore | ||||
| @@ -1 +0,0 @@ | ||||
| deny from all | ||||
							
								
								
									
										1
									
								
								bin/doctrine
									
									
									
									
									
										Symbolic link
									
								
							
							
						
						
									
										1
									
								
								bin/doctrine
									
									
									
									
									
										Symbolic link
									
								
							| @@ -0,0 +1 @@ | ||||
| ../vendor/doctrine/orm/bin/doctrine | ||||
							
								
								
									
										1
									
								
								bin/doctrine.php
									
									
									
									
									
										Symbolic link
									
								
							
							
						
						
									
										1
									
								
								bin/doctrine.php
									
									
									
									
									
										Symbolic link
									
								
							| @@ -0,0 +1 @@ | ||||
| ../vendor/doctrine/orm/bin/doctrine.php | ||||
							
								
								
									
										240
									
								
								bin/vendors
									
									
									
									
									
								
							
							
						
						
									
										240
									
								
								bin/vendors
									
									
									
									
									
								
							| @@ -1,240 +0,0 @@ | ||||
| #!/usr/bin/env php | ||||
| <?php | ||||
|  | ||||
| /* | ||||
|  * This file is part of the Symfony Standard Edition. | ||||
|  * | ||||
|  * (c) Fabien Potencier <fabien@symfony.com> | ||||
|  * | ||||
|  * For the full copyright and license information, please view the LICENSE | ||||
|  * file that was distributed with this source code. | ||||
|  * | ||||
|  * @author Fabien Potencier <fabien@symfony.com> | ||||
|  * @author Florian Preusner <florian@preusner.com> | ||||
|  */ | ||||
|  | ||||
| $rootDir      = dirname(__DIR__); | ||||
| $vendorName   = 'vendor'; | ||||
| $vendorDir    = $rootDir . '/' . $vendorName; | ||||
| $submodule    = false; | ||||
| $cloneOptions = ''; | ||||
| $delete       = false; | ||||
| $install      = true; | ||||
|  | ||||
| $commands = array( | ||||
|     'install'             => 'install vendors as specified in deps or deps.lock (recommended)',  | ||||
|     'update'              => 'update vendors to their latest versions (as specified in deps)',  | ||||
|     'delete'              => 'remove vendors',  | ||||
|     'reinstall'           => 'delete and install',  | ||||
|     'submodule:install'   => 'install vendors as submodules',  | ||||
|     'submodule:update'    => 'update vendors to their latest versions (as specified in deps)',  | ||||
|     'submodule:delete'    => 'remove vendors',  | ||||
|     'submodule:reinstall' => 'delete and install' | ||||
| ); | ||||
|  | ||||
|  | ||||
|  | ||||
| array_shift($argv); | ||||
| if (!isset($argv[0]) || in_array('help', $argv)) { | ||||
|      | ||||
|     $help  = "Symfony2 vendors script management.\n"; | ||||
|     $help .= "Specify a command to run:\n\n"; | ||||
|  | ||||
|     foreach($commands as $cmd => $info) { | ||||
|  | ||||
|         $help .= str_pad($cmd, 21, ' ') . ":  $info\n"; | ||||
|     } | ||||
|      | ||||
|     exit($help . "\n"); | ||||
| } | ||||
|  | ||||
| if (!in_array($command = array_shift($argv), array_keys($commands))) { | ||||
|     exit(sprintf("Command \"%s\" does not exist.\n", $command)); | ||||
| } | ||||
|  | ||||
| if (!is_dir($vendorDir)) { | ||||
|     mkdir($vendorDir, 0777, true); | ||||
| } | ||||
|  | ||||
| if (strpos($command, 'submodule') !== false) { | ||||
|  | ||||
|     $submodule = true; | ||||
|     $command   = str_replace('submodule:', '', $command); | ||||
|  | ||||
|     if(!is_dir($rootDir . '/.git')) { | ||||
|  | ||||
|         exit("This project is not a git repository. To use submodules it should be a repository :)\n"); | ||||
|     } | ||||
| } | ||||
|  | ||||
| // versions | ||||
| $versions = array(); | ||||
| if ('install' === $command && file_exists($rootDir.'/deps.lock')) { | ||||
|     foreach (file($rootDir.'/deps.lock', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES) as $line) { | ||||
|         $parts = array_values(array_filter(explode(' ', $line))); | ||||
|         if (2 !== count($parts)) { | ||||
|             exit(sprintf('The deps version file is not valid (near "%s")', $line)); | ||||
|         } | ||||
|         $versions[$parts[0]] = $parts[1]; | ||||
|     } | ||||
| } | ||||
|  | ||||
| if('delete' === $command) { | ||||
|     $delete  = true; | ||||
|     $install = false; | ||||
| } | ||||
|  | ||||
| if('reinstall' === $command) { | ||||
|     $delete  = true;     | ||||
| } | ||||
|  | ||||
| $newversions = array(); | ||||
| $deps        = parse_ini_file($rootDir.'/deps', true, INI_SCANNER_RAW); | ||||
| foreach ($deps as $name => $dep) { | ||||
|     // revision | ||||
|     if (isset($versions[$name])) { | ||||
|         $rev = $versions[$name]; | ||||
|     } else { | ||||
|         $rev = isset($dep['version']) ? $dep['version'] : 'origin/HEAD'; | ||||
|     } | ||||
|      | ||||
|     // make sure to run commands on rootDir | ||||
|     system("cd $rootDir"); | ||||
|  | ||||
|     // install dir | ||||
|     if($submodule) { | ||||
|  | ||||
|         $installDir = isset($dep['target']) ? $vendorName . $dep['target'] : $vendorName . '/' . $name; | ||||
|     } else { | ||||
|  | ||||
|         $installDir = isset($dep['target']) ? $vendorDir . $dep['target'] : $vendorDir . '/' . $name; | ||||
|     } | ||||
|      | ||||
|      | ||||
|      | ||||
|     if($delete) { | ||||
|  | ||||
|         echo "> Removing $name\n"; | ||||
|  | ||||
|         if($submodule) { | ||||
|  | ||||
|             deleteSubmodule($installDir, $rootDir); | ||||
|         } | ||||
|  | ||||
|         if(PHP_OS == 'WINNT') { | ||||
|  | ||||
|             system('rmdir /S /Q ' . escapeshellarg(realpath($installDir))); | ||||
|         } else { | ||||
|  | ||||
|             system('rm -rf ' . escapeshellarg($installDir)); | ||||
|         } | ||||
|     } | ||||
|      | ||||
|      | ||||
|     if($install) { | ||||
|      | ||||
|         echo "> Installing/Updating $name\n"; | ||||
|          | ||||
|          // url | ||||
|         if (!isset($dep['git'])) { | ||||
|             exit(sprintf('The "git" value for the "%s" dependency must be set.', $name)); | ||||
|         } | ||||
|         $url = $dep['git']; | ||||
|  | ||||
|         if($submodule) { | ||||
|  | ||||
|             $cmd  = sprintf('git submodule add %s %s', escapeshellarg($url), escapeshellarg($installDir)); | ||||
|             $cmd .= ' && git submodule init'; | ||||
|              | ||||
|         } else { | ||||
|          | ||||
|             $cmd = sprintf('git clone %s %s', escapeshellarg($url), escapeshellarg($installDir)); | ||||
|         } | ||||
|              | ||||
|         echo "  $cmd\n"; | ||||
|          | ||||
|         system($cmd);         | ||||
|  | ||||
|         system(sprintf('cd %s && git fetch origin && git reset --hard %s', escapeshellarg($installDir), escapeshellarg($rev))); | ||||
|     } | ||||
|      | ||||
|     if ('update' === $command) { | ||||
|         ob_start(); | ||||
|         system(sprintf('cd %s && git log -n 1 --format=%%H', escapeshellarg($installDir))); | ||||
|         $newversions[] = trim($name.' '.ob_get_clean()); | ||||
|     } | ||||
| } | ||||
|  | ||||
| // update? | ||||
| if ('update' === $command) { | ||||
|     file_put_contents($rootDir.'/deps.lock', implode("\n", $newversions)); | ||||
| } | ||||
|  | ||||
| if($install) { | ||||
|  | ||||
|     // php on windows can't use the shebang line from system() | ||||
|     $interpreter = PHP_OS == 'WINNT' ? 'php.exe' : ''; | ||||
|  | ||||
|     // Update the bootstrap files | ||||
|     //system(sprintf('%s %s', $interpreter, escapeshellarg($rootDir.'/bin/build_bootstrap'))); | ||||
|  | ||||
|     // Update assets | ||||
|     system(sprintf('%s %s assets:install --symlink %s', $interpreter, escapeshellarg($rootDir.'/app/console'), escapeshellarg($rootDir.'/web'))); | ||||
|  | ||||
|     // Remove the cache | ||||
|     system(sprintf('%s %s cache:clear --no-warmup', $interpreter, escapeshellarg($rootDir.'/app/console'))); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| function deleteSubmodule($name, $rootDir) { | ||||
|  | ||||
|     $gitModules = $rootDir . '/.gitmodules'; | ||||
|     $gitConfig  = $rootDir . '/.git/config'; | ||||
|      | ||||
|     $files = array($gitModules, $gitConfig); | ||||
|  | ||||
|     foreach($files as $file) : | ||||
|      | ||||
|         if(file_exists($file)) { | ||||
|  | ||||
|             $fileReturn = array(); | ||||
|             $found      = false; | ||||
|          | ||||
|             foreach(file($file) as $line) { | ||||
|  | ||||
|                 if(strpos($line, '"' . $name . '"') !== false) { | ||||
|                  | ||||
|                     $found = true; | ||||
|                     continue; | ||||
|                 } | ||||
|                  | ||||
|                 if($found) { | ||||
|                  | ||||
|                     if($line{0} != '[') { | ||||
|                      | ||||
|                         continue; | ||||
|                     } | ||||
|                      | ||||
|                     $found = false; | ||||
|                 } | ||||
|                  | ||||
|                 array_push($fileReturn, $line); | ||||
|             } | ||||
|              | ||||
|             $handle = fopen($file, 'wt');        | ||||
|              | ||||
|             if($handle) { | ||||
|          | ||||
|                 fwrite($handle, implode($fileReturn)); | ||||
|                 fclose($handle); | ||||
|             } | ||||
|         } | ||||
|     endforeach; | ||||
|      | ||||
|     $cmd = "git rm --cached --force $name"; | ||||
|      | ||||
|     echo "  $cmd\n"; | ||||
|     system($cmd); | ||||
| } | ||||
							
								
								
									
										44
									
								
								composer.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								composer.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,44 @@ | ||||
| { | ||||
|     "name": "symfony/framework-standard-edition", | ||||
|     "description": "The \"Symfony Standard Edition\" distribution", | ||||
|     "autoload": { | ||||
|         "psr-0": { "": "src/" } | ||||
|     }, | ||||
|     "require": { | ||||
|         "php": ">=5.3.3", | ||||
|         "symfony/symfony": "2.1.*", | ||||
|         "doctrine/orm": ">=2.2.3,<2.4-dev", | ||||
|         "doctrine/doctrine-bundle": "1.0.*", | ||||
|         "twig/extensions": "1.0.*", | ||||
|         "symfony/assetic-bundle": "2.1.*", | ||||
|         "symfony/swiftmailer-bundle": "2.1.*", | ||||
|         "symfony/monolog-bundle": "2.1.*", | ||||
|         "sensio/distribution-bundle": "2.1.*", | ||||
|         "sensio/framework-extra-bundle": "2.1.*", | ||||
|         "sensio/generator-bundle": "2.1.*", | ||||
|         "jms/security-extra-bundle": "1.2.*", | ||||
|         "jms/di-extra-bundle": "1.1.*" | ||||
|     }, | ||||
|     "scripts": { | ||||
|         "post-install-cmd": [ | ||||
|             "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", | ||||
|             "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", | ||||
|             "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", | ||||
|             "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile" | ||||
|         ], | ||||
|         "post-update-cmd": [ | ||||
|             "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", | ||||
|             "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", | ||||
|             "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", | ||||
|             "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile" | ||||
|         ] | ||||
|     }, | ||||
|     "config": { | ||||
|         "bin-dir": "bin" | ||||
|     }, | ||||
|     "minimum-stability": "dev", | ||||
|     "extra": { | ||||
|         "symfony-app-dir": "app", | ||||
|         "symfony-web-dir": "web" | ||||
|     } | ||||
| } | ||||
							
								
								
									
										63
									
								
								deps
									
									
									
									
									
								
							
							
						
						
									
										63
									
								
								deps
									
									
									
									
									
								
							| @@ -1,63 +0,0 @@ | ||||
| [symfony] | ||||
|     git=http://github.com/symfony/symfony.git | ||||
|     version=v2.0.15 | ||||
|  | ||||
| [twig] | ||||
|     git=http://github.com/fabpot/Twig.git | ||||
|     version=v1.8.2 | ||||
|  | ||||
| [monolog] | ||||
|     git=http://github.com/Seldaek/monolog.git | ||||
|     version=1.0.2 | ||||
|  | ||||
| [doctrine-common] | ||||
|     git=http://github.com/doctrine/common.git | ||||
|     version=2.1.4 | ||||
|  | ||||
| [doctrine-dbal] | ||||
|     git=http://github.com/doctrine/dbal.git | ||||
|     version=2.1.7 | ||||
|  | ||||
| [doctrine] | ||||
|     git=http://github.com/doctrine/doctrine2.git | ||||
|     version=2.1.7 | ||||
|  | ||||
| [swiftmailer] | ||||
|     git=http://github.com/swiftmailer/swiftmailer.git | ||||
|     version=v4.1.7 | ||||
|  | ||||
| [assetic] | ||||
|     git=http://github.com/kriswallsmith/assetic.git | ||||
|     version=v1.0.3 | ||||
|  | ||||
| [twig-extensions] | ||||
|     git=http://github.com/fabpot/Twig-extensions.git | ||||
|  | ||||
| [metadata] | ||||
|     git=http://github.com/schmittjoh/metadata.git | ||||
|     version=1.0.0 | ||||
|  | ||||
| [SensioFrameworkExtraBundle] | ||||
|     git=http://github.com/sensio/SensioFrameworkExtraBundle.git | ||||
|     target=/bundles/Sensio/Bundle/FrameworkExtraBundle | ||||
|     version=origin/2.0 | ||||
|  | ||||
| [JMSSecurityExtraBundle] | ||||
|     git=http://github.com/schmittjoh/JMSSecurityExtraBundle.git | ||||
|     target=/bundles/JMS/SecurityExtraBundle | ||||
|     version=origin/1.0.x | ||||
|  | ||||
| [SensioDistributionBundle] | ||||
|     git=http://github.com/sensio/SensioDistributionBundle.git | ||||
|     target=/bundles/Sensio/Bundle/DistributionBundle | ||||
|     version=origin/2.0 | ||||
|  | ||||
| [SensioGeneratorBundle] | ||||
|     git=http://github.com/sensio/SensioGeneratorBundle.git | ||||
|     target=/bundles/Sensio/Bundle/GeneratorBundle | ||||
|     version=origin/2.0 | ||||
|  | ||||
| [AsseticBundle] | ||||
|     git=http://github.com/symfony/AsseticBundle.git | ||||
|     target=/bundles/Symfony/Bundle/AsseticBundle | ||||
|     version=v1.0.1 | ||||
							
								
								
									
										15
									
								
								deps.lock
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								deps.lock
									
									
									
									
									
								
							| @@ -1,15 +0,0 @@ | ||||
| symfony v2.0.15 | ||||
| twig v1.8.2 | ||||
| monolog 1.0.2 | ||||
| doctrine-common 2.1.4 | ||||
| doctrine-dbal 2.1.7 | ||||
| doctrine 2.1.7 | ||||
| swiftmailer v4.1.7 | ||||
| assetic v1.0.3 | ||||
| twig-extensions feb6d3f10c411e2631997c0a905aa581c80305c1 | ||||
| metadata 1.0.0 | ||||
| SensioFrameworkExtraBundle 1eda94d838aa885e154f92f426df35f2252cdb92 | ||||
| JMSSecurityExtraBundle e752f888c51425f71382c056961f10f2be642102 | ||||
| SensioDistributionBundle 41a6c5caed65f02bb09c95a90579f047616471fd | ||||
| SensioGeneratorBundle 83b768a487a6878f2bc2ad6859bd61a3651a7885 | ||||
| AsseticBundle v1.0.1 | ||||
							
								
								
									
										1
									
								
								vendor/assetic
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										1
									
								
								vendor/assetic
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/assetic deleted from 4aeef88b79
									
								
							
							
								
								
									
										1
									
								
								vendor/bundles/Io/TcpdfBundle
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										1
									
								
								vendor/bundles/Io/TcpdfBundle
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/bundles/Io/TcpdfBundle deleted from 470209476a
									
								
							
							
								
								
									
										1
									
								
								vendor/bundles/JMS/SecurityExtraBundle
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										1
									
								
								vendor/bundles/JMS/SecurityExtraBundle
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/bundles/JMS/SecurityExtraBundle deleted from e752f888c5
									
								
							 Submodule vendor/bundles/Sensio/Bundle/DistributionBundle deleted from 41a6c5caed
									
								
							 Submodule vendor/bundles/Sensio/Bundle/FrameworkExtraBundle deleted from 1eda94d838
									
								
							
							
								
								
									
										1
									
								
								vendor/bundles/Sensio/Bundle/GeneratorBundle
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										1
									
								
								vendor/bundles/Sensio/Bundle/GeneratorBundle
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/bundles/Sensio/Bundle/GeneratorBundle deleted from 83b768a487
									
								
							
							
								
								
									
										1
									
								
								vendor/bundles/Symfony/Bundle/AsseticBundle
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										1
									
								
								vendor/bundles/Symfony/Bundle/AsseticBundle
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/bundles/Symfony/Bundle/AsseticBundle deleted from 41b5913b50
									
								
							
							
								
								
									
										1
									
								
								vendor/doctrine-common
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										1
									
								
								vendor/doctrine-common
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/doctrine-common deleted from b886898821
									
								
							
							
								
								
									
										1
									
								
								vendor/doctrine-dbal
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										1
									
								
								vendor/doctrine-dbal
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/doctrine-dbal deleted from 6465038598
									
								
							
							
								
								
									
										1
									
								
								vendor/metadata
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										1
									
								
								vendor/metadata
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/metadata deleted from 8717ad2a56
									
								
							
							
								
								
									
										1
									
								
								vendor/tcpdf
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										1
									
								
								vendor/tcpdf
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/tcpdf deleted from 4bfc80dce0
									
								
							
							
								
								
									
										1
									
								
								vendor/twig-extensions
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										1
									
								
								vendor/twig-extensions
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/twig-extensions deleted from feb6d3f10c
									
								
							| @@ -1,5 +1,10 @@ | ||||
| <IfModule mod_rewrite.c> | ||||
|     RewriteEngine On | ||||
|  | ||||
|     #<IfModule mod_vhost_alias.c> | ||||
|     #    RewriteBase / | ||||
|     #</IfModule> | ||||
|  | ||||
|     RewriteCond %{REQUEST_FILENAME} !-f | ||||
|     RewriteRule ^(.*)$ app.php [QSA,L] | ||||
| </IfModule> | ||||
|   | ||||
							
								
								
									
										20
									
								
								web/app.php
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								web/app.php
									
									
									
									
									
								
							| @@ -1,12 +1,24 @@ | ||||
| <?php | ||||
|  | ||||
| require_once __DIR__.'/../app/bootstrap.php.cache'; | ||||
| use Symfony\Component\ClassLoader\ApcClassLoader; | ||||
| use Symfony\Component\HttpFoundation\Request; | ||||
|  | ||||
| $loader = require_once __DIR__.'/../app/bootstrap.php.cache'; | ||||
|  | ||||
| // Use APC for autoloading to improve performance | ||||
| // Change 'sf2' by the prefix you want in order to prevent key conflict with another application | ||||
| /* | ||||
| $loader = new ApcClassLoader('sf2', $loader); | ||||
| $loader->register(true); | ||||
| */ | ||||
|  | ||||
| require_once __DIR__.'/../app/AppKernel.php'; | ||||
| //require_once __DIR__.'/../app/AppCache.php'; | ||||
|  | ||||
| use Symfony\Component\HttpFoundation\Request; | ||||
|  | ||||
| $kernel = new AppKernel('prod', false); | ||||
| $kernel->loadClassCache(); | ||||
| //$kernel = new AppCache($kernel); | ||||
| $kernel->handle(Request::createFromGlobals())->send(); | ||||
| $request = Request::createFromGlobals(); | ||||
| $response = $kernel->handle($request); | ||||
| $response->send(); | ||||
| $kernel->terminate($request, $response); | ||||
|   | ||||
| @@ -2,12 +2,14 @@ | ||||
|  | ||||
| require 'dev-ips.php'; | ||||
|  | ||||
| // if you don't want to setup permissions the proper way, just uncomment the following PHP line | ||||
| use Symfony\Component\HttpFoundation\Request; | ||||
|  | ||||
| // If you don't want to setup permissions the proper way, just uncomment the following PHP line | ||||
| // read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information | ||||
| //umask(0000); | ||||
|  | ||||
| // this check prevents access to debug front controllers that are deployed by accident to production servers. | ||||
| // feel free to remove this, extend it, or make something more sophisticated. | ||||
| // This check prevents access to debug front controllers that are deployed by accident to production servers. | ||||
| // Feel free to remove this, extend it, or make something more sophisticated. | ||||
| if (isset($_SERVER['HTTP_CLIENT_IP']) | ||||
|     || isset($_SERVER['HTTP_X_FORWARDED_FOR']) | ||||
|     || !in_array(@$_SERVER['REMOTE_ADDR'], $dev_ips) | ||||
| @@ -16,11 +18,12 @@ if (isset($_SERVER['HTTP_CLIENT_IP']) | ||||
|     exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.'); | ||||
| } | ||||
|  | ||||
| require_once __DIR__.'/../app/bootstrap.php.cache'; | ||||
| $loader = require_once __DIR__.'/../app/bootstrap.php.cache'; | ||||
| require_once __DIR__.'/../app/AppKernel.php'; | ||||
|  | ||||
| use Symfony\Component\HttpFoundation\Request; | ||||
|  | ||||
| $kernel = new AppKernel('dev', true); | ||||
| $kernel->loadClassCache(); | ||||
| $kernel->handle(Request::createFromGlobals())->send(); | ||||
| $request = Request::createFromGlobals(); | ||||
| $response = $kernel->handle($request); | ||||
| $response->send(); | ||||
| $kernel->terminate($request, $response); | ||||
|   | ||||
| @@ -1 +0,0 @@ | ||||
| /var/www/vhosts/gergely.polonkai.eu/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/public | ||||
| @@ -1 +0,0 @@ | ||||
| /var/www/vhosts/gergely.polonkai.eu/vendor/bundles/Sensio/Bundle/DistributionBundle/Resources/public | ||||
| @@ -1 +0,0 @@ | ||||
| /var/www/vhosts/gergely.polonkai.eu/vendor/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/public | ||||
							
								
								
									
										176
									
								
								web/config.php
									
									
									
									
									
								
							
							
						
						
									
										176
									
								
								web/config.php
									
									
									
									
									
								
							| @@ -11,137 +11,19 @@ if (!in_array(@$_SERVER['REMOTE_ADDR'], $dev_ips)) { | ||||
|     exit('This script is only accessible from localhost.'); | ||||
| } | ||||
|  | ||||
| $majorProblems = array(); | ||||
| $minorProblems = array(); | ||||
| $phpini = false; | ||||
| require_once dirname(__FILE__).'/../app/SymfonyRequirements.php'; | ||||
|  | ||||
| // minimum | ||||
| if (!version_compare(phpversion(), '5.3.2', '>=')) { | ||||
|     $version = phpversion(); | ||||
|     $majorProblems[] = <<<EOF | ||||
|         You are running PHP version "<strong>$version</strong>", but Symfony | ||||
|         needs at least PHP "<strong>5.3.2</strong>" to run. Before using Symfony, install | ||||
|         PHP "<strong>5.3.2</strong>" or newer. | ||||
| EOF; | ||||
| } | ||||
| $symfonyRequirements = new SymfonyRequirements(); | ||||
|  | ||||
| if (!is_writable(__DIR__ . '/../app/cache')) { | ||||
|     $majorProblems[] = 'Change the permissions of the "<strong>app/cache/</strong>" | ||||
|         directory so that the web server can write into it.'; | ||||
| } | ||||
| $majorProblems = $symfonyRequirements->getFailedRequirements(); | ||||
| $minorProblems = $symfonyRequirements->getFailedRecommendations(); | ||||
|  | ||||
| if (!is_writable(__DIR__ . '/../app/logs')) { | ||||
|     $majorProblems[] = 'Change the permissions of the "<strong>app/logs/</strong>" | ||||
|         directory so that the web server can write into it.'; | ||||
| } | ||||
|  | ||||
| // extensions | ||||
| if (!class_exists('DomDocument')) { | ||||
|     $minorProblems[] = 'Install and enable the <strong>php-xml</strong> module.'; | ||||
| } | ||||
|  | ||||
| if (!((function_exists('apc_store') && ini_get('apc.enabled')) || function_exists('eaccelerator_put') && ini_get('eaccelerator.enable') || function_exists('xcache_set'))) { | ||||
|     $minorProblems[] = 'Install and enable a <strong>PHP accelerator</strong> like APC (highly recommended).'; | ||||
| } | ||||
|  | ||||
| if (!(!(function_exists('apc_store') && ini_get('apc.enabled')) || version_compare(phpversion('apc'), '3.0.17', '>='))) { | ||||
|     $majorProblems[] = 'Upgrade your <strong>APC</strong> extension (3.0.17+)'; | ||||
| } | ||||
|  | ||||
| if (!function_exists('token_get_all')) { | ||||
|     $minorProblems[] = 'Install and enable the <strong>Tokenizer</strong> extension.'; | ||||
| } | ||||
|  | ||||
| if (!function_exists('mb_strlen')) { | ||||
|     $minorProblems[] = 'Install and enable the <strong>mbstring</strong> extension.'; | ||||
| } | ||||
|  | ||||
| if (!function_exists('iconv')) { | ||||
|     $minorProblems[] = 'Install and enable the <strong>iconv</strong> extension.'; | ||||
| } | ||||
|  | ||||
| if (!function_exists('utf8_decode')) { | ||||
|     $minorProblems[] = 'Install and enable the <strong>XML</strong> extension.'; | ||||
| } | ||||
|  | ||||
| if (PHP_OS != 'WINNT' && !function_exists('posix_isatty')) { | ||||
|     $minorProblems[] = 'Install and enable the <strong>php_posix</strong> extension (used to colorize the CLI output).'; | ||||
| } | ||||
|  | ||||
| if (!class_exists('Locale')) { | ||||
|     $minorProblems[] = 'Install and enable the <strong>intl</strong> extension.'; | ||||
| } else { | ||||
|     $version = ''; | ||||
|  | ||||
|     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]; | ||||
|     } | ||||
|  | ||||
|     if (!version_compare($version, '4.0', '>=')) { | ||||
|         $minorProblems[] = 'Upgrade your <strong>intl</strong> extension with a newer ICU version (4+).'; | ||||
|     } | ||||
| } | ||||
|  | ||||
| if (!class_exists('SQLite3') && !in_array('sqlite', PDO::getAvailableDrivers())) { | ||||
|     $majorProblems[] = 'Install and enable the <strong>SQLite3</strong> or <strong>PDO_SQLite</strong> extension.'; | ||||
| } | ||||
|  | ||||
| if (!function_exists('json_encode')) { | ||||
|     $majorProblems[] = 'Install and enable the <strong>json</strong> extension.'; | ||||
| } | ||||
|  | ||||
| if (!function_exists('session_start')) { | ||||
|     $majorProblems[] = 'Install and enable the <strong>session</strong> extension.'; | ||||
| } | ||||
|  | ||||
| if (!function_exists('ctype_alpha')) { | ||||
|     $majorProblems[] = 'Install and enable the <strong>ctype</strong> extension.'; | ||||
| } | ||||
|  | ||||
| if (!function_exists('token_get_all')) { | ||||
|     $majorProblems[] = 'Install and enable the <strong>Tokenizer</strong> extension.'; | ||||
| } | ||||
|  | ||||
| // php.ini | ||||
| if (!ini_get('date.timezone')) { | ||||
|     $phpini = true; | ||||
|     $majorProblems[] = 'Set the "<strong>date.timezone</strong>" setting in php.ini<a href="#phpini">*</a> (like Europe/Paris).'; | ||||
| } | ||||
|  | ||||
| if (ini_get('short_open_tag')) { | ||||
|     $phpini = true; | ||||
|     $minorProblems[] = 'Set <strong>short_open_tag</strong> to <strong>off</strong> in php.ini<a href="#phpini">*</a>.'; | ||||
| } | ||||
|  | ||||
| if (ini_get('magic_quotes_gpc')) { | ||||
|     $phpini = true; | ||||
|     $minorProblems[] = 'Set <strong>magic_quotes_gpc</strong> to <strong>off</strong> in php.ini<a href="#phpini">*</a>.'; | ||||
| } | ||||
|  | ||||
| if (ini_get('register_globals')) { | ||||
|     $phpini = true; | ||||
|     $minorProblems[] = 'Set <strong>register_globals</strong> to <strong>off</strong> in php.ini<a href="#phpini">*</a>.'; | ||||
| } | ||||
|  | ||||
| if (ini_get('session.auto_start')) { | ||||
|     $phpini = true; | ||||
|     $minorProblems[] = 'Set <strong>session.auto_start</strong> to <strong>off</strong> in php.ini<a href="#phpini">*</a>.'; | ||||
| } | ||||
| ?> | ||||
| <!DOCTYPE html> | ||||
| <html> | ||||
| <html lang="en"> | ||||
|     <head> | ||||
|         <meta charset="UTF-8" /> | ||||
|         <link href="bundles/sensiodistribution/webconfigurator/css/install.css" rel="stylesheet" media="all" /> | ||||
|         <link rel="stylesheet" href="bundles/sensiodistribution/webconfigurator/css/install.css" media="all" /> | ||||
|         <title>Symfony Configuration</title> | ||||
|     </head> | ||||
|     <body> | ||||
| @@ -149,63 +31,67 @@ if (ini_get('session.auto_start')) { | ||||
|             <div id="symfony-content"> | ||||
|                 <div class="symfony-blocks-install"> | ||||
|                     <div class="symfony-block-logo"> | ||||
|                     <img src="bundles/sensiodistribution/webconfigurator/images/logo-big.gif" alt="sf_symfony" /> | ||||
|                         <img src="bundles/sensiodistribution/webconfigurator/images/logo-big.gif" alt="Symfony logo" /> | ||||
|                     </div> | ||||
|  | ||||
|                     <div class="symfony-block-content"> | ||||
|                         <h1>Welcome!</h1> | ||||
|                         <p>Welcome to your new Symfony project.</p> | ||||
|                     <p>This script will guide you through the basic configuration of your project. You can also do the same by editing the ‘<strong>app/config/parameters.ini</strong>’ file directly.</p> | ||||
|                         <p> | ||||
|                             This script will guide you through the basic configuration of your project. | ||||
|                             You can also do the same by editing the ‘<strong>app/config/parameters.yml</strong>’ file directly. | ||||
|                         </p> | ||||
|  | ||||
|                         <?php if (count($majorProblems)): ?> | ||||
|                         <h2> | ||||
|                             <span><?php echo count($majorProblems) ?> Major problems</span> | ||||
|                         </h2> | ||||
|                             <h2 class="ko">Major problems</h2> | ||||
|                             <p>Major problems have been detected and <strong>must</strong> be fixed before continuing:</p> | ||||
|                             <ol> | ||||
|                                 <?php foreach ($majorProblems as $problem): ?> | ||||
|                                 <li><?php echo $problem; ?></li> | ||||
|                             <?php endforeach ?> | ||||
|                                     <li><?php echo $problem->getHelpHtml() ?></li> | ||||
|                                 <?php endforeach; ?> | ||||
|                             </ol> | ||||
|                     <?php endif ?> | ||||
|                         <?php endif; ?> | ||||
|  | ||||
|                         <?php if (count($minorProblems)): ?> | ||||
|                             <h2>Recommendations</h2> | ||||
|                             <p> | ||||
|                             <?php if ($majorProblems): ?> | ||||
|                                 Additionally, to | ||||
|                             <?php else: ?> | ||||
|                                 To<?php endif; ?> | ||||
|                             enhance your Symfony experience, it’s recommended that you fix the following : | ||||
|                                 <?php if (count($majorProblems)): ?>Additionally, to<?php else: ?>To<?php endif; ?> enhance your Symfony experience, | ||||
|                                 it’s recommended that you fix the following: | ||||
|                             </p> | ||||
|                             <ol> | ||||
|                                 <?php foreach ($minorProblems as $problem): ?> | ||||
|                             <li><?php echo $problem; ?></li> | ||||
|                                     <li><?php echo $problem->getHelpHtml() ?></li> | ||||
|                                 <?php endforeach; ?> | ||||
|                             </ol> | ||||
|                     <?php endif ?> | ||||
|                         <?php endif; ?> | ||||
|  | ||||
|                     <?php if ($phpini): ?> | ||||
|                             <a id="phpini"></a> | ||||
|                             <p>* | ||||
|                                 <?php if (get_cfg_var('cfg_file_path')): ?> | ||||
|                                     Changes to the <strong>php.ini</strong> file must be done in "<strong><?php echo get_cfg_var('cfg_file_path') ?></strong>". | ||||
|                         <?php if ($symfonyRequirements->hasPhpIniConfigIssue()): ?> | ||||
|                             <p id="phpini">* | ||||
|                                 <?php if ($symfonyRequirements->getPhpIniConfigPath()): ?> | ||||
|                                     Changes to the <strong>php.ini</strong> file must be done in "<strong><?php echo $symfonyRequirements->getPhpIniConfigPath() ?></strong>". | ||||
|                                 <?php else: ?> | ||||
|                                     To change settings, create a "<strong>php.ini</strong>". | ||||
|                                 <?php endif; ?> | ||||
|                             </p> | ||||
|                         <?php endif; ?> | ||||
|  | ||||
|                         <?php if (!count($majorProblems) && !count($minorProblems)): ?> | ||||
|                             <p class="ok">Your configuration looks good to run Symfony.</p> | ||||
|                         <?php endif; ?> | ||||
|  | ||||
|                         <ul class="symfony-install-continue"> | ||||
|                             <?php if (!count($majorProblems)): ?> | ||||
|                                 <li><a href="app_dev.php/_configurator/">Configure your Symfony Application online</a></li> | ||||
|                                 <li><a href="app_dev.php/">Bypass configuration and go to the Welcome page</a></li> | ||||
|                         <?php endif ?> | ||||
|                             <?php endif; ?> | ||||
|                             <?php if (count($majorProblems) || count($minorProblems)): ?> | ||||
|                                 <li><a href="config.php">Re-check configuration</a></li> | ||||
|                             <?php endif; ?> | ||||
|                         </ul> | ||||
|                     </div> | ||||
|                 </div> | ||||
|             </div> | ||||
|             <div class="version">Symfony Standard Edition</div> | ||||
|         </div> | ||||
|     </body> | ||||
| </html> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user