api-platform / api-platform/core

`ApiFilter` does not respect `SerializerName`

オープン
#5,980 コメント 3 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
PHP
スター
2.6k
フォーク
980
平均マージ
2日 4時間
マージ済み PR(30日)
49

説明

**API Platform version(s) affected**: v3.1.18

**Description**
The following will not work:

```php
#[ApiResource(
operations: [
new GetCollection(),
],
)]

#[ApiFilter(DateFilter::class, properties: [
'date',
])]
class Foo
{
#[SerializedName('date')]
public \DateTimeInterface $reallyBadlyNamedDateForLegacyReasons;
}
```

beacuse the filters do not consider the `SerializerName` of the attribute we want to filter on

**How to reproduce**

**Possible Solution**
1. Some code here which takes into account the `SerializedName` here?
https://github.com/api-platform/core/blob/main/src/Doctrine/Orm/Filter/AbstractFilter.php#L89

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

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

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