Skip to content

Commit db9df06

Browse files
authored
Merge pull request #102 from amnuts/101-php-warning-82
Removed `namespace` and `use` statements from built `index.php` file
2 parents c4af1ed + c8f7adb commit db9df06

File tree

7 files changed

+10
-16
lines changed

7 files changed

+10
-16
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,9 @@ So to get started with a new language, copy the `example.json` to the language y
231231

232232
## Releases
233233

234+
**Version 3.5.2**\
235+
Removed some warnings for PHP 8.2 by dropping the `namespace` and `use` statements in the bundled `index.php` file.
236+
234237
**Version 3.5.1**\
235238
This is just 3.5.0 but with corrected version tags to make Packagist happy and correct my mistake. :facepalm:
236239

build/build.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* OPcache GUI - build script
55
*
66
* @author Andrew Collington, andy@amnuts.com
7-
* @version 3.5.1
7+
* @version 3.5.2
88
* @link https://github.com/amnuts/opcache-gui
99
* @license MIT, https://acollington.mit-license.org/
1010
*/
@@ -65,7 +65,7 @@
6565
$template = trim(file_get_contents(__DIR__ . '/template.phps'));
6666
$jsOutput = trim(file_get_contents(__DIR__ . '/interface.js'));
6767
$cssOutput = trim(file_get_contents(__DIR__ . '/interface.css'));
68-
$phpOutput = trim(implode('', array_slice(file($parentPath . '/src/Opcache/Service.php'), 3)));
68+
$phpOutput = trim(implode('', array_slice(file($parentPath . '/src/Opcache/Service.php'), 7)));
6969

7070
$output = str_replace(
7171
['{{JS_OUTPUT}}', '{{CSS_OUTPUT}}', '{{PHP_OUTPUT}}', '{{LANGUAGE_PACK}}'],

build/template.phps

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
<?php
22

3-
namespace Amnuts\Opcache;
4-
53
/**
64
* OPcache GUI
75
*
86
* A simple but effective single-file GUI for the OPcache PHP extension.
97
*
108
* @author Andrew Collington, andy@amnuts.com
11-
* @version 3.5.1
9+
* @version 3.5.2
1210
* @link https://github.com/amnuts/opcache-gui
1311
* @license MIT, https://acollington.mit-license.org/
1412
*/

composer.json

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"keywords": ["opcache", "cache", "gui", "opcodes", "interface"],
55
"minimum-stability": "stable",
66
"license": "MIT",
7-
"version": "3.5.1",
87
"authors": [
98
{
109
"name": "Andrew Collington",

index.php

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
<?php
22

3-
namespace Amnuts\Opcache;
4-
53
/**
64
* OPcache GUI
75
*
86
* A simple but effective single-file GUI for the OPcache PHP extension.
97
*
108
* @author Andrew Collington, andy@amnuts.com
11-
* @version 3.5.1
9+
* @version 3.5.2
1210
* @link https://github.com/amnuts/opcache-gui
1311
* @license MIT, https://acollington.mit-license.org/
1412
*/
@@ -59,13 +57,9 @@
5957
header('Cache-Control: no-cache, must-revalidate');
6058
header('Pragma: no-cache');
6159

62-
use DateTimeImmutable;
63-
use DateTimeZone;
64-
use Exception;
65-
6660
class Service
6761
{
68-
public const VERSION = '3.5.1';
62+
public const VERSION = '3.5.2';
6963

7064
protected $tz;
7165
protected $data;

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "opcache-gui",
33
"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).",
4-
"version": "3.5.1",
4+
"version": "3.5.2",
55
"main": "index.js",
66
"devDependencies": {
77
"@babel/cli": "^7.12.8",

src/Opcache/Service.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class Service
1010
{
11-
public const VERSION = '3.5.1';
11+
public const VERSION = '3.5.2';
1212

1313
protected $tz;
1414
protected $data;

0 commit comments

Comments
 (0)