1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-06 14:35:56 +02:00

Merge branch '3.3.x'

This commit is contained in:
Marc Alexander 2020-09-08 20:41:52 +02:00
commit 17c4fe6f9e
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995
24 changed files with 331 additions and 472 deletions

View File

@ -47,7 +47,7 @@ before_script:
script:
- travis/phing-sniff.sh $DB $TRAVIS_PHP_VERSION $NOTESTS
- travis/check-sami-parse-errors.sh $DB $TRAVIS_PHP_VERSION $NOTESTS
- travis/check-doctum-parse-errors.sh $DB $TRAVIS_PHP_VERSION $NOTESTS
- travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION $NOTESTS
- travis/check-executable-files.sh $DB $TRAVIS_PHP_VERSION $NOTESTS ./
- travis/check-stylesheet.sh $NOTESTS

View File

@ -128,13 +128,13 @@
<!-- Builds docs for current branch into build/api/output/master -->
<target name="docs">
<exec dir="."
command="phpBB/vendor/bin/sami.php update build/sami-checkout.conf.php"
command="php doctum.phar update build/doctum-checkout.conf.php"
passthru="true" />
</target>
<!-- Builds docs for multiple branches/tags into build/api/output/$branch -->
<target name="docs-all">
<exec dir="."
command="phpBB/vendor/bin/sami.php update build/sami-all.conf.php"
command="php doctum.phar update build/doctum-all.conf.php"
passthru="true" />
</target>

View File

@ -11,9 +11,9 @@
*
*/
require __DIR__ . '/sami-checkout.conf.php';
require __DIR__ . '/doctum-checkout.conf.php';
$config['versions'] = Sami\Version\GitVersionCollection::create(__DIR__ . '/../')
$config['versions'] = Doctum\Version\GitVersionCollection::create(__DIR__ . '/../')
/*
This would be nice, but currently causes various problems that need
debugging.
@ -30,4 +30,4 @@ $config['versions'] = Sami\Version\GitVersionCollection::create(__DIR__ . '/../'
->add('master')
;
return new Sami\Sami($iterator, $config);
return new Doctum\Doctum($iterator, $config);

View File

@ -0,0 +1,31 @@
<?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.
*
*/
$iterator = Symfony\Component\Finder\Finder::create()
->files()
->name('*.php')
->in(__DIR__ . '/../phpBB/')
->notPath('#^cache/#')
->notPath('#^develop/#')
->notPath('#^ext/#')
->notPath('#^vendor/#')
->notPath('data');
// This variable will be used and changed in doctum-all.conf.php
$config = [
'title' => 'phpBB API Documentation',
'build_dir' => __DIR__ . '/api/output/%version%',
'cache_dir' => __DIR__ . '/api/cache/%version%',
];
return new Doctum\Doctum($iterator, $config);

View File

@ -1,44 +0,0 @@
<?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.
*
*/
// Prevent 'Class "acm" does not exist.' exception on removeClass().
class PhpbbArrayStore extends Sami\Store\ArrayStore
{
public function removeClass(Sami\Project $project, $name)
{
unset($this->classes[$name]);
}
}
$iterator = Symfony\Component\Finder\Finder::create()
->files()
->name('*.php')
->in(__DIR__ . '/../phpBB/')
->notPath('#^cache/#')
->notPath('#^develop/#')
->notPath('#^ext/#')
->notPath('#^vendor/#')
->notPath('data')
;
$config = array(
'theme' => 'default',
'title' => 'phpBB API Documentation',
'build_dir' => __DIR__.'/api/output/%version%',
'cache_dir' => __DIR__.'/api/cache/%version%',
'default_opened_level' => 2,
// Do not use JsonStore. See https://github.com/fabpot/Sami/issues/79
'store' => new PhpbbArrayStore,
);
return new Sami\Sami($iterator, $config);

BIN
doctum.phar Normal file

Binary file not shown.

View File

