2024-02-26 23:10:16 +01:00
|
|
|
<?php
|
2025-02-05 00:54:54 +01:00
|
|
|
/* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
2024-03-11 22:20:29 +01:00
|
|
|
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
|
|
|
|
*/
|
Qual: Enable detection of deprecated modulename & GETPOST(...,'int') (#28457)
* Qual: Enable detection of deprecated modulename & GETPOST(...,'int')
# Qual: Enable detection of deprecated modulename & GETPOST(...,'int')
Enable phan rules to verify deprecated modulename usage and GETPOST(...,'int')
usage in the code.
* Qual: Try type hint on to help avoid notification
* Qual: Accept 3 parameters for GETPOST to GETPOSTINT conversion
* Qual: Convert GETPOST(...,'int',VALUE) to GETPOSTINT(...,VALUE)
# Qual: Convert GETPOST(...,'int',VALUE) to GETPOSTINT(...,VALUE)
Following the update to the fixer to also convert GETPOST... with 3 parameters.
The files are now converted.
2024-02-28 23:25:16 +01:00
|
|
|
|
2024-03-26 00:57:32 +01:00
|
|
|
|
|
|
|
|
// Load default configuration (with many exclusions)
|
|
|
|
|
//
|
|
|
|
|
$config = include __DIR__.DIRECTORY_SEPARATOR."config.php";
|
|
|
|
|
|
2024-03-08 21:34:18 +01:00
|
|
|
|
2025-02-05 00:54:54 +01:00
|
|
|
// Note: When more than one fixer is attached to the same Notice, only the last fix is applied.
|
2024-03-08 12:18:22 +01:00
|
|
|
//require_once __DIR__.'/plugins/DeprecatedModuleNameFixer.php';
|
|
|
|
|
//require_once __DIR__.'/plugins/PriceFormFixer.php';
|
2024-03-08 21:34:18 +01:00
|
|
|
//require_once __DIR__.'/plugins/UrlEncodeStringifyFixer.php';
|
2025-02-05 00:54:54 +01:00
|
|
|
//require_once __DIR__.'/plugins/SelectDateFixer.php';
|
2025-02-08 01:49:29 +01:00
|
|
|
//require_once __DIR__.'/plugins/setPageOrientationFixer.php';
|
2025-02-08 19:51:31 +01:00
|
|
|
//require_once __DIR__.'/plugins/textwithpictoFixer.php';
|
|
|
|
|
require_once __DIR__.'/plugins/ifsqlFixer.php';
|
2025-02-05 00:54:54 +01:00
|
|
|
//require_once __DIR__.'/plugins/MultiCellFixer.php';
|
|
|
|
|
//require_once __DIR__.'/plugins/setAutoPageBreakFixer.php';
|
|
|
|
|
//require_once __DIR__.'/plugins/CellFixer.php';
|
Qual: Enable detection of deprecated modulename & GETPOST(...,'int') (#28457)
* Qual: Enable detection of deprecated modulename & GETPOST(...,'int')
# Qual: Enable detection of deprecated modulename & GETPOST(...,'int')
Enable phan rules to verify deprecated modulename usage and GETPOST(...,'int')
usage in the code.
* Qual: Try type hint on to help avoid notification
* Qual: Accept 3 parameters for GETPOST to GETPOSTINT conversion
* Qual: Convert GETPOST(...,'int',VALUE) to GETPOSTINT(...,VALUE)
# Qual: Convert GETPOST(...,'int',VALUE) to GETPOSTINT(...,VALUE)
Following the update to the fixer to also convert GETPOST... with 3 parameters.
The files are now converted.
2024-02-28 23:25:16 +01:00
|
|
|
|
2024-03-26 00:57:32 +01:00
|
|
|
//$deprecatedModuleNameRegex = '/^(?!(?:'.implode('|', array_keys($DEPRECATED_MODULE_MAPPING)).')$).*/';
|
2024-02-27 14:08:07 +01:00
|
|
|
|
2025-02-05 00:54:54 +01:00
|
|
|
//require_once __DIR__.'/plugins/DeprecatedModuleNameFixer.php';
|
2024-02-27 14:08:07 +01:00
|
|
|
|
2024-03-26 00:57:32 +01:00
|
|
|
$config['exclude_file_regex'] = '@^(' // @phpstan-ignore-line
|
2024-02-26 23:10:16 +01:00
|
|
|
.'dummy' // @phpstan-ignore-line
|
2025-02-05 00:54:54 +01:00
|
|
|
//.'|(?!htdocs/modulebuilderrtemplate/core/modules/mymodule/doc/pdf_standard_myobject.modules.php).*' // Only this file for test @php-stan-ignore-line
|
|
|
|
|
.'|htdocs/custom/.*' // Ignore all custom modules @phpstan-ignore-line
|
2024-02-26 23:10:16 +01:00
|
|
|
.'|htdocs/.*/canvas/.*/tpl/.*.tpl.php' // @phpstan-ignore-line
|
2024-11-14 00:03:31 +01:00
|
|
|
.'|htdocs/admin/tools/ui/.*' // @phpstan-ignore-line
|
|
|
|
|
//.'|htdocs/modulebuilder/template/.*' // @phpstan-ignore-line
|
2025-02-05 00:54:54 +01:00
|
|
|
// Included as stub (better analysis)
|
|
|
|
|
.'|htdocs/includes/nusoap/.*' // @phpstan-ignore-line
|
2024-02-26 23:10:16 +01:00
|
|
|
// Included as stub (old version + incompatible typing hints)
|
|
|
|
|
.'|htdocs/includes/restler/.*' // @phpstan-ignore-line
|
2025-02-05 00:54:54 +01:00
|
|
|
// Included as stub (did not seem properly analyzed by phan without it)
|
2024-02-26 23:10:16 +01:00
|
|
|
.'|htdocs/includes/stripe/.*' // @phpstan-ignore-line
|
2024-03-11 12:55:44 +01:00
|
|
|
.'|htdocs/conf/conf.php' // @phpstan-ignore-line
|
2025-02-05 00:54:54 +01:00
|
|
|
//.'|htdocs/[^mi](?!.*(pdf_|tcpdf)).*\.php' // @phpstan-ignore-line
|
|
|
|
|
//.'|htdocs/(?!.*modules.*(pdf_|pdf.lib)).*\.php' // @phpstan-ignore-line
|
2024-03-26 00:57:32 +01:00
|
|
|
.')@'; // @phpstan-ignore-line
|
2024-02-26 23:10:16 +01:00
|
|
|
|
2024-03-26 00:57:32 +01:00
|
|
|
// $config['plugins'][] = __DIR__.'/plugins/ParamMatchRegexPlugin.php';
|
2025-02-05 00:54:54 +01:00
|
|
|
$config['plugins'] = [];
|
2024-03-26 00:57:32 +01:00
|
|
|
$config['plugins'][] = 'DeprecateAliasPlugin';
|
|
|
|
|
// $config['plugins'][] = __DIR__.'/plugins/GetPostFixerPlugin.php';
|
|
|
|
|
// $config['plugins'][] = 'PHPDocToRealTypesPlugin';
|
2024-02-26 23:10:16 +01:00
|
|
|
|
2024-03-26 00:57:32 +01:00
|
|
|
return $config;
|