fix setup and phpstan autoloader

This commit is contained in:
Dennis Eichhorn 2023-10-01 20:41:26 +00:00
parent f17998b71c
commit 3335fb129e
3 changed files with 7 additions and 4 deletions

View File

@ -39,6 +39,7 @@ function module_autoloader($class) {
}
}
// github and normal
foreach ($paths as $path) {
if (($file = \realpath($path . $class2 . '.php'))) {
include_once $file;
@ -55,7 +56,7 @@ function module_autoloader($class) {
}
}
// own server
foreach ($paths as $path) {
if (($file = \realpath($path . 'oms-' . $class2 . '.php'))) {
include_once $file;
@ -72,7 +73,9 @@ function module_autoloader($class) {
}
}
$class = \str_replace('Modules/', '/', $class);
$paths[] = __DIR__ . '/../../src/Karaka/';
$class = \ltrim(\str_replace('Modules/', '/', $class), '/');
foreach ($paths as $path) {
if (\is_file($file = $path . $class . '.php')) {
include_once $file;

View File

@ -10,7 +10,7 @@ export PROMPT_COMMAND='echo "$(date "+%Y-%m-%d.%H:%M:%S") $(pwd) $(history 1)" >
apt-get update
apt-get upgrade
apt-get install git git-lfs snapd ufw software-properties-common composer
apt-get install git git-lfs snapd ufw software-properties-common composer nodejs npm
# Security

View File

@ -12,7 +12,7 @@ echo "#################################################"
echo "Start php static inspection"
echo "#################################################"
php -d memory_limit=4G ${TOOLS_PATH}/vendor/bin/phpstan analyse --no-progress -l 9 -c ${BUILD_PATH}/Config/phpstan.neon ${INSPECTION_PATH} || true
php -dmemory_limit=4G ${TOOLS_PATH}/vendor/bin/phpstan analyse --error-format=prettyJson --no-progress -l 9 -c ${BUILD_PATH}/Config/phpstan.neon ${INSPECTION_PATH} > ${OUTPUT_PATH}/phpstan.json || true
# Cli debugging
# php -dzend_extension=xdebug.so -dxdebug.mode=debug -dxdebug.profiler_enable=1