[[PageOutline]] = Symfony = = Related Page = * //[wiki:Symfony/Etaps-to-build-a-website-with-doctrine-and-sonata-admin Etaps to Build a Symfony Website with Doctrine and Sonata admin]// = Versions = == 3.3 == === app/autoload.php suppressed === https://github.com/symfony/symfony-standard/blob/v3.2.11/app/autoload.php * This file has been suppressed! Yeah! === Dependency Injection === * //[https://www.tomasvotruba.cz/blog/2017/05/07/how-to-refactor-to-new-dependency-injection-features-in-symfony-3-3/ How to refactor to new Dependency Injection features in Symfony 3.3]// 2017 = Debugging = * //[https://symfony.com/doc/current/debug/debugging.html How to Optimize your Development Environment for Debugging]// * [https://phppackages.org/p/symfony/debug symfony/debug] //[https://symfony.com/doc/current/components/debug.html The Debug component provides tools to ease debugging PHP code.]// (since Symfony 2.3) [Seems very PHP specific.] * [https://phppackages.org/p/symfony/debug-bundle symfony/debug-bundle] [What does it do?] = Bugs = Bugs as such cannot be reported. They have to be brought to light in a development version of Symfony with strong arguments and it is recommended to correct them on a fork and to make a pull request. So it may be better to go around at first development time and to correct only then really needed. 2017-01 == Templating == There is a problem using twig array loader in Symfony framework, template including for statement produce an error. Tested in 2.8.16 and 3.2.2. [https://phppackages.org/p/symfony/templating symfony/templating] == Form == (Warning: Form concentrates a huge quantity of issues in Symfony. It seems best to favor use of long term version (LTS) of Symfony then using this component.) * In version 3.2.2, the instructions in the official manual for separate component use result in no form beeing displayed, with Whoops an uninformative error can be obtained. It has not been tested if symfony/debug component can see something. * In 2.8 instructions are different and it works, the API seems to have change between versions. [https://phppackages.org/p/symfony/templating symfony/form] == 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://blog.olasoft.net/articles/3/developpement-web/Debuter-avec-Symfony-3-Creer-sa-premiere-page-web/ Débuter avec Symfony 3 : Créer sa première page web]// Abdel-Farid SALAMI 2016 * [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] * //[http://symfony.com/doc/current/create_framework/index.html Create your own PHP Framework]// * //[https://knpuniversity.com/screencast/symfony-journey Journey to the Center of Symfony: HttpKernel Request-Response]// * //[https://knpuniversity.com/screencast/symfony-journey-di Journey to the Center of Symfony: The Dependency Injection Container]// * [http://training.sensiolabs.com/en/courses/SF3C4-web-development-with-symfony3 SF3C4 | Web Development with Symfony 3] * [https://sensiolabs.com/en/symfony/certification.html Symfony Certification] * [https://www.symfony.fi/entry/going-async-in-symfony-controllers Going Async in Symfony Controllers] === 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/v3.2.11/app/autoload.php The original * ~~https://github.com/symfony/symfony-standard/blob/master/app/autoload.php~~ ~~The original~~ (suppressed in Symfony 3.3!) * 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 ==== Some popular Components ==== https://phppackages.org/s/symfony {{{#!th **[https://packagist.org/packages/symfony/console Console]** }}} {{{#!td [[Image(http://phppackages.org/p/symfony/console/badge/rank.svg, link=http://phppackages.org/p/symfony/console, title=symfony/console,)]] [[Image(https://www.versioneye.com/php/symfony:console/reference_badge.svg, link=https://www.versioneye.com/php/symfony:console/references, title=symfony/console,)]][[Image(https://img.shields.io/packagist/dm/symfony/console.svg, link=https://packagist.org/packages/symfony/console, title=symfony/console)]] }}} {{{#!td ... }}} |---------------- {{{#!th **[https://packagist.org/packages/symfony/yaml Yaml]** }}} {{{#!td [[Image(http://phppackages.org/p/symfony/yaml/badge/rank.svg, link=http://phppackages.org/p/symfony/yaml, title=symfony/yaml,)]] [[Image(https://www.versioneye.com/php/symfony:yaml/reference_badge.svg, link=https://www.versioneye.com/php/symfony:yaml/references, title=symfony/yaml,)]] [[Image(https://img.shields.io/packagist/dm/symfony/yaml.svg, link=https://packagist.org/packages/symfony/yaml, title=symfony/yaml)]] }}} {{{#!td ... }}} |---------------- {{{#!th **[https://packagist.org/packages/symfony/process Process]** }}} {{{#!td [[Image(http://phppackages.org/p/symfony/process/badge/rank.svg, link=http://phppackages.org/p/symfony/process, title=symfony/process,)]] [[Image(https://www.versioneye.com/php/symfony:process/reference_badge.svg, link=https://www.versioneye.com/php/symfony:process/references, title=symfony/process,)]] [[Image(https://img.shields.io/packagist/dm/symfony/process.svg, link=https://packagist.org/packages/symfony/process, title=symfony/process)]] }}} {{{#!td ... }}} |---------------- {{{#!th **[https://packagist.org/packages/symfony/config Config]** }}} {{{#!td [[Image(http://phppackages.org/p/symfony/config/badge/rank.svg, link=http://phppackages.org/p/symfony/config, title=symfony/config,)]] [[Image(https://www.versioneye.com/php/symfony:config/reference_badge.svg, link=https://www.versioneye.com/php/symfony:config/references, title=symfony/config,)]] [[Image(https://img.shields.io/packagist/dm/symfony/config.svg, link=https://packagist.org/packages/symfony/config, title=symfony/config)]] }}} {{{#!td ... }}} |---------------- {{{#!th **[https://packagist.org/packages/symfony/http-foundation HttpFoundation]** }}} {{{#!td [[Image(http://phppackages.org/p/symfony/http-foundation/badge/rank.svg, link=http://phppackages.org/p/symfony/http-foundation, title=symfony/http-foundation,)]] [[Image(https://www.versioneye.com/php/symfony:http-foundation/reference_badge.svg, link=https://www.versioneye.com/php/symfony:http-foundation/references, title=symfony/http-foundation,)]] [[Image(https://img.shields.io/packagist/dm/symfony/http-foundation.svg, link=https://packagist.org/packages/symfony/http-foundation, title=symfony/http-foundation)]] }}} {{{#!td ... }}} |---------------- {{{#!th **[https://packagist.org/packages/symfony/finder Finder]** }}} {{{#!td [[Image(http://phppackages.org/p/symfony/finder/badge/rank.svg, link=http://phppackages.org/p/symfony/finder, title=symfony/finder,)]] [[Image(https://www.versioneye.com/php/symfony:finder/reference_badge.svg, link=https://www.versioneye.com/php/symfony:finder/references, title=symfony/finder,)]] [[Image(https://img.shields.io/packagist/dm/symfony/finder.svg, link=https://packagist.org/packages/symfony/finder, title=symfony/finder)]] }}} {{{#!td ... }}} |---------------- {{{#!th **[https://packagist.org/packages/symfony/dependency-injection DependencyInjection]** }}} {{{#!td [[Image(http://phppackages.org/p/symfony/dependency-injection/badge/rank.svg, link=http://phppackages.org/p/symfony/dependency-injection, title=symfony/dependency-injection,)]] [[Image(https://www.versioneye.com/php/symfony:dependency-injection/reference_badge.svg, link=https://www.versioneye.com/php/symfony:dependency-injection/references, title=symfony/dependency-injection,)]] [[Image(https://img.shields.io/packagist/dm/symfony/dependency-injection.svg, link=https://packagist.org/packages/symfony/dependency-injection, title=symfony/dependency-injection)]] }}} {{{#!td ... }}} |---------------- {{{#!th **[https://packagist.org/packages/symfony/http-kernel HttpKernel]** }}} {{{#!td [[Image(http://phppackages.org/p/symfony/http-kernel/badge/rank.svg, link=http://phppackages.org/p/symfony/http-kernel, title=symfony/http-kernel,)]] [[Image(https://www.versioneye.com/php/symfony:http-kernel/reference_badge.svg, link=https://www.versioneye.com/php/symfony:http-kernel/references, title=symfony/http-kernel,)]] [[Image(https://img.shields.io/packagist/dm/symfony/http-kernel.svg, link=https://packagist.org/packages/symfony/http-kernel, title=symfony/http-kernel)]] }}} {{{#!td ... }}} |---------------- {{{#!th **[https://packagist.org/packages/symfony/event-dispatcher EventDispatcher]** }}} {{{#!td [[Image(http://phppackages.org/p/symfony/event-dispatcher/badge/rank.svg, link=http://phppackages.org/p/symfony/event-dispatcher, title=symfony/event-dispatcher,)]] [[Image(https://www.versioneye.com/php/symfony:event-dispatcher/reference_badge.svg, link=https://www.versioneye.com/php/symfony:event-dispatcher/references, title=symfony/event-dispatcher,)]] [[Image(https://img.shields.io/packagist/dm/symfony/event-dispatcher.svg, link=https://packagist.org/packages/symfony/event-dispatcher, title=symfony/event-dispatcher)]] }}} {{{#!td ... }}} |---------------- {{{#!th **[https://packagist.org/packages/symfony/form Form]** }}} {{{#!td [[Image(http://phppackages.org/p/symfony/form/badge/rank.svg, link=http://phppackages.org/p/symfony/form, title=symfony/form,)]] [[Image(https://www.versioneye.com/php/symfony:form/reference_badge.svg, link=https://www.versioneye.com/php/symfony:form/references, title=symfony/form,)]] [[Image(https://img.shields.io/packagist/dm/symfony/form.svg, link=https://packagist.org/packages/symfony/form, title=symfony/form)]] }}} {{{#!td ... }}} |---------------- {{{#!th **[https://packagist.org/packages/symfony/validator Validator]** }}} {{{#!td [[Image(http://phppackages.org/p/symfony/validator/badge/rank.svg, link=http://phppackages.org/p/symfony/validator, title=symfony/validator,)]] [[Image(https://www.versioneye.com/php/symfony:validator/reference_badge.svg, link=https://www.versioneye.com/php/symfony:validator/references, title=symfony/validator,)]] [[Image(https://img.shields.io/packagist/dm/symfony/validator.svg, link=https://packagist.org/packages/symfony/validator, title=symfony/validator)]] }}} {{{#!td ... }}} |---------------- {{{#!th **[https://packagist.org/packages/symfony/filesystem Filesystem]** }}} {{{#!td [[Image(http://phppackages.org/p/symfony/filesystem/badge/rank.svg, link=http://phppackages.org/p/symfony/filesystem, title=symfony/filesystem,)]] [[Image(https://www.versioneye.com/php/symfony:filesystem/reference_badge.svg, link=https://www.versioneye.com/php/symfony:finder/filesystem, title=symfony/filesystem,)]] [[Image(https://img.shields.io/packagist/dm/symfony/filesystem.svg, link=https://packagist.org/packages/symfony/filesystem, title=symfony/filesystem)]] }}} {{{#!td ... }}} |---------------- {{{#!th **[https://packagist.org/packages/symfony/css-selector CssSelector]** }}} {{{#!td [[Image(http://phppackages.org/p/symfony/css-selector/badge/rank.svg, link=http://phppackages.org/p/symfony/css-selector, title=symfony/css-selector,)]] [[Image(https://www.versioneye.com/php/symfony:css-selector/reference_badge.svg, link=https://www.versioneye.com/php/symfony:css-selector/references, title=symfony/css-selector,)]] [[Image(https://img.shields.io/packagist/dm/symfony/css-selector.svg, link=https://packagist.org/packages/symfony/css-selector, title=symfony/css-selector)]] }}} {{{#!td ... }}} |---------------- {{{#!th **[https://packagist.org/packages/symfony/templating Templating]** }}} {{{#!td [[Image(http://phppackages.org/p/symfony/templating/badge/rank.svg, link=http://phppackages.org/p/symfony/templating, title=symfony/templating,)]] [[Image(https://www.versioneye.com/php/symfony:templating/reference_badge.svg, link=https://www.versioneye.com/php/symfony:templating/references, title=symfony/templating,)]] [[Image(https://img.shields.io/packagist/dm/symfony/templating.svg, link=https://packagist.org/packages/symfony/templating, title=symfony/templating)]] }}} {{{#!td ... }}} |---------------- {{{#!th **[https://packagist.org/packages/symfony/debug Debug]** }}} {{{#!td [[Image(http://phppackages.org/p/symfony/debug/badge/rank.svg, link=http://phppackages.org/p/symfony/debug, title=symfony/debug,)]] [[Image(https://www.versioneye.com/php/symfony:debug/reference_badge.svg, link=https://www.versioneye.com/php/symfony:debug/references, title=symfony/debug,)]] [[Image(https://img.shields.io/packagist/dm/symfony/debug.svg, link=https://packagist.org/packages/symfony/debug, title=symfony/debug)]] }}} {{{#!td ... }}} |---------------- {{{#!th **[https://packagist.org/packages/symfony/ ]** }}} {{{#!td [[Image(https://www.versioneye.com/php/symfony:yaml/reference_badge.svg, link=https://www.versioneye.com/php/symfony:yaml/references, title=symfony/yaml,)]][[Image(https://img.shields.io/packagist/dm/symfony/yaml.svg, link=https://packagist.org/packages/symfony/yaml, title=symfony/yaml)]] }}} {{{#!td ... }}} ==== Dependency Injection ==== * [http://php-and-symfony.matthiasnoback.nl/2013/01/dependency-injection-smells/ Dependency injection smells (2013)] * [http://php-and-symfony.matthiasnoback.nl/2014/11/decoupling-from-a-service-locator/ Decoupling from a service locator (2014)] ==== Form ==== ==== HttpFoundation ==== * [http://symfony.com/doc/current/components/http_foundation.html The HttpFoundation Component] * [http://symfony.com/doc/current/session/locale_sticky_session.html Making the Locale "Sticky" during a User's Session] See Translation component. ===== PSR-7 ===== * //[http://symfony.com/blog/psr-7-support-in-symfony-is-here PSR-7 Support in Symfony is Here]// * //[http://symfony.com/doc/current/request/psr7.html The PSR-7 Bridge]// * [https://packagist.org/packages/symfony/psr-http-message-bridge symfony/psr-http-message-bridge] * //[http://php-fig.org/psr/psr-7/ PSR-7: HTTP message interfaces]// * //[https://inviqa.com/blog/introduction-psr-7-symfony An introduction to PSR-7 in Symfony]// Marek Pietrzak 2016 * //[http://blog.netapsys.fr/psr-7-et-symfony/ PSR-7 et Symfony]// [http://blog.netapsys.fr/author/nacera-boucetta/ Nacera Boucetta] 2016 ==== Routing ==== ===== nikic/fast-route vs symfony/routing ===== * [Google:nikic/fast-route+vs+symfony/routing] * [Google:fast-route+vs+symfony+router] * //[https://groups.google.com/forum/#!topic/symfony2/H9R1J7sF8Go Fast routing in Symfony (FastRoute library)?]// ===== RouteCollection vs RouteCollectionBuilder ===== [[span(''Microkernel part buggy to be rewritten''!, style=background: Tomato)]] {{{#!th **[http://api.symfony.com/master/Symfony/Component/Routing/RouteCollection.html RouteCollection]** }}} {{{#!th **[http://api.symfony.com/master/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')); }}} }}} |---------------- Written for 3.0 ===== (Dynamic and Auto) Routing ===== (Bundles depends on components) * CMF Dynamic Routing is used by some popular softwares, it is seen as a standard for integration * //[http://symfony.com/doc/current/cmf/book/routing.html Routing]// * [https://github.com/symfony-cmf/routing-bundle/tree/master/src/Doctrine/Orm] * //[http://symfony.com/doc/current/cmf/tutorial/auto-routing.html Routing and Automatic Routing]// * //[http://symfony.com/doc/current/cmf/bundles/routing_auto/introduction.html RoutingAutoBundle]// [https://phppackages.org/p/symfony-cmf/routing-auto-bundle symfony-cmf/routing-auto-bundle] ===== More about Routing ===== * [http://symfony.com/doc/current/cookbook/routing/custom_route_loader.html cookbook/routing/custom_route_loader] * [http://symfony.com/doc/current/cmf/tutorial/sonata-admin.html cmf/tutorial/sonata-admin]? ==== Security ==== ===== 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] ==== Stopwatch (also on PHP page) ==== * [https://packagist.org/packages/symfony/stopwatch symfony/stopwatch] * [https://packagist.org/packages/phpunit/php-timer phpunit/php-timer] ==== Translation ==== * [http://symfony.com/doc/current/components/translation.html The Translation Component] * [http://symfony.com/doc/current/session/locale_sticky_session.html Making the Locale "Sticky" during a User's Session] See HttpFoundation component. * see Bundle-Form-Translation * see Bundle-Admin-Translation === Bundles === * https://packagist.org/search/?q=bundle * http://symfony.com/doc/bundles/ ==== symfony/framework-standard-edition ==== * [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 * '''Dependency injection''': * [https://packagist.org/packages/dasprid/container-interop-doctrine dasprid/container-interop-doctrine] * '''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://github.com/Atlantic18/DoctrineExtensions Atlantic18/DoctrineExtensions] * Translations * [http://stackoverflow.com/questions/31420416/what-are-personal-translations-in-gedmo-doctrine-extensions What are Personal Translations in Gedmo Doctrine Extensions?] * [https://vincent.composieux.fr/article/manipulez-des-traductions-avec-doctrine-gedmo-translatable Manipulez des traductions avec Doctrine Gedmo Translatable (French)] * [https://packagist.org/packages/knplabs/doctrine-behaviors knplabs/doctrine-behaviors] * http://knplabs.com/fr/blog/knp-doctrine-orm-behaviors * [https://packagist.org/packages/a2lix/translation-form-bundle a2lix/translation-form-bundle] * [https://packagist.org/packages/a2lix/i18n-doctrine-bundle a2lix/i18n-doctrine-bundle] * [https://packagist.org/packages/prezent/doctrine-translatable-bundle prezent/doctrine-translatable-bundle] doctrine-translatable/doc/getting-started.md * [http://a2lix.fr/2014/08/04/translate-internationalize-doctrine-entities-sonata.html Translate/Internationalize your Doctrine entities with ease - Custom backend and Sonata compatible] * https://github.com/a2lix/Demo * TwigBundle - Adds support for the Twig templating engine * [https://sensiolabs.com/en/twig/certification.html Twig Certification] * 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 * [https://packagist.org/packages/symfony/monolog-bundle monolog-bundle] MonologBundle - Adds support for Monolog, a logging library * [http://symfony.com/doc/current/logging.html Logging with Monolog] * WebProfilerBundle (in dev/test env) - Adds profiling functionality and the web debug toolbar * [https://packagist.org/packages/elao/web-profiler-extra-bundle elao/web-profiler-extra-bundle] * 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 ==== * [[span([https://phppackages.org/p/symfony/framework-bundle/referenced-by PHP packages that reference symfony/framework-bundle], style=background: GreenYellow)]] ===== Bundles not to choose ===== * [https://packagist.org/packages/jms/serializer jms/serializer] (Why? They have been a may be dependency problem in an old version, probably no more an issue) * [https://jolicode.com/blog/do-not-use-fosuserbundle Do not use FOSUserBundle] (Read on KNP University how to use it with "Guard") ==== Admin: sonata-project/admin-bundle ==== * [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 ===== * fork CMS * //[https://youtu.be/zHuG-MyDQa8?list=PLzPK7Fy3SN2cvLglujdweDKNMNQhHDbTT Episode 22 - Créer une administration avec Symfony2]// (fr) ==== 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 ===== 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 ==== (Other) 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 [https://phppackages.org/p/knpuniversity/oauth2-client-bundle knpuniversity/oauth2-client-bundle] ===== HybridAuth ===== * based on [https://phppackages.org/p/hybridauth/hybridauth hybridauth/hybridauth] NOTE: HybridAuth is in maintainance mode. Although pull requests from the community are still accepted, you should find alternatives if you are starting a new project. HA is getting outdated by the day and there are no official plans to work on 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://phppackages.org/p/fp/openid-bundle fp/openid-bundle] based on [https://phppackages.org/p/lightopenid/lightopenid lightopenid/lightopenid] which is almost unsupported. * [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 (no openid guard bundle (march 2017)) ===== Feed ===== * keyword: symfony rss atom * [https://packagist.org/packages/eko/feedbundle eko/feedbundle] A Symfony bundle to build RSS feeds from entities (based on zend-feed) * [https://packagist.org/packages/debril/rss-atom-bundle debril/rss-atom-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 * [https://jstree.com/ jsTree] * 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://www.symfony.fi/entry/symfony-and-search-lucene-solr-and-elasticsearch Symfony and Search: Lucene, Solr and Elasticsearch] * Solarium * [https://packagist.org/packages/solarium/solarium solarium/solarium] [https://packagist.org/search/?q=solarium Packagist...] * [https://packagist.org/packages/nelmio/solarium-bundle nelmio/solarium-bundle] * [https://packagist.org/packages/floriansemm/solr-bundle floriansemm/solr-bundle] * [wiki:members/GRIP-UQAM/PHP#zendframeworkzendsearch PHP zendframework/zendsearch] * [https://packagist.org/packages/egeloen/lucene-search-bundle egeloen/lucene-search-bundle] * https://framework.zend.com/manual/2.4/en/tutorials/lucene.intro.html * [wiki:members/GRIP-UQAM/InformationRetrievalSoftwareLibraries] * [wiki:PHP] * [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] ===== Spatial search ===== * keyword: [https://www.google.ca/search?q=spatial+search spatial search] * [http://django-haystack.readthedocs.io/en/stable/spatial.html django-haystack doc] [http://haystacksearch.org/ haystacksearch.org] ==== 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 === Symfony - Kotti === * https://github.com/truelab/ == Using friendsofsymfony/user-bundle == === Using a custom storage layer === * //[http://symfony.com/doc/master/bundles/FOSUserBundle/custom_storage_layer.html Using a custom storage layer]// ==== UserInterface ==== * //[http://php.net/manual/en/class.serializable.php The Serializable interface]// * //[http://php.net/manual/en/language.oop5.abstract.php Class Abstraction]// ===== UserInterface ===== * Symfony\Component\Security\Core\User * Represents the interface that all user classes must implement. * Objects that implement this interface are created and loaded by different objects that implement UserProviderInterface * Users are serialized to be saved in the session. * http://api.symfony.com/master/Symfony/Component/Security/Core/User/UserInterface.html * //[https://symfony.com/doc/current/security/custom_provider.html How to Create a custom User Provider]// * //[http://symfony.com/doc/current/security/entity_provider.html How to Load Security Users from the Database (the Entity Provider)]// (Similar but different approach) * //[http://symfony2-document.readthedocs.io/en/latest/cookbook/security/entity_provider.html How to load Security Users from the Database (the Entity Provider)]// {{{#!sh interface UserInterface string getUsername() (Role|string)[] getRoles() string getPassword() # This should be the encoded password. eraseCredentials() string|null getSalt() }}} ===== AdvancedUserInterface ===== * Symfony\Component\Security\Core\User * Adds extra features to a user class related to account status flags. * http://api.symfony.com/master/Symfony/Component/Security/Core/User/AdvancedUserInterface.html * //[http://symfony.com/doc/current/security/entity_provider.html#security-advanced-user-interface Forbid Inactive Users (AdvancedUserInterface)]// {{{#!sh interface AdvancedUserInterface implements UserInterface bool isAccountNonExpired() bool isAccountNonLocked() bool isCredentialsNonExpired() bool isEnabled() }}} ===== FOS\UserBundle UserInterface ===== * FOS\UserBundle\Model\UserInterface * https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Model/UserInterface.php {{{#!sh interface UserInterface extends AdvancedUserInterface, \Serializable const ROLE_DEFAULT = 'ROLE_USER'; const ROLE_SUPER_ADMIN = 'ROLE_SUPER_ADMIN'; mixed getId() # string getUsername() self setUsername(string $username) self setUsernameCanonical(string $usernameCanonical) string getUsernameCanonical() # (Role|string)[] getRoles() self setRoles(array $roles) self addRole(string $role) self removeRole(string $role) bool hasRole(string $role) # Never use this, instead: $authorizationChecker->isGranted('ROLE_USER') self setSuperAdmin(bool $superAdmin) bool isSuperAdmin() # string getPassword() self setPassword(string $password) # also hashed # eraseCredentials() self setPlainPassword(string $password) string getPlainPassword() # !! 2017-07 # string|null getSalt() setSalt(string|null $salt) self setPasswordRequestedAt(DateTime $date = null) int isPasswordRequestNonExpired(int $ttl) # seconds self setConfirmationToken(string $confirmationToken) string getConfirmationToken() # bool isCredentialsNonExpired() self setEmail(string $email) string getEmail() self setEmailCanonical(string $emailCanonical) string getEmailCanonical() # bool isAccountNonExpired() # bool isAccountNonLocked() # bool isEnabled() self setEnabled(bool $enabled) self setLastLogin(DateTime $time = null) }}} ===== User ===== * FOS\UserBundle\Model\User * Storage agnostic user object. * https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Model/User.php {{{#!sh abstract class User implements UserInterface, GroupableInterface ... }}} * ORM Mapping is in the xml file [https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/config/doctrine-mapping/User.orm.xml Resources/config/doctrine-mapping/User.orm.xml] it does not map "$id" neither "$plainPassword"(!) defined in [https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Model/User.php Model/User.php]. ==== UserManagerInterface ==== * FOS\UserBundle\Model\UserManagerInterface * Relationship with UserLoaderInterface? * Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface * //[http://symfony.com/doc/current/security/entity_provider.html#using-a-custom-query-to-load-the-user Using a Custom Query to Load the User]// * Other approach based exclusively on doctrine ORM, apparently. * [https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Model/UserManagerInterface.php Model/UserManagerInterface.php] ===== Model UserManager ===== * FOS\UserBundle\Model\UserManager * [https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Model/UserManager.php Model/UserManager.php] {{{#!sh abstract class UserManager implements UserManagerInterface }}} ===== Doctrine UserManager ===== * FOS\UserBundle\Doctrine\UserManager * [https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Doctrine/UserManager.php Doctrine/UserManager.php] {{{#!sh class UserManager extends FOS\UserBundle\Model\UserManager }}}