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
89
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
K6, stresser son application en douceur
guikingone
1
29
Need to search through your data? Heard about Meilisearch?
guikingone
1
150
Meilisearch
guikingone
1
120
SQLite en production ? Et si vous réévaluiez vos options ?
guikingone
1
860
Dagger, la CI, autrement
guikingone
1
230
Rector, time to refactor your code easily
guikingone
2
310
N'ayez pas peur de refactoriser
guikingone
1
750
Cypress, the E2E must learn from the past
guikingone
1
90
Cypress, le E2E moderne doit encore apprendre du passé
guikingone
2
380
Other Decks in Programming
See All in Programming
connect-go で面倒くささと戦う / 2024-08-27 #newmo_layerx_go
izumin5210
2
630
unique パッケージから学ぶ interning と weak reference @ Asakusa.go#3
karamaru
2
740
『ドメイン駆動設計をはじめよう』中核の業務領域
masuda220
PRO
5
970
Go1.23で入った errorsパッケージの小さなアプデ
kuro_kurorrr
2
330
Swiftコードバトル必勝法
toshi0383
0
150
ECMAScript、Web標準の型はどう管理されているか / How ECMAScript and Web standards types are maintained
petamoriken
3
390
開発を加速する共有Swift Package実践
elmetal
PRO
0
400
What you can do with Ruby on WebAssembly
kateinoigakukun
0
160
私のEbitengineの第一歩
qt_luigi
0
440
実践 Advanced CallKit 〜快適な通話の実現に向けて〜
mot_techtalk
3
120
僕が思い描くTypeScriptの未来を勝手に先取りする
yukukotani
9
2.3k
【TID2024】模擬講義:プログラマと一緒にゲームをデザインしてみよう!
akatsukigames_tech
0
580
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1365
200k
WebSockets: Embracing the real-time Web
robhawkes
59
7.3k
Six Lessons from altMBA
skipperchong
26
3.3k
The Pragmatic Product Professional
lauravandoore
31
6.2k
Rails Girls Zürich Keynote
gr2m
93
13k
A better future with KSS
kneath
235
17k
VelocityConf: Rendering Performance Case Studies
addyosmani
322
23k
Designing on Purpose - Digital PM Summit 2013
jponch
113
6.8k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.3k
A Tale of Four Properties
chriscoyier
155
22k
Infographics Made Easy
chrislema
239
18k
Making Projects Easy
brettharned
113
5.8k
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