-
-
Notifications
You must be signed in to change notification settings - Fork 188
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: Authentication is broken with new Proxy Class Building #3062
Comments
Pins the version of Flow to commit ff724597bdf1832625c02aba317577324251a7a7 that contains a working version before the Proxy Class Refactoring. *Note:* This is just a temporary work around until Flow 9.0 is stable again Related: neos/flow-development-collection#3062
It's not directly to be reproduced like you mentioned, you first need to apply another patch. Here's what I did:
What I see then, using PHP 8.2, are a lot of errors like:
To solve that, cherry-pick and merge conflicts of this PR by @kitsunet : #3032 Then try to open the Neos backend via https://thedomain/neos – you will end up on this page: The System.log contains the following error:
The stacktrace is:
|
Further hints to how to reproduce this:
In Slack, @bwaidelich mentioned the |
When I add the following code to public function __sleep(): array
{
return ['options'];
}
} The problem seems to be this:
So, if that is the root problem, we have to decide how to solve this. We can either:
|
I am very much for having proxies if you used transient as this is mostly in relation to (session) serialisation so framework magic instead of userland necessities. |
My opinion: If there was no legacy, I'd not introduce that magic and let devs use |
devs totally can do __sleep as supposed to but in that case there is no need or use for transient annotations, so I guess that works out. I woudl rather suggest via future deprecation or at least documentation that we suggest you take care of this yourself instead of relying on the transient annotation? |
Due to a recent optimization, Flow was not generating `__sleep()` methods for classes which are not either entities or were configured with a session scope. This led to errors in classes which were using the `@Transient` annotation to exclude certain properties from serialization. Therefore, Flow now also generates proxy classes with `__sleep()` methods if the original class contains such annotations. Resolves: neos#3062
|
Is there an existing issue for this?
Current Behavior
Authenicating (with a session bound auth token) leads to an exception
Expected Behavior
no exception :)
Steps To Reproduce
1. Configure an authentication provider (e.g. using the
UsernamePassword
token) with an entry pointfor example
2. Authenticate
Alternatively, the Flow version can be upgraded in a running Neos installation
Environment
Anything else?
Slack debugging session: https://neos-project.slack.com/archives/C3MCBK6S2/p1685021294539839
The text was updated successfully, but these errors were encountered: