Changes between Version 25 and Version 26 of members/GRIP-UQAM/Symfony


Ignore:
Timestamp:
Oct 3, 2016, 6:31:21 PM (3 years ago)
Author:
https://id.mayfirst.org/gripuqam
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • members/GRIP-UQAM/Symfony

    v25 v26  
    3333* http://symfony.com/components
    3434* http://symfony.com/doc/current/components
     35==== Some popular Components ====
     36==== Dependency Injection ====
     37* [http://php-and-symfony.matthiasnoback.nl/2013/01/dependency-injection-smells/ Dependency injection smells (2013)]
     38* [http://php-and-symfony.matthiasnoback.nl/2014/11/decoupling-from-a-service-locator/ Decoupling from a service locator (2014)]
    3539==== Form ====
    3640==== HttpFoundation ====
     
    4246* [https://packagist.org/packages/symfony/psr-http-message-bridge symfony/psr-http-message-bridge]
    4347* [http://php-fig.org/psr/psr-7/ PSR-7: HTTP message interfaces]
    44 ==== Translation ====
    45 * [http://symfony.com/doc/current/components/translation.html The Translation Component]
    46 * [http://symfony.com/doc/current/session/locale_sticky_session.html Making the Locale "Sticky" during a User's Session] See HttpFoundation component.
    47 * see Bundle-Form-Translation
    48 * see Bundle-Admin-Translation
    49 ==== Guard (New in 2.8!) ====
     48==== Routing ====
     49===== RouteCollection vs RouteCollectionBuilder =====
     50{{{#!th
     51**[http://api.symfony.com/master/Symfony/Component/Routing/RouteCollection.html RouteCollection]**
     52}}}
     53{{{#!th
     54**[http://api.symfony.com/master/Symfony/Component/Routing/RouteCollectionBuilder.html RouteCollectionBuilder]**
     55}}}
     56|----------------
     57|| || ||
     58{{{#!td rowspan=2
     59**add**(string $name, Route $route)
     60}}}
     61{{{#!td
     62$this   **addRoute**(Route $route, string|null $name = null)
     63}}}
     64|----------------
     65{{{#!td
     66Route   **add**(string $path, string $controller, string|null $name = null
     67}}}
     68|----------------
     69{{{#!td
     70{{{#!js
     71new RouteCollection()->add('root', new Route('/', [
     72    '_controller' => 'FrameworkBundle:Redirect:redirect',
     73    'route'       => 'sonata_admin_dashboard',
     74    'permanent'   => true,
     75])); // to check
     76}}}
     77}}}
     78{{{#!td
     79{{{#!js
     80new RouteCollectionBuilder()->addRoute(new Route('/', [
     81    '_controller' => 'FrameworkBundle:Redirect:redirect',
     82    'route'       => 'sonata_admin_dashboard',
     83    'permanent'   => true,
     84]),
     85    'root'
     86); // to check
     87}}}
     88}}}
     89|----------------
     90{{{#!td
     91//Does not exist: cf// $loader->**import**(...)
     92}}}
     93{{{#!td
     94RouteCollectionBuilder  **import**(mixed $resource, string|null $prefix = '/', string $type = null)
     95}}}
     96|----------------
     97{{{#!td
     98//Does not exist: cf//  **addCollection**
     99}}}
     100{{{#!td
     101**mount**($prefix, RouteCollectionBuilder $builder)
     102}}}
     103|----------------
     104{{{#!td
     105{{{#!js
     106$collection = new RouteCollection();
     107$routing = $loader->import(
     108    "@SonataAdminBundle/Resources/config/sonata_admin.xml"
     109);
     110$routing->setPrefix('/admin');
     111$collection->addCollection($routing);
     112}}}
     113}}}
     114{{{#!td
     115{{{#!js
     116$routes->mount('/admin', $routes->import('@SonataAdminBundle/Resources/config/routing/sonata_admin.xml'));
     117}}}
     118}}}
     119|----------------
     120Written for 3.0
     121* [http://symfony.com/doc/current/cmf/tutorial/sonata-admin.html cmf/tutorial/sonata-admin]
     122* [http://symfony.com/doc/current/cookbook/routing/custom_route_loader.html cookbook/routing/custom_route_loader]
     123==== Security ====
     124===== Guard (New in 2.8!) =====
    50125* [https://packagist.org/packages/symfony/security-guard symfony/security-guard]
    51126* [https://symfony.com/doc/current/security/guard_authentication.html How to Create a Custom Authentication System with Guard]
     
    58133* [https://packagist.org/packages/knpuniversity/oauth2-client-bundle knpuniversity/oauth2-client-bundle]
    59134* [https://packagist.org/packages/knpuniversity/guard-bundle Upgrade from KNP Guard bundle to Symfony Guard component]
    60 ==== Routing ====
    61 ===== RouteCollection vs RouteCollectionBuilder =====
    62 {{{#!th
    63 **[http://api.symfony.com/master/Symfony/Component/Routing/RouteCollection.html RouteCollection]**
    64 }}}
    65 {{{#!th
    66 **[http://api.symfony.com/master/Symfony/Component/Routing/RouteCollectionBuilder.html RouteCollectionBuilder]**
    67 }}}
    68 |----------------
    69 || || ||
    70 {{{#!td rowspan=2
    71 **add**(string $name, Route $route)
    72 }}}
    73 {{{#!td
    74 $this   **addRoute**(Route $route, string|null $name = null)
    75 }}}
    76 |----------------
    77 {{{#!td
    78 Route   **add**(string $path, string $controller, string|null $name = null
    79 }}}
    80 |----------------
    81 {{{#!td
    82 {{{#!js
    83 new RouteCollection()->add('root', new Route('/', [
    84     '_controller' => 'FrameworkBundle:Redirect:redirect',
    85     'route'       => 'sonata_admin_dashboard',
    86     'permanent'   => true,
    87 ])); // to check
    88 }}}
    89 }}}
    90 {{{#!td
    91 {{{#!js
    92 new RouteCollectionBuilder()->addRoute(new Route('/', [
    93     '_controller' => 'FrameworkBundle:Redirect:redirect',
    94     'route'       => 'sonata_admin_dashboard',
    95     'permanent'   => true,
    96 ]),
    97     'root'
    98 ); // to check
    99 }}}
    100 }}}
    101 |----------------
    102 {{{#!td
    103 //Does not exist: cf// $loader->**import**(...)
    104 }}}
    105 {{{#!td
    106 RouteCollectionBuilder  **import**(mixed $resource, string|null $prefix = '/', string $type = null)
    107 }}}
    108 |----------------
    109 {{{#!td
    110 //Does not exist: cf//  **addCollection**
    111 }}}
    112 {{{#!td
    113 **mount**($prefix, RouteCollectionBuilder $builder)
    114 }}}
    115 |----------------
    116 {{{#!td
    117 {{{#!js
    118 $collection = new RouteCollection();
    119 $routing = $loader->import(
    120     "@SonataAdminBundle/Resources/config/sonata_admin.xml"
    121 );
    122 $routing->setPrefix('/admin');
    123 $collection->addCollection($routing);
    124 }}}
    125 }}}
    126 {{{#!td
    127 {{{#!js
    128 $routes->mount('/admin', $routes->import('@SonataAdminBundle/Resources/config/routing/sonata_admin.xml'));
    129 }}}
    130 }}}
    131 |----------------
    132 Written for 3.0
    133 * [http://symfony.com/doc/current/cmf/tutorial/sonata-admin.html cmf/tutorial/sonata-admin]
    134 * [http://symfony.com/doc/current/cookbook/routing/custom_route_loader.html cookbook/routing/custom_route_loader]
     135==== Translation ====
     136* [http://symfony.com/doc/current/components/translation.html The Translation Component]
     137* [http://symfony.com/doc/current/session/locale_sticky_session.html Making the Locale "Sticky" during a User's Session] See HttpFoundation component.
     138* see Bundle-Form-Translation
     139* see Bundle-Admin-Translation
    135140=== Bundles ===
    136141* https://packagist.org/search/?q=bundle