Skip to content
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

feat(option): add Option::zip(), Option::zipWith() and Option::unzip() methods #434

Merged
merged 5 commits into from
Dec 26, 2023

Conversation

devnix
Copy link
Contributor

@devnix devnix commented Dec 12, 2023

Typing unzip generics has been a huge PITA. I've been able to make them work in Psalm, but not for PHPStan: phpstan/phpstan#10285

Eager to get feedback 😄

@coveralls
Copy link

coveralls commented Dec 12, 2023

Pull Request Test Coverage Report for Build 7321411656

  • 16 of 16 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.004%) to 99.011%

Totals Coverage Status
Change from base Build 7219528212: 0.004%
Covered Lines: 4205
Relevant Lines: 4247

💛 - Coveralls

src/Psl/Option/Option.php Outdated Show resolved Hide resolved
tests/fixture/Point.php Outdated Show resolved Hide resolved
tests/unit/Option/NoneTest.php Show resolved Hide resolved
tests/unit/Option/SomeTest.php Show resolved Hide resolved
src/Psl/Option/Option.php Outdated Show resolved Hide resolved
src/Psl/Option/Option.php Outdated Show resolved Hide resolved
src/Psl/Option/Option.php Outdated Show resolved Hide resolved
@devnix
Copy link
Contributor Author

devnix commented Dec 17, 2023

Sorry for having to review it so many times, I hope it's ready now! 😄

@devnix devnix requested a review from veewee December 17, 2023 16:11
src/Psl/Option/Option.php Outdated Show resolved Hide resolved
Copy link
Collaborator

@veewee veewee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for having to review it so many times, I hope it's ready now! 😄

No worries :) I rather review 100 times and make sure to ship something good than to rush in changes.

I think we're almost there. Added 2 remarks and then it should be good to go I guess.

src/Psl/Option/Option.php Outdated Show resolved Hide resolved
src/Psl/Option/Option.php Outdated Show resolved Hide resolved
src/Psl/Option/Option.php Outdated Show resolved Hide resolved
@devnix devnix requested a review from veewee December 25, 2023 11:27
@devnix
Copy link
Contributor Author

devnix commented Dec 25, 2023

This should do it, happy holidays! 😄

@veewee veewee added Priority: Medium This issue may be useful, and needs some attention. Status: Accepted It's clear what the subject of the issue is about, and what the resolution should be. Type: Enhancement Most issues will probably ask for additions or changes. labels Dec 26, 2023
@veewee veewee merged commit 6f19d45 into azjezz:next Dec 26, 2023
14 checks passed
@veewee
Copy link
Collaborator

veewee commented Dec 26, 2023

Thanks

@devnix devnix deleted the option-zip branch December 26, 2023 17:21
renovate bot referenced this pull request in ben-challis/sql-migrations Dec 29, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [azjezz/psl](https://togithub.com/azjezz/psl) | `2.8.0` -> `2.9.0` |
[![age](https://developer.mend.io/api/mc/badges/age/packagist/azjezz%2fpsl/2.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/packagist/azjezz%2fpsl/2.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/packagist/azjezz%2fpsl/2.8.0/2.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/packagist/azjezz%2fpsl/2.8.0/2.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>azjezz/psl (azjezz/psl)</summary>

### [`v2.9.0`](https://togithub.com/azjezz/psl/releases/tag/2.9.0):
Lenalee - 2.9.0

[Compare Source](https://togithub.com/azjezz/psl/compare/2.8.0...2.9.0)

#### What's Changed

- Apply fixes for Psalm 5.17 by
[@&#8203;veewee](https://togithub.com/veewee) in
[https://github.com/azjezz/psl/pull/431](https://togithub.com/azjezz/psl/pull/431)
- feat(type): add class_string types
([#&#8203;432](https://togithub.com/azjezz/psl/issues/432)) by
[@&#8203;zerkms](https://togithub.com/zerkms) in
[https://github.com/azjezz/psl/pull/435](https://togithub.com/azjezz/psl/pull/435)
- feat(option): add `Option::zip()`, `Option::zipWith()` and
`Option::unzip()` methods by
[@&#8203;devnix](https://togithub.com/devnix) in
[https://github.com/azjezz/psl/pull/434](https://togithub.com/azjezz/psl/pull/434)
- feat(option): add `Option::proceed()` method by
[@&#8203;devnix](https://togithub.com/devnix) in
[https://github.com/azjezz/psl/pull/433](https://togithub.com/azjezz/psl/pull/433)
- feat(option): new `Option::apply()` method by
[@&#8203;devnix](https://togithub.com/devnix) in
[https://github.com/azjezz/psl/pull/426](https://togithub.com/azjezz/psl/pull/426)

#### New Contributors

- [@&#8203;zerkms](https://togithub.com/zerkms) made their first
contribution in
[https://github.com/azjezz/psl/pull/435](https://togithub.com/azjezz/psl/pull/435)

**Full Changelog**: azjezz/psl@2.8.0...2.9.0

</details>

---

### Configuration

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

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

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

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/ben-challis/sql-migrations).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEwMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium This issue may be useful, and needs some attention. Status: Accepted It's clear what the subject of the issue is about, and what the resolution should be. Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants