mirror of
https://github.com/shlinkio/shlink.git
synced 2025-03-14 04:00:57 +03:00
Moved config post-processors to their own sub-namespace
This commit is contained in:
parent
390bc59d99
commit
a06957e9fa
6 changed files with 13 additions and 8 deletions
|
@ -48,6 +48,6 @@ return (new ConfigAggregator\ConfigAggregator([
|
|||
// Routes have to be loaded last
|
||||
new ConfigAggregator\PhpFileProvider('config/autoload/routes.config.php'),
|
||||
], 'data/cache/app_config.php', [
|
||||
Core\Config\BasePathPrefixer::class,
|
||||
Core\Config\MultiSegmentSlugProcessor::class,
|
||||
Core\Config\PostProcessor\BasePathPrefixer::class,
|
||||
Core\Config\PostProcessor\MultiSegmentSlugProcessor::class,
|
||||
]))->getMergedConfig();
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Shlinkio\Shlink\Core\Config;
|
||||
namespace Shlinkio\Shlink\Core\Config\PostProcessor;
|
||||
|
||||
use function Functional\map;
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Shlinkio\Shlink\Core\Config;
|
||||
namespace Shlinkio\Shlink\Core\Config\PostProcessor;
|
||||
|
||||
use function Functional\map;
|
||||
use function str_replace;
|
|
@ -17,4 +17,9 @@ enum RedirectStatus: int
|
|||
{
|
||||
return contains([self::STATUS_301, self::STATUS_308], $this);
|
||||
}
|
||||
|
||||
public function isLegacyStatus(): bool
|
||||
{
|
||||
return contains([self::STATUS_301, self::STATUS_302], $this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ShlinkioTest\Shlink\Core\Config;
|
||||
namespace ShlinkioTest\Shlink\Core\Config\PostProcessor;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Shlinkio\Shlink\Core\Config\BasePathPrefixer;
|
||||
use Shlinkio\Shlink\Core\Config\PostProcessor\BasePathPrefixer;
|
||||
|
||||
class BasePathPrefixerTest extends TestCase
|
||||
{
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ShlinkioTest\Shlink\Core\Config;
|
||||
namespace ShlinkioTest\Shlink\Core\Config\PostProcessor;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Shlinkio\Shlink\Core\Config\MultiSegmentSlugProcessor;
|
||||
use Shlinkio\Shlink\Core\Config\PostProcessor\MultiSegmentSlugProcessor;
|
||||
|
||||
class MultiSegmentSlugProcessorTest extends TestCase
|
||||
{
|
Loading…
Add table
Reference in a new issue