Skip to content

Commit

Permalink
Merge pull request #102 from amnuts/101-php-warning-82
Browse files Browse the repository at this point in the history
Removed `namespace` and `use` statements from built `index.php` file
  • Loading branch information
amnuts authored Oct 2, 2023
2 parents c4af1ed + c8f7adb commit db9df06
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 16 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
4 changes: 2 additions & 2 deletions build/build.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* OPcache GUI - build script
*
* @author Andrew Collington, [email protected]
* @version 3.5.1
* @version 3.5.2
* @link https://github.com/amnuts/opcache-gui
* @license MIT, https://acollington.mit-license.org/
*/
Expand Down Expand Up @@ -65,7 +65,7 @@
$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}}'],
Expand Down
4 changes: 1 addition & 3 deletions build/template.phps
Original file line number Diff line number Diff line change
@@ -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, [email protected]
* @version 3.5.1
* @version 3.5.2
* @link https://github.com/amnuts/opcache-gui
* @license MIT, https://acollington.mit-license.org/
*/
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"keywords": ["opcache", "cache", "gui", "opcodes", "interface"],
"minimum-stability": "stable",
"license": "MIT",
"version": "3.5.1",
"authors": [
{
"name": "Andrew Collington",
Expand Down
10 changes: 2 additions & 8 deletions index.php
Original file line number Diff line number Diff line change
@@ -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, [email protected]
* @version 3.5.1
* @version 3.5.2
* @link https://github.com/amnuts/opcache-gui
* @license MIT, https://acollington.mit-license.org/
*/
Expand Down Expand Up @@ -59,13 +57,9 @@
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;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/Opcache/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class Service
{
public const VERSION = '3.5.1';
public const VERSION = '3.5.2';

protected $tz;
protected $data;
Expand Down

0 comments on commit db9df06

Please sign in to comment.