atgp / factur-x

PHP library to manage your Factur-X / ZUGFeRD 2.0 PDF invoices files
MIT License
98 stars 21 forks source link

Different access level of Child-Methods #37

Closed fc-hartmann closed 1 month ago

fc-hartmann commented 1 month ago

I got some Fatal errors using the generate-method of the writer with xml- and pdf-string: "Access level to Atgp\FacturX\Fpdi\FdpiFacturx::_putresources() must be public (as in class FPDF) in composer/vendor/atgp/factur-x/src/Fpdi/FdpiFacturx.php on line 237."

It is always the same problem: parent-method is public and child-method is private.

If i change the called methods manually to public, i can use the generate()-function of the writer to combine xml- and pdf-strings. Otherwise it wont work.

Thanks

benito103e commented 1 month ago

@fc-hartmann : wich version of FPDF are you using ?

\FPDF::_putresources seems to be protected since a long time : https://github.com/Setasign/FPDF/blob/0838e0ee4925716fcbbc50ad9e1799b5edfae0a0/fpdf.php#L1845

fc-hartmann commented 1 month ago

That is correct. Seems that PHP is confused in my project because there was also FPDF installed manually(without composer) and loaded. Thanks! Love your project! Keep going...