Compare commits

..

3 Commits

Author SHA1 Message Date
Matthieu
b51671b1d4 chore(release) : v1.1.0
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 15:58:09 +01:00
Matthieu
1643dcf8c2 fix : case-insensitive search filters for all entities 2026-01-25 15:54:07 +01:00
Matthieu
17ab4cdd16 chore : update fixtures with current database data 2026-01-25 15:44:22 +01:00
8 changed files with 941 additions and 891 deletions

View File

@@ -1 +1 @@
1.0.0 1.1.0

View File

@@ -1,6 +1,6 @@
api_platform: api_platform:
title: Hello API Platform title: Hello API Platform
version: 1.0.0 version: 1.1.0
defaults: defaults:
stateless: false stateless: false
cache_headers: cache_headers:

File diff suppressed because one or more lines are too long

View File

@@ -19,7 +19,7 @@ use Symfony\Component\Serializer\Attribute\Groups;
#[ORM\Entity(repositoryClass: ComposantRepository::class)] #[ORM\Entity(repositoryClass: ComposantRepository::class)]
#[ORM\Table(name: 'composants')] #[ORM\Table(name: 'composants')]
#[ORM\HasLifecycleCallbacks] #[ORM\HasLifecycleCallbacks]
#[ApiFilter(SearchFilter::class, properties: ['name' => 'partial', 'reference' => 'partial', 'typeComposant' => 'exact'])] #[ApiFilter(SearchFilter::class, properties: ['name' => 'ipartial', 'reference' => 'ipartial', 'typeComposant' => 'exact'])]
#[ApiFilter(OrderFilter::class, properties: ['name', 'createdAt'])] #[ApiFilter(OrderFilter::class, properties: ['name', 'createdAt'])]
#[ApiResource( #[ApiResource(
normalizationContext: ['groups' => ['composant:read']], normalizationContext: ['groups' => ['composant:read']],

View File

@@ -20,7 +20,7 @@ use Symfony\Component\Serializer\Annotation\Groups;
#[ORM\Table(name: 'model_types')] #[ORM\Table(name: 'model_types')]
#[ORM\UniqueConstraint(name: 'unique_category_name', columns: ['category', 'name'])] #[ORM\UniqueConstraint(name: 'unique_category_name', columns: ['category', 'name'])]
#[ORM\HasLifecycleCallbacks] #[ORM\HasLifecycleCallbacks]
#[ApiFilter(SearchFilter::class, properties: ['category' => 'exact'])] #[ApiFilter(SearchFilter::class, properties: ['category' => 'exact', 'name' => 'ipartial'])]
#[ApiResource( #[ApiResource(
paginationClientItemsPerPage: true, paginationClientItemsPerPage: true,
paginationMaximumItemsPerPage: 500 paginationMaximumItemsPerPage: 500

View File

@@ -19,7 +19,7 @@ use Symfony\Component\Serializer\Attribute\Groups;
#[ORM\Entity(repositoryClass: PieceRepository::class)] #[ORM\Entity(repositoryClass: PieceRepository::class)]
#[ORM\Table(name: 'pieces')] #[ORM\Table(name: 'pieces')]
#[ORM\HasLifecycleCallbacks] #[ORM\HasLifecycleCallbacks]
#[ApiFilter(SearchFilter::class, properties: ['name' => 'partial', 'reference' => 'partial', 'typePiece' => 'exact'])] #[ApiFilter(SearchFilter::class, properties: ['name' => 'ipartial', 'reference' => 'ipartial', 'typePiece' => 'exact'])]
#[ApiFilter(OrderFilter::class, properties: ['name', 'createdAt'])] #[ApiFilter(OrderFilter::class, properties: ['name', 'createdAt'])]
#[ApiResource( #[ApiResource(
normalizationContext: ['groups' => ['piece:read']], normalizationContext: ['groups' => ['piece:read']],
@@ -195,7 +195,7 @@ class Piece
$this->product = $product; $this->product = $product;
if ($product && empty($this->productIds)) { if ($product && empty($this->productIds)) {
$productId = $product->getId(); $productId = $product->getId();
$this->productIds = $productId ? [$productId] : null; $this->productIds = $productId ? [$productId] : null;
} }
@@ -221,7 +221,7 @@ class Piece
static fn ($value) => is_string($value) ? trim($value) : '', static fn ($value) => is_string($value) ? trim($value) : '',
$this->productIds, $this->productIds,
), ),
static fn (string $value) => $value !== '', static fn (string $value) => '' !== $value,
), ),
); );
} }
@@ -241,12 +241,12 @@ class Piece
static fn ($value) => is_string($value) ? trim($value) : '', static fn ($value) => is_string($value) ? trim($value) : '',
$productIds, $productIds,
), ),
static fn (string $value) => $value !== '', static fn (string $value) => '' !== $value,
), ),
), ),
); );
$this->productIds = $normalized === [] ? null : $normalized; $this->productIds = [] === $normalized ? null : $normalized;
return $this; return $this;
} }

View File

@@ -19,7 +19,7 @@ use Symfony\Component\Serializer\Attribute\Groups;
#[ORM\Entity(repositoryClass: ProductRepository::class)] #[ORM\Entity(repositoryClass: ProductRepository::class)]
#[ORM\Table(name: 'products')] #[ORM\Table(name: 'products')]
#[ORM\HasLifecycleCallbacks] #[ORM\HasLifecycleCallbacks]
#[ApiFilter(SearchFilter::class, properties: ['name' => 'partial', 'reference' => 'partial', 'typeProduct' => 'exact'])] #[ApiFilter(SearchFilter::class, properties: ['name' => 'ipartial', 'reference' => 'ipartial', 'typeProduct' => 'exact'])]
#[ApiFilter(OrderFilter::class, properties: ['name', 'createdAt'])] #[ApiFilter(OrderFilter::class, properties: ['name', 'createdAt'])]
#[ApiResource( #[ApiResource(
normalizationContext: ['groups' => ['product:read']], normalizationContext: ['groups' => ['product:read']],