Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Symfony 8.2: object mapper feature probe loads deprecated translation command

已关闭 适合新手
#8,626 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@tacman 已经在做这个了。

开始于 2026年10月1日。

  • #8627 来自 @tacman —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
php, symfony
领域
api, backend

调研方向

从 ApiPlatformExtension 开始,通过在 Symfony 8.2-dev 中安装 symfony/object-mapper、清理缓存并运行 debug:container --deprecations 来重现警告。检查在新命令可用时加载该扩展的回归测试。完成标准是优先使用新的命令命名空间,保留旧类作为 fallback,并且不发出 legacy deprecation。

由索引模型根据 Issue 内容生成。

描述

With API Platform 5.0.1 and Symfony 8.2-dev, compiling the application emits a deprecation for Symfony\Bundle\FrameworkBundle\Command\TranslationExtractCommand.

ApiPlatformExtension uses class_exists(TranslationExtractCommand::class) as part of its object-mapper availability gate. Symfony 8.2 moved this command into Symfony\Component\Translation\Command; probing the FrameworkBundle compatibility class autoloads its deprecation even though the command is not used.

Reproduce by installing symfony/object-mapper alongside Symfony 8.2-dev and API Platform, clearing the application cache, and running debug:container --deprecations.

A regression test loading the extension with the new command available confirms that the legacy command is loaded before the fix. Checking the new namespace first, with the existing class as a fallback for older Symfony versions, avoids the warning while retaining object-mapper configuration.

主要语言
PHP
星标
2.6k
派生
989
平均合并
2 天 1 小时
30 天内合并 PR
104

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

api-platform/core 的其他 Issue

查看 api-platform/core 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。