Skip to content

Commit edc4e1f

Browse files
Merge pull request #20 from boesing/feature/pecl
PECL for multiple PHP versions
2 parents 664aced + 1b14e95 commit edc4e1f

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

Dockerfile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ RUN apt update \
2323
yamllint \
2424
zip \
2525
msodbcsql17 \
26-
php5.6-cli \
2726
php5.6-bz2 \
27+
php5.6-cli \
2828
php5.6-curl \
29+
php5.6-dev \
2930
php5.6-fileinfo \
3031
php5.6-intl \
3132
php5.6-json \
@@ -39,6 +40,7 @@ RUN apt update \
3940
php7.0-cli \
4041
php7.0-bz2 \
4142
php7.0-curl \
43+
php7.0-dev \
4244
php7.0-fileinfo \
4345
php7.0-intl \
4446
php7.0-json \
@@ -52,6 +54,7 @@ RUN apt update \
5254
php7.1-cli \
5355
php7.1-bz2 \
5456
php7.1-curl \
57+
php7.1-dev \
5558
php7.1-fileinfo \
5659
php7.1-intl \
5760
php7.1-json \
@@ -65,6 +68,7 @@ RUN apt update \
6568
php7.2-cli \
6669
php7.2-bz2 \
6770
php7.2-curl \
71+
php7.2-dev \
6872
php7.2-fileinfo \
6973
php7.2-intl \
7074
php7.2-json \
@@ -78,6 +82,7 @@ RUN apt update \
7882
php7.3-cli \
7983
php7.3-bz2 \
8084
php7.3-curl \
85+
php7.3-dev \
8186
php7.3-fileinfo \
8287
php7.3-intl \
8388
php7.3-json \
@@ -91,6 +96,7 @@ RUN apt update \
9196
php7.4-cli \
9297
php7.4-bz2 \
9398
php7.4-curl \
99+
php7.4-dev \
94100
php7.4-fileinfo \
95101
php7.4-intl \
96102
php7.4-json \
@@ -104,6 +110,7 @@ RUN apt update \
104110
php8.0-cli \
105111
php8.0-bz2 \
106112
php8.0-curl \
113+
php8.0-dev \
107114
php8.0-fileinfo \
108115
php8.0-intl \
109116
php8.0-mbstring \

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Other times, you may want to do additional reporting, particularly if the QA com
6868
To enable this, you may create one or more of the following files in your package:
6969
7070
- `.laminas-ci/pre-install.sh`
71-
- `.laminas-ci/pre-run.sh`
71+
- `.laminas-ci/pre-run.sh`
7272
- `.laminas-ci/post-run.sh`
7373

7474
(Note: the files MUST be executable to be consumed!)
@@ -126,6 +126,20 @@ fi
126126

127127
If you need access to the list of extensions or php.ini directives, you should likely write a script in PHP or node to do so.
128128

129+
#### Using PECL
130+
131+
One key reason to use a `.laminas-ci/pre-install.sh` script is to install an extension via PECL.
132+
You may need to do this if no corresponding package exists for an extension you need, or if you need to test against a different version than is in the Sury repository.
133+
134+
An example of such a script:
135+
136+
```bash
137+
#!/bin/bsh
138+
# .laminas-ci/pre-install.sh
139+
140+
pecl install couchbase-2.6.2
141+
```
142+
129143
### Using locally
130144

131145
The [standard Laminas Continuous Integration workflow](https://gist.github.com/weierophinney/9decd19f76b7d9745c6559074053fa65) defines one job using the laminas/laminas-ci-matrix-action to create the matrix, and defines another job to run the various jobs in the matrix that consumes it.

entrypoint.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ if [[ "${COMMAND}" == "" ]];then
125125
fi
126126

127127
echo "Marking PHP ${PHP} as configured default"
128-
update-alternatives --set php /usr/bin/php${PHP}
128+
update-alternatives --quiet --set php /usr/bin/php${PHP}
129+
update-alternatives --quiet --set php-config /usr/bin/php-config${PHP}
130+
update-alternatives --quiet --set phpize /usr/bin/phpize${PHP}
129131

130132
# Is there a pre-install script available?
131133
if [ -x ".laminas-ci/pre-install.sh" ];then

0 commit comments

Comments
 (0)