api-platform / api-platform/core
`ApiFilter` does not respect `SerializerName`
- Ngôn ngữ chính
- PHP
- Star
- 2.6k
- Fork
- 980
- Merge trung bình
- 2 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 49
Mô tả
**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
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.