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

PHP 7.1 compatibility #9

Closed
lameze opened this issue Sep 9, 2016 · 8 comments
Closed

PHP 7.1 compatibility #9

lameze opened this issue Sep 9, 2016 · 8 comments

Comments

@lameze
Copy link

@lameze lameze commented Sep 9, 2016

Hi, we currently use this library on moodle core.

Doing some compatibility tests on the new php version (7.1) we noticed a error on this line.

_Exception - Call to undefined method FPDF_TPL::prepareValue()

Apparently there were some changes on the way php handles inheritance, probably that's why this works fine on PHP7 but not on 7.1

@JanSlabon

This comment has been minimized.

Copy link
Member

@JanSlabon JanSlabon commented Sep 9, 2016

I just executed our internal tests against PHP 7.1.0RC1 and previous beta3 release and both went through. Could you please verify that all related classes are up to date?

@JanSlabon

This comment has been minimized.

Copy link
Member

@JanSlabon JanSlabon commented Sep 12, 2016

Simey, as we are not able to reproduce this, could you offer more details on that issue?

@lameze

This comment has been minimized.

Copy link
Author

@lameze lameze commented Sep 13, 2016

Hi, we are still trying to figure out why we are getting errors...have you checked your error.log to see if there's any error there? Something like callling non-static methods statically?

@JanSlabon

This comment has been minimized.

Copy link
Member

@JanSlabon JanSlabon commented Sep 13, 2016

Tests ran with E_ALL. Again: Please verify that ALL related classes are up to date.

@marinaglancy

This comment has been minimized.

Copy link

@marinaglancy marinaglancy commented Sep 13, 2016

Hello Jan, we are investigating why we are having a failure in moodle - see https://tracker.moodle.org/browse/MDL-55848
It is definitely a problem with opcache caching file/class before TCPDF is available but we still can't understand why it's happening and why is it a problem on php7.1 only
If the line https://github.com/Setasign/FPDI/blob/master/fpdi_bridge.php#L19 is replaced with "if (false)" everything works.

@JanSlabon

This comment has been minimized.

Copy link
Member

@JanSlabon JanSlabon commented Sep 13, 2016

That behaviour is very strange. It would mean that fpdi_bridge would never extend TCPDF but a call of is_subclass_of($this, 'TCPDF') would return true? I guess you should report this, after some more validation, on https://bugs.php.net/

@marinaglancy

This comment has been minimized.

Copy link

@marinaglancy marinaglancy commented Sep 13, 2016

yes, I don't believe this is a bug in FPDI. If it won't resolve itself in RC2 or stable release of php7.1 we'll have to patch the library included in moodle in order to hide this error. We already have another report of opcache messing with class definitions and it's hard to report to php because we can't provide reliable reproduction steps.

Thank you for the prompt reply and your help. Feel free to close this issue and, if you are interested, follow bug in our tracker.

@JanSlabon

This comment has been minimized.

Copy link
Member

@JanSlabon JanSlabon commented Sep 13, 2016

Ok, perfect, thanks for reporting anyway!

@JanSlabon JanSlabon closed this Sep 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.