Commit 08352358 authored by Johan Cwiklinski's avatar Johan Cwiklinski

Merge branch '9.5/bugfixes'

parents 590cc34a e20e3958
......@@ -192,6 +192,13 @@ jobs:
executor: php_7_4
steps:
- build
- run:
name: "Check for missing dependencies / bad symbols"
# Alpine linux (used in GithubActions) does not implement GLOB_BRACE.
# We have to define it to 0 to prevent "Warning: Use of undefined constant GLOB_BRACE - assumed 'GLOB_BRACE'" error.
# This is not a problem as long as we do not use braces in "scan-files" section of the config file.
command: |
php -d memory_limit=1G -r 'define("GLOB_BRACE", 0); include "./vendor/maglnet/composer-require-checker/bin/composer-require-checker.php";' check --config-file=.composer-require-checker.config.json
- run:
name: PHP CS
command: |
......
{
"php-core-extensions": [
"core", "standard",
"ctype", "date", "fileinfo", "filter", "iconv", "json", "pcre", "reflection", "session", "simplexml", "spl", "xml",
"curl", "gd", "intl", "mbstring", "mysqli", "zlib",
"apcu", "exif", "ldap", "pcntl", "sodium", "xmlrpc"
],
"symbol-whitelist": [
"// PHP symbols",
"null",
"false", "true",
"static", "self", "parent",
"array", "bool", "callable", "float", "int", "iterable", "object", "string", "void",
"// GLPI config classes",
"DB", "DBSlave",
"// GLPI base constants (they are not detected as they are dynamically declared)",
"GLPI_AJAX_DASHBOARD", "GLPI_CALDAV_IMPORT_STATE", "GLPI_CACHE_DIR", "GLPI_CRON_DIR", "GLPI_CSRF_EXPIRES", "GLPI_CSRF_MAX_TOKENS", "GLPI_DEMO_MODE", "GLPI_DOC_DIR", "GLPI_DUMP_DIR", "GLPI_FORCE_EMPTY_SQL_MODE", "GLPI_GRAPH_DIR", "GLPI_INSTALL_MODE", "GLPI_LOCAL_I18N_DIR", "GLPI_LOCK_DIR", "GLPI_LOG_DIR", "GLPI_MARKETPLACE_DIR", "GLPI_MARKETPLACE_PLUGINS_API_URI", "GLPI_MARKETPLACE_PRERELEASES", "GLPI_NETWORK_REGISTRATION_API_URL", "GLPI_NETWORK_MAIL", "GLPI_NETWORK_SERVICES", "GLPI_PICTURE_DIR", "GLPI_PLUGIN_DOC_DIR", "GLPI_RSS_DIR", "GLPI_SESSION_DIR", "GLPI_TELEMETRY_URI", "GLPI_TMP_DIR", "GLPI_UPLOAD_DIR", "GLPI_USE_CSRF_CHECK", "GLPI_USER_AGENT_EXTRA_COMMENTS",
"// GLPI optionnal constants",
"GLPI_FORCE_MAIL", "GLPI_LOG_LVL",
"// GLPI test suite specific functions",
"GLPI_SQL_DEBUG",
"GlpitestPHPerror", "GlpitestPHPnotice", "GlpitestPHPwarning", "GlpitestSQLError",
"// apache function",
"getallheaders",
"// OPCache extension (not installed on testing env)",
"opcache_get_status", "opcache_invalidate", "opcache_reset",
"// SELinux PECL extension",
"selinux_getenforce", "selinux_get_boolean_active", "selinux_is_enabled",
"// XHProf PECL extension",
"XHProfRuns_Default", "xhprof_disable", "xhprof_enable", "XHPROF_PATH", "XHPROF_URL",
"// phpCAS library",
"CAS_VERSION_2_0", "phpCAS"
],
"scan-files": [
"ajax/**/*.php",
"bin/console",
"front/**/*.php",
"inc/**/*.php",
"install/**/*.php",
"/*.php"
]
}
......@@ -46,6 +46,12 @@ jobs:
- name: "PHP Parallel Lint"
run: |
docker exec ${{ job.services.app.id }} vendor/bin/parallel-lint --exclude ./files/ --exclude ./plugins/ --exclude ./tools/vendor/ --exclude ./vendor/ .
- name: "Check for missing dependencies / bad symbols"
# Alpine linux does not implement GLOB_BRACE.
# We have to define it to 0 to prevent "Warning: Use of undefined constant GLOB_BRACE - assumed 'GLOB_BRACE'" error.
# This is not a problem as long as we do not use braces in "scan-files" section of the config file.
run: |
docker exec ${{ job.services.app.id }} php -d memory_limit=1G -r 'define("GLOB_BRACE", 0); include "./vendor/maglnet/composer-require-checker/bin/composer-require-checker.php";' check --config-file=.composer-require-checker.config.json
- name: "PHP CS"
run: |
docker exec ${{ job.services.app.id }} vendor/bin/phpcs -d memory_limit=512M -p --extensions=php --standard=vendor/glpi-project/coding-standard/GlpiStandard/ --ignore="/.git/,^/var/glpi/(config|files|lib|marketplace|node_modules|plugins|tests/config|vendor)/" ./
......
This diff is collapsed.
......@@ -2087,6 +2087,8 @@ class Config extends CommonDBTM {
'check' => 'Mexitek\\PHPColors\\Color' ],
[ 'name' => 'guzzlehttp/guzzle',
'check' => 'GuzzleHttp\\Client' ],
[ 'name' => 'guzzlehttp/psr7',
'check' => 'GuzzleHttp\\Psr7\\Response' ],
[ 'name' => 'wapmorgan/unified-archive',
'check' => 'wapmorgan\\UnifiedArchive\\UnifiedArchive' ],
[ 'name' => 'paragonie/sodium_compat',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment