Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add imagick PHP extension back for PHP 8.x #363

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion images/php/7.2-cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ENV MAGENTO_RUN_MODE production
ENV SENDMAIL_PATH /dev/null
ENV PHPRC ${MAGENTO_ROOT}/php.ini

ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl
ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext imagick intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl

# Configure Node.js version
RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash
Expand Down
2 changes: 1 addition & 1 deletion images/php/7.2-fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ENV UPLOAD_MAX_FILESIZE 64M
ENV SENDMAIL_PATH /dev/null
ENV PHPRC ${MAGENTO_ROOT}/php.ini

ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl
ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext imagick intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl

# Install dependencies
RUN apt-get update \
Expand Down
2 changes: 1 addition & 1 deletion images/php/7.3-cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ENV MAGENTO_RUN_MODE production
ENV SENDMAIL_PATH /dev/null
ENV PHPRC ${MAGENTO_ROOT}/php.ini

ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl
ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext imagick intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl

# Configure Node.js version
RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash
Expand Down
2 changes: 1 addition & 1 deletion images/php/7.3-fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ENV UPLOAD_MAX_FILESIZE 64M
ENV SENDMAIL_PATH /dev/null
ENV PHPRC ${MAGENTO_ROOT}/php.ini

ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl
ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext imagick intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl

# Install dependencies
RUN apt-get update \
Expand Down
5 changes: 3 additions & 2 deletions images/php/7.4-cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ENV MAGENTO_RUN_MODE production
ENV SENDMAIL_PATH /dev/null
ENV PHPRC ${MAGENTO_ROOT}/php.ini

ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl
ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext imagick intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl

# Configure Node.js version
RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash
Expand Down Expand Up @@ -61,6 +61,7 @@ RUN apt-get update \
libjpeg62-turbo-dev \
libpng-dev \
libfreetype6-dev \
libwebp-dev \
libgeoip-dev \
wget \
libgmp-dev \
Expand Down Expand Up @@ -89,7 +90,7 @@ RUN sudo chmod +x /usr/local/bin/mhsendmail

# Configure the gd library
RUN docker-php-ext-configure \
gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/
gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ --with-webp=/usr/include/
RUN docker-php-ext-configure \
opcache --enable-opcache

Expand Down
5 changes: 3 additions & 2 deletions images/php/7.4-fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ENV UPLOAD_MAX_FILESIZE 64M
ENV SENDMAIL_PATH /dev/null
ENV PHPRC ${MAGENTO_ROOT}/php.ini

ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl
ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext imagick intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl

# Install dependencies
RUN apt-get update \
Expand All @@ -42,6 +42,7 @@ RUN apt-get update \
libjpeg62-turbo-dev \
libpng-dev \
libfreetype6-dev \
libwebp-dev \
libgeoip-dev \
wget \
libgmp-dev \
Expand All @@ -64,7 +65,7 @@ RUN sudo chmod +x /usr/local/bin/mhsendmail

# Configure the gd library
RUN docker-php-ext-configure \
gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/
gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ --with-webp=/usr/include/
RUN docker-php-ext-configure \
opcache --enable-opcache

Expand Down
8 changes: 6 additions & 2 deletions images/php/8.0-cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ENV MAGENTO_RUN_MODE production
ENV SENDMAIL_PATH /dev/null
ENV PHPRC ${MAGENTO_ROOT}/php.ini

ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl
ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext imagick intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl

# Configure Node.js version
RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash
Expand Down Expand Up @@ -61,8 +61,11 @@ RUN apt-get update \
libjpeg62-turbo-dev \
libpng-dev \
libfreetype6-dev \
libwebp-dev \
libgmp-dev \
libgpgme11-dev \
libmagickwand-dev \
libmagickcore-dev \
libicu-dev \
libldap2-dev \
libpcre3-dev \
Expand All @@ -86,7 +89,7 @@ RUN sudo chmod +x /usr/local/bin/mhsendmail

# Configure the gd library
RUN docker-php-ext-configure \
gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/
gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ --with-webp=/usr/include/
RUN docker-php-ext-configure \
opcache --enable-opcache

Expand Down Expand Up @@ -117,6 +120,7 @@ RUN docker-php-ext-install -j$(nproc) \

RUN pecl install -o -f \
gnupg \
imagick \
mailparse \
msgpack \
oauth \
Expand Down
8 changes: 6 additions & 2 deletions images/php/8.0-fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ENV UPLOAD_MAX_FILESIZE 64M
ENV SENDMAIL_PATH /dev/null
ENV PHPRC ${MAGENTO_ROOT}/php.ini

ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl
ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext imagick intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl

# Install dependencies
RUN apt-get update \
Expand All @@ -42,8 +42,11 @@ RUN apt-get update \
libjpeg62-turbo-dev \
libpng-dev \
libfreetype6-dev \
libwebp-dev \
libgmp-dev \
libgpgme11-dev \
libmagickwand-dev \
libmagickcore-dev \
libicu-dev \
libldap2-dev \
libpcre3-dev \
Expand All @@ -61,7 +64,7 @@ RUN sudo chmod +x /usr/local/bin/mhsendmail

# Configure the gd library
RUN docker-php-ext-configure \
gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/
gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ --with-webp=/usr/include/
RUN docker-php-ext-configure \
opcache --enable-opcache

Expand Down Expand Up @@ -92,6 +95,7 @@ RUN docker-php-ext-install -j$(nproc) \

RUN pecl install -o -f \
gnupg \
imagick \
mailparse \
msgpack \
oauth \
Expand Down
8 changes: 6 additions & 2 deletions images/php/8.1-cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ENV MAGENTO_RUN_MODE production
ENV SENDMAIL_PATH /dev/null
ENV PHPRC ${MAGENTO_ROOT}/php.ini

ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl
ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext imagick intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl

# Configure Node.js version
RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash
Expand Down Expand Up @@ -61,8 +61,11 @@ RUN apt-get update \
libjpeg62-turbo-dev \
libpng-dev \
libfreetype6-dev \
libwebp-dev \
libgmp-dev \
libgpgme11-dev \
libmagickwand-dev \
libmagickcore-dev \
libicu-dev \
libldap2-dev \
libpcre3-dev \
Expand All @@ -86,7 +89,7 @@ RUN sudo chmod +x /usr/local/bin/mhsendmail

# Configure the gd library
RUN docker-php-ext-configure \
gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/
gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ --with-webp=/usr/include/
RUN docker-php-ext-configure \
opcache --enable-opcache

Expand Down Expand Up @@ -117,6 +120,7 @@ RUN docker-php-ext-install -j$(nproc) \

RUN pecl install -o -f \
gnupg \
imagick \
mailparse \
msgpack \
oauth \
Expand Down
8 changes: 6 additions & 2 deletions images/php/8.1-fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ENV UPLOAD_MAX_FILESIZE 64M
ENV SENDMAIL_PATH /dev/null
ENV PHPRC ${MAGENTO_ROOT}/php.ini

ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl
ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext imagick intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl

# Install dependencies
RUN apt-get update \
Expand All @@ -42,8 +42,11 @@ RUN apt-get update \
libjpeg62-turbo-dev \
libpng-dev \
libfreetype6-dev \
libwebp-dev \
libgmp-dev \
libgpgme11-dev \
libmagickwand-dev \
libmagickcore-dev \
libicu-dev \
libldap2-dev \
libpcre3-dev \
Expand All @@ -61,7 +64,7 @@ RUN sudo chmod +x /usr/local/bin/mhsendmail

# Configure the gd library
RUN docker-php-ext-configure \
gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/
gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ --with-webp=/usr/include/
RUN docker-php-ext-configure \
opcache --enable-opcache

Expand Down Expand Up @@ -92,6 +95,7 @@ RUN docker-php-ext-install -j$(nproc) \

