phpgt / phpgt/ServiceContainer

DX: Provide application context when there's an exception

Open
#145 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PHP
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

The most common example of this issue is when the ServiceNotFoundException is thrown. The stack trace will show where the invoker was called (typically the framework), rather than where in the application code requested the service.

It would be really useful to either change the stack trace in the exception, or provide some kind of context to the exception's message of what file/function/line originally triggered the invoker.

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 locating ServiceNotFoundException and tracing the invoker path described in the issue, from the framework call back to the application request. The issue does not name files or tests; done means choosing and documenting a reliable way for the exception to identify the originating application file, function, or line.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.