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 command at a time
Search
Loulier Guillaume
November 07, 2023
Programming
1
78
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
23
Need to search through your data? Heard about Meilisearch?
guikingone
1
140
Meilisearch
guikingone
1
120
SQLite en production ? Et si vous réévaluiez vos options ?
guikingone
1
830
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
730
Cypress, the E2E must learn from the past
guikingone
1
88
Cypress, le E2E moderne doit encore apprendre du passé
guikingone
2
370
Other Decks in Programming
See All in Programming
Folding Cheat Sheet #7
philipschwarz
PRO
0
150
今こそ始める、CDKコンストラクトライブラリ開発 ― 入門から実践まで
tmokmss
1
930
CSC307 Lecture 13
javiergs
PRO
0
150
企業向け生成AIアプリの 開発から得られた知見
takaakikakei
0
310
生成AIをkintoneに連携してみた
hideg
0
230
ぼっちを避けて楽しむためのアノテコノテ / Various Tips and Tricks to Avoid Loneliness and Have Fun
nrslib
3
1.7k
Play Billing Library 7.0.0 変更点まとめ@potatotips#88
kako351
0
160
ドメイン駆動設計の実践
masuda220
PRO
17
5.1k
AWS初心者ってどうやってAWSを学ぶ?〜アプリエンジニアがやってよかったアーキテクチャ学習方法〜
yamanashi_ren01
0
190
リハビリmruby
kishima
1
160
feature環境をGitHub ActionsとCloudFormationでいい感じに管理する
nealle
2
310
なぜ宣言的 UI は壊れにくいのか / Why declarative UI is less fragile
uenitty
29
13k
Featured
See All Featured
From Idea to $5000 a Month in 5 Months
shpigford
377
46k
Why You Should Never Use an ORM
jnunemaker
PRO
51
8.9k
How to name files
jennybc
67
96k
Scaling GitHub
holman
458
140k
Unsuck your backbone
ammeep
666
57k
Rails Girls Zürich Keynote
gr2m
93
13k
StorybookのUI Testing Handbookを読んだ
zakiyama
15
4.9k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
105
6.8k
Designing with Data
zakiwarfel
96
5k
Code Review Best Practice
trishagee
58
16k
The Power of CSS Pseudo Elements
geoffreycrofte
64
5.2k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
78
15k
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