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
92
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
Symfony UX et le frontend
guikingone
1
9
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
890
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
770
Cypress, the E2E must learn from the past
guikingone
1
90
Other Decks in Programming
See All in Programming
Why I Choose NetBeans for Jakarta EE
ivargrimstad
0
740
Folding Cheat Sheet #8
philipschwarz
PRO
0
120
学生の時に開催したPerl入学式をきっかけにエンジニアが組織に馴染むために勉強会を主催や仲間と参加して職能間の境界を越えていく
ohmori_yusuke
2
330
Golang と Erlang
taiyow
7
1.7k
のびしろを広げる巻き込まれ力:偶然を活かすキャリアの作り方/oso2024
takahashiikki
1
160
Повторное использование кода в ML: почему ML-пайплайны могут помочь?
lamodatech
0
370
Re:proS_案内資料
rect
0
130
UnJSで簡単に始めるCLIツール開発 / cli-tool-development-with-unjs
aoseyuu
2
380
Cloud Adoption Framework にみる組織とクラウド導入戦略
tomokusaba
2
670
cgroup v2 support in Kubeadm
kentatada
0
210
Quarto Clean Theme
nicetak
0
220
空間の中でアイドルとレッスンする技術 - 1st "Vision" / Spatial Lesson technologies with my idol - 1st "Vision"
banjun
PRO
0
240
Featured
See All Featured
Code Review Best Practice
trishagee
63
17k
Music & Morning Musume
bryan
46
6.1k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.6k
A Tale of Four Properties
chriscoyier
156
22k
Optimising Largest Contentful Paint
csswizardry
31
2.9k
Making Projects Easy
brettharned
115
5.9k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.8k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
23k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Writing Fast Ruby
sferik
626
60k
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