Skip to content
Snippets Groups Projects
Unverified Commit f67a07c1 authored by Tim van Dijen's avatar Tim van Dijen Committed by GitHub
Browse files

Raise PHP functional level to 7.2 (#1201)

* Bump to PHP 7.2
parent a1e36040
Branches
Tags
No related merge requests found
build: false
shallow_clone: false
version: '1.19.0.{build}'
version: '2.0.0.{build}'
platform: 'x64'
clone_folder: C:\projects\simplesamlphp
environment:
matrix:
- PHP_VERSION: "7.0"
- PHP_VERSION: "7.1"
- PHP_VERSION: "7.2"
- PHP_VERSION: "7.3"
......
......@@ -15,10 +15,9 @@ stages:
################
php:
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4
env:
- COMMAND="composer install"
......@@ -33,13 +32,13 @@ script:
jobs:
fast_finish: true
allow_failures:
- php: 7.0
- php: 7.2
env: Psalm
- php: 7.0
- php: 7.2
env: Security check (composer install)
- php: 7.0
- php: 7.2
env: Security check (composer update)
- php: 7.0
- php: 7.2
env: PHP Codesniffer
include:
......@@ -49,7 +48,7 @@ jobs:
##########################
- stage: pre-conditions
php: 7.0
php: 7.2
env: Syntax check PHP
before_script:
- composer install
......@@ -57,7 +56,7 @@ jobs:
- vendor/bin/check-syntax-php.sh
- stage: pre-conditions
php: 7.1
php: 7.2
env: Syntax check PHP
before_script:
- composer install
......@@ -65,7 +64,7 @@ jobs:
- vendor/bin/check-syntax-php.sh
- stage: pre-conditions
php: 7.2
php: 7.3
env: Syntax check PHP
before_script:
- composer install
......@@ -73,7 +72,7 @@ jobs:
- vendor/bin/check-syntax-php.sh
- stage: pre-conditions
php: 7.3
php: 7.4
env: Syntax check PHP
before_script:
- composer install
......
......@@ -45,9 +45,8 @@ throws an exception in a specific situation:
$this->expectException(ExpectedException::class);
```
Refer to [the `phpunit 5.7` documentation](https://phpunit.de/manual/5.7/en/installation.html)
for more information on how to write tests. We currently use the `phpunit 5.7`
since it is the last version to support php 5.6.
Refer to [the `phpunit 8.5` documentation](https://phpunit.readthedocs.io/en/8.5/)
for more information on how to write tests.
Once you have implemented your tests, you can run them locally. First,
make sure the `config` directory is **not** in the root of your
......
......@@ -32,7 +32,7 @@
"files": ["tests/_autoload_modules.php"]
},
"require": {
"php": ">=7.0",
"php": ">=7.2",
"ext-SPL": "*",
"ext-zlib": "*",
"ext-pcre": "*",
......
......@@ -157,11 +157,11 @@ class Config
'descr' => [
Translate::noop('PHP %minimum% or newer is needed. You are running: %current%'),
[
'%minimum%' => '7.0',
'%minimum%' => '7.2',
'%current%' => explode('-', phpversion())[0]
]
],
'enabled' => version_compare(phpversion(), '7.0', '>=')
'enabled' => version_compare(phpversion(), '7.2', '>=')
]
];
$store = $this->config->getString('store.type', '');
......
......@@ -7,9 +7,6 @@ core-account-disco-clearchoices:
core-login:
path: /login/{as}
defaults: { _controller: 'SimpleSAML\Module\core\Controller\Login:login', as: null }
core-account:
path: /account/{as}
defaults: { _controller: 'SimpleSAML\Module\core\Controller\Login:account' }
core-logout:
path: /logout/{as}
defaults: { _controller: 'SimpleSAML\Module\core\Controller\Login:logout' }
......
......@@ -28,7 +28,7 @@ function core_hook_sanitycheck(&$hookinfo)
$hookinfo['info'][] = '[core] In config.php technicalcontact_email is set properly';
}
if (version_compare(phpversion(), '7.0', '>=')) {
if (version_compare(phpversion(), '7.2', '>=')) {
$hookinfo['info'][] = '[core] You are running a PHP version suitable for SimpleSAMLphp.';
} else {
$hookinfo['errors'][] = '[core] You are running an old PHP installation. ' .
......
......@@ -123,8 +123,8 @@ if (\SimpleSAML\Module::isModuleEnabled('radius')) {
$funcmatrix = [];
$funcmatrix[] = [
'required' => 'required',
'descr' => 'PHP Version >= 7.0. You run: ' . phpversion(),
'enabled' => version_compare(phpversion(), '7.0', '>=')
'descr' => 'PHP Version >= 7.2. You run: ' . phpversion(),
'enabled' => version_compare(phpversion(), '7.2', '>=')
];
foreach ($functionchecks as $func => $descr) {
$funcmatrix[] = ['descr' => $descr[1], 'required' => $descr[0], 'enabled' => function_exists($func)];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment