Skip to content
Snippets Groups Projects
Commit 1eb58c14 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

use php 7.4 as minimum version and adjust system accordingly, fixes #3123

Closes #3123

Merge request studip/studip!2110
parent 4a297701
No related branches found
No related tags found
No related merge requests found
image: studip/studip:tests-php7.2
image: studip/studip:tests-php8.2
variables:
FF_NETWORK_PER_BUILD: 1
......@@ -110,6 +110,36 @@ lint-php:
reports:
codequality: $PHPLINT_CODE_QUALITY_REPORT
lint-php-7.4:
image: studip/studip:tests-php8.2
stage: checks
needs: [build-composer]
variables:
CACHE_LOCATION: $CACHE_DIR/phplint-cache
PHPLINT_JSON_REPORT: $REPORT_DIR/phplint-report-7.4.json
PHPLINT_CODE_QUALITY_REPORT: $REPORT_DIR/phplint-codequality-7.4.json
interruptible: true
cache:
- *composer-cache
- key: "$CI_JOB_NAME_SLUG:$CI_COMMIT_REF_SLUG"
paths:
- $CACHE_LOCATION
before_script:
- *mkdir-caches
- *mkdir-reports
- *install-composer
script:
- COMPOSER_MEMORY_LIMIT=-1
composer exec phplint
--
--json $PHPLINT_JSON_REPORT
--cache=$CACHE_LOCATION
after_script:
- ./.gitlab/scripts/convert-phplint-report $PHPLINT_JSON_REPORT > $PHPLINT_CODE_QUALITY_REPORT
artifacts:
reports:
codequality: $PHPLINT_CODE_QUALITY_REPORT
lint-js:
stage: checks
needs: []
......@@ -229,6 +259,7 @@ test-unit:
test-jest:
stage: test
needs: [lint-js]
image: $NODE_IMAGE
variables:
JS_TEST_REPORT: $REPORT_DIR/jest.xml
cache: *npm-cache
......
......@@ -2,7 +2,7 @@ Die Installation von Stud.IP ist halb so schlimm:
es müssen lediglich ein paar Dateien kopiert werden und ein paar
Programme laufen ;-)
Vorausgesetzt wird ein Webserver wie Apache2 oder nginx mit PHP-7.2 Modulen und
Vorausgesetzt wird ein Webserver wie Apache2 oder nginx mit PHP-7.4 Modulen und
eine MySQL 5.7.6 Datenbank.
Was genau zu tun ist, steht in
......
......@@ -4,7 +4,7 @@
"config": {
"vendor-dir": "composer",
"platform": {
"php": "7.2.5"
"php": "7.4"
}
},
"require-dev": {
......@@ -55,8 +55,6 @@
"league/oauth2-server": "^8.3",
"willdurand/negotiation": "^3.1",
"monolog/monolog": "^2.8",
"symfony/polyfill-php73": "^1.27",
"symfony/polyfill-php74": "^1.27",
"symfony/polyfill-php80": "^1.27",
"symfony/polyfill-php81": "^1.27",
"phpowermove/docblock": "^2.0",
......@@ -72,6 +70,8 @@
"symfony/polyfill-php70": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php72": "*",
"symfony/polyfill-php73": "*",
"symfony/polyfill-php74": "*",
"symfony/polyfill-mbstring": "*"
}
}
This diff is collapsed.
<?php
return [
'php' => [
'version' => '7.2',
'version' => '7.4',
'modules' => [
'PDO' => true,
'pdo_mysql' => true,
......
......@@ -9,9 +9,9 @@ build_image () {
fi
}
build_image tests/php72 studip:tests-php7.2 &
build_image tests/php74 studip:tests &
build_image tests/php82 studip:tests-php8.2 &
build_image tests/php74 studip:tests-php7.4 &
build_image release-cli release-cli &
wait
echo "Images built"
\ No newline at end of file
echo "Images built"
# Setup php, apache and stud.ip
FROM php:7.2-cli
FROM php:8.2-cli
# Install system requirements
RUN apt update && apt install -y --no-install-recommends \
......@@ -10,9 +10,8 @@ RUN apt update && apt install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
# Install php extensions
RUN docker-php-ext-configure gd --with-png-dir=/usr/include/ \
--with-jpeg-dir=/usr/include/
RUN docker-php-ext-install pdo gettext curl gd mbstring zip pdo pdo_mysql mysqli intl json
RUN docker-php-ext-configure gd --with-jpeg=/usr/include/
RUN docker-php-ext-install -j$(nproc) pdo gettext curl gd mbstring zip pdo pdo_mysql mysqli intl
# Install npm using nvm
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
......
parameters:
level: 0
phpVersion: 70200 # PHP 7.2
phpVersion: 70400 # PHP 7.4
paths:
- app/controllers
- app/routes
......
......@@ -11,10 +11,15 @@ class BlubberThreadsShowTest extends \Codeception\Test\Unit
*/
protected $tester;
protected $csrf_storage = [];
protected function _before()
{
\DBManager::getInstance()->setConnection('studip', $this->getModule('\\Helper\\StudipDb')->dbh);
CSRFProtection::setStorage($this->csrf_storage);
// Create global template factory if neccessary
$has_template_factory = isset($GLOBALS['template_factory']);
if (!$has_template_factory) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment