Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Symfony 4.2 updated
Search
Tim Jabs
January 24, 2019
Technology
0
110
Symfony 4.2 updated
Tim Jabs
January 24, 2019
Tweet
Share
More Decks by Tim Jabs
See All by Tim Jabs
Symfony 4.2
rubinum
0
590
Symfony 4.1 What's New?
rubinum
4
1.1k
Other Decks in Technology
See All in Technology
JVM(JavaVM)の性能分析者観点で探るInstanaの可能性
instanautsjp
0
100
サイバー攻撃を想定したセキュリティガイドライン 策定とASM及びCNAPPの活用方法
syoshie
3
1.4k
AWS re:Invent 2024 ふりかえり勉強会
yhana
0
340
Work as an App Engineer
lycorp_recruit_jp
0
330
怖くない!ゼロから始めるPHPソースコードコンパイル入門
colopl
0
140
20241214_WACATE2024冬_テスト設計技法をチョット俯瞰してみよう
kzsuzuki
3
660
サービスでLLMを採用したばっかりに振り回され続けたこの一年のあれやこれや
segavvy
2
530
[トレノケ雲の会 mod.13] 3回目のre:Inventで気づいたこと -CloudOperationsを添えて-
shintaro_fukatsu
0
110
非機能品質を作り込むための実践アーキテクチャ
knih
5
1.6k
1等無人航空機操縦士一発試験 合格までの道のり ドローンミートアップ@大阪 2024/12/18
excdinc
0
180
Fanstaの1年を大解剖! 一人SREはどこまでできるのか!?
syossan27
2
180
pg_bigmをRustで実装する(第50回PostgreSQLアンカンファレンス@オンライン 発表資料)
shinyakato_
0
110
Featured
See All Featured
A Tale of Four Properties
chriscoyier
157
23k
Making Projects Easy
brettharned
116
6k
Optimizing for Happiness
mojombo
376
70k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
520
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Making the Leap to Tech Lead
cromwellryan
133
9k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
66k
A better future with KSS
kneath
238
17k
Automating Front-end Workflow
addyosmani
1366
200k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Transcript
SYMFONY 4.2 WHAT'S NEW? 1
Who am I? Tim Jabs Software Developer @Sensiolabs Deutschland
Twitter: @_Rubinum_ 2
3
4 Symfony 4.2
DEPRECATIONS !5
DEPRECATIONS !6
DEPRECATIONS !7 Deprecated template directory: old default: src/Resources/views/ new default:
templates/ How can I change this? config/packages/twig.yaml twig.default_path
DEPRECATIONS !8 Deprecated the Kernel name and root dir: No
more: KernelInterface::getName()/ getRootDir() => getProjectDir() If you need a distinctive ID for the kernel: KernelInterface::getContainerClass()
DEPRECATIONS !9 Deprecated ContainerAwareCommand class: No more: ContainerAwareCommand Use: Command
+ dependency injection
DEPRECATIONS !10 Deprecated Controller Class: No more: Controller $this->get(FooClass::class) Use:
AbstractController + dependency injection
DEPRECATIONS !11
DEPRECATIONS !12
DEPRECATIONS !13 Deprecated process input as string:
SIDE NOTE !14 before: after:
DEPRECATIONS !15 Deprecated tree builders without root nodes:
DEPRECATIONS !16 Take care! There are even more deprecations take
this https://github.com/symfony/symfony/blob/4.2/ UPGRADE-4.2.md
NEW COMPONENT !17
NEW COMPONENT !18 VAREXPORTER
NEW COMPONENT !19 Example: export($data)
NEW COMPONENT !20
ENV FILE PER ENVIRONMENT !21
ENV FILE PER ENVIRONMENT !22 No More: .env.dist But: .env
is part of of the repository now
ENV FILE PER ENVIRONMENT !23 before: .env after: .env .env.test
.env.dev .env.dev.local
ENV FILE PER ENVIRONMENT !24 //.env DATABASE_URL: … DATABASE_URL_TEST: …
DATABASE_URL_TEST_LOCAL: …
TRANSLATION RELATED IMPROVEMENTS !25
TRANSLATION RELATED IMPROVEMENTS !26 before:
TRANSLATION RELATED IMPROVEMENTS !27 after:
TRANSLATION RELATED IMPROVEMENTS !28 ICU parent locales as fallback: Example:
before: es_AR => es after: es_AR => es_419 => es
TRANSLATION RELATED IMPROVEMENTS !29 Update XLF translations by default: before:
bin/console translation:update // output default JSON after: bin/console translation:update // output default XLF
TRANSLATION RELATED IMPROVEMENTS !30 Lint multiple XLIFF dirs or files:
bin/console lint:xliff supports multiple directories now
AUTOWIRING BY TYPE AND NAME !31
AUTOWIRING BY TYPE AND NAME !32
AUTOWIRING BY TYPE AND NAME !33
CACHE STAMPEDE !34
CACHE STAMPEDE !35
CACHE STAMPEDE !36
CACHE STAMPEDE !37
SECURITY !38
SECURITY !39 Detailed security voters decisions
SECURITY !40 before:
SECURITY !41 after:
FORMS !42
FORMS !43 Clear form errors:
FORMS !44 Improved form type extension
FORMS !45 before: Improved form type extension
FORMS !46 before: Improved form type extension
FORMS !47 after: Improved form type extension
FORMS !48 Improved form type extension
DIVISIBLE CONSTRAINT !49
PDO-BASED LOCK !50
PDO-BASED LOCK !51
PDO-BASED LOCK !52
PDO-BASED LOCK !53
THANK YOU 54
BONUS 4.3 PREVIEW !55
CONSOLE HYPERLINKS !56
TWIG DEPRECATED TAG !57
CONTRIBUTE? 58 You want to be part of Symfony? Take
a look: https://symfony.com/doc/current/contributing/ index.html
REFERENCES !59 Overview: https://symfony.com/blog/symfony-4-2-curated-new-features Changelog: https://symfony.com/blog/symfony-4-2-0-beta1-released https://symfony.com/blog/symfony-4-2-0-beta2-released Translations: https://symfony.com/blog/new-in-symfony-4-2-translation-related-improvements
https://symfony.com/blog/new-in-symfony-4-2-intlmessageformatter Deprecations: https://symfony.com/blog/new-in-symfony-4-2-important-deprecations Security: https://symfony.com/blog/new-in-symfony-4-2-samesite-cookie-configuration https://symfony.com/blog/new-in-symfony-4-2-auto-secure-cookies https://symfony.com/blog/new-in-symfony-4-2-detailed-security-voters-decisions
REFERENCES !60 Forms: https://symfony.com/blog/new-in-symfony-4-2-clear-form-errors https://symfony.com/blog/new-in-symfony-4-2-improved-form-type-extensions Misc: https://symfony.com/blog/new-in-symfony-4-2-cache-stampede-protection https://symfony.com/blog/new-in-symfony-4-2-divisibleby-constraint https://symfony.com/blog/new-in-symfony-4-2-addlink-shortcut https://symfony.com/blog/new-in-symfony-4-2-define-env-vars-per-environment
https://symfony.com/blog/new-in-symfony-4-2-acceptable-request-formats https://symfony.com/blog/new-in-symfony-4-2-simpler-custom-serialized-names https://symfony.com/blog/new-in-symfony-4-2-wait-until-processes-are-ready https://symfony.com/blog/new-in-symfony-4-2-varexporter-component https://symfony.com/blog/new-in-symfony-4-2-console-tables-improvements https://symfony.com/blog/new-in-symfony-4-2-pdo-based-lock-storage https://symfony.com/blog/new-in-symfony-4-2-autowiring-by-type-and-name https://symfony.com/blog/new-in-symfony-4-2-simpler-functional-tests https://symfony.com/doc/current/configuration/dot-env-changes.html