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

Fix deprecated error in PHP 8.1/8.2 #1474

Merged
merged 8 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Annotations/AbstractAnnotation.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ public function __set($property, $value)
unset($fields[$_property]);
}
Logger::notice('Unexpected field "' . $property . '" for ' . $this->identity() . ', expecting "' . implode('", "', array_keys($fields)) . '" in ' . $this->_context);
koriym marked this conversation as resolved.
Show resolved Hide resolved
$this->$property = $value;
}

/**
Expand Down
3 changes: 2 additions & 1 deletion src/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
* @property string $property
* @property Annotations\AbstractAnnotation[] $annotations
*/
#[\AllowDynamicProperties]
class Context
{
/**
Expand Down Expand Up @@ -282,7 +283,7 @@ public function fullyQualifiedName($class)
} else {
$namespace = '\\'; // global namespace
}
if (strcasecmp($class, $this->class) === 0) {
if (strcasecmp((string) $class, (string) $this->class) === 0) {
return $namespace . $this->class;
}
$pos = strpos($class, '\\');
Expand Down