-
Notifications
You must be signed in to change notification settings - Fork 182
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
CakePHP 5 compatibility #325
Conversation
Just tested against CakePHP 4: the field type declarations in the PdfView must be present with CakePHP 5 and must not be present with CakePHP 4, so it seems like there is no easy way to support both. As CakePHP5 only works with PHPUnit 10, this also means no support for PHPUnit 8/9 anymore. |
…use of non backwards compatible changes in cake 5. Added some type declarations that are now possible
Build chain is adapted to the compatibility requirements of CakePHP 5 and now green. One could use this release to properly type the all public facing methods. If you update psalm and phpcs to their latest versions, they will give you a plethora of warnings & errors about that. But: if you want to do this properly, i think it involves splitting the Get/Set methods in CakePdf in proper getters and setters. That is a lot of work and exceeds my capacities at the moment. |
Please target your changes to the already existing |
The CakePHP 5 compatible version will be a new major version bump for the plugin, so no need to worry about backwards compatibility. |
Since CakePHP 5 was released recently, this branch tries to get CakePdf running with it.
It's a first rough draft (tested with CakePHP 5.0.0 and PHP 8.1.2 and 8.2.8 and Mpdf v8.2.0).
I can not say if this really still works with cakephp 2 / phpunit 8 / phpunit 9 (i guess not, but did not find the time to test it yet). I also do not know if such backwards compatibility is desired by the maintainers of this package or unnecessary effort.
But: i would love to get the Cake 5 adoption process started, so here is the first draft.
Another open topic: As the RequestHandlerComponent was removed, the guidance (and probably also the code) regarding content negotiation needs to be updated