Releases: linna/framework
Releases · linna/framework
v0.27.0
New on this version
NOTE: Code porting to PHP 8.1 ongoing.
Added
Authentication
Linna\Authentication\Exception\AuthenticationExceptionnow extendLinna\Router\Exception\RedirectException
Authorization
Linna\Authorization\ExceptionnamespaceLinna\Authorization\Exception\AuthorizationExceptionexception
Container
Linna\Container\Container::RULE_INTERFACEpublic constant, use it in rules for resolve interfacesLinna\Container\Container::RULE_ARGUMENTpublic constant, use it in rules for resolve other arguments
Data Mapper
Linna\DataMapper\DomainObjectAbstract->createdpublic propertyLinna\DataMapper\DomainObjectAbstract->lastUpdatepublic propertyLinna\DataMapper\DomainObjectAbstract->idprotected property accessible via__get()method
Router
Linna\Router\Router->parseQueryStringOnRewriteModeOnprotected propertyparseQueryStringOnRewriteModeOnas valid option for constructor
Session
Linna\Session\PgsqlSessionHandlerclassLinna\Session\Session->getSessionName()methodLinna\Session\Session->getSessionId()methodLinna\Session\Session->getStatus()method
Shared
Linna\Shared\AbstractAccessTraittraitLinna\Shared\ArrayAccessTraittraitLinna\Shared\PropertyAccessTraittraitLinna\Shared\AbstractStorageFactoryclass
Changed
- PHP 8.1 required
- Constructor property promotion used when possible
- Readonly properties used when possible
Authentication
Linna\Authentication\Exception\AuthenticationExceptionnow extendLinna\Router\Exception\RedirectExceptionLinna\Authentication\ProtectedControllerTrait->protect()now have as second argumentstring $routeinstead ofint $httpResponseCode = 403Linna\Authentication\ProtectedControllerTrait->protectWithRedirect()now have a third argumentstring $route
Cache
- Now drivers use Psr\SimpleCache instead of my typed verion
Container
Linna\Container\Containernow it is possible resolve classes with interface as parameterLinna\Container\Containerminor code optimizations
Data Mapper
Linna\DataMapper\MapperAbstract->save()update after insertLinna\DataMapper\DomainObjectAbstract->idwhen not set has value-1instead of0Linna\DataMapper\DomainObjectAbstract->setIdargument renamedobjectIdtoidLinna\DataMapper\DomainObjectAbstract->rIdpublic property removedLinna\DataMapper\DomainObjectAbstract->objectIdprotected property renamed toid
Mvc
Linna\Mvc\FrontControllernow search for defaultentryPointmethod instead ofindexif$routehas notactionsetLinna\Mvc\FrontControllerrenamed asLinna\Mvc\ModelViewController
Router
badRouteit is no longer a valid option for constructorLinna\Router\Routeas data-transfer object, all properties are read-only, all methods removedLinna\Router\Routenow used named arguments in constructor, array options no longer supportedLinna\Router\Routernow used named arguments in constructor, array options no longer supported
Session
- All properties now are
private, class more incapsulated
Fixed
Container
Linna\Container\Containererror when a class without__constructmethod is encountered
Data Mapper
Linna\DataMapper\MapperAbstract->save()update after insert
Session
Linna\Session\Sessionsession 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 requireModelas first parameter, useless reference
Router
Linna\Router\Router->badRouteprotected property
Storage
Linna\Storage\AbstractStorageFactoryclass, moved toLinna\Sharednamespace
v0.26.0
New on this version
Added
Data Mapper
Linna\DataMapper\UUID4class
Router
Linna\Router\Route->allowedpropertyLinna\Router\Route->getAllowed()methodLinna\Router\Routerchars accepted in route params now are 0-9 A-Z a-z ._-Linna\Router\ExceptionnamespaceLinna\Router\Exception\RedirectExceptionexception
Changed
- minimum php version 7.2
- tests updated
Router
Linna\Router\Router->__construct()now require aLinna\Router\RouteCollectionas first argument
Storage
Linna\Storage\ConnectorsInterface->getResource()now has return typeobjectLinna\Storage\Connectors\PdoConnector->getResource()now has return typeobjectLinna\Storage\Connectors\MysqliConnector->getResource()now has return typeobjectLinna\Storage\Connectors\MongoDBConnector->getResource()now has return typeobject
Fixed
Linna\Authentication\User->changePassword()typo error in method nameLinna\Mvc\FrontController->runView()error when$this->routeActionvalue called as method and not declared on view class
v0.25.0
New on this version
Added
Authentication
Linna\Authentication\ProtectedController->protectWithRedirect()methodLinna\Authentication\Exception\AuthenticationExceptionexception
Authorization
Linna\Authorization\EnhancedUser->__construct()Linna\Authorization\EnhancedUser->hasRole()methodLinna\Authorization\EnhancedUser->hasRoleById()methodLinna\Authorization\EnhancedUser->hasRoleByName()methodLinna\Authorization\EnhancedUserMapperInterface->grantPermission()methodLinna\Authorization\EnhancedUserMapperInterface->grantPermissionById()methodLinna\Authorization\EnhancedUserMapperInterface->grantPermissionByName()methodLinna\Authorization\EnhancedUserMapperInterface->revokePermission()methodLinna\Authorization\EnhancedUserMapperInterface->revokePermissionById()methodLinna\Authorization\EnhancedUserMapperInterface->rovekePermissionByName()methodLinna\Authorization\EnhancedUserMapperInterface->addRole()methodLinna\Authorization\EnhancedUserMapperInterface->addRoleById()methodLinna\Authorization\EnhancedUserMapperInterface->addRoleByName()methodLinna\Authorization\EnhancedUserMapperInterface->removeRole()methodLinna\Authorization\EnhancedUserMapperInterface->removeRoleById()methodLinna\Authorization\EnhancedUserMapperInterface->removeRoleByName()methodLinna\Authorization\FetchByPermissionInterfaceinterfaceLinna\Authorization\FetchByRoleInterfaceinterfaceLinna\Authorization\FetchByUserInterfaceinterfaceLinna\Authorization\PermissionTrait->canById()methodLinna\Authorization\PermissionTrait->canByName()methodLinna\Authorization\PermissionMapperInterface->permissionExistById()methodLinna\Authorization\PermissionMapperInterface->permissionExistByName()methodLinna\Authorization\Role->isUserInRole()methodLinna\Authorization\Role->isUserInRoleById()methodLinna\Authorization\Role->isUserInRoleByName()methodLinna\Authorization\RoleMapperInterface->grantPermission()methodLinna\Authorization\RoleMapperInterface->grantPermissionById()methodLinna\Authorization\RoleMapperInterface->grantPermissionByName()methodLinna\Authorization\RoleMapperInterface->revokePermission()methodLinna\Authorization\RoleMapperInterface->revokePermissionById()methodLinna\Authorization\RoleMapperInterface->revokePermissionByName()methodLinna\Authorization\RoleMapperInterface->addUser()methodLinna\Authorization\RoleMapperInterface->addUserById()methodLinna\Authorization\RoleMapperInterface->addUserByName()methodLinna\Authorization\RoleMapperInterface->removeUser()methodLinna\Authorization\RoleMapperInterface->removeUserById()methodLinna\Authorization\RoleMapperInterface->removeUserByName()methodLinna\Authorization\RoleToUserMapperInterfaceinterface
Data Mapper
Linna\DataMapper\FetchAllInterfaceinterfaceLinna\DataMapper\FetchByNameInterfaceinterfaceLinna\DataMapper\FetchLimitInterfaceinterface
Changed
Authentication
Linna\Authentication\LoginAttemptdefault value added to propertiesLinna\Authentication\Password->__construct()now accept as agumentint $algoandarray $optionsLinna\Authentication\ProtectedControllernow throwAuthenticationExceptionwhen try to access to protected resource without authenticationLinna\Authentication\ProtectedController->protect()metod now accept as argumentAuthenticationinstance and http status code asintLinna\Authentication\ProtectedControllerrenamed toLinna\Authentication\ProtectedControllerTraitLinna\Authentication\Userdefault value added to propertiesLinna\Authentication\UserMapperInterfaceextendsLinna\DataMapper\FetchByNameInterface
Authorization
Linna\Authorization\Authorizationdefault value added to propertiesLinna\Authorization\Authorization->cannow accept Permission instance, permission id as integer or permission name as stringLinna\Authorization\EnhancedUserMapperInterfaceextendsLinna\Authorization\FetchByPermissionInterfaceLinna\Authorization\EnhancedUserMapperInterfaceextendsLinna\Authorization\FetchByRoleInterfaceLinna\Authorization\Permissiondefault value added to propertiesLinna\Authorization\PermissionMapperInterfaceextendsLinna\DataMapper\FetchByNameInterfaceLinna\Authorization\PermissionMapperInterfaceextendsLinna\Authorization\FetchByRoleInterfaceLinna\Authorization\PermissionMapperInterfaceextendsLinna\Authorization\FetchByUserInterfaceLinna\Authorization\PermissionTrait->can()now accepts as argumentLinna\Authorization\PermissioninstanceLinna\Authorization\RoleMapperInterfaceextendsLinna\Authorization\FetchByPermissionInterfaceLinna\Authorization\RoleMapperInterfaceextendsLinna\Authorization\FetchByUserInterfaceLinna\Authorizationn\PermissionTraitdefault value added to propertiesLinna\Authorizationn\Roledefault value added to properties
Data Mapper
Linna\Linna\DataMapper\DomainObjectAbstract->rIdpublic property added
Router
Linna\Httpnamespace renamed toLinna\RouterLinna\Router\Routememory usage improvementLinna\Router\Routeall properties now are publicLinna\Router\Routerdefault value added to propertiesLinna\Router\Routermemory usage improvementLinna\Router\Router->map()now accept as argument instance ofRouteInterfaceinstead ofarray
Mvc
Linna\Mvc\FrontControllerdefault value added to propertiesLinna\Mvc\FrontController->__construct()now acceptRouteInterfaceinstance as last argument instead of$actionand$paramLinna\Mvc\View->__construct()now needModelandTemplateInterfaceas arguments
Session
Linna\Session\MemcachedSessionHandlerdefault value added to propertiesLinna\Session\Sessiondefault value added to propertiesLinna\Session\Sessionmemory usage improvement
Storage
Linna\Storage\AbstractConnectordefault value added to propertiesLinna\Storage\AbstractStorageFactorydefault value added to propertiesLinna\Storage\ExtendedPDOdefault value added to properties
Fixed
- Minor issues fixed
Removed
Authorization
Linna\Authorization\EnhancedUserMapperInterface->fetchUserByRole()methodLinna\Authorization\EnhancedUserMapperInterface->fetchUserByPermission()methodLinna\Authorization\EnhancedUserMapperInterface->grant()methodLinna\Authorization\EnhancedUserMapperInterface->revoke()methodLinna\Authorization\PermissionMapperInterface->fetchPermissionsByRole()methodLinna\Authorization\PermissionMapperInterface->fetchPermissionsByUser()methodLinna\Authorization\PermissionMapperInterface->fetchUserPermissionHashTable()methodLinna\Authorization\PermissionMapperInterface->permissionExist()methodLinna\Authorization\PermissionTrait->getPermissions()methodLinna\Authorization\PermissionTrait->setPermissions()methodLinna\Authorization\Role->getUsers()methodLinna\Authorization\Role->setUsers()methodLinna\Authorization\RoleMapperInterface->fetchUserInheritedPermissions()methodLinna\Authorization\RoleMapperInterface->permissionGrant()methodLinna\Authorization\RoleMapperInterface->permissionRevoke()methodLinna\Authorization\RoleMapperInterface->userAdd()methodLinna\Authorization\RoleMapperInterface->userRemove()method
Router
Linna\Router\NullRoute->toArray()methodLinna\Router\RouteCollection->toArray()method, use->getArrayCopy()insteadLinna\Router\RouteInterface->toArray()method
Shared
Linna\Shared\ClassOptionsTraittrait
For more information read the full changelog.
v0.24.0
New on this version
Added
Linna\Authentication\PasswordGeneratorclassLinna\DI\Containerconstructor, now rules should be passed here- void return type to methods
- Namespace for tests
Changed
- Minimun PHP version: 7.1
- Exception messages
Linna\Authentication\Authenticaterenamed toLinna\Authentication\AuthenticationLinna\Authentication\EnhancedAuthenticaterenamed toLinna\Authentication\EnhancedAuthenticationLinna\Authentication\EnhancedAuthenticateMapperInterfacerenamed toLinna\Authentication\EnhancedAuthenticationMapperInterfaceLinna\Authorization\Authorizerenamed toLinna\Authorization\AuthorizationLinna\DInamespace renamed toLinna\Container- Tests updated
Removed
Linna\Helper\Envclass, use instead dotenv packageLinna\Helper\StrclassLinna\Http\RouterCachedclass, caching will be added to app packageLinna\DI\Container->setRules()method
For more information read the full changelog.
v0.23.1
v0.23.0
New on this version
Added
Linna\Authentication\User->uuidpropertyLinna\Mvc\Model->set()method for set data to notify to observerLinna\Mvc\Model->get()method for retrive data to notify to observerLinna\Helper\Envclass #58Linna\Helper\Eng::get()static methodLinna\Helper\Strclass #58Linna\Helper\Str::startsWith()static methodLinna\Helper\Str::endsWith()static method
Changed
Linna\Cache\DiskCache->__construct()ttl option removedLinna\Http\FastMapTraitmerged intoLinna\Http\Routerthrough magic__call()Linna\Session\MysqlPdoSessionHandler->__construct()now expectLinna\Storage\ExtendedPDOas parameterLinna\Storage\PdoStoragemoved toLinna\Storage\Connectors\PdoConnectorLinna\Storage\MysqliStoragemoved toLinna\Storage\Connectors\MysqliConnectorLinna\Storage\MongoDbStoragemoved toLinna\Storage\Connectors\MongoDBConnectorLinna\Storage\StorageInterfacerenamed toLinna\Storage\ConnectorInterfaceLinna\Storage\StorageFactory->get()now return the connection resource directly
Fixed
Linna\Auth\Authenticatelogin data doesn't update after loginLinna\Mvc\FrontControlleraction execution before and after
Removed
Linna\Http\FastMapTrait
For more information read the full Changelog until now.
v0.22.0
New on this version
Added
Linna\Autoloader->unregister()methodLinna\Authentication\EnhancedAuthenticateclassLinna\Authentication\EnhancedAuthenticateMapperInterfaceinterfaceLinna\Authentication\LoginAttemptclassLinna\Storage\ExtendedPDO->getLastOperationStatus()method
Changed
Linna\Authsplitted intoLinna\AuthenticationandLinna\AuthorizationLinna\Auth\Authenticatemoved under namespaceLinna\AuthenticationLinna\Auth\Passwordmoved under namespaceLinna\AuthenticationLinna\Auth\ProtectedControllermoved under namespaceLinna\AuthenticationLinna\Auth\Usermoved under namespaceLinna\AuthenticationLinna\Auth\UserMapperInterfacemoved under namespaceLinna\AuthenticationLinna\Auth\Authorizemoved under namespaceLinna\AuthorizationLinna\Auth\EnhancedUsermoved under namespaceLinna\AuthorizationLinna\Auth\EnhancedUserMapperInterfacemoved under namespaceLinna\AuthorizationLinna\Auth\Permissionmoved under namespaceLinna\AuthorizationLinna\Auth\PermissionMapperInterfacemoved under namespaceLinna\AuthorizationLinna\Auth\PermissionTraitmoved under namespaceLinna\AuthorizationLinna\Auth\Rolemoved under namespaceLinna\AuthorizationLinna\Auth\RoleMapperInterfacemoved under namespaceLinna\Authorization- Tests updated
For more information read the full Changelog until now.