barryvdh / laravel-dompdf

A DOMPDF Wrapper for Laravel
MIT License
6.62k stars 965 forks source link

Fix named arguments when using facade #1002

Closed erikn69 closed 11 months ago

erikn69 commented 11 months ago

Named arguments don't work when using facade because of hardcoded args in __callStatic()

Alternative to #921 Demo: https://onlinephp.io/c/d34c3 lluminate/Support/Facades/Facade.php#L345-L353

I think there was a reason for this. But not 100% sure, probably with regards to multiple instances. https://github.com/barryvdh/laravel-dompdf/pull/921#issuecomment-1297140042

This PR keeps multiple instances functionality


facade method conditional is no longer necessary, because it always pass thru, and PDF already validates that https://github.com/barryvdh/laravel-dompdf/blob/3dbe06b2dd1e5b647a07f464cee9965d4f14645d/src/Facade/Pdf.php#L66-L68 https://github.com/barryvdh/laravel-dompdf/blob/3dbe06b2dd1e5b647a07f464cee9965d4f14645d/src/PDF.php#L286