Skip to content

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
@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.

2 participants