kartik-v / yii2-mpdf

A Yii2 wrapper component for the mPDF library which generates PDF files from UTF-8 encoded HTML.
http://demos.krajee.com/mpdf
Other
161 stars 150 forks source link

Update to 7th version. #45

Closed StalkAlex closed 7 years ago

StalkAlex commented 7 years ago

Could you consider update to 7th version? Mpdfs maintainers aren't going to support 6th version for php 7.1. https://github.com/mpdf/mpdf/issues/288

StalkAlex commented 7 years ago

I did a bit work. Basic functionality is working now in PHP 7.1 https://github.com/StalkAlex/yii2-mpdf/tree/php71. But ofc rest of code should be checked properly.

kartik-v commented 7 years ago

Refer updated release v1.0.1.

StalkAlex commented 7 years ago

I've seen your changes but don't understand a bit what's going on. You're still using old mpdf, why have you closed this issue? Please explain.

I think it's not enough to have opportunity to use last mPdf version, because it isn't compatible with old one. So your library is also need to be updated if I understand correctly.

kartik-v commented 7 years ago

This was more to do with changing dependency from kartik-v/mpdf to mpdf/mpdf repo (where enhancements for newer PHP releases are being done)

As to using the other unstable versions of mpdf/mpdf... have not tested it - so restricting it to the latest stable releases.

Parallely have reopened the issue for any other suggestions for PHP 7.1.

StalkAlex commented 7 years ago

Ok. Thank you! I added a few changes to use last version, so it works as previous without any problem, of course there is a chance for mPdf maintainers to change something due to development, but I don't think they will change main class interface again.

StalkAlex commented 7 years ago

There is mPdf 7.0.0 beta has been released. So I guess it's good point to add support to your library too. Maybe as another version or branch. You could use my fork with changed code mentioned above. I adopted your library for the last mPdf version. It has been tested for basic cases and works quite well for awhile already.

Here's changes in code https://github.com/kartik-v/yii2-mpdf/compare/master...StalkAlex:php71

StalkAlex commented 7 years ago

It's not a fix. You just rised version. mPdf 7's api changed, so current code of your library will not work with new version of mPdf.

kartik-v commented 7 years ago

Not sure I understand ... Do you have the latest code via composer from dev-master which has all code updates? You can cross check with demos... which has the latest version of the code and mpdf api