-
Notifications
You must be signed in to change notification settings - Fork 420
extgen: Add support for init/minit/mshutdown #1786
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
base: main
Are you sure you want to change the base?
Conversation
c036230 to
3d9d672
Compare
|
My last commit breaks classes, but is needed for functions-only extensions. I'll need to make that import conditional on whether or not there are classes present and add a test for it. |
|
This one is probably ready for review now @dunglas |
|
This is really nice and certainly useful. Thanks! Bikeshedding: should we call the directives |
alexandre-daubois
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't see a test for this: what happens if these new directives are called multiple times in the same file?
If you want an example, we already limited //export_php:namespace to one per file
Signed-off-by: Robert Landers <landers.robert@gmail.com>
Signed-off-by: Robert Landers <landers.robert@gmail.com>
Signed-off-by: Robert Landers <landers.robert@gmail.com>
Signed-off-by: Robert Landers <landers.robert@gmail.com>
Signed-off-by: Robert Landers <landers.robert@gmail.com>
This reverts commit 3d9d672.
Signed-off-by: Robert Landers <landers.robert@gmail.com>
Signed-off-by: Robert Landers <landers.robert@gmail.com>
Signed-off-by: Robert Landers <landers.robert@gmail.com>
Signed-off-by: Robert Landers <landers.robert@gmail.com>
Signed-off-by: Robert Landers <landers.robert@gmail.com>
Signed-off-by: Robert Landers <landers.robert@gmail.com>
Signed-off-by: Robert Landers <landers.robert@gmail.com>
7cd7983 to
1231110
Compare
alexandre-daubois
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me, thanks for adding the duplicated directive checks!
This PR adjusts extgen to handle:
init()function.//export_php:module initto handle resource creation during module startup//export_php:module shutdownto handle resource cleanup during module shutdown