This run took 43 seconds.
From 3115b7dd54a8d6844396150f1a6cf9159f90f3b7 Mon Sep 17 00:00:00 2001 From: libraryupgrader <tools.libraryupgrader@tools.wmflabs.org> Date: Tue, 9 Apr 2024 11:41:40 +0000 Subject: [PATCH] build: Updating dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit composer: * mediawiki/mediawiki-codesniffer: 41.0.0 → 43.0.0 The following sniffs are failing and were disabled: * MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgHooks * mediawiki/mediawiki-phan-config: 0.12.1 → 0.14.0 npm: * grunt-banana-checker: 0.11.0 → 0.11.1 Change-Id: I841622cbe07fce4ee44ec2f4dd5282ab91ca9dbb --- .phpcs.xml | 1 + .../specials/SpecialSystemGiftManager.php | 16 +++---- .../specials/SpecialSystemGiftManagerLogo.php | 8 ++-- .../specials/SpecialGiftManagerLogo.php | 8 ++-- .../includes/specials/SpecialGiveGift.php | 44 +++++++++---------- .../includes/avatar/UploadAvatarTrait.php | 4 +- composer.json | 9 +++- package-lock.json | 14 +++--- package.json | 2 +- 9 files changed, 56 insertions(+), 50 deletions(-) diff --git a/.phpcs.xml b/.phpcs.xml index 747a350..dd5f6a8 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -7,6 +7,7 @@ <exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" /> <exclude name="MediaWiki.NamingConventions.PrefixedGlobalFunctions.allowedPrefix" /> <exclude name="MediaWiki.Usage.DbrQueryUsage.DbrQueryFound" /> + <exclude name="MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgHooks" /> <exclude name="MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgTitle" /> <exclude name="MediaWiki.Usage.ExtendClassUsage.FunctionConfigUsage" /> <exclude name="MediaWiki.Usage.ForbiddenFunctions.exec" /> diff --git a/SystemGifts/includes/specials/SpecialSystemGiftManager.php b/SystemGifts/includes/specials/SpecialSystemGiftManager.php index cda8bfe..b46c6bc 100644 --- a/SystemGifts/includes/specials/SpecialSystemGiftManager.php +++ b/SystemGifts/includes/specials/SpecialSystemGiftManager.php @@ -266,15 +266,15 @@ class SystemGiftManager extends SpecialPage { <td class="view-container"> <select name="gift_category">' . "\n"; $g = new SystemGifts(); - foreach ( $g->getCategories() as $category => $id ) { - $sel = ''; - if ( isset( $gift['gift_category'] ) && $gift['gift_category'] == $id ) { - $sel = ' selected="selected"'; - } - $indent = "\t\t\t\t\t\t"; - $form .= $indent . '<option' . $sel . - " value=\"{$id}\">{$category}</option>\n"; + foreach ( $g->getCategories() as $category => $id ) { + $sel = ''; + if ( isset( $gift['gift_category'] ) && $gift['gift_category'] == $id ) { + $sel = ' selected="selected"'; } + $indent = "\t\t\t\t\t\t"; + $form .= $indent . '<option' . $sel . + " value=\"{$id}\">{$category}</option>\n"; + } $form .= "\t\t\t\t\t" . '</select> </td> </tr> diff --git a/SystemGifts/includes/specials/SpecialSystemGiftManagerLogo.php b/SystemGifts/includes/specials/SpecialSystemGiftManagerLogo.php index 61644f2..31bf0a4 100644 --- a/SystemGifts/includes/specials/SpecialSystemGiftManagerLogo.php +++ b/SystemGifts/includes/specials/SpecialSystemGiftManagerLogo.php @@ -208,7 +208,7 @@ class SystemGiftManagerLogo extends UnlistedSpecialPage { * We'll want to blacklist against *any* 'extension', and use * only the final one for the whitelist. */ - list( $partname, $ext ) = UploadBase::splitExtensions( $basename ); + [ $partname, $ext ] = UploadBase::splitExtensions( $basename ); if ( count( $ext ) ) { $finalExt = $ext[count( $ext ) - 1]; } else { @@ -302,7 +302,7 @@ class SystemGiftManagerLogo extends UnlistedSpecialPage { function createThumbnail( $imageSrc, $ext, $imgDest, $thumbWidth ) { global $wgUseImageMagick, $wgImageMagickConvertCommand; - list( $origWidth, $origHeight, $typeCode ) = getimagesize( $imageSrc ); + [ $origWidth, $origHeight, $typeCode ] = getimagesize( $imageSrc ); $backend = new SocialProfileFileBackend( 'awards' ); $dir = $backend->getContainerStoragePath(); @@ -757,11 +757,11 @@ class SystemGiftManagerLogo extends UnlistedSpecialPage { $source = " <td align='right' nowrap='nowrap'>" . $this->msg( 'filestatus' )->escaped() . "</td> <td><input tabindex='3' type='text' name=\"wpUploadCopyStatus\" value=\"" . - htmlspecialchars( $this->mUploadCopyStatus ) . "\" size='40' /></td> + htmlspecialchars( $this->mUploadCopyStatus ) . "\" size='40' /></td> </tr><tr> <td align='right'>" . $this->msg( 'filesource' )->escaped() . "</td> <td><input tabindex='4' type='text' name='wpUploadSource' id='wpUploadSource' value=\"" . - htmlspecialchars( $this->mUploadSource ) . "\" /></td> + htmlspecialchars( $this->mUploadSource ) . "\" /></td> "; } diff --git a/UserGifts/includes/specials/SpecialGiftManagerLogo.php b/UserGifts/includes/specials/SpecialGiftManagerLogo.php index ecf5208..4a35c79 100644 --- a/UserGifts/includes/specials/SpecialGiftManagerLogo.php +++ b/UserGifts/includes/specials/SpecialGiftManagerLogo.php @@ -232,7 +232,7 @@ class GiftManagerLogo extends UnlistedSpecialPage { * We'll want to blacklist against *any* 'extension', and use * only the final one for the whitelist. */ - list( $partname, $ext ) = UploadBase::splitExtensions( $basename ); + [ $partname, $ext ] = UploadBase::splitExtensions( $basename ); if ( count( $ext ) ) { $finalExt = $ext[count( $ext ) - 1]; } else { @@ -330,7 +330,7 @@ class GiftManagerLogo extends UnlistedSpecialPage { function createThumbnail( $imageSrc, $ext, $imgDest, $thumbWidth ) { global $wgUseImageMagick, $wgImageMagickConvertCommand; - list( $origWidth, $origHeight, $typeCode ) = getimagesize( $imageSrc ); + [ $origWidth, $origHeight, $typeCode ] = getimagesize( $imageSrc ); $backend = new SocialProfileFileBackend( 'awards' ); $dir = $backend->getContainerStoragePath(); @@ -781,11 +781,11 @@ class GiftManagerLogo extends UnlistedSpecialPage { $source = " <td align='right' nowrap='nowrap'>" . htmlspecialchars( $this->msg( 'filestatus' )->plain() ) . "</td> <td><input tabindex='3' type='text' name=\"wpUploadCopyStatus\" value=\"" . - htmlspecialchars( $this->mUploadCopyStatus ) . "\" size='40' /></td> + htmlspecialchars( $this->mUploadCopyStatus ) . "\" size='40' /></td> </tr><tr> <td align='right'>" . htmlspecialchars( $this->msg( 'filesource' )->plain() ) . "</td> <td><input tabindex='4' type='text' name='wpUploadSource' value=\"" . - htmlspecialchars( $this->mUploadSource ) . "\" style='width:100px' /></td> + htmlspecialchars( $this->mUploadSource ) . "\" style='width:100px' /></td> "; } diff --git a/UserGifts/includes/specials/SpecialGiveGift.php b/UserGifts/includes/specials/SpecialGiveGift.php index 7b75784..7bd7784 100644 --- a/UserGifts/includes/specials/SpecialGiveGift.php +++ b/UserGifts/includes/specials/SpecialGiveGift.php @@ -315,37 +315,37 @@ class GiveGift extends SpecialPage { // If friending is enabled, build a dropdown menu of the user's // friends - if ( $wgFriendingEnabled ) { - $user = $this->getUser(); + if ( $wgFriendingEnabled ) { + $user = $this->getUser(); - $listLookup = new RelationshipListLookup( $user ); - $friends = $listLookup->getFriendList(); + $listLookup = new RelationshipListLookup( $user ); + $friends = $listLookup->getFriendList(); - if ( $friends ) { - $output .= '<div class="g-give-title">' . - $this->msg( 'g-give-list-friends-title' )->escaped() . - '</div> + if ( $friends ) { + $output .= '<div class="g-give-title">' . + $this->msg( 'g-give-list-friends-title' )->escaped() . + '</div> <div class="g-gift-select"> <select name="friend-list"> <option value="#" selected="selected">' . - $this->msg( 'g-select-a-friend' )->escaped() . - '</option>'; - foreach ( $friends as $friend ) { - $friendActor = User::newFromActorId( $friend['actor'] ); - if ( !$friendActor || !$friendActor instanceof User ) { - continue; - } - $output .= '<option value="' . htmlspecialchars( $friendActor->getName() ) . '">' . - htmlspecialchars( $friendActor->getName() ) . - '</option>' . "\n"; + $this->msg( 'g-select-a-friend' )->escaped() . + '</option>'; + foreach ( $friends as $friend ) { + $friendActor = User::newFromActorId( $friend['actor'] ); + if ( !$friendActor || !$friendActor instanceof User ) { + continue; } - $output .= '</select> + $output .= '<option value="' . htmlspecialchars( $friendActor->getName() ) . '">' . + htmlspecialchars( $friendActor->getName() ) . + '</option>' . "\n"; + } + $output .= '</select> </div> <div class="g-give-separator">' . - $this->msg( 'g-give-separator' )->escaped() . - '</div>'; - } + $this->msg( 'g-give-separator' )->escaped() . + '</div>'; } + } $output .= '<div class="g-give-title">' . $this->msg( 'g-give-enter-friend-title' )->escaped() . diff --git a/UserProfile/includes/avatar/UploadAvatarTrait.php b/UserProfile/includes/avatar/UploadAvatarTrait.php index bee9f49..e9f3680 100644 --- a/UserProfile/includes/avatar/UploadAvatarTrait.php +++ b/UserProfile/includes/avatar/UploadAvatarTrait.php @@ -34,7 +34,7 @@ trait UploadAvatarTrait { } if ( $wgUseImageMagick ) { // ImageMagick is enabled - list( $origWidth, $origHeight, $typeCode ) = $imageInfo; + [ $origWidth, $origHeight, $typeCode ] = $imageInfo; if ( $origWidth < $thumbWidth ) { $thumbWidth = $origWidth; @@ -103,7 +103,7 @@ trait UploadAvatarTrait { } } else { // ImageMagick is not enabled, so fall back to PHP's GD library // Get the image size, used in calculations later. - list( $origWidth, $origHeight, $typeCode ) = getimagesize( $imageSrc ); + [ $origWidth, $origHeight, $typeCode ] = getimagesize( $imageSrc ); $fullImage = ''; $ext = ''; diff --git a/composer.json b/composer.json index a285e94..39dcc78 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "require-dev": { - "mediawiki/mediawiki-codesniffer": "41.0.0", - "mediawiki/mediawiki-phan-config": "0.12.1", + "mediawiki/mediawiki-codesniffer": "43.0.0", + "mediawiki/mediawiki-phan-config": "0.14.0", "mediawiki/minus-x": "1.1.1", "php-parallel-lint/php-console-highlighter": "1.0.0", "php-parallel-lint/php-parallel-lint": "1.3.2" @@ -18,5 +18,10 @@ ], "phan": "phan -d . --long-progress-bar", "phpcs": "phpcs -sp --cache" + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } } } diff --git a/package-lock.json b/package-lock.json index 81c0c07..5472ed7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "devDependencies": { "eslint-config-wikimedia": "0.26.0", "grunt": "1.6.1", - "grunt-banana-checker": "0.11.0", + "grunt-banana-checker": "0.11.1", "grunt-eslint": "24.3.0" } }, @@ -1922,9 +1922,9 @@ } }, "node_modules/grunt-banana-checker": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/grunt-banana-checker/-/grunt-banana-checker-0.11.0.tgz", - "integrity": "sha512-qXtcxu7y9GFEIx6ELm5jSf+JqvCafdco+t/YsrUhUDNe9AgCnP7X0R+PxT0qZaDftKVrDrR2gPOYqpaAye5bDw==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/grunt-banana-checker/-/grunt-banana-checker-0.11.1.tgz", + "integrity": "sha512-CF0h/TXaX9sbF2yIz+fUfJc4Zvms7XGYQ7ZYMD5+vv0LMZzSFf7JSHXDaBEs72nQWw4r4ap5fOW3baAliW+0bQ==", "dev": true, "bin": { "banana-checker": "src/cli.js" @@ -5019,9 +5019,9 @@ } }, "grunt-banana-checker": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/grunt-banana-checker/-/grunt-banana-checker-0.11.0.tgz", - "integrity": "sha512-qXtcxu7y9GFEIx6ELm5jSf+JqvCafdco+t/YsrUhUDNe9AgCnP7X0R+PxT0qZaDftKVrDrR2gPOYqpaAye5bDw==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/grunt-banana-checker/-/grunt-banana-checker-0.11.1.tgz", + "integrity": "sha512-CF0h/TXaX9sbF2yIz+fUfJc4Zvms7XGYQ7ZYMD5+vv0LMZzSFf7JSHXDaBEs72nQWw4r4ap5fOW3baAliW+0bQ==", "dev": true }, "grunt-cli": { diff --git a/package.json b/package.json index e033576..10d06f2 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "devDependencies": { "eslint-config-wikimedia": "0.26.0", "grunt": "1.6.1", - "grunt-banana-checker": "0.11.0", + "grunt-banana-checker": "0.11.1", "grunt-eslint": "24.3.0" } } -- 2.39.2
$ date --- stdout --- Tue Apr 9 11:41:01 UTC 2024 --- end --- $ git clone file:///srv/git/mediawiki-extensions-SocialProfile.git repo --depth=1 -b master --- stderr --- Cloning into 'repo'... --- stdout --- --- end --- $ git config user.name libraryupgrader --- stdout --- --- end --- $ git config user.email tools.libraryupgrader@tools.wmflabs.org --- stdout --- --- end --- $ git submodule update --init --- stdout --- --- end --- $ grr init --- stdout --- Installed commit-msg hook. --- end --- $ git show-ref refs/heads/master --- stdout --- 6ecdd5b9a1c74eeb3ace312c810b55efd921ec98 refs/heads/master --- end --- $ /usr/bin/npm audit --json --- stdout --- { "auditReportVersion": 2, "vulnerabilities": {}, "metadata": { "vulnerabilities": { "info": 0, "low": 0, "moderate": 0, "high": 0, "critical": 0, "total": 0 }, "dependencies": { "prod": 1, "dev": 307, "optional": 0, "peer": 1, "peerOptional": 0, "total": 307 } } } --- end --- $ /usr/bin/composer install --- stderr --- No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information. Loading composer repositories with package information Updating dependencies Lock file operations: 36 installs, 0 updates, 0 removals - Locking composer/pcre (3.1.3) - Locking composer/semver (3.3.2) - Locking composer/spdx-licenses (1.5.8) - Locking composer/xdebug-handler (3.0.4) - Locking doctrine/deprecations (1.1.3) - Locking felixfbecker/advanced-json-rpc (v3.2.1) - Locking mediawiki/mediawiki-codesniffer (v41.0.0) - Locking mediawiki/mediawiki-phan-config (0.12.1) - Locking mediawiki/minus-x (1.1.1) - Locking mediawiki/phan-taint-check-plugin (4.0.0) - Locking microsoft/tolerant-php-parser (v0.1.1) - Locking netresearch/jsonmapper (v4.4.1) - Locking phan/phan (5.4.1) - Locking php-parallel-lint/php-console-color (v1.0.1) - Locking php-parallel-lint/php-console-highlighter (v1.0.0) - Locking php-parallel-lint/php-parallel-lint (v1.3.2) - Locking phpdocumentor/reflection-common (2.2.0) - Locking phpdocumentor/reflection-docblock (5.3.0) - Locking phpdocumentor/type-resolver (1.8.2) - Locking phpstan/phpdoc-parser (1.28.0) - Locking psr/container (2.0.2) - Locking psr/log (2.0.0) - Locking sabre/event (5.1.4) - Locking squizlabs/php_codesniffer (3.7.2) - Locking symfony/console (v5.4.36) - Locking symfony/deprecation-contracts (v3.4.0) - Locking symfony/polyfill-ctype (v1.29.0) - Locking symfony/polyfill-intl-grapheme (v1.29.0) - Locking symfony/polyfill-intl-normalizer (v1.29.0) - Locking symfony/polyfill-mbstring (v1.29.0) - Locking symfony/polyfill-php73 (v1.29.0) - Locking symfony/polyfill-php80 (v1.29.0) - Locking symfony/service-contracts (v3.4.2) - Locking symfony/string (v6.4.4) - Locking tysonandre/var_representation_polyfill (0.1.3) - Locking webmozart/assert (1.11.0) Writing lock file Installing dependencies from lock file (including require-dev) Package operations: 36 installs, 0 updates, 0 removals 0 [>---------------------------] 0 [->--------------------------] - Installing composer/pcre (3.1.3): Extracting archive - Installing symfony/polyfill-php80 (v1.29.0): Extracting archive - Installing squizlabs/php_codesniffer (3.7.2): Extracting archive - Installing symfony/polyfill-mbstring (v1.29.0): Extracting archive - Installing composer/spdx-licenses (1.5.8): Extracting archive - Installing composer/semver (3.3.2): Extracting archive - Installing mediawiki/mediawiki-codesniffer (v41.0.0): Extracting archive - Installing tysonandre/var_representation_polyfill (0.1.3): Extracting archive - Installing symfony/polyfill-intl-normalizer (v1.29.0): Extracting archive - Installing symfony/polyfill-intl-grapheme (v1.29.0): Extracting archive - Installing symfony/polyfill-ctype (v1.29.0): Extracting archive - Installing symfony/string (v6.4.4): Extracting archive - Installing psr/container (2.0.2): Extracting archive - Installing symfony/service-contracts (v3.4.2): Extracting archive - Installing symfony/polyfill-php73 (v1.29.0): Extracting archive - Installing symfony/deprecation-contracts (v3.4.0): Extracting archive - Installing symfony/console (v5.4.36): Extracting archive - Installing sabre/event (5.1.4): Extracting archive - Installing netresearch/jsonmapper (v4.4.1): Extracting archive - Installing microsoft/tolerant-php-parser (v0.1.1): Extracting archive - Installing webmozart/assert (1.11.0): Extracting archive - Installing phpstan/phpdoc-parser (1.28.0): Extracting archive - Installing phpdocumentor/reflection-common (2.2.0): Extracting archive - Installing doctrine/deprecations (1.1.3): Extracting archive - Installing phpdocumentor/type-resolver (1.8.2): Extracting archive - Installing phpdocumentor/reflection-docblock (5.3.0): Extracting archive - Installing felixfbecker/advanced-json-rpc (v3.2.1): Extracting archive - Installing psr/log (2.0.0): Extracting archive - Installing composer/xdebug-handler (3.0.4): Extracting archive - Installing phan/phan (5.4.1): Extracting archive - Installing mediawiki/phan-taint-check-plugin (4.0.0): Extracting archive - Installing mediawiki/mediawiki-phan-config (0.12.1): Extracting archive - Installing mediawiki/minus-x (1.1.1): Extracting archive - Installing php-parallel-lint/php-console-color (v1.0.1): Extracting archive - Installing php-parallel-lint/php-console-highlighter (v1.0.0): Extracting archive - Installing php-parallel-lint/php-parallel-lint (v1.3.2): Extracting archive 0/36 [>---------------------------] 0% 19/36 [==============>-------------] 52% 35/36 [===========================>] 97% 36/36 [============================] 100% 3 package suggestions were added by new dependencies, use `composer suggest` to see details. Generating autoload files 15 packages you are using are looking for funding. Use the `composer fund` command to find out more! --- stdout --- --- end --- Upgrading n:grunt-banana-checker from 0.11.0 -> 0.11.1 $ /usr/bin/npm install --- stdout --- added 307 packages, and audited 308 packages in 4s 52 packages are looking for funding run `npm fund` for details found 0 vulnerabilities --- end --- $ package-lock-lint package-lock.json --- stdout --- Checking package-lock.json --- end --- $ /usr/bin/npm ci --- stdout --- added 307 packages, and audited 308 packages in 4s 52 packages are looking for funding run `npm fund` for details found 0 vulnerabilities --- end --- $ /usr/bin/npm test --- stdout --- > test > grunt test Running "eslint:all" (eslint) task /src/repo/UserBoard/resources/js/BoardBlast.js 84:9 warning 'x' declared on line 76 column 13 is used outside of binding context block-scoped-var 84:16 warning 'x' declared on line 76 column 13 is used outside of binding context block-scoped-var 84:38 warning 'x' declared on line 76 column 13 is used outside of binding context block-scoped-var 85:15 warning 'x' declared on line 76 column 13 is used outside of binding context block-scoped-var /src/repo/UserProfile/resources/js/UpdateProfile.js 37:10 warning 'x' declared on line 27 column 13 is used outside of binding context block-scoped-var 37:17 warning 'x' declared on line 27 column 13 is used outside of binding context block-scoped-var 37:67 warning 'x' declared on line 27 column 13 is used outside of binding context block-scoped-var 38:77 warning 'x' declared on line 27 column 13 is used outside of binding context block-scoped-var 39:43 warning 'x' declared on line 27 column 13 is used outside of binding context block-scoped-var 39:135 warning 'x' declared on line 27 column 13 is used outside of binding context block-scoped-var /src/repo/shared/LightBox.js 16:1 warning Missing JSDoc @return type jsdoc/require-returns-type 37:1 warning Missing JSDoc @return type jsdoc/require-returns-type 88:1 warning Missing JSDoc @param "numberMillis" type jsdoc/require-param-type 104:1 warning Missing JSDoc @param "objLink" type jsdoc/require-param-type 277:1 warning Missing JSDoc @param "element" type jsdoc/require-param-type 278:1 warning Missing JSDoc @return type jsdoc/require-returns-type /src/repo/shared/flash.js 8:1 warning Invalid JSDoc tag name "date" jsdoc/check-tag-names ✖ 17 problems (0 errors, 17 warnings) Running "banana:all" (banana) task >> 9 message directories checked. Done. --- end --- Upgrading c:mediawiki/mediawiki-codesniffer from 41.0.0 -> 43.0.0 Upgrading c:mediawiki/mediawiki-phan-config from 0.12.1 -> 0.14.0 $ /usr/bin/composer update --- stderr --- Loading composer repositories with package information Updating dependencies Lock file operations: 3 installs, 7 updates, 0 removals - Upgrading composer/semver (3.3.2 => 3.4.0) - Locking dealerdirect/phpcodesniffer-composer-installer (v1.0.0) - Upgrading mediawiki/mediawiki-codesniffer (v41.0.0 => v43.0.0) - Upgrading mediawiki/mediawiki-phan-config (0.12.1 => 0.14.0) - Upgrading mediawiki/phan-taint-check-plugin (4.0.0 => 6.0.0) - Upgrading microsoft/tolerant-php-parser (v0.1.1 => v0.1.2) - Upgrading phan/phan (5.4.1 => 5.4.3) - Locking phpcsstandards/phpcsextra (1.1.2) - Locking phpcsstandards/phpcsutils (1.0.9) - Upgrading squizlabs/php_codesniffer (3.7.2 => 3.8.1) Writing lock file Installing dependencies from lock file (including require-dev) Package operations: 3 installs, 7 updates, 0 removals 0 [>---------------------------] 0 [->--------------------------] - Upgrading squizlabs/php_codesniffer (3.7.2 => 3.8.1): Extracting archive - Installing dealerdirect/phpcodesniffer-composer-installer (v1.0.0): Extracting archive - Installing phpcsstandards/phpcsutils (1.0.9): Extracting archive - Installing phpcsstandards/phpcsextra (1.1.2): Extracting archive - Upgrading composer/semver (3.3.2 => 3.4.0): Extracting archive - Upgrading mediawiki/mediawiki-codesniffer (v41.0.0 => v43.0.0): Extracting archive - Upgrading microsoft/tolerant-php-parser (v0.1.1 => v0.1.2): Extracting archive - Upgrading phan/phan (5.4.1 => 5.4.3): Extracting archive - Upgrading mediawiki/phan-taint-check-plugin (4.0.0 => 6.0.0): Extracting archive - Upgrading mediawiki/mediawiki-phan-config (0.12.1 => 0.14.0): Extracting archive 0/8 [>---------------------------] 0% 7/8 [========================>---] 87% 8/8 [============================] 100% Generating autoload files 16 packages you are using are looking for funding. Use the `composer fund` command to find out more! No security vulnerability advisories found --- stdout --- PHP CodeSniffer Config installed_paths set to ../../mediawiki/mediawiki-codesniffer,../../phpcsstandards/phpcsextra,../../phpcsstandards/phpcsutils --- end --- {'PEAR.Functions.ValidDefaultValue.NotAtEnd', 'PSR12.Properties.ConstantVisibility.NotFound', 'Squiz.Scope.MethodScope.Missing', 'MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic', 'MediaWiki.Usage.ForbiddenFunctions.exec', 'Generic.Files.LineLength.TooLong', 'MediaWiki.Files.ClassMatchesFilename.NotMatch', 'MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgTitle', 'MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate', 'MediaWiki.Usage.ExtendClassUsage.FunctionConfigUsage', 'MediaWiki.Usage.DbrQueryUsage.DbrQueryFound', 'MediaWiki.NamingConventions.PrefixedGlobalFunctions.allowedPrefix', 'MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment'} Tests fail! $ vendor/bin/phpcbf --- stdout --- PHPCBF RESULT SUMMARY -------------------------------------------------------------------------------- FILE FIXED REMAINING -------------------------------------------------------------------------------- .../SystemGifts/includes/specials/SpecialSystemGiftManager.php 4 6 /src/repo/UserGifts/includes/specials/SpecialGiveGift.php 8 9 /src/repo/UserProfile/includes/avatar/UploadAvatarTrait.php 2 7 ...temGifts/includes/specials/SpecialSystemGiftManagerLogo.php 4 30 ...repo/UserGifts/includes/specials/SpecialGiftManagerLogo.php 4 29 -------------------------------------------------------------------------------- A TOTAL OF 22 ERRORS WERE FIXED IN 5 FILES -------------------------------------------------------------------------------- Time: 1.33 secs; Memory: 6MB --- end --- $ git checkout .phpcs.xml --- stderr --- Updated 1 path from the index --- stdout --- --- end --- $ /usr/bin/composer install --- stderr --- Installing dependencies from lock file (including require-dev) Verifying lock file contents can be installed on current platform. Nothing to install, update or remove Generating autoload files 16 packages you are using are looking for funding. Use the `composer fund` command to find out more! --- stdout --- --- end --- $ /usr/bin/composer test --- stderr --- > parallel-lint . --exclude vendor --exclude node_modules > minus-x check . > phpcs -sp --cache --- stdout --- PHP 8.2.7 | 10 parallel jobs ............................................................ 60/114 (52 %) ...................................................... 114/114 (100 %) Checked 114 files in 0.4 seconds No syntax error found MinusX ====== Processing /src/repo... ............................................................. ............................................................. ............................................................. ............................................................. ............................................................. ............................................................. ............................................................. ............................................................. ............................................................. ............................................................. ............................................................. ............................................................. ............................................................. ............................................................. ............................................................. ............................................................. ............................................................. ............................................................. ............................................................. ............................................................. ............................................................. .................... All good! ......................................................... 57 / 57 (100%) Time: 344ms; Memory: 12MB --- end --- $ /usr/bin/npm audit --json --- stdout --- { "auditReportVersion": 2, "vulnerabilities": {}, "metadata": { "vulnerabilities": { "info": 0, "low": 0, "moderate": 0, "high": 0, "critical": 0, "total": 0 }, "dependencies": { "prod": 1, "dev": 307, "optional": 0, "peer": 1, "peerOptional": 0, "total": 307 } } } --- end --- $ package-lock-lint package-lock.json --- stdout --- Checking package-lock.json --- end --- build: Updating dependencies composer: * mediawiki/mediawiki-codesniffer: 41.0.0 → 43.0.0 The following sniffs are failing and were disabled: * MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgHooks * mediawiki/mediawiki-phan-config: 0.12.1 → 0.14.0 npm: * grunt-banana-checker: 0.11.0 → 0.11.1 $ git add . --- stdout --- --- end --- $ git commit -F /tmp/tmpjw5rv8z1 --- stdout --- [master 3115b7d] build: Updating dependencies 9 files changed, 56 insertions(+), 50 deletions(-) --- end --- $ git format-patch HEAD~1 --stdout --- stdout --- From 3115b7dd54a8d6844396150f1a6cf9159f90f3b7 Mon Sep 17 00:00:00 2001 From: libraryupgrader <tools.libraryupgrader@tools.wmflabs.org> Date: Tue, 9 Apr 2024 11:41:40 +0000 Subject: [PATCH] build: Updating dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit composer: * mediawiki/mediawiki-codesniffer: 41.0.0 → 43.0.0 The following sniffs are failing and were disabled: * MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgHooks * mediawiki/mediawiki-phan-config: 0.12.1 → 0.14.0 npm: * grunt-banana-checker: 0.11.0 → 0.11.1 Change-Id: I841622cbe07fce4ee44ec2f4dd5282ab91ca9dbb --- .phpcs.xml | 1 + .../specials/SpecialSystemGiftManager.php | 16 +++---- .../specials/SpecialSystemGiftManagerLogo.php | 8 ++-- .../specials/SpecialGiftManagerLogo.php | 8 ++-- .../includes/specials/SpecialGiveGift.php | 44 +++++++++---------- .../includes/avatar/UploadAvatarTrait.php | 4 +- composer.json | 9 +++- package-lock.json | 14 +++--- package.json | 2 +- 9 files changed, 56 insertions(+), 50 deletions(-) diff --git a/.phpcs.xml b/.phpcs.xml index 747a350..dd5f6a8 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -7,6 +7,7 @@ <exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" /> <exclude name="MediaWiki.NamingConventions.PrefixedGlobalFunctions.allowedPrefix" /> <exclude name="MediaWiki.Usage.DbrQueryUsage.DbrQueryFound" /> + <exclude name="MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgHooks" /> <exclude name="MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgTitle" /> <exclude name="MediaWiki.Usage.ExtendClassUsage.FunctionConfigUsage" /> <exclude name="MediaWiki.Usage.ForbiddenFunctions.exec" /> diff --git a/SystemGifts/includes/specials/SpecialSystemGiftManager.php b/SystemGifts/includes/specials/SpecialSystemGiftManager.php index cda8bfe..b46c6bc 100644 --- a/SystemGifts/includes/specials/SpecialSystemGiftManager.php +++ b/SystemGifts/includes/specials/SpecialSystemGiftManager.php @@ -266,15 +266,15 @@ class SystemGiftManager extends SpecialPage { <td class="view-container"> <select name="gift_category">' . "\n"; $g = new SystemGifts(); - foreach ( $g->getCategories() as $category => $id ) { - $sel = ''; - if ( isset( $gift['gift_category'] ) && $gift['gift_category'] == $id ) { - $sel = ' selected="selected"'; - } - $indent = "\t\t\t\t\t\t"; - $form .= $indent . '<option' . $sel . - " value=\"{$id}\">{$category}</option>\n"; + foreach ( $g->getCategories() as $category => $id ) { + $sel = ''; + if ( isset( $gift['gift_category'] ) && $gift['gift_category'] == $id ) { + $sel = ' selected="selected"'; } + $indent = "\t\t\t\t\t\t"; + $form .= $indent . '<option' . $sel . + " value=\"{$id}\">{$category}</option>\n"; + } $form .= "\t\t\t\t\t" . '</select> </td> </tr> diff --git a/SystemGifts/includes/specials/SpecialSystemGiftManagerLogo.php b/SystemGifts/includes/specials/SpecialSystemGiftManagerLogo.php index 61644f2..31bf0a4 100644 --- a/SystemGifts/includes/specials/SpecialSystemGiftManagerLogo.php +++ b/SystemGifts/includes/specials/SpecialSystemGiftManagerLogo.php @@ -208,7 +208,7 @@ class SystemGiftManagerLogo extends UnlistedSpecialPage { * We'll want to blacklist against *any* 'extension', and use * only the final one for the whitelist. */ - list( $partname, $ext ) = UploadBase::splitExtensions( $basename ); + [ $partname, $ext ] = UploadBase::splitExtensions( $basename ); if ( count( $ext ) ) { $finalExt = $ext[count( $ext ) - 1]; } else { @@ -302,7 +302,7 @@ class SystemGiftManagerLogo extends UnlistedSpecialPage { function createThumbnail( $imageSrc, $ext, $imgDest, $thumbWidth ) { global $wgUseImageMagick, $wgImageMagickConvertCommand; - list( $origWidth, $origHeight, $typeCode ) = getimagesize( $imageSrc ); + [ $origWidth, $origHeight, $typeCode ] = getimagesize( $imageSrc ); $backend = new SocialProfileFileBackend( 'awards' ); $dir = $backend->getContainerStoragePath(); @@ -757,11 +757,11 @@ class SystemGiftManagerLogo extends UnlistedSpecialPage { $source = " <td align='right' nowrap='nowrap'>" . $this->msg( 'filestatus' )->escaped() . "</td> <td><input tabindex='3' type='text' name=\"wpUploadCopyStatus\" value=\"" . - htmlspecialchars( $this->mUploadCopyStatus ) . "\" size='40' /></td> + htmlspecialchars( $this->mUploadCopyStatus ) . "\" size='40' /></td> </tr><tr> <td align='right'>" . $this->msg( 'filesource' )->escaped() . "</td> <td><input tabindex='4' type='text' name='wpUploadSource' id='wpUploadSource' value=\"" . - htmlspecialchars( $this->mUploadSource ) . "\" /></td> + htmlspecialchars( $this->mUploadSource ) . "\" /></td> "; } diff --git a/UserGifts/includes/specials/SpecialGiftManagerLogo.php b/UserGifts/includes/specials/SpecialGiftManagerLogo.php index ecf5208..4a35c79 100644 --- a/UserGifts/includes/specials/SpecialGiftManagerLogo.php +++ b/UserGifts/includes/specials/SpecialGiftManagerLogo.php @@ -232,7 +232,7 @@ class GiftManagerLogo extends UnlistedSpecialPage { * We'll want to blacklist against *any* 'extension', and use * only the final one for the whitelist. */ - list( $partname, $ext ) = UploadBase::splitExtensions( $basename ); + [ $partname, $ext ] = UploadBase::splitExtensions( $basename ); if ( count( $ext ) ) { $finalExt = $ext[count( $ext ) - 1]; } else { @@ -330,7 +330,7 @@ class GiftManagerLogo extends UnlistedSpecialPage { function createThumbnail( $imageSrc, $ext, $imgDest, $thumbWidth ) { global $wgUseImageMagick, $wgImageMagickConvertCommand; - list( $origWidth, $origHeight, $typeCode ) = getimagesize( $imageSrc ); + [ $origWidth, $origHeight, $typeCode ] = getimagesize( $imageSrc ); $backend = new SocialProfileFileBackend( 'awards' ); $dir = $backend->getContainerStoragePath(); @@ -781,11 +781,11 @@ class GiftManagerLogo extends UnlistedSpecialPage { $source = " <td align='right' nowrap='nowrap'>" . htmlspecialchars( $this->msg( 'filestatus' )->plain() ) . "</td> <td><input tabindex='3' type='text' name=\"wpUploadCopyStatus\" value=\"" . - htmlspecialchars( $this->mUploadCopyStatus ) . "\" size='40' /></td> + htmlspecialchars( $this->mUploadCopyStatus ) . "\" size='40' /></td> </tr><tr> <td align='right'>" . htmlspecialchars( $this->msg( 'filesource' )->plain() ) . "</td> <td><input tabindex='4' type='text' name='wpUploadSource' value=\"" . - htmlspecialchars( $this->mUploadSource ) . "\" style='width:100px' /></td> + htmlspecialchars( $this->mUploadSource ) . "\" style='width:100px' /></td> "; } diff --git a/UserGifts/includes/specials/SpecialGiveGift.php b/UserGifts/includes/specials/SpecialGiveGift.php index 7b75784..7bd7784 100644 --- a/UserGifts/includes/specials/SpecialGiveGift.php +++ b/UserGifts/includes/specials/SpecialGiveGift.php @@ -315,37 +315,37 @@ class GiveGift extends SpecialPage { // If friending is enabled, build a dropdown menu of the user's // friends - if ( $wgFriendingEnabled ) { - $user = $this->getUser(); + if ( $wgFriendingEnabled ) { + $user = $this->getUser(); - $listLookup = new RelationshipListLookup( $user ); - $friends = $listLookup->getFriendList(); + $listLookup = new RelationshipListLookup( $user ); + $friends = $listLookup->getFriendList(); - if ( $friends ) { - $output .= '<div class="g-give-title">' . - $this->msg( 'g-give-list-friends-title' )->escaped() . - '</div> + if ( $friends ) { + $output .= '<div class="g-give-title">' . + $this->msg( 'g-give-list-friends-title' )->escaped() . + '</div> <div class="g-gift-select"> <select name="friend-list"> <option value="#" selected="selected">' . - $this->msg( 'g-select-a-friend' )->escaped() . - '</option>'; - foreach ( $friends as $friend ) { - $friendActor = User::newFromActorId( $friend['actor'] ); - if ( !$friendActor || !$friendActor instanceof User ) { - continue; - } - $output .= '<option value="' . htmlspecialchars( $friendActor->getName() ) . '">' . - htmlspecialchars( $friendActor->getName() ) . - '</option>' . "\n"; + $this->msg( 'g-select-a-friend' )->escaped() . + '</option>'; + foreach ( $friends as $friend ) { + $friendActor = User::newFromActorId( $friend['actor'] ); + if ( !$friendActor || !$friendActor instanceof User ) { + continue; } - $output .= '</select> + $output .= '<option value="' . htmlspecialchars( $friendActor->getName() ) . '">' . + htmlspecialchars( $friendActor->getName() ) . + '</option>' . "\n"; + } + $output .= '</select> </div> <div class="g-give-separator">' . - $this->msg( 'g-give-separator' )->escaped() . - '</div>'; - } + $this->msg( 'g-give-separator' )->escaped() . + '</div>'; } + } $output .= '<div class="g-give-title">' . $this->msg( 'g-give-enter-friend-title' )->escaped() . diff --git a/UserProfile/includes/avatar/UploadAvatarTrait.php b/UserProfile/includes/avatar/UploadAvatarTrait.php index bee9f49..e9f3680 100644 --- a/UserProfile/includes/avatar/UploadAvatarTrait.php +++ b/UserProfile/includes/avatar/UploadAvatarTrait.php @@ -34,7 +34,7 @@ trait UploadAvatarTrait { } if ( $wgUseImageMagick ) { // ImageMagick is enabled - list( $origWidth, $origHeight, $typeCode ) = $imageInfo; + [ $origWidth, $origHeight, $typeCode ] = $imageInfo; if ( $origWidth < $thumbWidth ) { $thumbWidth = $origWidth; @@ -103,7 +103,7 @@ trait UploadAvatarTrait { } } else { // ImageMagick is not enabled, so fall back to PHP's GD library // Get the image size, used in calculations later. - list( $origWidth, $origHeight, $typeCode ) = getimagesize( $imageSrc ); + [ $origWidth, $origHeight, $typeCode ] = getimagesize( $imageSrc ); $fullImage = ''; $ext = ''; diff --git a/composer.json b/composer.json index a285e94..39dcc78 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "require-dev": { - "mediawiki/mediawiki-codesniffer": "41.0.0", - "mediawiki/mediawiki-phan-config": "0.12.1", + "mediawiki/mediawiki-codesniffer": "43.0.0", + "mediawiki/mediawiki-phan-config": "0.14.0", "mediawiki/minus-x": "1.1.1", "php-parallel-lint/php-console-highlighter": "1.0.0", "php-parallel-lint/php-parallel-lint": "1.3.2" @@ -18,5 +18,10 @@ ], "phan": "phan -d . --long-progress-bar", "phpcs": "phpcs -sp --cache" + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } } } diff --git a/package-lock.json b/package-lock.json index 81c0c07..5472ed7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "devDependencies": { "eslint-config-wikimedia": "0.26.0", "grunt": "1.6.1", - "grunt-banana-checker": "0.11.0", + "grunt-banana-checker": "0.11.1", "grunt-eslint": "24.3.0" } }, @@ -1922,9 +1922,9 @@ } }, "node_modules/grunt-banana-checker": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/grunt-banana-checker/-/grunt-banana-checker-0.11.0.tgz", - "integrity": "sha512-qXtcxu7y9GFEIx6ELm5jSf+JqvCafdco+t/YsrUhUDNe9AgCnP7X0R+PxT0qZaDftKVrDrR2gPOYqpaAye5bDw==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/grunt-banana-checker/-/grunt-banana-checker-0.11.1.tgz", + "integrity": "sha512-CF0h/TXaX9sbF2yIz+fUfJc4Zvms7XGYQ7ZYMD5+vv0LMZzSFf7JSHXDaBEs72nQWw4r4ap5fOW3baAliW+0bQ==", "dev": true, "bin": { "banana-checker": "src/cli.js" @@ -5019,9 +5019,9 @@ } }, "grunt-banana-checker": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/grunt-banana-checker/-/grunt-banana-checker-0.11.0.tgz", - "integrity": "sha512-qXtcxu7y9GFEIx6ELm5jSf+JqvCafdco+t/YsrUhUDNe9AgCnP7X0R+PxT0qZaDftKVrDrR2gPOYqpaAye5bDw==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/grunt-banana-checker/-/grunt-banana-checker-0.11.1.tgz", + "integrity": "sha512-CF0h/TXaX9sbF2yIz+fUfJc4Zvms7XGYQ7ZYMD5+vv0LMZzSFf7JSHXDaBEs72nQWw4r4ap5fOW3baAliW+0bQ==", "dev": true }, "grunt-cli": { diff --git a/package.json b/package.json index e033576..10d06f2 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "devDependencies": { "eslint-config-wikimedia": "0.26.0", "grunt": "1.6.1", - "grunt-banana-checker": "0.11.0", + "grunt-banana-checker": "0.11.1", "grunt-eslint": "24.3.0" } } -- 2.39.2 --- end ---