Get rid of the legacy code with Rector

This is a past event

9 people went

Lamp Bristol

6 Lower Park Row, Bristol, BS1 5BJ · Bristol

How to find us

Lamp Bristol is next door to the Ship Inn. If you're looking at the Ship Inn, we're the building to the right. Buzz "Lamp"

Location image of event venue


I'm really excited about this tool workshop, it's a guide to using, a tool for instant migrations and PHP application upgrades (the bigger the better). It will be given by Tomáš Votruba, author of Rector.

# What will you learn?

- What is pattern refactoring
- How AST works
- What are the AST nodes
- How to Write a Migration Rule in Rector
- How to quickly and cheaply migrate your current code to the dream code
- The course is practical and works with the code you bring.

At the end of the training you will be able to migrate large code-base in a fraction of the time and, most importantly, write your own rules so that you will be able to get your project to work wherever you want.

# This training is for those who:

- want to get rid of the old version of the framework
- want to upgrade PHP from 5.x to 7.4
- want to migrate from statics to constructor injection
- want to move from one framework to another
- want to move from one test framework to another

And most importantly, they want to learn how to work efficiently, whatever they need to change in their application, which would otherwise take weeks of work . That's what Rector will help you the most.

# What is needed before training?

- Being able to execute commands from the command line
- Have Rector installed locally (requires PHP 7.1 or Docker) to run the "vendor / bin / rector" command
- Have 3-4 snippets of PHP code in the length of[masked] lines, which repeat in the application more than 20 times and which you need to refactor


Thanks to our sponsors OnCorps ( and Lamp Bristol (, without them we couldn't run the workshops.

OnCorps helps people make better decisions by giving them personalised decision making tools powered by machine learning and behavioural science algorithms.

We build web apps using a combination of PHP, JavaScript & R for a number of large corporate clients with our engineering team based in Bristol. We are looking for new people to join our growing team -