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
130
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
87
Building a semantic search experience using PHP and Meilisearch
guikingone
0
160
Symfony UX et le frontend
guikingone
1
60
K6, stresser son application en douceur
guikingone
1
65
Need to search through your data? Heard about Meilisearch?
guikingone
1
230
Meilisearch
guikingone
1
130
SQLite en production ? Et si vous réévaluiez vos options ?
guikingone
1
1.1k
Dagger, la CI, autrement
guikingone
1
270
Rector, time to refactor your code easily
guikingone
2
360
Other Decks in Programming
See All in Programming
Reactive Thinking with Signals and the Resource API
manfredsteyer
PRO
0
120
Kotlinで実装するCPU/GPU 「協調的」パフォーマンス管理
matuyuhi
0
240
GC25 Recap: The Code You Reviewed is Not the Code You Built / #newt_gophercon_tour
mazrean
0
140
20251016_Rails News ~Rails 8.1の足音を聴く~
morimorihoge
3
910
CSC305 Lecture 13
javiergs
PRO
0
350
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
680
Swift Concurrency 年表クイズ
omochi
3
220
Temporal Knowledge Graphで作る! 時間変化するナレッジを扱うAI Agentの世界
po3rin
5
1.2k
퇴근 후 1억이 거래되는 서비스 만들기 | 내가 AI를 사용하는 방법
maryang
2
340
なんでRustの環境構築してないのにRust製のツールが動くの? / Why Do Rust-Based Tools Run Without a Rust Environment?
ssssota
14
47k
Pythonに漸進的に型をつける
nealle
1
150
フロントエンド開発のためのブラウザ組み込みAI入門
masashi
7
3.7k
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.3k
A Tale of Four Properties
chriscoyier
161
23k
Typedesign – Prime Four
hannesfritz
42
2.8k
A better future with KSS
kneath
239
18k
Side Projects
sachag
455
43k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.7k
Automating Front-end Workflow
addyosmani
1371
200k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.5k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.2k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
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