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

PHP: Move internal shared directories to /internal/shared #1386

Merged
merged 1 commit into from
May 14, 2024

Conversation

adamziel
Copy link
Collaborator

The number of internal directories and files shared between all the PHPProcessManager processes keeps growing so it makes sense to move them all under a common root. This PR introduces an /internal/shared directory that's a home to:

  • php.ini
  • phpinfo.php
  • preload/ directory with custom PHP files
  • ca-bundle.crt for SSL connections
  • consts.json
  • consts.php
  • Soon also db.php and sqlite-database-integration

Testing instructions

Confirm all the tests passed

The number of internal directories and files shared between all the
PHPProcessManager processes keeps growing so it makes sense to move
them all under a common root. This PR introduces an `/internal/shared`
directory that's a home to:

* `php.ini`
* `phpinfo.php`
* `preload/` directory with custom PHP files
* `ca-bundle.crt` for SSL connections
* `consts.json`
* `consts.php`
* Soon also db.php and sqlite-database-integration

 ## Testing instructions

Confirm all the tests passed
@adamziel adamziel merged commit f316a76 into trunk May 14, 2024
5 checks passed
@adamziel adamziel deleted the internal-shared-directory branch May 14, 2024 08:20
adamziel added a commit that referenced this pull request May 14, 2024
…to_prepend_file.php file exists

Filesystem files are shared between PHP instances within the same
PHPProcessManager, but php.ini entry are kept in WASM memory and must
be set on every PHP instance separately. Therefore, the
`auto_prepend_file` must always be set in `#initWebRuntime`

Fixes a regression introduced in #1386

To test, run `bun packages/playground/cli/src/cli.ts server --login` and
confirm it finishes without any errors.
adamziel added a commit that referenced this pull request May 14, 2024
…to_prepend_file.php file exists (#1388)

Filesystem files are shared between PHP instances within the same
PHPProcessManager, but php.ini entry are kept in WASM memory and must be
set on every PHP instance separately. Therefore, the `auto_prepend_file`
must always be set in `#initWebRuntime`

Fixes a regression introduced in #1386

To test, run `bun packages/playground/cli/src/cli.ts server --login` and
confirm it finishes without any errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant