Skip to content

Commit

Permalink
Avoid dynamic properties creation
Browse files Browse the repository at this point in the history
PHP 8.2 deprecated the dynamic object creation, by setting unknown properties.

This fixes the following issue:
Creation of dynamic property TheSeer\phpDox\Bootstrap::$api is deprecated
  • Loading branch information
dereckson committed Mar 26, 2023
1 parent 7d2549f commit 077af04
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -13,7 +13,7 @@
"issues" : "https://github.com/theseer/phpdox/issues"
},
"require" : {
"php" : ">=7.1",
"php" : ">=7.4",
"ext-tokenizer" : "*",
"ext-dom" : "*",
"ext-xsl" : "*",
Expand Down
5 changes: 1 addition & 4 deletions lib/fDOMDocument/composer.json
Expand Up @@ -14,13 +14,10 @@
"issues": "https://github.com/theseer/fDOMDocument/issues"
},
"require": {
"php": ">=5.3.3",
"php": ">=7.4",
"ext-dom": "*",
"lib-libxml": "*"
},
"require-dev": {
"php": ">=7.3"
},
"autoload": {
"classmap": [
"src/"
Expand Down
4 changes: 4 additions & 0 deletions src/bootstrap/Bootstrap.php
Expand Up @@ -2,6 +2,10 @@
namespace TheSeer\phpDox;

class Bootstrap {

private ProgressLogger $logger;
private BootstrapApi $api;

public function __construct(ProgressLogger $logger, BootstrapApi $api) {
$this->logger = $logger;
$this->api = $api;
Expand Down
2 changes: 2 additions & 0 deletions src/bootstrap/BootstrapApi.php
Expand Up @@ -65,6 +65,8 @@ class BootstrapApi {
*/
private $backends = [];

private ProgressLogger $logger;

/**
* Constructor
*/
Expand Down

0 comments on commit 077af04

Please sign in to comment.