Skip to content

Releases: linna/framework

v0.27.0

17 Sep 09:49
Compare
Choose a tag to compare

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

v0.26.0

05 Aug 05:51
a857bc0
Compare
Choose a tag to compare

New on this version

Added

Data Mapper

  • Linna\DataMapper\UUID4 class

Router

  • Linna\Router\Route->allowed property
  • Linna\Router\Route->getAllowed() method
  • Linna\Router\Router chars accepted in route params now are 0-9 A-Z a-z ._-
  • Linna\Router\Exception namespace
  • Linna\Router\Exception\RedirectException exception

Changed

  • minimum php version 7.2
  • tests updated

Router

  • Linna\Router\Router->__construct() now require a Linna\Router\RouteCollection as first argument

Storage

  • Linna\Storage\ConnectorsInterface->getResource() now has return type object
  • Linna\Storage\Connectors\PdoConnector->getResource() now has return type object
  • Linna\Storage\Connectors\MysqliConnector->getResource() now has return type object
  • Linna\Storage\Connectors\MongoDBConnector->getResource() now has return type object

Fixed

  • Linna\Authentication\User->changePassword() typo error in method name
  • Linna\Mvc\FrontController->runView() error when $this->routeAction value called as method and not declared on view class

v0.25.0

13 Jan 12:48
Compare
Choose a tag to compare

New on this version

Added

Authentication

  • Linna\Authentication\ProtectedController->protectWithRedirect() method
  • Linna\Authentication\Exception\AuthenticationException exception

Authorization

  • Linna\Authorization\EnhancedUser->__construct()
  • Linna\Authorization\EnhancedUser->hasRole() method
  • Linna\Authorization\EnhancedUser->hasRoleById() method
  • Linna\Authorization\EnhancedUser->hasRoleByName() method
  • Linna\Authorization\EnhancedUserMapperInterface->grantPermission() method
  • Linna\Authorization\EnhancedUserMapperInterface->grantPermissionById() method
  • Linna\Authorization\EnhancedUserMapperInterface->grantPermissionByName() method
  • Linna\Authorization\EnhancedUserMapperInterface->revokePermission() method
  • Linna\Authorization\EnhancedUserMapperInterface->revokePermissionById() method
  • Linna\Authorization\EnhancedUserMapperInterface->rovekePermissionByName() method
  • Linna\Authorization\EnhancedUserMapperInterface->addRole() method
  • Linna\Authorization\EnhancedUserMapperInterface->addRoleById() method
  • Linna\Authorization\EnhancedUserMapperInterface->addRoleByName() method
  • Linna\Authorization\EnhancedUserMapperInterface->removeRole() method
  • Linna\Authorization\EnhancedUserMapperInterface->removeRoleById() method
  • Linna\Authorization\EnhancedUserMapperInterface->removeRoleByName() method
  • Linna\Authorization\FetchByPermissionInterface interface
  • Linna\Authorization\FetchByRoleInterface interface
  • Linna\Authorization\FetchByUserInterface interface
  • Linna\Authorization\PermissionTrait->canById() method
  • Linna\Authorization\PermissionTrait->canByName() method
  • Linna\Authorization\PermissionMapperInterface->permissionExistById() method
  • Linna\Authorization\PermissionMapperInterface->permissionExistByName() method
  • Linna\Authorization\Role->isUserInRole() method
  • Linna\Authorization\Role->isUserInRoleById() method
  • Linna\Authorization\Role->isUserInRoleByName() method
  • Linna\Authorization\RoleMapperInterface->grantPermission() method
  • Linna\Authorization\RoleMapperInterface->grantPermissionById() method
  • Linna\Authorization\RoleMapperInterface->grantPermissionByName() method
  • Linna\Authorization\RoleMapperInterface->revokePermission() method
  • Linna\Authorization\RoleMapperInterface->revokePermissionById() method
  • Linna\Authorization\RoleMapperInterface->revokePermissionByName() method
  • Linna\Authorization\RoleMapperInterface->addUser() method
  • Linna\Authorization\RoleMapperInterface->addUserById() method
  • Linna\Authorization\RoleMapperInterface->addUserByName() method
  • Linna\Authorization\RoleMapperInterface->removeUser() method
  • Linna\Authorization\RoleMapperInterface->removeUserById() method
  • Linna\Authorization\RoleMapperInterface->removeUserByName() method
  • Linna\Authorization\RoleToUserMapperInterface interface

Data Mapper

  • Linna\DataMapper\FetchAllInterface interface
  • Linna\DataMapper\FetchByNameInterface interface
  • Linna\DataMapper\FetchLimitInterface interface

Changed

Authentication

  • Linna\Authentication\LoginAttempt default value added to properties
  • Linna\Authentication\Password->__construct() now accept as agument int $algo and array $options
  • Linna\Authentication\ProtectedController now throw AuthenticationException when try to access to protected resource without authentication
  • Linna\Authentication\ProtectedController->protect() metod now accept as argument Authentication instance and http status code as int
  • Linna\Authentication\ProtectedController renamed to Linna\Authentication\ProtectedControllerTrait
  • Linna\Authentication\User default value added to properties
  • Linna\Authentication\UserMapperInterface extends Linna\DataMapper\FetchByNameInterface

Authorization

  • Linna\Authorization\Authorization default value added to properties
  • Linna\Authorization\Authorization->can now accept Permission instance, permission id as integer or permission name as string
  • Linna\Authorization\EnhancedUserMapperInterface extends Linna\Authorization\FetchByPermissionInterface
  • Linna\Authorization\EnhancedUserMapperInterface extends Linna\Authorization\FetchByRoleInterface
  • Linna\Authorization\Permission default value added to properties
  • Linna\Authorization\PermissionMapperInterface extends Linna\DataMapper\FetchByNameInterface
  • Linna\Authorization\PermissionMapperInterface extends Linna\Authorization\FetchByRoleInterface
  • Linna\Authorization\PermissionMapperInterface extends Linna\Authorization\FetchByUserInterface
  • Linna\Authorization\PermissionTrait->can() now accepts as argument Linna\Authorization\Permission instance
  • Linna\Authorization\RoleMapperInterface extends Linna\Authorization\FetchByPermissionInterface
  • Linna\Authorization\RoleMapperInterface extends Linna\Authorization\FetchByUserInterface
  • Linna\Authorizationn\PermissionTrait default value added to properties
  • Linna\Authorizationn\Role default value added to properties

Data Mapper

  • Linna\Linna\DataMapper\DomainObjectAbstract->rId public property added

Router

  • Linna\Http namespace renamed to Linna\Router
  • Linna\Router\Route memory usage improvement
  • Linna\Router\Route all properties now are public
  • Linna\Router\Router default value added to properties
  • Linna\Router\Router memory usage improvement
  • Linna\Router\Router->map() now accept as argument instance of RouteInterface instead of array

Mvc

  • Linna\Mvc\FrontController default value added to properties
  • Linna\Mvc\FrontController->__construct() now accept RouteInterface instance as last argument instead of $action and $param
  • Linna\Mvc\View->__construct() now need Model and TemplateInterface as arguments

Session

  • Linna\Session\MemcachedSessionHandler default value added to properties
  • Linna\Session\Session default value added to properties
  • Linna\Session\Session memory usage improvement

Storage

  • Linna\Storage\AbstractConnector default value added to properties
  • Linna\Storage\AbstractStorageFactory default value added to properties
  • Linna\Storage\ExtendedPDO default value added to properties

Fixed

  • Minor issues fixed

Removed

Authorization

  • Linna\Authorization\EnhancedUserMapperInterface->fetchUserByRole() method
  • Linna\Authorization\EnhancedUserMapperInterface->fetchUserByPermission() method
  • Linna\Authorization\EnhancedUserMapperInterface->grant() method
  • Linna\Authorization\EnhancedUserMapperInterface->revoke() method
  • Linna\Authorization\PermissionMapperInterface->fetchPermissionsByRole() method
  • Linna\Authorization\PermissionMapperInterface->fetchPermissionsByUser() method
  • Linna\Authorization\PermissionMapperInterface->fetchUserPermissionHashTable() method
  • Linna\Authorization\PermissionMapperInterface->permissionExist() method
  • Linna\Authorization\PermissionTrait->getPermissions() method
  • Linna\Authorization\PermissionTrait->setPermissions() method
  • Linna\Authorization\Role->getUsers() method
  • Linna\Authorization\Role->setUsers() method
  • Linna\Authorization\RoleMapperInterface->fetchUserInheritedPermissions() method
  • Linna\Authorization\RoleMapperInterface->permissionGrant() method
  • Linna\Authorization\RoleMapperInterface->permissionRevoke() method
  • Linna\Authorization\RoleMapperInterface->userAdd() method
  • Linna\Authorization\RoleMapperInterface->userRemove() method

Router

  • Linna\Router\NullRoute->toArray() method
  • Linna\Router\RouteCollection->toArray() method, use ->getArrayCopy() instead
  • Linna\Router\RouteInterface->toArray() method

Shared

  • Linna\Shared\ClassOptionsTrait trait

For more information read the full changelog.

v0.24.0

