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
Switching off legacy code using one Symfony com...
Search
Loulier Guillaume
November 07, 2023
Programming
1
100
Switching off legacy code using one Symfony command at a time
Loulier Guillaume
November 07, 2023
Tweet
Share
More Decks by Loulier Guillaume
See All by Loulier Guillaume
Demandez et votre application répondra, la recherche sémantique avec PHP et Meilisearch
guikingone
1
52
Building a semantic search experience using PHP and Meilisearch
guikingone
0
42
Symfony UX et le frontend
guikingone
1
30
K6, stresser son application en douceur
guikingone
1
40
Need to search through your data? Heard about Meilisearch?
guikingone
1
180
Meilisearch
guikingone
1
120
SQLite en production ? Et si vous réévaluiez vos options ?
guikingone
1
930
Dagger, la CI, autrement
guikingone
1
240
Rector, time to refactor your code easily
guikingone
2
330
Other Decks in Programming
See All in Programming
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
120
わたしの星のままで一番星になる ~ 出産を機にSIerからEC事業会社に転職した話 ~
kimura_m_29
0
180
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
330
モバイルアプリにおける自動テストの導入戦略
ostk0069
0
110
useSyncExternalStoreを使いまくる
ssssota
6
1k
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
1
440
Semantic Kernelのネイティブプラグインで知識拡張をしてみる
tomokusaba
0
180
今年一番支援させていただいたのは認証系サービスでした
satoshi256kbyte
1
250
[JAWS-UG横浜 #76] イケてるアップデートを宇宙いち早く紹介するよ!
maroon1st
0
450
Refactor your code - refactor yourself
xosofox
1
260
talk-with-local-llm-with-web-streams-api
kbaba1001
0
180
rails statsで大解剖 🔍 “B/43流” のRailsの育て方を歴史とともに振り返ります
shoheimitani
2
930
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
Unsuck your backbone
ammeep
669
57k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
The World Runs on Bad Software
bkeepers
PRO
65
11k
How to Ace a Technical Interview
jacobian
276
23k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
Rails Girls Zürich Keynote
gr2m
94
13k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
170
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Transcript
Switching off legacy code using one Symfony command at a
time
Greetings
Hellcome Guillaume Loulier / @Guikingone Lead developer @SensioLabs Works mainly
with PHP and Rust Sometimes, I break things, especially legacy ones (and I like that)
Summary 01 - Legacy code is fun 02 - Migrating,
a far far away dream 04 - Symfony to the rescue 05 - Wrapping up 01
Legacy code is fun
Well, it should
Diving into the joke Refu*toring - The process of taking
a well-designed piece of code and, through a series of small, reversible changes, making it completely unmaintainable by anyone except yourself. Jason Gorman
Let the fun begin A legacy code is just an
abandoned one that generate revenues Maintaining legacy code should be easy At least, until it breaks Never needed to migrate PHP 5 code?
Dealing with technical debt Technical debt is ambiguous Yesterday code
is already outdated, sorry Need to migrate it? Bon chance
Keep dreamin’
I made a dream
Time for a wishlist Tracking, being aware of changes, updating
and deleting A new interface? For which use case? What about this method arguments type? Code spread across repositories?
Sadly What about using a dedicated channel? Or using trigger_error?
Or tools like Sentry, OpenTelemetry and many more? What if we’re in a special architecture?
Symfony?
Well…
The full experience Symfony brings a lot of components Could
we bring them together to help us? Look at Rector, PHPStan and more! What if we could “track & switch off” files?
Time to “Switchoff” Built on top of Symfony components and
nikic/PHP-Parser (chief kiss) Attributes for the win! Analyze, check, switch off, repeat Could be used via the CLI / CI
Want a demo?
What’s next?
To sum it up Handling migration is hard, not to
say boring Symfony could ease the process but lack of tools Relying on a framework is a recipe for failure Each project has its own rules / flaws
What about switchoff? Not fully stable (for now) A Symfony
bundle? (Already planned) An HTML dashboard What about a PHPStan / Rector bridge?
Wrapping up