From c8f7adbe988f99134e3d787f4cff405be0546eea Mon Sep 17 00:00:00 2001 From: Andrew Collington Date: Sat, 30 Sep 2023 15:20:54 +0100 Subject: [PATCH] Removed `namespace` and `use` statements from built `index.php` file --- README.md | 3 +++ build/build.php | 4 ++-- build/template.phps | 4 +--- composer.json | 1 - index.php | 10 ++-------- package.json | 2 +- src/Opcache/Service.php | 2 +- 7 files changed, 10 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 2f98339..f7b445f 100644 --- a/README.md +++ b/README.md @@ -231,6 +231,9 @@ So to get started with a new language, copy the `example.json` to the language y ## Releases +**Version 3.5.2**\ +Removed some warnings for PHP 8.2 by dropping the `namespace` and `use` statements in the bundled `index.php` file. + **Version 3.5.1**\ This is just 3.5.0 but with corrected version tags to make Packagist happy and correct my mistake. :facepalm: diff --git a/build/build.php b/build/build.php index 2882436..1622056 100644 --- a/build/build.php +++ b/build/build.php @@ -4,7 +4,7 @@ * OPcache GUI - build script * * @author Andrew Collington, andy@amnuts.com - * @version 3.5.1 + * @version 3.5.2 * @link https://github.com/amnuts/opcache-gui * @license MIT, https://acollington.mit-license.org/ */ @@ -65,7 +65,7 @@ echo "🚀 Creating single build file\n"; $template = trim(file_get_contents(__DIR__ . '/template.phps')); $jsOutput = trim(file_get_contents(__DIR__ . '/interface.js')); $cssOutput = trim(file_get_contents(__DIR__ . '/interface.css')); -$phpOutput = trim(implode('', array_slice(file($parentPath . '/src/Opcache/Service.php'), 3))); +$phpOutput = trim(implode('', array_slice(file($parentPath . '/src/Opcache/Service.php'), 7))); $output = str_replace( ['{{JS_OUTPUT}}', '{{CSS_OUTPUT}}', '{{PHP_OUTPUT}}', '{{LANGUAGE_PACK}}'], diff --git a/build/template.phps b/build/template.phps index e0b579b..f13449d 100644 --- a/build/template.phps +++ b/build/template.phps @@ -1,14 +1,12 @@