1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-18 06:38:43 +01:00

Merge pull request #6344 from marc1706/ticket/16936

[ticket/16936] Add psalm dependency and basic configuration file
This commit is contained in:
Marc Alexander 2022-01-06 10:50:14 +01:00 committed by GitHub
commit f8aa5fa34d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1096 additions and 2 deletions

43
build/psalm_bootstrap.php Normal file
View File

@ -0,0 +1,43 @@
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
define('IN_PHPBB', true);
define('PHPBB_ENVIRONMENT', 'test');
$phpbb_root_path = 'phpBB/';
$phpEx = 'php';
global $table_prefix;
require_once $phpbb_root_path . 'includes/startup.php';
$table_prefix = 'phpbb_';
require_once $phpbb_root_path . 'includes/constants.php';
require_once $phpbb_root_path . 'phpbb/class_loader.' . $phpEx;
require_once $phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx;
require_once $phpbb_root_path . 'includes/functions.' . $phpEx;
require_once $phpbb_root_path . 'includes/functions_acp.' . $phpEx;
require_once $phpbb_root_path . 'includes/functions_admin.' . $phpEx;
require_once $phpbb_root_path . 'includes/functions_compatibility.' . $phpEx;
require_once $phpbb_root_path . 'includes/functions_compress.' . $phpEx;
require_once $phpbb_root_path . 'includes/functions_content.' . $phpEx;
require_once $phpbb_root_path . 'includes/functions_display.' . $phpEx;
require_once $phpbb_root_path . 'includes/functions_mcp.' . $phpEx;
require_once $phpbb_root_path . 'includes/functions_messenger.' . $phpEx;
require_once $phpbb_root_path . 'includes/functions_module.' . $phpEx;
require_once $phpbb_root_path . 'includes/functions_posting.' . $phpEx;
require_once $phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx;
require_once $phpbb_root_path . 'includes/functions_transfer.' . $phpEx;
require_once $phpbb_root_path . 'includes/functions_user.' . $phpEx;
$phpbb_class_loader = new \phpbb\class_loader('phpbb\\', $phpbb_root_path . 'phpbb/', "php");
$phpbb_class_loader->register();

View File

@ -70,7 +70,9 @@
"squizlabs/php_codesniffer": "~3.4",
"symfony/browser-kit": "^5.4",
"symfony/css-selector": "^5.4",
"symfony/dom-crawler": "^5.4"
"symfony/dom-crawler": "^5.4",
"vimeo/psalm": "^4.14",
"psalm/plugin-symfony": "^3.1"
},
"extra": {
"branch-alias": {

1033
phpBB/composer.lock generated

File diff suppressed because it is too large Load Diff

18
psalm.xml Normal file
View File

@ -0,0 +1,18 @@
<?xml version="1.0"?>
<psalm
errorLevel="5"
phpVersion="7.3"
resolveFromConfigFile="true"
autoloader="build/psalm_bootstrap.php"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="phpBB/phpbb"/>
</projectFiles>
<issueHandlers>
<InvalidGlobal errorLevel="suppress" />
</issueHandlers>
</psalm>