Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 7.4 code is not (fully) supported #116

Open
LukeWCS opened this issue Oct 11, 2024 · 0 comments
Open

PHP 7.4 code is not (fully) supported #116

LukeWCS opened this issue Oct 11, 2024 · 0 comments

Comments

@LukeWCS
Copy link

LukeWCS commented Oct 11, 2024

Hello

I have started using features from PHP 7.4 in one of my extensions. Up until now, the code base of my extensions was consistently 7.1. I noticed that EPV does not recognize at least two 7.4 features and generates false reports. This affects typed class properties and the Null Coalescing Assignment Operator.

Tested with EPV 0.0.12 and PHP 7.4.33.

1. Typed properties:

The following block:

	protected object $common;
	protected object $ext_manager;
	protected object $cache;
	protected object $request;
	protected object $log;
	protected object $user;
	protected object $config;
	protected object $config_text;
	protected object $language;
	protected object $template;
	protected object $db;
	protected string $table_prefix;
	protected string $phpbb_root_path;
	protected string $php_ext;

	protected string $u_action;
	protected array  $migrations_db;
	protected int    $safe_time_limit;
	protected bool   $is_phpbb_min_3_3_8;

produces the following false message:

Fatal error: PHP parse error in file \core\ext_mgr_plus.php. Message: Syntax error, unexpected T_STRING, expecting T_FUNCTION or T_CONST on line 42

2. NCAO

The following line:

		$ext_list_vc ??= [];

produces the following false message:

Fatal error: PHP parse error in file \core\ext_mgr_plus.php. Message: Syntax error, unexpected on line 924

Both errors also cause EPV to terminate immediately and thus the rest of the file is no longer checked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant