From 19944804b5c0dcaa439939d3b7e069cd94f9391e Mon Sep 17 00:00:00 2001 From: mikkamp Date: Thu, 5 Dec 2024 11:44:15 +0000 Subject: [PATCH 01/12] Explicitly mark parameter types as nullable --- src/Assets/BaseAsset.php | 2 +- src/Assets/ScriptAsset.php | 2 +- src/Assets/ScriptWithBuiltDependenciesAsset.php | 2 +- src/Assets/StyleAsset.php | 2 +- src/Exception/ExceptionWithResponseData.php | 2 +- src/Exception/RuntimeExceptionWithMessageFunction.php | 4 ++-- src/Google/InvalidCouponEntry.php | 6 +++--- src/Infrastructure/View.php | 2 +- src/MerchantCenter/AccountService.php | 2 +- src/MerchantCenter/MerchantStatuses.php | 4 ++-- src/Shipping/ShippingLocation.php | 2 +- src/View/PHPView.php | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/Assets/BaseAsset.php b/src/Assets/BaseAsset.php index d67a5dc2f6..c080b25576 100644 --- a/src/Assets/BaseAsset.php +++ b/src/Assets/BaseAsset.php @@ -94,7 +94,7 @@ public function __construct( string $uri, array $dependencies = [], string $version = '', - callable $enqueue_condition_callback = null + ?callable $enqueue_condition_callback = null ) { $this->file_extension = $file_extension; $this->handle = $handle; diff --git a/src/Assets/ScriptAsset.php b/src/Assets/ScriptAsset.php index fa84fb3554..cb8df1eae7 100644 --- a/src/Assets/ScriptAsset.php +++ b/src/Assets/ScriptAsset.php @@ -52,7 +52,7 @@ public function __construct( string $uri, array $dependencies = [], string $version = '', - callable $enqueue_condition_callback = null, + ?callable $enqueue_condition_callback = null, bool $in_footer = false ) { $this->in_footer = $in_footer; diff --git a/src/Assets/ScriptWithBuiltDependenciesAsset.php b/src/Assets/ScriptWithBuiltDependenciesAsset.php index 4ae1798d76..ebfc179530 100644 --- a/src/Assets/ScriptWithBuiltDependenciesAsset.php +++ b/src/Assets/ScriptWithBuiltDependenciesAsset.php @@ -32,7 +32,7 @@ public function __construct( string $uri, string $build_dependency_path, DependencyArray $fallback_dependency_data, - callable $enqueue_condition_callback = null, + ?callable $enqueue_condition_callback = null, bool $in_footer = true ) { $dependency_data = $this->get_dependency_data( $build_dependency_path, $fallback_dependency_data ); diff --git a/src/Assets/StyleAsset.php b/src/Assets/StyleAsset.php index 89104fb7ad..60df863a8a 100644 --- a/src/Assets/StyleAsset.php +++ b/src/Assets/StyleAsset.php @@ -38,7 +38,7 @@ public function __construct( string $uri, array $dependencies = [], string $version = '', - callable $enqueue_condition_callback = null, + ?callable $enqueue_condition_callback = null, string $media = 'all' ) { $this->media = $media; diff --git a/src/Exception/ExceptionWithResponseData.php b/src/Exception/ExceptionWithResponseData.php index 0963ee6342..04902232cf 100644 --- a/src/Exception/ExceptionWithResponseData.php +++ b/src/Exception/ExceptionWithResponseData.php @@ -28,7 +28,7 @@ class ExceptionWithResponseData extends Exception implements GoogleListingsAndAd * @param Throwable|null $previous [optional] The previous throwable used for the exception chaining. * @param array $data [optional] Extra data to attach to the exception (ostensibly for use in an HTTP response). */ - public function __construct( string $message = '', int $code = 0, Throwable $previous = null, array $data = [] ) { + public function __construct( string $message = '', int $code = 0, ?Throwable $previous = null, array $data = [] ) { parent::__construct( $message, $code, $previous ); if ( ! empty( $data ) && is_array( $data ) ) { diff --git a/src/Exception/RuntimeExceptionWithMessageFunction.php b/src/Exception/RuntimeExceptionWithMessageFunction.php index c723cf6e0f..4727f95206 100644 --- a/src/Exception/RuntimeExceptionWithMessageFunction.php +++ b/src/Exception/RuntimeExceptionWithMessageFunction.php @@ -29,9 +29,9 @@ class RuntimeExceptionWithMessageFunction extends RuntimeException implements Go * @param string $message [optional] The Exception message to throw. * @param int $code [optional] The Exception code. * @param Throwable|null $previous [optional] The previous throwable used for the exception chaining. - * @param callable $message_function [optional] Function to format/translate the message string. + * @param callable|null $message_function [optional] Function to format/translate the message string. */ - public function __construct( string $message = '', int $code = 0, Throwable $previous = null, ?callable $message_function = null ) { + public function __construct( string $message = '', int $code = 0, ?Throwable $previous = null, ?callable $message_function = null ) { parent::__construct( $message, $code, $previous ); $this->message_function = $message_function; } diff --git a/src/Google/InvalidCouponEntry.php b/src/Google/InvalidCouponEntry.php index 7c704ae628..9452c0efe2 100644 --- a/src/Google/InvalidCouponEntry.php +++ b/src/Google/InvalidCouponEntry.php @@ -42,14 +42,14 @@ class InvalidCouponEntry implements JsonSerializable { * * @param int $wc_coupon_id * @param string[] $errors - * @param string $target_country + * @param string|null $target_country * @param string|null $google_promotion_id */ public function __construct( int $wc_coupon_id, array $errors = [], - string $target_country = null, - string $google_promotion_id = null + ?string $target_country = null, + ?string $google_promotion_id = null ) { $this->wc_coupon_id = $wc_coupon_id; $this->target_country = $target_country; diff --git a/src/Infrastructure/View.php b/src/Infrastructure/View.php index 940a97d5ac..48f861e8d3 100644 --- a/src/Infrastructure/View.php +++ b/src/Infrastructure/View.php @@ -35,7 +35,7 @@ public function render( array $context = [] ): string; * * @throws ViewException If the view could not be loaded or provided path was not valid. */ - public function render_partial( string $path, array $context = null ): string; + public function render_partial( string $path, ?array $context = null ): string; /** * Return the raw value of a context property. diff --git a/src/MerchantCenter/AccountService.php b/src/MerchantCenter/AccountService.php index cf2a127fa4..5e71bc94a3 100644 --- a/src/MerchantCenter/AccountService.php +++ b/src/MerchantCenter/AccountService.php @@ -530,7 +530,7 @@ private function link_ads_account() { * * @return ExceptionWithResponseData */ - private function prepare_exception( string $message, array $data = [], int $code = null ): ExceptionWithResponseData { + private function prepare_exception( string $message, array $data = [], ?int $code = null ): ExceptionWithResponseData { $merchant_id = $this->options->get_merchant_id(); if ( $merchant_id && ! isset( $data['id'] ) ) { diff --git a/src/MerchantCenter/MerchantStatuses.php b/src/MerchantCenter/MerchantStatuses.php index b0c7a99222..4011b27741 100644 --- a/src/MerchantCenter/MerchantStatuses.php +++ b/src/MerchantCenter/MerchantStatuses.php @@ -191,7 +191,7 @@ public function get_product_statistics( bool $force_refresh = false ): array { * @return array With two indices, results (may be paged), count (considers type) and loading (indicating whether the data is loading). * @throws Exception If the account state can't be retrieved from Google. */ - public function get_issues( string $type = null, int $per_page = 0, int $page = 1, bool $force_refresh = false ): array { + public function get_issues( ?string $type = null, int $per_page = 0, int $page = 1, bool $force_refresh = false ): array { $job = $this->maybe_refresh_status_data( $force_refresh ); // Get only error issues @@ -328,7 +328,7 @@ public function delete(): void { * @return array The requested issues and the total count of issues. * @throws InvalidValue If the type filter is invalid. */ - protected function fetch_issues( string $type = null, int $per_page = 0, int $page = 1, bool $only_errors = false ): array { + protected function fetch_issues( ?string $type = null, int $per_page = 0, int $page = 1, bool $only_errors = false ): array { /** @var MerchantIssueQuery $issue_query */ $issue_query = $this->container->get( MerchantIssueQuery::class ); diff --git a/src/Shipping/ShippingLocation.php b/src/Shipping/ShippingLocation.php index 459998d1c0..c22904bdf1 100644 --- a/src/Shipping/ShippingLocation.php +++ b/src/Shipping/ShippingLocation.php @@ -45,7 +45,7 @@ class ShippingLocation { * @param string|null $state * @param ShippingRegion|null $shipping_region */ - public function __construct( int $google_id, string $country, ?string $state = null, ShippingRegion $shipping_region = null ) { + public function __construct( int $google_id, string $country, ?string $state = null, ?ShippingRegion $shipping_region = null ) { $this->google_id = $google_id; $this->country = $country; $this->state = $state; diff --git a/src/View/PHPView.php b/src/View/PHPView.php index 82fc0cb04c..32d0fdf137 100644 --- a/src/View/PHPView.php +++ b/src/View/PHPView.php @@ -111,7 +111,7 @@ public function render( array $context = [] ): string { * * @throws ViewException If the view could not be loaded or the provided path was not valid. */ - public function render_partial( string $path, array $context = null ): string { + public function render_partial( string $path, ?array $context = null ): string { return $this->view_factory->create( $path )->render( $context ?: $this->context ); } From b6ba522871b845e48b8575bedad61bd027ebf665 Mon Sep 17 00:00:00 2001 From: mikkamp Date: Thu, 5 Dec 2024 11:44:53 +0000 Subject: [PATCH 02/12] Pass parameters to str_getcsv --- src/DB/Table/BudgetRecommendationTable.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/DB/Table/BudgetRecommendationTable.php b/src/DB/Table/BudgetRecommendationTable.php index 17ef2f0995..300c125da3 100644 --- a/src/DB/Table/BudgetRecommendationTable.php +++ b/src/DB/Table/BudgetRecommendationTable.php @@ -102,7 +102,12 @@ private function load_initial_data(): void { $chunk_size = 500; if ( file_exists( $path ) ) { - $csv = array_map( 'str_getcsv', file( $path ) ); + $csv = array_map( + function ( $row ) { + str_getcsv( $row, ',', '"', '\\' ); + }, + file( $path ) + ); // Remove the headers array_shift( $csv ); From 37583007075ddfcb13131852be1fece3501b7a43 Mon Sep 17 00:00:00 2001 From: mikkamp Date: Thu, 5 Dec 2024 11:45:09 +0000 Subject: [PATCH 03/12] Explicitly mark parameter types as nullable in tools --- bin/GoogleAdsCleanupServices.php | 8 ++++---- bin/SymfonyPolyfillCleanup.php | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/GoogleAdsCleanupServices.php b/bin/GoogleAdsCleanupServices.php index 3a50c91855..4a047f3c08 100644 --- a/bin/GoogleAdsCleanupServices.php +++ b/bin/GoogleAdsCleanupServices.php @@ -61,7 +61,7 @@ class GoogleAdsCleanupServices { * @param Event|null $event Composer event. * @param string|null $path Path of the Ads library. */ - public function __construct( Event $event = null, string $path = null ) { + public function __construct( ?Event $event = null, ?string $path = null ) { $this->event = $event; $this->path = $path ?: dirname( __DIR__ ) . '/vendor/googleads/google-ads-php'; $this->code_path = dirname( __DIR__ ) . '/src'; @@ -70,9 +70,9 @@ public function __construct( Event $event = null, string $path = null ) { /** * Remove unused classes from the library. * - * @param Event $event Event context provided by Composer + * @param Event|null $event Event context provided by Composer */ - public static function remove( Event $event = null ) { + public static function remove( ?Event $event = null ) { $cleanup = new GoogleAdsCleanupServices( $event ); $cleanup->remove_services(); $cleanup->remove_enums(); @@ -263,7 +263,7 @@ protected function find_used_pattern( string $pattern ): array { * * @return array List of matched names. */ - protected function find_library_file_pattern( string $pattern, string $suffix = null ): array { + protected function find_library_file_pattern( string $pattern, ?string $suffix = null ): array { $output = glob( "{$pattern}/*.php" ); if ( empty( $output ) ) { diff --git a/bin/SymfonyPolyfillCleanup.php b/bin/SymfonyPolyfillCleanup.php index 452869ba99..d5190c252b 100644 --- a/bin/SymfonyPolyfillCleanup.php +++ b/bin/SymfonyPolyfillCleanup.php @@ -45,7 +45,7 @@ class SymfonyPolyfillCleanup { * @param Event|null $event Composer event. * @param string|null $path Path of the Symfony library. */ - public function __construct( Event $event = null, string $path = null ) { + public function __construct( ?Event $event = null, ?string $path = null ) { $this->event = $event; $this->path = $path ?: dirname( __DIR__ ) . '/vendor/symfony/'; } @@ -62,9 +62,9 @@ protected function get_list_of_polyfills(): array { /** * Remove PHP 8.0 specific code of Symfony polyfills * - * @param Event $event Event context provided by Composer + * @param Event|null $event Event context provided by Composer */ - public static function remove( Event $event = null ) { + public static function remove( ?Event $event = null ) { $cleanup = new SymfonyPolyfillCleanup( $event ); $cleanup->remove_bootstraps80(); } From ad729fde1f547c3d854412253f98222d9a838ee8 Mon Sep 17 00:00:00 2001 From: mikkamp Date: Thu, 5 Dec 2024 12:00:03 +0000 Subject: [PATCH 04/12] Update guzzle package and direct replacements --- bin/prefix-vendor-namespace.php | 3 +- composer.lock | 78 ++++++++++++++++----------------- 2 files changed, 40 insertions(+), 41 deletions(-) diff --git a/bin/prefix-vendor-namespace.php b/bin/prefix-vendor-namespace.php index 54487ea718..724bd6dc58 100755 --- a/bin/prefix-vendor-namespace.php +++ b/bin/prefix-vendor-namespace.php @@ -124,10 +124,9 @@ 'GuzzleHttp\ClientInterface::VERSION', 'GuzzleHttp\describe_type', 'GuzzleHttp\HandlerStack::create', - 'GuzzleHttp\Message\ResponseInterface)', - 'GuzzleHttp\Psr7\Message::bodySummary', 'GuzzleHttp\Psr7\Utils::streamFor', 'GuzzleHttp\Psr7\Utils::tryFopen', + 'GuzzleHttp\Psr7\Utils::redactUserInfo', ], ]; diff --git a/composer.lock b/composer.lock index 5b4a81cef5..a047d1d04b 100644 --- a/composer.lock +++ b/composer.lock @@ -990,22 +990,22 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.8.1", + "version": "7.9.2", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "41042bc7ab002487b876a0683fc8dce04ddce104" + "reference": "d281ed313b989f213357e3be1a179f02196ac99b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104", - "reference": "41042bc7ab002487b876a0683fc8dce04ddce104", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", + "reference": "d281ed313b989f213357e3be1a179f02196ac99b", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.5.3 || ^2.0.1", - "guzzlehttp/psr7": "^1.9.1 || ^2.5.1", + "guzzlehttp/promises": "^1.5.3 || ^2.0.3", + "guzzlehttp/psr7": "^2.7.0", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -1016,9 +1016,9 @@ "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", - "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "guzzle/client-integration-tests": "3.0.2", "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.36 || ^9.6.15", + "phpunit/phpunit": "^8.5.39 || ^9.6.20", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -1096,7 +1096,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.8.1" + "source": "https://github.com/guzzle/guzzle/tree/7.9.2" }, "funding": [ { @@ -1112,20 +1112,20 @@ "type": "tidelift" } ], - "time": "2023-12-03T20:35:24+00:00" + "time": "2024-07-24T11:22:20+00:00" }, { "name": "guzzlehttp/promises", - "version": "2.0.2", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223" + "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223", - "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223", + "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455", + "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455", "shasum": "" }, "require": { @@ -1133,7 +1133,7 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.36 || ^9.6.15" + "phpunit/phpunit": "^8.5.39 || ^9.6.20" }, "type": "library", "extra": { @@ -1179,7 +1179,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.2" + "source": "https://github.com/guzzle/promises/tree/2.0.4" }, "funding": [ { @@ -1195,20 +1195,20 @@ "type": "tidelift" } ], - "time": "2023-12-03T20:19:20+00:00" + "time": "2024-10-17T10:06:22+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.6.2", + "version": "2.7.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", - "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", "shasum": "" }, "require": { @@ -1223,8 +1223,8 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.36 || ^9.6.15" + "http-interop/http-factory-tests": "0.9.0", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" @@ -1295,7 +1295,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.6.2" + "source": "https://github.com/guzzle/psr7/tree/2.7.0" }, "funding": [ { @@ -1311,7 +1311,7 @@ "type": "tidelift" } ], - "time": "2023-12-03T20:05:35+00:00" + "time": "2024-07-18T11:15:46+00:00" }, { "name": "league/container", @@ -1992,20 +1992,20 @@ }, { "name": "psr/http-factory", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "e616d01114759c4c489f93b099585439f795fe35" + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", - "reference": "e616d01114759c4c489f93b099585439f795fe35", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", "shasum": "" }, "require": { - "php": ">=7.0.0", + "php": ">=7.1", "psr/http-message": "^1.0 || ^2.0" }, "type": "library", @@ -2029,7 +2029,7 @@ "homepage": "https://www.php-fig.org/" } ], - "description": "Common interfaces for PSR-7 HTTP message factories", + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", "keywords": [ "factory", "http", @@ -2041,9 +2041,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/1.0.2" + "source": "https://github.com/php-fig/http-factory" }, - "time": "2023-04-10T20:10:41+00:00" + "time": "2024-04-15T12:06:14+00:00" }, { "name": "psr/http-message", @@ -2194,16 +2194,16 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.3", + "version": "v2.5.4", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "80d075412b557d41002320b96a096ca65aa2c98d" + "reference": "605389f2a7e5625f273b53960dc46aeaf9c62918" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/80d075412b557d41002320b96a096ca65aa2c98d", - "reference": "80d075412b557d41002320b96a096ca65aa2c98d", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/605389f2a7e5625f273b53960dc46aeaf9c62918", + "reference": "605389f2a7e5625f273b53960dc46aeaf9c62918", "shasum": "" }, "require": { @@ -2241,7 +2241,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.3" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.4" }, "funding": [ { @@ -2257,7 +2257,7 @@ "type": "tidelift" } ], - "time": "2023-01-24T14:02:46+00:00" + "time": "2024-09-25T14:11:13+00:00" }, { "name": "symfony/polyfill-ctype", From c843d6fbfef0f7f0f1319f0b12da9d0984a56b63 Mon Sep 17 00:00:00 2001 From: mikkamp Date: Thu, 5 Dec 2024 12:03:16 +0000 Subject: [PATCH 05/12] Update phpunit packages --- composer.lock | 251 ++++++++++++++++++++++++++------------------------ 1 file changed, 130 insertions(+), 121 deletions(-) diff --git a/composer.lock b/composer.lock index a047d1d04b..c502e37ae4 100644 --- a/composer.lock +++ b/composer.lock @@ -2261,20 +2261,20 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", - "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-ctype": "*" @@ -2320,7 +2320,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" }, "funding": [ { @@ -2336,7 +2336,7 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-normalizer", @@ -3438,16 +3438,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.11.1", + "version": "1.12.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845", + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845", "shasum": "" }, "require": { @@ -3455,11 +3455,12 @@ }, "conflict": { "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" + "doctrine/common": "<2.13.3 || >=3 <3.2.2" }, "require-dev": { "doctrine/collections": "^1.6.8", "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", @@ -3485,7 +3486,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1" }, "funding": [ { @@ -3493,29 +3494,31 @@ "type": "tidelift" } ], - "time": "2023-03-08T13:26:56+00:00" + "time": "2024-11-08T17:47:46+00:00" }, { "name": "nikic/php-parser", - "version": "v4.17.1", + "version": "v5.3.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" + "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8eea230464783aa9671db8eea6f8c6ac5285794b", + "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b", "shasum": "" }, "require": { + "ext-ctype": "*", + "ext-json": "*", "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.4" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^9.0" }, "bin": [ "bin/php-parse" @@ -3523,7 +3526,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -3547,26 +3550,27 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.3.1" }, - "time": "2023-08-13T19:53:39+00:00" + "time": "2024-10-08T18:51:32+00:00" }, { "name": "phar-io/manifest", - "version": "2.0.3", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + "reference": "54750ef60c58e43759730615a392c31c80e23176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-phar": "*", "ext-xmlwriter": "*", "phar-io/version": "^3.0.1", @@ -3607,9 +3611,15 @@ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" + "source": "https://github.com/phar-io/manifest/tree/2.0.4" }, - "time": "2021-07-20T11:28:43+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" }, { "name": "phar-io/version", @@ -3800,35 +3810,35 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.29", + "version": "9.2.32", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76" + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76", - "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.15", + "nikic/php-parser": "^4.19.1 || ^5.1.0", "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-text-template": "^2.0.4", + "sebastian/code-unit-reverse-lookup": "^2.0.3", + "sebastian/complexity": "^2.0.3", + "sebastian/environment": "^5.1.5", + "sebastian/lines-of-code": "^1.0.4", + "sebastian/version": "^3.0.2", + "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.6" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -3837,7 +3847,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "9.2.x-dev" } }, "autoload": { @@ -3866,7 +3876,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.29" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32" }, "funding": [ { @@ -3874,7 +3884,7 @@ "type": "github" } ], - "time": "2023-09-19T04:57:46+00:00" + "time": "2024-08-22T04:23:01+00:00" }, { "name": "phpunit/php-file-iterator", @@ -4119,45 +4129,45 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.13", + "version": "9.6.21", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be" + "reference": "de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f3d767f7f9e191eab4189abe41ab37797e30b1be", - "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa", + "reference": "de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1 || ^2", + "doctrine/instantiator": "^1.5.0 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", + "myclabs/deep-copy": "^1.12.0", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.28", - "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-code-coverage": "^9.2.32", + "phpunit/php-file-iterator": "^3.0.6", "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", + "phpunit/php-text-template": "^2.0.4", + "phpunit/php-timer": "^5.0.3", + "sebastian/cli-parser": "^1.0.2", + "sebastian/code-unit": "^1.0.8", "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.5", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.2", + "sebastian/diff": "^4.0.6", + "sebastian/environment": "^5.1.5", + "sebastian/exporter": "^4.0.6", + "sebastian/global-state": "^5.0.7", + "sebastian/object-enumerator": "^4.0.4", + "sebastian/resource-operations": "^3.0.4", + "sebastian/type": "^3.2.1", "sebastian/version": "^3.0.2" }, "suggest": { @@ -4202,7 +4212,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.13" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.21" }, "funding": [ { @@ -4218,20 +4228,20 @@ "type": "tidelift" } ], - "time": "2023-09-19T05:39:22+00:00" + "time": "2024-09-19T10:50:18+00:00" }, { "name": "sebastian/cli-parser", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", "shasum": "" }, "require": { @@ -4266,7 +4276,7 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" }, "funding": [ { @@ -4274,7 +4284,7 @@ "type": "github" } ], - "time": "2020-09-28T06:08:49+00:00" + "time": "2024-03-02T06:27:43+00:00" }, { "name": "sebastian/code-unit", @@ -4463,20 +4473,20 @@ }, { "name": "sebastian/complexity", - "version": "2.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", "shasum": "" }, "require": { - "nikic/php-parser": "^4.7", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3" }, "require-dev": { @@ -4508,7 +4518,7 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" }, "funding": [ { @@ -4516,20 +4526,20 @@ "type": "github" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2023-12-22T06:19:30+00:00" }, { "name": "sebastian/diff", - "version": "4.0.5", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", "shasum": "" }, "require": { @@ -4574,7 +4584,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" }, "funding": [ { @@ -4582,7 +4592,7 @@ "type": "github" } ], - "time": "2023-05-07T05:35:17+00:00" + "time": "2024-03-02T06:30:58+00:00" }, { "name": "sebastian/environment", @@ -4649,16 +4659,16 @@ }, { "name": "sebastian/exporter", - "version": "4.0.5", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", "shasum": "" }, "require": { @@ -4714,7 +4724,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" }, "funding": [ { @@ -4722,20 +4732,20 @@ "type": "github" } ], - "time": "2022-09-14T06:03:37+00:00" + "time": "2024-03-02T06:33:00+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.6", + "version": "5.0.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bde739e7565280bda77be70044ac1047bc007e34" + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", - "reference": "bde739e7565280bda77be70044ac1047bc007e34", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", "shasum": "" }, "require": { @@ -4778,7 +4788,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" }, "funding": [ { @@ -4786,24 +4796,24 @@ "type": "github" } ], - "time": "2023-08-02T09:26:13+00:00" + "time": "2024-03-02T06:35:11+00:00" }, { "name": "sebastian/lines-of-code", - "version": "1.0.3", + "version": "1.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", "shasum": "" }, "require": { - "nikic/php-parser": "^4.6", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3" }, "require-dev": { @@ -4835,7 +4845,7 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" }, "funding": [ { @@ -4843,7 +4853,7 @@ "type": "github" } ], - "time": "2020-11-28T06:42:11+00:00" + "time": "2023-12-22T06:20:34+00:00" }, { "name": "sebastian/object-enumerator", @@ -5022,16 +5032,16 @@ }, { "name": "sebastian/resource-operations", - "version": "3.0.3", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", "shasum": "" }, "require": { @@ -5043,7 +5053,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -5064,8 +5074,7 @@ "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" }, "funding": [ { @@ -5073,7 +5082,7 @@ "type": "github" } ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2024-03-14T16:00:52+00:00" }, { "name": "sebastian/type", @@ -5306,16 +5315,16 @@ }, { "name": "theseer/tokenizer", - "version": "1.2.1", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "shasum": "" }, "require": { @@ -5344,7 +5353,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" }, "funding": [ { @@ -5352,7 +5361,7 @@ "type": "github" } ], - "time": "2021-07-28T10:34:58+00:00" + "time": "2024-03-03T12:36:25+00:00" }, { "name": "wp-cli/i18n-command", From 0850d23fadb8eca3225ad865b75730d350fa879e Mon Sep 17 00:00:00 2001 From: mikkamp Date: Thu, 5 Dec 2024 12:17:46 +0000 Subject: [PATCH 06/12] Update jetpack connection package --- composer.lock | 253 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 163 insertions(+), 90 deletions(-) diff --git a/composer.lock b/composer.lock index c502e37ae4..6e995b6555 100644 --- a/composer.lock +++ b/composer.lock @@ -8,24 +8,24 @@ "packages": [ { "name": "automattic/jetpack-a8c-mc-stats", - "version": "v2.0.0", + "version": "v2.0.4", "source": { "type": "git", "url": "https://github.com/Automattic/jetpack-a8c-mc-stats.git", - "reference": "6ce7a1e1eba796643d7d32dc49057c7bb8e3233c" + "reference": "d1d726e4962d4bf6f9c51d01e63d613c3a9dd0bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-a8c-mc-stats/zipball/6ce7a1e1eba796643d7d32dc49057c7bb8e3233c", - "reference": "6ce7a1e1eba796643d7d32dc49057c7bb8e3233c", + "url": "https://api.github.com/repos/Automattic/jetpack-a8c-mc-stats/zipball/d1d726e4962d4bf6f9c51d01e63d613c3a9dd0bb", + "reference": "d1d726e4962d4bf6f9c51d01e63d613c3a9dd0bb", "shasum": "" }, "require": { "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.0.0", - "yoast/phpunit-polyfills": "1.1.0" + "automattic/jetpack-changelogger": "^4.2.8", + "yoast/phpunit-polyfills": "^1.1.1" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." @@ -34,11 +34,11 @@ "extra": { "autotagger": true, "mirror-repo": "Automattic/jetpack-a8c-mc-stats", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v${old}...v${new}" - }, "branch-alias": { "dev-trunk": "2.0.x-dev" + }, + "changelogger": { + "link-template": "https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v${old}...v${new}" } }, "autoload": { @@ -52,32 +52,32 @@ ], "description": "Used to record internal usage stats for Automattic. Not visible to site owners.", "support": { - "source": "https://github.com/Automattic/jetpack-a8c-mc-stats/tree/v2.0.0" + "source": "https://github.com/Automattic/jetpack-a8c-mc-stats/tree/v2.0.4" }, - "time": "2023-11-20T20:02:34+00:00" + "time": "2024-11-04T09:23:35+00:00" }, { "name": "automattic/jetpack-admin-ui", - "version": "v0.3.2", + "version": "v0.4.6", "source": { "type": "git", "url": "https://github.com/Automattic/jetpack-admin-ui.git", - "reference": "22c381953ce293529202cda959218d6256a3ef7c" + "reference": "a7bef1b075e35e431c0112f97763df9c6196ae39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-admin-ui/zipball/22c381953ce293529202cda959218d6256a3ef7c", - "reference": "22c381953ce293529202cda959218d6256a3ef7c", + "url": "https://api.github.com/repos/Automattic/jetpack-admin-ui/zipball/a7bef1b075e35e431c0112f97763df9c6196ae39", + "reference": "a7bef1b075e35e431c0112f97763df9c6196ae39", "shasum": "" }, "require": { "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", - "automattic/jetpack-logo": "^2.0.0", + "automattic/jetpack-changelogger": "^4.2.8", + "automattic/jetpack-logo": "^2.0.5", "automattic/wordbless": "dev-master", - "yoast/phpunit-polyfills": "1.1.0" + "yoast/phpunit-polyfills": "^1.1.1" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." @@ -85,14 +85,14 @@ "type": "jetpack-library", "extra": { "autotagger": true, - "mirror-repo": "Automattic/jetpack-admin-ui", "textdomain": "jetpack-admin-ui", + "mirror-repo": "Automattic/jetpack-admin-ui", + "branch-alias": { + "dev-trunk": "0.4.x-dev" + }, "changelogger": { "link-template": "https://github.com/Automattic/jetpack-admin-ui/compare/${old}...${new}" }, - "branch-alias": { - "dev-trunk": "0.3.x-dev" - }, "version-constants": { "::PACKAGE_VERSION": "src/class-admin-menu.php" } @@ -108,9 +108,66 @@ ], "description": "Generic Jetpack wp-admin UI elements", "support": { - "source": "https://github.com/Automattic/jetpack-admin-ui/tree/v0.3.2" + "source": "https://github.com/Automattic/jetpack-admin-ui/tree/v0.4.6" + }, + "time": "2024-11-04T09:23:52+00:00" + }, + { + "name": "automattic/jetpack-assets", + "version": "v2.3.14", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-assets.git", + "reference": "ab5e8aa77869a2c64a72d94ba085c3db722c635a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-assets/zipball/ab5e8aa77869a2c64a72d94ba085c3db722c635a", + "reference": "ab5e8aa77869a2c64a72d94ba085c3db722c635a", + "shasum": "" + }, + "require": { + "automattic/jetpack-constants": "^2.0.5", + "php": ">=7.0" + }, + "require-dev": { + "automattic/jetpack-changelogger": "^4.2.8", + "brain/monkey": "2.6.1", + "wikimedia/testing-access-wrapper": "^1.0 || ^2.0 || ^3.0", + "yoast/phpunit-polyfills": "^1.1.1" + }, + "suggest": { + "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." + }, + "type": "jetpack-library", + "extra": { + "autotagger": true, + "textdomain": "jetpack-assets", + "mirror-repo": "Automattic/jetpack-assets", + "branch-alias": { + "dev-trunk": "2.3.x-dev" + }, + "changelogger": { + "link-template": "https://github.com/Automattic/jetpack-assets/compare/v${old}...v${new}" + } + }, + "autoload": { + "files": [ + "actions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "description": "Asset management utilities for Jetpack ecosystem packages", + "support": { + "source": "https://github.com/Automattic/jetpack-assets/tree/v2.3.14" }, - "time": "2024-01-29T19:37:58+00:00" + "time": "2024-11-11T01:46:36+00:00" }, { "name": "automattic/jetpack-autoloader", @@ -227,32 +284,33 @@ }, { "name": "automattic/jetpack-connection", - "version": "v2.3.2", + "version": "v2.12.6", "source": { "type": "git", "url": "https://github.com/Automattic/jetpack-connection.git", - "reference": "0d43e67354dfd6f39a0b1cbb070ba24a64377f41" + "reference": "afb215aef302414dba6a01e7cc38b4502d3677cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-connection/zipball/0d43e67354dfd6f39a0b1cbb070ba24a64377f41", - "reference": "0d43e67354dfd6f39a0b1cbb070ba24a64377f41", + "url": "https://api.github.com/repos/Automattic/jetpack-connection/zipball/afb215aef302414dba6a01e7cc38b4502d3677cf", + "reference": "afb215aef302414dba6a01e7cc38b4502d3677cf", "shasum": "" }, "require": { - "automattic/jetpack-a8c-mc-stats": "^2.0.0", - "automattic/jetpack-admin-ui": "^0.3.2", - "automattic/jetpack-constants": "^2.0.0", - "automattic/jetpack-redirect": "^2.0.0", - "automattic/jetpack-roles": "^2.0.0", - "automattic/jetpack-status": "^2.1.0", + "automattic/jetpack-a8c-mc-stats": "^2.0.2", + "automattic/jetpack-admin-ui": "^0.4.4", + "automattic/jetpack-assets": "^2.3.5", + "automattic/jetpack-constants": "^2.0.4", + "automattic/jetpack-redirect": "^2.0.3", + "automattic/jetpack-roles": "^2.0.3", + "automattic/jetpack-status": "^3.3.5", "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.2.6", "automattic/wordbless": "@dev", "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0" + "yoast/phpunit-polyfills": "^1.1.1" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." @@ -260,23 +318,30 @@ "type": "jetpack-library", "extra": { "autotagger": true, - "mirror-repo": "Automattic/jetpack-connection", "textdomain": "jetpack-connection", - "version-constants": { - "::PACKAGE_VERSION": "src/class-package-version.php" + "mirror-repo": "Automattic/jetpack-connection", + "branch-alias": { + "dev-trunk": "2.12.x-dev" }, "changelogger": { "link-template": "https://github.com/Automattic/jetpack-connection/compare/v${old}...v${new}" }, - "branch-alias": { - "dev-trunk": "2.3.x-dev" + "dependencies": { + "test-only": [ + "packages/licensing", + "packages/sync" + ] + }, + "version-constants": { + "::PACKAGE_VERSION": "src/class-package-version.php" } }, "autoload": { "classmap": [ "legacy", "src/", - "src/webhooks" + "src/webhooks", + "src/identity-crisis" ] }, "notification-url": "https://packagist.org/downloads/", @@ -285,31 +350,31 @@ ], "description": "Everything needed to connect to the Jetpack infrastructure", "support": { - "source": "https://github.com/Automattic/jetpack-connection/tree/v2.3.2" + "source": "https://github.com/Automattic/jetpack-connection/tree/v2.12.6" }, - "time": "2024-02-26T17:42:33+00:00" + "time": "2024-09-10T17:56:31+00:00" }, { "name": "automattic/jetpack-constants", - "version": "v2.0.0", + "version": "v2.0.5", "source": { "type": "git", "url": "https://github.com/Automattic/jetpack-constants.git", - "reference": "d4244e33d2d18902951af05ca5dbb689a23c9cdc" + "reference": "0c2644d642b06ae2a31c561f5bfc6f74a4abc8f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-constants/zipball/d4244e33d2d18902951af05ca5dbb689a23c9cdc", - "reference": "d4244e33d2d18902951af05ca5dbb689a23c9cdc", + "url": "https://api.github.com/repos/Automattic/jetpack-constants/zipball/0c2644d642b06ae2a31c561f5bfc6f74a4abc8f1", + "reference": "0c2644d642b06ae2a31c561f5bfc6f74a4abc8f1", "shasum": "" }, "require": { "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.0.0", + "automattic/jetpack-changelogger": "^4.2.8", "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0" + "yoast/phpunit-polyfills": "^1.1.1" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." @@ -318,11 +383,11 @@ "extra": { "autotagger": true, "mirror-repo": "Automattic/jetpack-constants", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-constants/compare/v${old}...v${new}" - }, "branch-alias": { "dev-trunk": "2.0.x-dev" + }, + "changelogger": { + "link-template": "https://github.com/Automattic/jetpack-constants/compare/v${old}...v${new}" } }, "autoload": { @@ -336,32 +401,32 @@ ], "description": "A wrapper for defining constants in a more testable way.", "support": { - "source": "https://github.com/Automattic/jetpack-constants/tree/v2.0.0" + "source": "https://github.com/Automattic/jetpack-constants/tree/v2.0.5" }, - "time": "2023-11-20T20:02:28+00:00" + "time": "2024-11-04T09:23:35+00:00" }, { "name": "automattic/jetpack-redirect", - "version": "v2.0.0", + "version": "v2.0.3", "source": { "type": "git", "url": "https://github.com/Automattic/jetpack-redirect.git", - "reference": "8f1bbfd4b046b8a0ae7b156007c2ef56a0ddbf76" + "reference": "2c049bb08f736dc0dbafac7eaebea6f97cf8019e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-redirect/zipball/8f1bbfd4b046b8a0ae7b156007c2ef56a0ddbf76", - "reference": "8f1bbfd4b046b8a0ae7b156007c2ef56a0ddbf76", + "url": "https://api.github.com/repos/Automattic/jetpack-redirect/zipball/2c049bb08f736dc0dbafac7eaebea6f97cf8019e", + "reference": "2c049bb08f736dc0dbafac7eaebea6f97cf8019e", "shasum": "" }, "require": { - "automattic/jetpack-status": "^2.0.0", + "automattic/jetpack-status": "^3.3.4", "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.0.0", + "automattic/jetpack-changelogger": "^4.2.6", "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0" + "yoast/phpunit-polyfills": "^1.1.1" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." @@ -370,11 +435,11 @@ "extra": { "autotagger": true, "mirror-repo": "Automattic/jetpack-redirect", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-redirect/compare/v${old}...v${new}" - }, "branch-alias": { "dev-trunk": "2.0.x-dev" + }, + "changelogger": { + "link-template": "https://github.com/Automattic/jetpack-redirect/compare/v${old}...v${new}" } }, "autoload": { @@ -388,31 +453,31 @@ ], "description": "Utilities to build URLs to the jetpack.com/redirect/ service", "support": { - "source": "https://github.com/Automattic/jetpack-redirect/tree/v2.0.0" + "source": "https://github.com/Automattic/jetpack-redirect/tree/v2.0.3" }, - "time": "2023-11-20T20:03:01+00:00" + "time": "2024-08-23T14:28:46+00:00" }, { "name": "automattic/jetpack-roles", - "version": "v2.0.0", + "version": "v2.0.4", "source": { "type": "git", "url": "https://github.com/Automattic/jetpack-roles.git", - "reference": "967e52052a17123a23f4112da3d8e7e995467cb2" + "reference": "2fa5361ce8ff271cc4ecfac5be9b957ab0e9912f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-roles/zipball/967e52052a17123a23f4112da3d8e7e995467cb2", - "reference": "967e52052a17123a23f4112da3d8e7e995467cb2", + "url": "https://api.github.com/repos/Automattic/jetpack-roles/zipball/2fa5361ce8ff271cc4ecfac5be9b957ab0e9912f", + "reference": "2fa5361ce8ff271cc4ecfac5be9b957ab0e9912f", "shasum": "" }, "require": { "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.0.0", + "automattic/jetpack-changelogger": "^4.2.8", "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0" + "yoast/phpunit-polyfills": "^1.1.1" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." @@ -421,11 +486,11 @@ "extra": { "autotagger": true, "mirror-repo": "Automattic/jetpack-roles", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-roles/compare/v${old}...v${new}" - }, "branch-alias": { "dev-trunk": "2.0.x-dev" + }, + "changelogger": { + "link-template": "https://github.com/Automattic/jetpack-roles/compare/v${old}...v${new}" } }, "autoload": { @@ -439,33 +504,35 @@ ], "description": "Utilities, related with user roles and capabilities.", "support": { - "source": "https://github.com/Automattic/jetpack-roles/tree/v2.0.0" + "source": "https://github.com/Automattic/jetpack-roles/tree/v2.0.4" }, - "time": "2023-11-20T20:02:32+00:00" + "time": "2024-11-04T09:23:38+00:00" }, { "name": "automattic/jetpack-status", - "version": "v2.1.0", + "version": "v3.3.5", "source": { "type": "git", "url": "https://github.com/Automattic/jetpack-status.git", - "reference": "badaae2ef5345629f5333938e32a649bf946d688" + "reference": "69d5d8a8f31adf2b297a539bcddd9a9162d1320b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-status/zipball/badaae2ef5345629f5333938e32a649bf946d688", - "reference": "badaae2ef5345629f5333938e32a649bf946d688", + "url": "https://api.github.com/repos/Automattic/jetpack-status/zipball/69d5d8a8f31adf2b297a539bcddd9a9162d1320b", + "reference": "69d5d8a8f31adf2b297a539bcddd9a9162d1320b", "shasum": "" }, "require": { - "automattic/jetpack-constants": "^2.0.0", + "automattic/jetpack-constants": "^2.0.4", "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.0.5", - "automattic/jetpack-ip": "^0.2.1", + "automattic/jetpack-changelogger": "^4.2.6", + "automattic/jetpack-connection": "@dev", + "automattic/jetpack-ip": "^0.2.3", + "automattic/jetpack-plans": "@dev", "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0" + "yoast/phpunit-polyfills": "^1.1.1" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." @@ -474,11 +541,17 @@ "extra": { "autotagger": true, "mirror-repo": "Automattic/jetpack-status", + "branch-alias": { + "dev-trunk": "3.3.x-dev" + }, "changelogger": { "link-template": "https://github.com/Automattic/jetpack-status/compare/v${old}...v${new}" }, - "branch-alias": { - "dev-trunk": "2.1.x-dev" + "dependencies": { + "test-only": [ + "packages/connection", + "packages/plans" + ] } }, "autoload": { @@ -492,9 +565,9 @@ ], "description": "Used to retrieve information about the current status of Jetpack and the site overall.", "support": { - "source": "https://github.com/Automattic/jetpack-status/tree/v2.1.0" + "source": "https://github.com/Automattic/jetpack-status/tree/v3.3.5" }, - "time": "2024-01-18T21:49:55+00:00" + "time": "2024-09-10T17:55:40+00:00" }, { "name": "firebase/php-jwt", From d1d1f5834276dbc07964282adf763b53591b4cf1 Mon Sep 17 00:00:00 2001 From: mikkamp Date: Thu, 5 Dec 2024 12:46:47 +0000 Subject: [PATCH 07/12] Update validator packages --- composer.lock | 78 +++++++++++++++++++++++++-------------------------- 1 file changed, 38 insertions(+), 40 deletions(-) diff --git a/composer.lock b/composer.lock index 6e995b6555..ad8a6096ee 100644 --- a/composer.lock +++ b/composer.lock @@ -2574,26 +2574,23 @@ }, { "name": "symfony/polyfill-php73", - "version": "v1.28.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5" + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5", - "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb", + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -2633,7 +2630,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.31.0" }, "funding": [ { @@ -2649,24 +2646,24 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { @@ -2713,7 +2710,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" }, "funding": [ { @@ -2729,24 +2726,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d" + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/c565ad1e63f30e7477fc40738343c62b40bc672d", - "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { @@ -2789,7 +2786,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.31.0" }, "funding": [ { @@ -2805,20 +2802,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/translation-contracts", - "version": "v2.5.2", + "version": "v2.5.4", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "136b19dd05cdf0709db6537d058bcab6dd6e2dbe" + "reference": "450d4172653f38818657022252f9d81be89ee9a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/136b19dd05cdf0709db6537d058bcab6dd6e2dbe", - "reference": "136b19dd05cdf0709db6537d058bcab6dd6e2dbe", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/450d4172653f38818657022252f9d81be89ee9a8", + "reference": "450d4172653f38818657022252f9d81be89ee9a8", "shasum": "" }, "require": { @@ -2867,7 +2864,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/translation-contracts/tree/v2.5.4" }, "funding": [ { @@ -2883,20 +2880,20 @@ "type": "tidelift" } ], - "time": "2022-06-27T16:58:25+00:00" + "time": "2024-09-25T14:11:13+00:00" }, { "name": "symfony/validator", - "version": "v5.4.30", + "version": "v5.4.48", "source": { "type": "git", "url": "https://github.com/symfony/validator.git", - "reference": "ce65d7802d78e43d46669bfa08521bf6104880f0" + "reference": "883667679d93d6c30f1b7490d669801712d3be2f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/validator/zipball/ce65d7802d78e43d46669bfa08521bf6104880f0", - "reference": "ce65d7802d78e43d46669bfa08521bf6104880f0", + "url": "https://api.github.com/repos/symfony/validator/zipball/883667679d93d6c30f1b7490d669801712d3be2f", + "reference": "883667679d93d6c30f1b7490d669801712d3be2f", "shasum": "" }, "require": { @@ -2918,7 +2915,7 @@ "symfony/http-kernel": "<4.4", "symfony/intl": "<4.4", "symfony/property-info": "<5.3", - "symfony/translation": "<4.4", + "symfony/translation": "<5.4.35|>=6.0,<6.3.12|>=6.4,<6.4.3", "symfony/yaml": "<4.4" }, "require-dev": { @@ -2936,9 +2933,9 @@ "symfony/http-kernel": "^4.4|^5.0|^6.0", "symfony/intl": "^4.4|^5.0|^6.0", "symfony/mime": "^4.4|^5.0|^6.0", - "symfony/property-access": "^4.4|^5.0|^6.0", + "symfony/property-access": "^5.4|^6.0", "symfony/property-info": "^5.3|^6.0", - "symfony/translation": "^4.4|^5.0|^6.0", + "symfony/translation": "^5.4.35|~6.3.12|^6.4.3", "symfony/yaml": "^4.4|^5.0|^6.0" }, "suggest": { @@ -2959,7 +2956,8 @@ "Symfony\\Component\\Validator\\": "" }, "exclude-from-classmap": [ - "/Tests/" + "/Tests/", + "/Resources/bin/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2979,7 +2977,7 @@ "description": "Provides tools to validate values", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/validator/tree/v5.4.30" + "source": "https://github.com/symfony/validator/tree/v5.4.48" }, "funding": [ { @@ -2995,7 +2993,7 @@ "type": "tidelift" } ], - "time": "2023-10-27T07:38:31+00:00" + "time": "2024-11-27T08:58:20+00:00" } ], "packages-dev": [ From cd860f362eaed47a2adab79bc5a7298ea2d5ad1f Mon Sep 17 00:00:00 2001 From: mikkamp Date: Thu, 5 Dec 2024 12:47:48 +0000 Subject: [PATCH 08/12] Use pattern which accepts only some unicode characters --- src/Validator/ImageUrlConstraintValidator.php | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/Validator/ImageUrlConstraintValidator.php b/src/Validator/ImageUrlConstraintValidator.php index db5334dcb2..8c9176823f 100644 --- a/src/Validator/ImageUrlConstraintValidator.php +++ b/src/Validator/ImageUrlConstraintValidator.php @@ -18,6 +18,30 @@ */ class ImageUrlConstraintValidator extends UrlConstraintValidator { + public const IMAGE_PATTERN = '~^ + (%s):// # protocol + (((?:[\_\.\pL\pN-]|%%[0-9A-Fa-f]{2})+:)?((?:[\_\.\pL\pN-]|%%[0-9A-Fa-f]{2})+)@)? # basic auth + ( + (?: + (?:xn--[a-z0-9-]++\.)*+xn--[a-z0-9-]++ # a domain name using punycode + | + (?:[\pL\pN\pS\pM\-\_]++\.)+[\pL\pN\pM]++ # a multi-level domain name + | + [a-z0-9\-\_]++ # a single-level domain name + )\.? + | # or + \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} # an IP address + | # or + \[ + (?:(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-f]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,1}(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,2}(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,3}(?:(?:[0-9a-f]{1,4})))?::(?:(?:[0-9a-f]{1,4})):)(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,4}(?:(?:[0-9a-f]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,5}(?:(?:[0-9a-f]{1,4})))?::)(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,6}(?:(?:[0-9a-f]{1,4})))?::)))) + \] # an IPv6 address + ) + (:[0-9]+)? # a port (optional) + (?:/ (?:[\pL\pN\-._\~!$&\'()*+,;=:@]|%%[0-9A-Fa-f]{2})* )* # a path + (?:\? (?:[\pL\pN\-._\~!$&\'\[\]()*+,;=:@/?]|%%[0-9A-Fa-f]{2})* )? # a query (optional) + (?:\# (?:[\pL\pN\-._\~!$&\'()*+,;=:@/?]|%%[0-9A-Fa-f]{2})* )? # a fragment (optional) + $~ixuD'; + /** * Checks if the passed value is valid. * @@ -46,7 +70,7 @@ public function validate( $value, Constraint $constraint ) { } $value = Normalizer::normalize( $value ); - $pattern = sprintf( static::PATTERN, implode( '|', $constraint->protocols ) ); + $pattern = sprintf( static::IMAGE_PATTERN, implode( '|', $constraint->protocols ) ); if ( ! preg_match( $pattern, $value ) ) { $this->context->buildViolation( $constraint->message ) From e4efa7a2da95559cfbb53abbf204841a38862f92 Mon Sep 17 00:00:00 2001 From: mikkamp Date: Thu, 5 Dec 2024 13:07:23 +0000 Subject: [PATCH 09/12] Update league/container --- composer.json | 2 +- composer.lock | 31 +++++++++++++++++-------------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/composer.json b/composer.json index c2c837aa43..ba156b4add 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "google/apiclient": "^2.16", "google/apiclient-services": "^0.350.0", "googleads/google-ads-php": "dev-legacy-v22.1.0", - "league/container": "^3.4", + "league/container": "^4.2", "league/iso3166": "^4.1", "phpseclib/bcmath_compat": "^2.0", "psr/container": "^1.1", diff --git a/composer.lock b/composer.lock index ad8a6096ee..0281864b6d 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "dc1c866ff5a5faf503e7f4899f251f63", + "content-hash": "dd4901df5f0b74cd43b525ed8fe750eb", "packages": [ { "name": "automattic/jetpack-a8c-mc-stats", @@ -1388,21 +1388,21 @@ }, { "name": "league/container", - "version": "3.4.1", + "version": "4.2.4", "source": { "type": "git", "url": "https://github.com/thephpleague/container.git", - "reference": "84ecbc2dbecc31bd23faf759a0e329ee49abddbd" + "reference": "7ea728b013b9a156c409c6f0fc3624071b742dec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/container/zipball/84ecbc2dbecc31bd23faf759a0e329ee49abddbd", - "reference": "84ecbc2dbecc31bd23faf759a0e329ee49abddbd", + "url": "https://api.github.com/repos/thephpleague/container/zipball/7ea728b013b9a156c409c6f0fc3624071b742dec", + "reference": "7ea728b013b9a156c409c6f0fc3624071b742dec", "shasum": "" }, "require": { - "php": "^7.0 || ^8.0", - "psr/container": "^1.0.0" + "php": "^7.2 || ^8.0", + "psr/container": "^1.1 || ^2.0" }, "provide": { "psr/container-implementation": "^1.0" @@ -1411,15 +1411,19 @@ "orno/di": "~2.0" }, "require-dev": { - "phpunit/phpunit": "^6.0 || ^7.0", + "nette/php-generator": "^3.4", + "nikic/php-parser": "^4.10", + "phpstan/phpstan": "^0.12.47", + "phpunit/phpunit": "^8.5.17", "roave/security-advisories": "dev-latest", "scrutinizer/ocular": "^1.8", - "squizlabs/php_codesniffer": "^3.5" + "squizlabs/php_codesniffer": "^3.6" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.x-dev", + "dev-master": "4.x-dev", + "dev-4.x": "4.x-dev", "dev-3.x": "3.x-dev", "dev-2.x": "2.x-dev", "dev-1.x": "1.x-dev" @@ -1437,8 +1441,7 @@ "authors": [ { "name": "Phil Bennett", - "email": "philipobenito@gmail.com", - "homepage": "http://www.philipobenito.com", + "email": "mail@philbennett.co.uk", "role": "Developer" } ], @@ -1455,7 +1458,7 @@ ], "support": { "issues": "https://github.com/thephpleague/container/issues", - "source": "https://github.com/thephpleague/container/tree/3.4.1" + "source": "https://github.com/thephpleague/container/tree/4.2.4" }, "funding": [ { @@ -1463,7 +1466,7 @@ "type": "github" } ], - "time": "2021-07-09T08:23:52+00:00" + "time": "2024-11-10T12:42:13+00:00" }, { "name": "league/iso3166", From 0d2955dd0c2ded330f89ce5269cddc6d2d7f7a59 Mon Sep 17 00:00:00 2001 From: mikkamp Date: Thu, 5 Dec 2024 15:06:36 +0000 Subject: [PATCH 10/12] Add support for league container v4 --- src/Container.php | 4 +-- .../AbstractServiceProvider.php | 10 ++++---- .../CoreServiceProvider.php | 12 ++++----- .../DBServiceProvider.php | 4 +-- .../GoogleServiceProvider.php | 25 +++++++++---------- .../JobServiceProvider.php | 2 +- .../ProxyServiceProvider.php | 4 +-- .../RESTServiceProvider.php | 4 +-- .../ThirdPartyServiceProvider.php | 15 ++++++----- 9 files changed, 39 insertions(+), 41 deletions(-) diff --git a/src/Container.php b/src/Container.php index c39c3855a5..9640ccf39d 100644 --- a/src/Container.php +++ b/src/Container.php @@ -67,12 +67,12 @@ final class Container implements ContainerInterface { */ public function __construct( ?LeagueContainer $container = null ) { $this->container = $container ?? new LeagueContainer(); - $this->container->share( ContainerInterface::class, $this ); + $this->container->addShared( ContainerInterface::class, $this ); $this->container->inflector( ContainerAwareInterface::class ) ->invokeMethod( 'set_container', [ ContainerInterface::class ] ); foreach ( $this->service_providers as $service_provider_class ) { - $this->container->addServiceProvider( $service_provider_class ); + $this->container->addServiceProvider( new ( $service_provider_class )() ); } } diff --git a/src/Internal/DependencyManagement/AbstractServiceProvider.php b/src/Internal/DependencyManagement/AbstractServiceProvider.php index 9284846e0e..0d615d34bc 100644 --- a/src/Internal/DependencyManagement/AbstractServiceProvider.php +++ b/src/Internal/DependencyManagement/AbstractServiceProvider.php @@ -37,12 +37,12 @@ public function provides( string $service ): bool { /** * Use the register method to register items with the container via the - * protected $this->leagueContainer property or the `getLeagueContainer` method + * protected $this->container property or the `getContainer` method * from the ContainerAwareTrait. * * @return void */ - public function register() { + public function register(): void { foreach ( $this->provides as $class => $provided ) { $this->share( $class ); } @@ -57,7 +57,7 @@ public function register() { * @return DefinitionInterface */ protected function share_concrete( string $interface_name, $concrete = null ): DefinitionInterface { - return $this->getLeagueContainer()->share( $interface_name, $concrete ); + return $this->getContainer()->addShared( $interface_name, $concrete ); } /** @@ -89,7 +89,7 @@ protected function share_with_tags( string $class_name, ...$arguments ): Definit * @return DefinitionInterface */ protected function share( string $class_name, ...$arguments ): DefinitionInterface { - return $this->getLeagueContainer()->share( $class_name )->addArguments( $arguments ); + return $this->getContainer()->addShared( $class_name )->addArguments( $arguments ); } /** @@ -103,7 +103,7 @@ protected function share( string $class_name, ...$arguments ): DefinitionInterfa * @return DefinitionInterface */ protected function add( string $class_name, ...$arguments ): DefinitionInterface { - return $this->getLeagueContainer()->add( $class_name )->addArguments( $arguments ); + return $this->getContainer()->add( $class_name )->addArguments( $arguments ); } /** diff --git a/src/Internal/DependencyManagement/CoreServiceProvider.php b/src/Internal/DependencyManagement/CoreServiceProvider.php index c3d192ed90..4f20dced2c 100644 --- a/src/Internal/DependencyManagement/CoreServiceProvider.php +++ b/src/Internal/DependencyManagement/CoreServiceProvider.php @@ -222,7 +222,7 @@ class CoreServiceProvider extends AbstractServiceProvider { /** * Use the register method to register items with the container via the - * protected $this->leagueContainer property or the `getLeagueContainer` method + * protected $this->container property or the `getContainer` method * from the ContainerAwareTrait. * * @return void @@ -240,13 +240,13 @@ public function register(): void { // Set up Options, and inflect classes that need options. $this->share_concrete( OptionsInterface::class, Options::class ); - $this->getLeagueContainer() + $this->getContainer() ->inflector( OptionsAwareInterface::class ) ->invokeMethod( 'set_options_object', [ OptionsInterface::class ] ); // Share helper classes, and inflect classes that need it. $this->share_with_tags( GoogleHelper::class, WC::class ); - $this->getLeagueContainer() + $this->getContainer() ->inflector( GoogleHelperAwareInterface::class ) ->invokeMethod( 'set_google_helper_object', [ GoogleHelper::class ] ); @@ -262,14 +262,14 @@ public function register(): void { // Set up OAuthService service. $this->share_with_tags( OAuthService::class ); - $this->getLeagueContainer() + $this->getContainer() ->inflector( MerchantCenterAwareInterface::class ) ->invokeMethod( 'set_merchant_center_object', [ MerchantCenterService::class ] ); // Set up Ads service, and inflect classes that need it. $this->share_with_tags( AdsAccountState::class ); $this->share_with_tags( AdsService::class, AdsAccountState::class ); - $this->getLeagueContainer() + $this->getContainer() ->inflector( AdsAwareInterface::class ) ->invokeMethod( 'set_ads_object', [ AdsService::class ] ); $this->share_with_tags( AssetSuggestionsService::class, WP::class, WC::class, ImageUtility::class, wpdb::class, AdsAssetGroupAsset::class ); @@ -390,7 +390,7 @@ function ( ...$arguments ) { ); // Set up inflector for tracks classes. - $this->getLeagueContainer() + $this->getContainer() ->inflector( TracksAwareInterface::class ) ->invokeMethod( 'set_tracks', [ TracksInterface::class ] ); diff --git a/src/Internal/DependencyManagement/DBServiceProvider.php b/src/Internal/DependencyManagement/DBServiceProvider.php index d20a282420..b48c7e9bae 100644 --- a/src/Internal/DependencyManagement/DBServiceProvider.php +++ b/src/Internal/DependencyManagement/DBServiceProvider.php @@ -78,12 +78,12 @@ public function provides( string $service ): bool { /** * Use the register method to register items with the container via the - * protected $this->leagueContainer property or the `getLeagueContainer` method + * protected $this->container property or the `getContainer` method * from the ContainerAwareTrait. * * @return void */ - public function register() { + public function register(): void { $this->share_table_class( AttributeMappingRulesTable::class ); $this->add_query_class( AttributeMappingRulesQuery::class, AttributeMappingRulesTable::class ); $this->share_table_class( BudgetRecommendationTable::class ); diff --git a/src/Internal/DependencyManagement/GoogleServiceProvider.php b/src/Internal/DependencyManagement/GoogleServiceProvider.php index 67e2f21c5d..3435720419 100644 --- a/src/Internal/DependencyManagement/GoogleServiceProvider.php +++ b/src/Internal/DependencyManagement/GoogleServiceProvider.php @@ -42,7 +42,6 @@ use Automattic\WooCommerce\GoogleListingsAndAds\Vendor\GuzzleHttp\ClientInterface; use Automattic\WooCommerce\GoogleListingsAndAds\Vendor\GuzzleHttp\Exception\RequestException; use Automattic\WooCommerce\GoogleListingsAndAds\Vendor\GuzzleHttp\HandlerStack; -use Automattic\WooCommerce\GoogleListingsAndAds\Vendor\League\Container\Argument\RawArgument; use Automattic\WooCommerce\GoogleListingsAndAds\Vendor\League\Container\Definition\Definition; use Automattic\WooCommerce\GoogleListingsAndAds\Vendor\Psr\Container\ContainerInterface; use Automattic\WooCommerce\GoogleListingsAndAds\Vendor\Psr\Http\Message\RequestInterface; @@ -96,12 +95,12 @@ class GoogleServiceProvider extends AbstractServiceProvider { /** * Use the register method to register items with the container via the - * protected $this->leagueContainer property or the `getLeagueContainer` method + * protected $this->container property or the `getContainer` method * from the ContainerAwareTrait. * * @return void */ - public function register() { + public function register(): void { $this->register_guzzle(); $this->register_ads_client(); $this->register_google_classes(); @@ -126,7 +125,7 @@ public function register() { $this->share( SiteVerification::class ); - $this->getLeagueContainer()->add( 'connect_server_root', $this->get_connect_server_url_root() ); + $this->getContainer()->add( 'connect_server_root', $this->get_connect_server_url_root() ); } /** @@ -141,7 +140,7 @@ protected function register_guzzle() { $handler_stack->push( $this->add_plugin_version_header(), 'plugin_version_header' ); // Override endpoint URL if we are using http locally. - if ( 0 === strpos( $this->get_connect_server_url_root()->getValue(), 'http://' ) ) { + if ( 0 === strpos( $this->get_connect_server_url_root(), 'http://' ) ) { $handler_stack->push( $this->override_http_url(), 'override_http_url' ); } @@ -312,7 +311,7 @@ protected function override_http_url(): callable { */ protected function generate_auth_header(): string { /** @var Manager $manager */ - $manager = $this->getLeagueContainer()->get( Manager::class ); + $manager = $this->getContainer()->get( Manager::class ); $token = $manager->get_tokens()->get_access_token( false, false, false ); $this->check_for_wp_error( $token ); @@ -349,13 +348,13 @@ protected function generate_auth_header(): string { * * @param string $path (Optional) A path relative to the root to include. * - * @return RawArgument + * @return string */ - protected function get_connect_server_url_root( string $path = '' ): RawArgument { + protected function get_connect_server_url_root( string $path = '' ): string { $url = trailingslashit( $this->get_connect_server_url() ); $path = trim( $path, '/' ); - return new RawArgument( "{$url}{$path}" ); + return "{$url}{$path}"; } /** @@ -364,7 +363,7 @@ protected function get_connect_server_url_root( string $path = '' ): RawArgument * @return string */ protected function get_connect_server_endpoint(): string { - $parts = wp_parse_url( $this->get_connect_server_url_root( 'google/google-ads' )->getValue() ); + $parts = wp_parse_url( $this->get_connect_server_url_root( 'google/google-ads' ) ); $port = empty( $parts['port'] ) ? 443 : $parts['port']; return sprintf( '%s:%d%s', $parts['host'], $port, $parts['path'] ); } @@ -374,7 +373,7 @@ protected function get_connect_server_endpoint(): string { */ protected function set_google_disconnected() { /** @var Options $options */ - $options = $this->getLeagueContainer()->get( OptionsInterface::class ); + $options = $this->getContainer()->get( OptionsInterface::class ); $options->update( OptionsInterface::GOOGLE_CONNECTED, false ); } @@ -387,7 +386,7 @@ protected function set_google_disconnected() { */ protected function set_jetpack_connected( bool $connected ) { /** @var Options $options */ - $options = $this->getLeagueContainer()->get( OptionsInterface::class ); + $options = $this->getContainer()->get( OptionsInterface::class ); // Save previous connected status before updating. $previous_connected = boolval( $options->get( OptionsInterface::JETPACK_CONNECTED ) ); @@ -408,7 +407,7 @@ protected function set_jetpack_connected( bool $connected ) { */ protected function jetpack_connected_change( bool $connected ) { /** @var ReconnectWordPress $note */ - $note = $this->getLeagueContainer()->get( ReconnectWordPress::class ); + $note = $this->getContainer()->get( ReconnectWordPress::class ); if ( $connected ) { $note->delete(); diff --git a/src/Internal/DependencyManagement/JobServiceProvider.php b/src/Internal/DependencyManagement/JobServiceProvider.php index 80bb29b57a..d7ffcea912 100644 --- a/src/Internal/DependencyManagement/JobServiceProvider.php +++ b/src/Internal/DependencyManagement/JobServiceProvider.php @@ -86,7 +86,7 @@ class JobServiceProvider extends AbstractServiceProvider { /** * Use the register method to register items with the container via the - * protected $this->leagueContainer property or the `getLeagueContainer` method + * protected $this->container property or the `getContainer` method * from the ContainerAwareTrait. * * @return void diff --git a/src/Internal/DependencyManagement/ProxyServiceProvider.php b/src/Internal/DependencyManagement/ProxyServiceProvider.php index 2bf985ad0f..fe3c425f33 100644 --- a/src/Internal/DependencyManagement/ProxyServiceProvider.php +++ b/src/Internal/DependencyManagement/ProxyServiceProvider.php @@ -39,12 +39,12 @@ class ProxyServiceProvider extends AbstractServiceProvider { /** * Use the register method to register items with the container via the - * protected $this->leagueContainer property or the `getLeagueContainer` method + * protected $this->container property or the `getContainer` method * from the ContainerAwareTrait. * * @return void */ - public function register() { + public function register(): void { // The Http class should be a new object every time. $this->add( Http::class ); diff --git a/src/Internal/DependencyManagement/RESTServiceProvider.php b/src/Internal/DependencyManagement/RESTServiceProvider.php index 8d665fdb6b..cf8e4fe3a3 100644 --- a/src/Internal/DependencyManagement/RESTServiceProvider.php +++ b/src/Internal/DependencyManagement/RESTServiceProvider.php @@ -101,12 +101,12 @@ public function provides( string $service ): bool { /** * Use the register method to register items with the container via the - * protected $this->leagueContainer property or the `getLeagueContainer` method + * protected $this->container property or the `getContainer` method * from the ContainerAwareTrait. * * @return void */ - public function register() { + public function register(): void { $this->share( SettingsController::class, ShippingZone::class ); $this->share( ConnectionController::class ); $this->share( AdsAccountController::class, AdsAccountService::class ); diff --git a/src/Internal/DependencyManagement/ThirdPartyServiceProvider.php b/src/Internal/DependencyManagement/ThirdPartyServiceProvider.php index 1c8a25fb71..3346015488 100644 --- a/src/Internal/DependencyManagement/ThirdPartyServiceProvider.php +++ b/src/Internal/DependencyManagement/ThirdPartyServiceProvider.php @@ -7,7 +7,6 @@ use Automattic\Jetpack\Connection\Manager; use Automattic\WooCommerce\GoogleListingsAndAds\Internal\Interfaces\ISO3166AwareInterface; use Automattic\WooCommerce\GoogleListingsAndAds\PluginHelper; -use Automattic\WooCommerce\GoogleListingsAndAds\Vendor\League\Container\Argument\RawArgument; use Automattic\WooCommerce\GoogleListingsAndAds\Vendor\League\ISO3166\ISO3166; use Automattic\WooCommerce\GoogleListingsAndAds\Vendor\League\ISO3166\ISO3166DataProvider; use Symfony\Component\Validator\Validation; @@ -40,28 +39,28 @@ class ThirdPartyServiceProvider extends AbstractServiceProvider { /** * Use the register method to register items with the container via the - * protected $this->leagueContainer property or the `getLeagueContainer` method + * protected $this->container property or the `getContainer` method * from the ContainerAwareTrait. * * @return void */ - public function register() { - $jetpack_id = new RawArgument( 'google-listings-and-ads' ); + public function register(): void { + $jetpack_id = 'google-listings-and-ads'; $this->share( Manager::class )->addArgument( $jetpack_id ); $this->share( Config::class )->addMethodCall( 'ensure', [ - new RawArgument( 'connection' ), + 'connection', [ - 'slug' => $jetpack_id->getValue(), + 'slug' => $jetpack_id, 'name' => 'Google for WooCommerce', // Use hardcoded name for initial registration. ], ] ); $this->share_concrete( ISO3166DataProvider::class, ISO3166::class ); - $this->getLeagueContainer() + $this->getContainer() ->inflector( ISO3166AwareInterface::class ) ->invokeMethod( 'set_iso3166_provider', [ ISO3166DataProvider::class ] ); @@ -78,7 +77,7 @@ function () { add_action( 'init', function () { - $manager = $this->getLeagueContainer()->get( Manager::class ); + $manager = $this->getContainer()->get( Manager::class ); $manager->get_plugin()->add( __( 'Google for WooCommerce', 'google-listings-and-ads' ) ); From 0cbe3a457932639b21f1d479030d3d7b8fca10d0 Mon Sep 17 00:00:00 2001 From: mikkamp Date: Thu, 5 Dec 2024 15:07:16 +0000 Subject: [PATCH 11/12] Add support for league container v4 in tests --- tests/Tools/HelperTrait/GuzzleClientTrait.php | 4 +-- tests/Unit/API/ClientTest.php | 8 ++--- tests/Unit/API/Google/AdsCampaignTest.php | 6 ++-- tests/Unit/API/Google/AdsReportTest.php | 2 +- tests/Unit/API/Google/MiddlewareTest.php | 14 ++++----- .../Unit/API/Google/SiteVerificationTest.php | 2 +- .../ShippingTimeControllerTest.php | 4 +-- tests/Unit/API/WP/OAuthServiceTest.php | 6 ++-- tests/Unit/Ads/AccountServiceTest.php | 16 +++++----- tests/Unit/DB/ProductFeedQueryHelperTest.php | 6 ++-- .../MerchantCenter/AccountServiceTest.php | 30 +++++++++---------- .../MerchantCenterServiceTest.php | 28 ++++++++--------- .../MerchantCenter/MerchantStatusesTest.php | 22 +++++++------- 13 files changed, 74 insertions(+), 74 deletions(-) diff --git a/tests/Tools/HelperTrait/GuzzleClientTrait.php b/tests/Tools/HelperTrait/GuzzleClientTrait.php index 67d951f440..cfe65ebd96 100644 --- a/tests/Tools/HelperTrait/GuzzleClientTrait.php +++ b/tests/Tools/HelperTrait/GuzzleClientTrait.php @@ -27,8 +27,8 @@ trait GuzzleClientTrait { */ protected function guzzle_client_setup() { $this->client = $this->createMock( Client::class ); - $this->container->share( Client::class, $this->client ); - $this->container->share( 'connect_server_root', 'https://connect-server.test/' ); + $this->container->addShared( Client::class, $this->client ); + $this->container->addShared( 'connect_server_root', 'https://connect-server.test/' ); } /** diff --git a/tests/Unit/API/ClientTest.php b/tests/Unit/API/ClientTest.php index ecf35ddc1b..732329e785 100644 --- a/tests/Unit/API/ClientTest.php +++ b/tests/Unit/API/ClientTest.php @@ -61,12 +61,12 @@ public function setUp(): void { $this->options = $this->createMock( OptionsInterface::class ); $this->container = new Container(); - $this->container->share( Manager::class, $this->manager ); - $this->container->share( ReconnectWordPress::class, $this->note ); - $this->container->share( OptionsInterface::class, $this->options ); + $this->container->addShared( Manager::class, $this->manager ); + $this->container->addShared( ReconnectWordPress::class, $this->note ); + $this->container->addShared( OptionsInterface::class, $this->options ); $this->provider = new GoogleServiceProvider(); - $this->provider->setLeagueContainer( $this->container ); + $this->provider->setContainer( $this->container ); } /** diff --git a/tests/Unit/API/Google/AdsCampaignTest.php b/tests/Unit/API/Google/AdsCampaignTest.php index 74730c9998..a18c23e2e6 100644 --- a/tests/Unit/API/Google/AdsCampaignTest.php +++ b/tests/Unit/API/Google/AdsCampaignTest.php @@ -84,9 +84,9 @@ public function setUp(): void { $this->google_helper = new GoogleHelper( $this->wc ); $this->container = new Container(); - $this->container->share( AdsAssetGroup::class, $this->asset_group ); - $this->container->share( TransientsInterface::class, $this->transients ); - $this->container->share( WC::class, $this->wc ); + $this->container->addShared( AdsAssetGroup::class, $this->asset_group ); + $this->container->addShared( TransientsInterface::class, $this->transients ); + $this->container->addShared( WC::class, $this->wc ); $this->campaign = new AdsCampaign( $this->client, $this->budget, $this->criterion, $this->google_helper, $this->campaign_label ); $this->campaign->set_options_object( $this->options ); diff --git a/tests/Unit/API/Google/AdsReportTest.php b/tests/Unit/API/Google/AdsReportTest.php index d9e4b6d477..74e007d620 100644 --- a/tests/Unit/API/Google/AdsReportTest.php +++ b/tests/Unit/API/Google/AdsReportTest.php @@ -52,7 +52,7 @@ public function setUp(): void { $this->options->method( 'get_ads_id' )->willReturn( self::TEST_ADS_ID ); $this->container = new Container(); - $this->container->share( AdsCampaign::class, $this->ads_campaign ); + $this->container->addShared( AdsCampaign::class, $this->ads_campaign ); $this->report = new AdsReport( $this->client ); $this->report->set_options_object( $this->options ); diff --git a/tests/Unit/API/Google/MiddlewareTest.php b/tests/Unit/API/Google/MiddlewareTest.php index c999a481cd..db965d9813 100644 --- a/tests/Unit/API/Google/MiddlewareTest.php +++ b/tests/Unit/API/Google/MiddlewareTest.php @@ -83,13 +83,13 @@ public function setUp(): void { $this->wc = $this->createMock( WC::class ); $this->wp = $this->createMock( WP::class ); - $this->container->share( Ads::class, $this->ads ); - $this->container->share( DateTimeUtility::class, $this->date_utility ); - $this->container->share( GoogleHelper::class, $this->google_helper ); - $this->container->share( Merchant::class, $this->merchant ); - $this->container->share( TransientsInterface::class, $this->transients ); - $this->container->share( WC::class, $this->wc ); - $this->container->share( WP::class, $this->wp ); + $this->container->addShared( Ads::class, $this->ads ); + $this->container->addShared( DateTimeUtility::class, $this->date_utility ); + $this->container->addShared( GoogleHelper::class, $this->google_helper ); + $this->container->addShared( Merchant::class, $this->merchant ); + $this->container->addShared( TransientsInterface::class, $this->transients ); + $this->container->addShared( WC::class, $this->wc ); + $this->container->addShared( WP::class, $this->wp ); $this->middleware = new Middleware( $this->container ); $this->middleware->set_options_object( $this->options ); diff --git a/tests/Unit/API/Google/SiteVerificationTest.php b/tests/Unit/API/Google/SiteVerificationTest.php index f97b800bb6..50857891b4 100644 --- a/tests/Unit/API/Google/SiteVerificationTest.php +++ b/tests/Unit/API/Google/SiteVerificationTest.php @@ -56,7 +56,7 @@ public function setUp(): void { $this->verification_service->webResource = $this->createMock( WebResource::class ); $this->container = new Container(); - $this->container->share( SiteVerificationService::class, $this->verification_service ); + $this->container->addShared( SiteVerificationService::class, $this->verification_service ); $this->verification = new SiteVerification(); $this->verification->set_options_object( $this->options ); diff --git a/tests/Unit/API/Site/Controllers/MerchantCenter/ShippingTimeControllerTest.php b/tests/Unit/API/Site/Controllers/MerchantCenter/ShippingTimeControllerTest.php index 418e71e602..b0011e3712 100644 --- a/tests/Unit/API/Site/Controllers/MerchantCenter/ShippingTimeControllerTest.php +++ b/tests/Unit/API/Site/Controllers/MerchantCenter/ShippingTimeControllerTest.php @@ -41,8 +41,8 @@ public function setUp(): void { $this->iso_provider = $this->createMock( ISO3166DataProvider::class ); $this->container = new Container(); - $this->container->share( RESTServer::class, $this->server ); - $this->container->share( ShippingTimeQuery::class, $this->shiping_time_query ); + $this->container->addShared( RESTServer::class, $this->server ); + $this->container->addShared( ShippingTimeQuery::class, $this->shiping_time_query ); $this->controller = new ShippingTimeController( $this->container ); $this->controller->set_iso3166_provider( $this->iso_provider ); diff --git a/tests/Unit/API/WP/OAuthServiceTest.php b/tests/Unit/API/WP/OAuthServiceTest.php index a26e281d52..66e9229dd3 100644 --- a/tests/Unit/API/WP/OAuthServiceTest.php +++ b/tests/Unit/API/WP/OAuthServiceTest.php @@ -99,9 +99,9 @@ function ( $url, $path ) { 2 ); - $this->container->share( Middleware::class, $this->middleware ); - $this->container->share( Jetpack::class, $this->jp ); - $this->container->share( AccountService::class, $this->account_service ); + $this->container->addShared( Middleware::class, $this->middleware ); + $this->container->addShared( Jetpack::class, $this->jp ); + $this->container->addShared( AccountService::class, $this->account_service ); $this->service = new OAuthService(); $this->service->set_options_object( $this->options ); $this->service->set_container( $this->container ); diff --git a/tests/Unit/Ads/AccountServiceTest.php b/tests/Unit/Ads/AccountServiceTest.php index 6e609cb1db..e49097d951 100644 --- a/tests/Unit/Ads/AccountServiceTest.php +++ b/tests/Unit/Ads/AccountServiceTest.php @@ -122,14 +122,14 @@ public function setUp(): void { $this->connection = $this->createMock( Connection::class ); $this->container = new Container(); - $this->container->share( Ads::class, $this->ads ); - $this->container->share( AdsConversionAction::class, $this->conversion_action ); - $this->container->share( Merchant::class, $this->merchant ); - $this->container->share( Middleware::class, $this->middleware ); - $this->container->share( AdsAccountState::class, $this->state ); - $this->container->share( MerchantAccountState::class, $this->merchant_state ); - $this->container->share( TransientsInterface::class, $this->transients ); - $this->container->share( Connection::class, $this->connection ); + $this->container->addShared( Ads::class, $this->ads ); + $this->container->addShared( AdsConversionAction::class, $this->conversion_action ); + $this->container->addShared( Merchant::class, $this->merchant ); + $this->container->addShared( Middleware::class, $this->middleware ); + $this->container->addShared( AdsAccountState::class, $this->state ); + $this->container->addShared( MerchantAccountState::class, $this->merchant_state ); + $this->container->addShared( TransientsInterface::class, $this->transients ); + $this->container->addShared( Connection::class, $this->connection ); $this->account = new AccountService( $this->container ); $this->account->set_options_object( $this->options ); diff --git a/tests/Unit/DB/ProductFeedQueryHelperTest.php b/tests/Unit/DB/ProductFeedQueryHelperTest.php index a485c401ee..d212c23626 100644 --- a/tests/Unit/DB/ProductFeedQueryHelperTest.php +++ b/tests/Unit/DB/ProductFeedQueryHelperTest.php @@ -63,9 +63,9 @@ public function setUp(): void { $this->job = $this->createMock( UpdateMerchantProductStatuses::class ); $container = new Container(); - $container->share( MerchantCenterService::class, $this->mc_service ); - $container->share( MerchantStatuses::class, $this->merchant_statuses ); - $container->share( ProductHelper::class, $this->product_helper ); + $container->addShared( MerchantCenterService::class, $this->mc_service ); + $container->addShared( MerchantStatuses::class, $this->merchant_statuses ); + $container->addShared( ProductHelper::class, $this->product_helper ); $this->product_feed_query_helper = new ProductFeedQueryHelper( $this->wpdb, $this->product_repository ); $this->product_feed_query_helper->set_container( $container ); diff --git a/tests/Unit/MerchantCenter/AccountServiceTest.php b/tests/Unit/MerchantCenter/AccountServiceTest.php index 4962c04bdf..47cf019de4 100644 --- a/tests/Unit/MerchantCenter/AccountServiceTest.php +++ b/tests/Unit/MerchantCenter/AccountServiceTest.php @@ -138,21 +138,21 @@ public function setUp(): void { $this->notifications_service = $this->createMock( NotificationsService::class ); $this->container = new Container(); - $this->container->share( Ads::class, $this->ads ); - $this->container->share( CleanupSyncedProducts::class, $this->cleanup_synced ); - $this->container->share( Merchant::class, $this->merchant ); - $this->container->share( MerchantCenterService::class, $this->mc_service ); - $this->container->share( MerchantIssueTable::class, $this->issue_table ); - $this->container->share( MerchantStatuses::class, $this->merchant_statuses ); - $this->container->share( Middleware::class, $this->middleware ); - $this->container->share( SiteVerification::class, $this->site_verification ); - $this->container->share( ShippingRateTable::class, $this->rate_table ); - $this->container->share( ShippingTimeTable::class, $this->time_table ); - $this->container->share( MerchantAccountState::class, $this->state ); - $this->container->share( AdsAccountState::class, $this->ads_state ); - $this->container->share( TransientsInterface::class, $this->transients ); - $this->container->share( TransientsInterface::class, $this->transients ); - $this->container->share( NotificationsService::class, $this->notifications_service ); + $this->container->addShared( Ads::class, $this->ads ); + $this->container->addShared( CleanupSyncedProducts::class, $this->cleanup_synced ); + $this->container->addShared( Merchant::class, $this->merchant ); + $this->container->addShared( MerchantCenterService::class, $this->mc_service ); + $this->container->addShared( MerchantIssueTable::class, $this->issue_table ); + $this->container->addShared( MerchantStatuses::class, $this->merchant_statuses ); + $this->container->addShared( Middleware::class, $this->middleware ); + $this->container->addShared( SiteVerification::class, $this->site_verification ); + $this->container->addShared( ShippingRateTable::class, $this->rate_table ); + $this->container->addShared( ShippingTimeTable::class, $this->time_table ); + $this->container->addShared( MerchantAccountState::class, $this->state ); + $this->container->addShared( AdsAccountState::class, $this->ads_state ); + $this->container->addShared( TransientsInterface::class, $this->transients ); + $this->container->addShared( TransientsInterface::class, $this->transients ); + $this->container->addShared( NotificationsService::class, $this->notifications_service ); $this->account = new AccountService( $this->container ); $this->account->set_options_object( $this->options ); diff --git a/tests/Unit/MerchantCenter/MerchantCenterServiceTest.php b/tests/Unit/MerchantCenter/MerchantCenterServiceTest.php index f4eb298749..2eed6c4e83 100644 --- a/tests/Unit/MerchantCenter/MerchantCenterServiceTest.php +++ b/tests/Unit/MerchantCenter/MerchantCenterServiceTest.php @@ -111,20 +111,20 @@ public function setUp(): void { $this->options = $this->createMock( OptionsInterface::class ); $this->container = new Container(); - $this->container->share( AddressUtility::class, $this->address_utility ); - $this->container->share( AdsService::class, $this->ads_service ); - $this->container->share( ContactInformation::class, $this->contact_information ); - $this->container->share( GoogleHelper::class, $this->google_helper ); - $this->container->share( Merchant::class, $this->merchant ); - $this->container->share( MerchantAccountState::class, $this->merchant_account_state ); - $this->container->share( MerchantStatuses::class, $this->merchant_statuses ); - $this->container->share( Settings::class, $this->settings ); - $this->container->share( ShippingRateQuery::class, $this->shipping_rate_query ); - $this->container->share( ShippingTimeQuery::class, $this->shipping_time_query ); - $this->container->share( TargetAudience::class, $this->target_audience ); - $this->container->share( TransientsInterface::class, $this->transients ); - $this->container->share( WC::class, $this->wc ); - $this->container->share( WP::class, $this->wp ); + $this->container->addShared( AddressUtility::class, $this->address_utility ); + $this->container->addShared( AdsService::class, $this->ads_service ); + $this->container->addShared( ContactInformation::class, $this->contact_information ); + $this->container->addShared( GoogleHelper::class, $this->google_helper ); + $this->container->addShared( Merchant::class, $this->merchant ); + $this->container->addShared( MerchantAccountState::class, $this->merchant_account_state ); + $this->container->addShared( MerchantStatuses::class, $this->merchant_statuses ); + $this->container->addShared( Settings::class, $this->settings ); + $this->container->addShared( ShippingRateQuery::class, $this->shipping_rate_query ); + $this->container->addShared( ShippingTimeQuery::class, $this->shipping_time_query ); + $this->container->addShared( TargetAudience::class, $this->target_audience ); + $this->container->addShared( TransientsInterface::class, $this->transients ); + $this->container->addShared( WC::class, $this->wc ); + $this->container->addShared( WP::class, $this->wp ); $this->mc_service = new MerchantCenterService(); $this->mc_service->set_container( $this->container ); diff --git a/tests/Unit/MerchantCenter/MerchantStatusesTest.php b/tests/Unit/MerchantCenter/MerchantStatusesTest.php index 7dd0319280..eb9fd755a7 100644 --- a/tests/Unit/MerchantCenter/MerchantStatusesTest.php +++ b/tests/Unit/MerchantCenter/MerchantStatusesTest.php @@ -96,17 +96,17 @@ public function setUp(): void { $this->merchant_issue_table = $this->createMock( MerchantIssueTable::class ); $container = new Container(); - $container->share( Merchant::class, $this->merchant ); - $container->share( MerchantIssueQuery::class, $this->merchant_issue_query ); - $container->share( MerchantCenterService::class, $this->merchant_center_service ); - $container->share( TransientsInterface::class, $this->transients ); - $container->share( ProductRepository::class, $this->product_repository ); - $container->share( ProductMetaQueryHelper::class, $this->product_meta_query_helper ); - $container->share( ProductHelper::class, $this->product_helper ); - $container->share( MerchantIssueTable::class, $this->merchant_issue_table ); - $container->share( UpdateMerchantProductStatuses::class, $this->update_merchant_product_statuses_job ); - $container->share( UpdateAllProducts::class, $this->update_all_product_job ); - $container->share( DeleteAllProducts::class, $this->delete_all_product_job ); + $container->addShared( Merchant::class, $this->merchant ); + $container->addShared( MerchantIssueQuery::class, $this->merchant_issue_query ); + $container->addShared( MerchantCenterService::class, $this->merchant_center_service ); + $container->addShared( TransientsInterface::class, $this->transients ); + $container->addShared( ProductRepository::class, $this->product_repository ); + $container->addShared( ProductMetaQueryHelper::class, $this->product_meta_query_helper ); + $container->addShared( ProductHelper::class, $this->product_helper ); + $container->addShared( MerchantIssueTable::class, $this->merchant_issue_table ); + $container->addShared( UpdateMerchantProductStatuses::class, $this->update_merchant_product_statuses_job ); + $container->addShared( UpdateAllProducts::class, $this->update_all_product_job ); + $container->addShared( DeleteAllProducts::class, $this->delete_all_product_job ); $this->container = $container; $this->merchant_statuses = new MerchantStatuses(); From a0e163d90951fe219e7a0b6872e07257ff85db0c Mon Sep 17 00:00:00 2001 From: mikkamp Date: Thu, 5 Dec 2024 15:21:12 +0000 Subject: [PATCH 12/12] Fix for PHP 7.4 --- src/Container.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Container.php b/src/Container.php index 9640ccf39d..2a392d5a35 100644 --- a/src/Container.php +++ b/src/Container.php @@ -72,7 +72,7 @@ public function __construct( ?LeagueContainer $container = null ) { ->invokeMethod( 'set_container', [ ContainerInterface::class ] ); foreach ( $this->service_providers as $service_provider_class ) { - $this->container->addServiceProvider( new ( $service_provider_class )() ); + $this->container->addServiceProvider( new $service_provider_class() ); } }