Opened 4 years ago

#61016 new defect

php5-web: Update for current php subports

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: php5-web

Description

The php5-web port, whose purpose is to ensure there is a web server installed with php support, was designed a long time ago when php53 was a monolithic port with variants. Since a port can't depend on a variant of another port, php5-web just depended on the php5 port, but added code to see if php5 had installed certain files that signaled that it could be used in a web server. Of course a user could later reinstall php5 with different variants, possibly disabling web server support, without php5-web becoming aware of that. It became fully impossible to install php5-web when the php5 ports were replaced by php53 ports.

The solution may be to rework php5-web as a new port, php-web, which has variants for each way that php offers web server support. For example, there would be a variant +php73_cgi and another variant +php74_fpm and another +php72_apache2handler. The user can pick the variant that matches how they want to serve php, and then any web apps that we have in MacPorts can depend on php-web without further concern. The php-web port could do some sniffing at install time to pick its default variant corresponding to what php web server support module the user has already installed.

A possible flaw with that plan is that it doesn't give individual web app ports any say in what version of php they require. And some web apps also need php modules, which have to be for a specific php version, so those web app ports might already have php version variants (e.g. phpmyadmin). Therefore maybe there need to be separate php-web subports for each php version (php74-web, php73-web, etc.), each of which would have variants like +fpm, +apache2handler.

Change History (0)

Note: See TracTickets for help on using tickets.