From 22279d10733f48b5c346cf0b26b09f421e8f12cb Mon Sep 17 00:00:00 2001 From: Neophytis <37024002+Neophytis@users.noreply.github.com> Date: Sat, 8 Aug 2026 22:39:19 +0200 Subject: [PATCH] fix(api-platform): remove leftover bundle registration and annotations The previous removal of api-platform/core (composer.json + core classes) missed three files that still referenced the bundle: - config/bundles.php: ApiPlatformBundle registration (crashes kernel on boot) - config/routes/api_platform.yaml: route type api_platform (no-op without bundle) - src/Entity/Member.php: @ApiResource, @ApiProperty, @ApiFilter annotations These leftovers cause a PHP fatal on every container start, making the beta deploy fail immediately with exit 255. --- config/bundles.php | 1 - config/routes/api_platform.yaml | 4 ---- src/Entity/Member.php | 28 ---------------------------- 3 files changed, 33 deletions(-) delete mode 100644 config/routes/api_platform.yaml diff --git a/config/bundles.php b/config/bundles.php index cd79bd0590..18560aa868 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -19,7 +19,6 @@ Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true], Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true], - ApiPlatform\Core\Bridge\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true], Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle::class => ['all' => true], FriendsOfBehat\SymfonyExtension\Bundle\FriendsOfBehatSymfonyExtensionBundle::class => ['test' => true], DAMA\DoctrineTestBundle\DAMADoctrineTestBundle::class => ['test' => true], diff --git a/config/routes/api_platform.yaml b/config/routes/api_platform.yaml deleted file mode 100644 index 38f11cba85..0000000000 --- a/config/routes/api_platform.yaml +++ /dev/null @@ -1,4 +0,0 @@ -api_platform: - resource: . - type: api_platform - prefix: /api diff --git a/src/Entity/Member.php b/src/Entity/Member.php index 29c6ad38df..3b8b77ffc6 100644 --- a/src/Entity/Member.php +++ b/src/Entity/Member.php @@ -7,10 +7,6 @@ namespace App\Entity; -use ApiPlatform\Core\Annotation\ApiFilter; -use ApiPlatform\Core\Annotation\ApiProperty; -use ApiPlatform\Core\Annotation\ApiResource; -use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter; use App\Doctrine\AccommodationType; use App\Doctrine\GroupMembershipStatusType; use App\Doctrine\LanguageLevelType; @@ -38,15 +34,6 @@ * @ORM\HasLifecycleCallbacks * * @SuppressWarnings(PHPMD) - * - * @ApiResource( - * attributes={"identifiers"="username"}, - * security="is_granted('ROLE_USER')", - * collectionOperations={}, - * itemOperations={ - * "get"={"normalization_context"={"groups"={"Member:Read"}}} - * } - * ) */ class Member implements @@ -107,10 +94,6 @@ class Member * @ORM\Column(name="Username", type="string", length=32, nullable=false) * * @Groups({"Member:Read"}) - * - * @ApiProperty(identifier=true) - * - * @ApiFilter(SearchFilter::class, strategy="exact") */ protected $username; @@ -145,8 +128,6 @@ class Member * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="IDENTITY") - * - * @ApiProperty(identifier=false) */ protected $id; @@ -178,9 +159,6 @@ class Member * @ORM\JoinColumn(name="IdCity", referencedColumnName="geonameId") * * @Groups({"Member:Read"}) - * - * @ApiFilter(SearchFilter::class, strategy="ipartial", properties={"city.name", "city.country.name"}) - * @ApiFilter(SearchFilter::class, strategy="exact", properties={"city.latitude", "city.longitude"}) */ private $city; @@ -271,8 +249,6 @@ class Member * @ORM\Column(name="Accomodation", type="accommodation", nullable=false) * * @Groups({"Member:Read"}) - * - * @ApiFilter(SearchFilter::class, strategy="exact") */ private $accommodation = AccommodationType::MAYBE; @@ -326,8 +302,6 @@ class Member * @ORM\Column(name="MaxGuest", type="integer", nullable=false) * * @Groups({"Member:Read"}) - * - * @ApiFilter(SearchFilter::class, strategy="exact") */ private $maxguest = '0'; @@ -696,8 +670,6 @@ class Member * @ORM\OneToMany(targetEntity="MembersLanguagesLevel", mappedBy="member") * * @Groups({"Member:Read"}) - * - * @ApiFilter(SearchFilter::class, strategy="exact", properties={"languageLevels.level", "languageLevels.language.name", "languageLevels.language.englishname", "languageLevels.language.shortCode"}) */ private $languageLevels;