mark-gerarts / mark-gerarts/automapper-plus
Passing a scalar to `map` should throw an InvalidArgumentException
Open
enhancement
good first issue
- Dominant language
- PHP
- Stars
- 562
- Forks
- 32
- PR merge metrics
- No merged PRs in 30d
Description
When for example an array is passed to `map`, `get_class` will trigger an error. It would be better to check the type and throw an `InvalidArgumentException` if needed. In the future, we could add mappings from scalars (such as arrays, #18)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the map implementation where get_class is called and inspect how invalid input is currently handled. Verify that passing a scalar produces InvalidArgumentException while existing valid mapping behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100