Slides changes symfony23
Upcoming SlideShare
Loading in...5
×
 

Slides changes symfony23

on

  • 494 views

 

Statistics

Views

Total Views
494
Views on SlideShare
494
Embed Views
0

Actions

Likes
0
Downloads
6
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Slides changes symfony23 Slides changes symfony23 Presentation Transcript

  • martes 25 de junio de 13
  • Who am Imartes 25 de junio de 13
  • I was born in CórdobaI work in LondonJavier Lópezmartes 25 de junio de 13
  • I’ve workedIPC Media y Sensio Labs UKI work atTimeOutI organizedeSymfonymartes 25 de junio de 13
  • Reasons to upgradeto Symfony 2.3martes 25 de junio de 13
  • #1Stable for products andcompaniesmartes 25 de junio de 13
  • 2012 2013 2014 2015 2016 20172.02.12.22.32.42.52.62.7StabilisationMaintenanceDevelopmentmartes 25 de junio de 13
  • 2012 2013 2014 2015 2016 20172.02.12.22.32.42.52.62.7EstabilizaciónMantenimientoDesarrolloFirst LTS of the 2.x eramartes 25 de junio de 13
  • 2012 2013 2014 2015 2016 20172.02.12.22.32.42.52.62.7EstabilizaciónMantenimientoDesarrolloBackwards compatibilityFirst LTS of the 2.x eramartes 25 de junio de 13
  • #2Less coupled architecturemartes 25 de junio de 13
  • BrowserKitFinderLocaleRoutingClassLoader Config Console CssSelectorDI DomCrawler EventDispatcher FilesystemForm HttpFoundation HttpKernelProcessSecurity Serializer TemplatingTranslation ValidatorYaml22 components2.0martes 25 de junio de 13
  • BrowserKitFinderLocaleRoutingClassLoader Config Console CssSelectorDI DomCrawler EventDispatcher FilesystemForm HttpFoundation HttpKernelOptionsResolver ProcessSecurity Serializer TemplatingTranslation ValidatorYaml23 components2.12.0martes 25 de junio de 13
  • BrowserKitFinderLocaleRoutingClassLoader Config Console CssSelectorDI DomCrawler EventDispatcher FilesystemForm HttpFoundation HttpKernelOptionsResolver Process PropertyAccessSecurity Serializer Stopwatch TemplatingTranslation ValidatorYaml25 components2.22.12.0martes 25 de junio de 13
  • BrowserKitDebugFinderLocaleRoutingClassLoader Config Console CssSelectorDI DomCrawler EventDispatcher FilesystemForm HttpFoundation HttpKernel IntlOptionsResolver Process PropertyAccessSecurity Serializer Stopwatch TemplatingTranslation ValidatorYaml2.3 27 components2.22.12.0martes 25 de junio de 13
  • #3More documentationmartes 25 de junio de 13
  • 2.02010951BookCookbook2.12011858Components20120632.220123682.3# pagesmartes 25 de junio de 13
  • #4Easier to debugmartes 25 de junio de 13
  • More levels of verbosity$ php app/console foo --verbose=1 # -v$ php app/console foo --verbose=2 # -vv$ php app/console foo --verbose=3 # -vvvmartes 25 de junio de 13
  • 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
  • configuration parameters$ console container:debug --parameters$ console container:debug --parameter=kernel.debugmartes 25 de junio de 13
  • stack trace en plain textmartes 25 de junio de 13
  • more information in router:match$ php app/console router:match /demo/hello/fabienRoute "_demo_hello" matches[router] Route "_demo_hello"Name _demo_helloPath /demo/hello/{name}Host ANYScheme ANYMethod ANYClass SymfonyComponentRoutingRouteDefaults _controller: AcmeDemoBundleControllerDemoController::helloActionRequirements NO CUSTOMOptions compiler_class: SymfonyComponentRoutingRouteCompilerPath-Regex #^/demo/hello/(?P<name>[^/]++)$#smartes 25 de junio de 13
  • Debug componentmartes 25 de junio de 13
  • echo $foomartes 25 de junio de 13
  • Notice: Undefined variable: foo inindex.php on line 1martes 25 de junio de 13
  • use SymfonyComponentDebugDebug;Debug::$enable();echo $foo;martes 25 de junio de 13
  • PHP Fatal error: Uncaught exception SymfonyComponentDebugExceptionContextErrorException with message Notice: Undefinedvariable: foo in index.php line 9 in index.php:9Stack trace:#0 index.php(9): SymfonyComponentDebugErrorHandler->handle(8,Undefined varia..., /Users/loalf/Pr..., 9, Array)#1 {main}thrown in index.php on line 9martes 25 de junio de 13
  • martes 25 de junio de 13
  • #5A mightier consolemartes 25 de junio de 13
  • Eventsmartes 25 de junio de 13
  • martes 25 de junio de 13
  • $ php app/console fooCommandmartes 25 de junio de 13
  • console.command$ php app/console fooCommandmartes 25 de junio de 13
  • console.command$ php app/console fooCommandfooCommand::run()martes 25 de junio de 13
  • console.command$ php app/console fooCommandfooCommand::run()console.exceptionmartes 25 de junio de 13
  • console.command$ php app/console fooCommandfooCommand::run()console.terminateconsole.exceptionmartes 25 de junio de 13
  • martes 25 de junio de 13
  • Listener.phpmartes 25 de junio de 13
  • namespace AcmeDemoBundle;class Listener{public function onCommand($event){// your code}}Listener.phpmartes 25 de junio de 13
  • namespace AcmeDemoBundle;class Listener{public function onCommand($event){// your code}}Listener.phpmartes 25 de junio de 13
  • parameters.ymlnamespace AcmeDemoBundle;class Listener{public function onCommand($event){// your code}}Listener.phpmartes 25 de junio de 13
  • services:acme.console.listener:class: AcmeDemoBundleListenertags:-name: kernel.event_listenerevent: console.commandmethod: onCommandparameters.ymlnamespace AcmeDemoBundle;class Listener{public function onCommand($event){// your code}}Listener.phpmartes 25 de junio de 13
  • tablesmartes 25 de junio de 13
  • +---------------+--------------------------+------------------+| 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
  • $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
  • =============== ========================== ==================ISBN Title Author=============== ========================== ==================99921-58-10-7 Divine Comedy Dante Alighieri9971-5-0210-0 A Tale of Two Cities Charles Dickens960-425-059-0 The Lord of the Rings J. R. R. Tolkien80-902734-1-6 And Then There Were None Agatha Christie=============== ========================== ==================martes 25 de junio de 13
  • $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
  • |···············|··························|··················|| 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
  • $table = $this->getHelperSet()->get(table);$table->setHorizontalBorderChar("·")->setCrossingChar("<fg=white;bg=red>|</fg=white;bg=red>")->setVerticalBorderChar("<fg=white;bg=red>|</fg=white;bg=red>");martes 25 de junio de 13
  • #6Better performancemartes 25 de junio de 13
  • class HeavyService{public function __construct() { sleep(10); }public function doFoo() { echo “foo”; }}martes 25 de junio de 13
  • 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
  • services:acme.demo.heavy_service:class: AcmeDemoBundleHeavyServiceacme.demo.light_service:class: AcmeDemoBundleLightServicearguments: [@acme.demo.heavy_service]martes 25 de junio de 13
  • class DemoController extends Controller{$ls = $this->get(‘acme.demo.light_service’);$ls->doBar();}martes 25 de junio de 13
  • class DemoController extends Controller{$ls = $this->get(‘acme.demo.light_service’);$ls->doBar();}10220msmartes 25 de junio de 13
  • services:acme.demo.heavy_service:class: AcmeDemoBundleHeavyServicelazy: trueacme.demo.light_service:class: AcmeDemoBundleLightServicearguments: [@acme.demo.heavy_service]martes 25 de junio de 13
  • class DemoController extends Controller{$ls = $this->get(‘acme.demo.light_service’);$ls->doBar();}martes 25 de junio de 13
  • 220msclass DemoController extends Controller{$ls = $this->get(‘acme.demo.light_service’);$ls->doBar();}martes 25 de junio de 13
  • class DemoController extends Controller{$ls = $this->get(‘acme.demo.light_service’);$ls->doFoo();}martes 25 de junio de 13
  • 10220msclass DemoController extends Controller{$ls = $this->get(‘acme.demo.light_service’);$ls->doFoo();}martes 25 de junio de 13
  • composer require ocramius/proxy-managermartes 25 de junio de 13
  • #7More validatorsmartes 25 de junio de 13
  • •Currency•IBAN - International Bank Account NumberBankingmartes 25 de junio de 13
  • • ISBN - International Standard Book Number•ISSN - International Standard Serial NumberPublicationsmartes 25 de junio de 13
  • •EqualTo•NotEqualTo•IdenticalTo•NotIdenticalToComparison•LessThan•LessThanOrEqual•GreaterThan•GreaterThanOrEqualmartes 25 de junio de 13
  • #8More HTML5 compliantmartes 25 de junio de 13
  • MessageNameSurnameEmailBurritos webAndele. Contactanos.sendmartes 25 de junio de 13
  • MessageNameSurnameEmailBurritos webAndele. Contactanos.send<textarea form=my_form>martes 25 de junio de 13
  • $form = $crawler->selectButton(send)->getForm();$values = $form->getValues();$keys = array_keys($values)2.3<sfmartes 25 de junio de 13
  • $form = $crawler->selectButton(send)->getForm();$values = $form->getValues();$keys = array_keys($values)2.3<sf#name, surname, emailmartes 25 de junio de 13
  • $form = $crawler->selectButton(send)->getForm();$values = $form->getValues();$keys = array_keys($values)2.3=sfmartes 25 de junio de 13
  • $form = $crawler->selectButton(send)->getForm();$values = $form->getValues();$keys = array_keys($values)2.3=sf#name, surname, email, messagemartes 25 de junio de 13
  • #9Easier to usemartes 25 de junio de 13
  • parameters.yml generationmartes 25 de junio de 13
  • > composer installGenerating autoload filesCreating the "app/config/parameters.yml" file.Some parameters are missing. Please provide them.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 (ThisTokenIsNotSoSecretChangeIt):martes 25 de junio de 13
  • #*And even more thingsmartes 25 de junio de 13
  • What we will see inSymfony 2.4martes 25 de junio de 13
  • Besides the few pull requests thatalready target 2.4, I have one topicthat I want us to work on for 2.4:**performance**martes 25 de junio de 13
  • https://groups.google.com/forum/#!topic/symfony-devs/rwN1gwuHEC4martes 25 de junio de 13
  • martes 25 de junio de 13
  • AdminBundlemartes 25 de junio de 13
  • CacheAdminBundlemartes 25 de junio de 13
  • CacheRADAdminBundlemartes 25 de junio de 13
  • CacheRADRESTAdminBundlemartes 25 de junio de 13
  • KEEPCALMANDUPGRADESYMFONYmartes 25 de junio de 13
  • Thanks. Questions?FYI, TimeOut is recruitinghttp://joind.in/talk/view/8853@loalfmartes 25 de junio de 13