Changes between Initial Version and Version 1 of members/GRIP-UQAM/Symfony


Ignore:
Timestamp:
Aug 22, 2016, 6:42:15 PM (8 years ago)
Author:
Grip Uqam
Comment:

--

Legend:

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

    v1 v1  
     1== Symfony Programming ==
     2* http://fr.slideshare.net/AcquiaInc/create-a-symfony-application-from-a-drupal-perspective
     3* https://www.youtube.com/results?search_query=symfony
     4* https://www.youtube.com/results?q=knpuniversity
     5 * http://knpuniversity.com/tracks/symfony
     6=== Tutorials ===
     7* [http://www.ens.ro/2012/03/21/jobeet-tutorial-with-symfony2/ Jobeet Tutorial with Symfony2] [http://jobeet.thuau.fr/ fr]
     8* DevAndClick [https://www.youtube.com/channel/UCyEM6z6Ssl9K5Khg46DY3Mw YouTube]
     9=== Software using Symfony ===
     10* //[https://www.symfony.fi/entry/symfony-components-full-stack-framework-cms-ecosystems Symfony components and the full stack framework in CMS ecosystems]
     11==== EZ Plateform ====
     12* EZ Plateform and Symfony Article from Symfony Finland
     13* https://packagist.org/packages/ezsystems/ezplatform
     14* http://share.ez.no/downloads/downloads
     15* https://doc.ez.no/display/TECHDOC/Requirements (Postgres install not yet supported 2016-04)
     16* https://doc.ez.no/display/TECHDOC/Using+Composer
     17=== Symfony Programming Tools ===
     18* [https://packagist.org/packages/sensiolabs-de/deprecation-detector sensiolabs-de/deprecation-detector]
     19* [https://packagist.org/packages/sensiolabs-de/deptrac sensiolabs-de/deptrac]
     20=== Hacking ===
     21==== {{{autoload.php}}} ====
     22* https://github.com/symfony/symfony-standard/blob/master/app/autoload.php The original
     23* https://github.com/symfony-cmf/standard-edition/blob/master/app/autoload.php Almost the same, maybe slightly older version
     24* https://github.com/symfony-cmf/cmf-sandbox/blob/master/app/autoload.php Locale component additions and others
     25=== MicroKernel ===
     26* http://symfony.com/blog/new-in-symfony-2-8-symfony-as-a-microframework
     27* https://symfony.com/doc/current/cookbook/configuration/micro-kernel-trait.html
     28* https://www.youtube.com/results?search_query=symfony+microkernel
     29* https://knpuniversity.com/screencast/new-in-symfony3/micro-kernel
     30* https://www.youtube.com/results?search_query=micro+symfony
     31* http://knpuniversity.com/screencast/micro-symfony
     32=== Components ===
     33==== Form ====
     34===== Translation =====
     35* see Bundle-Form-Translation
     36* see Bundle-Admin-Translation
     37==== Routing ====
     38===== RouteCollection vs RouteCollectionBuilder =====
     39{{{#!th
     40**[http://api.symfony.com/3.0/Symfony/Component/Routing/RouteCollection.html RouteCollection]**
     41}}}
     42{{{#!th
     43**[http://api.symfony.com/3.0/Symfony/Component/Routing/RouteCollectionBuilder.html RouteCollectionBuilder]**
     44}}}
     45|----------------
     46|| || ||
     47{{{#!td rowspan=2
     48**add**(string $name, Route $route)
     49}}}
     50{{{#!td
     51$this   **addRoute**(Route $route, string|null $name = null)
     52}}}
     53|----------------
     54{{{#!td
     55Route   **add**(string $path, string $controller, string|null $name = null
     56}}}
     57|----------------
     58{{{#!td
     59{{{#!js
     60new RouteCollection()->add('root', new Route('/', [
     61    '_controller' => 'FrameworkBundle:Redirect:redirect',
     62    'route'       => 'sonata_admin_dashboard',
     63    'permanent'   => true,
     64])); // to check
     65}}}
     66}}}
     67{{{#!td
     68{{{#!js
     69new RouteCollectionBuilder()->addRoute(new Route('/', [
     70    '_controller' => 'FrameworkBundle:Redirect:redirect',
     71    'route'       => 'sonata_admin_dashboard',
     72    'permanent'   => true,
     73]),
     74    'root'
     75); // to check
     76}}}
     77}}}
     78|----------------
     79{{{#!td
     80//Does not exist: cf// $loader->**import**(...)
     81}}}
     82{{{#!td
     83RouteCollectionBuilder  **import**(mixed $resource, string|null $prefix = '/', string $type = null)
     84}}}
     85|----------------
     86{{{#!td
     87//Does not exist: cf//  **addCollection**
     88}}}
     89{{{#!td
     90**mount**($prefix, RouteCollectionBuilder $builder)
     91}}}
     92|----------------
     93{{{#!td
     94{{{#!js
     95$collection = new RouteCollection();
     96$routing = $loader->import(
     97    "@SonataAdminBundle/Resources/config/sonata_admin.xml"
     98);
     99$routing->setPrefix('/admin');
     100$collection->addCollection($routing);
     101}}}
     102}}}
     103{{{#!td
     104{{{#!js
     105$routes->mount('/admin', $routes->import('@SonataAdminBundle/Resources/config/routing/sonata_admin.xml'));
     106}}}
     107}}}
     108|----------------
     109* [http://symfony.com/doc/current/cmf/tutorial/sonata-admin.html cmf/tutorial/sonata-admin]
     110* [http://symfony.com/doc/current/cookbook/routing/custom_route_loader.html cookbook/routing/custom_route_loader]
     111=== Bundles ===
     112==== [https://packagist.org/packages/symfony/framework-standard-edition symfony/framework-standard-edition] ====
     113* [http://documentation-symfony.fr/bundles documentation-symfony.fr/bundles (french)]
     114
     115* https://github.com/symfony/symfony-standard
     116* https://github.com/symfony/symfony-standard/blob/master/app/AppKernel.php
     117
     118* symfony/framework-bundle FrameworkBundle - The core Symfony framework bundle
     119 * Some components may sometimes be required
     120  * symfony/console (for console)
     121  * symfony/process (for console server:run)
     122  * symfony/validator
     123  * symfony/expression-language
     124  * symfony/psr-http-message-bridge
     125  * zendframework/zend-diactoros
     126* [https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/ SensioFrameworkExtraBundle] [http://documentation-symfony.fr/bundles/SensioFrameworkExtraBundle/ fr]- Adds several enhancements, including template and routing annotation capability
     127 * If you plan to use or create annotations for controllers, make sure to update your {{{autoload.php}}} by adding the following line...
     128  * https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/index.html#installation
     129  * Included in [https://packagist.org/packages/symfony/framework-standard-edition symfony/framework-standard-edition]
     130* [https://packagist.org/packages/doctrine/doctrine-bundle doctrine/doctrine-bundle] [https://symfony.com/doc/current/book/doctrine.html DoctrineBundle] - Adds support for the Doctrine ORM
     131 * [https://packagist.org/packages/doctrine/orm doctrine/orm] has to be required if needed
     132 * Extensions:
     133  * https://symfony.com/doc/master/bundles/StofDoctrineExtensionsBundle/index.html
     134   * http://symfony.com/doc/current/cookbook/doctrine/common_extensions.html
     135   * [https://packagist.org/packages/stof/doctrine-extensions-bundle stof/doctrine-extensions-bundle]
     136  * KNP
     137* TwigBundle - Adds support for the Twig templating engine
     138* symfony/security-bundle SecurityBundle - Adds security by integrating Symfony's security component
     139 * symfony/security may need to be also required
     140* symfony/swiftmailer-bundle SwiftmailerBundle - Adds support for Swiftmailer, a library for sending emails
     141* MonologBundle - Adds support for Monolog, a logging library
     142
     143* WebProfilerBundle (in dev/test env) - Adds profiling functionality and the web debug toolbar
     144* SensioDistributionBundle (in dev/test env) - Adds functionality for configuring and working with Symfony distributions
     145* [https://packagist.org/packages/sensio/generator-bundle sensio/generator-bundle] [https://symfony.com/doc/current/bundles/SensioGeneratorBundle/ SensioGeneratorBundle] [http://documentation-symfony.fr/bundles/SensioGeneratorBundle/ fr] (in dev/test env) - Adds code generation capabilities
     146  * Choosing the annotation format expects the SensioFrameworkExtraBundle to be installed
     147    * https://symfony.com/doc/current/bundles/SensioGeneratorBundle/commands/generate_bundle.html#available-options
     148  * There should be one line of imports in the {{{config.yml}}} file! (otherwise changes may not be added to it!)
     149    * https://github.com/symfony/symfony-standard/blob/master/app/config/config.yml
     150  * [http://symfony.com/doc/current/bundles/SensioGeneratorBundle/commands/generate_bundle.html Generating a New Bundle Skeleton]
     151    * in composer.json (for autoload):
     152{{{#!json
     153    "autoload": {
     154        "psr-4": {
     155            "": "src/"
     156        }
     157    }
     158}}}
     159{{{#!sh
     160$ php bin/console generate:bundle --namespace=AppBundle --bundle-name=AppBundle --format=annotation --dir=../src --no-interaction
     161
     162  Bundle generation
     163
     164> Generating a sample bundle skeleton into app/../src/AppBundle OK!
     165> Checking that the bundle is autoloaded: OK
     166> Enabling the bundle inside /...app/AppKernel.php: OK
     167> Importing the bundle\'s routes from the app/config/routing.yml file: OK
     168> Importing the bundle\'s services.yml from the app/config/config.yml file: OK
     169
     170  Everything is OK! Now get to work :). 
     171}}}
     172    * files touched:
     173      * app/../src/AppBundle (directory and content generated)
     174      * app/AppKernel.php
     175      * app/config/routing.yml
     176      * app/config/config.yml (see note about line of import)
     177* DebugBundle (in dev/test env) - Adds Debug and VarDumper component integration
     178==== Bundles documented by symfony.com ====
     179* [https://packagist.org/packages/doctrine/doctrine-fixtures-bundle doctrine/doctrine-fixtures-bundle] [http://symfony.com/doc/current/bundles/DoctrineFixturesBundle symfony.com] [http://documentation-symfony.fr/bundles/DoctrineFixturesBundle fr]
     180* [https://packagist.org/packages/sonata-project/admin-bundle sonata-project/admin-bundle] [http://symfony.com/doc/current/bundles/SonataAdminBundle symfony.com] [http://symfony.com/doc/current/cmf/tutorial/sonata-admin.html cmf/tutorial]
     181* [https://packagist.org/packages/stof/doctrine-extensions-bundle stof/doctrine-extensions-bundle] [http://symfony.com/doc/current/bundles/StofDoctrineExtensionsBundle symfony.com]
     182==== User ====
     183* friendsofsymfony/user-bundle
     184==== Social Login ====
     185* https://en.wikipedia.org/wiki/Social_login
     186===== OAuth =====
     187* [https://packagist.org/packages/hwi/oauth-bundle hwi/oauth-bundle]
     188* [https://packagist.org/packages/friendsofsymfony/oauth-server-bundle friendsofsymfony/oauth-server-bundle] (server)
     189* http://knpuniversity.com/screencast/oauth
     190 * https://www.youtube.com/watch?v=io_r-0e3Qcw
     191* https://www.youtube.com/results?search_query=oauth
     192===== HybridAuth =====
     193* [https://packagist.org/packages/azine/hybridauth-bundle azine/hybridauth-bundle]
     194* [https://packagist.org/packages/sllh/hybridauth-bundle sllh/hybridauth-bundle]
     195* [https://packagist.org/packages/itlized/social itlized/social]
     196===== OpenID =====
     197* [https://packagist.org/packages/fp/openid-bundle fp/openid-bundle]
     198* [https://packagist.org/packages/writtengames/openid-user-bundle writtengames/openid-user-bundle]
     199* [https://packagist.org/packages/raphox/alb-open-id-server-bundle raphox/alb-open-id-server-bundle] (server)
     200==== Form related ====
     201* [https://packagist.org/packages/a2lix/translation-form-bundle a2lix/translation-form-bundle]
     202 * http://a2lix.fr/2014/08/04/translate-internationalize-doctrine-entities-sonata.html
     203==== Admin [https://packagist.org/packages/sonata-project/admin-bundle sonata-project/admin-bundle] ====
     204* [http://symfony.com/doc/current/bundles/SonataAdminBundle symfony.com] [https://sonata-project.org/bundles/admin sonata-project.org]
     205* [https://packagist.org/packages/sonata-project/doctrine-orm-admin-bundle sonata-project/doctrine-orm-admin-bundle] [https://sonata-project.org/bundles/doctrine-orm-admin sonata-project.org]
     206* [https://packagist.org/packages/sonata-project/doctrine-phpcr-admin-bundle sonata-project/doctrine-phpcr-admin-bundle]
     207* [https://packagist.org/packages/sonata-project/doctrine-mongodb-admin-bundle sonata-project/doctrine-mongodb-admin-bundle]
     208* http://stackoverflow.com/questions/22916083/sonata-admin-bundle-adding-link-to-related-entities-in-configure-list
     209===== Admin without Admin Bundle =====
     210* //[https://youtu.be/zHuG-MyDQa8?list=PLzPK7Fy3SN2cvLglujdweDKNMNQhHDbTT Episode 22 - Créer une administration avec Symfony2]// (fr)
     211===== Default value =====
     212* keyword: sonata admin getnewinstance
     213* https://sonata-project.org/bundles/admin/master/doc/cookbook/recipe_custom_action.html
     214* https://stackoverflow.com/questions/10546168/setting-default-value-in-symfony2-sonata-admin-bundle
     215===== Translation [https://packagist.org/packages/sonata-project/translation-bundle sonata-project/translation-bundle] =====
     216* [https://sonata-project.org/bundles/translation sonata-project.org]
     217* see Doctrine-Extensions-Translatable
     218* see Bundle (Component)-Form-Translation
     219 * http://a2lix.fr/2014/08/04/translate-internationalize-doctrine-entities-sonata.html
     220===== Tree =====
     221* https://stackoverflow.com/questions/32346555/manage-crud-operations-for-hierarchical-data-tree-structure-with-sonataadminbu
     222===== Formatter =====
     223===== CKEditor =====
     224* http://www.techtonet.com/sonata-add-ckeditor-in-admin-textareas/
     225* https://stackoverflow.com/questions/20269617/how-to-add-ckeditor-to-sonata-admin-backends-textareas
     226==== CKEditor ====
     227* [https://packagist.org/packages/egeloen/ckeditor-bundle egeloen/ckeditor-bundle]
     228==== Tree ====
     229* [https://packagist.org/packages/symfony-cmf/tree-browser-bundle symfony-cmf/tree-browser-bundle]
     230 * http://symfony.com/doc/current/cmf/bundles/tree_browser/introduction.html
     231* http://www.codeproject.com/Tips/418196/Editing-Tree-Structures-in-Symfony
     232* http://knpbundles.com/keyword/tree-symfony-bundle
     233==== Tag and Taxonomy ====
     234* [https://packagist.org/packages/sonata-project/classification-bundle sonata-project/classification-bundle]
     235* [https://packagist.org/packages/mw/tag-admin-bundle mw/tag-admin-bundle]
     236 * [https://packagist.org/packages/fpn/tag-bundle fpn/tag-bundle]
     237==== News, Newsletter ====
     238* [https://packagist.org/packages/stfalcon/news-bundle stfalcon/news-bundle]
     239==== Search ====
     240* [https://packagist.org/packages/symfony-cmf/search-bundle symfony-cmf/search-bundle]
     241* [https://packagist.org/packages/liip/search-bundle liip/search-bundle]
     242==== Payment ====
     243* [https://packagist.org/packages/payum/payum-bundle payum/payum-bundle]
     244==== Help Desk, Bug Tracking and Ticket ====
     245* [https://packagist.org/packages/liuggio/help-desk-bundle liuggio/help-desk-bundle]
     246=== CLI code generation example ===
     247{{{#!sh
     248$ php bin/console generate:bundle --namespace=AppBundle --bundle-name=AppBundle --format=annotation --dir=../src --no-interaction
     249$ php bin/console assets:install ../web --symlink --relative
     250$ php bin/console doctrine:generate:entity --entity="AppBundle:Category" --fields="name:string(255)" --no-interaction
     251$ php bin/console doctrine:generate:entity --entity="AppBundle:BlogPost" --fields="title:string(255) body:text draft:boolean" --no-interaction
     252$ php bin/console doctrine:schema:create
     253$ php bin/console doctrine:schema:update # after modification
     254}}}
     255See
     256* sensio/generator-bundle
     257* doctrine/orm