7. 2012 2013 2014 2015 2016 2017
2.0
2.1
2.2
2.3
2.4
2.5
2.6
2.7
Stabilisation
Maintenance
Development
martes 25 de junio de 13
8. 2012 2013 2014 2015 2016 2017
2.0
2.1
2.2
2.3
2.4
2.5
2.6
2.7
Estabilización
Mantenimiento
Desarrollo
First LTS of the 2.x era
martes 25 de junio de 13
9. 2012 2013 2014 2015 2016 2017
2.0
2.1
2.2
2.3
2.4
2.5
2.6
2.7
Estabilización
Mantenimiento
Desarrollo
Backwards compatibility
First LTS of the 2.x era
martes 25 de junio de 13
11. BrowserKit
Finder
Locale
Routing
ClassLoader Config Console CssSelector
DI DomCrawler EventDispatcher Filesystem
Form HttpFoundation HttpKernel
Process
Security Serializer Templating
Translation Validator
Yaml
22 components2.0
martes 25 de junio de 13
12. BrowserKit
Finder
Locale
Routing
ClassLoader Config Console CssSelector
DI DomCrawler EventDispatcher Filesystem
Form HttpFoundation HttpKernel
OptionsResolver Process
Security Serializer Templating
Translation Validator
Yaml
23 components2.12.0
martes 25 de junio de 13
13. BrowserKit
Finder
Locale
Routing
ClassLoader Config Console CssSelector
DI DomCrawler EventDispatcher Filesystem
Form HttpFoundation HttpKernel
OptionsResolver Process PropertyAccess
Security Serializer Stopwatch Templating
Translation Validator
Yaml
25 components2.22.12.0
martes 25 de junio de 13
14. BrowserKit
Debug
Finder
Locale
Routing
ClassLoader Config Console CssSelector
DI DomCrawler EventDispatcher Filesystem
Form HttpFoundation HttpKernel Intl
OptionsResolver Process PropertyAccess
Security Serializer Stopwatch Templating
Translation Validator
Yaml
2.3 27 components2.22.12.0
martes 25 de junio de 13
18. More levels of verbosity
$ php app/console foo --verbose=1 # -v
$ php app/console foo --verbose=2 # -vv
$ php app/console foo --verbose=3 # -vvv
martes 25 de junio de 13
19. class MyCommand extends Command
{
protected function execute($input, $output)
{
$verbosity = $output->getVerbosity();
if ($verbosity === OutputInterface::VERBOSITY_VERBOSE)
{
$output->writeln("Information");
}
if ($verbosity === OutputInterface::VERBOSITY_VERY_VERBOSE)
{
$output->writeln("More information");
}
if ($verbosity === OutputInterface::VERBOSITY_DEBUG)
{
$output->writeln("Even more information");
}
}
martes 25 de junio de 13
20. configuration parameters
$ console container:debug --parameters
$ console container:debug --parameter=kernel.debug
martes 25 de junio de 13
22. more information in router:match
$ php app/console router:match /demo/hello/fabien
Route "_demo_hello" matches
[router] Route "_demo_hello"
Name _demo_hello
Path /demo/hello/{name}
Host ANY
Scheme ANY
Method ANY
Class SymfonyComponentRoutingRoute
Defaults _controller: AcmeDemoBundleController
DemoController::helloAction
Requirements NO CUSTOM
Options compiler_class: SymfonyComponentRoutingRouteCompiler
Path-Regex #^/demo/hello/(?P<name>[^/]++)$#s
martes 25 de junio de 13
27. PHP Fatal error: Uncaught exception 'SymfonyComponentDebug
ExceptionContextErrorException' with message 'Notice: Undefined
variable: foo in index.php line 9' in index.php:9
Stack trace:
#0 index.php(9): SymfonyComponentDebugErrorHandler->handle(8,
'Undefined varia...', '/Users/loalf/Pr...', 9, Array)
#1 {main}
thrown in index.php on line 9
martes 25 de junio de 13
44. +---------------+--------------------------+------------------+
| ISBN | Title | Author |
+---------------+--------------------------+------------------+
| 99921-58-10-7 | Divine Comedy | Dante Alighieri |
| 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
| 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien |
| 80-902734-1-6 | And Then There Were None | Agatha Christie |
+---------------+--------------------------+------------------+
martes 25 de junio de 13
45. $table = $app->getHelperSet()->get('table');
$table
->setHeaders(array('ISBN', 'Title', 'Author'))
->setRows(array(
array('99921-58-10-7', 'Divine Comedy', 'Dante ...'),
array('9971-5-0210-0', 'A Tale of Two Cities', '...'),
array('960-425-059-0', 'The Lord of the Rings', '...'),
array('80-902734-1-6', 'And Then There Were None', '...'),
))
;
$table->render($output);
martes 25 de junio de 13
46. =============== ========================== ==================
ISBN Title Author
=============== ========================== ==================
99921-58-10-7 Divine Comedy Dante Alighieri
9971-5-0210-0 A Tale of Two Cities Charles Dickens
960-425-059-0 The Lord of the Rings J. R. R. Tolkien
80-902734-1-6 And Then There Were None Agatha Christie
=============== ========================== ==================
martes 25 de junio de 13
47. $table = $app->getHelperSet()->get('table');
$table
->setHeaders(array('ISBN', 'Title', 'Author'))
->setLayout(TableHelper::LAYOUT_BORDERLESS)
->setRows(array(
array('99921-58-10-7', 'Divine Comedy', 'Dante ...'),
array('9971-5-0210-0', 'A Tale of Two Cities', '...'),
array('960-425-059-0', 'The Lord of the Rings', '...'),
array('80-902734-1-6', 'And Then There Were None', '...'),
))
;
$table->render($output);
->setLayout(TableHelper::LAYOUT_BORDERLESS)
martes 25 de junio de 13
48. |···············|··························|··················|
| ISBN | Title | Author |
|···············|··························|··················|
| 99921-58-10-7 | Divine Comedy | Dante Alighieri |
| 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
| 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien |
| 80-902734-1-6 | And Then There Were None | Agatha Christie |
|···············|··························|··················|
martes 25 de junio de 13
52. class LightService
{
public function __construct($service)
{
$this->service = $service;
}
public function doFoo() {
$this->service->doFoo();
}
public function doBar() { echo “bar”; }
}
martes 25 de junio de 13
77. What we will see in
Symfony 2.4
martes 25 de junio de 13
78. Besides the few pull requests that
already target 2.4, I have one topic
that I want us to work on for 2.4:
**performance**
martes 25 de junio de 13