build: Updating mediawiki/mediawiki-phan-config to 0.14.0

Change-Id: I3644fbc31d47b6b056122eb6f958de76e81e22ce
This commit is contained in:
libraryupgrader 2024-02-09 13:53:56 +00:00 committed by DannyS712
parent 8d84937609
commit ccaeae13c5
2 changed files with 4 additions and 5 deletions

View file

@ -2,9 +2,9 @@
namespace MediaWiki\Extension\ConfirmEdit\FancyCaptcha; namespace MediaWiki\Extension\ConfirmEdit\FancyCaptcha;
use Exception;
use FileBackend; use FileBackend;
use FSFileBackend; use FSFileBackend;
use InvalidArgumentException;
use MediaWiki\Auth\AuthenticationRequest; use MediaWiki\Auth\AuthenticationRequest;
use MediaWiki\Auth\AuthManager; use MediaWiki\Auth\AuthManager;
use MediaWiki\Extension\ConfirmEdit\Auth\CaptchaAuthenticationRequest; use MediaWiki\Extension\ConfirmEdit\Auth\CaptchaAuthenticationRequest;
@ -432,13 +432,12 @@ class FancyCaptcha extends SimpleCaptcha {
/** /**
* @param string $basename * @param string $basename
* @return array (salt, hash) * @return array (salt, hash)
* @throws Exception
*/ */
public function hashFromImageName( $basename ) { public function hashFromImageName( $basename ) {
if ( preg_match( '/^image_([0-9a-f]+)_([0-9a-f]+)\\.png$/', $basename, $matches ) ) { if ( preg_match( '/^image_([0-9a-f]+)_([0-9a-f]+)\\.png$/', $basename, $matches ) ) {
return [ $matches[1], $matches[2] ]; return [ $matches[1], $matches[2] ];
} else { } else {
throw new Exception( "Invalid filename '$basename'.\n" ); throw new InvalidArgumentException( "Invalid filename '$basename'.\n" );
} }
} }
@ -466,7 +465,7 @@ class FancyCaptcha extends SimpleCaptcha {
* Returns an array with 'salt' and 'hash' keys. Hash is * Returns an array with 'salt' and 'hash' keys. Hash is
* md5( $wgCaptchaSecret . $salt . $answer . $wgCaptchaSecret . $salt )[0..15] * md5( $wgCaptchaSecret . $salt . $answer . $wgCaptchaSecret . $salt )[0..15]
* @return array * @return array
* @throws Exception When a captcha image cannot be produced. * @throws UnderflowException When a captcha image cannot be produced.
*/ */
public function getCaptcha() { public function getCaptcha() {
$info = $this->pickImage(); $info = $this->pickImage();

View file

@ -1,7 +1,7 @@
{ {
"require-dev": { "require-dev": {
"mediawiki/mediawiki-codesniffer": "41.0.0", "mediawiki/mediawiki-codesniffer": "41.0.0",
"mediawiki/mediawiki-phan-config": "0.12.1", "mediawiki/mediawiki-phan-config": "0.14.0",
"mediawiki/minus-x": "1.1.1", "mediawiki/minus-x": "1.1.1",
"php-parallel-lint/php-console-highlighter": "1.0.0", "php-parallel-lint/php-console-highlighter": "1.0.0",
"php-parallel-lint/php-parallel-lint": "1.3.2" "php-parallel-lint/php-parallel-lint": "1.3.2"