Skip to content

v2.0.0

Latest

Choose a tag to compare

@tg666 tg666 released this 28 Oct 15:08
7654b41

Added

  • Support for nette/robot-loader ^4.0 (dev dependency, suggested for the option scanDirs).
  • Integration test of the authorization (trait → authorizator → rules provider → reader) without mocks.

Changed

  • Minimal PHP version is 8.3.
  • ❗ AuthorizationTrait passes the action name (default) and the signal name (delete) to ComponentAuthorizatorInterface::checkAction() and checkSignal() instead of the method names (actionDefault, handleDelete). Custom implementations of ComponentAuthorizatorInterface must be updated.
  • nette/utils is declared as a dependency (it was used without being required).
  • Dev tooling: PHPStan 2, Nette Tester 2.6+, Mockery 1.6.12+, PHP-CS-Fixer 3.89+, CI matrix PHP 8.3, 8.4 and 8.5. The tests attach components to a presenter (required by nette/application 3.2+).

Removed

  • ❗ Support for PHP < 8.3.

Fixed

  • Security: authorization attributes on action methods (action<Action>()) and signal methods (handle<Signal>()) were never enforced, because AuthorizationTrait passed the method name and the rules provider formatted it once more (actionActionDefault). Requests that were allowed until now may be forbidden after the upgrade.
  • PHP 8.4 deprecation of the implicitly nullable parameter $previous in ForbiddenRequestException::__construct().