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

Allow to use objects as map keys #105

Merged
merged 3 commits into from
May 30, 2024
Merged

Allow to use objects as map keys #105

merged 3 commits into from
May 30, 2024

Conversation

akondas
Copy link
Member

@akondas akondas commented May 29, 2024

Change Map to real Map and allow use objects as map keys.

BC breaking change

self::assertTrue(Map::fromArray(['a' => 'b', 'c' => 'd', 'e' => 'f'])->tail()->equals(Tuple::of('e', 'f')));
self::assertTrue(Map::fromArray(['e' => 'f', 'a' => 'b'])->tail()->equals(Tuple::of('a', 'b')));
self::assertTrue(Map::fromArray(['a' => 'b', 'c' => 'd', 'e' => 'f'])->tail()->equals(Map::fromArray(['c' => 'd', 'e' => 'f'])));
self::assertTrue(Map::fromArray(['e' => 'f', 'a' => 'b'])->tail()->equals(Map::fromArray(['a' => 'b'])));
Copy link
Member Author

Choose a reason for hiding this comment

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

correct, tail was implemented incorrectly

@akondas
Copy link
Member Author

akondas commented May 30, 2024

YOLO

@akondas akondas merged commit e9173fa into munusphp:master May 30, 2024
4 checks passed
@akondas akondas deleted the real-map branch May 30, 2024 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant