Skip to content

[TASK] Update cuyz/valinor to v1.17.0 #485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 14, 2025

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 20, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
cuyz/valinor 1.16.1 -> 1.17.0 age adoption passing confidence

Release Notes

CuyZ/Valinor (cuyz/valinor)

v1.17.0

Compare Source

Notable changes

Flexible casting setting split

The mapper setting enableFlexibleCasting is (softly) deprecated in favor of three distinct modes, which guarantee the same functionalities as before.

Allowing scalar value casting:

With this setting enabled, scalar types will accept castable values:

  • Integer types will accept any valid numeric value, for instance the string value "42".

  • Float types will accept any valid numeric value, for instance the string value "1337.42".

  • String types will accept any integer, float or object implementing the Stringable interface.

  • Boolean types will accept any truthy or falsy value:

    • (string) "true", (string) "1" and (int) 1 will be cast to true
    • (string) "false", (string) "0" and (int) 0 will be cast to false
(new \CuyZ\Valinor\MapperBuilder())
    ->allowScalarValueCasting()
    ->mapper()
    ->map('array{id: string, price: float, active: bool}', [
        'id' => 549465210, // Will be cast to string
        'price' => '42.39', // Will be cast to float
        'active' => 1, // Will be cast to bool
    ]);

Allowing non-sequential lists:

By default, list types will only accept sequential keys starting from 0.

This setting allows the mapper to convert associative arrays to a list with sequential keys.

(new \CuyZ\Valinor\MapperBuilder())
    ->allowNonSequentialList()
    ->mapper()
    ->map('list<int>', [
        'foo' => 42,
        'bar' => 1337,
    ]);

// => [0 => 42, 1 => 1337]

Allowing undefined values:

Allows the mapper to accept undefined values (missing from the input), by converting them to null (if the current type is nullable) or an empty array (if the current type is an object or an iterable).

(new \CuyZ\Valinor\MapperBuilder())
    ->allowUndefinedValues()
    ->mapper()
    ->map('array{name: string, age: int|null}', [
        'name' => 'John Doe',
        // 'age' is not defined
    ]);

// => ['name' => 'John Doe', 'age' => null]
Features
  • Split flexible casting setting in three distinct modes (02ef8e)
Other
  • Simplify ValueNode implementation (7e6ccf)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the dependencies Updates project dependencies label Jun 20, 2025
@renovate renovate bot requested a review from eliashaeussler as a code owner June 20, 2025 15:01
@renovate renovate bot enabled auto-merge (squash) June 20, 2025 15:01
Copy link
Contributor Author

renovate bot commented Jun 20, 2025

Branch automerge failure

This PR was configured for branch automerge. However, this is not possible, so it has been raised as a PR instead.


  • Branch has one or more failed status checks

Copy link

Code Climate has analyzed commit 7c2d03b and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 90.0% (0.0% change).

View more on Code Climate.

@renovate renovate bot force-pushed the renovate/cuyz-valinor-1.x-lockfile branch from 7c2d03b to 6945456 Compare July 14, 2025 17:43
@coveralls
Copy link
Collaborator

coveralls commented Jul 14, 2025

Pull Request Test Coverage Report for Build 16274251674

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 90.076%

Totals Coverage Status
Change from base Build 16274227435: 0.0%
Covered Lines: 1788
Relevant Lines: 1985

💛 - Coveralls

@renovate renovate bot force-pushed the renovate/cuyz-valinor-1.x-lockfile branch 2 times, most recently from c3b71ea to 4c4173c Compare July 14, 2025 17:59
| datasource | package      | from   | to     |
| ---------- | ------------ | ------ | ------ |
| packagist  | cuyz/valinor | 1.16.1 | 1.17.0 |
@renovate renovate bot force-pushed the renovate/cuyz-valinor-1.x-lockfile branch from 4c4173c to 0769e37 Compare July 14, 2025 18:01
@renovate renovate bot merged commit db7c615 into main Jul 14, 2025
14 checks passed
@renovate renovate bot deleted the renovate/cuyz-valinor-1.x-lockfile branch July 14, 2025 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Updates project dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants