diff --git a/Makefile b/Makefile index e427aa6c..9e45d3ba 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ index.php: lib/UpdateException.php lib/LogException.php lib/Updater.php index.we # First put openining php tag and license awk '/^<\?php$$/,/\*\//' index.web.php > index.php # Then concat all files while filtering php tag and license - cat lib/UpdateException.php lib/LogException.php lib/Updater.php index.web.php| grep -v "^namespace" | awk '/^<\?php$$/,/\*\//{next} 1' >> index.php + cat lib/UpdateException.php lib/LogException.php lib/Updater.php index.web.php| grep -Pv "^namespace|^use [^\\\\]+;" | awk '/^<\?php$$/,/\*\//{next} 1' >> index.php test/vendor: composer bin tests install diff --git a/tests/checkSameCodeBase.php b/tests/checkSameCodeBase.php index 5beb9ca6..b65e0199 100644 --- a/tests/checkSameCodeBase.php +++ b/tests/checkSameCodeBase.php @@ -64,6 +64,7 @@ function findDiffPos($original, $copy) { $fileContent = file_get_contents($path); $fileContent = explode("namespace NC\\Updater;\n", $fileContent, 2)[1]; + $fileContent = preg_replace('/use [^\\\\]*;\n/', '', $fileContent); $fileContent = trim($fileContent);