ItinerisLtd / wordpress-packager

Generates itinerisltd/wordpress composer package
MIT License
0 stars 1 forks source link

Require PHP extensions #15

Open tangrufus opened 5 years ago

tangrufus commented 5 years ago

Sadly, there is no clear instruction about what PHP extensions (and their versions) are required by WordPress.

Leave a comment if you can help

austinpray commented 5 years ago

AFAIK WordPress includes their own polyfills for missing extensions like ext-json and stuff.

For reference here are the extensions included in a freshly built php 7.4 from source

./buildconf
./configure
./make -j4
# ./sapi/cli/php -m
[PHP Modules]
Core
ctype
date
dom
fileinfo
filter
hash
iconv
json
libxml
pcre
PDO
pdo_sqlite
Phar
posix
Reflection
session
SimpleXML
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter

and here are the modules enabled in default php docker

[PHP Modules]
Core
ctype
curl
date
dom
fileinfo
filter
ftp
hash
iconv
json
libxml
mbstring
mysqlnd
openssl
pcre
PDO
pdo_sqlite
Phar
posix
readline
Reflection
session
SimpleXML
sodium
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
zlib
austinpray commented 5 years ago
--- /tmp/sauce.txt  2019-05-27 09:22:44.017107989 -0500
+++ /tmp/docker.txt 2019-05-27 09:33:18.844345786 -0500
@@ -1,22 +1,29 @@
 [PHP Modules]
 Core
 ctype
+curl
 date
 dom
 fileinfo
 filter
+ftp
 hash
 iconv
 json
 libxml
+mbstring
+mysqlnd
+openssl
 pcre
 PDO
 pdo_sqlite
 Phar
 posix
+readline
 Reflection
 session
 SimpleXML
+sodium
 SPL
 sqlite3
 standard
@@ -24,6 +31,7 @@
 xml
 xmlreader
 xmlwriter
+zlib

 [Zend Modules]
LeoColomb commented 5 years ago

https://make.wordpress.org/hosting/handbook/handbook/server-environment/#php-extensions ?

LeoColomb commented 5 years ago

And version should never be specified:

ext-<name> allows you to require PHP extensions (includes core extensions). Versioning can be quite inconsistent here, so it's often a good idea to set the constraint to *.

https://getcomposer.org/doc/01-basic-usage.md#platform-packages


May I copy this issue to https://github.com/roots/wordpress-packager? @TangRufus @austinpray

austinpray commented 5 years ago

Yep copy it over!