build: future version pour SPIP 5.0+ (suite)

master
JamesRezo 9 months ago
parent c7d66d509d
commit 3cb9dfe253

@ -0,0 +1,18 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
[*]
indent_style = tab
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[composer.json]
indent_style = space
[CHANGELOG, *.md]
indent_size = 2

6
.gitattributes vendored

@ -0,0 +1,6 @@
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/phpcs.xml.dist export-ignore
/phpstan.neon.dist export-ignore
/phpstan-baseline.neon export-ignore

@ -5,11 +5,17 @@
## Added
- Fichier `README.md`
- Installable en tant que package Composer
## Changed
- Compatible SPIP 5.0.0-dev
- Compatible SPIP 4.2.0-dev
## Removed
- Drop support for PHP7.4 & PHP8.0
## Fixed
- #4619 correction d'une typo dans aide/fr/raccourcis/resume.spip
- #4619 correction d'une typo dans aide/fr/raccourcis/resume.spip

@ -1,18 +1,35 @@
{
"name": "spip/aide",
"description": "Aide en ligne de SPIP",
"license": "GPL-3.0-or-later",
"authors": [
{
"name": "Collectif SPIP",
"role": "Maintainer",
"homepage": "https://discuter.spip.net/c/spip-dev/5"
}
],
"require": {
"php": "^7.4 || ^8.0"
"php": "^8.1"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
"phpstan/phpstan": "^1.4",
"spip/coding-standards": "^1.2"
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
"phpstan/phpstan": "^1.10",
"spip/coding-standards": "^1.3",
"phpcompatibility/php-compatibility": "dev-develop",
"rector/rector": "^0.15.23"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
},
"platform": {
"php": "7.4.27"
"php": "8.1.17"
}
},
"extra": {
"branch-alias": {
"dev-master": "3.2.x-dev"
}
}
}

@ -66,7 +66,6 @@ function aide_index_alias_historiques(): array {
* @param string $aide
* clé d'identification du groupe d'aide souhaité. Peut indiquer une entrée spécifique.
* Tel que 'raccourcis' ou 'raccourcis/liens'
* @return string
* icone et lien…
* vide si on ne trouve pas le groupe d'aide demandé.
**/
@ -82,7 +81,7 @@ function inc_aide_dist($aide = ''): string {
$aide = $alias[$aide];
}
$aide = explode('/', $aide, 2);
$aide = explode('/', (string) $aide, 2);
$groupe = array_shift($aide);
$entree = $aide ? reset($aide) : '';
if (!isset($index[$groupe])) {
@ -209,8 +208,8 @@ function aide_langues($lang = null): array {
static $langues = [];
if (!isset($langues[$lang])) {
$_langues = [$lang];
if (strpos($lang, '_') !== false) {
$l = explode('_', $lang);
if (str_contains((string) $lang, '_')) {
$l = explode('_', (string) $lang);
while (count($l) > 1) {
array_pop($l);
$_langues[] = implode('_', $l);

@ -4,7 +4,7 @@
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>lang/*</exclude-pattern>
<rule ref="SPIP41"/>
<rule ref="SPIP50"/>
<config name="ignore_warnings_on_exit" value="1"/>
<arg name="cache" value=".php_cs.cache"/>

@ -0,0 +1,17 @@
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\LevelSetList;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
__DIR__ . '/inc',
__DIR__ . '/prive',
]);
$rectorConfig->sets([
LevelSetList::UP_TO_PHP_81
]);
};
Loading…
Cancel
Save