Skip to content

Commit

Permalink
Merge pull request #109 from ray-di/php-8.3
Browse files Browse the repository at this point in the history
Enable PHP 8.3 compat
  • Loading branch information
koriym authored Jan 19, 2024
2 parents dcafa70 + 06b1d0c commit 11e77ad
Show file tree
Hide file tree
Showing 9 changed files with 213 additions and 187 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ jobs:
cs:
uses: ray-di/.github/.github/workflows/coding-standards.yml@v1
with:
php_version: 8.2
php_version: 8.3
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ jobs:
ci:
uses: ray-di/.github/.github/workflows/continuous-integration.yml@v1
with:
old_stable: '["7.2", "7.3", "7.4", "8.0", "8.1", "8.2]'
old_stable: '["7.2", "7.3", "7.4", "8.0", "8.1", "8.2"]'
current_stable: 8.3
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ jobs:
sa:
uses: ray-di/.github/.github/workflows/static-analysis.yml@v1
with:
php_version: 8.2
php_version: 8.3
has_crc_config: true
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"koriym/null-object": "^1.0",
"koriym/param-reader": "^1.0",
"koriym/printo": "^1.0",
"nikic/php-parser": "^4.5",
"nikic/php-parser": "^4.5 || ^5.0",
"ray/aop": "^2.14"
},
"require-dev": {
Expand Down
4 changes: 2 additions & 2 deletions src/CompileInjector.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ public function getInstance($interface, $name = Name::ANY)
/** @psalm-suppress UnresolvableInclude */
$instance = require $this->getInstanceFile($dependencyIndex);
/** @psalm-suppress UndefinedVariable */
$isSingleton = isset($isSingleton) && $isSingleton; // @phpstan-ignore-line
if ($isSingleton) { // @phpstan-ignore-line
$isSingleton = isset($isSingleton) && $isSingleton;
if ($isSingleton) {
$this->singletons[$dependencyIndex] = $instance;
}

Expand Down
2 changes: 1 addition & 1 deletion src/DependencySaver.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ private function saveQualifier(IpQualifier $qualifer): void
$qualifer->param->getDeclaringFunction()->name,
$qualifer->param->name
);
($this->filePutContents)($fileName, serialize($qualifer->qualifier) . PHP_EOL);
($this->filePutContents)($fileName, serialize($qualifer->qualifier));
}
}
4 changes: 2 additions & 2 deletions src/ScriptInjector.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ public function getInstance($interface, $name = Name::ANY)
/** @psalm-suppress UnresolvableInclude */
$instance = require $this->getInstanceFile($dependencyIndex);
/** @psalm-suppress UndefinedVariable */
$isSingleton = isset($isSingleton) && $isSingleton; // @phpstan-ignore-line
if ($isSingleton) { // @phpstan-ignore-line
$isSingleton = isset($isSingleton) && $isSingleton;
if ($isSingleton) {
$this->singletons[$dependencyIndex] = $instance;
}

Expand Down
File renamed without changes.
Loading

0 comments on commit 11e77ad

Please sign in to comment.