Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jun 30, 2025

Updates the requirements on cuyz/valinor to permit the latest version.

Release notes

Sourced from cuyz/valinor's releases.

2.0.0

First release of the v2 series! 🎉

This release introduces some new features but also backward compatibility breaks that are detailed in the upgrading chapter: it is strongly recommended to read it carefully before upgrading.

Notable new features

Mapper converters introduction

A mapper converter allows users to hook into the mapping process and apply custom logic to the input, by defining a callable signature that properly describes when it should be called:

  • A first argument with a type matching the expected input being mapped
  • A return type representing the targeted mapped type

These two types are enough for the library to know when to call the converter and can contain advanced type annotations for more specific use cases.

Below is a basic example of a converter that converts string inputs to uppercase:

(new \CuyZ\Valinor\MapperBuilder())
    ->registerConverter(
        fn (string $value): string => strtoupper($value)
    )
    ->mapper()
    ->map('string', 'hello world'); // 'HELLO WORLD'

Converters can be chained, allowing multiple transformations to be applied to a value. A second callable parameter can be declared, allowing the current converter to call the next one in the chain.

A priority can be given to a converter to control the order in which converters are applied. The higher the priority, the earlier the converter will be executed. The default priority is 0.

(new \CuyZ\Valinor\MapperBuilder())
    ->registerConverter(
        function(string $value, callable $next): string {
            return $next(strtoupper($value));
        }
    )
    ->registerConverter(
        function(string $value, callable $next): string {
            return $next($value . '!');
        },
        priority: -10,
    )
    ->registerConverter(
        function(string $value, callable $next): string {
            return $next($value . '?');
        },
</tr></table> 

... (truncated)

Commits
  • 914a8cb release: version 2.0.0
  • 6e27aff fix: update file system cache entries permissions
  • 98a32df misc!: add purity markers in MapperBuilder and NormalizerBuilder
  • 24bf785 misc!: rename MapperBuilder::warmup() method to warmupCacheFor()
  • b2083fe doc: improve documentation of MapperBuilder::registerConstructor()
  • 855494a test: remove useless test
  • 1d1852c misc: remove unused property
  • 60a39f6 feat: allow MapperBuilder and NormalizerBuilder to clear cache
  • 8a8bbc3 feat!: add type and source accessors to MappingError
  • 4251236 misc!: remove MapperBuilder::enableFlexibleCasting()
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [cuyz/valinor](https://github.com/CuyZ/Valinor) to permit the latest version.
- [Release notes](https://github.com/CuyZ/Valinor/releases)
- [Changelog](https://github.com/CuyZ/Valinor/blob/master/.changelog)
- [Commits](CuyZ/Valinor@1.12.0...2.0.0)

---
updated-dependencies:
- dependency-name: cuyz/valinor
  dependency-version: 2.0.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Jul 28, 2025

Superseded by #21.

@dependabot dependabot bot closed this Jul 28, 2025
@dependabot dependabot bot deleted the dependabot/composer/cuyz/valinor-tw-2.0 branch July 28, 2025 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant