Skip to content

[BUGFIX] Report the version of imagick instead of @PACKAGE_VERSION@ - #626

Merged
Kanti merged 1 commit into
webdevops:masterfrom
andersundsehr:bugfix/imagick-version
Nov 17, 2026
Merged

Kanti merged 1 commit into
webdevops:masterfrom
andersundsehr:bugfix/imagick-version

Conversation

@Kanti

@Kanti Kanti commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The images build imagick from its Git branch master, where the version in php_imagick.h is the placeholder @PACKAGE_VERSION@; only the packaging of PECL fills it in. phpversion('imagick') returns the placeholder, and libraries that compare it, for example TCPDF, take the wrong path. The build now fills in the version of package.xml before it compiles imagick.

Related issue: #422 (phpversion('imagick') returns @PACKAGE_VERSION@), closed, but it still applies to the published images.

Changes

  • template/Dockerfile/images/php.twig: after the clone of imagick, the release of package.xml replaces the placeholder (Debian and Alpine); make generate.
  • Image test testImagickReportsItsVersion in PhpChecks: phpversion('imagick') is a version number.

How it was verified

  • The published php:8.5-alpine fails the new test: '@PACKAGE_VERSION@'.
  • imagick from master (today): php_imagick.h has #define PHP_IMAGICK_VERSION "@PACKAGE_VERSION@"; after the sed call of the template it is "3.8.1", the release in package.xml.
  • imagick built with the same sed call in php:8.5-fpm-alpine (docker-php-ext-install imagick): phpversion("imagick") is 3.8.1, and version_compare(…, "3.0.0", ">=") is true.
  • Rebased on master with [TASK] Give PIE the GitHub token of the run #625; ci/console generate changes nothing.

The CI run of this pull request builds every PHP image and runs the new test on Debian and Alpine, amd64 and arm64.

The images build imagick from its Git branch master, where the version in
php_imagick.h is the placeholder @PACKAGE_VERSION@; only the packaging of
PECL fills it in. phpversion('imagick') returned the placeholder, and
libraries that compare it, e.g. TCPDF, took the wrong path. The build now
fills in the version of package.xml before it compiles imagick.
@sonarqubecloud

Copy link
Copy Markdown

@Kanti
Kanti marked this pull request as ready for review November 16, 2026 23:17
@Kanti
Kanti merged commit 710a2b2 into webdevops:master Nov 17, 2026
180 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant