Skip to content

Conversation

@chrissonntag
Copy link

This PR is supposed to ensure the compatibility to PHP 8.4 by making implicitly marked function parameters explicitly nullable, thus fixing #94

Commits:

  • [BUGFIX] Return empty string instead of false on request exception - Fixed error handling in DomainResource and PlaceholdResource to return consistent string types
  • [CLEANUP] Update constructor parameter types to nullable - Enhanced type safety across 13 classes with proper nullable parameter declarations

Changes:

  • Bug Fix: Changed RequestException handling to return empty string instead of false
  • Type Safety: Updated constructor parameters to use nullable types (?Type)
  • Impact: No breaking changes, improved reliability and consistency

- 💡 Changed constructor parameters in multiple classes to use nullable types.
- 🔧 Improved type safety and consistency across the codebase.

Resolves: IchHabRecht#94
🔧 Updated error handling in DomainResource and PlaceholdResource to return an empty string instead of false when a RequestException occurs.
@IchHabRecht
Copy link
Owner

Hi @chrissonntag

Thank you for this great patch. Would you mind to rebase it onto the current main branch to be able to run the test suite and merge afterwards?

@IchHabRecht IchHabRecht changed the base branch from main to 4.x October 17, 2025 07:48
@IchHabRecht IchHabRecht changed the base branch from 4.x to main October 17, 2025 07:49
@chrissonntag chrissonntag changed the base branch from main to 4.x October 17, 2025 08:00
@chrissonntag
Copy link
Author

Hey, thanks. And yeah, my bad. I missed selecting the correct target branch. I've changed it to 4.x now and will look into adjusting the main branch if needed in a second PR

@chrissonntag
Copy link
Author

I've checked the main branch and can say that it does not need fixing regarding PHP 8.4. All occurences of those implicitly marked function parameters have been adjusted already. So there is no need for any patching there.

However, for I used phpstan to check for incompatibilities, and phpstan was not quite satisfied with the code integrity, we may consider improving upon that and may also integrate some other coding-standard checks. Now that main (respectively ^5.0) is solely compatible to TYPO3 13.4, things have changed to the better so it became easier to follow a stricter policy.

I'd be happy to contribute in that regard furthermore, if desired.

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