-
Notifications
You must be signed in to change notification settings - Fork 2
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
midgard_connection::open() and open_config() do not create classes #9
Comments
It's also related to classes' type. If it's user type, it should be freed at request end. If it's internal one, it should be initialized during MINIT as it guaranteed to register classes in main process before any new child is forked. |
@piotras this one is strictly about "schema" classes, which, in case of |
Yes, this is what I meant. It is unsafe to register internal class in child process, and doesn't make sense to register all mgdschema classes per every request. Unless, there are special routines which take cli and server context into account. But this one might be a bit complicated. |
This is a major annoyance when using Ratatoskr outside of Apache (with AiP, for instance). For now the workaround has been to use the The current state causes weird workarounds, like: |
In case, when connection is established manually using midgard_connection::open() or midgard_connection::open_config() methods and schema-directory in config-file is different from the schema-directory originally set in midgard, mgdschema classes (descendants of midgard_object) are not initialized.
Fixing this, would require to move initialization of these classes from PHP_MINIT_FUNCTION(midgard2_object) to some other function and call that function after new config is loaded
The text was updated successfully, but these errors were encountered: