The package, previously known as Laravel WeasyPrint, had remained untouched for quite some time, until now. One of its drawbacks was that it didn’t have first-class support for the Laravel Service Container. Additionally, it wasn’t very configurable at framework-level.
Version 5 is a total rewrite of the package that solves these problems, and introduces a new API to boot. It’s somewhat more flexible than it was before, and may now be resolved via the service container, or instantiated directly via the service class.
As such, there are quite a few changes, both to the internal mechanics as well as the interface. If you’re upgrading from a previous version, be sure to follow the upgrade guide and have a skim over the changelog.
WeasyPrint for Laravel now requires Laravel 8 running on PHP 8.