| Change | Symptom | Fix |
|---|---|---|
| PHP 8.2 is not supported | Composer does not install version 4 on PHP 8.2 | Use PHP 8.3 or later, or stay on version 3 |
ExceptionInterface extends Throwable |
Fatal error: "cannot implement interface Throwable, extend Exception or Error instead" | Make your class extend Exception, RuntimeException or a class of this package |
$roles and getRoles() have PHPDoc value types |
PHPStan in your project can report argument.type or return.type |
Use only role names (string) or RoleInterface objects |
ForbiddenException accepts any ?Throwable as the previous exception. Each call that worked in version 3 also works in version 4.Version 3 accepted a class that implements ExceptionInterface but is not an exception.
use Dot\Authorization\Exception\ExceptionInterface;
class AccessDenied implements ExceptionInterface
{
}
In version 4, the class must extend Exception or one of its subclasses.
use Dot\Authorization\Exception\ExceptionInterface;
use RuntimeException;
class AccessDenied extends RuntimeException implements ExceptionInterface
{
}
dot-rbac, dot-navigation and dot-twigrenderer require dotkernel/dot-authorization ^3.4.1.
Composer does not install version 4 until these packages allow it.