swagger-api / swagger-api/swagger-codegen

[php-symfony] templates Controller::$container does not exists

Open
#8,896 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

$this->container property is missing in the Controller class.

https://github.com/swagger-api/swagger-codegen/blob/4607a90d7b69463a0ae8fc94fac68fc95d80965e/modules/swagger-codegen/src/main/resources/php-symfony/Controller.mustache#L139

I've got some idea to fix it, should I create a PR?

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 with modules/swagger-codegen/src/main/resources/php-symfony/Controller.mustache at line 139 and inspect the generated Symfony Controller class to confirm how the missing $container property is referenced. Done means the template no longer produces a Controller that references an unavailable property.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, symfony
Domain
api, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.