phpgt / phpgt/ServiceContainer

`Container::getNullable(string $id)` for getting a nullable service

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

Nobody has claimed this yet.

good first issue help wanted
Dominant language
PHP
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Some niche web projects I've been working on would be enhanced if I didn't have to wrap my get() function in a try/catch block.

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 inspecting the existing Container::get(string $id) entry point and its related tests, if present. Define the expected behavior for a nullable lookup, including what it returns when the service is absent, and consider how that fits the container's current exception behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.