PHP 7.1.3
iconv
json_encode
session_start
ctype_alpha
token_get_all
simplexml_import_dom
PCRE extension
Installation automatisée de packages, plus de configurations manuelles dans le AppKernel pour démarrer
composer req cli
Installe et "enregistre" via une "recette" le composant cli
composer rem cli
Supprime et enlève la configuration pour le composant cli
"surcouche" composer
public function __construct(InvoiceGenerator $generator)
3.3+
a new Symfony 4 app is 70% smaller than Symfony 3.
Symfony is a micro-framework out-of-the-box!
"Install what you need"
(bye bye silex)
Every part of Symfony optimized and re-optimized
With #Symfony 3.4/4.0, enabling param `container.dumper.inline_class_loader` can boost your dev env perf by 50% and your prod by +2%. For free as usual :) /cc
Squeezing 6% out of a trimmed #Symfony 3.4/4.0 Hello World? Achieved! Inlining the hot path, that's the trick. Another @blackfireio success ;-)
A Symfony 4 app has a smaller directory structure, less "Symfony-ideas" and uses more standard ideas.
├── assets
├── bin
│ ├── console
├── config # All configuration goes here
│ ├── packages
│ │ ├── dev # Specific env config
│ ├── framework.yaml
│ ├── routing.yaml
│ ├── bundles.php # Array of bundles (auto generated)
│ ├── routes.yaml
│ ├── services.yaml
├── public # Web exposed folder (ex "web folder")
│ ├── index.php # Entry point, no more app_dev.php and app.php (No config.php.
│ # No .htaccess. No favicon.ico or apple-touch-icon.png. Not even robots.txt)
├── src # All your code goes here
│ ├── Controller
│ │ ├── ...
│ ├── Kernel.php
├── templates
├── tests
├── translations
├── var
│ ├── cache
│ ├── log
├── vendor
├── .env
├── .env.dist # env vars template (parameters replacement)
├── composer.json
├── composer.lock
├── symfony.lock # Symfony lock for flex recipes
Remplaçant du SensioGeneratorBundle
Pas encore complet sur tous les aspects :
Later we'll add more commands, including some interactive makers to generate a Doctrine entity asking for its properties, to generate a form based on a Doctrine entity, etc.
Aperçu à date :
php bin/console list make
make:command
make:controller
make:entity
make:form
make:functional-test
make:subscriber
make:twig-extension
make:unit-test
make:validator
make:voter
Recommandation officielle à partir de maintenant
Outil basé sur Node.js + webpack
If you already have Assetic working in an application, and haven't needed any of the features that Encore offers over Assetic, continuting to use Assetic is fine. If you do start to need more features, then you might have a business case for changing to Encore.
Assetic | Encore | |
---|---|---|
Language | Pure PHP, relies on other language tools for some tasks | Node.js |
Combine assets? | Yes | Yes |
Minify assets? | Yes (when configured) | Yes (out-of-the-box) |
Process Sass/Less? | Yes | Yes |
Loads JS Modules? | No | Yes |
Load CSS Deps in JS? | No | Yes |
React, Vue.js support? | No | Yes |
Support | Not actively maintained | Actively maintained |
Ce qui à l'air le plus compliqué est la nouvelle architecture de dossiers, car si on ne la suit pas on ne bénéficiera pas des bénéfices de symfony flex.
La documentation préconise de commencer par un projet vierge symfony 4 et d'y migrer le code
A voir également pour les projets découpés en bundles / bundles avec héritage sur leur migration qui devrait poser problème car on passe d'un système d'override à un système "à plat"
A la lecture de ce document, on voit que c'est encore trop tôt, si vous avez un projet reposant sur des bundles tiers, même si la version 4.0 de symfony est prête pour la production
composer create-project symfony/skeleton my_project