Skip to content

Commit 077ddd4

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: (26 commits) [AssetMapper] Fix: also download files referenced by url() in CSS [AssetMapper] Fix eager imports are not deduplicated [Mime] Add `TemplatedEmail::$locale` to the serialized props fix tests add return types to test fixtures fix merge [Cache] Get TRUNCATE statement from platform do not detect the deserialization_path context value twice fix detecting the database server version [Cache] Add url decoding of password in `RedisTrait` DSN [Serializer] Remove incompatible type declaration with PHP 7.2 [Serializer] Fix test Fix denormalizing empty string into object|null parameter [PropertyInfo] Fixed promoted property type detection for `PhpStanExtractor` [Serializer] Move discrimination to abstract [Serializer] Fix deserialization_path missing using contructor [Serializer] Fix access to private when Ignore [AssetMapper] Adding an option (true by default) to not publish dot files [AssetMapper] Fixing out-of-date test on Windows [HttpKernel] Fix logging deprecations to the "php" channel when channel "deprecation" is not defined ...
2 parents 9a62c99 + 3de4893 commit 077ddd4

File tree

6 files changed

+12
-2
lines changed

6 files changed

+12
-2
lines changed

DependencyInjection/Configuration.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -860,6 +860,11 @@ private function addAssetMapperSection(ArrayNodeDefinition $rootNode, callable $
860860
->prototype('scalar')->end()
861861
->example(['*/assets/build/*', '*/*_.scss'])
862862
->end()
863+
// boolean called defaulting to true
864+
->booleanNode('exclude_dotfiles')
865+
->info('If true, any files starting with "." will be excluded from the asset mapper')
866+
->defaultTrue()
867+
->end()
863868
->booleanNode('server')
864869
->info('If true, a "dev server" will return the assets from the public directory (true in "debug" mode only by default)')
865870
->defaultValue($this->debug)

DependencyInjection/FrameworkExtension.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,8 @@ private function registerAssetMapperConfiguration(array $config, ContainerBuilde
13251325

13261326
$container->getDefinition('asset_mapper.repository')
13271327
->setArgument(0, $paths)
1328-
->setArgument(2, $excludedPathPatterns);
1328+
->setArgument(2, $excludedPathPatterns)
1329+
->setArgument(3, $config['exclude_dotfiles']);
13291330

13301331
$container->getDefinition('asset_mapper.public_assets_path_resolver')
13311332
->setArgument(0, $config['public_prefix']);

Resources/config/asset_mapper.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
abstract_arg('array of asset mapper paths'),
7575
param('kernel.project_dir'),
7676
abstract_arg('array of excluded path patterns'),
77+
abstract_arg('exclude dot files'),
7778
])
7879

7980
->set('asset_mapper.public_assets_path_resolver', PublicAssetsPathResolver::class)

Resources/config/debug_prod.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
param('debug.error_handler.throw_at'),
2828
param('kernel.debug'),
2929
param('kernel.debug'),
30-
service('logger')->nullOnInvalid(),
30+
null, // Deprecation logger if different from the one above
3131
])
3232
->tag('monolog.logger', ['channel' => 'php'])
3333

Resources/config/schema/symfony-1.0.xsd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@
194194
<xsd:element name="importmap-script-attribute" type="asset_mapper_attribute" minOccurs="0" maxOccurs="unbounded" />
195195
</xsd:sequence>
196196
<xsd:attribute name="enabled" type="xsd:boolean" />
197+
<xsd:attribute name="exclude-dotfiles" type="xsd:boolean" />
197198
<xsd:attribute name="server" type="xsd:boolean" />
198199
<xsd:attribute name="public-prefix" type="xsd:string" />
199200
<xsd:attribute name="missing-import-mode" type="missing-import-mode" />

Tests/DependencyInjection/ConfigurationTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ public function testAssetMapperCanBeEnabled()
137137
'importmap_polyfill' => 'es-module-shims',
138138
'vendor_dir' => '%kernel.project_dir%/assets/vendor',
139139
'importmap_script_attributes' => [],
140+
'exclude_dotfiles' => true,
140141
];
141142

142143
$this->assertEquals($defaultConfig, $config['asset_mapper']);
@@ -671,6 +672,7 @@ protected static function getBundleDefaultConfig()
671672
'importmap_polyfill' => 'es-module-shims',
672673
'vendor_dir' => '%kernel.project_dir%/assets/vendor',
673674
'importmap_script_attributes' => [],
675+
'exclude_dotfiles' => true,
674676
],
675677
'cache' => [
676678
'pools' => [],

0 commit comments

Comments
 (0)