Merge branch 'require-php-56' into 'master'
Require at least PHP 5.6 See merge request framasoft/framadate!212
This commit is contained in:
commit
9827070b3d
@ -1,7 +1,7 @@
|
||||
# Pré-requis
|
||||
- Apache
|
||||
- MySQL ou PostgreSQL
|
||||
- PHP 5+
|
||||
- PHP 5.6+
|
||||
- [Composer](https://getcomposer.org/)
|
||||
|
||||
# Pré-installation
|
||||
@ -97,4 +97,4 @@ La base se compose de quatre tables :
|
||||
- `poll` : Le paramètrage des sondages;
|
||||
- `slot` : les choix disponibles pour chaque sondage;
|
||||
- `vote` : les votes effectués par les utilisateurs pour chaque sondage;
|
||||
- `comment` : les commentaires apportés à chaque sondage.
|
||||
- `comment` : les commentaires apportés à chaque sondage.
|
||||
|
@ -49,7 +49,6 @@ $ALLOWED_LANGUAGES = [
|
||||
];
|
||||
const DEFAULT_LANGUAGE = 'en';
|
||||
require_once ROOT_DIR . 'app/inc/i18n.php';
|
||||
require_once '../app/inc/php_version.php';
|
||||
|
||||
/**
|
||||
* Function to sort messages by type (priorise errors on warning, warning on info, etc.)
|
||||
@ -88,10 +87,10 @@ $conf_filename = $inc_directory . 'config.php';
|
||||
*/
|
||||
|
||||
// PHP Version
|
||||
if (PHP_VERSION_ID >= php_string_to_version_id(PHP_NEEDED_VERSION)) {
|
||||
$messages[] = new Message('info', __f('Check','PHP version %s is enough (needed at least PHP %s).',phpversion(), PHP_NEEDED_VERSION));
|
||||
if (version_compare(PHP_VERSION, PHP_NEEDED_VERSION)) {
|
||||
$messages[] = new Message('info', __f('Check','PHP version %s is enough (needed at least PHP %s).', PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION, PHP_NEEDED_VERSION));
|
||||
} else {
|
||||
$messages[] = new Message('danger', __f('Check','Your PHP version (%s) is too old. This application needs at least PHP %s.',phpversion(), PHP_NEEDED_VERSION));
|
||||
$messages[] = new Message('danger', __f('Check','Your PHP version (%s) is too old. This application needs at least PHP %s.', phpversion(), PHP_NEEDED_VERSION));
|
||||
}
|
||||
|
||||
// INTL extension
|
||||
|
@ -21,7 +21,7 @@
|
||||
const VERSION = '1.0';
|
||||
|
||||
// PHP Needed version
|
||||
const PHP_NEEDED_VERSION = '5.4.4';
|
||||
const PHP_NEEDED_VERSION = '5.6';
|
||||
|
||||
// Config constants
|
||||
const COMPILE_DIR = '/tpl_c/';
|
||||
|
@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
function php_version_id_to_string($versionId) {
|
||||
$major = substr($versionId, 0, 2);
|
||||
$minor = substr($versionId, 2, 2);
|
||||
$release = substr($versionId, 4, 2);
|
||||
return $major.'.'.$minor.'.'.$release;
|
||||
}
|
||||
function php_version_to_version_id($major, $minor, $release) {
|
||||
return ($major * 10000 +$minor * 100 + $release);
|
||||
}
|
||||
function php_string_to_version_id($version) {
|
||||
$version = explode('.', $version);
|
||||
return php_version_to_version_id($version[0], $version[1], $version[2]);
|
||||
}
|
||||
|
||||
|
||||
if (!defined('PHP_VERSION_ID')) {
|
||||
$version = explode('.',PHP_VERSION);
|
||||
define('PHP_VERSION_ID', php_version_to_version_id($version[0], $version[1], $version[2]));
|
||||
}
|
||||
if (PHP_VERSION_ID < 50207) { // This constants do not exists before 5.2.7
|
||||
define('PHP_MAJOR_VERSION', $version[0]);
|
||||
define('PHP_MINOR_VERSION', $version[1]);
|
||||
define('PHP_RELEASE_VERSION', $version[2]);
|
||||
}
|
||||
|
||||
?>
|
@ -1,15 +1,61 @@
|
||||
{
|
||||
"name": "framasoft/framadate",
|
||||
"description": "Application to facilitate the schedule of events or classic polls",
|
||||
"keywords": [
|
||||
"poll"
|
||||
],
|
||||
"homepage": "https://framadate.org/",
|
||||
"keywords": ["poll", "framadate"],
|
||||
"version": "0.9.0",
|
||||
"license": "CECILL-B",
|
||||
|
||||
"type": "project",
|
||||
"support": {
|
||||
"issues": "https://framagit.org/framasoft/framadate/issues"
|
||||
},
|
||||
"authors": [
|
||||
{
|
||||
"name": "Thomas CITHAREL",
|
||||
"email": "tcit@tcit.fr",
|
||||
"role": "Maintainer"
|
||||
},
|
||||
{
|
||||
"name": "JosephK",
|
||||
"email": "joseph@framasoft.org",
|
||||
"role": "Maintainer"
|
||||
},
|
||||
{
|
||||
"name": "Olivier PEREZ",
|
||||
"email": "olivier@olivierperez.fr",
|
||||
"role": "Former maintainer"
|
||||
},
|
||||
{
|
||||
"name": "Antonin MURTIN",
|
||||
"email": "antonin.murtin@gmail.com",
|
||||
"role": "Former developper"
|
||||
},
|
||||
{
|
||||
"name": "Simon LEBLANC",
|
||||
"role": "Former developper",
|
||||
"email": "contact@leblanc-simon.eu"
|
||||
},
|
||||
{
|
||||
"name": "Pierre-Yves GOSSET",
|
||||
"role": "Former developper",
|
||||
"email": "pyg@framasoft.org"
|
||||
},
|
||||
{
|
||||
"name": "Guilhem BORGHESI",
|
||||
"role": "Studs developper",
|
||||
"email": "borghesi@unistra.fr"
|
||||
},
|
||||
{
|
||||
"name": "Raphaël DROZ",
|
||||
"role": "Studs developper",
|
||||
"email": "raphael.droz@gmail.com"
|
||||
}
|
||||
],
|
||||
|
||||
"require": {
|
||||
"php": ">=5.6.0",
|
||||
"ext-pdo": "*",
|
||||
"smarty/smarty": "^3.1",
|
||||
"o80/i18n": "dev-develop",
|
||||
"phpmailer/phpmailer": "^5.2",
|
||||
@ -25,5 +71,11 @@
|
||||
"psr-4": {
|
||||
"Framadate\\": "app/classes/Framadate/"
|
||||
}
|
||||
},
|
||||
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "5.6.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
108
composer.lock
generated
108
composer.lock
generated
@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "049183d97fa9891b1fed52d2d2c650f6",
|
||||
"content-hash": "4c6d81bc7ff768fe3e4842cd9e671b21",
|
||||
"packages": [
|
||||
{
|
||||
"name": "ircmaxell/password-compat",
|
||||
@ -177,12 +177,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Roave/SecurityAdvisories.git",
|
||||
"reference": "5ebdd35b291cf9be4a425022872cb3aaf03192df"
|
||||
"reference": "94230db36bded9d164ffccabcb38c67eedd63595"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/5ebdd35b291cf9be4a425022872cb3aaf03192df",
|
||||
"reference": "5ebdd35b291cf9be4a425022872cb3aaf03192df",
|
||||
"url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/94230db36bded9d164ffccabcb38c67eedd63595",
|
||||
"reference": "94230db36bded9d164ffccabcb38c67eedd63595",
|
||||
"shasum": ""
|
||||
},
|
||||
"conflict": {
|
||||
@ -232,7 +232,7 @@
|
||||
"onelogin/php-saml": "<2.10.4",
|
||||
"oro/crm": ">=1.7,<1.7.4",
|
||||
"oro/platform": ">=1.7,<1.7.4",
|
||||
"padraic/file_get_contents": "<1.1.2",
|
||||
"padraic/humbug_get_contents": "<1.1.2",
|
||||
"phpmailer/phpmailer": ">=5,<5.2.24",
|
||||
"phpunit/phpunit": ">=4.8.19,<4.8.28|>=5.0.10,<5.6.3",
|
||||
"phpxmlrpc/extras": "<0.6.1",
|
||||
@ -267,16 +267,16 @@
|
||||
"symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4",
|
||||
"symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7",
|
||||
"thelia/backoffice-default-template": ">=2.1,<2.1.2",
|
||||
"thelia/thelia": ">=2.1,<2.1.2|>=2.1.0-beta1,<2.1.3",
|
||||
"thelia/thelia": ">=2.1.0-beta1,<2.1.3|>=2.1,<2.1.2",
|
||||
"twig/twig": "<1.20",
|
||||
"typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.22|>=8,<8.7.5",
|
||||
"typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.10|>=3.1,<3.1.7|>=3.2,<3.2.7|>=3.3,<3.3.5",
|
||||
"typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4",
|
||||
"willdurand/js-translation-bundle": "<2.1.1",
|
||||
"yiisoft/yii": ">=1.1.14,<1.1.15",
|
||||
"yiisoft/yii2": "<2.0.5",
|
||||
"yiisoft/yii2": "<2.0.14",
|
||||
"yiisoft/yii2-bootstrap": "<2.0.4",
|
||||
"yiisoft/yii2-dev": "<2.0.4",
|
||||
"yiisoft/yii2-dev": "<2.0.14",
|
||||
"yiisoft/yii2-gii": "<2.0.4",
|
||||
"yiisoft/yii2-jui": "<2.0.4",
|
||||
"zendframework/zend-cache": ">=2.4,<2.4.8|>=2.5,<2.5.3",
|
||||
@ -316,7 +316,7 @@
|
||||
}
|
||||
],
|
||||
"description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it",
|
||||
"time": "2018-02-13T10:17:11+00:00"
|
||||
"time": "2018-02-19T09:31:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "smarty/smarty",
|
||||
@ -375,32 +375,32 @@
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "doctrine/instantiator",
|
||||
"version": "1.1.0",
|
||||
"version": "1.0.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/instantiator.git",
|
||||
"reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda"
|
||||
"reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda",
|
||||
"reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda",
|
||||
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
|
||||
"reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1"
|
||||
"php": ">=5.3,<8.0-DEV"
|
||||
},
|
||||
"require-dev": {
|
||||
"athletic/athletic": "~0.1.8",
|
||||
"ext-pdo": "*",
|
||||
"ext-phar": "*",
|
||||
"phpunit/phpunit": "^6.2.3",
|
||||
"squizlabs/php_codesniffer": "^3.0.2"
|
||||
"phpunit/phpunit": "~4.0",
|
||||
"squizlabs/php_codesniffer": "~2.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.2.x-dev"
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@ -425,7 +425,7 @@
|
||||
"constructor",
|
||||
"instantiate"
|
||||
],
|
||||
"time": "2017-07-22T11:58:36+00:00"
|
||||
"time": "2015-06-14T21:17:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "myclabs/deep-copy",
|
||||
@ -528,35 +528,29 @@
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/reflection-docblock",
|
||||
"version": "4.3.0",
|
||||
"version": "3.3.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
|
||||
"reference": "94fd0001232e47129dd3504189fa1c7225010d08"
|
||||
"reference": "bf329f6c1aadea3299f08ee804682b7c45b326a2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08",
|
||||
"reference": "94fd0001232e47129dd3504189fa1c7225010d08",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bf329f6c1aadea3299f08ee804682b7c45b326a2",
|
||||
"reference": "bf329f6c1aadea3299f08ee804682b7c45b326a2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.0",
|
||||
"php": "^5.6 || ^7.0",
|
||||
"phpdocumentor/reflection-common": "^1.0.0",
|
||||
"phpdocumentor/type-resolver": "^0.4.0",
|
||||
"webmozart/assert": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/instantiator": "~1.0.5",
|
||||
"mockery/mockery": "^1.0",
|
||||
"phpunit/phpunit": "^6.4"
|
||||
"mockery/mockery": "^0.9.4",
|
||||
"phpunit/phpunit": "^4.4"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "4.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"phpDocumentor\\Reflection\\": [
|
||||
@ -575,7 +569,7 @@
|
||||
}
|
||||
],
|
||||
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
|
||||
"time": "2017-11-30T07:14:17+00:00"
|
||||
"time": "2017-11-10T14:09:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/type-resolver",
|
||||
@ -626,16 +620,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpspec/prophecy",
|
||||
"version": "1.7.4",
|
||||
"version": "1.7.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpspec/prophecy.git",
|
||||
"reference": "9f901e29c93dae4aa77c0bb161df4276f9c9a1be"
|
||||
"reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/9f901e29c93dae4aa77c0bb161df4276f9c9a1be",
|
||||
"reference": "9f901e29c93dae4aa77c0bb161df4276f9c9a1be",
|
||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/dfd6be44111a7c41c2e884a336cc4f461b3b2401",
|
||||
"reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -685,7 +679,7 @@
|
||||
"spy",
|
||||
"stub"
|
||||
],
|
||||
"time": "2018-02-11T18:49:29+00:00"
|
||||
"time": "2018-02-19T10:16:54+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
@ -889,29 +883,29 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-token-stream",
|
||||
"version": "2.0.2",
|
||||
"version": "1.4.12",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
|
||||
"reference": "791198a2c6254db10131eecfe8c06670700904db"
|
||||
"reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db",
|
||||
"reference": "791198a2c6254db10131eecfe8c06670700904db",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16",
|
||||
"reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-tokenizer": "*",
|
||||
"php": "^7.0"
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^6.2.4"
|
||||
"phpunit/phpunit": "~4.2"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0-dev"
|
||||
"dev-master": "1.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@ -934,7 +928,7 @@
|
||||
"keywords": [
|
||||
"tokenizer"
|
||||
],
|
||||
"time": "2017-11-27T05:48:46+00:00"
|
||||
"time": "2017-12-04T08:55:13+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
@ -1592,20 +1586,20 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
"version": "v4.0.4",
|
||||
"version": "v3.4.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/yaml.git",
|
||||
"reference": "ffc60bda1d4a00ec0b32eeabf39dc017bf480028"
|
||||
"reference": "eab73b6c21d27ae4cd037c417618dfd4befb0bfe"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/ffc60bda1d4a00ec0b32eeabf39dc017bf480028",
|
||||
"reference": "ffc60bda1d4a00ec0b32eeabf39dc017bf480028",
|
||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/eab73b6c21d27ae4cd037c417618dfd4befb0bfe",
|
||||
"reference": "eab73b6c21d27ae4cd037c417618dfd4befb0bfe",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1.3"
|
||||
"php": "^5.5.9|>=7.0.8"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/console": "<3.4"
|
||||
@ -1619,7 +1613,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "4.0-dev"
|
||||
"dev-master": "3.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@ -1646,7 +1640,7 @@
|
||||
],
|
||||
"description": "Symfony Yaml Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2018-01-21T19:06:11+00:00"
|
||||
"time": "2018-01-21T19:05:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "webmozart/assert",
|
||||
@ -1708,6 +1702,12 @@
|
||||
},
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": [],
|
||||
"platform-dev": []
|
||||
"platform": {
|
||||
"php": ">=5.6.0",
|
||||
"ext-pdo": "*"
|
||||
},
|
||||
"platform-dev": [],
|
||||
"platform-overrides": {
|
||||
"php": "5.6.0"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user