Hello,
I often add behavior to ApiPlatform classes. To do that decorating is stupid and copying the class is dangerous.
Considering I prefer to live dangerously than stupid, I copy the class. I think the systematic final for classes should be reconsidered.
Here are 2 example: I want to support new options in the yaml extractor / I want to support them inside the ExtractorPropertyMetadataFactory or I want to enforce one kind of ExtractorPropertyMetadataFactory because order of extractors is not good inside ApiPlatform...
Well, in this cases there's no better way than copy the code of ApiPlatform and hope the code will not evolve too much. I think it could be better by supporting extension (in particular in classes I speak about).
If there are extension points that could be added in a nice way, it'll of course be welcome. I don't believe that the policy of using final classes will change, as one of the intentions is to free us from having to deal with the additional maintenance workload of BC for subclasses.
Most helpful comment
If there are extension points that could be added in a nice way, it'll of course be welcome. I don't believe that the policy of using
finalclasses will change, as one of the intentions is to free us from having to deal with the additional maintenance workload of BC for subclasses.