diff --git a/README.md b/README.md
index a8b905319..13bf092a6 100644
--- a/README.md
+++ b/README.md
@@ -12,54 +12,44 @@ Components like Template engine or ORM/Database library are out of scope in this
## Benchmarking Policy
-This is `master` branch.
+This is `optimize` branch.
-* Install a framework according to the official documentation.
-* Use the default configuration.
- * Don't remove any components/configurations even if they are not used.
- * With minimum changes to run this benchmark.
-* Set environment production/Turn off debug mode.
-* Run optimization which you normally do in your production environment, like composer's `--optimize-autoloader`.
-* Use controller or action class if a framework has the functionality.
+This branch accepts optimization like:
-Some people may think using default configuration is not fair. But I think a framework's default configuration is an assertion of what it is. Default configuration is a good starting point to know a framework. And I can't optimize all the frameworks. Some frameworks are optimized, some are not, it is not fair. So I don't remove any components/configurations.
+* removing components/configurations which are not used
+* optimized configuration
-But if you are interested in benchmarking with optimization (removing components/configurations which are not used), See [optimize](https://github.com/kenjis/php-framework-benchmark/tree/optimize) branch.
+Caution: Not all the frameworks are optimized!
+
+If you are interested in benchmarking with no optimization/manipulation (removing components/configurations which are not used), See [master](https://github.com/kenjis/php-framework-benchmark/) branch.
If you find something wrong with my code, please feel free to send Pull Requests. But please note optimizing only for "Hello World" is not acceptable. Building fastest "Hello World" application is not the goal in this project.
## Frameworks to Benchmark
-1. Phalcon 2.0.8
-1. Ice 1.0.34
-1. Tipsy 0.10.3
-1. FatFree 3.5.0
+1. Phalcon 2.0.0-RC1
+1. Ice 1.0.10
1. Slim 2.6.2
-1. CodeIgniter 3.0.2
-1. NoFussFramework 1.2.3
-1. Slim 3.0.0-RC2
-1. BEAR.Sunday 1.0.1
-1. Lumen 5.1.6
-1. zend-expressive 1.0.0rc2 (FastRoute + zend-servicemanager)
-1. Radar 1.0.0-dev
-1. Yii 2.0.6
-1. Silex 1.3.4
+1. CodeIgniter 3.0.0
+1. Lumen 5.0.8
+1. Yii 2.0.4
+1. Silex 1.2.4
1. Cygnite 1.3.1
+1. BEAR.Sunday 1.0.0-rc.3
1. FuelPHP 1.8-dev
-1. PHPixie 3.2
+1. CakePHP 3.0.2
1. Aura 2.0.2
-1. CakePHP 3.1.4
-1. Symfony 2.7.7
-1. Laravel 5.1.24
-1. Zend Framework 2.5.2
-1. TYPO3 Flow 3.0.0
+1. Symfony 2.6.6
+1. Laravel 5.0.27
+1. Zend Framework 2.4.0
+1. TYPO3 Flow 2.3.3
## Results
### Benchmarking Environment
-* CentOS 6.6 64bit (VM; VirtualBox)
- * PHP 5.5.30 (Remi RPM)
+* CentOS 6.5 64bit (VM; VirtualBox)
+ * PHP 5.5.23 (Remi RPM)
* Zend OPcache v7.0.4-dev
* Apache 2.2
@@ -67,38 +57,42 @@ If you find something wrong with my code, please feel free to send Pull Requests
These are my benchmarks, not yours. **I encourage you to run on your (production equivalent) environments.**
-(2015/11/29)
-
-
+(2015/05/02)
|framework |requests per second|relative|peak memory|relative|
|-------------------|------------------:|-------:|----------:|-------:|
-|phalcon-2.0 | 1,746.90| 64.7| 0.27| 1.0|
-|ice-1.0 | 1,454.79| 53.9| 0.26| 1.0|
-|tipsy-0.10 | 1,425.66| 52.8| 0.32| 1.2|
-|fatfree-3.5 | 1,106.20| 41.0| 0.42| 1.6|
-|slim-2.6 | 880.24| 32.6| 0.47| 1.8|
-|ci-3.0 | 810.99| 30.1| 0.43| 1.7|
-|nofuss-1.2 | 672.16| 24.9| 0.40| 1.5|
-|slim-3.0 | 534.16| 19.8| 0.61| 2.4|
-|bear-1.0 | 442.63| 16.4| 0.76| 2.9|
-|lumen-5.1 | 412.36| 15.3| 0.95| 3.7|
-|ze-1.0 | 391.97| 14.5| 0.80| 3.1|
-|radar-1.0-dev | 369.79| 13.7| 0.70| 2.7|
-|yii-2.0 | 379.77| 14.1| 1.37| 5.3|
-|silex-1.3 | 383.66| 14.2| 0.86| 3.3|
-|cygnite-1.3 | 385.16| 14.3| 0.76| 2.9|
-|fuel-1.8-dev | 346.33| 12.8| 0.65| 2.5|
-|phpixie-3.2 | 236.58| 8.8| 1.31| 5.1|
-|aura-2.0 | 233.80| 8.7| 0.89| 3.5|
-|cake-3.1 | 207.27| 7.7| 1.37| 5.3|
-|symfony-2.7 | 101.99| 3.8| 3.21| 12.4|
-|laravel-5.1 | 91.59| 3.4| 2.76| 10.7|
-|zf-2.5 | 81.13| 3.0| 3.02| 11.7|
-|typo3f-3.0 | 26.98| 1.0| 6.50| 25.2|
+|phalcon-2.0 | 1,427.29| 34.8| 0.50| 1.0|
+|ice-1.0 | 1,080.03| 26.4| 0.50| 1.0|
+|slim-2.6 | 775.52| 18.9| 0.50| 1.0|
+|codeigniter-3.0 | 704.02| 17.2| 0.50| 1.0|
+|lumen-5.0 | 371.62| 9.1| 1.00| 2.0|
+|yii-2.0 | 353.19| 8.6| 1.75| 3.5|
+|silex-1.2 | 348.75| 8.5| 1.00| 2.0|
+|cygnite-1.3 | 340.16| 8.3| 0.75| 1.5|
+|bear-1.0 | 328.33| 8.0| 1.00| 2.0|
+|fuel-1.8-dev | 299.56| 7.3| 0.75| 1.5|
+|cake-3.0 (*) | 345.06| 8.4| 1.00| 2.0|
+|aura-2.0 | 208.22| 5.1| 1.00| 2.0|
+|symfony-2.6 (*) | 181.19| 4.4| 2.00| 4.0|
+|laravel-5.0 | 71.75| 1.8| 2.75| 5.5|
+|zf-2.4 (*) | 75.24| 1.8| 3.00| 6.0|
+|typo3-flow-2.3 | 40.96| 1.0| 5.25| 10.5|
Note(1): All the results are run on php with `phalcon.so` and `ice.so`. If you don't load phalcon.so or ice.so, the rps except for Phalcon or Ice probably increase a bit.
+Note(2): Only frameworks with (*) mark are optimized, and optimized does not mean fully optimized. Other frameworks are not optimized at all.
+
+#### Comparision before and after optimization
+
+|framework |requests per second|relative|peak memory|relative|
+|-------------------|------------------:|-------:|----------:|-------:|
+|cake-3.0 | 261.22| 1.0| 1.25| 1.3|
+|cake-3.0 (*) | 345.06| 1.3| 1.00| 1.0|
+|symfony-2.6 | 100.28| 1.0| 3.00| 1.5|
+|symfony-2.6 (*) | 181.19| 1.8| 2.00| 1.0|
+|zf-2.4 | 75.75| 1.0| 3.00| 1.0|
+|zf-2.4 (*) | 75.24| 1.0| 3.00| 1.0|
+
## How to Benchmark
Install source code as :
@@ -106,6 +100,7 @@ Install source code as :
~~~
$ git clone https://github.com/kenjis/php-framework-benchmark.git
$ cd php-framework-benchmark
+$ git checkout optimize
$ sh setup.sh
~~~
@@ -152,30 +147,24 @@ If you want to see current configuration, run `sudo sysctl -a`.
## References
-* [Aura](http://auraphp.com/) ([@auraphp](https://twitter.com/auraphp))
-* [BEAR.Sunday](https://bearsunday.github.io/) ([@BEARSunday](https://twitter.com/BEARSunday))
-* [CakePHP](http://cakephp.org/) ([@cakephp](https://twitter.com/cakephp))
-* [CodeIgniter](http://www.codeigniter.com/) ([@CodeIgniter](https://twitter.com/CodeIgniter))
-* [Cygnite](http://www.cygniteframework.com/) ([@cygnitephp](https://twitter.com/cygnitephp))
-* [FatFree](http://fatfreeframework.com/) ([@phpfatfree](https://twitter.com/phpfatfree))
-* [FuelPHP](http://fuelphp.com/) ([@fuelphp](https://twitter.com/fuelphp))
-* [Ice](http://www.iceframework.org/) ([@iceframework](https://twitter.com/iceframework))
+* [Aura](http://auraphp.com/)
+* [BEAR.Sunday](https://bearsunday.github.io/)
+* [CakePHP](http://cakephp.org/)
+* [CodeIgniter](http://www.codeigniter.com/)
+* [Cygnite](http://www.cygniteframework.com/)
+* [FuelPHP](http://fuelphp.com/)
+* [Ice](http://www.iceframework.org/)
* See https://github.com/kenjis/php-framework-benchmark/pull/17#issuecomment-98244668
-* [Laravel](http://laravel.com/) ([@laravelphp](https://twitter.com/laravelphp))
+* [Laravel](http://laravel.com/)
* [Lumen](http://lumen.laravel.com/)
-* [NoFussFramework](http://www.nofussframework.com/)
-* [Phalcon](http://phalconphp.com/) ([@phalconphp](https://twitter.com/phalconphp))
-* [PHPixie](http://phpixie.com/) ([@phpixie](https://twitter.com/phpixie))
-* [Radar](https://github.com/radarphp/Radar.Project)
+* [Phalcon](http://phalconphp.com/)
* [Silex](http://silex.sensiolabs.org/)
-* [Slim](http://www.slimframework.com/) ([@slimphp](https://twitter.com/slimphp))
-* [Symfony](http://symfony.com/) ([@symfony](https://twitter.com/symfony))
+* [Slim](http://www.slimframework.com/)
+* [Symfony](http://symfony.com/)
* [How to Deploy a Symfony Application](http://symfony.com/doc/current/cookbook/deployment/tools.html)
-* [Tipsy](http://tipsy.la)
-* [TYPO3 Flow](http://flow.typo3.org/) ([@neoscms](https://twitter.com/neoscms))
-* [Yii](http://www.yiiframework.com/) ([@yiiframework](https://twitter.com/yiiframework))
-* [zend-expressive](https://github.com/zendframework/zend-expressive) ([@zfdevteam](https://twitter.com/zfdevteam))
-* [Zend Framework](http://framework.zend.com/) ([@zfdevteam](https://twitter.com/zfdevteam))
+* [TYPO3 Flow](http://flow.typo3.org/)
+* [Yii](http://www.yiiframework.com/)
+* [Zend Framework](http://framework.zend.com/)
## Other Benchmarks
diff --git a/cake-3.0/config/bootstrap.php b/cake-3.0/config/bootstrap.php
index 2033281a3..dca8790a9 100644
--- a/cake-3.0/config/bootstrap.php
+++ b/cake-3.0/config/bootstrap.php
@@ -132,12 +132,12 @@
unset($httpHost, $s);
}
-Cache::config(Configure::consume('Cache'));
-ConnectionManager::config(Configure::consume('Datasources'));
-Email::configTransport(Configure::consume('EmailTransport'));
-Email::config(Configure::consume('Email'));
-Log::config(Configure::consume('Log'));
-Security::salt(Configure::consume('Security.salt'));
+//Cache::config(Configure::consume('Cache'));
+//ConnectionManager::config(Configure::consume('Datasources'));
+//Email::configTransport(Configure::consume('EmailTransport'));
+//Email::config(Configure::consume('Email'));
+//Log::config(Configure::consume('Log'));
+//Security::salt(Configure::consume('Security.salt'));
/**
* The default crypto extension in 3.0 is OpenSSL.
@@ -149,14 +149,14 @@
/**
* Setup detectors for mobile and tablet.
*/
-Request::addDetector('mobile', function ($request) {
- $detector = new \Detection\MobileDetect();
- return $detector->isMobile();
-});
-Request::addDetector('tablet', function ($request) {
- $detector = new \Detection\MobileDetect();
- return $detector->isTablet();
-});
+//Request::addDetector('mobile', function ($request) {
+// $detector = new \Detection\MobileDetect();
+// return $detector->isMobile();
+//});
+//Request::addDetector('tablet', function ($request) {
+// $detector = new \Detection\MobileDetect();
+// return $detector->isTablet();
+//});
/**
* Custom Inflector rules, can be set to correctly pluralize or singularize
@@ -179,7 +179,7 @@
*
*/
-Plugin::load('Migrations');
+//Plugin::load('Migrations');
// Only try to load DebugKit in development mode
// Debug Kit should not be installed on a production system
@@ -190,6 +190,6 @@
/**
* Connect middleware/dispatcher filters.
*/
-DispatcherFactory::add('Asset');
+//DispatcherFactory::add('Asset');
DispatcherFactory::add('Routing');
DispatcherFactory::add('ControllerFactory');
diff --git a/cake-3.0/config/routes.php b/cake-3.0/config/routes.php
index 5c6cd5c4e..a14915716 100644
--- a/cake-3.0/config/routes.php
+++ b/cake-3.0/config/routes.php
@@ -41,18 +41,21 @@
*/
Router::defaultRouteClass('Route');
-Router::scope('/', function ($routes) {
+Router::scope('/hello', function ($routes) {
+ $routes->connect('/index', ['controller' => 'Hello', 'action' => 'index']);
+
+//Router::scope('/', function ($routes) {
/**
* Here, we are connecting '/' (base path) to a controller called 'Pages',
* its action called 'display', and we pass a param to select the view file
* to use (in this case, src/Template/Pages/home.ctp)...
*/
- $routes->connect('/', ['controller' => 'Pages', 'action' => 'display', 'home']);
+// $routes->connect('/', ['controller' => 'Pages', 'action' => 'display', 'home']);
/**
* ...and connect the rest of 'Pages' controller's URLs.
*/
- $routes->connect('/pages/*', ['controller' => 'Pages', 'action' => 'display']);
+// $routes->connect('/pages/*', ['controller' => 'Pages', 'action' => 'display']);
/**
* Connect catchall routes for all controllers.
@@ -70,11 +73,11 @@
* You can remove these routes once you've connected the
* routes you want in your application.
*/
- $routes->fallbacks('InflectedRoute');
+// $routes->fallbacks('InflectedRoute');
});
/**
* Load all plugin routes. See the Plugin documentation on
* how to customize the loading of plugin routes.
*/
-Plugin::routes();
+//Plugin::routes();
diff --git a/cake-3.0/src/Controller/AppController.php b/cake-3.0/src/Controller/AppController.php
index 79f5a12c3..103877e11 100644
--- a/cake-3.0/src/Controller/AppController.php
+++ b/cake-3.0/src/Controller/AppController.php
@@ -36,6 +36,6 @@ class AppController extends Controller
*/
public function initialize()
{
- $this->loadComponent('Flash');
+// $this->loadComponent('Flash');
}
}
diff --git a/output/results.hello_world.log b/output/results.hello_world.log
index 64323603c..11e881cea 100644
--- a/output/results.hello_world.log
+++ b/output/results.hello_world.log
@@ -1,23 +1,16 @@
-phalcon-2.0: 1746.90: 278432: 0.001488: 5
-ice-1.0: 1454.79: 270376: 0.001139: 4
-tipsy-0.10: 1425.66: 332640: 0.001068: 18
-fatfree-3.5: 1106.20: 438488: 0.001483: 9
-slim-2.6: 880.24: 494360: 0.001359: 24
-ci-3.0: 810.99: 447096: 0.001257: 26
-nofuss-1.2: 672.16: 417704: 0.007358: 21
-slim-3.0: 534.16: 643752: 0.001601: 56
-bear-1.0: 442.63: 794624: 0.008693: 98
-lumen-5.1: 412.36: 999352: 0.002775: 37
-ze-1.0: 391.97: 838024: 0.002283: 67
-radar-1.0-dev: 369.79: 739008: 0.003101: 73
-yii-2.0: 379.77: 1435968: 0.002907: 49
-silex-1.3: 383.66: 900000: 0.010153: 64
-cygnite-1.3: 385.16: 793584: 0.003314: 70
-fuel-1.8-dev: 346.33: 680384: 0.002663: 44
-phpixie-3.2: 236.58: 1374400: 0.008409: 164
-aura-2.0: 233.80: 937344: 0.011615: 68
-cake-3.1: 207.27: 1439320: 0.004517: 84
-symfony-2.7: 101.99: 3363064: 0.014221: 106
-laravel-5.1: 91.59: 2889400: 0.024721: 39
-zf-2.5: 81.13: 3161792: 0.015882: 204
-typo3f-3.0: 26.98: 6814840: 0.105535: 277
+phalcon-2.0: 1427.29: 524288: 0.001249
+ice-1.0: 1080.03: 524288: 0.001117
+slim-2.6: 775.52: 524288: 0.001306
+codeigniter-3.0: 704.02: 524288: 0.001979
+lumen-5.0: 371.62: 1048576: 0.004153
+yii-2.0: 353.19: 1835008: 0.002520
+silex-1.2: 348.75: 1048576: 0.002944
+cygnite-1.3: 340.16: 786432: 0.002997
+bear-1.0: 328.33: 1048576: 0.002877
+fuel-1.8-dev: 299.56: 786432: 0.004232
+cake-3.0: 345.06: 1048576: 0.002707
+aura-2.0: 208.22: 1048576: 0.004123
+symfony-2.6: 181.19: 2097152: 0.005751
+laravel-5.0: 71.75: 2883584: 0.027018
+zf-2.4: 75.24: 3145728: 0.028073
+typo3-flow-2.3: 40.96: 5505024: 0.063222
diff --git a/symfony-2.6/app/AppKernel.php b/symfony-2.6/app/AppKernel.php
index bccaf3825..a312cae01 100644
--- a/symfony-2.6/app/AppKernel.php
+++ b/symfony-2.6/app/AppKernel.php
@@ -9,19 +9,19 @@ 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 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 AppBundle\AppBundle(),
);
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
- $bundles[] = new Acme\DemoBundle\AcmeDemoBundle();
+// $bundles[] = new Acme\DemoBundle\AcmeDemoBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
diff --git a/symfony-2.6/app/config/config.yml b/symfony-2.6/app/config/config.yml
index bf4da5135..e87efd19d 100644
--- a/symfony-2.6/app/config/config.yml
+++ b/symfony-2.6/app/config/config.yml
@@ -1,7 +1,7 @@
imports:
- { resource: parameters.yml }
- - { resource: security.yml }
- - { resource: services.yml }
+# - { resource: security.yml }
+# - { resource: services.yml }
framework:
#esi: ~
@@ -10,49 +10,49 @@ framework:
router:
resource: "%kernel.root_dir%/config/routing.yml"
strict_requirements: ~
- form: ~
- csrf_protection: ~
- validation: { enable_annotations: true }
- templating:
- engines: ['twig']
- #assets_version: SomeVersionScheme
+# form: ~
+# csrf_protection: ~
+# validation: { enable_annotations: true }
+# templating:
+# engines: ['twig']
+# #assets_version: SomeVersionScheme
default_locale: "%locale%"
- trusted_hosts: ~
- trusted_proxies: ~
- session:
- # handler_id set to null will use default session handler from php.ini
- handler_id: ~
- fragments: ~
- http_method_override: true
+# trusted_hosts: ~
+# trusted_proxies: ~
+# session:
+# # handler_id set to null will use default session handler from php.ini
+# handler_id: ~
+# fragments: ~
+# http_method_override: true
# Twig Configuration
-twig:
- debug: "%kernel.debug%"
- strict_variables: "%kernel.debug%"
+#twig:
+# debug: "%kernel.debug%"
+# strict_variables: "%kernel.debug%"
# Assetic Configuration
-assetic:
- debug: "%kernel.debug%"
- use_controller: false
- bundles: [ ]
- #java: /usr/bin/java
- filters:
- cssrewrite: ~
- #closure:
- # jar: "%kernel.root_dir%/Resources/java/compiler.jar"
- #yui_css:
- # jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar"
+#assetic:
+# debug: "%kernel.debug%"
+# use_controller: false
+# bundles: [ ]
+# #java: /usr/bin/java
+# filters:
+# cssrewrite: ~
+# #closure:
+# # jar: "%kernel.root_dir%/Resources/java/compiler.jar"
+# #yui_css:
+# # jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar"
# Doctrine Configuration
-doctrine:
- dbal:
- driver: "%database_driver%"
- host: "%database_host%"
- port: "%database_port%"
- dbname: "%database_name%"
- user: "%database_user%"
- password: "%database_password%"
- charset: UTF8
+#doctrine:
+# dbal:
+# driver: "%database_driver%"
+# host: "%database_host%"
+# port: "%database_port%"
+# dbname: "%database_name%"
+# user: "%database_user%"
+# password: "%database_password%"
+# charset: UTF8
# if using pdo_sqlite as your database driver:
# 1. add the path in parameters.yml
# e.g. database_path: "%kernel.root_dir%/data/data.db3"
@@ -60,14 +60,14 @@ doctrine:
# 3. Uncomment next line:
# path: "%database_path%"
- orm:
- auto_generate_proxy_classes: "%kernel.debug%"
- auto_mapping: true
+# orm:
+# auto_generate_proxy_classes: "%kernel.debug%"
+# auto_mapping: true
# Swiftmailer Configuration
-swiftmailer:
- transport: "%mailer_transport%"
- host: "%mailer_host%"
- username: "%mailer_user%"
- password: "%mailer_password%"
- spool: { type: memory }
+#swiftmailer:
+# transport: "%mailer_transport%"
+# host: "%mailer_host%"
+# username: "%mailer_user%"
+# password: "%mailer_password%"
+# spool: { type: memory }
diff --git a/symfony-2.6/app/config/config_prod.yml b/symfony-2.6/app/config/config_prod.yml
index 342837a03..6dfaef00d 100644
--- a/symfony-2.6/app/config/config_prod.yml
+++ b/symfony-2.6/app/config/config_prod.yml
@@ -11,15 +11,15 @@ imports:
# result_cache_driver: apc
# query_cache_driver: apc
-monolog:
- handlers:
- main:
- type: fingers_crossed
- action_level: error
- handler: nested
- nested:
- type: stream
- path: "%kernel.logs_dir%/%kernel.environment%.log"
- level: debug
- console:
- type: console
+#monolog:
+# handlers:
+# main:
+# type: fingers_crossed
+# action_level: error
+# handler: nested
+# nested:
+# type: stream
+# path: "%kernel.logs_dir%/%kernel.environment%.log"
+# level: debug
+# console:
+# type: console
diff --git a/symfony-2.6/app/config/parameters.yml b/symfony-2.6/app/config/parameters.yml
index 2d25649f9..77d1e1d42 100644
--- a/symfony-2.6/app/config/parameters.yml
+++ b/symfony-2.6/app/config/parameters.yml
@@ -1,14 +1,14 @@
# This file is auto-generated during the composer install
parameters:
- database_driver: pdo_mysql
- database_host: 127.0.0.1
- database_port: null
- database_name: symfony
- database_user: root
- database_password: null
- mailer_transport: smtp
- mailer_host: 127.0.0.1
- mailer_user: null
- mailer_password: null
+# database_driver: pdo_mysql
+# database_host: 127.0.0.1
+# database_port: null
+# database_name: symfony
+# database_user: root
+# database_password: null
+# mailer_transport: smtp
+# mailer_host: 127.0.0.1
+# mailer_user: null
+# mailer_password: null
locale: en
secret: 410a68164f904a92fa2fd1883a835ff64a0b578d
diff --git a/symfony-2.6/app/config/parameters.yml.dist b/symfony-2.6/app/config/parameters.yml.dist
index 1da778f41..3b66dbb2c 100644
--- a/symfony-2.6/app/config/parameters.yml.dist
+++ b/symfony-2.6/app/config/parameters.yml.dist
@@ -1,18 +1,18 @@
# This file is a "template" of what your parameters.yml file should look like
parameters:
- database_driver: pdo_mysql
- database_host: 127.0.0.1
- database_port: ~
- database_name: symfony
- database_user: root
- database_password: ~
- # You should uncomment this if you want use pdo_sqlite
- # database_path: "%kernel.root_dir%/data.db3"
+# database_driver: pdo_mysql
+# database_host: 127.0.0.1
+# database_port: ~
+# database_name: symfony
+# database_user: root
+# database_password: ~
+# # You should uncomment this if you want use pdo_sqlite
+# # database_path: "%kernel.root_dir%/data.db3"
- mailer_transport: smtp
- mailer_host: 127.0.0.1
- mailer_user: ~
- mailer_password: ~
+# mailer_transport: smtp
+# mailer_host: 127.0.0.1
+# mailer_user: ~
+# mailer_password: ~
locale: en
diff --git a/symfony-2.6/app/config/routing.yml b/symfony-2.6/app/config/routing.yml
index 8eadc31ae..2a9b8c1be 100644
--- a/symfony-2.6/app/config/routing.yml
+++ b/symfony-2.6/app/config/routing.yml
@@ -1,3 +1,3 @@
-app:
- resource: "@AppBundle/Controller/"
- type: annotation
+hello_world:
+ path: /hello/index
+ defaults: { _controller: AppBundle:Hello:index }
diff --git a/symfony-2.6/src/AppBundle/Controller/HelloController.php b/symfony-2.6/src/AppBundle/Controller/HelloController.php
index b8b7e924d..2a4b75b8b 100644
--- a/symfony-2.6/src/AppBundle/Controller/HelloController.php
+++ b/symfony-2.6/src/AppBundle/Controller/HelloController.php
@@ -2,15 +2,11 @@
namespace AppBundle\Controller;
-use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;
class HelloController extends Controller
{
- /**
- * @Route("/hello/index", name="hello_world")
- */
public function indexAction()
{
return new Response('Hello World!');
diff --git a/zf-2.4/config/application.config.php b/zf-2.4/config/application.config.php
index a1f1d6604..fbf5d1351 100644
--- a/zf-2.4/config/application.config.php
+++ b/zf-2.4/config/application.config.php
@@ -26,21 +26,21 @@
// Whether or not to enable a configuration cache.
// If enabled, the merged configuration will be cached and used in
// subsequent requests.
- //'config_cache_enabled' => $booleanValue,
+ 'config_cache_enabled' => true,
// The key used to create the configuration cache file name.
- //'config_cache_key' => $stringKey,
+ 'config_cache_key' => 'config_cache',
// Whether or not to enable a module class map cache.
// If enabled, creates a module class map cache which will be used
// by in future requests, to reduce the autoloading process.
- //'module_map_cache_enabled' => $booleanValue,
+ 'module_map_cache_enabled' => true,
// The key used to create the class map cache file name.
- //'module_map_cache_key' => $stringKey,
+ 'module_map_cache_key' => 'module_config_cache',
// The path in which to cache merged configuration.
- //'cache_dir' => $stringPath,
+ 'cache_dir' => './data/cache',
// Whether or not to enable modules dependency checking.
// Enabled by default, prevents usage of modules that depend on other modules
diff --git a/zf-2.4/module/Application/Module.php b/zf-2.4/module/Application/Module.php
index 89731cc8d..9ffb9a251 100644
--- a/zf-2.4/module/Application/Module.php
+++ b/zf-2.4/module/Application/Module.php
@@ -29,6 +29,16 @@ public function getConfig()
public function getAutoloaderConfig()
{
return array(
+ /*
+ * This autoloader is a much higher performing autoloader than the standard.
+ * The reason being, is because it doesn’t search the filesystem to attempt
+ * to resolve a class.
+ */
+ 'Zend\Loader\ClassMapAutoloader' => array(
+ array(
+ __DIR__ . '/autoload_classmap.php'
+ )
+ ),
'Zend\Loader\StandardAutoloader' => array(
'namespaces' => array(
__NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,