31 Aug 22:42
Compare
Choose a tag to compare

New on this version

Added

  • Linna\Authentication\PasswordGenerator class
  • Linna\DI\Container constructor, now rules should be passed here
  • void return type to methods
  • Namespace for tests

Changed

  • Minimun PHP version: 7.1
  • Exception messages
  • Linna\Authentication\Authenticate renamed to Linna\Authentication\Authentication
  • Linna\Authentication\EnhancedAuthenticate renamed to Linna\Authentication\EnhancedAuthentication
  • Linna\Authentication\EnhancedAuthenticateMapperInterface renamed to Linna\Authentication\EnhancedAuthenticationMapperInterface
  • Linna\Authorization\Authorize renamed to Linna\Authorization\Authorization
  • Linna\DI namespace renamed to Linna\Container
  • Tests updated

Removed

  • Linna\Helper\Env class, use instead dotenv package
  • Linna\Helper\Str class
  • Linna\Http\RouterCached class, caching will be added to app package
  • Linna\DI\Container->setRules() method

For more information read the full changelog.

v0.23.1

01 Nov 17:07
Compare
Choose a tag to compare

New on this version

Fixed

  • Linna\Mvc\FrontController view don't call default method

For more information read the full Changelog until now.

v0.23.0

01 Nov 12:02
Compare
Choose a tag to compare

New on this version

Added

  • Linna\Authentication\User->uuid property
  • Linna\Mvc\Model->set() method for set data to notify to observer
  • Linna\Mvc\Model->get() method for retrive data to notify to observer
  • Linna\Helper\Env class #58
  • Linna\Helper\Eng::get() static method
  • Linna\Helper\Str class #58
  • Linna\Helper\Str::startsWith() static method
  • Linna\Helper\Str::endsWith() static method

Changed

  • Linna\Cache\DiskCache->__construct() ttl option removed
  • Linna\Http\FastMapTrait merged into Linna\Http\Router through magic __call()
  • Linna\Session\MysqlPdoSessionHandler->__construct() now expect Linna\Storage\ExtendedPDO as parameter
  • Linna\Storage\PdoStorage moved to Linna\Storage\Connectors\PdoConnector
  • Linna\Storage\MysqliStorage moved to Linna\Storage\Connectors\MysqliConnector
  • Linna\Storage\MongoDbStorage moved to Linna\Storage\Connectors\MongoDBConnector
  • Linna\Storage\StorageInterface renamed to Linna\Storage\ConnectorInterface
  • Linna\Storage\StorageFactory->get() now return the connection resource directly

Fixed

  • Linna\Auth\Authenticate login data doesn't update after login
  • Linna\Mvc\FrontController action execution before and after

Removed

  • Linna\Http\FastMapTrait

For more information read the full Changelog until now.

v0.22.0

24 Oct 17:08
Compare
Choose a tag to compare

New on this version

Added

  • Linna\Autoloader->unregister() method
  • Linna\Authentication\EnhancedAuthenticate class
  • Linna\Authentication\EnhancedAuthenticateMapperInterface interface
  • Linna\Authentication\LoginAttempt class
  • Linna\Storage\ExtendedPDO->getLastOperationStatus() method

Changed

  • Linna\Auth splitted into Linna\Authentication and Linna\Authorization
  • Linna\Auth\Authenticate moved under namespace Linna\Authentication
  • Linna\Auth\Password moved under namespace Linna\Authentication
  • Linna\Auth\ProtectedController moved under namespace Linna\Authentication
  • Linna\Auth\User moved under namespace Linna\Authentication
  • Linna\Auth\UserMapperInterface moved under namespace Linna\Authentication
  • Linna\Auth\Authorize moved under namespace Linna\Authorization
  • Linna\Auth\EnhancedUser moved under namespace Linna\Authorization
  • Linna\Auth\EnhancedUserMapperInterface moved under namespace Linna\Authorization
  • Linna\Auth\Permission moved under namespace Linna\Authorization
  • Linna\Auth\PermissionMapperInterface moved under namespace Linna\Authorization
  • Linna\Auth\PermissionTrait moved under namespace Linna\Authorization
  • Linna\Auth\Role moved under namespace Linna\Authorization
  • Linna\Auth\RoleMapperInterface moved under namespace Linna\Authorization
  • Tests updated

For more information read the full Changelog until now.

v0.21.0

04 Oct 18:25
Compare
Choose a tag to compare

Please read the changelog

v0.20.2

25 Jul 10:31
Compare
Choose a tag to compare

Please read the changelog

v0.20.1

17 Jul 19:11
Compare
Choose a tag to compare

Please read the changelog