As discussed during the Neos Team meetings and the Neos Conference 2023 in Berlin, I would like to offer working on a bigger Flow refactoring which solves current issues with proxy class building, reflection, AOP, DI related to PHP 8.2. This is to make Flow fit for the upcoming 9.0 release after the summer break.
As this is a complex task, it makes most sense to work on this focused and in a coherent period of time.
What do you want to spend money on?
The general goal is: refactor Flow as far as possible so that applications, including Neos, can use all PHP 8.2 language features and at the same time modernize parts of Flow itself to use new language features where possible.
For that I’m creating a list of specific tasks I plan to work at, prioritize them and work on them as far as time allows (the Github project is here: https://github.com/orgs/neos/projects/44/views/1).
How much money do you want to spend?
8h x 5d x 4w = 16.000 € for the focused refactoring period
8h x 5d = 4.000 € for supportive tasks, like reviews, pairing etc.
What’s special with this task is, that we (or probably anybody) won’t find a customer project which could be used to raise funds, as it is no “sellable” feature.
The biggest part of the work would be done by me (Robert Lemke), Christian Müller and Karsten Dambekalns offer to help with supportive tasks, but of course I’ll gladly accept support by others, as long as the persons have a deep-enough insight into this topic, so I can stay focused.
In what timeframe do you want to spend the money?
I’d like to start right away and finish the refactoring before my summer break so that it is ready / stable in time for the Flow 9.0 release.
+1 yeehaw!
A little personal wish/question: Will your change adjust the behavior such that proxies are only generated for classes that actually need it because they are target of some AOP aspect or DI? IIRC Christian was working on that.
I find myself using Proxy(false) annotations more and more but somehow it feels wrong.
And, slightly related: It should be possible to create proxies for almost every class (e.g. including Value Objects) without special care.
Thanks for the pointer to that chapter again – yes, there’s definitely the danger of getting lost in a rabbit hole, as proxy class building, reflection, dependency injection, AOP and object management are so interconnected. However, I made a list (and on top of that, a mental note) of which areas I want to tackle and which I need to leave alone this time. As I stumble over new ideas and things to fix, I’ll document them in new Github issues and leave them there until the must-haves are finished.
Yes, if have these on my list already (see also: Flow 9.0 - Proxy Class Refactoring · GitHub). My goal for the Proxy(false) annotation / attribute is that there should be hardly any situation in which you need to use it.
So far I was able to spend 71 hours working on the refactoring tasks (all the day and night dreaming about proxy classes not counted in ;-)). Karsten and Christian helped me a lot by discussing solutions and doing thorough reviews, which were 14,5 hours in total.
I mostly worked on the Proxy Class Building part of Flow, replaced an important (and delicate) part of it by Laminas Code, which will automatically give us support for new PHP language features for rendering proxy methods. I also tackled the long awaited issue of too many proxy classes being generated and fixed several bugs along the way.
In total, I finished work on the following pull requests during May:
There are still enough tasks to be done and there’s also still enough budget. Working exclusively on Flow is really a challenge and at the moment I can’t really focus on any other (Flownative) work even though there’s – theoretically – working time left. So, I’ll start June now with catching up on a few important Flownative topics, mostly customer support, and then continue with the Flow refactoring as promised.
So far we spent 110 hours working on several related issues, mostly me developing but also a few hours for help and reviews by Karsten and Christian.
There are a few new pull requests under review right now. When they are merged / working fine, I have probably solved the most pressing issues we had with Flow and PHP 8.
Of course there are more tasks to solve and I also have more ideas for important optimizations. I’ll do my best to work on that during the next days / weeks, however, I also need to give some attention to our customers, because some of the are – due to Neos Conference preparation, conference, sprint and this refactoring, waiting for me becoming available since end of March already
If you have any comments / wishes regarding this project, please let me know.