== Symfony Programming == * http://fr.slideshare.net/AcquiaInc/create-a-symfony-application-from-a-drupal-perspective * https://www.youtube.com/results?search_query=symfony * https://www.youtube.com/results?q=knpuniversity * http://knpuniversity.com/tracks/symfony === Tutorials === * [http://www.ens.ro/2012/03/21/jobeet-tutorial-with-symfony2/ Jobeet Tutorial with Symfony2] [http://jobeet.thuau.fr/ fr] * DevAndClick [https://www.youtube.com/channel/UCyEM6z6Ssl9K5Khg46DY3Mw YouTube] === Software using Symfony === * //[https://www.symfony.fi/entry/symfony-components-full-stack-framework-cms-ecosystems Symfony components and the full stack framework in CMS ecosystems] ==== EZ Plateform ==== * EZ Plateform and Symfony Article from Symfony Finland * https://packagist.org/packages/ezsystems/ezplatform * http://share.ez.no/downloads/downloads * https://doc.ez.no/display/TECHDOC/Requirements (Postgres install not yet supported 2016-04) * https://doc.ez.no/display/TECHDOC/Using+Composer === Symfony Programming Tools === * [https://packagist.org/packages/sensiolabs-de/deprecation-detector sensiolabs-de/deprecation-detector] * [https://packagist.org/packages/sensiolabs-de/deptrac sensiolabs-de/deptrac] === Hacking === ==== {{{autoload.php}}} ==== * https://github.com/symfony/symfony-standard/blob/master/app/autoload.php The original * https://github.com/symfony-cmf/standard-edition/blob/master/app/autoload.php Almost the same, maybe slightly older version * https://github.com/symfony-cmf/cmf-sandbox/blob/master/app/autoload.php Locale component additions and others === MicroKernel === * http://symfony.com/blog/new-in-symfony-2-8-symfony-as-a-microframework * https://symfony.com/doc/current/cookbook/configuration/micro-kernel-trait.html * https://www.youtube.com/results?search_query=symfony+microkernel * https://knpuniversity.com/screencast/new-in-symfony3/micro-kernel * https://www.youtube.com/results?search_query=micro+symfony * http://knpuniversity.com/screencast/micro-symfony === Components === * http://symfony.com/components * http://symfony.com/doc/current/components ==== Form ==== ===== Translation ===== * see Bundle-Form-Translation * see Bundle-Admin-Translation ==== Guard (New in 2.8!) ==== * [https://packagist.org/packages/symfony/security-guard symfony/security-guard] * [https://symfony.com/doc/current/security/guard_authentication.html How to Create a Custom Authentication System with Guard] * https://symfony.com/doc/current/components/security.html Use in Symfony framework * https://knpuniversity.com/screencast/guard * * https://www.sitepoint.com/easier-authentication-with-guard-in-symfony-3/ * http://www.sensiolabsblog.co.uk/blog/symfony-security-component-guard-tutorial * http://silex.sensiolabs.org/doc/master/cookbook/guard_authentication.html * [https://packagist.org/packages/knpuniversity/oauth2-client-bundle knpuniversity/oauth2-client-bundle] * * [https://packagist.org/packages/knpuniversity/guard-bundle Upgrade from KNP Guard bundle to Symfony Guard component] ==== Routing ==== ===== RouteCollection vs RouteCollectionBuilder ===== {{{#!th **[http://api.symfony.com/3.0/Symfony/Component/Routing/RouteCollection.html RouteCollection]** }}} {{{#!th **[http://api.symfony.com/3.0/Symfony/Component/Routing/RouteCollectionBuilder.html RouteCollectionBuilder]** }}} |---------------- || || || {{{#!td rowspan=2 **add**(string $name, Route $route) }}} {{{#!td $this **addRoute**(Route $route, string|null $name = null) }}} |---------------- {{{#!td Route **add**(string $path, string $controller, string|null $name = null }}} |---------------- {{{#!td {{{#!js new RouteCollection()->add('root', new Route('/', [ '_controller' => 'FrameworkBundle:Redirect:redirect', 'route' => 'sonata_admin_dashboard', 'permanent' => true, ])); // to check }}} }}} {{{#!td {{{#!js new RouteCollectionBuilder()->addRoute(new Route('/', [ '_controller' => 'FrameworkBundle:Redirect:redirect', 'route' => 'sonata_admin_dashboard', 'permanent' => true, ]), 'root' ); // to check }}} }}} |---------------- {{{#!td //Does not exist: cf// $loader->**import**(...) }}} {{{#!td RouteCollectionBuilder **import**(mixed $resource, string|null $prefix = '/', string $type = null) }}} |---------------- {{{#!td //Does not exist: cf// **addCollection** }}} {{{#!td **mount**($prefix, RouteCollectionBuilder $builder) }}} |---------------- {{{#!td {{{#!js $collection = new RouteCollection(); $routing = $loader->import( "@SonataAdminBundle/Resources/config/sonata_admin.xml" ); $routing->setPrefix('/admin'); $collection->addCollection($routing); }}} }}} {{{#!td {{{#!js $routes->mount('/admin', $routes->import('@SonataAdminBundle/Resources/config/routing/sonata_admin.xml')); }}} }}} |---------------- * [http://symfony.com/doc/current/cmf/tutorial/sonata-admin.html cmf/tutorial/sonata-admin] * [http://symfony.com/doc/current/cookbook/routing/custom_route_loader.html cookbook/routing/custom_route_loader] === Bundles === * https://packagist.org/search/?q=bundle * http://symfony.com/doc/bundles/ ==== [https://packagist.org/packages/symfony/framework-standard-edition symfony/framework-standard-edition] ==== * [http://documentation-symfony.fr/bundles documentation-symfony.fr/bundles (french)] * https://github.com/symfony/symfony-standard * https://github.com/symfony/symfony-standard/blob/master/app/AppKernel.php * symfony/framework-bundle FrameworkBundle - The core Symfony framework bundle * Some components may sometimes be required * symfony/console (for console) * symfony/process (for console server:run) * symfony/validator * symfony/expression-language * symfony/psr-http-message-bridge * zendframework/zend-diactoros * [https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/ SensioFrameworkExtraBundle] [http://documentation-symfony.fr/bundles/SensioFrameworkExtraBundle/ fr]- Adds several enhancements, including template and routing annotation capability * If you plan to use or create annotations for controllers, make sure to update your {{{autoload.php}}} by adding the following line... * https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/index.html#installation * Included in [https://packagist.org/packages/symfony/framework-standard-edition symfony/framework-standard-edition] * [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 * [https://packagist.org/packages/doctrine/orm doctrine/orm] has to be required if needed * Extensions: * https://symfony.com/doc/master/bundles/StofDoctrineExtensionsBundle/index.html * http://symfony.com/doc/current/cookbook/doctrine/common_extensions.html * [https://packagist.org/packages/stof/doctrine-extensions-bundle stof/doctrine-extensions-bundle] * [https://packagist.org/packages/knplabs/doctrine-behaviors knplabs/doctrine-behaviors] * http://knplabs.com/fr/blog/knp-doctrine-orm-behaviors * TwigBundle - Adds support for the Twig templating engine * symfony/security-bundle SecurityBundle - Adds security by integrating Symfony's security component * symfony/security may need to be also required * symfony/swiftmailer-bundle SwiftmailerBundle - Adds support for Swiftmailer, a library for sending emails * MonologBundle - Adds support for Monolog, a logging library * WebProfilerBundle (in dev/test env) - Adds profiling functionality and the web debug toolbar * SensioDistributionBundle (in dev/test env) - Adds functionality for configuring and working with Symfony distributions * [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 * Choosing the annotation format expects the SensioFrameworkExtraBundle to be installed * https://symfony.com/doc/current/bundles/SensioGeneratorBundle/commands/generate_bundle.html#available-options * There should be one line of imports in the {{{config.yml}}} file! (otherwise changes may not be added to it!) * https://github.com/symfony/symfony-standard/blob/master/app/config/config.yml * [http://symfony.com/doc/current/bundles/SensioGeneratorBundle/commands/generate_bundle.html Generating a New Bundle Skeleton] * in composer.json (for autoload): {{{#!json "autoload": { "psr-4": { "": "src/" } } }}} {{{#!sh $ php bin/console generate:bundle --namespace=AppBundle --bundle-name=AppBundle --format=annotation --dir=../src --no-interaction Bundle generation > Generating a sample bundle skeleton into app/../src/AppBundle OK! > Checking that the bundle is autoloaded: OK > Enabling the bundle inside /...app/AppKernel.php: OK > Importing the bundle\'s routes from the app/config/routing.yml file: OK > Importing the bundle\'s services.yml from the app/config/config.yml file: OK Everything is OK! Now get to work :). }}} * files touched: * app/../src/AppBundle (directory and content generated) * app/AppKernel.php * app/config/routing.yml * app/config/config.yml (see note about line of import) * DebugBundle (in dev/test env) - Adds Debug and VarDumper component integration ==== Choosing bundles ==== * [https://jolicode.com/blog/do-not-use-fosuserbundle Do not use FOSUserBundle] ===== Bundles not to choose ===== * [https://packagist.org/packages/jms/serializer jms/serializer] * [https://jolicode.com/blog/do-not-use-fosuserbundle Do not use FOSUserBundle] ==== Bundles documented by symfony.com ==== The list is there: http://symfony.com/doc/bundles/ * Admin [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] * [https://packagist.org/packages/sonata-project/translation-bundle sonata-project/translation-bundle] https://sonata-project.org/bundles/translation/master/doc/reference/orm.html * ApiDoc [https://packagist.org/packages/nelmio/api-doc-bundle nelmio/api-doc-bundle] [https://symfony.com/doc/master/bundles/NelmioApiDocBundle symfony.com] * Assetic (No more distributed with Symfony Standard Edition) [https://packagist.org/packages/symfony/assetic-bundle symfony/assetic-bundle] [https://symfony.com/doc/current/assetic.html doc/current/assetic.html] * Cache -> Doctrine - Cache * CKEditor [https://packagist.org/search/?q=ckeditor-bundle ckeditor-bundle] [https://packagist.org/packages/egeloen/ckeditor-bundle egeloen/ckeditor-bundle] [http://symfony.com/doc/master/bundles/IvoryCKEditorBundle/index.html symfony.com] may be used with [https://packagist.org/packages/helios-ag/fm-elfinder-bundle helios-ag/fm-elfinder-bundle] * http://www.techtonet.com/sonata-add-ckeditor-in-admin-textareas/ * https://stackoverflow.com/questions/20269617/how-to-add-ckeditor-to-sonata-admin-backends-textareas * Create [https://packagist.org/packages/symfony-cmf/create-bundle symfony-cmf/create-bundle] [http://symfony.com/doc/current/cmf/bundles/create cmf/bundles/create] requires [https://packagist.org/packages/symfony/framework-bundle symfony/framework-bundle]... * Doctrine * Cache [https://packagist.org/packages/doctrine/doctrine-cache-bundle doctrine/doctrine-cache-bundle] [https://symfony.com/doc/current/bundles/DoctrineCacheBundle symfony.com] * Extensions [https://packagist.org/packages/stof/doctrine-extensions-bundle stof/doctrine-extensions-bundle] [http://symfony.com/doc/current/bundles/StofDoctrineExtensionsBundle symfony.com] [http://symfony.com/doc/current/doctrine/common_extensions.html .../common_extensions] * Fixtures [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] * Migrations [https://packagist.org/packages/doctrine/doctrine-migrations-bundle doctrine/doctrine-migrations-bundle] [https://symfony.com/doc/current/bundles/DoctrineMigrationsBundle symfony.com] * MongoDB [https://packagist.org/packages/doctrine/mongodb-odm-bundle doctrine/mongodb-odm-bundle] [http://symfony.com/doc/current/bundles/DoctrineMongoDBBundle symfony.com] * PHPCR [https://packagist.org/packages/doctrine/phpcr-bundle doctrine/phpcr-bundle] [http://symfony.com/doc/master/cmf cmf] * Editor -> CKEditor * Imagine [https://packagist.org/packages/liip/imagine-bundle liip/imagine-bundle] [http://symfony.com/doc/master/bundles/LiipImagineBundle symfony.com] * JsRouting [https://packagist.org/packages/friendsofsymfony/jsrouting-bundle friendsofsymfony/jsrouting-bundle] [https://symfony.com/doc/master/bundles/FOSJsRoutingBundle symfony.com] * Menu [https://packagist.org/packages/knplabs/knp-menu-bundle knplabs/knp-menu-bundle] [http://symfony.com/doc/master/bundles/KnpMenuBundle symfony.com] * REST [https://packagist.org/packages/friendsofsymfony/rest-bundle friendsofsymfony/rest-bundle] [http://symfony.com/doc/master/bundles/FOSRestBundle symfony.com] * Routing [https://packagist.org/packages/symfony-cmf/routing-bundle symfony-cmf/routing-bundle] [http://symfony.com/doc/master/cmf/bundles/routing cmf] * User [https://packagist.org/packages/friendsofsymfony/user-bundle friendsofsymfony/user-bundle] [https://symfony.com/doc/master/bundles/FOSUserBundle symfony.com] [https://jolicode.com/blog/do-not-use-fosuserbundle Do not use FOSUserBundle] maybe better see https://knpuniversity.com/screencast/symfony-security * site:symfony.com/doc/master/bundles ==== Social Login ==== * https://en.wikipedia.org/wiki/Social_login * See Guard component ===== OAuth ===== * [https://packagist.org/packages/hwi/oauth-bundle hwi/oauth-bundle] * [https://packagist.org/packages/friendsofsymfony/oauth-server-bundle friendsofsymfony/oauth-server-bundle] (server) * http://knpuniversity.com/screencast/oauth * https://www.youtube.com/watch?v=io_r-0e3Qcw * https://www.youtube.com/results?search_query=oauth * See Guard component ===== HybridAuth ===== * [https://packagist.org/packages/azine/hybridauth-bundle azine/hybridauth-bundle] * [https://packagist.org/packages/sllh/hybridauth-bundle sllh/hybridauth-bundle] * [https://packagist.org/packages/itlized/social itlized/social] * See Guard component ===== OpenID ===== * [https://packagist.org/packages/fp/openid-bundle fp/openid-bundle] * [https://packagist.org/packages/writtengames/openid-user-bundle writtengames/openid-user-bundle] * [https://packagist.org/packages/raphox/alb-open-id-server-bundle raphox/alb-open-id-server-bundle] (server) * See Guard component ==== Form related ==== * [https://packagist.org/packages/a2lix/translation-form-bundle a2lix/translation-form-bundle] * http://a2lix.fr/2014/08/04/translate-internationalize-doctrine-entities-sonata.html ==== Admin [https://packagist.org/packages/sonata-project/admin-bundle sonata-project/admin-bundle] ==== * [http://symfony.com/doc/current/bundles/SonataAdminBundle symfony.com] [https://sonata-project.org/bundles/admin sonata-project.org] * [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] * [https://packagist.org/packages/sonata-project/doctrine-phpcr-admin-bundle sonata-project/doctrine-phpcr-admin-bundle] * [https://packagist.org/packages/sonata-project/doctrine-mongodb-admin-bundle sonata-project/doctrine-mongodb-admin-bundle] * http://stackoverflow.com/questions/22916083/sonata-admin-bundle-adding-link-to-related-entities-in-configure-list ===== Admin without Admin Bundle ===== * //[https://youtu.be/zHuG-MyDQa8?list=PLzPK7Fy3SN2cvLglujdweDKNMNQhHDbTT Episode 22 - Créer une administration avec Symfony2]// (fr) ===== Default value ===== * keyword: sonata admin getnewinstance * https://sonata-project.org/bundles/admin/master/doc/cookbook/recipe_custom_action.html * https://stackoverflow.com/questions/10546168/setting-default-value-in-symfony2-sonata-admin-bundle ===== Translation [https://packagist.org/packages/sonata-project/translation-bundle sonata-project/translation-bundle] ===== * [https://sonata-project.org/bundles/translation sonata-project.org] * see Doctrine-Extensions-Translatable * see Bundle (Component)-Form-Translation * http://a2lix.fr/2014/08/04/translate-internationalize-doctrine-entities-sonata.html ===== Tree ===== * https://stackoverflow.com/questions/32346555/manage-crud-operations-for-hierarchical-data-tree-structure-with-sonataadminbu ==== Tree ==== * [https://packagist.org/packages/symfony-cmf/tree-browser-bundle symfony-cmf/tree-browser-bundle] * http://symfony.com/doc/current/cmf/bundles/tree_browser/introduction.html * http://www.codeproject.com/Tips/418196/Editing-Tree-Structures-in-Symfony * http://knpbundles.com/keyword/tree-symfony-bundle ==== Tag and Taxonomy ==== * [https://packagist.org/packages/sonata-project/classification-bundle sonata-project/classification-bundle] * [https://packagist.org/packages/mw/tag-admin-bundle mw/tag-admin-bundle] * [https://packagist.org/packages/fpn/tag-bundle fpn/tag-bundle] ==== News, Newsletter ==== * [https://packagist.org/packages/stfalcon/news-bundle stfalcon/news-bundle] ==== Search ==== * [https://packagist.org/packages/egeloen/lucene-search-bundle egeloen/lucene-search-bundle] * https://framework.zend.com/manual/2.4/en/tutorials/lucene.intro.html * * [https://packagist.org/packages/liip/search-bundle liip/search-bundle] (Google's search API) * [https://packagist.org/packages/symfony-cmf/search-bundle symfony-cmf/search-bundle] ==== Blog ==== * [https://packagist.org/packages/mv/mv-blog-bundle mv/mv-blog-bundle] ==== Payment ==== * [https://packagist.org/packages/payum/payum-bundle payum/payum-bundle] ==== Help Desk, Bug Tracking and Ticket ==== * [https://packagist.org/packages/liuggio/help-desk-bundle liuggio/help-desk-bundle] === CLI code generation example === {{{#!sh $ php bin/console generate:bundle --namespace=AppBundle --bundle-name=AppBundle --format=annotation --dir=../src --no-interaction $ php bin/console assets:install ../web --symlink --relative $ php bin/console doctrine:generate:entity --entity="AppBundle:Category" --fields="name:string(255)" --no-interaction $ php bin/console doctrine:generate:entity --entity="AppBundle:BlogPost" --fields="title:string(255) body:text draft:boolean" --no-interaction $ php bin/console doctrine:schema:create $ php bin/console doctrine:schema:update # after modification }}} See * sensio/generator-bundle * doctrine/orm