Permalink
Browse files

Installed Symfony v2.1.2

  • Loading branch information...
inmarelibero committed Sep 27, 2012
1 parent c3b99f1 commit 622c2c155de41c76d76a8c1ca0da5eea12010466
Showing with 3,576 additions and 0 deletions.
  1. +10 −0 .travis.yml
  2. +19 −0 LICENSE
  3. +252 −0 UPGRADE.md
  4. +1 −0 app/.htaccess
  5. +9 −0 app/AppCache.php
  6. +38 −0 app/AppKernel.php
  7. +13 −0 app/Resources/views/base.html.twig
  8. +638 −0 app/SymfonyRequirements.php
  9. +16 −0 app/autoload.php
  10. +55 −0 app/check.php
  11. +59 −0 app/config/config.yml
  12. +26 −0 app/config/config_dev.yml
  13. +19 −0 app/config/config_prod.yml
  14. +14 −0 app/config/config_test.yml
  15. +15 −0 app/config/parameters.yml
  16. +4 −0 app/config/routing.yml
  17. +27 −0 app/config/routing_dev.yml
  18. +43 −0 app/config/security.yml
  19. +22 −0 app/console
  20. +41 −0 app/phpunit.xml.dist
  21. +41 −0 composer.json
  22. +1,211 −0 composer.lock
  23. +1 −0 src/.htaccess
  24. +9 −0 src/Acme/DemoBundle/AcmeDemoBundle.php
  25. +57 −0 src/Acme/DemoBundle/Controller/DemoController.php
  26. +69 −0 src/Acme/DemoBundle/Controller/SecuredController.php
  27. +18 −0 src/Acme/DemoBundle/Controller/WelcomeController.php
  28. +22 −0 src/Acme/DemoBundle/DependencyInjection/AcmeDemoExtension.php
  29. +25 −0 src/Acme/DemoBundle/EventListener/ControllerListener.php
  30. +20 −0 src/Acme/DemoBundle/Form/ContactType.php
  31. +18 −0 src/Acme/DemoBundle/Resources/config/services.xml
  32. +294 −0 src/Acme/DemoBundle/Resources/public/css/demo.css
  33. BIN src/Acme/DemoBundle/Resources/public/images/blue-arrow.png
  34. BIN src/Acme/DemoBundle/Resources/public/images/field-background.gif
  35. BIN src/Acme/DemoBundle/Resources/public/images/logo.gif
  36. BIN src/Acme/DemoBundle/Resources/public/images/search.png
  37. BIN src/Acme/DemoBundle/Resources/public/images/welcome-configure.gif
  38. BIN src/Acme/DemoBundle/Resources/public/images/welcome-demo.gif
  39. BIN src/Acme/DemoBundle/Resources/public/images/welcome-quick-tour.gif
  40. +15 −0 src/Acme/DemoBundle/Resources/views/Demo/contact.html.twig
  41. +9 −0 src/Acme/DemoBundle/Resources/views/Demo/hello.html.twig
  42. +14 −0 src/Acme/DemoBundle/Resources/views/Demo/index.html.twig
  43. +11 −0 src/Acme/DemoBundle/Resources/views/Secured/hello.html.twig
  44. +9 −0 src/Acme/DemoBundle/Resources/views/Secured/helloadmin.html.twig
  45. +6 −0 src/Acme/DemoBundle/Resources/views/Secured/layout.html.twig
  46. +29 −0 src/Acme/DemoBundle/Resources/views/Secured/login.html.twig
  47. +65 −0 src/Acme/DemoBundle/Resources/views/Welcome/index.html.twig
  48. +49 −0 src/Acme/DemoBundle/Resources/views/layout.html.twig
  49. +17 −0 src/Acme/DemoBundle/Tests/Controller/DemoControllerTest.php
  50. +80 −0 src/Acme/DemoBundle/Twig/Extension/DemoExtension.php
  51. +10 −0 web/.htaccess
  52. +24 −0 web/app.php
  53. +30 −0 web/app_dev.php
  54. BIN web/apple-touch-icon.png
  55. +98 −0 web/config.php
  56. BIN web/favicon.ico
  57. +4 −0 web/robots.txt
View
@@ -0,0 +1,10 @@
+language: php
+
+php:
+ - 5.3.3
+ - 5.3
+ - 5.4
+
+before_script: composer install
+
+script: phpunit -c app
View
19 LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2004-2012 Fabien Potencier
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
View
@@ -0,0 +1,252 @@
+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%
+
+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);
View
@@ -0,0 +1 @@
+deny from all
View
@@ -0,0 +1,9 @@
+<?php
+
+require_once __DIR__.'/AppKernel.php';
+
+use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache;
+
+class AppCache extends HttpCache
+{
+}
View
@@ -0,0 +1,38 @@
+<?php
+
+use Symfony\Component\HttpKernel\Kernel;
+use Symfony\Component\Config\Loader\LoaderInterface;
+
+class AppKernel extends Kernel
+{
+ public function registerBundles()
+ {
+ $bundles = array(
+ new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
+ new Symfony\Bundle\SecurityBundle\SecurityBundle(),
+ new Symfony\Bundle\TwigBundle\TwigBundle(),
+ new Symfony\Bundle\MonologBundle\MonologBundle(),
+ new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
+ 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(),
+ );
+
+ if (in_array($this->getEnvironment(), array('dev', 'test'))) {
+ $bundles[] = new Acme\DemoBundle\AcmeDemoBundle();
+ $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');
+ }
+}
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="UTF-8" />
+ <title>{% block title %}Welcome!{% endblock %}</title>
+ {% block stylesheets %}{% endblock %}
+ <link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
+ </head>
+ <body>
+ {% block body %}{% endblock %}
+ {% block javascripts %}{% endblock %}
+ </body>
+</html>
Oops, something went wrong.

0 comments on commit 622c2c1

Please sign in to comment.