All notable changes to Shoot will be documented in this file.
- Twig has been bumped to v2.12 and/or v3.0.
- Twig has been bumped to v2.11.
- Shoot now requires Twig v2.9. In addition, it's now also pinned to this minor version, as Twig doesn't seem to follow SemVer with regards to non-breaking changes in its APIs. As this on its own is a breaking change for Shoot, this warrants a major version bump.
- Compatibility issues with Twig v2.9 have been fixed.
- Documentation on nesting presentation models and the
optionaltag. - An
Installerclass which sets up Shoot for an instance of Twig.
- Shoot now requires PHP 7.2.
- The Twig dependency has been bumped to v2.6.
- PHPUnit has been bumped to v8.0, and all tests have been updated accordingly.
- The
SuppressionMiddlewareis no longer enabled by the default. You'll have to pass it to thePipelineconstructor along with any other middleware you use. - The
LoggingMiddlewarenow also logs errors. Kind of odd it did not do that before.
- The optional tag would still output any contents from before the exception was thrown. This is now fixed.
- Models now work as expected when using extends, embed and blocks – removing what was previously a limitation of Shoot.
- The
optionaltag was added. This allows runtime exceptions to be suppressed so parts which are not essential to the page can be left out in case of failure. - The HTTP middleware from the Shoot/Http package is now included with Shoot as
ShootMiddleware. - Added
getVariabletoPresentationModelto read a single variable from the presentation model.
- The generic context has been replaced with the PSR-7 request object as it seems to make the most sense in practice.
- The actual Twig extension has been split off from the
Pipelineclass. - The
getPresentermethod ofHasPresenterInterfacewas renamed togetPresenterNameas it more accurately describes its purpose. HasDataTraithas been moved to aUtilitiesnamespace.- The Twig dependency has been bumped to v2.5.
- Lots of housekeeping in code and documentation.
- The Shoot/Http package is deprecated as of this release.
- Removed
Contexttype entirely. We'll have to settle for typing through PHPDoc, until maybe we one day have generics.
Contextis now interfaced, in preparation of the Shoot/Http package. This package will make use of Shoot in an HTTP context (PSR-7 and PSR-15) easier.
- Shoot handles embedded templates by passing through all variables from the parent template.
- Presenters should check if a presentation model has data, and whether to act on that. This is no longer handled by the
PresenterMiddleware. This allows more granular control over presenters. For convenience, there's aHasDataTraitavailable. - Trying to set a variable with a non-string key will cause type errors instead of silently ignoring the variable.
- First release!