DateInterval as a textfield creates issues and can't be edited.

オープン
#7,374 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@Amoifr がすでに取り組んでいます。

2026年5月5日 から。

  • #7596 @Amoifr による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
php, symfony
領域
backend

調査の方向性

まず、770行目付近にある doc/fields.rst の DateInterval と TextField のガイダンスを確認し、その後、issue に記載されている CRUD フォームを再現します。DateInterval の値とテキストフィールド間の変換を追跡します。フィールドを string-conversion error なしで表示および編集できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

status: waiting feedback

Describe the bug
The doc shows that the Doctrine DateInterval should be a TextField in easy admin, but doing so breaks the page. There is a translation layer that is missing to go from a string to a DateInterval.

The exact error is:

The value of the "duration" field of the entity with ID = "1" can't be converted into a string, so it cannot be represented by a TextField or a TextareaField.

I just started using EasyAdmin, so I don't know if there is an easy solution. I tried to use formatValue, to no avail.

To Reproduce

  1. Create an entity which contains a DateInterval type variable
  2. Create a CRUD controller a configure the field to be a TextField.
主要言語
PHP
スター
4.3k
フォーク
1.1k
平均マージ
2日 9時間
マージ済み PR(30日)
52

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

EasyCorp/EasyAdminBundle のほかの issue

EasyCorp/EasyAdminBundle の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。