yiisoft / yiisoft/config

Add support prevent run methods via null

Open
#113 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:enhancement
Dominant language
PHP
Stars
34
Forks
9
Avg merge
1h 7m
Merged PRs (30d)
1

Description

For example:

SwaggerJson::class => [
        'withAnnotationPaths()' => $params['yiisoft/yii-swagger']['annotation-paths'] 
                ? [...$params['yiisoft/yii-swagger']['annotation-paths']] 
                : null,
],

This will prevent call of unnecessary methods and slightly improve performance.

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 by reading the configuration handling code that invokes methods from the provided mapping. Trace how a null value is currently processed and identify the existing tests for method execution. Done means null entries skip unnecessary method calls while non-null entries retain their current behavior, with tests covering both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.