chore: remove obsolete feature flag
This commit is contained in:
@@ -1,4 +1,2 @@
|
||||
flagception:
|
||||
features:
|
||||
travel_snapshot:
|
||||
env: FEATURE_TRAVEL_SNAPSHOT
|
||||
features: {}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user