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

Added compatibility for PHP 8.1 #3

Merged
merged 3 commits into from
Oct 21, 2024
Merged
Changes from all 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
6 changes: 3 additions & 3 deletions src/Model/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function setComplete($complete)
{
// check if the version has only 0 -> so no real result
// maybe move this out to the Providers itself?
$left = preg_replace('/[0._]/', '', $complete);
$left = preg_replace('/[0._]/', '', (string)$complete);
if ($left === '') {
$complete = null;
}
Expand Down Expand Up @@ -226,7 +226,7 @@ private function getCompleteParts($complete)
];

// only digits
preg_match('/\\d+(?:[._]*\\d*)*/', $complete, $result);
preg_match('/\\d+(?:[._]*\\d*)*/', (string)$complete, $result);
if (\count($result) > 0) {
$parts = preg_split('/[._]/', $result[0]);

Expand All @@ -242,7 +242,7 @@ private function getCompleteParts($complete)
}

// grab alias
$result = preg_split('/\\d+(?:[._]*\\d*)*/', $complete);
$result = preg_split('/\\d+(?:[._]*\\d*)*/', (string)$complete);
foreach ($result as $row) {
$row = trim($row);

Expand Down