tested with spartan-test, checked with psalm (level 2) && php-stan (level 6)
composer require "homebase2/hb-core:dev-main"
- recommendedcomposer require homebase2/hb-core
for stable version
- Str - string methods
- Arr & Arr0 - Generic Array Methods
- DH aka DeepHash - Deep(aka nested) Array methods
- TODO: AH - Array of Hashes/Records (~ sql tables)
- TODO: ADH - Array of AH (~ mongo records)
- \hb\ functions - used by framework
TODO - move to Homebase Development Document
composer install
- install php-tools
ln -s ~/src/php-tools/bin tools
composer test
run unit tests. usetest-q
to run quite tests (show errors only)
composer psalm
check code with psalm
composer stan
check code with php-stan (default level is 6)
composer lint
php syntax check
composer psalm-dry
ANDcomposer psalm-fix
(aka psalter review/apply suggested code changes by psalm, be careful always do dry before applying
composer cs-dry
ANDcomposer cs-fix
review/apply suggested code changes by php-cs-fixer, be careful always do dry before applying
composer doc
generate phpDocumentor documentation indoc
folder
./check
do all checks: lint, unit tests, psalm, php-stan; stops when any of them failed
./check-commit
,./check-push
do./check
, add all new files to git, dogit commit -v -s
andgit push --tags
./psysh
php shell: Docs
notable commands:wtf
,doc ClassName
,doc ClassName::method
,show ClassName::method
,ls -l ClassName
,ls -l --grep all \hb\Arr
usehelp
to see more
PS:
this project was bootstrapped from composer-php8-template