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
69
Building a semantic search experience using PHP and Meilisearch
guikingone
0
110
Symfony UX et le frontend
guikingone
1
47
K6, stresser son application en douceur
guikingone
1
56
Need to search through your data? Heard about Meilisearch?
guikingone
1
200
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
OpenTelemetryで始めるベンダーフリーなobservability / Vendor-free observability starting with OpenTelemetry
seike460
PRO
0
160
CQRS/ESのクラスとシステムフロー ~ RailsでフルスクラッチでCQRSESを組んで みたことから得た学び~
suzukimar
0
190
事業戦略を理解してソフトウェアを設計する
masuda220
PRO
2
220
TVer iOSチームの共通認識の作り方 - Findy Job LT iOSアプリ開発の裏側 開発組織が向き合う課題とこれから
techtver
PRO
0
710
がんばりすぎないコーディングルール運用術
tsukakei
1
180
Building an Application with TDD, DDD and Hexagonal Architecture - Isn't it a bit too much?
mufrid
0
370
TSConfigからTypeScriptの世界を覗く
planck16
2
1.3k
AIにコードを生成するコードを作らせて、再現性を担保しよう! / Let AI generate code to ensure reproducibility
yamachu
7
6k
"使いづらい" をリバースエンジニアリングする UI の読み解き方
rebase_engineering
0
110
DevTalks 25 - Create your own AI-infused Java apps with ease
kdubois
2
120
💎 My RubyKaigi Effect in 2025: Top Ruby Companies 🌐
yasulab
PRO
1
130
インターフェース設計のコツとツボ
togishima
2
480
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
172
14k
The World Runs on Bad Software
bkeepers
PRO
68
11k
RailsConf 2023
tenderlove
30
1.1k
A better future with KSS
kneath
239
17k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
460
Become a Pro
speakerdeck
PRO
28
5.4k
Bash Introduction
62gerente
614
210k
Practical Orchestrator
shlominoach
188
11k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
Building Applications with DynamoDB
mza
95
6.4k
The Power of CSS Pseudo Elements
geoffreycrofte
76
5.8k
The Art of Programming - Codeland 2020
erikaheidi
54
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