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

Add php.defineConstant() public API #748

Merged
merged 8 commits into from Nov 17, 2023
Merged

Conversation

adamziel
Copy link
Collaborator

@adamziel adamziel commented Nov 15, 2023

#738 introduced a change that made all WordPress constants be defined by including a "virtualized" wp-consts.php file. However, the required setPhpIniEntry() call was sometimes happening after the initial php.run() which made it noop. This broke the networking support merged in #724.

This commit solves that by exposing a new php.defineConstant() API that handles the file virtualization. I'm not super happy about virtualizing files so let's revisit that in the future, see #750.

     file. However, the setPhpIniEntry() was called after the initial
     php.run() which made it noop. This broke the networking support
     merged in #724.

     This commit solves that by moving the setPhpIniEntry right after
     the PHP module is initialized. I am not super happy about exporting
     the virtualized file path from the blueprints module – let's
     revisit that in the future.
@adamziel adamziel changed the title Run setPhpIniEntry('auto_prepend_file' before the first php.run() Add php.defineConstant() public API Nov 17, 2023
@adamziel adamziel merged commit 64f15a6 into trunk Nov 17, 2023
4 checks passed
@adamziel adamziel deleted the fix/set-php-ini-entry-call branch November 17, 2023 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant