Skip to content

Commit 311f2b2

Browse files
committed
Fix doc.php.net pecl channel update
The update fails because doc.php.net uses HTTP/1.1 compliant chunked transfer encoding which the download handler in PEAR core doesn't implement, causing an error while parsing the output. Issue at pear/pear-core#151
1 parent f8afb22 commit 311f2b2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,14 @@ RUN --mount=type=cache,sharing=private,target=/var/cache/apt \
179179
opcache \
180180
zip \
181181
; \
182-
export MAKEFLAGS="-j$(nproc)"; \
182+
\
183+
# Ensure the PEAR Downloader.php is what we expect it to be for the next operation to make sense. Update accordingly when the file has changed.
184+
echo '426ab5d7b1d7a3fecef05ba3a2cbb25ce60f631ea24b0eb88a571575caf92efa /usr/local/lib/php/PEAR/Downloader.php' | sha256sum --check; \
185+
# PECL doesn't implement HTTP/1.1 chunked transfer encoding which is used on doc.php.net so we need to downgrade to HTTP/1.0
186+
sed -i -e 's| HTTP/1\.1\\r\\n| HTTP/1.0\\r\\n|' /usr/local/lib/php/PEAR/Downloader.php; \
187+
\
183188
pecl update-channels; \
189+
export MAKEFLAGS="-j$(nproc)"; \
184190
pecl install \
185191
--onlyreqdeps \
186192
--configureoptions='enable-redis-igbinary="yes" enable-redis-lzf="no" enable-redis-zstd="no" enable-redis-msgpack="no" enable-redis-lz4="yes" with-liblz4="yes"' \

0 commit comments

Comments
 (0)