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
110
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
70
Building a semantic search experience using PHP and Meilisearch
guikingone
0
110
Symfony UX et le frontend
guikingone
1
48
K6, stresser son application en douceur
guikingone
1
57
Need to search through your data? Heard about Meilisearch?
guikingone
1
210
Meilisearch
guikingone
1
130
SQLite en production ? Et si vous réévaluiez vos options ?
guikingone
1
1k
Dagger, la CI, autrement
guikingone
1
270
Rector, time to refactor your code easily
guikingone
2
350
Other Decks in Programming
See All in Programming
RubyKaigi Hack Space in Tokyo & 函館最速 "予習" 会 / RubyKaigi Hack Space in Tokyo & The Fastest Briefing of RubyKaigi 2026 in Hakodate
moznion
1
130
人には人それぞれのサービス層がある
shimabox
3
630
漸進。
ssssota
0
1.5k
#QiitaBash TDDでAIに設計イメージを伝える
ryosukedtomita
2
1.6k
MLOps Japan 勉強会 #52 - 特徴量を言語を越えて一貫して管理する, 『特徴量ドリブン』な MLOps の実現への試み
taniiicom
2
610
Prism.parseで 300本以上あるエンドポイントに 接続できる権限の一覧表を作ってみた
hatsu38
1
100
Use Perl as Better Shell Script
karupanerura
0
680
衛星の軌道をWeb地図上に表示する
sankichi92
0
260
TypeScript エンジニアが Android 開発の世界に飛び込んだ話
yuisakamoto
6
1k
インターフェース設計のコツとツボ
togishima
2
660
Babylon.js 8.0のアプデ情報を 軽率にキャッチアップ / catch-up-babylonjs-8
drumath2237
0
120
Javaに鉄道指向プログラミング (Railway Oriented Pro gramming) のエッセンスを取り入れる/Bringing the Essence of Railway-Oriented Programming to Java
cocet33000
1
450
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
68
11k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Six Lessons from altMBA
skipperchong
28
3.8k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.6k
KATA
mclloyd
29
14k
Speed Design
sergeychernyshev
30
980
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
123
52k
Fireside Chat
paigeccino
37
3.5k
Producing Creativity
orderedlist
PRO
346
40k
Designing for humans not robots
tammielis
253
25k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.5k
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