Compare commits

...

6 commits

Author SHA1 Message Date
lionel-rowe
31e5c3b97d
Merge 4b2a24ba5e into 478d119d42 2025-05-20 09:41:20 +08:00
Marc Alexander
478d119d42
Merge pull request #6814 from iMattPro/ticket/17510
[ticket/17510] Fix Code Sniffer deprecations
2025-05-19 17:53:18 +02:00
Marc Alexander
b3478d83d1
Merge pull request #6811 from rxu/ticket/17506
[ticket/17506] Ensure superglobal variables are arrays before applying addition - 3.3.x
2025-05-19 17:44:47 +02:00
Matt Friedman
7268859226
[ticket/17510] Fix Code Sniffer deprecations
PHPBB-17510
2025-05-13 18:03:10 -07:00
rxu
10947f3d49
[ticket/17506] Ensure superglobal variables are arrays before applying addition
PHPBB-17506
2025-05-09 16:58:36 +07:00
lionel-rowe
4b2a24ba5e [ticket/16983] Accessibility - fix elements with no focus style in ACP and Prosilver
PHPBB3-16983
2022-04-07 15:16:40 +01:00
12 changed files with 35 additions and 41 deletions

View file

@ -11,6 +11,8 @@
* *
*/ */
namespace phpbb\Sniffs\Commenting;
use PHP_CodeSniffer\Files\File; use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Sniffs\Sniff; use PHP_CodeSniffer\Sniffs\Sniff;
@ -21,7 +23,7 @@ use PHP_CodeSniffer\Sniffs\Sniff;
* @package code_sniffer * @package code_sniffer
* @author Manuel Pichler <mapi@phpundercontrol.org> * @author Manuel Pichler <mapi@phpundercontrol.org>
*/ */
class phpbb_Sniffs_Commenting_FileCommentSniff implements Sniff class FileCommentSniff implements Sniff
{ {
/** /**
* Returns an array of tokens this test wants to listen for. * Returns an array of tokens this test wants to listen for.

View file

@ -11,6 +11,8 @@
* *
*/ */
namespace phpbb\Sniffs\ControlStructures;
use PHP_CodeSniffer\Files\File; use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Sniffs\Sniff; use PHP_CodeSniffer\Sniffs\Sniff;
@ -18,7 +20,7 @@ use PHP_CodeSniffer\Sniffs\Sniff;
* Checks that the opening brace of a control structures is on the line after. * Checks that the opening brace of a control structures is on the line after.
* From Generic_Sniffs_Functions_OpeningFunctionBraceBsdAllmanSniff * From Generic_Sniffs_Functions_OpeningFunctionBraceBsdAllmanSniff
*/ */
class phpbb_Sniffs_ControlStructures_OpeningBraceBsdAllmanSniff implements Sniff class OpeningBraceBsdAllmanSniff implements Sniff
{ {
/** /**
* Registers the tokens that this sniff wants to listen for. * Registers the tokens that this sniff wants to listen for.

View file

@ -10,6 +10,7 @@
* the docs/CREDITS.txt file. * the docs/CREDITS.txt file.
* *
*/ */
namespace phpbb\Sniffs\ControlStructures;
use PHP_CodeSniffer\Files\File; use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Sniffs\Sniff; use PHP_CodeSniffer\Sniffs\Sniff;
@ -18,7 +19,7 @@ use PHP_CodeSniffer\Sniffs\Sniff;
* Checks that there is exactly one space between the keyword and the opening * Checks that there is exactly one space between the keyword and the opening
* parenthesis of a control structures. * parenthesis of a control structures.
*/ */
class phpbb_Sniffs_ControlStructures_OpeningParenthesisSniff implements Sniff class OpeningParenthesisSniff implements Sniff
{ {
/** /**
* Registers the tokens that this sniff wants to listen for. * Registers the tokens that this sniff wants to listen for.

View file

@ -11,6 +11,8 @@
* *
*/ */
namespace phpbb\Sniffs\ControlStructures;
use PHP_CodeSniffer\Files\File; use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Sniffs\Sniff; use PHP_CodeSniffer\Sniffs\Sniff;
@ -18,7 +20,7 @@ use PHP_CodeSniffer\Sniffs\Sniff;
* Checks that the visibility qualifiers are placed after the static keyword * Checks that the visibility qualifiers are placed after the static keyword
* according to the coding guidelines * according to the coding guidelines
*/ */
class phpbb_Sniffs_ControlStructures_StaticKeywordSniff implements Sniff class StaticKeywordSniff implements Sniff
{ {
/** /**
* Registers the tokens that this sniff wants to listen for. * Registers the tokens that this sniff wants to listen for.

View file

@ -11,13 +11,15 @@
* *
*/ */
namespace phpbb\Sniffs\Namespaces;
use PHP_CodeSniffer\Files\File; use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Sniffs\Sniff; use PHP_CodeSniffer\Sniffs\Sniff;
/** /**
* Checks that each use statement is used. * Checks that each use statement is used.
*/ */
class phpbb_Sniffs_Namespaces_UnusedUseSniff implements Sniff class UnusedUseSniff implements Sniff
{ {
const FIND = [ const FIND = [
T_NS_SEPARATOR, T_NS_SEPARATOR,

View file

@ -17,9 +17,6 @@
<!-- There MUST not be more than one statement per line. --> <!-- There MUST not be more than one statement per line. -->
<rule ref="Generic.Formatting.DisallowMultipleStatements" /> <rule ref="Generic.Formatting.DisallowMultipleStatements" />
<!-- Call-time pass-by-reference MUST not be used. -->
<rule ref="Generic.Functions.CallTimePassByReference.NotAllowed" />
<!-- Filenames MUST be lowercase. --> <!-- Filenames MUST be lowercase. -->
<rule ref="Generic.Files.LowercasedFilename" /> <rule ref="Generic.Files.LowercasedFilename" />

View file

@ -627,7 +627,6 @@ li {
font-size: 0.75em; font-size: 0.75em;
text-decoration: none; text-decoration: none;
cursor: inherit; cursor: inherit;
outline-style: none;
} }
@media only screen and (max-width: 700px), only screen and (max-device-width: 700px) @media only screen and (max-width: 700px), only screen and (max-device-width: 700px)
@ -1173,10 +1172,6 @@ optgroup, select {
color: #000; color: #000;
} }
select:focus {
outline-style: none;
}
optgroup { optgroup {
font-size: 1.00em; font-size: 1.00em;
font-weight: bold; font-weight: bold;
@ -1442,7 +1437,6 @@ input:focus, textarea:focus {
border: 1px solid #BC2A4D; border: 1px solid #BC2A4D;
background-color: #E9E9E2; background-color: #E9E9E2;
color: #BC2A4D; color: #BC2A4D;
outline-style: none;
} }
@media only screen and (max-width: 700px), only screen and (max-device-width: 700px) @media only screen and (max-width: 700px), only screen and (max-device-width: 700px)
@ -1592,11 +1586,6 @@ input.disabled {
color: #666666; color: #666666;
} }
/* Focus states */
input.button1:focus, input.button2:focus {
outline-style: none;
}
/* jQuery popups /* jQuery popups
---------------------------------------- */ ---------------------------------------- */
.phpbb_alert { .phpbb_alert {

16
phpBB/composer.lock generated
View file

@ -4702,16 +4702,16 @@
}, },
{ {
"name": "squizlabs/php_codesniffer", "name": "squizlabs/php_codesniffer",
"version": "3.10.1", "version": "3.13.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
"reference": "8f90f7a53ce271935282967f53d0894f8f1ff877" "reference": "65ff2489553b83b4597e89c3b8b721487011d186"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/8f90f7a53ce271935282967f53d0894f8f1ff877", "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/65ff2489553b83b4597e89c3b8b721487011d186",
"reference": "8f90f7a53ce271935282967f53d0894f8f1ff877", "reference": "65ff2489553b83b4597e89c3b8b721487011d186",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4776,9 +4776,13 @@
{ {
"url": "https://opencollective.com/php_codesniffer", "url": "https://opencollective.com/php_codesniffer",
"type": "open_collective" "type": "open_collective"
},
{
"url": "https://thanks.dev/u/gh/phpcsstandards",
"type": "thanks_dev"
} }
], ],
"time": "2024-05-22T21:24:41+00:00" "time": "2025-05-11T03:36:00+00:00"
}, },
{ {
"name": "symfony/browser-kit", "name": "symfony/browser-kit",
@ -5106,5 +5110,5 @@
"platform-overrides": { "platform-overrides": {
"php": "7.2" "php": "7.2"
}, },
"plugin-api-version": "2.6.0" "plugin-api-version": "2.2.0"
} }

View file

@ -70,12 +70,12 @@ class request implements \phpbb\request\request_interface
foreach ($this->super_globals as $const => $super_global) foreach ($this->super_globals as $const => $super_global)
{ {
$this->input[$const] = isset($GLOBALS[$super_global]) ? $GLOBALS[$super_global] : array(); $this->input[$const] = isset($GLOBALS[$super_global]) ? (array) $GLOBALS[$super_global] : array();
} }
// simulate request_order = GP // simulate request_order = GP
$this->original_request = $this->input[\phpbb\request\request_interface::REQUEST]; $this->original_request = (array) $this->input[\phpbb\request\request_interface::REQUEST];
$this->input[\phpbb\request\request_interface::REQUEST] = $this->input[\phpbb\request\request_interface::POST] + $this->input[\phpbb\request\request_interface::GET]; $this->input[\phpbb\request\request_interface::REQUEST] = (array) $this->input[\phpbb\request\request_interface::POST] + (array) $this->input[\phpbb\request\request_interface::GET];
if ($disable_super_globals) if ($disable_super_globals)
{ {

View file

@ -112,3 +112,11 @@ ul {
abbr[title] { abbr[title] {
text-decoration: none; text-decoration: none;
} }
/**
* Fixes accessibility issue introduced by `normalize.css` by re-adding outline
* to elements covered by the mouse when they are navigated into via keyboard
*/
a:hover {
outline: revert;
}

View file

@ -25,7 +25,6 @@
.button:focus, .button:focus,
.button:hover { .button:hover {
text-decoration: none; text-decoration: none;
outline: none;
} }
.caret { .caret {

View file

@ -27,10 +27,6 @@ select {
font-size: 1em; font-size: 1em;
} }
select:focus {
outline-style: none;
}
option { option {
padding-right: 1em; padding-right: 1em;
} }
@ -268,8 +264,6 @@ fieldset.submit-buttons input {
max-width: 100%; max-width: 100%;
font-size: 1.2em; font-size: 1.2em;
resize: vertical; resize: vertical;
outline: 3px dashed transparent;
outline-offset: -4px;
-webkit-transition: all .5s ease, height 1ms linear; -webkit-transition: all .5s ease, height 1ms linear;
-moz-transition: all .5s ease, height 1ms linear; -moz-transition: all .5s ease, height 1ms linear;
-ms-transition: all .5s ease, height 1ms linear; -ms-transition: all .5s ease, height 1ms linear;
@ -296,7 +290,6 @@ fieldset.submit-buttons input {
.inputbox:hover, .inputbox:focus { .inputbox:hover, .inputbox:focus {
border: 1px solid transparent; border: 1px solid transparent;
outline-style: none;
} }
input.inputbox { width: 85%; } input.inputbox { width: 85%; }
@ -383,11 +376,6 @@ input.disabled {
font-weight: normal; font-weight: normal;
} }
/* Focus states */
input.button1:focus, input.button2:focus, input.button3:focus {
outline-style: none;
}
/* Topic and forum Search */ /* Topic and forum Search */
.search-box { .search-box {
float: left; float: left;