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

feat(session): delay session boot until all plugins are loaded #12107

Merged
merged 1 commit into from Jul 19, 2018

Conversation

hypeJunction
Copy link
Contributor

In certain situations, we want plugins to have control over the session user,
e.g. by registered custom entity classes. This breaks down the plugin boot sequence
further to allow the system to perform operations, such as session boot,
after plugin files have been loaded, and the necessary plugin registrations took
place

@hypeJunction
Copy link
Contributor Author

@jeabakker @jdalsem Can you think of any place that we check logged in user before the plugins boot are complete?

@hypeJunction
Copy link
Contributor Author

Found the answer, there is nothing happening betweeen _elgg_services()->boot->boot() and plugins boot, so we are golden.

@hypeJunction
Copy link
Contributor Author

Fixes #8868

@jdalsem
Copy link
Member

jdalsem commented Jul 19, 2018

This look good, however having elgg_echo in your static config causes problems (mod/file/elgg-plugin.php). Languages are not loaded in preload. Same could apply to using custom language key in your classes.

Moving translation into preload should be enough i think.

@hypeJunction
Copy link
Contributor Author

I think allowing function calls in static config should be prohibited.

In certain situations, we want plugins to have control over the session user,
e.g. by registered custom entity classes. This breaks down the plugin boot sequence
further to allow the system to perform operations, such as session boot,
after plugin files have been loaded, and the necessary plugin registrations took
place
@jdalsem
Copy link
Member

jdalsem commented Jul 19, 2018

I think allowing function calls in static config should be prohibited.

not something we can enforce now anymore

@jdalsem
Copy link
Member

jdalsem commented Jul 19, 2018

This was done right?

@hypeJunction
Copy link
Contributor Author

Yes

@jdalsem jdalsem merged commit 9e3c76e into Elgg:3.x Jul 19, 2018
@hypeJunction hypeJunction deleted the delay-boot branch July 19, 2018 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants