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
56
Building a semantic search experience using PHP and Meilisearch
guikingone
0
54
Symfony UX et le frontend
guikingone
1
34
K6, stresser son application en douceur
guikingone
1
44
Need to search through your data? Heard about Meilisearch?
guikingone
1
180
Meilisearch
guikingone
1
120
SQLite en production ? Et si vous réévaluiez vos options ?
guikingone
1
950
Dagger, la CI, autrement
guikingone
1
250
Rector, time to refactor your code easily
guikingone
2
330
Other Decks in Programming
See All in Programming
Внедряем бюджетирование, или Как сделать хорошо?
lamodatech
0
940
情報漏洩させないための設計
kubotak
5
1.3k
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
9
2.3k
Fibonacci Function Gallery - Part 2
philipschwarz
PRO
0
210
快速入門可觀測性
blueswen
0
500
Оптимизируем производительность блока Казначейство
lamodatech
0
950
テストコード書いてみませんか?
onopon
2
340
ある日突然あなたが管理しているサーバーにDDoSが来たらどうなるでしょう?知ってるようで何も知らなかったDDoS攻撃と対策 #phpcon.2024
akase244
2
7.7k
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
7
1.4k
Lookerは可視化だけじゃない。UIコンポーネントもあるんだ!
ymd65536
1
130
オニオンアーキテクチャを使って、 Unityと.NETでコードを共有する
soi013
0
370
週次リリースを実現するための グローバルアプリ開発
tera_ny
1
1.2k
Featured
See All Featured
A Tale of Four Properties
chriscoyier
157
23k
Mobile First: as difficult as doing things right
swwweet
222
9k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
230
52k
Embracing the Ebb and Flow
colly
84
4.5k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Building an army of robots
kneath
302
45k
Scaling GitHub
holman
459
140k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
570
Being A Developer After 40
akosma
89
590k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
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