Skip to content

v0.27.0

Latest
Compare
Choose a tag to compare
@s3b4stian s3b4stian released this 17 Sep 09:49

New on this version

NOTE: Code porting to PHP 8.1 ongoing.

Added

Authentication

  • Linna\Authentication\Exception\AuthenticationException now extend Linna\Router\Exception\RedirectException

Authorization

  • Linna\Authorization\Exception namespace
  • Linna\Authorization\Exception\AuthorizationException exception

Container

  • Linna\Container\Container::RULE_INTERFACE public constant, use it in rules for resolve interfaces
  • Linna\Container\Container::RULE_ARGUMENT public constant, use it in rules for resolve other arguments

Data Mapper

  • Linna\DataMapper\DomainObjectAbstract->created public property
  • Linna\DataMapper\DomainObjectAbstract->lastUpdate public property
  • Linna\DataMapper\DomainObjectAbstract->id protected property accessible via __get() method

Router

  • Linna\Router\Router->parseQueryStringOnRewriteModeOn protected property
  • parseQueryStringOnRewriteModeOn as valid option for constructor

Session

  • Linna\Session\PgsqlSessionHandler class
  • Linna\Session\Session->getSessionName() method
  • Linna\Session\Session->getSessionId() method
  • Linna\Session\Session->getStatus() method

Shared

  • Linna\Shared\AbstractAccessTrait trait
  • Linna\Shared\ArrayAccessTrait trait
  • Linna\Shared\PropertyAccessTrait trait
  • Linna\Shared\AbstractStorageFactory class

Changed

  • PHP 8.1 required
  • Constructor property promotion used when possible
  • Readonly properties used when possible

Authentication

  • Linna\Authentication\Exception\AuthenticationException now extend Linna\Router\Exception\RedirectException
  • Linna\Authentication\ProtectedControllerTrait->protect() now have as second argument string $route instead of int $httpResponseCode = 403
  • Linna\Authentication\ProtectedControllerTrait->protectWithRedirect() now have a third argument string $route

Cache

Container

  • Linna\Container\Container now it is possible resolve classes with interface as parameter
  • Linna\Container\Container minor code optimizations

Data Mapper

  • Linna\DataMapper\MapperAbstract->save() update after insert
  • Linna\DataMapper\DomainObjectAbstract->id when not set has value -1 instead of 0
  • Linna\DataMapper\DomainObjectAbstract->setId argument renamed objectId to id
  • Linna\DataMapper\DomainObjectAbstract->rId public property removed
  • Linna\DataMapper\DomainObjectAbstract->objectId protected property renamed to id

Mvc

  • Linna\Mvc\FrontController now search for default entryPoint method instead of index if $route has not action set
  • Linna\Mvc\FrontController renamed as Linna\Mvc\ModelViewController

Router

  • badRoute it is no longer a valid option for constructor
  • Linna\Router\Route as data-transfer object, all properties are read-only, all methods removed
  • Linna\Router\Route now used named arguments in constructor, array options no longer supported
  • Linna\Router\Router now used named arguments in constructor, array options no longer supported

Session

  • All properties now are private, class more incapsulated

Fixed

Container

  • Linna\Container\Container error when a class without __construct method is encountered

Data Mapper

  • Linna\DataMapper\MapperAbstract->save() update after insert

Session

  • Linna\Session\Session session die because it does not refresh expiration time on client, also if present user interaction, with browser

Removed

Mvc

  • Linna\Mvc\View->__construct() no longer require Model as first parameter, useless reference

Router

  • Linna\Router\Router->badRoute protected property

Storage

  • Linna\Storage\AbstractStorageFactory class, moved to Linna\Shared namespace