More comfortable way to create an object using a factory
Open
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36
- Forks
- 14
- Avg merge
- 59m
- Merged PRs (30d)
- 1
Description
$factory->create(EngineInterface::class, 146);
instead of
$factory->create([
'class' => EngineInterface::class,
'__construct()' => [
'power' => 146,
],
]);
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the factory's create entry point and inspect the existing tests for class definitions and constructor arguments. Compare the requested shorthand with the current array form; done means the shorthand creates the same object while preserving constructor argument handling and existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100