Skip to content

Commit 99c0bbb

Browse files
committed
Don't merge config if config is published
1 parent de5b5cf commit 99c0bbb

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/Bridge/Laravel/Providers/CycleServiceProvider.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,17 @@ public function boot(): void
4646
}
4747

4848
public function register(): void
49-
{
49+
{
50+
$config = $this->app->make('config');
51+
52+
// @phpstan-ignore-next-line
53+
if (! $this->app->configurationIsCached() && ! $config->get('cycle')) {
54+
$this->mergeConfigFrom(
55+
__DIR__ . '/../../../../config/cycle.php',
56+
Registrator::CFG_KEY
57+
);
58+
}
59+
5060
$registrators = [
5161
Registrators\RegisterConfigs::class,
5262
Registrators\RegisterTokenizer::class,

0 commit comments

Comments
 (0)