yiisoft / yiisoft/factory

More comfortable way to create an object using a factory

Open
#203 10 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.