From 2a2f494ce55caa9717cfdc49f2c055b313623278 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Mon, 2 Oct 2023 02:56:46 +0000 Subject: [PATCH] fix autoloading --- Config/phpmetrics.json | 3 ++- Helper/Scripts/serverInstall.sh | 3 +++ Inspection/Php/stats.sh | 2 +- Inspection/Php/style.sh | 2 +- Inspection/Php/tests.sh | 2 +- php.sh | 2 +- 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Config/phpmetrics.json b/Config/phpmetrics.json index e42a8b2..53d2b82 100644 --- a/Config/phpmetrics.json +++ b/Config/phpmetrics.json @@ -1,8 +1,9 @@ { - "composer": false, + "composer": true, "excludes": [ ".git", "tests", + "MainRepository", "vendor", "Admin/Install/Application", "Install/Application", diff --git a/Helper/Scripts/serverInstall.sh b/Helper/Scripts/serverInstall.sh index ddfb41f..c553eca 100644 --- a/Helper/Scripts/serverInstall.sh +++ b/Helper/Scripts/serverInstall.sh @@ -39,6 +39,9 @@ service fail2ban restart apt-get install php8.1 php8.1-dev php8.1-cli php8.1-common php8.1-mysql php8.1-pgsql php8.1-xdebug php8.1-opcache php8.1-pdo php8.1-sqlite php8.1-mbstring php8.1-curl php8.1-imap php8.1-bcmath php8.1-zip php8.1-dom php8.1-xml php8.1-phar php8.1-gd php-pear apache2 libapache2-mpm-itk apache2-utils mariadb-server mariadb-client wkhtmltopdf tesseract-ocr poppler-utils +pecl install pcov +#echo "extension=pcov.so" > /etc/php/cli/conf.d/20-xdebug.ini + mkdir -p /var/cache/apache2 mkdir -p /var/cache/apache2/tmrank chown -R www-data:www-data /var/cache/apache2 diff --git a/Inspection/Php/stats.sh b/Inspection/Php/stats.sh index 169b898..e5b2622 100755 --- a/Inspection/Php/stats.sh +++ b/Inspection/Php/stats.sh @@ -8,4 +8,4 @@ echo "#################################################" # php ${TOOLS_PATH}/vendor/bin/phploc ${INSPECTION_PATH} > ${OUTPUT_PATH}/phploc.log || true -php ${TOOLS_PATH}/vendor/bin/phpmetrics --config=${BUILD_PATH}/Config/phpmetrics.json --report-html=${OUTPUT_PATH}/metrics ${INSPECTION_PATH} || true \ No newline at end of file +php ${TOOLS_PATH}/vendor/bin/phpmetrics --config=${BUILD_PATH}/Config/phpmetrics.json --junit=${OUTPUT_PATH}/junit_php.xml --report-html=${OUTPUT_PATH}/metrics ${INSPECTION_PATH} || true \ No newline at end of file diff --git a/Inspection/Php/style.sh b/Inspection/Php/style.sh index 4fe8821..f665703 100755 --- a/Inspection/Php/style.sh +++ b/Inspection/Php/style.sh @@ -8,4 +8,4 @@ echo "#################################################" php ${TOOLS_PATH}/vendor/bin/phpcs ${INSPECTION_PATH} --standard="${BUILD_PATH}/Config/phpcs.xml" -s --report-full=${OUTPUT_PATH}/phpcs.log --report-junit=${OUTPUT_PATH}/phpcs.xml || true -php ${TOOLS_PATH}/vendor/bin/rector --dry-run --config ${BUILD_PATH}/Config/rector.php process ${INSPECTION_PATH} > ${OUTPUT_PATH}/rector.log || true +php ${TOOLS_PATH}/vendor/bin/rector process --dry-run --config ${BUILD_PATH}/Config/rector.php ${INSPECTION_PATH} > ${OUTPUT_PATH}/rector.log || true diff --git a/Inspection/Php/tests.sh b/Inspection/Php/tests.sh index ef8a996..77971e2 100755 --- a/Inspection/Php/tests.sh +++ b/Inspection/Php/tests.sh @@ -6,7 +6,7 @@ echo "#################################################" echo "Start php unit tests inspection" echo "#################################################" -php -dpcov.enabled=1 -dxdebug.mode=coverage ${TOOLS_PATH}/vendor/bin/phpunit -v --configuration ${INSPECTION_PATH}/tests/phpunit_default.xml --log-junit ${OUTPUT_PATH}/junit_php.xml --testdox-html ${OUTPUT_PATH}/phpunit/index.html --coverage-html ${OUTPUT_PATH}/coverage --coverage-clover ${OUTPUT_PATH}/coverage.xml > ${OUTPUT_PATH}/phpunit.log || true +php -dpcov.enabled=1 -dxdebug.mode=coverage ${TOOLS_PATH}/vendor/bin/phpunit -v --configuration ${INSPECTION_PATH}/tests/phpunit_default.xml --log-junit ${OUTPUT_PATH}/junit_php.xml --testdox-html ${OUTPUT_PATH}/phpunit.html --coverage-html ${OUTPUT_PATH}/coverage --coverage-clover ${OUTPUT_PATH}/coverage.xml > ${OUTPUT_PATH}/phpunit.log || true echo "#################################################" echo "Start php static inspection" diff --git a/php.sh b/php.sh index 2fa8218..ff824a8 100644 --- a/php.sh +++ b/php.sh @@ -34,7 +34,7 @@ mkdir -p "${OUTPUT_PATH}/phpunit" mkdir -p "${OUTPUT_PATH}/metrics" if [[ ${BASE_NAME} == *"oms-"* ]]; then - git clone --recurse-submodules ${REPO_PATH} ${INSPECTION_PATH}/MainRepository + git clone --recurse-submodules https://github.com/Karaka-Management/Karaka.git ${INSPECTION_PATH}/MainRepository git -C ${INSPECTION_PATH}/MainRepository checkout develop git -C ${INSPECTION_PATH}/MainRepository pull git -C ${INSPECTION_PATH}/MainRepository submodule foreach 'git checkout develop || true'