RUN pecl install -o -f \
gnupg \
imagick \
mailparse \
msgpack \
oauth \
Expand Down
8 changes: 6 additions & 2 deletions images/php/8.2-cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ENV MAGENTO_RUN_MODE production
ENV SENDMAIL_PATH /dev/null
ENV PHPRC ${MAGENTO_ROOT}/php.ini

ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl
ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext imagick intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl

# Configure Node.js version
RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash
Expand Down Expand Up @@ -61,8 +61,11 @@ RUN apt-get update \
libjpeg62-turbo-dev \
libpng-dev \
libfreetype6-dev \
libwebp-dev \
libgmp-dev \
libgpgme11-dev \
libmagickwand-dev \
libmagickcore-dev \
libicu-dev \
libldap2-dev \
libpcre3-dev \
Expand All @@ -87,7 +90,7 @@ RUN sudo chmod +x /usr/local/bin/mhsendmail

# Configure the gd library
RUN docker-php-ext-configure \
gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/
gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ --with-webp=/usr/include/
RUN docker-php-ext-configure \
opcache --enable-opcache

Expand Down Expand Up @@ -118,6 +121,7 @@ RUN docker-php-ext-install -j$(nproc) \

RUN pecl install -o -f \
gnupg \
imagick \
mailparse \
msgpack \
oauth \
Expand Down
8 changes: 6 additions & 2 deletions images/php/8.2-fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ENV UPLOAD_MAX_FILESIZE 64M
ENV SENDMAIL_PATH /dev/null
ENV PHPRC ${MAGENTO_ROOT}/php.ini

ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl
ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext imagick intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl

# Install dependencies
RUN apt-get update \
Expand All @@ -42,8 +42,11 @@ RUN apt-get update \
libjpeg62-turbo-dev \
libpng-dev \
libfreetype6-dev \
libwebp-dev \
libgmp-dev \
libgpgme11-dev \
libmagickwand-dev \
libmagickcore-dev \
libicu-dev \
libldap2-dev \
libpcre3-dev \
Expand All @@ -62,7 +65,7 @@ RUN sudo chmod +x /usr/local/bin/mhsendmail

# Configure the gd library
RUN docker-php-ext-configure \
gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/
gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ --with-webp=/usr/include/
RUN docker-php-ext-configure \
opcache --enable-opcache

Expand Down Expand Up @@ -93,6 +96,7 @@ RUN docker-php-ext-install -j$(nproc) \

RUN pecl install -o -f \
gnupg \
imagick \
mailparse \
msgpack \
oauth \
Expand Down
1 change: 1 addition & 0 deletions src/Command/Image/GeneratePhp.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class GeneratePhp extends Command
'exif',
'gd',
'gettext',
'imagick',
'intl',
'mysqli',
'mcrypt',
Expand Down
7 changes: 4 additions & 3 deletions src/Compose/Php/ExtensionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,11 @@ public static function getConfig(): array
],
'>=7.4' => [
self::EXTENSION_TYPE => self::EXTENSION_TYPE_CORE,
self::EXTENSION_OS_DEPENDENCIES => ['libjpeg62-turbo-dev', 'libpng-dev', 'libfreetype6-dev'],
self::EXTENSION_OS_DEPENDENCIES => ['libjpeg62-turbo-dev', 'libpng-dev', 'libfreetype6-dev', 'libwebp-dev'],
self::EXTENSION_CONFIGURE_OPTIONS => [
'--with-freetype=/usr/include/',
'--with-jpeg=/usr/include/'
'--with-jpeg=/usr/include/',
'--with-webp=/usr/include/'
],
],
],
Expand Down Expand Up @@ -243,7 +244,7 @@ public static function getConfig(): array
'>=7.0 <8.0' => [self::EXTENSION_TYPE => self::EXTENSION_TYPE_PECL],
],
'imagick' => [
'>=7.0 <8.0' => [
'>=7.0' => [
self::EXTENSION_TYPE => self::EXTENSION_TYPE_PECL,
self::EXTENSION_OS_DEPENDENCIES => ['libmagickwand-dev', 'libmagickcore-dev'],
],
Expand Down