Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mhsdesign opened this issue Feb 4, 2024 · 1 comment · May be fixed by #3304
Open

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

mhsdesign opened this issue Feb 4, 2024 · 1 comment · May be fixed by #3304

Comments

@mhsdesign
Copy link
Member

mhsdesign commented Feb 4, 2024

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 e7c00fa 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
Copy link
Member Author

Also when enums get deleted they seem to crash the compilation of flow because unserialize:

22 Neos\Flow\Error\ErrorHandler::handleError(2, "unserialize(): Class 'Neos\ContentRepository\Core\…eRebase\Dto\RebaseErrorHandlingStrategy' not found", "/Users/marchenryschultz/Code/core/neos-manufacture…k/Neos.Cache/Classes/Frontend/VariableFrontend.php", 94)
21 unserialize("a:4:{s:19:"classReflectionData";a:1775:{s:11:"Arra…e";a:1:{s:11:"onPostFlush";s:11:"onPostFlush";}}}}")
20 Neos\Cache\Frontend\VariableFrontend::get("ReflectionData")
19 Neos\Flow\Reflection\ReflectionService::loadClassReflectionCompiletimeCache()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant