• Hi Ewout,

    I notice that in your most recent release you added a disabling of the platform dependency check, presumably because phenx/php-svg-lib 0.3.4, which is pulled in by dompdf/dompdf (which specifies ^0.3.3 || ^0.4.0), specifies a requirement on PHP >= 7.4, thus causing fatal errors on earlier versions.

    However, disabling the platform check hasn’t prevented phenx/php-svg-lib 0.3.4 from being included. So, according to the authors, PHP >= 7.4 is still required. You need to specify phenx/php-svg-lib in composer.json in order for all the dependencies to be satisfied and only PHP >= 7.1 to be required.

    (Presumably, if you’ve had no reports, then any PHP >= 7.4 code in phenx/php-svg-lib, if it exists, isn’t being run. But the author’s at least indicated that he’s not going to maintain compatibility, so I’d say it still needs tweaking to stay safe).

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter David Anderson / Team Updraft

    (@davidanderson)

    composer show --tree output on the current release, for interest:

    dompdf/dompdf dev-image-size DOMPDF is a CSS 2.1 compliant HTML to PDF converter
    ├──ext-dom *
    ├──ext-mbstring *
    ├──phenx/php-font-lib ^0.5.4
    │  └──ext-mbstring *
    ├──phenx/php-svg-lib ^0.3.3 || ^0.4.0
    │  ├──ext-mbstring *
    │  ├──php ^7.4 || ^8.0
    │  └──sabberworm/php-css-parser ^8.4
    │     ├──ext-iconv *
    │     └──php >=5.6.20
    └──php ^7.1 || ^8.0
    symfony/polyfill-iconv v1.20.0 Symfony polyfill for the Iconv extension
    └──php >=7.1
    symfony/polyfill-mbstring v1.20.0 Symfony polyfill for the Mbstring extension
    └──php >=7.1
    Plugin Contributor Ewout

    (@pomegranate)

    Hello David,
    We’ve discussed this with the author on Github (the library has been adopted by the dompdf organization), and the fact that he’s stating 7.4+ is only because they want to encourage contributors to write modern code. There have been no breaking changes for PHP7.1+ and since we ship our plugin bundled with dompdf installed we can run our own compatibility tests. We’ve disabled the platform check precisely to be able to run the latest version of dompdf/php-svg-lib that is currently still compatible with PHP7.1+ (we bundle 0.4.0 which is even newer than the 0.3.4 version that you mention, because we use a custom pre-release version of dompdf 1.2.0 that addressed some issues we were having with 1.1.1)

    If there are any issues you are seeing on PHP7.1+ please let us know but we haven’t found any yet!

    Plugin Contributor Ewout

    (@pomegranate)

    To be clear: the 7.4 requirement was added with no actual code changes. And it will most likely be reverted to 7.1 in the next release (0.4.1).

    Thread Starter David Anderson / Team Updraft

    (@davidanderson)

    I see! I think that’s a counter-productive decision by the plugin author, for two reasons:

    1) by listing it as requiring PHP 7.4 when it really doesn’t, it means that some consumers are going to lock in a requirement on his previous version.

    2) when he decides that he really will use constructions that require PHP >= 7.2, there’s no easy way for downstream consumers to learn about the change. (They’d presumably have to monitor commits).

    I realise it’s not your decision. I’m just thinking out loud. I will mark this as resolved!

    David

    Thread Starter David Anderson / Team Updraft

    (@davidanderson)

    Posts crossed there (I was writing before the latter one came in).

    Plugin Contributor Ewout

    (@pomegranate)

    Pro tip: enable Also Viewing in your user profile to see other people (requires them to also have enabled this feature, but many plugin developers and moderators have).

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Plugin dependency now requires PHP >= 7.4’ is closed to new replies.