FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Silence deprecations / PHP 8.4 compatibility (non-breaking) by redcuillin · Pull Request #33 · scriptotek/php-marc · GitHub

Silence deprecations / PHP 8.4 compatibility (non-breaking) - #33

Open
redcuillin wants to merge 1 commit into
scriptotek:mainfrom
redcuillin:fix/php-deprecations-8x
Open

redcuillin wants to merge 1 commit into
scriptotek:mainfrom
redcuillin:fix/php-deprecations-8x

Conversation

Copy link
Copy Markdown

Add type hinting and return types for PHP 8.4 compatibility. Update .gitignore to include .phpunit.result.cache.
Silences deprecation warnings if using PHP8.4 without breaking compatibility with earlier versions.

…roved PHP 8.4 compatibility. Update .gitignore to include .phpunit.result.cache.

sonarqubecloud Bot commented May 1, 2026

Copy link
Copy Markdown

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

Copy link
Copy Markdown
Author

Further to request in #32

redcuillin mentioned this pull request May 2, 2026

rudolfbyker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM overall, but made one suggestion for improvement.

trait SerializableField
{
public function jsonSerialize(): array|string
public function jsonSerialize(): mixed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This is technically correct, but loses useful information. Suggestion: Add the missing information via PHPDoc, like this:

/**
 * @returns array|string
 */
public function jsonSerialize(): mixed

The same applies to many other places in this PR.

Comment on lines +42 to +46
$source = simplexml_load_string($data, 'SimpleXMLElement', 0, $ns, $isPrefix);
if (false === $source) {
throw new XmlException(libxml_get_errors());
}
$this->source = $source;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Good catch!

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL