Releases: shootphp/shoot
Adds support for PHP 8
Merge pull request #26 from victorwelling/master Fixes issue with PHPUnit and PHP 8
Prevents undefined macros errors
Fixed
- Fixes undefined macros errors.
Support for Twig v2.12 and v3.0
Changed
- Twig has been bumped to support both v2.12 and v3.0.
Support for Twig v2.11
Changed
- Twig has been bumped to v2.11.
Twig v2.9 compatibility
Changed
- 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.
Fixed
- Compatibility issues with Twig v2.9 have been fixed.
Same, but better
This release has lots of small improvements based on 6 months of heavy production use since v1.0. Most of it you won't notice, but here's the stuff you probably care about. Keep in mind that this is a major version release, with breaking changes. Most notably the removal of the SuppressionMiddleware
as the middleware that was added by default.
Added
- Documentation on nesting presentation models and the
optional
tag. - An
Installer
class which sets up Shoot for an instance of Twig.
Changed
- 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
SuppressionMiddleware
is no longer enabled by the default. You'll have to pass it to thePipeline
constructor along with any other middleware you use. - The
LoggingMiddleware
now also logs errors. Kind of odd it did not do that before.
Fixed
- 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.
API stabilised, optional tag introduced
Added
- The
optional
tag 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
getVariable
toPresentationModel
to read a single variable from the presentation model.
Changed
- 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
Pipeline
class. - The
getPresenter
method ofHasPresenterInterface
was renamed togetPresenterName
as it more accurately describes its purpose. HasDataTrait
has been moved to aUtilities
namespace.- The Twig dependency has been bumped to v2.5
- Lots of housekeeping in code and documentation.
Deprecated
- The Shoot/Http package is deprecated as of this release.
Removed Context type
This releases removes the Context type entirely. Turns out that it does more harm than good. Perhaps if one day we have generics in PHP, we'd be able to type this argument. Until then, we'll have to settle for PHPDoc.
Opened up Context as an interface
Context is 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.
Fix for embedded templates
Shoot handles embedded templates by passing through all variables from the parent template.