chore: remove obsolete feature flag
This commit is contained in:
@@ -1,4 +1,2 @@
|
|||||||
flagception:
|
flagception:
|
||||||
features:
|
features: {}
|
||||||
travel_snapshot:
|
|
||||||
env: FEATURE_TRAVEL_SNAPSHOT
|
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ use App\BusProNet\XmlLoader\TravelLoader;
|
|||||||
use App\Exception\HotelNotFoundException;
|
use App\Exception\HotelNotFoundException;
|
||||||
use App\Exception\HotelNotInTravelException;
|
use App\Exception\HotelNotInTravelException;
|
||||||
use App\Exception\TravelNotFoundException;
|
use App\Exception\TravelNotFoundException;
|
||||||
use Flagception\Manager\FeatureManagerInterface;
|
|
||||||
use Psr\Cache\InvalidArgumentException;
|
use Psr\Cache\InvalidArgumentException;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
use Symfony\Contracts\Cache\CacheInterface;
|
use Symfony\Contracts\Cache\CacheInterface;
|
||||||
@@ -48,7 +47,6 @@ class TravelDataService
|
|||||||
private readonly CacheInterface $cache,
|
private readonly CacheInterface $cache,
|
||||||
private readonly LoggerInterface $logger,
|
private readonly LoggerInterface $logger,
|
||||||
private readonly TravelSnapshotService $travelSnapshotService,
|
private readonly TravelSnapshotService $travelSnapshotService,
|
||||||
private readonly FeatureManagerInterface $featureManager,
|
|
||||||
private readonly bool $preferRemote = false,
|
private readonly bool $preferRemote = false,
|
||||||
private readonly bool $enableFallback = true,
|
private readonly bool $enableFallback = true,
|
||||||
) {
|
) {
|
||||||
@@ -156,10 +154,6 @@ class TravelDataService
|
|||||||
|
|
||||||
private function getTravelDataFromSnapshot(int $dateId, ?int $hotelId): ?Travel
|
private function getTravelDataFromSnapshot(int $dateId, ?int $hotelId): ?Travel
|
||||||
{
|
{
|
||||||
if (!$this->featureManager->isActive('travel_snapshot')) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$travel = $this->travelSnapshotService->loadTravel($dateId, $hotelId);
|
$travel = $this->travelSnapshotService->loadTravel($dateId, $hotelId);
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ use App\BusProNet\XmlLoader\TravelLoader;
|
|||||||
use App\Exception\TravelNotFoundException;
|
use App\Exception\TravelNotFoundException;
|
||||||
use App\Service\TravelDataService;
|
use App\Service\TravelDataService;
|
||||||
use App\Service\TravelSnapshotService;
|
use App\Service\TravelSnapshotService;
|
||||||
use Flagception\Manager\FeatureManagerInterface;
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
use Symfony\Contracts\Cache\CacheInterface;
|
use Symfony\Contracts\Cache\CacheInterface;
|
||||||
@@ -30,7 +29,6 @@ class TravelDataServiceTest extends TestCase
|
|||||||
private CacheInterface $cache;
|
private CacheInterface $cache;
|
||||||
private LoggerInterface $logger;
|
private LoggerInterface $logger;
|
||||||
private TravelSnapshotService $travelSnapshotService;
|
private TravelSnapshotService $travelSnapshotService;
|
||||||
private FeatureManagerInterface $featureManager;
|
|
||||||
|
|
||||||
protected function setUp(): void
|
protected function setUp(): void
|
||||||
{
|
{
|
||||||
@@ -42,8 +40,6 @@ class TravelDataServiceTest extends TestCase
|
|||||||
$this->cache = $this->createMock(CacheInterface::class);
|
$this->cache = $this->createMock(CacheInterface::class);
|
||||||
$this->logger = $this->createMock(LoggerInterface::class);
|
$this->logger = $this->createMock(LoggerInterface::class);
|
||||||
$this->travelSnapshotService = $this->createMock(TravelSnapshotService::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->service = new TravelDataService(
|
||||||
$this->travelLoader,
|
$this->travelLoader,
|
||||||
@@ -54,7 +50,6 @@ class TravelDataServiceTest extends TestCase
|
|||||||
$this->cache,
|
$this->cache,
|
||||||
$this->logger,
|
$this->logger,
|
||||||
$this->travelSnapshotService,
|
$this->travelSnapshotService,
|
||||||
$this->featureManager,
|
|
||||||
false, // preferRemote
|
false, // preferRemote
|
||||||
true, // enableFallback
|
true, // enableFallback
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user