loadFixtures() doesn't work with Symfony's dependency injection
评估
调研方向
从 Doctrine2.php 约第 731 行的 loadFixtures() 开始,该 issue 报告 AppFixtures 在没有参数的情况下被构造。使用一个具有四个构造函数参数的 Symfony fixture service 重现该失败。当 loadFixtures(AppFixtures::class) 能够加载 fixture 且不出现 ArgumentCountError,并且对通过构造函数注入的 fixture 有覆盖时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
When the fixture class is a Symfony service with normal dependency injection (i.e. constructor arguments), loading them with $I->loadFixtures(AppFixtures::class) leads to this error message:
[ArgumentCountError] Too few arguments to function App\DataFixtures\AppFixtures::__construct(), 0 passed in /.../vendor/codeception/module-doctrine2/src/Codeception/Module/Doctrine2.php on line 731 and exactly 4 expected
- 主要语言
- PHP
- 星标
- 4
- 派生
- 2
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Codeception/module-doctrine 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 38/100
-
难度 4/5 3-5 天 新手友好度 30/100
-
难度 4/5 3-5 天 新手友好度 35/100
Codeception/module-doctrine#2 · 1 条评论 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 42/100
-
难度 3/5 1-2 天 新手友好度 64/100
Codeception/module-doctrine#6 · 1 条评论 ·
查看 Codeception/module-doctrine 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 85/100
-
L: java:gradle L: java:maven L: ruby:bundler T: bug 🐞
难度 2/5 1-3 小时 新手友好度 76/100
dependabot/dependabot-core#16547 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
glpi-project/glpi#25922 ·
维护者通常 1 天内回复
-
Bug
难度 2/5 1-3 小时 新手友好度 70/100
Automattic/safe-publish#726 ·
维护者通常 1 天内回复
-
[Translation][TwigBridge][TwigBundle] Add `HtmlTranslator` and the `tra…可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭Translation TwigBridge
难度 2/5 1-3 小时 新手友好度 68/100
symfony/symfony-docs#23308 ·
维护者通常 3 天内回复