Skip to content
Snippets Groups Projects
Verified Commit cceedd91 authored by Dave Long's avatar Dave Long
Browse files

Issue #3468502 by Spokje, mondrake: sebastianbergmann/comparator:5.0.2...

Issue #3468502 by Spokje, mondrake: sebastianbergmann/comparator:5.0.2 Introduces (for Drupal) breaking changes
parent 1384a2e1
No related branches found
No related tags found
No related merge requests found
...@@ -7178,32 +7178,32 @@ ...@@ -7178,32 +7178,32 @@
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
"version": "10.1.15", "version": "10.1.16",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "5da8b1728acd1e6ffdf2ff32ffbdfd04307f26ae" "reference": "7e308268858ed6baedc8704a304727d20bc07c77"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/5da8b1728acd1e6ffdf2ff32ffbdfd04307f26ae", "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7e308268858ed6baedc8704a304727d20bc07c77",
"reference": "5da8b1728acd1e6ffdf2ff32ffbdfd04307f26ae", "reference": "7e308268858ed6baedc8704a304727d20bc07c77",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-dom": "*", "ext-dom": "*",
"ext-libxml": "*", "ext-libxml": "*",
"ext-xmlwriter": "*", "ext-xmlwriter": "*",
"nikic/php-parser": "^4.18 || ^5.0", "nikic/php-parser": "^4.19.1 || ^5.1.0",
"php": ">=8.1", "php": ">=8.1",
"phpunit/php-file-iterator": "^4.0", "phpunit/php-file-iterator": "^4.1.0",
"phpunit/php-text-template": "^3.0", "phpunit/php-text-template": "^3.0.1",
"sebastian/code-unit-reverse-lookup": "^3.0", "sebastian/code-unit-reverse-lookup": "^3.0.0",
"sebastian/complexity": "^3.0", "sebastian/complexity": "^3.2.0",
"sebastian/environment": "^6.0", "sebastian/environment": "^6.1.0",
"sebastian/lines-of-code": "^2.0", "sebastian/lines-of-code": "^2.0.2",
"sebastian/version": "^4.0", "sebastian/version": "^4.0.1",
"theseer/tokenizer": "^1.2.0" "theseer/tokenizer": "^1.2.3"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^10.1" "phpunit/phpunit": "^10.1"
...@@ -7215,7 +7215,7 @@ ...@@ -7215,7 +7215,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "10.1-dev" "dev-main": "10.1.x-dev"
} }
}, },
"autoload": { "autoload": {
...@@ -7244,7 +7244,7 @@ ...@@ -7244,7 +7244,7 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.15" "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.16"
}, },
"funding": [ "funding": [
{ {
...@@ -7252,7 +7252,7 @@ ...@@ -7252,7 +7252,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2024-06-29T08:25:15+00:00" "time": "2024-08-22T04:31:57+00:00"
}, },
{ {
"name": "phpunit/php-file-iterator", "name": "phpunit/php-file-iterator",
...@@ -7499,16 +7499,16 @@ ...@@ -7499,16 +7499,16 @@
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "10.5.29", "version": "10.5.30",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "8e9e80872b4e8064401788ee8a32d40b4455318f" "reference": "b15524febac0153876b4ba9aab3326c2ee94c897"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8e9e80872b4e8064401788ee8a32d40b4455318f", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b15524febac0153876b4ba9aab3326c2ee94c897",
"reference": "8e9e80872b4e8064401788ee8a32d40b4455318f", "reference": "b15524febac0153876b4ba9aab3326c2ee94c897",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -7529,7 +7529,7 @@ ...@@ -7529,7 +7529,7 @@
"phpunit/php-timer": "^6.0.0", "phpunit/php-timer": "^6.0.0",
"sebastian/cli-parser": "^2.0.1", "sebastian/cli-parser": "^2.0.1",
"sebastian/code-unit": "^2.0.0", "sebastian/code-unit": "^2.0.0",
"sebastian/comparator": "^5.0.1", "sebastian/comparator": "^5.0.2",
"sebastian/diff": "^5.1.1", "sebastian/diff": "^5.1.1",
"sebastian/environment": "^6.1.0", "sebastian/environment": "^6.1.0",
"sebastian/exporter": "^5.1.2", "sebastian/exporter": "^5.1.2",
...@@ -7580,7 +7580,7 @@ ...@@ -7580,7 +7580,7 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues", "issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy", "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.29" "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.30"
}, },
"funding": [ "funding": [
{ {
...@@ -7596,7 +7596,7 @@ ...@@ -7596,7 +7596,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-07-30T11:08:00+00:00" "time": "2024-08-13T06:09:37+00:00"
}, },
{ {
"name": "react/promise", "name": "react/promise",
...@@ -7841,16 +7841,16 @@ ...@@ -7841,16 +7841,16 @@
}, },
{ {
"name": "sebastian/comparator", "name": "sebastian/comparator",
"version": "5.0.1", "version": "5.0.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git", "url": "https://github.com/sebastianbergmann/comparator.git",
"reference": "2db5010a484d53ebf536087a70b4a5423c102372" "reference": "2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2db5010a484d53ebf536087a70b4a5423c102372", "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53",
"reference": "2db5010a484d53ebf536087a70b4a5423c102372", "reference": "2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -7861,7 +7861,7 @@ ...@@ -7861,7 +7861,7 @@
"sebastian/exporter": "^5.0" "sebastian/exporter": "^5.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^10.3" "phpunit/phpunit": "^10.4"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
...@@ -7906,7 +7906,7 @@ ...@@ -7906,7 +7906,7 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/comparator/issues", "issues": "https://github.com/sebastianbergmann/comparator/issues",
"security": "https://github.com/sebastianbergmann/comparator/security/policy", "security": "https://github.com/sebastianbergmann/comparator/security/policy",
"source": "https://github.com/sebastianbergmann/comparator/tree/5.0.1" "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.2"
}, },
"funding": [ "funding": [
{ {
...@@ -7914,7 +7914,7 @@ ...@@ -7914,7 +7914,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-08-14T13:18:12+00:00" "time": "2024-08-12T06:03:08+00:00"
}, },
{ {
"name": "sebastian/complexity", "name": "sebastian/complexity",
......
...@@ -52,17 +52,17 @@ ...@@ -52,17 +52,17 @@
"phpstan/phpstan": "1.11.10", "phpstan/phpstan": "1.11.10",
"phpstan/phpstan-deprecation-rules": "1.2.0", "phpstan/phpstan-deprecation-rules": "1.2.0",
"phpstan/phpstan-phpunit": "1.4.0", "phpstan/phpstan-phpunit": "1.4.0",
"phpunit/php-code-coverage": "10.1.15", "phpunit/php-code-coverage": "10.1.16",
"phpunit/php-file-iterator": "4.1.0", "phpunit/php-file-iterator": "4.1.0",
"phpunit/php-invoker": "4.0.0", "phpunit/php-invoker": "4.0.0",
"phpunit/php-text-template": "3.0.1", "phpunit/php-text-template": "3.0.1",
"phpunit/php-timer": "6.0.0", "phpunit/php-timer": "6.0.0",
"phpunit/phpunit": "10.5.29", "phpunit/phpunit": "10.5.30",
"react/promise": "v3.2.0", "react/promise": "v3.2.0",
"sebastian/cli-parser": "2.0.1", "sebastian/cli-parser": "2.0.1",
"sebastian/code-unit": "2.0.0", "sebastian/code-unit": "2.0.0",
"sebastian/code-unit-reverse-lookup": "3.0.0", "sebastian/code-unit-reverse-lookup": "3.0.0",
"sebastian/comparator": "5.0.1", "sebastian/comparator": "5.0.2",
"sebastian/complexity": "3.2.0", "sebastian/complexity": "3.2.0",
"sebastian/environment": "6.1.0", "sebastian/environment": "6.1.0",
"sebastian/exporter": "5.1.2", "sebastian/exporter": "5.1.2",
......
...@@ -17,39 +17,39 @@ class Cache { ...@@ -17,39 +17,39 @@ class Cache {
const PERMANENT = CacheBackendInterface::CACHE_PERMANENT; const PERMANENT = CacheBackendInterface::CACHE_PERMANENT;
/** /**
* Merges arrays of cache contexts and removes duplicates. * Merges lists of cache contexts and removes duplicates.
* *
* @param string[] ... * @param list<string> ...
* Cache contexts arrays to merge. * Cache contexts to merge.
* *
* @return string[] * @return list<string>
* The merged array of cache contexts. * The merged list of cache contexts.
*/ */
public static function mergeContexts(array ...$cache_contexts) { public static function mergeContexts(array ...$cache_contexts) {
$cache_contexts = array_unique(array_merge(...$cache_contexts)); $cache_contexts = array_values(array_unique(array_merge(...$cache_contexts)));
assert(\Drupal::service('cache_contexts_manager')->assertValidTokens($cache_contexts), sprintf('Failed to assert that "%s" are valid cache contexts.', implode(', ', $cache_contexts))); assert(\Drupal::service('cache_contexts_manager')->assertValidTokens($cache_contexts), sprintf('Failed to assert that "%s" are valid cache contexts.', implode(', ', $cache_contexts)));
return $cache_contexts; return $cache_contexts;
} }
/** /**
* Merges arrays of cache tags and removes duplicates. * Merges lists of cache tags and removes duplicates.
* *
* The cache tags array is returned in a format that is valid for * The cache tags list is returned in a format that is valid for
* \Drupal\Core\Cache\CacheBackendInterface::set(). * \Drupal\Core\Cache\CacheBackendInterface::set().
* *
* When caching elements, it is necessary to collect all cache tags into a * When caching elements, it is necessary to collect all cache tags into a
* single array, from both the element itself and all child elements. This * single list, from both the element itself and all child elements. This
* allows items to be invalidated based on all tags attached to the content * allows items to be invalidated based on all tags attached to the content
* they're constituted from. * they're constituted from.
* *
* @param string[] ... * @param list<string> ...
* Cache tags arrays to merge. * Cache tags to merge.
* *
* @return string[] * @return list<string>
* The merged array of cache tags. * The merged list of cache tags.
*/ */
public static function mergeTags(array ...$cache_tags) { public static function mergeTags(array ...$cache_tags) {
$cache_tags = array_unique(array_merge(...$cache_tags)); $cache_tags = array_values(array_unique(array_merge(...$cache_tags)));
assert(Inspector::assertAllStrings($cache_tags), 'Cache tags must be valid strings'); assert(Inspector::assertAllStrings($cache_tags), 'Cache tags must be valid strings');
return $cache_tags; return $cache_tags;
} }
...@@ -77,7 +77,7 @@ public static function mergeMaxAges(...$max_ages) { ...@@ -77,7 +77,7 @@ public static function mergeMaxAges(...$max_ages) {
} }
/** /**
* Build an array of cache tags from a given prefix and an array of suffixes. * Build a list of cache tags from a given prefix and an array of suffixes.
* *
* Each suffix will be converted to a cache tag by appending it to the prefix, * Each suffix will be converted to a cache tag by appending it to the prefix,
* with a colon between them. * with a colon between them.
...@@ -89,8 +89,8 @@ public static function mergeMaxAges(...$max_ages) { ...@@ -89,8 +89,8 @@ public static function mergeMaxAges(...$max_ages) {
* @param string $glue * @param string $glue
* A string to be used as glue for concatenation. Defaults to a colon. * A string to be used as glue for concatenation. Defaults to a colon.
* *
* @return string[] * @return list<string>
* An array of cache tags. * A list of cache tags.
*/ */
public static function buildTags($prefix, array $suffixes, $glue = ':') { public static function buildTags($prefix, array $suffixes, $glue = ':') {
$tags = []; $tags = [];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment