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

Upgrade mPDF to 8.1.4 #476

Closed
wants to merge 4 commits into from
Closed

Upgrade mPDF to 8.1.4 #476

wants to merge 4 commits into from

Conversation

eduardomozart
Copy link
Contributor

@eduardomozart eduardomozart commented Feb 28, 2023

Upgrade mPDF to 8.1.4 to add support for PHP 8.X as mPDF from DW2PDF supports PHP <= 7.4.
Sadly this breaks compatibility with PHP 7.4 because it's dependencies requires PHP >= 8.0.

Upgrade mPDF to 8.1.X to add support for PHP 8.X as mPDF from DW2PDF supports PHP <= 7.4.
Copy link
Collaborator

@Klap-in Klap-in left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update.

Please check the manual patch, and re-apply it. It ensures the ACL are checked for the images from the wiki.

I observe that mpdf includes its own http client. A nice to have would be to configure it to use the http client of DokuWiki... see also https://mpdf.github.io/configuration/configuration-v7-x.html#http-client

@splitbrain how do you judge dropping of php7.4 support? I guess it will result in questions..

vendor/mpdf/mpdf/src/Tag/Img.php Outdated Show resolved Hide resolved
vendor/mpdf/mpdf/src/Tag/Tag.php Outdated Show resolved Hide resolved
vendor/mpdf/mpdf/src/Tag/Tag.php Outdated Show resolved Hide resolved
Required to load local image resources and respect DokuWiki image ACLs.
@eduardomozart
Copy link
Contributor Author

Thank you. I didn't know that, but I'd noticed that local images wasn't being loaded with a newer mPDF version and was trying to figure out why. Applied your suggestions and now DW2PDF seems to be working as expected.

@eduardomozart eduardomozart changed the title Upgrade mPDF to 8.1.X Upgrade mPDF to 8.1.4 Feb 28, 2023
@Klap-in
Copy link
Collaborator

Klap-in commented Feb 28, 2023

Thanks for patching again. Could you check please why the unit tests did fail? Remarkably, it still throws an error about the decorator..

@eduardomozart
Copy link
Contributor Author

eduardomozart commented Mar 1, 2023

Those unit tests seems to be failing because mPDF 8.1.4 requires PHP 8 so composer seems not loading the mPDF library at all, as PHP 8 unit tests seems to be the only test that succeeded as expected.
It would be great to implement DokuWiki HTTPClient for mPDF, as it would support parameters set at the DokuWiki interface (like Proxy), but I don’t see developing it as a priority because I do not use any of those features right now (most of my bug contributions are related to bugs or features I found myself into our own Wiki instance). As developing isn’t my main function (I’m a SysAdmin), I can get in trouble in my work if I took to much time developing instead of deploying systems and attending our clients.

@Klap-in
Copy link
Collaborator

Klap-in commented Mar 3, 2023

about http client, clear trade-off, thanks for the effort so far. If it would fit you, it would be an opportunity. Therefore, I brought it up. Without is also fine.

Ah, I see now something from composer is blocking it. That would mean for everybody with php7.4 and lower it is not usable.
Since November 7.4 is also EOL.

Feels a bit to early to completely not support php7 anymore, but we have also no method to indicate it to the user. Maybe the extension manager should get a way to inform users before installing.

The template selected in "template" dropdown maybe not respected because there was code changes on "cssStyleini" function on DokuWiki core.
@eduardomozart eduardomozart closed this by deleting the head repository Nov 7, 2023
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.

None yet

2 participants