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

Implement PHP RFC 0001: Restructure PHP #485

Closed
21 of 23 tasks
Tracked by #58
sophiewigmore opened this issue Dec 6, 2021 · 7 comments
Closed
21 of 23 tasks
Tracked by #58

Implement PHP RFC 0001: Restructure PHP #485

sophiewigmore opened this issue Dec 6, 2021 · 7 comments

Comments

@sophiewigmore
Copy link
Member

sophiewigmore commented Dec 6, 2021

Per PHP RFC 0001 we are restructuring the PHP language family of buildpacks to make them more modular, up-to-date, and as a result, maintainable.

This issue serves as a meta-issue for tracking the implementation all of the restructure work amongst the implementation buildpacks and language family.

Issues


  1. Deprecation warning for buildpack.yml usage (Parallelizable)

  1. PHP Builtin Server Simple Use case

  1. Implement initial php-fpm buildpack

  1. NGINX and HTTPD Web servers (parallelizable)

  1. Modularize composer and substitute in the language family (sequential)

  1. Optional session handlers (parallelizable)

  1. Swap new buildpacks into the language family order groups, finish up

  1. Future optimizations (can be done outside of rewrite):
@fg-j
Copy link

fg-j commented Jan 21, 2022

I'm working on paketo-buildpacks/php-fpm#3, and I'm trying to get a handle on what functionality is required in the buildpack. Will the php-builtin-server buildpack created in https://github.com/paketo-buildpacks/php/issues/477 be responsible for generating the php.ini file the that the php-web buildpack currently generates? Or does the php-fpm buildpack need to generate that config file? Currently, the php-web buildpack writes the file into its layer during every build.

@sophiewigmore
Copy link
Member Author

sophiewigmore commented Jan 21, 2022

@fg-j Hmm. This is a good question. Based off of my limited knowledge of PHP, I think the PHP FPM buildpack should only be responsible for configuring the php-fpm.conf file. I believe setting configuration in a PHP FPM config file overrides a php.ini file anyways. If a php.ini file is actually necessary to be generated, my instinct would be to have the php-builtin-server buildpack handle this, since the php-httpd and php-nginx counterparts generate their respective config files as well.

Happy for @paketo-buildpacks/php-maintainers to weigh in as well

@dmikusa
Copy link
Contributor

dmikusa commented Jan 21, 2022

My $0.02. I would suggest that we have the buildpack which installs PHP add a default php.ini file. This is traditionally how it's done. When you install PHP with apt or another package manager, that provides a default php.ini. It should also set PHPRC and PHP_INI_SCAN_DIR.

The individual buildpacks can then customize that by adding php.ini snippets to the PHP_INI_SCAN_DIR. Right now, that points to something in the application workspace. That is probably OK, we just have to regenerate those every time the buildpack runs. Alternatively, we could have a second buildpack-only location for that. You can add multiple folders to the scan dir.

It is possible to scan multiple directories by separating them with the platform-specific path separator (; on Windows, NetWare and RISC OS; : on all other platforms; the value PHP is using is available as the PATH_SEPARATOR constant).

That leaves PHP-FPM & the web server buildpacks only responsible for generating their specific config.

@fg-j
Copy link

fg-j commented Jan 21, 2022

In that case, I think paketo-buildpacks/php-dist#324 needs to be updated to include generating a default configuration file (and possibly setting up the PHP_INI_DIR).

@arjun024
Copy link
Member

arjun024 commented Jan 21, 2022

@fg-j
This is addressed directly in the rfc.

  • php-dist:
    Installs the php distribution, making it available on the $PATH
    • provides: php
    • requires: none

This distribution must include popular modules like memcached, mongodb,
mysqli, openssl, phpiredis, zlib etc; and a suitable php.ini.

@ForestEckhardt
Copy link
Contributor

@sophiewigmore Is this issue still being used to track work or are we done?

@sophiewigmore
Copy link
Member Author

@ForestEckhardt as you can see, the documentation issue is still in review. That's the last remaining issue. I will close out this issue when that is available on the Paketo website.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Status: Done
Development

No branches or pull requests

5 participants