In my latest article I showed my implementation of the Pattern Builder with support of Symfony’s Service Tag.
I love this Symfony service, and this time I would like to show you how to use it to implement another design pattern: The Visitor pattern, less known than the Builder pattern but also very nice and useful.

To do this we start from the excellent example of refactoring.guru, but going to modify it slightly to fit our purpose.
Comments