Skip to content

Commit e420c79

Browse files
author
Greg Bowler
committed
Document usage
1 parent a6d4d09 commit e420c79

File tree

1 file changed

+48
-2
lines changed

1 file changed

+48
-2
lines changed

README.md

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,48 @@
1-
# php
2-
Choose between PHP versions and installed extensions in your Github Actions.
1+
# Choose between PHP versions and installed extensions in your Github Actions.
2+
3+
This is a base image used by all php-actions repositories. It contains all compiled versions of PHP that are currently supported:
4+
5+
* 8.0
6+
* 7.4 **(latest)**
7+
* 7.3
8+
* 7.2
9+
* 7.1
10+
11+
The default version to be put on the PATH is `latest`. To change the version of PHP that is on the path, use the `switch-php-version- and pass the version number as the only argument. For example, to switch to PHP version 8.0:
12+
13+
```bash
14+
switch-php-version 8.0
15+
```
16+
17+
The following extensions are enabled by default:
18+
19+
* libxml
20+
* curl
21+
* zip
22+
* mysqli
23+
* pdo-mysql
24+
* bcmath
25+
* gd
26+
* intl
27+
* mbstring
28+
29+
If you require any other extensions, please [open an issue][issues] and, if possible, describe the way in which the extension should be compiled.
30+
31+
Known limitations
32+
-----------------
33+
34+
### Speed
35+
36+
Currently the image is based off `ubuntu:latest`, to match the base image that many Github Actions use. Then there are multiple versions of PHP compiled within the image, which creates a larger base image than usual. This can cause Github Actions to run slowly, as for some reason some workflows insist on ignoring any caching of image layers. If you know how to improve the speed, please [let us know in the issue tracker][issues].
37+
38+
### Enabling/disabling extensions
39+
40+
The list of extensions above are enabled by default, but it might be an improvement to only enable extensions that are required, by adjusting the php.ini file on-the-fly. This is just an idea for now, but if it sounds like it would be an improvement, please let us know your suggestions [in the issue tracker][issues].
41+
42+
Supporting future development
43+
-----------------------------
44+
45+
If you found this repository helpful, please consider [sponsoring the developer][sponsor].
46+
47+
[issues]: https://github.com/php-actions/php-build/issues
48+
[sponsor]: https://github.com/sponsors/g105b

0 commit comments

Comments
 (0)