flow-development-collection icon indicating copy to clipboard operation
flow-development-collection copied to clipboard

BUG: Reflection cache for class is not flushed on file deletion

Open mhsdesign opened this issue 1 year ago • 1 comments

That leads to forgetClass not being fired and allImplementationsForInterface returning stale classes which leads to places using that and instantiating objects like the property mapper crash if a property mapper was deleted:

Object "Neos\Neos\TypeConverter\NodeConverterBla" is not registered.

This seems to be a regression from https://github.com/neos/flow-development-collection/commit/e7c00fa73f678f086b10c741b875b8e7afc1a2c0 as the early return in file_exists($pathAndFilename) will prevent the cache flushing. The early return was a necessary evil to support psr4. Previously the class name was inferred by location (that it resides in Classes), now we scan its contents and build it. We should probably get the autoloading paths configuration from the package and build a path that way? But that information is not at hand at that time.

I guess we have to add the path to the Flow_Object_Classes as well?

mhsdesign avatar Feb 04 '24 14:02 mhsdesign