diff --git a/composer.lock b/composer.lock index 823175bb8fa6..f343bb10475d 100644 --- a/composer.lock +++ b/composer.lock @@ -648,21 +648,21 @@ "source": { "type": "git", "url": "https://github.com/Automattic/VIP-Coding-Standards.git", - "reference": "463dc5312d0dbc377e02522cb3c1713c23b6cda4" + "reference": "9e915285b9e3a0243601149f8c6dbc9011f685dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/VIP-Coding-Standards/zipball/463dc5312d0dbc377e02522cb3c1713c23b6cda4", - "reference": "463dc5312d0dbc377e02522cb3c1713c23b6cda4", + "url": "https://api.github.com/repos/Automattic/VIP-Coding-Standards/zipball/9e915285b9e3a0243601149f8c6dbc9011f685dc", + "reference": "9e915285b9e3a0243601149f8c6dbc9011f685dc", "shasum": "" }, "require": { "php": ">=5.4", "phpcsstandards/phpcsextra": "^1.2.1", - "phpcsstandards/phpcsutils": "^1.0.9", - "sirbrillig/phpcs-variable-analysis": "^2.11.17", - "squizlabs/php_codesniffer": "^3.8.0", - "wp-coding-standards/wpcs": "^3.0" + "phpcsstandards/phpcsutils": "^1.0.11", + "sirbrillig/phpcs-variable-analysis": "^2.11.18", + "squizlabs/php_codesniffer": "^3.9.2", + "wp-coding-standards/wpcs": "^3.1.0" }, "require-dev": { "php-parallel-lint/php-console-highlighter": "^1.0.0", @@ -695,7 +695,7 @@ "source": "https://github.com/Automattic/VIP-Coding-Standards", "wiki": "https://github.com/Automattic/VIP-Coding-Standards/wiki" }, - "time": "2024-04-24T12:58:58+00:00" + "time": "2024-05-10T14:32:41+00:00" }, { "name": "brain/monkey", @@ -913,16 +913,16 @@ }, { "name": "composer/xdebug-handler", - "version": "3.0.4", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255" + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/4f988f8fdf580d53bdb2d1278fe93d1ed5462255", - "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef", "shasum": "" }, "require": { @@ -959,7 +959,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.4" + "source": "https://github.com/composer/xdebug-handler/tree/3.0.5" }, "funding": [ { @@ -975,7 +975,7 @@ "type": "tidelift" } ], - "time": "2024-03-26T18:29:49+00:00" + "time": "2024-05-06T16:37:16+00:00" }, { "name": "dealerdirect/phpcodesniffer-composer-installer", @@ -2309,16 +2309,16 @@ }, { "name": "php-stubs/woocommerce-stubs", - "version": "v8.8.3", + "version": "v8.9.0", "source": { "type": "git", "url": "https://github.com/php-stubs/woocommerce-stubs.git", - "reference": "a0d52f2fee4e3dac8f2629fd80657ddf7c86b64f" + "reference": "2c0bb50a76a703206151fac3123faec6ba7d5879" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-stubs/woocommerce-stubs/zipball/a0d52f2fee4e3dac8f2629fd80657ddf7c86b64f", - "reference": "a0d52f2fee4e3dac8f2629fd80657ddf7c86b64f", + "url": "https://api.github.com/repos/php-stubs/woocommerce-stubs/zipball/2c0bb50a76a703206151fac3123faec6ba7d5879", + "reference": "2c0bb50a76a703206151fac3123faec6ba7d5879", "shasum": "" }, "require": { @@ -2347,22 +2347,22 @@ ], "support": { "issues": "https://github.com/php-stubs/woocommerce-stubs/issues", - "source": "https://github.com/php-stubs/woocommerce-stubs/tree/v8.8.3" + "source": "https://github.com/php-stubs/woocommerce-stubs/tree/v8.9.0" }, - "time": "2024-04-29T17:39:19+00:00" + "time": "2024-05-14T16:07:36+00:00" }, { "name": "php-stubs/wordpress-stubs", - "version": "v6.5.2", + "version": "v6.5.3", "source": { "type": "git", "url": "https://github.com/php-stubs/wordpress-stubs.git", - "reference": "379f17a90c01498d4c99a0d15aab6e7aa6a2c840" + "reference": "e611a83292d02055a25f83291a98fadd0c21e092" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/379f17a90c01498d4c99a0d15aab6e7aa6a2c840", - "reference": "379f17a90c01498d4c99a0d15aab6e7aa6a2c840", + "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/e611a83292d02055a25f83291a98fadd0c21e092", + "reference": "e611a83292d02055a25f83291a98fadd0c21e092", "shasum": "" }, "require-dev": { @@ -2394,9 +2394,9 @@ ], "support": { "issues": "https://github.com/php-stubs/wordpress-stubs/issues", - "source": "https://github.com/php-stubs/wordpress-stubs/tree/v6.5.2" + "source": "https://github.com/php-stubs/wordpress-stubs/tree/v6.5.3" }, - "time": "2024-04-14T17:30:14+00:00" + "time": "2024-05-08T02:12:31+00:00" }, { "name": "php-stubs/wordpress-tests-stubs", @@ -2984,16 +2984,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.67", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "16ddbe776f10da6a95ebd25de7c1dbed397dc493" + "reference": "e524358f930e41a2b4cca1320e3b04fc26b39e0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/16ddbe776f10da6a95ebd25de7c1dbed397dc493", - "reference": "16ddbe776f10da6a95ebd25de7c1dbed397dc493", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e524358f930e41a2b4cca1320e3b04fc26b39e0b", + "reference": "e524358f930e41a2b4cca1320e3b04fc26b39e0b", "shasum": "" }, "require": { @@ -3038,29 +3038,28 @@ "type": "github" } ], - "time": "2024-04-16T07:22:02+00:00" + "time": "2024-05-15T08:00:59+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", - "version": "1.1.4", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", - "reference": "089d8a8258ed0aeefdc7b68b6c3d25572ebfdbaa" + "reference": "fa8cce7720fa782899a0aa97b6a41225d1bb7b26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/089d8a8258ed0aeefdc7b68b6c3d25572ebfdbaa", - "reference": "089d8a8258ed0aeefdc7b68b6c3d25572ebfdbaa", + "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/fa8cce7720fa782899a0aa97b6a41225d1bb7b26", + "reference": "fa8cce7720fa782899a0aa97b6a41225d1bb7b26", "shasum": "" }, "require": { "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.10.3" + "phpstan/phpstan": "^1.11" }, "require-dev": { "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/phpstan-php-parser": "^1.1", "phpstan/phpstan-phpunit": "^1.0", "phpunit/phpunit": "^9.5" }, @@ -3084,27 +3083,27 @@ "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.", "support": { "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues", - "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/1.1.4" + "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/1.2.0" }, - "time": "2023-08-05T09:02:04+00:00" + "time": "2024-04-20T06:39:48+00:00" }, { "name": "phpstan/phpstan-phpunit", - "version": "1.3.16", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-phpunit.git", - "reference": "d5242a59d035e46774f2e634b374bc39ff62cb95" + "reference": "f3ea021866f4263f07ca3636bf22c64be9610c11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/d5242a59d035e46774f2e634b374bc39ff62cb95", - "reference": "d5242a59d035e46774f2e634b374bc39ff62cb95", + "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/f3ea021866f4263f07ca3636bf22c64be9610c11", + "reference": "f3ea021866f4263f07ca3636bf22c64be9610c11", "shasum": "" }, "require": { "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.10" + "phpstan/phpstan": "^1.11" }, "conflict": { "phpunit/phpunit": "<7.0" @@ -3136,9 +3135,9 @@ "description": "PHPUnit extensions and rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-phpunit/issues", - "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.3.16" + "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.4.0" }, - "time": "2024-02-23T09:51:20+00:00" + "time": "2024-04-20T06:39:00+00:00" }, { "name": "phpunit/php-code-coverage", @@ -3716,12 +3715,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "386924e51b2e98d13dcc88bb530807046edbda90" + "reference": "8eea9afb8060c8ef05c89f02b123329f43e9ba4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/386924e51b2e98d13dcc88bb530807046edbda90", - "reference": "386924e51b2e98d13dcc88bb530807046edbda90", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/8eea9afb8060c8ef05c89f02b123329f43e9ba4e", + "reference": "8eea9afb8060c8ef05c89f02b123329f43e9ba4e", "shasum": "" }, "conflict": { @@ -3803,7 +3802,7 @@ "chriskacerguis/codeigniter-restserver": "<=2.7.1", "civicrm/civicrm-core": ">=4.2,<4.2.9|>=4.3,<4.3.3", "ckeditor/ckeditor": "<4.24", - "cockpit-hq/cockpit": "<=2.6.3|==2.7", + "cockpit-hq/cockpit": "<2.7|==2.7", "codeception/codeception": "<3.1.3|>=4,<4.1.22", "codeigniter/framework": "<3.1.9", "codeigniter4/framework": "<4.4.7", @@ -3923,7 +3922,7 @@ "friendsoftypo3/mediace": ">=7.6.2,<7.6.5", "friendsoftypo3/openid": ">=4.5,<4.5.31|>=4.7,<4.7.16|>=6,<6.0.11|>=6.1,<6.1.6", "froala/wysiwyg-editor": "<3.2.7|>=4.0.1,<=4.1.3", - "froxlor/froxlor": "<=2.1.1", + "froxlor/froxlor": "<2.1.9", "frozennode/administrator": "<=5.0.12", "fuel/core": "<1.8.1", "funadmin/funadmin": "<=3.2|>=3.3.2,<=3.3.3", @@ -4003,7 +4002,7 @@ "kelvinmo/simplexrd": "<3.1.1", "kevinpapst/kimai2": "<1.16.7", "khodakhah/nodcms": "<=3", - "kimai/kimai": "<2.13", + "kimai/kimai": "<2.16", "kitodo/presentation": "<3.2.3|>=3.3,<3.3.4", "klaviyo/magento2-extension": ">=1,<3", "knplabs/knp-snappy": "<=1.4.2", @@ -4044,7 +4043,7 @@ "magneto/core": "<1.9.4.4-dev", "maikuolan/phpmussel": ">=1,<1.6", "mainwp/mainwp": "<=4.4.3.3", - "mantisbt/mantisbt": "<2.26.1", + "mantisbt/mantisbt": "<2.26.2", "marcwillmann/turn": "<0.3.3", "matyhtf/framework": "<3.0.6", "mautic/core": "<4.4.12|>=5.0.0.0-alpha,<5.0.4", @@ -4129,6 +4128,7 @@ "padraic/humbug_get_contents": "<1.1.2", "pagarme/pagarme-php": "<3", "pagekit/pagekit": "<=1.0.18", + "paragonie/ecc": "<2.0.1", "paragonie/random_compat": "<2", "passbolt/passbolt_api": "<4.6.2", "paypal/adaptivepayments-sdk-php": "<=3.9.2", @@ -4143,6 +4143,7 @@ "personnummer/personnummer": "<3.0.2", "phanan/koel": "<5.1.4", "phenx/php-svg-lib": "<0.5.2", + "php-censor/php-censor": "<2.0.13|>=2.1,<2.1.5", "php-mod/curl": "<2.3.2", "phpbb/phpbb": "<3.2.10|>=3.3,<3.3.1", "phpems/phpems": ">=6,<=6.1.3", @@ -4168,7 +4169,7 @@ "pimcore/demo": "<10.3", "pimcore/ecommerce-framework-bundle": "<1.0.10", "pimcore/perspective-editor": "<1.5.1", - "pimcore/pimcore": "<11.2.3", + "pimcore/pimcore": "<11.1.6.5-dev|>=11.2,<11.2.3", "pixelfed/pixelfed": "<0.11.11", "plotly/plotly.js": "<2.25.2", "pocketmine/bedrock-protocol": "<8.0.2", @@ -4180,7 +4181,7 @@ "prestashop/blockwishlist": ">=2,<2.1.1", "prestashop/contactform": ">=1.0.1,<4.3", "prestashop/gamification": "<2.3.2", - "prestashop/prestashop": "<8.1.4", + "prestashop/prestashop": "<8.1.6", "prestashop/productcomments": "<5.0.2", "prestashop/ps_emailsubscription": "<2.6.1", "prestashop/ps_facetedsearch": "<3.4.1", @@ -4264,6 +4265,7 @@ "socalnick/scn-social-auth": "<1.15.2", "socialiteproviders/steam": "<1.1", "spatie/browsershot": "<3.57.4", + "spatie/image-optimizer": "<1.7.3", "spipu/html2pdf": "<5.2.8", "spoon/library": "<1.4.1", "spoonity/tcpdf": "<6.2.22", @@ -4285,7 +4287,7 @@ "sylius/grid-bundle": "<1.10.1", "sylius/paypal-plugin": ">=1,<1.2.4|>=1.3,<1.3.1", "sylius/resource-bundle": ">=1,<1.3.14|>=1.4,<1.4.7|>=1.5,<1.5.2|>=1.6,<1.6.4", - "sylius/sylius": "<=1.12.13", + "sylius/sylius": "<1.12.16|>=1.13.0.0-alpha1,<1.13.1", "symbiote/silverstripe-multivaluefield": ">=3,<3.0.99", "symbiote/silverstripe-queuedjobs": ">=3,<3.0.2|>=3.1,<3.1.4|>=4,<4.0.7|>=4.1,<4.1.2|>=4.2,<4.2.4|>=4.3,<4.3.3|>=4.4,<4.4.3|>=4.5,<4.5.1|>=4.6,<4.6.4", "symbiote/silverstripe-seed": "<6.0.3", @@ -4341,7 +4343,7 @@ "tinymighty/wiki-seo": "<1.2.2", "titon/framework": "<9.9.99", "tobiasbg/tablepress": "<=2.0.0.0-RC1", - "topthink/framework": "<6.0.14", + "topthink/framework": "<6.0.17|>=6.1,<6.1.5|>=8,<8.0.4", "topthink/think": "<=6.1.1", "topthink/thinkphp": "<=3.2.3", "torrentpier/torrentpier": "<=2.4.1", @@ -4352,7 +4354,7 @@ "twig/twig": "<1.44.7|>=2,<2.15.3|>=3,<3.4.3", "typo3/cms": "<9.5.29|>=10,<10.4.35|>=11,<11.5.23|>=12,<12.2", "typo3/cms-backend": "<4.1.14|>=4.2,<4.2.15|>=4.3,<4.3.7|>=4.4,<4.4.4|>=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", - "typo3/cms-core": "<=8.7.56|>=9,<=9.5.45|>=10,<=10.4.42|>=11,<=11.5.34|>=12,<=12.4.10|==13", + "typo3/cms-core": "<=8.7.56|>=9,<=9.5.47|>=10,<=10.4.44|>=11,<=11.5.36|>=12,<=12.4.14|>=13,<=13.1", "typo3/cms-extbase": "<6.2.24|>=7,<7.6.8|==8.1.1", "typo3/cms-fluid": "<4.3.4|>=4.4,<4.4.1", "typo3/cms-form": ">=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", @@ -4500,7 +4502,7 @@ "type": "tidelift" } ], - "time": "2024-05-06T15:04:21+00:00" + "time": "2024-05-14T22:04:50+00:00" }, { "name": "sebastian/cli-parser", @@ -5590,22 +5592,22 @@ }, { "name": "sniccowp/php-scoper-wordpress-excludes", - "version": "6.5.2", + "version": "6.5.3", "source": { "type": "git", "url": "https://github.com/snicco/php-scoper-wordpress-excludes.git", - "reference": "e7dd1dfa0b7aa3d24a496f3b36c1b76baf3717d2" + "reference": "254c0e1107c1259c59da0250047f55e77af5b0d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/snicco/php-scoper-wordpress-excludes/zipball/e7dd1dfa0b7aa3d24a496f3b36c1b76baf3717d2", - "reference": "e7dd1dfa0b7aa3d24a496f3b36c1b76baf3717d2", + "url": "https://api.github.com/repos/snicco/php-scoper-wordpress-excludes/zipball/254c0e1107c1259c59da0250047f55e77af5b0d9", + "reference": "254c0e1107c1259c59da0250047f55e77af5b0d9", "shasum": "" }, "require-dev": { "php": "^7.4", "php-stubs/wordpress-globals": "0.2.0", - "php-stubs/wordpress-stubs": "6.5.2", + "php-stubs/wordpress-stubs": "6.5.3", "sniccowp/php-scoper-excludes": "dev-master" }, "type": "library", @@ -5631,9 +5633,9 @@ ], "support": { "issues": "https://github.com/snicco/php-scoper-wordpress-excludes/issues", - "source": "https://github.com/snicco/php-scoper-wordpress-excludes/tree/6.5.2" + "source": "https://github.com/snicco/php-scoper-wordpress-excludes/tree/6.5.3" }, - "time": "2024-04-15T00:20:07+00:00" + "time": "2024-05-09T00:02:32+00:00" }, { "name": "squizlabs/php_codesniffer", diff --git a/includes/REST_API/Hotlinking_Controller.php b/includes/REST_API/Hotlinking_Controller.php index 7e9d8337dfc2..149d17253dd3 100644 --- a/includes/REST_API/Hotlinking_Controller.php +++ b/includes/REST_API/Hotlinking_Controller.php @@ -69,14 +69,24 @@ * type?: SchemaEntry * } * } - * @phpstan-type URLParts array{ - * scheme?: string, - * user?: string, - * pass?: string, - * host?: string, - * port?: int, - * path?: string, - * query?: string + * @phpstan-type HttpArgs array{ + * method?: string, + * timeout?: float, + * redirection?: int, + * httpversion?: string, + * user-agent?: string, + * reject_unsafe_urls?: bool, + * blocking?: bool, + * headers?: string|array, + * cookies?: array, + * body?: string|string[], + * compress?: bool, + * decompress?: bool, + * sslverify?: bool, + * sslcertificates?: string, + * stream?: bool, + * filename?: string, + * limit_response_size?: int * } */ class Hotlinking_Controller extends REST_Controller implements HasRequirements { @@ -662,28 +672,10 @@ public function stream_headers( $handle, $header ): int { * * @since 1.15.0 * - * @param string $url Request URL. - * @param array $args Request args. - * - * @phpstan-param array{ - * method?: string, - * timeout?: float, - * redirection?: int, - * httpversion?: string, - * user-agent?: string, - * reject_unsafe_urls?: bool, - * blocking?: bool, - * headers?: string|array, - * cookies?: array, - * body?: string|array, - * compress?: bool, - * decompress?: bool, - * sslverify?: bool, - * sslcertificates?: string, - * stream?: bool, - * filename?: string, - * limit_response_size?: int, - * } $args + * @param string $url Request URL. + * @param array $args Request args. + * + * @phpstan-param HttpArgs $args */ private function proxy_url_curl( string $url, array $args ): void { add_action( 'http_api_curl', [ $this, 'modify_curl_configuration' ] ); @@ -703,28 +695,10 @@ private function proxy_url_curl( string $url, array $args ): void { * * @since 1.15.0 * - * @param string $url Request URL. - * @param array $args Request args. - * - * @phpstan-param array{ - * method?: string, - * timeout?: float, - * redirection?: int, - * httpversion?: string, - * user-agent?: string, - * reject_unsafe_urls?: bool, - * blocking?: bool, - * headers?: string|array, - * cookies?: array, - * body?: string|array, - * compress?: bool, - * decompress?: bool, - * sslverify?: bool, - * sslcertificates?: string, - * stream?: bool, - * filename?: string, - * limit_response_size?: int, - * } $args + * @param string $url Request URL. + * @param array $args Request args. + * + * @phpstan-param HttpArgs $args */ private function proxy_url_fallback( string $url, array $args ): void { $response = wp_safe_remote_get( $url, $args ); diff --git a/phpstan.neon.dist b/phpstan.neon.dist index beb6b975af24..b8f4113027e1 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -16,9 +16,9 @@ services: parameters: level: 9 inferPrivatePropertyTypeFromConstructor: true - checkGenericClassInNonGenericObjectType: false - checkMissingIterableValueType: false ignoreErrors: + - + identifier: missingType.generics - message: '/^Parameter #2 \$args of method WP_Customize_Manager::add_setting\(\)/' path: includes/Admin/Customizer.php