wiki:members/GRIP-UQAM/Symfony

Version 30 (modified by Grip Uqam, 7 years ago) ( diff )

--

Symfony Programming

Tutorials

Software using Symfony

EZ Plateform

Symfony Programming Tools

Hacking

autoload.php

MicroKernel

Components

Some popular Components

Console

http://phppackages.org/p/symfony/console/badge/rank.svg https://www.versioneye.com/php/symfony:console/reference_badge.svghttps://img.shields.io/packagist/dm/symfony/console.svg

...

Yaml

https://www.versioneye.com/php/symfony:yaml/reference_badge.svghttps://img.shields.io/packagist/dm/symfony/yaml.svg

...

Finder

https://www.versioneye.com/php/symfony:finder/reference_badge.svghttps://img.shields.io/packagist/dm/symfony/finder.svg

...

EventDispatcher

https://www.versioneye.com/php/symfony:event-dispatcher/reference_badge.svghttps://img.shields.io/packagist/dm/symfony/event-dispatcher.svg

...

https://packagist.org/packages/symfony/

https://www.versioneye.com/php/symfony:yaml/reference_badge.svghttps://img.shields.io/packagist/dm/symfony/yaml.svg

...

Dependency Injection

Form

HttpFoundation

PSR-7

Routing

RouteCollection vs RouteCollectionBuilder

RouteCollection

RouteCollectionBuilder

add(string $name, Route $route)

$this addRoute(Route $route, string|null $name = null)

Route add(string $path, string $controller, string|null $name = null

new RouteCollection()->add('root', new Route('/', [
    '_controller' => 'FrameworkBundle:Redirect:redirect',
    'route'       => 'sonata_admin_dashboard',
    'permanent'   => true,
])); // to check
new RouteCollectionBuilder()->addRoute(new Route('/', [
    '_controller' => 'FrameworkBundle:Redirect:redirect',
    'route'       => 'sonata_admin_dashboard',
    'permanent'   => true,
]),
    'root'
); // to check

Does not exist: cf $loader->import(...)

RouteCollectionBuilder import(mixed $resource, string|null $prefix = '/', string $type = null)

Does not exist: cf addCollection

mount($prefix, RouteCollectionBuilder $builder)

$collection = new RouteCollection();
$routing = $loader->import(
    "@SonataAdminBundle/Resources/config/sonata_admin.xml"
);
$routing->setPrefix('/admin');
$collection->addCollection($routing);
$routes->mount('/admin', $routes->import('@SonataAdminBundle/Resources/config/routing/sonata_admin.xml'));

Written for 3.0

Security

Guard (New in 2.8!)

Use in Symfony framework

Stopwatch (also on PHP page)

Translation

Bundles

symfony/framework-standard-edition

Choosing bundles

Bundles not to choose

Admin sonata-project/admin-bundle

Admin without Admin Bundle

Form related

Default value

(Other) Bundles documented by symfony.com

The list is there: http://symfony.com/doc/bundles/

Social Login

OAuth
HybridAuth
OpenID
Feed
Translation sonata-project/translation-bundle
Tree

Tree

Tag and Taxonomy

News, Newsletter

Spatial search

Blog

Payment

Help Desk, Bug Tracking and Ticket

CLI code generation example

$ 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

Note: See TracWiki for help on using the wiki.