Merge pull request #102 from amnuts/101-php-warning-82

Removed `namespace` and `use` statements from built `index.php` file
This commit is contained in:
Andrew Collington 2023-10-02 11:23:26 +01:00 committed by GitHub
commit db9df06889
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 10 additions and 16 deletions

View file

@ -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:

View file

@ -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}}'],

View file

@ -1,14 +1,12 @@
<?php
namespace Amnuts\Opcache;
/**
* OPcache GUI
*
* A simple but effective single-file GUI for the OPcache PHP extension.
*
* @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/
*/

View file

@ -4,7 +4,6 @@
"keywords": ["opcache", "cache", "gui", "opcodes", "interface"],
"minimum-stability": "stable",
"license": "MIT",
"version": "3.5.1",
"authors": [
{
"name": "Andrew Collington",

View file

@ -1,14 +1,12 @@
<?php
namespace Amnuts\Opcache;
/**
* OPcache GUI
*
* A simple but effective single-file GUI for the OPcache PHP extension.
*
* @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/
*/
@ -59,13 +57,9 @@ if (empty($ocEnabled)) {
header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache');
use DateTimeImmutable;
use DateTimeZone;
use Exception;
class Service
{
public const VERSION = '3.5.1';
public const VERSION = '3.5.2';
protected $tz;
protected $data;

View file

@ -1,7 +1,7 @@
{
"name": "opcache-gui",
"description": "A clean and responsive interface for Zend OPcache information, showing statistics, settings and cached files, and providing a real-time update for the information (using jQuery and React).",
"version": "3.5.1",
"version": "3.5.2",
"main": "index.js",
"devDependencies": {
"@babel/cli": "^7.12.8",

View file

@ -8,7 +8,7 @@ use Exception;
class Service
{
public const VERSION = '3.5.1';
public const VERSION = '3.5.2';
protected $tz;
protected $data;