From 9cb9b1ef9e2d61d689e4ee37228c519a6ee601e9 Mon Sep 17 00:00:00 2001 From: Christian Schiffler Date: Wed, 25 May 2022 10:40:45 +0200 Subject: [PATCH] Do not convert the file list to array --- bin/update-property-map.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/bin/update-property-map.php b/bin/update-property-map.php index 296bf9ea2..ee1b45dab 100755 --- a/bin/update-property-map.php +++ b/bin/update-property-map.php @@ -22,17 +22,15 @@ if (false === $docDir) { echo 'Please execute: git clone git@github.com:php/doc-en.git ' . dirname(__DIR__) . '/build/doc-en'; } -$files = iterator_to_array( - new RegexIterator( - new RecursiveIteratorIterator( - new RecursiveDirectoryIterator( - $docDir, - FilesystemIterator::CURRENT_AS_PATHNAME|FilesystemIterator::SKIP_DOTS - ), - RecursiveIteratorIterator::LEAVES_ONLY +$files = new RegexIterator( + new RecursiveIteratorIterator( + new RecursiveDirectoryIterator( + $docDir, + FilesystemIterator::CURRENT_AS_PATHNAME|FilesystemIterator::SKIP_DOTS ), - '/.*.xml$/' - ) + RecursiveIteratorIterator::LEAVES_ONLY + ), + '/.*.xml$/' ); $classes = require_once dirname(__DIR__) . '/dictionaries/ManualPropertyMap.php';