Drop Shadow
Drop Shadow

Reputation: 808

How to use mPDF with PHP 7.0.4?

How to use mPDF with latest version of PHP ( Codeigniter 3.x)?

I am using PHP 7.0.4 and codeigniter 3.x. I include the mPDF in my project but getting following error

Methods with the same name as their class will not be constructors in a future version of PHP; mPDF has a deprecated constructor

I tried by replacing function name with __construct but it is not working. Do anyone have any idea?

Upvotes: 1

Views: 13531

Answers (2)

dush
dush

Reputation: 11

Replace your mpdf by mPDF 5.7 library for PHP7

Upvotes: 1

Finwe
Finwe

Reputation: 6725

You can try development version of mPDF which can be obtained on GitHub or via composer with

$ composer require mpdf/mpdf@dev-development

You will have to set your minimum-stability accordingly.

There are some backwards incompatible changes - mainly namespaces and different constructor parameters.

WIP documentation can be read on GitHub at https://github.com/mpdf/mpdf.github.io/blob/development/configuration/configuration-v7-x.md

Upvotes: 0

Related Questions