Skip to content

Catpaw V3

Choose a tag to compare

@razshare razshare released this 07 May 17:24
· 323 commits to master since this release

Breaking Changes

  • The Unsafe api has changed.
    Previously invoking Unsafe::try($error) would get the value of the object and possibly assign the error by reference to $error.
    This method has been renamed to Unsafe::uwnrap($error), which does the same exact thing.
    The old Unsafe::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 script dev:install-pre-commit which you can run to automatically setup your pre-commit hook.\

    You can also manually setup the pre-commit hook with the --install-pre-commit option

    php 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-commit

    php 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.