@@ -339,7 +339,7 @@ public function getXmlFiles()
339
339
*/
340
340
public function getMainConfigFiles ($ asDataSet = true )
341
341
{
342
- $ cacheKey = __METHOD__ . '| ' . serialize ( func_get_args () );
342
+ $ cacheKey = __METHOD__ . '| ' . implode ( ' | ' , [ $ asDataSet ] );
343
343
if (!isset (self ::$ _cache [$ cacheKey ])) {
344
344
$ configXmlPaths = [];
345
345
foreach ($ this ->componentRegistrar ->getPaths (ComponentRegistrar::MODULE ) as $ moduleDir ) {
@@ -375,7 +375,7 @@ public function getConfigFiles(
375
375
$ excludedFileNames = ['wsdl.xml ' , 'wsdl2.xml ' , 'wsi.xml ' ],
376
376
$ asDataSet = true
377
377
) {
378
- $ cacheKey = __METHOD__ . '| ' . serialize ( func_get_args () );
378
+ $ cacheKey = __METHOD__ . '| ' . json_encode ([ $ fileNamePattern , $ excludedFileNames , $ asDataSet ] );
379
379
if (!isset (self ::$ _cache [$ cacheKey ])) {
380
380
$ files = $ this ->dirSearch ->collectFiles (ComponentRegistrar::MODULE , "/etc/ {$ fileNamePattern }" );
381
381
$ files = array_filter (
@@ -407,7 +407,7 @@ public function getXmlCatalogFiles(
407
407
$ excludedFileNames = [],
408
408
$ asDataSet = true
409
409
) {
410
- $ cacheKey = __METHOD__ . '| ' . serialize ( func_get_args () );
410
+ $ cacheKey = __METHOD__ . '| ' . json_encode ( ' | ' , [ $ fileNamePattern , $ excludedFileNames , $ asDataSet ] );
411
411
if (!isset (self ::$ _cache [$ cacheKey ])) {
412
412
$ files = $ this ->getFilesSubset (
413
413
$ this ->componentRegistrar ->getPaths (ComponentRegistrar::MODULE ),
@@ -458,7 +458,7 @@ function ($file) use ($excludedFileNames) {
458
458
*/
459
459
public function getLayoutConfigFiles ($ fileNamePattern = '*.xml ' , $ asDataSet = true )
460
460
{
461
- $ cacheKey = __METHOD__ . '| ' . serialize ( func_get_args () );
461
+ $ cacheKey = __METHOD__ . '| ' . implode ( ' | ' , [ $ fileNamePattern , $ asDataSet ] );
462
462
if (!isset (self ::$ _cache [$ cacheKey ])) {
463
463
self ::$ _cache [$ cacheKey ] = $ this ->dirSearch ->collectFiles (
464
464
ComponentRegistrar::THEME ,
@@ -1427,7 +1427,7 @@ public function getModulePhpFiles($module, $asDataSet = true)
1427
1427
*/
1428
1428
public function getComposerFiles ($ componentType , $ asDataSet = true )
1429
1429
{
1430
- $ key = __METHOD__ . '| ' . serialize ( func_get_args () );
1430
+ $ key = __METHOD__ . '| ' . implode ( ' | ' , [ $ componentType , $ asDataSet ] );
1431
1431
if (!isset (self ::$ _cache [$ key ])) {
1432
1432
$ excludes = $ componentType == ComponentRegistrar::MODULE ? $ this ->getModuleTestDirsRegex () : [];
1433
1433
$ files = $ this ->getFilesSubset (
0 commit comments