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

Proxy file generated on every request #37

Open
koekaverna opened this issue Nov 28, 2023 · 0 comments
Open

Proxy file generated on every request #37

koekaverna opened this issue Nov 28, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@koekaverna
Copy link

Hello, first of all I would like to thank you for developing this bundle.

I found one bug in our production, because var/cache folder is readonly and writing is only available at warmup. I got error:

Cannot rename \"/tmp/AcsiomaticDeviceDetectorBundle__PM__DeviceDetectorDeviceDetecto16oePZ\" to \"/var/www/html/var/cache/prod/AcsiomaticDeviceDetectorBundle/AcsiomaticDeviceDetectorBundle__PM__DeviceDetectorDeviceDetectorGeneratedd1
e8956d6a5423635e0218acd8c636ae.php\": rename(/tmp/AcsiomaticDeviceDetectorBundle__PM__DeviceDetectorDeviceDetecto16oePZ,/var/www/html/var/cache/prod/AcsiomaticDeviceDetectorBundle/AcsiomaticDeviceDetectorBundle__PM__DeviceDetectorDeviceDetectorGeneratedd1e8956d6a5423635e0218acd8c636ae.php

I found the problem in return $factory->createProxy(...). It looking for class_exists before generating new class, but it's not loaded and there is no autoloading for this class.
I cheked how it works in DoctrineMongoDBBundle and found how they use it

I made the fix using same aproach:
PR: #36

@renanbr renanbr added the bug Something isn't working label Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants