From 23e93d573c4ada8b0a2290c7f5b2948ec460d4c7 Mon Sep 17 00:00:00 2001 From: George Steel Date: Mon, 1 Apr 2024 22:56:38 +0100 Subject: [PATCH 01/18] Add a `ForceUriScheme` filter to ease removal of `UriNormalize` filter Signed-off-by: George Steel --- docs/book/v2/standard-filters.md | 19 +++++++ psalm-baseline.xml | 6 ++ src/FilterPluginManager.php | 1 + src/ForceUriScheme.php | 77 +++++++++++++++++++++++++ test/ForceUriSchemeTest.php | 96 ++++++++++++++++++++++++++++++++ 5 files changed, 199 insertions(+) create mode 100644 src/ForceUriScheme.php create mode 100644 test/ForceUriSchemeTest.php diff --git a/docs/book/v2/standard-filters.md b/docs/book/v2/standard-filters.md index ec5ae81d..9990a46b 100644 --- a/docs/book/v2/standard-filters.md +++ b/docs/book/v2/standard-filters.md @@ -1181,6 +1181,25 @@ $decrypted = $filter->filter('encoded_text_normally_unreadable'); print $decrypted; ``` +## ForceUriScheme + +This filter will ensure that, given a string that looks like a URI with a host-name and scheme, the scheme will be forced to `https` by default, or any other arbitrary scheme provided as an option. + +Any value that cannot be identified as an URI to begin with, will be returned un-filtered. Furthermore, URI parsing is rudimentary so for reliable results, you should ensure that the input is a valid URI prior to filtering. + +### Supported Options + +The only supported option is `scheme` which defaults to `https` + +### Example Usage + +```php +$filter = new Laminas\Filter\ForceUriScheme(['scheme' => 'ftp']); + +$filter->filter('https://example.com/path'); // 'ftp://example.com/path' +$filter->filter('example.com'); // 'example.com' - Unfiltered because it lacks a scheme +``` + ## HtmlEntities Returns the string `$value`, converting characters to their corresponding HTML diff --git a/psalm-baseline.xml b/psalm-baseline.xml index a8797c0d..a8221f97 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1675,6 +1675,12 @@ + + + + + + diff --git a/src/FilterPluginManager.php b/src/FilterPluginManager.php index 53bf403e..94d93683 100644 --- a/src/FilterPluginManager.php +++ b/src/FilterPluginManager.php @@ -357,6 +357,7 @@ class FilterPluginManager extends AbstractPluginManager File\Rename::class => InvokableFactory::class, File\RenameUpload::class => InvokableFactory::class, File\UpperCase::class => InvokableFactory::class, + ForceUriScheme::class => InvokableFactory::class, HtmlEntities::class => InvokableFactory::class, Inflector::class => InvokableFactory::class, ToInt::class => InvokableFactory::class, diff --git a/src/ForceUriScheme.php b/src/ForceUriScheme.php new file mode 100644 index 00000000..01140131 --- /dev/null +++ b/src/ForceUriScheme.php @@ -0,0 +1,77 @@ + self::DEFAULT_SCHEME]) + { + if (! preg_match('/^[a-z0-9]+$/i', $options['scheme'])) { + throw new InvalidArgumentException(sprintf( + 'The `scheme` option should be a string consisting only of letters and numbers. Please omit the :// ' + . ' Received "%s"', + $options['scheme'], + )); + } + + $this->scheme = $options['scheme']; + } + + public function __invoke(mixed $value): mixed + { + return $this->filter($value); + } + + public function filter(mixed $value): mixed + { + if (! is_string($value) || $value === '') { + return $value; + } + + $url = parse_url($value); + + if (! isset($url['host']) || $url['host'] === '') { + return $value; + } + + if (! isset($url['scheme']) || $url['scheme'] === '') { + return sprintf( + '%s://%s', + $this->scheme, + ltrim($value, ':/'), + ); + } + + $search = sprintf( + '/^(%s)(.+)/', + preg_quote($url['scheme'], '/'), + ); + $replace = sprintf( + '%s$2', + $this->scheme, + ); + + return preg_replace($search, $replace, $value); + } +} diff --git a/test/ForceUriSchemeTest.php b/test/ForceUriSchemeTest.php new file mode 100644 index 00000000..140aa1d2 --- /dev/null +++ b/test/ForceUriSchemeTest.php @@ -0,0 +1,96 @@ + */ + public static function filterDataProvider(): array + { + return [ + ['https', 'www.example.com/foo', 'www.example.com/foo'], + ['https', 'www.example.com', 'www.example.com'], + ['https', 'example.com', 'example.com'], + ['https', 'http://www.example.com', 'https://www.example.com'], + ['ftp', 'https://www.example.com', 'ftp://www.example.com'], + ['foobar5', 'https://www.example.com', 'foobar5://www.example.com'], + ['https', '//www.example.com', 'https://www.example.com'], + ['https', 'http://http.example.com', 'https://http.example.com'], + ['https', '42', '42'], + ['https', 42, 42], + ['https', false, false], + ['https', null, null], + ['https', (object) [], (object) []], + ]; + } + + /** + * @param non-empty-string $scheme + */ + #[DataProvider('filterDataProvider')] + public function testBasicFiltering(string $scheme, mixed $input, mixed $expect): void + { + $filter = new ForceUriScheme(['scheme' => $scheme]); + self::assertEquals($expect, $filter->filter($input)); + } + + /** + * @param non-empty-string $scheme + */ + #[DataProvider('filterDataProvider')] + public function testFilterCanBeInvoked(string $scheme, mixed $input, mixed $expect): void + { + $filter = new ForceUriScheme(['scheme' => $scheme]); + self::assertEquals($expect, $filter->__invoke($input)); + } + + /** @return list */ + public static function badSchemeProvider(): array + { + return [ + [''], + ['foo://'], + ['mailto:'], + ['...'], + ]; + } + + #[DataProvider('badSchemeProvider')] + public function testInvalidScheme(string $scheme): void + { + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('The `scheme` option should be a string consisting only of letters and numbers'); + + /** @psalm-suppress ArgumentTypeCoercion */ + new ForceUriScheme(['scheme' => $scheme]); + } + + public function testThatThePluginManagerWillReturnAnInstance(): void + { + $manager = new FilterPluginManager($this->createMock(ContainerInterface::class)); + $filter = $manager->get(ForceUriScheme::class); + self::assertInstanceOf(ForceUriScheme::class, $filter); + + self::assertSame('https://example.com', $filter->filter('ftp://example.com')); + } + + public function testThatThePluginManagerCanBuildWithOptions(): void + { + $manager = new FilterPluginManager($this->createMock(ContainerInterface::class)); + $filter = $manager->build(ForceUriScheme::class, ['scheme' => 'muppets']); + self::assertInstanceOf(ForceUriScheme::class, $filter); + + self::assertSame('muppets://example.com', $filter->filter('ftp://example.com')); + } +} From 3089a4e5bef09b3d395a48aae4526203ab7daf25 Mon Sep 17 00:00:00 2001 From: George Steel Date: Mon, 1 Apr 2024 21:40:45 +0100 Subject: [PATCH 02/18] Deprecate the `UriNormalize` filter See #110 Signed-off-by: George Steel --- docs/book/v2/standard-filters.md | 3 +++ psalm-baseline.xml | 11 +++++++++++ src/UriNormalize.php | 2 ++ test/UriNormalizeTest.php | 5 +++++ 4 files changed, 21 insertions(+) diff --git a/docs/book/v2/standard-filters.md b/docs/book/v2/standard-filters.md index 9990a46b..835f3364 100644 --- a/docs/book/v2/standard-filters.md +++ b/docs/book/v2/standard-filters.md @@ -1931,6 +1931,9 @@ as the result. ## UriNormalize +CAUTION: **Deprecated** +This filter is deprecated since version 2.36.0 and will be remove in version 3.0. There will not be a replacement. + This filter sets the scheme on a URI if the scheme is missing. ### Supported Options diff --git a/psalm-baseline.xml b/psalm-baseline.xml index a8221f97..da1492f7 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1027,6 +1027,12 @@ + + + + + + @@ -1895,6 +1901,11 @@ + + + + $scheme])]]> + diff --git a/src/UriNormalize.php b/src/UriNormalize.php index 26ecd652..028938e5 100644 --- a/src/UriNormalize.php +++ b/src/UriNormalize.php @@ -16,6 +16,8 @@ use function str_contains; /** + * @deprecated This filter will be removed in version 3.0 without replacement + * * @psalm-type Options = array{ * default_scheme?: string, * enforced_scheme?: string, diff --git a/test/UriNormalizeTest.php b/test/UriNormalizeTest.php index 7cd7d9b1..d86e5731 100644 --- a/test/UriNormalizeTest.php +++ b/test/UriNormalizeTest.php @@ -9,6 +9,11 @@ use PHPUnit\Framework\TestCase; use stdClass; +/** + * @deprecated + * + * @todo Remove this test in v3.0 + */ class UriNormalizeTest extends TestCase { #[DataProvider('abnormalUriProvider')] From ebeeb487817a81dc66f18df7885d47c2d563a344 Mon Sep 17 00:00:00 2001 From: George Steel Date: Wed, 3 Apr 2024 21:36:23 +0100 Subject: [PATCH 03/18] Amend deprecation notice in docs to reference the ForceUriScheme filter Signed-off-by: George Steel --- docs/book/v2/standard-filters.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/book/v2/standard-filters.md b/docs/book/v2/standard-filters.md index 835f3364..09cbce30 100644 --- a/docs/book/v2/standard-filters.md +++ b/docs/book/v2/standard-filters.md @@ -1932,7 +1932,7 @@ as the result. ## UriNormalize CAUTION: **Deprecated** -This filter is deprecated since version 2.36.0 and will be remove in version 3.0. There will not be a replacement. +This filter is deprecated since version 2.36.0 and will be removed in version 3.0. The ability to force the scheme has been moved to the [ForceUriScheme filter](#forceurischeme). This filter sets the scheme on a URI if the scheme is missing. From 883923e43d370b0faada0affb3a000ed84c91fb0 Mon Sep 17 00:00:00 2001 From: George Steel Date: Mon, 4 Mar 2024 21:19:41 +0000 Subject: [PATCH 04/18] Stop ignoring platform reqs and add BC Check to matrix Signed-off-by: George Steel --- .laminas-ci.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.laminas-ci.json b/.laminas-ci.json index 623a8eca..df25c514 100644 --- a/.laminas-ci.json +++ b/.laminas-ci.json @@ -1,5 +1,6 @@ { - "ignore_php_platform_requirements": { - "8.3": true - } + "ignore_php_platform_requirements": { + "8.3": false + }, + "backwardCompatibilityCheck": true } From 9cdf62c311384ec1a360585875a3c246b50c8f53 Mon Sep 17 00:00:00 2001 From: George Steel Date: Wed, 3 Apr 2024 22:33:40 +0100 Subject: [PATCH 05/18] Add preparing for v3 guide Signed-off-by: George Steel --- docs/book/v2/migration/preparing-for-v3.md | 55 ++++++++++++++++++++++ mkdocs.yml | 2 + 2 files changed, 57 insertions(+) create mode 100644 docs/book/v2/migration/preparing-for-v3.md diff --git a/docs/book/v2/migration/preparing-for-v3.md b/docs/book/v2/migration/preparing-for-v3.md new file mode 100644 index 00000000..d36e406b --- /dev/null +++ b/docs/book/v2/migration/preparing-for-v3.md @@ -0,0 +1,55 @@ +# Preparing for Version 3 + +Version 3 will introduce a number of backwards incompatible changes. This document is intended to help you prepare for these changes. + +## Removed Features + +### Inheritance Changes + +Most filters will be closed to inheritance in v3 by employing the `final` keyword. +To prepare for this change, search for classes in your codebase that extend from any of the concrete filters and either re-implement them completely, or consider refactoring them to use composition instead of inheritance. + +If you have extended an existing filter for a use-case that is not handled by this library, also consider sending a patch if you think that the library could benefit from your changes. + +### Compression Filter Adapter Removal + +The Lzf, Snappy and Rar compression adapters will be removed in version 3.0. +If you are currently using any of these compression formats with laminas-filter, you will need to either use an alternative format such as Zip, Tar, Gz or Bz2, or, write a custom adapter to support your desired compression format. + +### Encryption & Decryption Filter Removal + +These filters have become outdated and will be removed in version 3.0 of this library. We recommend that you make use of a maintained encryption library and [write your own filters](../writing-filters.md) if you need to encrypt or decrypt content using the `FilterInterface` contract. + +- `Laminas\Filter\File\Decrypt` +- `Laminas\Filter\File\Encrypt` +- `Laminas\Filter\Decrypt` +- `Laminas\Filter\Encrypt` + +### Static Filter Removal + +`Laminas\Filter\StaticFilter` will be removed without replacement in v3. Most filters are "new-able" so similar behaviour can be accomplished with: + +```php +$filtered = (new \Laminas\Filter\HtmlEntities())('Nuts & Bolts'); +``` + +For filters requiring more complex construction, we encourage you to make use of dependency injection and compose the filter itself, or via the `FilterPluginManager`, for example: + +```php +$pluginManager = $container->get(\Laminas\Filter\FilterPluginManager::class); +$filter = $pluginManager->get(\Laminas\Filter\HtmlEntities::class); +$filtered = $filter->filter('A String'); +``` + +### Whitelist & Blacklist Filter Removal + +The deprecated filters `Whitelist` & `Blacklist` will be removed in v3 for their more favourably named counterparts `AllowList` and `DenyList` + +- `Laminas\Filter\Whitelist` has been replaced by [`Laminas\Filter\AllowList`](../standard-filters.md#allowlist) +- `Laminas\Filter\Blacklist` has been replaced by [`Laminas\Filter\DenyList`](../standard-filters.md#denylist) + +### UriNormalize Filter Removal + +The [UriNormalize](../standard-filters.md#urinormalize) filter will be removed in version 3, primarily because its functionality is provided by `laminas-uri` which is no longer maintained. + +There is not a direct replacement, but, if you were using the filter to normalize URL schemes, this functionality has been preserved in a new filter [ForceUriScheme](../standard-filters.md#forceurischeme). diff --git a/mkdocs.yml b/mkdocs.yml index 9fc753eb..8515abf8 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -12,6 +12,8 @@ nav: - 'String Inflection': v2/inflector.md - 'Static Filter': v2/static-filter.md - 'Writing Filters': v2/writing-filters.md + - Migration: + - 'Preparing for v3': v2/migration/preparing-for-v3.md site_name: laminas-filter site_description: "Programmatically filter and normalize data and files." repo_url: 'https://github.com/laminas/laminas-filter' From 6b571c2ed8b9e8af5076eb0d169bea4eb2029dc0 Mon Sep 17 00:00:00 2001 From: George Steel Date: Wed, 3 Apr 2024 23:17:52 +0100 Subject: [PATCH 06/18] Update deprecation notice to mention alternative filter Signed-off-by: George Steel --- src/UriNormalize.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/UriNormalize.php b/src/UriNormalize.php index 028938e5..8ae71cee 100644 --- a/src/UriNormalize.php +++ b/src/UriNormalize.php @@ -16,7 +16,8 @@ use function str_contains; /** - * @deprecated This filter will be removed in version 3.0 without replacement + * @deprecated This filter will be removed in version 3.0 + * The {@link ForceUriScheme} filter partially replicates functionality here. * * @psalm-type Options = array{ * default_scheme?: string, From e3a2939988734c7487482e256325f65900bfe3a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Br=C3=BCckner?= Date: Thu, 4 Apr 2024 11:07:59 +0200 Subject: [PATCH 07/18] Adds installation page to documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frank Brückner --- docs/book/v2/installation.md | 5 +++++ mkdocs.yml | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 docs/book/v2/installation.md diff --git a/docs/book/v2/installation.md b/docs/book/v2/installation.md new file mode 100644 index 00000000..be1198c9 --- /dev/null +++ b/docs/book/v2/installation.md @@ -0,0 +1,5 @@ +# This Is Only a Placeholder + +The content of this page can be found under: + +https://github.com/laminas/documentation-theme/blob/master/theme/pages/installation.html diff --git a/mkdocs.yml b/mkdocs.yml index 9fc753eb..ee5a407b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -4,6 +4,7 @@ nav: - Home: index.md - v2: - Introduction: v2/intro.md + - Installation: v2/installation.md - Reference: - 'Standard Filters': v2/standard-filters.md - 'Word Filters': v2/word.md @@ -17,6 +18,9 @@ site_description: "Programmatically filter and normalize data and files." repo_url: 'https://github.com/laminas/laminas-filter' extra: project: Components + installation: + config_provider_class: 'Laminas\Filter\ConfigProvider' + module_class: 'Laminas\Filter\Module' current_version: v2 versions: - v2 From 0dfeacb557cd6a1a06aff9be3d6e47490463dc8a Mon Sep 17 00:00:00 2001 From: George Steel Date: Thu, 4 Apr 2024 10:30:06 +0100 Subject: [PATCH 08/18] Add deprecation notice for StaticFilter to the docs Signed-off-by: George Steel --- docs/book/v2/intro.md | 3 +++ docs/book/v2/static-filter.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/docs/book/v2/intro.md b/docs/book/v2/intro.md index 611cdaee..f10ac0ba 100644 --- a/docs/book/v2/intro.md +++ b/docs/book/v2/intro.md @@ -55,6 +55,9 @@ $laminaslove = $strtolower('I LOVE Laminas!'); ## Using the StaticFilter +CAUTION: **Deprecated** +This filter is deprecated since version 2.15.0 and [will be removed](migration/preparing-for-v3.md#static-filter-removal) in version 3.0. + If it is inconvenient to load a given filter class and create an instance of the filter, you can use `StaticFilter` with its `execute()` method as an alternative invocation style. The first argument of this method is a data input value, that diff --git a/docs/book/v2/static-filter.md b/docs/book/v2/static-filter.md index 126c139e..5eae7260 100644 --- a/docs/book/v2/static-filter.md +++ b/docs/book/v2/static-filter.md @@ -1,5 +1,8 @@ # Static Filter +CAUTION: **Deprecated** +This filter is deprecated since version 2.15.0 and [will be removed](migration/preparing-for-v3.md#static-filter-removal) in version 3.0. + If it is inconvenient to load a given filter class and create an instance of the filter, you can use `StaticFilter` with it's method `execute()` as an alternative invocation style. The first argument of this method is a data input From f98ddcfe5b145d84ccfe3cddd95ba60d09231843 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 00:24:00 +0000 Subject: [PATCH 09/18] Lock file maintenance Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- composer.lock | 58 +++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/composer.lock b/composer.lock index 7446a019..0a8eaf88 100644 --- a/composer.lock +++ b/composer.lock @@ -1330,16 +1330,16 @@ }, { "name": "laminas/laminas-validator", - "version": "2.52.0", + "version": "2.53.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-validator.git", - "reference": "29087fbe742de8f7adab03969c1b5abff9d88808" + "reference": "dbcfc19cb7f2e3eb3a27ba5d059c200e8404d72c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/29087fbe742de8f7adab03969c1b5abff9d88808", - "reference": "29087fbe742de8f7adab03969c1b5abff9d88808", + "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/dbcfc19cb7f2e3eb3a27ba5d059c200e8404d72c", + "reference": "dbcfc19cb7f2e3eb3a27ba5d059c200e8404d72c", "shasum": "" }, "require": { @@ -1410,7 +1410,7 @@ "type": "community_bridge" } ], - "time": "2024-03-26T11:05:42+00:00" + "time": "2024-04-01T09:26:32+00:00" }, { "name": "myclabs/deep-copy", @@ -2457,16 +2457,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.16", + "version": "10.5.17", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "18f8d4a5f52b61fdd9370aaae3167daa0eeb69cd" + "reference": "c1f736a473d21957ead7e94fcc029f571895abf5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/18f8d4a5f52b61fdd9370aaae3167daa0eeb69cd", - "reference": "18f8d4a5f52b61fdd9370aaae3167daa0eeb69cd", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c1f736a473d21957ead7e94fcc029f571895abf5", + "reference": "c1f736a473d21957ead7e94fcc029f571895abf5", "shasum": "" }, "require": { @@ -2538,7 +2538,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.16" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.17" }, "funding": [ { @@ -2554,7 +2554,7 @@ "type": "tidelift" } ], - "time": "2024-03-28T10:08:10+00:00" + "time": "2024-04-05T04:39:01+00:00" }, { "name": "psalm/plugin-phpunit", @@ -3896,16 +3896,16 @@ }, { "name": "symfony/console", - "version": "v6.4.4", + "version": "v6.4.6", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "0d9e4eb5ad413075624378f474c4167ea202de78" + "reference": "a2708a5da5c87d1d0d52937bdeac625df659e11f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0d9e4eb5ad413075624378f474c4167ea202de78", - "reference": "0d9e4eb5ad413075624378f474c4167ea202de78", + "url": "https://api.github.com/repos/symfony/console/zipball/a2708a5da5c87d1d0d52937bdeac625df659e11f", + "reference": "a2708a5da5c87d1d0d52937bdeac625df659e11f", "shasum": "" }, "require": { @@ -3970,7 +3970,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.4" + "source": "https://github.com/symfony/console/tree/v6.4.6" }, "funding": [ { @@ -3986,7 +3986,7 @@ "type": "tidelift" } ], - "time": "2024-02-22T20:27:10+00:00" + "time": "2024-03-29T19:07:53+00:00" }, { "name": "symfony/deprecation-contracts", @@ -4057,16 +4057,16 @@ }, { "name": "symfony/filesystem", - "version": "v6.4.3", + "version": "v6.4.6", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "7f3b1755eb49297a0827a7575d5d2b2fd11cc9fb" + "reference": "9919b5509ada52cc7f66f9a35c86a4a29955c9d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/7f3b1755eb49297a0827a7575d5d2b2fd11cc9fb", - "reference": "7f3b1755eb49297a0827a7575d5d2b2fd11cc9fb", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/9919b5509ada52cc7f66f9a35c86a4a29955c9d3", + "reference": "9919b5509ada52cc7f66f9a35c86a4a29955c9d3", "shasum": "" }, "require": { @@ -4100,7 +4100,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.4.3" + "source": "https://github.com/symfony/filesystem/tree/v6.4.6" }, "funding": [ { @@ -4116,7 +4116,7 @@ "type": "tidelift" } ], - "time": "2024-01-23T14:51:35+00:00" + "time": "2024-03-21T19:36:20+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4438,16 +4438,16 @@ }, { "name": "symfony/service-contracts", - "version": "v3.4.1", + "version": "v3.4.2", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "fe07cbc8d837f60caf7018068e350cc5163681a0" + "reference": "11bbf19a0fb7b36345861e85c5768844c552906e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/fe07cbc8d837f60caf7018068e350cc5163681a0", - "reference": "fe07cbc8d837f60caf7018068e350cc5163681a0", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/11bbf19a0fb7b36345861e85c5768844c552906e", + "reference": "11bbf19a0fb7b36345861e85c5768844c552906e", "shasum": "" }, "require": { @@ -4500,7 +4500,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.4.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.4.2" }, "funding": [ { @@ -4516,7 +4516,7 @@ "type": "tidelift" } ], - "time": "2023-12-26T14:02:43+00:00" + "time": "2023-12-19T21:51:00+00:00" }, { "name": "symfony/string", From ea501a54e91754556f213ddfd7cfc05858917db0 Mon Sep 17 00:00:00 2001 From: Pieter Hoste Date: Thu, 11 Apr 2024 09:08:44 +0200 Subject: [PATCH 10/18] Fixes regression, Allow callbacks to be a FilterInterface again. Signed-off-by: Pieter Hoste --- src/FilterChain.php | 4 ++-- test/FilterChainTest.php | 8 +++++--- test/TestAsset/StrRepeatFilterInterface.php | 17 +++++++++++++++++ 3 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 test/TestAsset/StrRepeatFilterInterface.php diff --git a/src/FilterChain.php b/src/FilterChain.php index 4c092ed2..8343becb 100644 --- a/src/FilterChain.php +++ b/src/FilterChain.php @@ -29,7 +29,7 @@ * priority?: int, * }>, * callbacks?: list * } @@ -87,7 +87,7 @@ public function setOptions($options) foreach ($value as $spec) { $callback = $spec['callback'] ?? false; $priority = $spec['priority'] ?? static::DEFAULT_PRIORITY; - if (is_callable($callback)) { + if (is_callable($callback) || $callback instanceof FilterInterface) { $this->attach($callback, $priority); } } diff --git a/test/FilterChainTest.php b/test/FilterChainTest.php index 33b3df7f..3280692a 100644 --- a/test/FilterChainTest.php +++ b/test/FilterChainTest.php @@ -10,6 +10,7 @@ use Laminas\Filter\StringToLower; use Laminas\Filter\StringTrim; use Laminas\Filter\StripTags; +use LaminasTest\Filter\TestAsset\StrRepeatFilterInterface; use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; @@ -77,7 +78,7 @@ public function testAllowsConfiguringFilters(): void $chain = new FilterChain(); $chain->setOptions($config); $value = ' abc '; - $valueExpected = 'ABC '; + $valueExpected = 'ABC ABC '; self::assertSame($valueExpected, $chain->filter($value)); } @@ -86,7 +87,7 @@ public function testAllowsConfiguringFiltersViaConstructor(): void $config = $this->getChainConfig(); $chain = new FilterChain($config); $value = ' abc '; - $valueExpected = 'ABC'; + $valueExpected = 'ABCABC'; self::assertSame($valueExpected, $chain->filter($value)); } @@ -96,7 +97,7 @@ public function testConfigurationAllowsTraversableObjects(): void $config = new ArrayIterator($config); $chain = new FilterChain($config); $value = ' abc '; - $valueExpected = 'ABC'; + $valueExpected = 'ABCABC'; self::assertSame($valueExpected, $chain->filter($value)); } @@ -117,6 +118,7 @@ private function getChainConfig(): array return [ 'callbacks' => [ ['callback' => [self::class, 'staticUcaseFilter']], + ['callback' => new StrRepeatFilterInterface()], [ 'priority' => 10000, 'callback' => static fn(string $value): string => trim($value), diff --git a/test/TestAsset/StrRepeatFilterInterface.php b/test/TestAsset/StrRepeatFilterInterface.php new file mode 100644 index 00000000..0912fe86 --- /dev/null +++ b/test/TestAsset/StrRepeatFilterInterface.php @@ -0,0 +1,17 @@ + Date: Mon, 15 Apr 2024 00:48:12 +0000 Subject: [PATCH 11/18] Lock file maintenance Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- composer.lock | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/composer.lock b/composer.lock index 0a8eaf88..9e140af1 100644 --- a/composer.lock +++ b/composer.lock @@ -296,16 +296,16 @@ }, { "name": "amphp/byte-stream", - "version": "v1.8.1", + "version": "v1.8.2", "source": { "type": "git", "url": "https://github.com/amphp/byte-stream.git", - "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd" + "reference": "4f0e968ba3798a423730f567b1b50d3441c16ddc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/acbd8002b3536485c997c4e019206b3f10ca15bd", - "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/4f0e968ba3798a423730f567b1b50d3441c16ddc", + "reference": "4f0e968ba3798a423730f567b1b50d3441c16ddc", "shasum": "" }, "require": { @@ -321,11 +321,6 @@ "psalm/phar": "^3.11.4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, "autoload": { "files": [ "lib/functions.php" @@ -349,7 +344,7 @@ } ], "description": "A stream abstraction to make working with non-blocking I/O simple.", - "homepage": "http://amphp.org/byte-stream", + "homepage": "https://amphp.org/byte-stream", "keywords": [ "amp", "amphp", @@ -359,9 +354,8 @@ "stream" ], "support": { - "irc": "irc://irc.freenode.org/amphp", "issues": "https://github.com/amphp/byte-stream/issues", - "source": "https://github.com/amphp/byte-stream/tree/v1.8.1" + "source": "https://github.com/amphp/byte-stream/tree/v1.8.2" }, "funding": [ { @@ -369,7 +363,7 @@ "type": "github" } ], - "time": "2021-03-30T17:13:30+00:00" + "time": "2024-04-13T18:00:56+00:00" }, { "name": "composer/package-versions-deprecated", @@ -2457,16 +2451,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.17", + "version": "10.5.18", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c1f736a473d21957ead7e94fcc029f571895abf5" + "reference": "835df1709ac6c968ba34bf23f3c30e5d5a266de8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c1f736a473d21957ead7e94fcc029f571895abf5", - "reference": "c1f736a473d21957ead7e94fcc029f571895abf5", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/835df1709ac6c968ba34bf23f3c30e5d5a266de8", + "reference": "835df1709ac6c968ba34bf23f3c30e5d5a266de8", "shasum": "" }, "require": { @@ -2538,7 +2532,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.17" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.18" }, "funding": [ { @@ -2554,7 +2548,7 @@ "type": "tidelift" } ], - "time": "2024-04-05T04:39:01+00:00" + "time": "2024-04-14T07:05:31+00:00" }, { "name": "psalm/plugin-phpunit", From cd3c902655b71e72546e3c7dbacdf1cc58baad3a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 22 Apr 2024 00:44:43 +0000 Subject: [PATCH 12/18] Lock file maintenance Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index 9e140af1..71d4217a 100644 --- a/composer.lock +++ b/composer.lock @@ -2451,16 +2451,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.18", + "version": "10.5.19", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "835df1709ac6c968ba34bf23f3c30e5d5a266de8" + "reference": "c726f0de022368f6ed103e452a765d3304a996a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/835df1709ac6c968ba34bf23f3c30e5d5a266de8", - "reference": "835df1709ac6c968ba34bf23f3c30e5d5a266de8", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c726f0de022368f6ed103e452a765d3304a996a4", + "reference": "c726f0de022368f6ed103e452a765d3304a996a4", "shasum": "" }, "require": { @@ -2532,7 +2532,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.18" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.19" }, "funding": [ { @@ -2548,7 +2548,7 @@ "type": "tidelift" } ], - "time": "2024-04-14T07:05:31+00:00" + "time": "2024-04-17T14:06:18+00:00" }, { "name": "psalm/plugin-phpunit", From a04f9e16c687e2fce9b2f107bed13f6292e84597 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 01:32:03 +0000 Subject: [PATCH 13/18] Lock file maintenance Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- composer.lock | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/composer.lock b/composer.lock index 71d4217a..f085f4ea 100644 --- a/composer.lock +++ b/composer.lock @@ -2451,16 +2451,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.19", + "version": "10.5.20", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c726f0de022368f6ed103e452a765d3304a996a4" + "reference": "547d314dc24ec1e177720d45c6263fb226cc2ae3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c726f0de022368f6ed103e452a765d3304a996a4", - "reference": "c726f0de022368f6ed103e452a765d3304a996a4", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/547d314dc24ec1e177720d45c6263fb226cc2ae3", + "reference": "547d314dc24ec1e177720d45c6263fb226cc2ae3", "shasum": "" }, "require": { @@ -2532,7 +2532,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.19" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.20" }, "funding": [ { @@ -2548,7 +2548,7 @@ "type": "tidelift" } ], - "time": "2024-04-17T14:06:18+00:00" + "time": "2024-04-24T06:32:35+00:00" }, { "name": "psalm/plugin-phpunit", @@ -3810,16 +3810,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.9.1", + "version": "3.9.2", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "267a4405fff1d9c847134db3a3c92f1ab7f77909" + "reference": "aac1f6f347a5c5ac6bc98ad395007df00990f480" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/267a4405fff1d9c847134db3a3c92f1ab7f77909", - "reference": "267a4405fff1d9c847134db3a3c92f1ab7f77909", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/aac1f6f347a5c5ac6bc98ad395007df00990f480", + "reference": "aac1f6f347a5c5ac6bc98ad395007df00990f480", "shasum": "" }, "require": { @@ -3886,7 +3886,7 @@ "type": "open_collective" } ], - "time": "2024-03-31T21:03:09+00:00" + "time": "2024-04-23T20:25:34+00:00" }, { "name": "symfony/console", From 94b242f0cd0b9e3e47235d6741fa2148455b4d3c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 00:42:46 +0000 Subject: [PATCH 14/18] Lock file maintenance Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- composer.lock | 158 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 113 insertions(+), 45 deletions(-) diff --git a/composer.lock b/composer.lock index f085f4ea..61def5bd 100644 --- a/composer.lock +++ b/composer.lock @@ -3747,16 +3747,16 @@ }, { "name": "spatie/array-to-xml", - "version": "3.2.3", + "version": "3.3.0", "source": { "type": "git", "url": "https://github.com/spatie/array-to-xml.git", - "reference": "c95fd4db94ec199f798d4b5b4a81757bd20d88ab" + "reference": "f56b220fe2db1ade4c88098d83413ebdfc3bf876" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/c95fd4db94ec199f798d4b5b4a81757bd20d88ab", - "reference": "c95fd4db94ec199f798d4b5b4a81757bd20d88ab", + "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/f56b220fe2db1ade4c88098d83413ebdfc3bf876", + "reference": "f56b220fe2db1ade4c88098d83413ebdfc3bf876", "shasum": "" }, "require": { @@ -3769,6 +3769,11 @@ "spatie/pest-plugin-snapshots": "^1.1" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, "autoload": { "psr-4": { "Spatie\\ArrayToXml\\": "src" @@ -3794,7 +3799,7 @@ "xml" ], "support": { - "source": "https://github.com/spatie/array-to-xml/tree/3.2.3" + "source": "https://github.com/spatie/array-to-xml/tree/3.3.0" }, "funding": [ { @@ -3806,7 +3811,7 @@ "type": "github" } ], - "time": "2024-02-07T10:39:02+00:00" + "time": "2024-05-01T10:20:27+00:00" }, { "name": "squizlabs/php_codesniffer", @@ -3890,16 +3895,16 @@ }, { "name": "symfony/console", - "version": "v6.4.6", + "version": "v6.4.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "a2708a5da5c87d1d0d52937bdeac625df659e11f" + "reference": "a170e64ae10d00ba89e2acbb590dc2e54da8ad8f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a2708a5da5c87d1d0d52937bdeac625df659e11f", - "reference": "a2708a5da5c87d1d0d52937bdeac625df659e11f", + "url": "https://api.github.com/repos/symfony/console/zipball/a170e64ae10d00ba89e2acbb590dc2e54da8ad8f", + "reference": "a170e64ae10d00ba89e2acbb590dc2e54da8ad8f", "shasum": "" }, "require": { @@ -3964,7 +3969,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.6" + "source": "https://github.com/symfony/console/tree/v6.4.7" }, "funding": [ { @@ -3980,20 +3985,20 @@ "type": "tidelift" } ], - "time": "2024-03-29T19:07:53+00:00" + "time": "2024-04-18T09:22:46+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.4.0", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", "shasum": "" }, "require": { @@ -4002,7 +4007,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.4-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -4031,7 +4036,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" }, "funding": [ { @@ -4047,26 +4052,27 @@ "type": "tidelift" } ], - "time": "2023-05-23T14:45:45+00:00" + "time": "2024-04-18T09:32:20+00:00" }, { "name": "symfony/filesystem", - "version": "v6.4.6", + "version": "v6.4.7", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "9919b5509ada52cc7f66f9a35c86a4a29955c9d3" + "reference": "78dde75f8f6dbbca4ec436a4b0087f7af02076d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/9919b5509ada52cc7f66f9a35c86a4a29955c9d3", - "reference": "9919b5509ada52cc7f66f9a35c86a4a29955c9d3", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/78dde75f8f6dbbca4ec436a4b0087f7af02076d4", + "reference": "78dde75f8f6dbbca4ec436a4b0087f7af02076d4", "shasum": "" }, "require": { "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8" + "symfony/polyfill-mbstring": "~1.8", + "symfony/process": "^5.4|^6.4" }, "type": "library", "autoload": { @@ -4094,7 +4100,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.4.6" + "source": "https://github.com/symfony/filesystem/tree/v6.4.7" }, "funding": [ { @@ -4110,7 +4116,7 @@ "type": "tidelift" } ], - "time": "2024-03-21T19:36:20+00:00" + "time": "2024-04-18T09:22:46+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4430,23 +4436,85 @@ ], "time": "2024-01-29T20:11:03+00:00" }, + { + "name": "symfony/process", + "version": "v6.4.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "cdb1c81c145fd5aa9b0038bab694035020943381" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/cdb1c81c145fd5aa9b0038bab694035020943381", + "reference": "cdb1c81c145fd5aa9b0038bab694035020943381", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v6.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-18T09:22:46+00:00" + }, { "name": "symfony/service-contracts", - "version": "v3.4.2", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "11bbf19a0fb7b36345861e85c5768844c552906e" + "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/11bbf19a0fb7b36345861e85c5768844c552906e", - "reference": "11bbf19a0fb7b36345861e85c5768844c552906e", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", + "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", "shasum": "" }, "require": { "php": ">=8.1", - "psr/container": "^1.1|^2.0" + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" }, "conflict": { "ext-psr": "<1.1|>=2" @@ -4454,7 +4522,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.4-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -4494,7 +4562,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.4.2" + "source": "https://github.com/symfony/service-contracts/tree/v3.5.0" }, "funding": [ { @@ -4510,20 +4578,20 @@ "type": "tidelift" } ], - "time": "2023-12-19T21:51:00+00:00" + "time": "2024-04-18T09:32:20+00:00" }, { "name": "symfony/string", - "version": "v6.4.4", + "version": "v6.4.7", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "4e465a95bdc32f49cf4c7f07f751b843bbd6dcd9" + "reference": "ffeb9591c61f65a68d47f77d12b83fa530227a69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/4e465a95bdc32f49cf4c7f07f751b843bbd6dcd9", - "reference": "4e465a95bdc32f49cf4c7f07f751b843bbd6dcd9", + "url": "https://api.github.com/repos/symfony/string/zipball/ffeb9591c61f65a68d47f77d12b83fa530227a69", + "reference": "ffeb9591c61f65a68d47f77d12b83fa530227a69", "shasum": "" }, "require": { @@ -4580,7 +4648,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.4" + "source": "https://github.com/symfony/string/tree/v6.4.7" }, "funding": [ { @@ -4596,7 +4664,7 @@ "type": "tidelift" } ], - "time": "2024-02-01T13:16:41+00:00" + "time": "2024-04-18T09:22:46+00:00" }, { "name": "theseer/tokenizer", @@ -4650,16 +4718,16 @@ }, { "name": "vimeo/psalm", - "version": "5.23.1", + "version": "5.24.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "8471a896ccea3526b26d082f4461eeea467f10a4" + "reference": "462c80e31c34e58cc4f750c656be3927e80e550e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/8471a896ccea3526b26d082f4461eeea467f10a4", - "reference": "8471a896ccea3526b26d082f4461eeea467f10a4", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/462c80e31c34e58cc4f750c656be3927e80e550e", + "reference": "462c80e31c34e58cc4f750c656be3927e80e550e", "shasum": "" }, "require": { @@ -4756,7 +4824,7 @@ "issues": "https://github.com/vimeo/psalm/issues", "source": "https://github.com/vimeo/psalm" }, - "time": "2024-03-11T20:33:46+00:00" + "time": "2024-05-01T19:32:08+00:00" }, { "name": "webimpress/coding-standard", From 91d797faabff4bd8af0b7c9e64b7774b44725d6e Mon Sep 17 00:00:00 2001 From: George Steel Date: Thu, 13 Jun 2024 11:29:03 +0100 Subject: [PATCH 15/18] Bump dev deps, refresh lock Signed-off-by: George Steel --- composer.json | 8 +-- composer.lock | 190 ++++++++++++++++++-------------------------------- 2 files changed, 70 insertions(+), 128 deletions(-) diff --git a/composer.json b/composer.json index fab95e07..967bf686 100644 --- a/composer.json +++ b/composer.json @@ -42,11 +42,11 @@ "laminas/laminas-crypt": "^3.11", "laminas/laminas-i18n": "^2.26.0", "laminas/laminas-uri": "^2.11", - "pear/archive_tar": "^1.4.14", - "phpunit/phpunit": "^10.5.11", + "pear/archive_tar": "^1.5.0", + "phpunit/phpunit": "^10.5.20", "psalm/plugin-phpunit": "^0.19.0", - "psr/http-factory": "^1.0.2", - "vimeo/psalm": "^5.22.2" + "psr/http-factory": "^1.1.0", + "vimeo/psalm": "^5.24.0" }, "conflict": { "laminas/laminas-validator": "<2.10.1", diff --git a/composer.lock b/composer.lock index 61def5bd..e26772f8 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": "010a137b6716ff727044017aab283560", + "content-hash": "33e73e75573c34c3b0b8c4e89bde2875", "packages": [ { "name": "laminas/laminas-servicemanager", @@ -440,16 +440,16 @@ }, { "name": "composer/pcre", - "version": "3.1.3", + "version": "3.1.4", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8" + "reference": "04229f163664973f68f38f6f73d917799168ef24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/5b16e25a5355f1f3afdfc2f954a0a80aec4826a8", - "reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8", + "url": "https://api.github.com/repos/composer/pcre/zipball/04229f163664973f68f38f6f73d917799168ef24", + "reference": "04229f163664973f68f38f6f73d917799168ef24", "shasum": "" }, "require": { @@ -491,7 +491,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.1.3" + "source": "https://github.com/composer/pcre/tree/3.1.4" }, "funding": [ { @@ -507,7 +507,7 @@ "type": "tidelift" } ], - "time": "2024-03-19T10:26:25+00:00" + "time": "2024-05-27T13:40:54+00:00" }, { "name": "composer/semver", @@ -592,16 +592,16 @@ }, { "name": "composer/xdebug-handler", - "version": "3.0.4", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255" + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/4f988f8fdf580d53bdb2d1278fe93d1ed5462255", - "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef", "shasum": "" }, "require": { @@ -638,7 +638,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.4" + "source": "https://github.com/composer/xdebug-handler/tree/3.0.5" }, "funding": [ { @@ -654,7 +654,7 @@ "type": "tidelift" } ], - "time": "2024-03-26T18:29:49+00:00" + "time": "2024-05-06T16:37:16+00:00" }, { "name": "dealerdirect/phpcodesniffer-composer-installer", @@ -1324,16 +1324,16 @@ }, { "name": "laminas/laminas-validator", - "version": "2.53.0", + "version": "2.56.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-validator.git", - "reference": "dbcfc19cb7f2e3eb3a27ba5d059c200e8404d72c" + "reference": "715e1153abb8b57c1f25eb68276133d51a60b1ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/dbcfc19cb7f2e3eb3a27ba5d059c200e8404d72c", - "reference": "dbcfc19cb7f2e3eb3a27ba5d059c200e8404d72c", + "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/715e1153abb8b57c1f25eb68276133d51a60b1ac", + "reference": "715e1153abb8b57c1f25eb68276133d51a60b1ac", "shasum": "" }, "require": { @@ -1347,16 +1347,16 @@ }, "require-dev": { "laminas/laminas-coding-standard": "^2.5", - "laminas/laminas-db": "^2.19", - "laminas/laminas-filter": "^2.34", + "laminas/laminas-db": "^2.20", + "laminas/laminas-filter": "^2.35.2", "laminas/laminas-i18n": "^2.26.0", "laminas/laminas-session": "^2.20", "laminas/laminas-uri": "^2.11.0", - "phpunit/phpunit": "^10.5.15", + "phpunit/phpunit": "^10.5.20", "psalm/plugin-phpunit": "^0.19.0", "psr/http-client": "^1.0.3", - "psr/http-factory": "^1.0.2", - "vimeo/psalm": "^5.23.1" + "psr/http-factory": "^1.1.0", + "vimeo/psalm": "^5.24.0" }, "suggest": { "laminas/laminas-db": "Laminas\\Db component, required by the (No)RecordExists validator", @@ -1404,20 +1404,20 @@ "type": "community_bridge" } ], - "time": "2024-04-01T09:26:32+00:00" + "time": "2024-06-13T09:06:50+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.11.1", + "version": "1.12.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", "shasum": "" }, "require": { @@ -1425,11 +1425,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", @@ -1455,7 +1456,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.0" }, "funding": [ { @@ -1463,7 +1464,7 @@ "type": "tidelift" } ], - "time": "2023-03-08T13:26:56+00:00" + "time": "2024-06-12T14:39:25+00:00" }, { "name": "netresearch/jsonmapper", @@ -2612,20 +2613,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", @@ -2649,7 +2650,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", @@ -2661,9 +2662,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", @@ -3815,16 +3816,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.9.2", + "version": "3.10.1", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "aac1f6f347a5c5ac6bc98ad395007df00990f480" + "reference": "8f90f7a53ce271935282967f53d0894f8f1ff877" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/aac1f6f347a5c5ac6bc98ad395007df00990f480", - "reference": "aac1f6f347a5c5ac6bc98ad395007df00990f480", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/8f90f7a53ce271935282967f53d0894f8f1ff877", + "reference": "8f90f7a53ce271935282967f53d0894f8f1ff877", "shasum": "" }, "require": { @@ -3891,20 +3892,20 @@ "type": "open_collective" } ], - "time": "2024-04-23T20:25:34+00:00" + "time": "2024-05-22T21:24:41+00:00" }, { "name": "symfony/console", - "version": "v6.4.7", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "a170e64ae10d00ba89e2acbb590dc2e54da8ad8f" + "reference": "be5854cee0e8c7b110f00d695d11debdfa1a2a91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a170e64ae10d00ba89e2acbb590dc2e54da8ad8f", - "reference": "a170e64ae10d00ba89e2acbb590dc2e54da8ad8f", + "url": "https://api.github.com/repos/symfony/console/zipball/be5854cee0e8c7b110f00d695d11debdfa1a2a91", + "reference": "be5854cee0e8c7b110f00d695d11debdfa1a2a91", "shasum": "" }, "require": { @@ -3969,7 +3970,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.7" + "source": "https://github.com/symfony/console/tree/v6.4.8" }, "funding": [ { @@ -3985,7 +3986,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:22:46+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/deprecation-contracts", @@ -4056,23 +4057,25 @@ }, { "name": "symfony/filesystem", - "version": "v6.4.7", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "78dde75f8f6dbbca4ec436a4b0087f7af02076d4" + "reference": "4d37529150e7081c51b3c5d5718c55a04a9503f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/78dde75f8f6dbbca4ec436a4b0087f7af02076d4", - "reference": "78dde75f8f6dbbca4ec436a4b0087f7af02076d4", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/4d37529150e7081c51b3c5d5718c55a04a9503f3", + "reference": "4d37529150e7081c51b3c5d5718c55a04a9503f3", "shasum": "" }, "require": { "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8", - "symfony/process": "^5.4|^6.4" + "symfony/polyfill-mbstring": "~1.8" + }, + "require-dev": { + "symfony/process": "^5.4|^6.4|^7.0" }, "type": "library", "autoload": { @@ -4100,7 +4103,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.4.7" + "source": "https://github.com/symfony/filesystem/tree/v6.4.8" }, "funding": [ { @@ -4116,7 +4119,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:22:46+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4436,67 +4439,6 @@ ], "time": "2024-01-29T20:11:03+00:00" }, - { - "name": "symfony/process", - "version": "v6.4.7", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "cdb1c81c145fd5aa9b0038bab694035020943381" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/cdb1c81c145fd5aa9b0038bab694035020943381", - "reference": "cdb1c81c145fd5aa9b0038bab694035020943381", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Executes commands in sub-processes", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/process/tree/v6.4.7" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-04-18T09:22:46+00:00" - }, { "name": "symfony/service-contracts", "version": "v3.5.0", @@ -4582,16 +4524,16 @@ }, { "name": "symfony/string", - "version": "v6.4.7", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "ffeb9591c61f65a68d47f77d12b83fa530227a69" + "reference": "a147c0f826c4a1f3afb763ab8e009e37c877a44d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/ffeb9591c61f65a68d47f77d12b83fa530227a69", - "reference": "ffeb9591c61f65a68d47f77d12b83fa530227a69", + "url": "https://api.github.com/repos/symfony/string/zipball/a147c0f826c4a1f3afb763ab8e009e37c877a44d", + "reference": "a147c0f826c4a1f3afb763ab8e009e37c877a44d", "shasum": "" }, "require": { @@ -4648,7 +4590,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.7" + "source": "https://github.com/symfony/string/tree/v6.4.8" }, "funding": [ { @@ -4664,7 +4606,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:22:46+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "theseer/tokenizer", From bc525843090dc1714938e7dbf3c7fab39471ab46 Mon Sep 17 00:00:00 2001 From: George Steel Date: Thu, 13 Jun 2024 11:29:33 +0100 Subject: [PATCH 16/18] Fix risky truthy/falsy comparison Signed-off-by: George Steel --- src/StripTags.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/StripTags.php b/src/StripTags.php index 7222014b..6acde4a8 100644 --- a/src/StripTags.php +++ b/src/StripTags.php @@ -288,7 +288,7 @@ protected function _filterTag($tag) // phpcs:ignore // Iterate over each matched attribute foreach ($matches[1] as $index => $attributeName) { $attributeName = strtolower($attributeName); - $attributeDelimiter = empty($matches[2][$index]) ? $matches[4][$index] : $matches[2][$index]; + $attributeDelimiter = $matches[2][$index] === '' ? $matches[4][$index] : $matches[2][$index]; $attributeValue = $matches[3][$index] === '' ? $matches[5][$index] : $matches[3][$index]; // If the attribute is not allowed, then remove it entirely From f5e8cf661ffb3de0bfd26e104300ad7819985a3c Mon Sep 17 00:00:00 2001 From: George Steel Date: Thu, 13 Jun 2024 13:25:05 +0100 Subject: [PATCH 17/18] Update test asset to be compatible with `FilterInterface` Signed-off-by: George Steel --- test/TestAsset/StrRepeatFilterInterface.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/TestAsset/StrRepeatFilterInterface.php b/test/TestAsset/StrRepeatFilterInterface.php index 0912fe86..7b53694b 100644 --- a/test/TestAsset/StrRepeatFilterInterface.php +++ b/test/TestAsset/StrRepeatFilterInterface.php @@ -10,8 +10,13 @@ class StrRepeatFilterInterface implements FilterInterface { - public function filter($value) + public function filter(mixed $value): mixed { return str_repeat((string) $value, 2); } + + public function __invoke(mixed $value): mixed + { + return $this->filter($value); + } } From 8860593b8ffca90be89907ad57aa4f394cd23bee Mon Sep 17 00:00:00 2001 From: George Steel Date: Thu, 13 Jun 2024 13:25:17 +0100 Subject: [PATCH 18/18] Refresh lock and baseline post merge-up Signed-off-by: George Steel --- composer.lock | 196 +++++++++++++++++++++++---------------------- psalm-baseline.xml | 8 +- 2 files changed, 107 insertions(+), 97 deletions(-) diff --git a/composer.lock b/composer.lock index 14f056fb..166f7ca6 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": "494a41a79c1b61ce078ae5eb5e230184", + "content-hash": "948e8e0f3c009716155def9307d2353d", "packages": [ { "name": "brick/varexporter", @@ -403,16 +403,16 @@ }, { "name": "amphp/byte-stream", - "version": "v1.8.1", + "version": "v1.8.2", "source": { "type": "git", "url": "https://github.com/amphp/byte-stream.git", - "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd" + "reference": "4f0e968ba3798a423730f567b1b50d3441c16ddc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/acbd8002b3536485c997c4e019206b3f10ca15bd", - "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/4f0e968ba3798a423730f567b1b50d3441c16ddc", + "reference": "4f0e968ba3798a423730f567b1b50d3441c16ddc", "shasum": "" }, "require": { @@ -428,11 +428,6 @@ "psalm/phar": "^3.11.4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, "autoload": { "files": [ "lib/functions.php" @@ -456,7 +451,7 @@ } ], "description": "A stream abstraction to make working with non-blocking I/O simple.", - "homepage": "http://amphp.org/byte-stream", + "homepage": "https://amphp.org/byte-stream", "keywords": [ "amp", "amphp", @@ -466,9 +461,8 @@ "stream" ], "support": { - "irc": "irc://irc.freenode.org/amphp", "issues": "https://github.com/amphp/byte-stream/issues", - "source": "https://github.com/amphp/byte-stream/tree/v1.8.1" + "source": "https://github.com/amphp/byte-stream/tree/v1.8.2" }, "funding": [ { @@ -476,7 +470,7 @@ "type": "github" } ], - "time": "2021-03-30T17:13:30+00:00" + "time": "2024-04-13T18:00:56+00:00" }, { "name": "composer/package-versions-deprecated", @@ -553,16 +547,16 @@ }, { "name": "composer/pcre", - "version": "3.1.3", + "version": "3.1.4", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8" + "reference": "04229f163664973f68f38f6f73d917799168ef24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/5b16e25a5355f1f3afdfc2f954a0a80aec4826a8", - "reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8", + "url": "https://api.github.com/repos/composer/pcre/zipball/04229f163664973f68f38f6f73d917799168ef24", + "reference": "04229f163664973f68f38f6f73d917799168ef24", "shasum": "" }, "require": { @@ -604,7 +598,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.1.3" + "source": "https://github.com/composer/pcre/tree/3.1.4" }, "funding": [ { @@ -620,7 +614,7 @@ "type": "tidelift" } ], - "time": "2024-03-19T10:26:25+00:00" + "time": "2024-05-27T13:40:54+00:00" }, { "name": "composer/semver", @@ -705,16 +699,16 @@ }, { "name": "composer/xdebug-handler", - "version": "3.0.4", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255" + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/4f988f8fdf580d53bdb2d1278fe93d1ed5462255", - "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef", "shasum": "" }, "require": { @@ -751,7 +745,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.4" + "source": "https://github.com/composer/xdebug-handler/tree/3.0.5" }, "funding": [ { @@ -767,7 +761,7 @@ "type": "tidelift" } ], - "time": "2024-03-26T18:29:49+00:00" + "time": "2024-05-06T16:37:16+00:00" }, { "name": "dealerdirect/phpcodesniffer-composer-installer", @@ -1101,16 +1095,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.11.1", + "version": "1.12.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", "shasum": "" }, "require": { @@ -1118,11 +1112,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", @@ -1148,7 +1143,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.0" }, "funding": [ { @@ -1156,7 +1151,7 @@ "type": "tidelift" } ], - "time": "2023-03-08T13:26:56+00:00" + "time": "2024-06-12T14:39:25+00:00" }, { "name": "netresearch/jsonmapper", @@ -2088,16 +2083,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.16", + "version": "10.5.20", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "18f8d4a5f52b61fdd9370aaae3167daa0eeb69cd" + "reference": "547d314dc24ec1e177720d45c6263fb226cc2ae3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/18f8d4a5f52b61fdd9370aaae3167daa0eeb69cd", - "reference": "18f8d4a5f52b61fdd9370aaae3167daa0eeb69cd", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/547d314dc24ec1e177720d45c6263fb226cc2ae3", + "reference": "547d314dc24ec1e177720d45c6263fb226cc2ae3", "shasum": "" }, "require": { @@ -2169,7 +2164,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.16" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.20" }, "funding": [ { @@ -2185,7 +2180,7 @@ "type": "tidelift" } ], - "time": "2024-03-28T10:08:10+00:00" + "time": "2024-04-24T06:32:35+00:00" }, { "name": "psalm/plugin-phpunit", @@ -2249,20 +2244,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", @@ -2286,7 +2281,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", @@ -2298,9 +2293,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", @@ -3384,16 +3379,16 @@ }, { "name": "spatie/array-to-xml", - "version": "3.2.3", + "version": "3.3.0", "source": { "type": "git", "url": "https://github.com/spatie/array-to-xml.git", - "reference": "c95fd4db94ec199f798d4b5b4a81757bd20d88ab" + "reference": "f56b220fe2db1ade4c88098d83413ebdfc3bf876" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/c95fd4db94ec199f798d4b5b4a81757bd20d88ab", - "reference": "c95fd4db94ec199f798d4b5b4a81757bd20d88ab", + "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/f56b220fe2db1ade4c88098d83413ebdfc3bf876", + "reference": "f56b220fe2db1ade4c88098d83413ebdfc3bf876", "shasum": "" }, "require": { @@ -3406,6 +3401,11 @@ "spatie/pest-plugin-snapshots": "^1.1" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, "autoload": { "psr-4": { "Spatie\\ArrayToXml\\": "src" @@ -3431,7 +3431,7 @@ "xml" ], "support": { - "source": "https://github.com/spatie/array-to-xml/tree/3.2.3" + "source": "https://github.com/spatie/array-to-xml/tree/3.3.0" }, "funding": [ { @@ -3443,20 +3443,20 @@ "type": "github" } ], - "time": "2024-02-07T10:39:02+00:00" + "time": "2024-05-01T10:20:27+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.9.1", + "version": "3.10.1", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "267a4405fff1d9c847134db3a3c92f1ab7f77909" + "reference": "8f90f7a53ce271935282967f53d0894f8f1ff877" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/267a4405fff1d9c847134db3a3c92f1ab7f77909", - "reference": "267a4405fff1d9c847134db3a3c92f1ab7f77909", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/8f90f7a53ce271935282967f53d0894f8f1ff877", + "reference": "8f90f7a53ce271935282967f53d0894f8f1ff877", "shasum": "" }, "require": { @@ -3523,20 +3523,20 @@ "type": "open_collective" } ], - "time": "2024-03-31T21:03:09+00:00" + "time": "2024-05-22T21:24:41+00:00" }, { "name": "symfony/console", - "version": "v6.4.6", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "a2708a5da5c87d1d0d52937bdeac625df659e11f" + "reference": "be5854cee0e8c7b110f00d695d11debdfa1a2a91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a2708a5da5c87d1d0d52937bdeac625df659e11f", - "reference": "a2708a5da5c87d1d0d52937bdeac625df659e11f", + "url": "https://api.github.com/repos/symfony/console/zipball/be5854cee0e8c7b110f00d695d11debdfa1a2a91", + "reference": "be5854cee0e8c7b110f00d695d11debdfa1a2a91", "shasum": "" }, "require": { @@ -3601,7 +3601,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.6" + "source": "https://github.com/symfony/console/tree/v6.4.8" }, "funding": [ { @@ -3617,20 +3617,20 @@ "type": "tidelift" } ], - "time": "2024-03-29T19:07:53+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.4.0", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", "shasum": "" }, "require": { @@ -3639,7 +3639,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.4-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -3668,7 +3668,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" }, "funding": [ { @@ -3684,20 +3684,20 @@ "type": "tidelift" } ], - "time": "2023-05-23T14:45:45+00:00" + "time": "2024-04-18T09:32:20+00:00" }, { "name": "symfony/filesystem", - "version": "v6.4.6", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "9919b5509ada52cc7f66f9a35c86a4a29955c9d3" + "reference": "4d37529150e7081c51b3c5d5718c55a04a9503f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/9919b5509ada52cc7f66f9a35c86a4a29955c9d3", - "reference": "9919b5509ada52cc7f66f9a35c86a4a29955c9d3", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/4d37529150e7081c51b3c5d5718c55a04a9503f3", + "reference": "4d37529150e7081c51b3c5d5718c55a04a9503f3", "shasum": "" }, "require": { @@ -3705,6 +3705,9 @@ "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8" }, + "require-dev": { + "symfony/process": "^5.4|^6.4|^7.0" + }, "type": "library", "autoload": { "psr-4": { @@ -3731,7 +3734,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.4.6" + "source": "https://github.com/symfony/filesystem/tree/v6.4.8" }, "funding": [ { @@ -3747,7 +3750,7 @@ "type": "tidelift" } ], - "time": "2024-03-21T19:36:20+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4069,21 +4072,22 @@ }, { "name": "symfony/service-contracts", - "version": "v3.4.2", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "11bbf19a0fb7b36345861e85c5768844c552906e" + "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/11bbf19a0fb7b36345861e85c5768844c552906e", - "reference": "11bbf19a0fb7b36345861e85c5768844c552906e", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", + "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", "shasum": "" }, "require": { "php": ">=8.1", - "psr/container": "^1.1|^2.0" + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" }, "conflict": { "ext-psr": "<1.1|>=2" @@ -4091,7 +4095,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.4-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -4131,7 +4135,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.4.2" + "source": "https://github.com/symfony/service-contracts/tree/v3.5.0" }, "funding": [ { @@ -4147,20 +4151,20 @@ "type": "tidelift" } ], - "time": "2023-12-19T21:51:00+00:00" + "time": "2024-04-18T09:32:20+00:00" }, { "name": "symfony/string", - "version": "v6.4.4", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "4e465a95bdc32f49cf4c7f07f751b843bbd6dcd9" + "reference": "a147c0f826c4a1f3afb763ab8e009e37c877a44d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/4e465a95bdc32f49cf4c7f07f751b843bbd6dcd9", - "reference": "4e465a95bdc32f49cf4c7f07f751b843bbd6dcd9", + "url": "https://api.github.com/repos/symfony/string/zipball/a147c0f826c4a1f3afb763ab8e009e37c877a44d", + "reference": "a147c0f826c4a1f3afb763ab8e009e37c877a44d", "shasum": "" }, "require": { @@ -4217,7 +4221,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.4" + "source": "https://github.com/symfony/string/tree/v6.4.8" }, "funding": [ { @@ -4233,7 +4237,7 @@ "type": "tidelift" } ], - "time": "2024-02-01T13:16:41+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "theseer/tokenizer", @@ -4287,16 +4291,16 @@ }, { "name": "vimeo/psalm", - "version": "5.23.1", + "version": "5.24.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "8471a896ccea3526b26d082f4461eeea467f10a4" + "reference": "462c80e31c34e58cc4f750c656be3927e80e550e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/8471a896ccea3526b26d082f4461eeea467f10a4", - "reference": "8471a896ccea3526b26d082f4461eeea467f10a4", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/462c80e31c34e58cc4f750c656be3927e80e550e", + "reference": "462c80e31c34e58cc4f750c656be3927e80e550e", "shasum": "" }, "require": { @@ -4393,7 +4397,7 @@ "issues": "https://github.com/vimeo/psalm/issues", "source": "https://github.com/vimeo/psalm" }, - "time": "2024-03-11T20:33:46+00:00" + "time": "2024-05-01T19:32:08+00:00" }, { "name": "webimpress/coding-standard", diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 5e0205e4..f767b4e4 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + @@ -1027,6 +1027,12 @@ + + + + + +