@ -61,8 +61,7 @@
"squizlabs/php_codesniffer": "~3.4",
"symfony/browser-kit": "~3.4",
"symfony/css-selector": "~3.4",
"symfony/dom-crawler": "~3.4",
"sami/sami": "^4.1"
"symfony/dom-crawler": "~3.4"
},
"extra": {
"branch-alias": {

484
phpBB/composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "0090dbf57acf8d5b9b224bff16a089ff",
"content-hash": "f148f91ac8c8783a2fe4250ff31886ff",
"packages": [
{
"name": "bantu/ini-get-wrapper",
@ -38,16 +38,16 @@
},
{
"name": "composer/ca-bundle",
"version": "1.2.7",
"version": "1.2.8",
"source": {
"type": "git",
"url": "https://github.com/composer/ca-bundle.git",
"reference": "95c63ab2117a72f48f5a55da9740a3273d45b7fd"
"reference": "8a7ecad675253e4654ea05505233285377405215"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/95c63ab2117a72f48f5a55da9740a3273d45b7fd",
"reference": "95c63ab2117a72f48f5a55da9740a3273d45b7fd",
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/8a7ecad675253e4654ea05505233285377405215",
"reference": "8a7ecad675253e4654ea05505233285377405215",
"shasum": ""
},
"require": {
@ -95,12 +95,16 @@
"url": "https://packagist.com",
"type": "custom"
},
{
"url": "https://github.com/composer",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
"type": "tidelift"
}
],
"time": "2020-04-08T08:27:21+00:00"
"time": "2020-08-23T12:54:47+00:00"
},
{
"name": "composer/composer",
@ -862,7 +866,7 @@
"oauth",
"security"
],
"time": "2018-02-14T22:37:14+00:00"
"time": "2016-07-12T22:15:00+00:00"
},
{
"name": "marc1706/fast-image-size",
@ -3357,72 +3361,6 @@
}
],
"packages-dev": [
{
"name": "blackfire/php-sdk",
"version": "v1.23.0",
"source": {
"type": "git",
"url": "https://github.com/blackfireio/php-sdk.git",
"reference": "c11e9546182fcd8c2f3b1d5a4b867da062264355"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/blackfireio/php-sdk/zipball/c11e9546182fcd8c2f3b1d5a4b867da062264355",
"reference": "c11e9546182fcd8c2f3b1d5a4b867da062264355",
"shasum": ""
},
"require": {
"composer/ca-bundle": "^1.0",
"php": ">=5.2.0"
},
"require-dev": {
"guzzlehttp/psr7": "^1.6",
"psr/http-message": "^1.0",
"symfony/http-client": "^4.3"
},
"suggest": {
"ext-blackfire": "The C version of the Blackfire probe",
"ext-zlib": "To push config to remote profiling targets"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.5.x-dev"
}
},
"autoload": {
"files": [
"src/autostart.php"
],
"psr-4": {
"Blackfire\\": "src/Blackfire"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Blackfire.io",
"email": "support@blackfire.io"
}
],
"description": "Blackfire.io PHP SDK",
"keywords": [
"performance",
"profiler",
"uprofiler",
"xhprof"
],
"funding": [
{
"url": "https://blackfire.io/",
"type": "custom"
}
],
"time": "2020-05-29T11:19:11+00:00"
},
{
"name": "doctrine/instantiator",
"version": "1.3.1",
@ -3599,55 +3537,6 @@
"description": "A virtual machine for web artisans.",
"time": "2018-12-11T02:04:35+00:00"
},
{
"name": "michelf/php-markdown",
"version": "1.9.0",
"source": {
"type": "git",
"url": "https://github.com/michelf/php-markdown.git",
"reference": "c83178d49e372ca967d1a8c77ae4e051b3a3c75c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/michelf/php-markdown/zipball/c83178d49e372ca967d1a8c77ae4e051b3a3c75c",
"reference": "c83178d49e372ca967d1a8c77ae4e051b3a3c75c",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": ">=4.3 <5.8"
},
"type": "library",
"autoload": {
"psr-4": {
"Michelf\\": "Michelf/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Michel Fortin",
"email": "michel.fortin@michelf.ca",
"homepage": "https://michelf.ca/",
"role": "Developer"
},
{
"name": "John Gruber",
"homepage": "https://daringfireball.net/"
}
],
"description": "PHP Markdown",
"homepage": "https://michelf.ca/projects/php-markdown/",
"keywords": [
"markdown"
],
"time": "2019-12-02T02:32:27+00:00"
},
{
"name": "myclabs/deep-copy",
"version": "1.9.5",
@ -3696,57 +3585,6 @@
],
"time": "2020-01-17T21:11:47+00:00"
},
{
"name": "nikic/php-parser",
"version": "v3.1.5",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "bb87e28e7d7b8d9a7fda231d37457c9210faf6ce"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/bb87e28e7d7b8d9a7fda231d37457c9210faf6ce",
"reference": "bb87e28e7d7b8d9a7fda231d37457c9210faf6ce",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
"php": ">=5.5"
},
"require-dev": {
"phpunit/phpunit": "~4.0|~5.0"
},
"bin": [
"bin/php-parse"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
}
},
"autoload": {
"psr-4": {
"PhpParser\\": "lib/PhpParser"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Nikita Popov"
}
],
"description": "A PHP parser written in PHP",
"keywords": [
"parser",
"php"
],
"time": "2018-02-28T20:30:58+00:00"
},
{
"name": "phar-io/manifest",
"version": "1.0.3",
@ -3943,38 +3781,89 @@
"time": "2020-02-03T18:50:54+00:00"
},
{
"name": "phpdocumentor/reflection-docblock",
"version": "2.0.5",
"name": "phpdocumentor/reflection-common",
"version": "2.1.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b"
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
"reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/e6a969a640b00d8daa3c66518b0405fb41ae0c4b",
"reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b",
"reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
},
"suggest": {
"dflydev/markdown": "~1.0",
"erusev/parsedown": "~1.0"
"php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
"dev-master": "2.x-dev"
}
},
"autoload": {
"psr-0": {
"phpDocumentor": [
"psr-4": {
"phpDocumentor\\Reflection\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jaap van Otterdijk",
"email": "opensource@ijaap.nl"
}
],
"description": "Common reflection classes used by phpdocumentor to reflect the code structure",
"homepage": "http://www.phpdoc.org",
"keywords": [
"FQSEN",
"phpDocumentor",
"phpdoc",
"reflection",
"static analysis"
],
"time": "2020-04-27T09:25:28+00:00"
},
{
"name": "phpdocumentor/reflection-docblock",
"version": "4.3.4",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/da3fd972d6bafd628114f7e7e036f45944b62e9c",
"reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c",
"shasum": ""
},
"require": {
"php": "^7.0",
"phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0",
"phpdocumentor/type-resolver": "~0.4 || ^1.0.0",
"webmozart/assert": "^1.0"
},
"require-dev": {
"doctrine/instantiator": "^1.0.5",
"mockery/mockery": "^1.0",
"phpdocumentor/type-resolver": "0.4.*",
"phpunit/phpunit": "^6.4"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.x-dev"
}
},
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": [
"src/"
]
}
@ -3986,10 +3875,58 @@
"authors": [
{
"name": "Mike van Riel",
"email": "mike.vanriel@naenius.com"
"email": "me@mikevanriel.com"
}
],
"time": "2016-01-25T08:17:30+00:00"
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"time": "2019-12-28T18:55:12+00:00"
},
{
"name": "phpdocumentor/type-resolver",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9",
"reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9",
"shasum": ""
},
"require": {
"php": "^7.1",
"phpdocumentor/reflection-common": "^2.0"
},
"require-dev": {
"ext-tokenizer": "^7.1",
"mockery/mockery": "~1",
"phpunit/phpunit": "^7.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mike van Riel",
"email": "me@mikevanriel.com"
}
],
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"time": "2019-08-22T18:11:29+00:00"
},
{
"name": "phpspec/prophecy",
@ -4357,6 +4294,7 @@
"keywords": [
"tokenizer"
],
"abandoned": true,
"time": "2019-09-17T06:23:10+00:00"
},
{
@ -4443,119 +4381,6 @@
],
"time": "2020-01-08T08:45:45+00:00"
},
{
"name": "pimple/pimple",
"version": "v3.2.3",
"source": {
"type": "git",
"url": "https://github.com/silexphp/Pimple.git",
"reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/silexphp/Pimple/zipball/9e403941ef9d65d20cba7d54e29fe906db42cf32",
"reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32",
"shasum": ""
},
"require": {
"php": ">=5.3.0",
"psr/container": "^1.0"
},
"require-dev": {
"symfony/phpunit-bridge": "^3.2"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2.x-dev"
}
},
"autoload": {
"psr-0": {
"Pimple": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
}
],
"description": "Pimple, a simple Dependency Injection Container",
"homepage": "http://pimple.sensiolabs.org",
"keywords": [
"container",
"dependency injection"
],
"time": "2018-01-21T07:42:36+00:00"
},
{
"name": "sami/sami",
"version": "v4.1.2",
"source": {
"type": "git",
"url": "https://github.com/FriendsOfPHP/Sami.git",
"reference": "19b8a82b858bd31544c468317c8307188ccb4022"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/FriendsOfPHP/Sami/zipball/19b8a82b858bd31544c468317c8307188ccb4022",
"reference": "19b8a82b858bd31544c468317c8307188ccb4022",
"shasum": ""
},
"require": {
"blackfire/php-sdk": "^1.5.18",
"michelf/php-markdown": "~1.3",
"nikic/php-parser": "~3.0",
"php": "^7.1.3",
"phpdocumentor/reflection-docblock": "~2.0",
"pimple/pimple": "~3.0",
"symfony/console": "~3.0|~4.0",
"symfony/filesystem": "~3.0|~4.0",
"symfony/finder": "~3.0|~4.0",
"symfony/process": "~3.0|~4.0",
"symfony/yaml": "~3.0|~4.0",
"twig/twig": "~2.0"
},
"require-dev": {
"symfony/phpunit-bridge": "~4.0"
},
"bin": [
"sami.php"
],
"type": "application",
"extra": {
"branch-alias": {
"dev-master": "4.1-dev"
}
},
"autoload": {
"psr-4": {
"Sami\\": "Sami/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
}
],
"description": "Sami, an API documentation generator",
"homepage": "http://sami.sensiolabs.org",
"keywords": [
"phpdoc"
],
"abandoned": true,
"time": "2018-07-02T13:20:39+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
"version": "1.0.1",
@ -5421,6 +5246,55 @@
],
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
"time": "2019-06-13T22:48:21+00:00"
},
{
"name": "webmozart/assert",
"version": "1.9.1",
"source": {
"type": "git",
"url": "https://github.com/webmozart/assert.git",
"reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389",
"reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389",
"shasum": ""
},
"require": {
"php": "^5.3.3 || ^7.0 || ^8.0",
"symfony/polyfill-ctype": "^1.8"
},
"conflict": {
"phpstan/phpstan": "<0.12.20",
"vimeo/psalm": "<3.9.1"
},
"require-dev": {
"phpunit/phpunit": "^4.8.36 || ^7.5.13"
},
"type": "library",
"autoload": {
"psr-4": {
"Webmozart\\Assert\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Bernhard Schussek",
"email": "bschussek@gmail.com"
}
],
"description": "Assertions to validate method input/output with nice error messages.",
"keywords": [
"assert",
"check",
"validate"
],
"time": "2020-07-08T17:02:28+00:00"
}
],
"aliases": [],

View File

@ -20,8 +20,8 @@ if (!defined('IN_PHPBB'))
}
/**
* @todo [smilies] check regular expressions for special char replacements (stored specialchared in db)
*/
* @todo {smilies} check regular expressions for special char replacements (stored specialchared in db)
*/
class acp_icons
{
var $u_action;

View File

@ -20,8 +20,8 @@ if (!defined('IN_PHPBB'))
}
/**
* @todo [words] check regular expressions for special char replacements (stored specialchared in db)
*/
* @todo {words} check regular expressions for special char replacements (stored specialchared in db)
*/
class acp_words
{
var $u_action;

View File

@ -455,8 +455,8 @@ function phpbb_realpath($path)
* Determine which plural form we should use.
* For some languages this is not as simple as for English.
*
* @param $rule int ID of the plural rule we want to use, see https://area51.phpbb.com/docs/dev/3.3.x/language/plurals.html
* @param $number int|float The number we want to get the plural case for. Float numbers are floored.
* @param int $rule ID of the plural rule we want to use, see https://area51.phpbb.com/docs/dev/3.3.x/language/plurals.html
* @param int|float $number The number we want to get the plural case for. Float numbers are floored.
* @return int The plural-case we need to use for the number plural-rule combination
*
* @deprecated 3.2.0-dev (To be removed: 4.0.0)

View File

@ -20,14 +20,14 @@ class config implements \ArrayAccess, \IteratorAggregate, \Countable
{
/**
* The configuration data
* @var array(string => string)
* @var array<string,string>
*/
protected $config;
/**
* Creates a configuration container with a default set of values
*
* @param array(string => string) $config The configuration data.
* @param array<string,string> $config The configuration data.
*/
public function __construct(array $config)
{

View File

@ -838,7 +838,7 @@ class content_visibility
* Add post to topic and forum statistics
*
* @param $data array Contains information from the topics table about given topic
* @param &$sql_data array Populated with the SQL changes, may be empty at call time
* @param $sql_data array Populated with the SQL changes, may be empty at call time (by reference)
* @return null
*/
public function add_post_to_statistic($data, &$sql_data)
@ -859,7 +859,7 @@ class content_visibility
* Remove post from topic and forum statistics
*
* @param $data array Contains information from the topics table about given topic
* @param &$sql_data array Populated with the SQL changes, may be empty at call time
* @param $sql_data array Populated with the SQL changes, may be empty at call time (by reference)
* @return null
*/
public function remove_post_from_statistic($data, &$sql_data)
@ -892,7 +892,7 @@ class content_visibility
* Remove topic from forum statistics
*
* @param $data array Post and topic data
* @param &$sql_data array Populated with the SQL changes, may be empty at call time
* @param $sql_data array Populated with the SQL changes, may be empty at call time (by reference)
* @return null
*/
public function remove_topic_from_statistic($data, &$sql_data)

View File

@ -26,7 +26,7 @@ class error_collector
* the error_reporting() function will be used to determine which errors
* the collector will keep.
*
* @see PHPBB3-13306
* @see https://tracker.phpbb.com/browse/PHPBB3-13306
* @param int|null $error_types
*/
function __construct($error_types = null)

View File

@ -87,8 +87,8 @@ abstract class attachments_base extends base
/**
* Get attachments related to a given post
*
* @param $post_id int Post id
* @return mixed Attachments related to $post_id
* @param int $post_id Post id
* @return mixed Attachments related to $post_id
*/
public function get_attachments($post_id)
{

View File

@ -84,7 +84,7 @@ class helper
}
/**
* @param $group_name string The stored group name
* @param string $group_name The stored group name
*
* @return string Group name or translated group name if it exists
*/

View File

@ -194,7 +194,7 @@ class language
}
/**
* @param $key array|string The language key we want to know more about. Can be string or array.
* @param array|string $key The language key we want to know more about. Can be string or array.
*
* @return bool Returns whether the language key is set.
*/

View File

@ -25,7 +25,7 @@ class deactivated_super_global implements \ArrayAccess, \Countable, \IteratorAgg
private $name;
/**
* @var \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE Super global constant.
* @var string (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE) Super global constant.
*/
private $super_global;
@ -39,7 +39,7 @@ class deactivated_super_global implements \ArrayAccess, \Countable, \IteratorAgg
*
* @param \phpbb\request\request_interface $request A request class instance holding the real super global data.
* @param string $name Name of the super global this is a replacement for - e.g. '_GET'.
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global The variable's super global constant.
* @param string $super_global The variable's super global constant (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE).
*/
public function __construct(\phpbb\request\request_interface $request, $name, $super_global)
{

View File

@ -39,7 +39,7 @@ class request implements \phpbb\request\request_interface
protected $original_request = null;
/**
* @var
* @var bool
*/
protected $super_globals_disabled = false;
@ -137,11 +137,11 @@ class request implements \phpbb\request\request_interface
* other methods this class provides. Using this function should be avoided if possible! It will
* consume twice the the amount of memory of the value
*
* @param string $var_name The name of the variable that shall be overwritten
* @param mixed $value The value which the variable shall contain.
* If this is null the variable will be unset.
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
* Specifies which super global shall be changed
* @param string $var_name The name of the variable that shall be overwritten
* @param mixed $value The value which the variable shall contain.
* If this is null the variable will be unset.
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
* Specifies which super global shall be changed
*/
public function overwrite($var_name, $value, $super_global = \phpbb\request\request_interface::REQUEST)
{
@ -173,16 +173,16 @@ class request implements \phpbb\request\request_interface
* Central type safe input handling function.
* All variables in GET or POST requests should be retrieved through this function to maximise security.
*
* @param string|array $var_name The form variable's name from which data shall be retrieved.
* If the value is an array this may be an array of indizes which will give
* direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
* then specifying array("var", 1) as the name will return "a".
* @param mixed $default A default value that is returned if the variable was not set.
* This function will always return a value of the same type as the default.
* @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
* Specifies which super global should be used
* @param string|array $var_name The form variable's name from which data shall be retrieved.
* If the value is an array this may be an array of indizes which will give
* direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
* then specifying array("var", 1) as the name will return "a".
* @param mixed $default A default value that is returned if the variable was not set.
* This function will always return a value of the same type as the default.
* @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
* Specifies which super global should be used
*
* @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
* the same as that of $default. If the variable is not set $default is returned.
@ -197,16 +197,16 @@ class request implements \phpbb\request\request_interface
* Same functionality as variable(), except does not run trim() on strings.
* This method should be used when handling passwords.
*
* @param string|array $var_name The form variable's name from which data shall be retrieved.
* If the value is an array this may be an array of indizes which will give
* direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
* then specifying array("var", 1) as the name will return "a".
* @param mixed $default A default value that is returned if the variable was not set.
* This function will always return a value of the same type as the default.
* @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
* Specifies which super global should be used
* @param string|array $var_name The form variable's name from which data shall be retrieved.
* If the value is an array this may be an array of indizes which will give
* direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
* then specifying array("var", 1) as the name will return "a".
* @param mixed $default A default value that is returned if the variable was not set.
* This function will always return a value of the same type as the default.
* @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
* Specifies which super global should be used
*
* @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
* the same as that of $default. If the variable is not set $default is returned.
@ -334,11 +334,11 @@ class request implements \phpbb\request\request_interface
* Checks whether a certain variable is set in one of the super global
* arrays.
*
* @param string $var Name of the variable
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
* Specifies the super global which shall be checked
* @param string $var Name of the variable
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
* Specifies the super global which shall be checked
*
* @return bool True if the variable was sent as input
* @return bool True if the variable was sent as input
*/
public function is_set($var, $super_global = \phpbb\request\request_interface::REQUEST)
{
@ -370,8 +370,8 @@ class request implements \phpbb\request\request_interface
/**
* Returns all variable names for a given super global
*
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
* The super global from which names shall be taken
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
* The super global from which names shall be taken
*
* @return array All variable names that are set for the super global.
* Pay attention when using these, they are unsanitised!
@ -389,17 +389,17 @@ class request implements \phpbb\request\request_interface
/**
* Helper function used by variable() and untrimmed_variable().
*
* @param string|array $var_name The form variable's name from which data shall be retrieved.
* If the value is an array this may be an array of indizes which will give
* direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
* then specifying array("var", 1) as the name will return "a".
* @param mixed $default A default value that is returned if the variable was not set.
* This function will always return a value of the same type as the default.
* @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
* Specifies which super global should be used
* @param bool $trim Indicates whether trim() should be applied to string values.
* @param string|array $var_name The form variable's name from which data shall be retrieved.
* If the value is an array this may be an array of indizes which will give
* direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
* then specifying array("var", 1) as the name will return "a".
* @param mixed $default A default value that is returned if the variable was not set.
* This function will always return a value of the same type as the default.
* @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
* Specifies which super global should be used
* @param bool $trim Indicates whether trim() should be applied to string values.
*
* @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
* the same as that of $default. If the variable is not set $default is returned.

View File

@ -36,11 +36,11 @@ interface request_interface
* other methods this class provides. Using this function should be avoided if possible! It will
* consume twice the the amount of memory of the value
*
* @param string $var_name The name of the variable that shall be overwritten
* @param mixed $value The value which the variable shall contain.
* If this is null the variable will be unset.
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
* Specifies which super global shall be changed
* @param string $var_name The name of the variable that shall be overwritten
* @param mixed $value The value which the variable shall contain.
* If this is null the variable will be unset.
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
* Specifies which super global shall be changed
*/
public function overwrite($var_name, $value, $super_global = \phpbb\request\request_interface::REQUEST);
@ -56,8 +56,8 @@ interface request_interface
* This function will always return a value of the same type as the default.
* @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
* Specifies which super global should be used
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
* Specifies which super global shall be changed
*
* @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
* the same as that of $default. If the variable is not set $default is returned.
@ -78,8 +78,8 @@ interface request_interface
* then specifying array("var", 1) as the name will return "a".
* @param mixed $default A default value that is returned if the variable was not set.
* This function will always return a value of the same type as the default.
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
* Specifies which super global should be used
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
* Specifies which super global shall be changed
*
* @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
* the same as that of $default. If the variable is not set $default is returned.
@ -122,11 +122,11 @@ interface request_interface
* Checks whether a certain variable is set in one of the super global
* arrays.
*
* @param string $var Name of the variable
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
* Specifies the super global which shall be checked
* @param string $var Name of the variable
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
* Specifies which super global shall be changed
*
* @return bool True if the variable was sent as input
* @return bool True if the variable was sent as input
*/
public function is_set($var, $super_global = \phpbb\request\request_interface::REQUEST);
@ -147,8 +147,8 @@ interface request_interface
/**
* Returns all variable names for a given super global
*
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
* The super global from which names shall be taken
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
* The super global from which names shall be taken
*
* @return array All variable names that are set for the super global.
* Pay attention when using these, they are unsanitised!
@ -158,8 +158,8 @@ interface request_interface
/**
* Returns the original array of the requested super global
*
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
* The super global which will be returned
* @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
* The super global which will be returned
*
* @return array The original array of the requested super global.
*/

View File

@ -138,7 +138,7 @@ class extension extends \Twig\Extension\AbstractExtension
* @param mixed $item A variable
* @param integer $start Start of the subset
* @param integer $end End of the subset
* @param Boolean $preserveKeys Whether to preserve key or not (when the input is an array)
* @param boolean $preserveKeys Whether to preserve key or not (when the input is an array)
*
* @return mixed The sliced variable
*/

View File

@ -31,8 +31,8 @@ class phpbb_mock_session_testable extends \phpbb\session
/**
* Checks if the cookies were set correctly.
*
* @param PHPUnit\Framework\Assert test The test from which this is called
* @param array(string => mixed) cookies The cookie data to check against.
* @param PHPUnit\Framework\Assert $test The test from which this is called
* @param array<string,mixed> $cookies The cookie data to check against.
* The keys are cookie names, the values can either be null to
* check only the existence of the cookie, or an array(d, t),
* where d is the cookie data to check, or null to skip the

View File

@ -0,0 +1,33 @@
#!/bin/bash
#
# 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.
#
set -e
DB=$1
TRAVIS_PHP_VERSION=$2
NOTESTS=$3
if [ "$NOTESTS" == '1' ]
then
if [ ! -f doctum.phar ]; then
# Download the latest (5.1.x) release if the file does not exist
# Remove it to update your phar
curl -O https://doctum.long-term.support/releases/5.1/doctum.phar
rm -f doctum.phar.sha256
curl -O https://doctum.long-term.support/releases/5.1/doctum.phar.sha256
sha256sum --strict --check doctum.phar.sha256
rm -f doctum.phar.sha256
# You can fetch the latest (5.1.x) version code here:
# https://doctum.long-term.support/releases/5.1/VERSION
fi
# Show the version to inform users of the script
php doctum.phar --version
php doctum.phar parse build/doctum-checkout.conf.php -v
fi

View File

@ -1,34 +0,0 @@
#!/bin/bash
#
# 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.
#
set -e
DB=$1
TRAVIS_PHP_VERSION=$2
NOTESTS=$3
if [ "$NOTESTS" == '1' ]
then
# Workarounds for
# https://github.com/fabpot/Sami/issues/116
# and
# https://github.com/fabpot/Sami/issues/117
errors=$(
unbuffer phpBB/vendor/bin/sami.php parse build/sami-checkout.conf.php -v | \
sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" | \
grep "ERROR: " | \
tee /dev/tty | \
wc -l
)
if [ "$errors" != "0" ]
then
exit 1
fi
fi