Repository navigation
Add Weasyprint driver - #304
Conversation
|
Since I don't think having the driver inside of the package will be a big maintenance burden. I can image the code won't change much over time. Let me know when it's ready for review 👍 Thanks for working on this! |
|
It's ready but not sure how to add test. I guess it would make sense to use dependency injection instead of the new class, and mock that. But I stuck with how Dompdf was done (and have the check for the package) I can change it to use the container if you want |
|
Thanks Barry, this looks great! A few small things:
Other than that, this looks ready to merge. Thanks for contributing this! |
Done, done and done. I think the tests should pass, but always tricky with binaries on github. Can you approve the workflows? |
|
Thanks! |
Not sure what the best way for custom drivers should be. I first created it as a driver in fruitcake/laravel-weasyprint: fruitcake/laravel-weasyprint#11
That would make it easier to maintain I guess, without specifying explicit version numbers.
Functionally it would be the same:
A. Require fruitcake/laravel-weasyprint, set config in config/weasyprint.php -> Can now also use the weasyprint driver.
B. Require the pontedilana/php-weasyprint and use the config from config/laravel-pdf -> Can now also use the driver.
I guess it kinda depends on what you want to do with custom drivers. Maybe you could link to 3rd party drivers?