Skip to content

Commit a3a54a5

Browse files
TinfoilSubmarineclassabbyamp
authored andcommitted
config/php.md: docs to help users with metapackage transition
1 parent 976b794 commit a3a54a5

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
- [libvirt](./config/containers-and-vms/libvirt.md)
7070
- [LXC](./config/containers-and-vms/lxc.md)
7171
- [OpenPGP](./config/openpgp.md)
72+
- [PHP](./config/php.md)
7273
- [XBPS Package Manager](./xbps/index.md)
7374
- [Advanced Usage](./xbps/advanced-usage.md)
7475
- [Repositories](./xbps/repositories/index.md)

src/config/php.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# PHP
2+
3+
There are two ways to install PHP packages with XBPS:
4+
5+
1. Using the versioned packages (recommended).
6+
2. Using the meta-packages.
7+
8+
## Versioned PHP Packages
9+
10+
It is generally recommended to use versioned PHP packages (e.g. `php8.1`,
11+
`php8.1-apcu`, etc.) for most use cases as this ensures a consistent environment
12+
on updates with minimal or no intervention required.
13+
14+
## PHP Meta-packages
15+
16+
In Void, the `php` package is a meta-package that points to the latest upstream
17+
PHP version. This convention is followed by all packages prefixed with `php-`,
18+
such as `php-fpm`, as well as `xdebug` and `composer`. See [the `php`
19+
template](https://github.com/void-linux/void-packages/blob/master/srcpkgs/php/template)
20+
for a complete list. It is recommended to only use these meta-packages for
21+
development purposes.
22+
23+
When using a PHP meta-package, be warned that updating may require manual
24+
intervention if a new major PHP version has been added to the repository. As a
25+
part of the version change, the configuration location will change to reflect
26+
the new version. For example, upgrading from 8.0 to 8.1 would result in the
27+
configuration path changing from `/etc/php8.0` to `/etc/php8.1`. Any
28+
customizations that have been made need to be manually applied to the new
29+
configuration directory.
30+
31+
`php-fpm` updates require special care since they include a runit service. In
32+
this case, ensure that the new runit service is started and that applications
33+
using the previous version of `php-fpm` can access the new `php-fpm` instance.
34+
In particular, make sure any applications accessing the FPM instance have the
35+
correct TCP/unix socket address.

0 commit comments

Comments
 (0)