Recommended namespace in generator LogicException should not be prepended with '\\'

Open Beginner friendly
#1,615 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
php
Domain
tooling

Research direction

Start in src/Generator.php around line 100, where the LogicException recommends a namespace. Check how the namespace is formatted in that message and how the recommendation is consumed. Done means the recommendation starts directly with a namespace such as App rather than a leading backslash, with the existing generator behavior still intact.

Written by the indexing model from the issue text.

Description

The following exception recommends using the full namespace starting with \\:
https://github.com/symfony/maker-bundle/blob/ce60831a9d6c41c032117ddf59f303f56d004c87/src/Generator.php#L100

Doing this does not work though, the namespace has to start directly with (for example) App.

Dominant language
PHP
Stars
3.4k
Forks
427
Avg merge
2d 22h
Merged PRs (30d)
20

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.

More from symfony/maker-bundle

All issues in symfony/maker-bundle

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.