Permalink
Browse files

made initial import

  • Loading branch information...
0 parents commit db5b6be990bdd7aa9dd3744c02052271af0c6cc4 @fabpot fabpot committed Mar 7, 2011
Showing with 1,648 additions and 0 deletions.
  1. +6 −0 .gitignore
  2. +19 −0 LICENSE
  3. +67 −0 README
  4. +1 −0 VERSION
  5. +1 −0 app/.htaccess
  6. +9 −0 app/AppCache.php
  7. +38 −0 app/AppKernel.php
  8. +25 −0 app/autoload.php
  9. 0 app/cache/.gitkeep
  10. +150 −0 app/check.php
  11. +48 −0 app/config/config.yml
  12. +18 −0 app/config/config_dev.yml
  13. +2 −0 app/config/config_prod.yml
  14. +14 −0 app/config/config_test.yml
  15. +15 −0 app/config/parameters.ini
  16. +3 −0 app/config/routing.yml
  17. +23 −0 app/config/routing_dev.yml
  18. +16 −0 app/console
  19. 0 app/logs/.gitkeep
  20. +38 −0 app/phpunit.xml.dist
  21. +13 −0 app/views/base.html.twig
  22. +106 −0 bin/build.sh
  23. +83 −0 bin/build_bootstrap.php
  24. +96 −0 bin/vendors.sh
  25. +1 −0 src/.htaccess
  26. +9 −0 src/Acme/DemoBundle/AcmeDemoBundle.php
  27. +48 −0 src/Acme/DemoBundle/Controller/DemoController.php
  28. +17 −0 src/Acme/DemoBundle/Controller/WelcomeController.php
  29. +26 −0 src/Acme/DemoBundle/ControllerListener.php
  30. +22 −0 src/Acme/DemoBundle/DependencyInjection/AcmeDemoExtension.php
  31. +24 −0 src/Acme/DemoBundle/Form/ContactForm.php
  32. +18 −0 src/Acme/DemoBundle/Resources/config/services.xml
  33. +262 −0 src/Acme/DemoBundle/Resources/public/css/demo.css
  34. BIN src/Acme/DemoBundle/Resources/public/images/blue-arrow.png
  35. BIN src/Acme/DemoBundle/Resources/public/images/field-background.gif
  36. BIN src/Acme/DemoBundle/Resources/public/images/logo.gif
  37. BIN src/Acme/DemoBundle/Resources/public/images/search.png
  38. BIN src/Acme/DemoBundle/Resources/public/images/welcome-configure.gif
  39. BIN src/Acme/DemoBundle/Resources/public/images/welcome-demo.gif
  40. BIN src/Acme/DemoBundle/Resources/public/images/welcome-quick-tour.gif
  41. +10 −0 src/Acme/DemoBundle/Resources/views/Demo/contact.html.twig
  42. +11 −0 src/Acme/DemoBundle/Resources/views/Demo/hello.html.twig
  43. +15 −0 src/Acme/DemoBundle/Resources/views/Demo/index.html.twig
  44. +59 −0 src/Acme/DemoBundle/Resources/views/Welcome/index.html.twig
  45. +39 −0 src/Acme/DemoBundle/Resources/views/layout.html.twig
  46. +17 −0 src/Acme/DemoBundle/Tests/Controller/DemoControllerTest.php
  47. +74 −0 src/Acme/DemoBundle/Twig/Extension/DemoExtension.php
  48. +5 −0 web/.htaccess
  49. +11 −0 web/app.php
  50. +15 −0 web/app_dev.php
  51. +174 −0 web/config.php
  52. BIN web/favicon.ico
@@ -0,0 +1,6 @@
+web/bundles/
+app/bootstrap*
+app/cache/*
+app/logs/*
+build/
+vendor/
19 LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2004-2010 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.
67 README
@@ -0,0 +1,67 @@
+Symfony Standard Edition
+========================
+
+What's inside?
+--------------
+
+Symfony Standard Edition comes pre-configured with the following bundles:
+
+ * FrameworkBundle
+ * SensioFrameworkExtraBundle
+ * DoctrineBundle
+ * TwigBundle
+ * SwiftmailerBundle
+ * ZendBundle
+ * AsseticBundle
+ * WebProfilerBundle (in dev/test env)
+ * SymfonyWebConfiguratorBundle (in dev/test env)
+ * AcmeDemoBundle (in dev/test env)
+
+Installation from an Archive
+----------------------------
+
+If you have downloaded an archive, unpack it somewhere under your web server
+root directory.
+
+If you have downloaded an archive without the vendors, run the
+`bin/vendors.sh` script (`git` must be installed on your machine). If you
+don't have git, download the version with the vendors included.
+
+Installation from Git
+---------------------
+
+Run the following scripts:
+
+ * `bin/vendors.sh`
+ * `bin/build_bootstrap.php`
+ * `app/console assets:install web/`
+
+Configuration
+-------------
+
+Check that everything is working fine by going to the `config.php` page in a
+browser and follow the instructions.
+
+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. It's only
+available in the `dev` environment. After playing with it, you can remove it
+by deleting the `src/Acme` directory and removing the routing entry in
+`app/config/routing_dev.yml`.
+
+Configure the distribution by editing `app/config/parameters.ini` or by
+accessing `/web/config.php` in a browser.
+
+A simple controller is configured at `/hello/{name}`. Access it via
+`web/app_dev.php/_demo/hello/Fabien`.
+
+If you want to use the CLI, a console application is available at
+`app/console`. Check first that your PHP is correctly configured for the CLI
+by running `app/check.php`.
+
+Enjoy!
@@ -0,0 +1 @@
+2.0.0PR7
@@ -0,0 +1 @@
+deny from all
@@ -0,0 +1,9 @@
+<?php
+
+require_once __DIR__.'/AppKernel.php';
+
+use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache;
+
+class AppCache extends HttpCache
+{
+}
@@ -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\TwigBundle\TwigBundle(),
+ new Symfony\Bundle\ZendBundle\ZendBundle(),
+ new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
+ new Symfony\Bundle\DoctrineBundle\DoctrineBundle(),
+ new Symfony\Bundle\AsseticBundle\AsseticBundle(),
+ new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
+ );
+
+ if (in_array($this->getEnvironment(), array('dev', 'test'))) {
@kriswallsmith

kriswallsmith Mar 10, 2011

Contributor

We shouldn't be using environment names like this. If the user extends the "dev" environment as "local," for instance, the container will not be able to build because it doesn't have an extension for web_profiler anymore. Many WTF's would ensue.

Adding an enabled: true option to WebProfilerBundle and WebConfiguratorBundle would solve the problem.

@lsmith77

lsmith77 Mar 10, 2011

Contributor

speaking of which .. many users have also stumbled over the fact that AcmeDemoBundle isnt enabled for prod. then again i agree that it shouldnt really be enabled .. then again we wouldnt have anything to display which would lead to essentially what is currently the case an exception

@henrikbjorn

henrikbjorn Mar 10, 2011

we could change it in to $this->isDebug() ?

@kriswallsmith

kriswallsmith Mar 10, 2011

Contributor

The config abstraction layer is environment aware, not debug mode aware.

@henrikbjorn

henrikbjorn Mar 10, 2011

i dont understand?

@kriswallsmith

kriswallsmith Mar 10, 2011

Contributor

If the bundle is not included here because debug mode is off, but you're in the dev environment which includes the web_profiler extension in its config, the container will not be able to build.

@stof

stof Mar 10, 2011

Member

The fact that a kernel is a debug one or not is independant of the environment. You could choose to use an environment importing the dev one but with a non-debug kernel and in this case you still need the bundles

+ $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
+ $bundles[] = new Symfony\Bundle\WebConfiguratorBundle\SymfonyWebConfiguratorBundle();
+ $bundles[] = new Acme\DemoBundle\AcmeDemoBundle();
+ }
+
+ return $bundles;
+ }
+
+ public function registerContainerConfiguration(LoaderInterface $loader)
+ {
+ $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
+ }
+
+ public function registerRootDir()
+ {
+ return __DIR__;
+ }
+}
@@ -0,0 +1,25 @@
+<?php
+
+use Symfony\Component\ClassLoader\UniversalClassLoader;
+
+$loader = new UniversalClassLoader();
+$loader->registerNamespaces(array(
+ 'Symfony' => array(__DIR__.'/../vendor/symfony/src', __DIR__.'/../vendor/bundles'),
+ 'Sensio' => __DIR__.'/../vendor/bundles',
+ 'Doctrine\\Common\\DataFixtures' => __DIR__.'/../vendor/doctrine-data-fixtures/lib',
+ 'Doctrine\\Common' => __DIR__.'/../vendor/doctrine-common/lib',
+ 'Doctrine\\DBAL\\Migrations' => __DIR__.'/../vendor/doctrine-migrations/lib',
+ 'Doctrine\\MongoDB' => __DIR__.'/../vendor/doctrine-mongodb/lib',
+ 'Doctrine\\ODM\\MongoDB' => __DIR__.'/../vendor/doctrine-mongodb-odm/lib',
+ 'Doctrine\\DBAL' => __DIR__.'/../vendor/doctrine-dbal/lib',
+ 'Doctrine' => __DIR__.'/../vendor/doctrine/lib',
+ 'Zend\\Log' => __DIR__.'/../vendor/zend-log',
+ 'Assetic' => __DIR__.'/../vendor/assetic/src',
+ 'Acme' => __DIR__.'/../src',
+));
+$loader->registerPrefixes(array(
+ 'Twig_Extensions_' => __DIR__.'/../vendor/twig-extensions/lib',
+ 'Twig_' => __DIR__.'/../vendor/twig/lib',
+ 'Swift_' => __DIR__.'/../vendor/swiftmailer/lib/classes',
+));
+$loader->register();
No changes.
Oops, something went wrong.

0 comments on commit db5b6be

Please sign in to comment.