Skip to content

Commit 9e5731f

Browse files
committed
Nette\DI\Definitions\Statement is now acceptable type for option base_urls and packages[].base_urls
1 parent a045a32 commit 9e5731f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Bridge/Nette/DI/AssetExtension.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function getConfigSchema(): Schema
3939
$packageStructure = Expect::structure([
4040
'base_path' => Expect::string()
4141
->nullable(),
42-
'base_urls' => Expect::anyOf(Expect::string(), Expect::listOf('string'))
42+
'base_urls' => Expect::anyOf(Expect::type(Statement::class), Expect::string(), Expect::listOf('string|' . Statement::class))
4343
->default([])
4444
->before(static fn ($val): array => !is_array($val) ? [$val] : $val),
4545
'version' => Expect::anyOf(Expect::string(), Expect::int(), Expect::float())
@@ -61,7 +61,7 @@ public function getConfigSchema(): Schema
6161

6262
return Expect::structure([
6363
'base_path' => Expect::string(''),
64-
'base_urls' => Expect::anyOf(Expect::string(), Expect::listOf('string'))
64+
'base_urls' => Expect::anyOf(Expect::type(Statement::class), Expect::string(), Expect::listOf('string|' . Statement::class))
6565
->default([])
6666
->before(static fn ($val): array => !is_array($val) ? [$val] : $val),
6767
'version' => Expect::anyOf(Expect::string(), Expect::int(), Expect::float())

tests/Bridge/Nette/DI/fullFeatured.neon

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ asset:
1919
version_format: '%%s-%%s'
2020
bar:
2121
base_urls:
22-
- https://bar2.example.com
22+
- ::implode('', ['https://', 'bar2.example', '.com'])
2323
bar_version_strategy:
2424
base_urls:
2525
- https://bar_version_strategy.example.com

0 commit comments

Comments
 (0)