mirror of
https://github.com/Karaka-Management/Build.git
synced 2026-01-10 19:28:41 +00:00
fix setup and phpstan autoloader
This commit is contained in:
parent
f17998b71c
commit
3335fb129e
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
Loading…
Reference in New Issue
Block a user