diff --git a/config/packages/flagception.yaml b/config/packages/flagception.yaml index c0dd3b4..2b25a7d 100644 --- a/config/packages/flagception.yaml +++ b/config/packages/flagception.yaml @@ -1,4 +1,2 @@ flagception: - features: - travel_snapshot: - env: FEATURE_TRAVEL_SNAPSHOT + features: {} diff --git a/src/Service/TravelDataService.php b/src/Service/TravelDataService.php index 66c0129..48cb1f5 100644 --- a/src/Service/TravelDataService.php +++ b/src/Service/TravelDataService.php @@ -18,7 +18,6 @@ use App\BusProNet\XmlLoader\TravelLoader; use App\Exception\HotelNotFoundException; use App\Exception\HotelNotInTravelException; use App\Exception\TravelNotFoundException; -use Flagception\Manager\FeatureManagerInterface; use Psr\Cache\InvalidArgumentException; use Psr\Log\LoggerInterface; use Symfony\Contracts\Cache\CacheInterface; @@ -48,7 +47,6 @@ class TravelDataService private readonly CacheInterface $cache, private readonly LoggerInterface $logger, private readonly TravelSnapshotService $travelSnapshotService, - private readonly FeatureManagerInterface $featureManager, private readonly bool $preferRemote = false, private readonly bool $enableFallback = true, ) { @@ -156,10 +154,6 @@ class TravelDataService private function getTravelDataFromSnapshot(int $dateId, ?int $hotelId): ?Travel { - if (!$this->featureManager->isActive('travel_snapshot')) { - return null; - } - try { $travel = $this->travelSnapshotService->loadTravel($dateId, $hotelId); } catch (\Throwable $e) { diff --git a/tests/Service/TravelDataServiceTest.php b/tests/Service/TravelDataServiceTest.php index 1ff60e5..a7b9bef 100644 --- a/tests/Service/TravelDataServiceTest.php +++ b/tests/Service/TravelDataServiceTest.php @@ -14,7 +14,6 @@ use App\BusProNet\XmlLoader\TravelLoader; use App\Exception\TravelNotFoundException; use App\Service\TravelDataService; use App\Service\TravelSnapshotService; -use Flagception\Manager\FeatureManagerInterface; use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; use Symfony\Contracts\Cache\CacheInterface; @@ -30,7 +29,6 @@ class TravelDataServiceTest extends TestCase private CacheInterface $cache; private LoggerInterface $logger; private TravelSnapshotService $travelSnapshotService; - private FeatureManagerInterface $featureManager; protected function setUp(): void { @@ -42,8 +40,6 @@ class TravelDataServiceTest extends TestCase $this->cache = $this->createMock(CacheInterface::class); $this->logger = $this->createMock(LoggerInterface::class); $this->travelSnapshotService = $this->createMock(TravelSnapshotService::class); - $this->featureManager = $this->createMock(FeatureManagerInterface::class); - $this->featureManager->method('isActive')->with('travel_snapshot')->willReturn(true); $this->service = new TravelDataService( $this->travelLoader, @@ -54,7 +50,6 @@ class TravelDataServiceTest extends TestCase $this->cache, $this->logger, $this->travelSnapshotService, - $this->featureManager, false, // preferRemote true, // enableFallback );