Session: - can recreate session id periodic (Default never) - options are set via array like in other classes - checks for strict session settings on default ACL Login: - remove all DEBUG/DB_DEBUG variables, calls, etc - removed from the EditBase/EditUsers classes too - switch to UUIDv4 as the session lookup variable - all session vars are prefixed with "LOGIN_" - the charset ones are left as DEFAULT_CHARSET, DEFAULT_LOCALE, DEFAULT_LANG - the old LOGIN_LANG has been removed (deprecated) - TEMPLATE session has been removed, there is no template data in the edit class - session is resynced (ACL lookup), default 5min, adjustable via option - sets strict header options as default - moves several methods parts into their own classes - plan to split up class into sub classes for certain actions - new force logout counter in DB - edit logger is moved into this class - plan to move logging into sub class - all SQL calls user heredoc and params - update login/change password to new layout for pc/smartphone compatible - change password will be replaced with reset password in future - last login success is now set as timestamp - all old PK lookups for edit access etc are deprecated and replaced with cuid lookups ArrayHandling: - add array return matching key Give any array with key values and a list of keys and only return matching keys Wrapper for array_filter call
Composer package from CoreLibs
This is just the lib/CoreLibs folder in a composer package.
For local install only
Note: for following classes the egrajp/smarty-extended has to be installed
- Template\SmartyExtended
- Admin\EditBase
Publish to gitea or gitlab server
Currently there are only gitea and gitlab supported, github does not have support for composer packages
publish\publish.sh go will run the publish script
All the configuration is done in the publish\.env.deploy file
# downlaod file name is "Repository name" "-" "version" where
# version is "vN.N.N"
GITEA_PUBLISH=1
GITEA_UPLOAD_FILENAME="Upload-File-Name";
GITEA_USER=gitea-user
GITEA_TOKEN=gitea-tokek
GITEA_URL_DL=https://[gitea.hostname]/[to/package/folder]/archive
GITEA_URL_PUSH=https://[gitea.hostname]/api/packages/[organization]/composer
GITLAB_PUBLISH=1
GITLAB_URL=gitlab URl to repository
GITLAB_DEPLOY_TOKEN=gitlab-token
At the moment there is only one gitea or gitlab target setable
Setup from central composer
Setup from gitea servers
[hostname] is the hostname for your gitea server (or wherever this is published) [OrgName] is the organization name where the composer packages are hosted
composer config repositories.[hostname].Composer composer https://[hostname]/api/packages/[OrgName]/composer
Install package
composer require egrajp/corelibs-composer-all:^9.0
Tests
All tests must be run from the base folder
phan
phan --progress-bar -C --analyze-twic
phpstan
phpstan
phpunit
PHP unit is installed via "phiev"
tools/phpunit test/phpunit