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
100
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
Building a semantic search experience using PHP and Meilisearch
guikingone
0
27
Symfony UX et le frontend
guikingone
1
20
K6, stresser son application en douceur
guikingone
1
34
Need to search through your data? Heard about Meilisearch?
guikingone
1
170
Meilisearch
guikingone
1
120
SQLite en production ? Et si vous réévaluiez vos options ?
guikingone
1
910
Dagger, la CI, autrement
guikingone
1
240
Rector, time to refactor your code easily
guikingone
2
320
N'ayez pas peur de refactoriser
guikingone
1
780
Other Decks in Programming
See All in Programming
Arm移行タイムアタック
qnighy
0
310
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
6
1.7k
ヤプリ新卒SREの オンボーディング
masaki12
0
130
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
330
AWS IaCの注目アップデート 2024年10月版
konokenj
3
3.3k
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
1.5k
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
220
Macとオーディオ再生 2024/11/02
yusukeito
0
370
Remix on Hono on Cloudflare Workers
yusukebe
1
280
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
110
3rd party scriptでもReactを使いたい! Preact + Reactのハイブリッド開発
righttouch
PRO
1
600
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
229
18k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Code Reviewing Like a Champion
maltzj
520
39k
The Cult of Friendly URLs
andyhume
78
6k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
How STYLIGHT went responsive
nonsquared
95
5.2k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
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