phpgt / phpgt/WebEngine

Error feedback: tell the developer they've forgotten to import a class

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

Nobody has claimed this yet.

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

Description

It's really easy to do, but also really easy to detect:

Gt\ServiceContainer\ServiceNotFoundException - Service can not be located within Container: "Gt\AppLogic\page\_common_php\ContentRepository

This exception mentions _common_php, which is the magic PHP logic file that shouldn't exist in its own namespace, so it's obvious that in this case the developer has put ContentRepository in the go() function parameter, but has forgotten to use App\ContentReposiory at the top of the file.

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 tracing how the service container handles the go() function parameter and formats ServiceNotFoundException for the shown _common_php and ContentRepository case. Reproduce the missing-use scenario and make the resulting feedback identify that the class import is missing, with the existing exception behavior still covered.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.