Repository navigation
Catpaw V3
Breaking Changes
-
The Unsafe api has changed.
Previously invokingUnsafe::try($error)would get the value of the object and possibly assign the error by reference to$error.
This method has been renamed toUnsafe::uwnrap($error), which does the same exact thing.
The oldUnsafe::try(), still exists, but it now serves a different purpose: it still gets the value of the object, but it now throws the error instead of assigning it to an external variable.
The error management section has been updated, you can read more about these changes there. -
The Server api now uses a fluent api.
The router section has been updated, you can read more about these changes there.
New features
-
Introducing Superstyle!
A new way of writing markup documents by describing the DOM using only CSS.
You can read more about Superstyle here. -
The catpaw.phar bundle now offers a baked in pre-commit feature.
You can use it to execute custom commands before committing, like running tests, formatting, linting etc.
The project starters come with a composer scriptdev:install-pre-commitwhich you can run to automatically setup your pre-commit hook.\You can also manually setup the pre-commit hook with the
--install-pre-commitoptionphp catpaw.phar --install-pre-commit="composer prod:test"whatever string you pass in will be executed as a command before committing.\
And of course you can uninstall the current pre-commit hook with
--uninstall-pre-commitphp catpaw.phar --uninstall-pre-commit
Misc
Previously type safety was a bit relaxed due to some issues and frustrations with psalm during development.
The whole project is now type safe and it uses phpstan for static analysis.