Skip to content

Conversation

@susnux
Copy link
Contributor

@susnux susnux commented Aug 12, 2025

This adds the polyfills for newer PHP versions - above our min version - to the dependencies.
Allowing us to write modern code without copy-paste the implementation of the new API (e.g. array_any).
Once that version is our new minimum we can just remove the polyfill and do not need to refactor our code base.

The polyfills for 8.3 already were added as implicit dependencies, but now marked as explicit dependency.

Additionally cleaned up the existing polyfills:

  • 8.0 and 8.1 are included in our min. version thus remove them to save some space and computation
  • mbstring is a required php modul for Nextcloud -> remove as polyfill
  • ctype is a required php modul for Nextcloud -> remove as polyfill
  • grapheme is not required by us - its a sub dependency of symfony/string

susnux added 5 commits August 12, 2025 12:35
This cleans up the dependencies a bit an reduces the bootstrap process.
As we require PHP 8.1+ we do not need polyfills for 8.1 and lower.
Moreover `ctype` and `mbstring` are required as per our system
requirements.

Signed-off-by: Ferdinand Thiessen <[email protected]>
The polyfills for 8.3 already were added as implicit dependencies, but
now marked as explicit dependency.

Signed-off-by: Ferdinand Thiessen <[email protected]>
We do not use the grapheme extension, it was added together with IDN
polyfills, but we only use the IDN ones. So we do not need an explicit dependency here.

It will still be included for the moment, as we have some dependencies
that require it, so it is now an implicit dependency.

Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Copy link
Member

@icewind1991 icewind1991 left a comment

Choose a reason for hiding this comment

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

🚀

@susnux susnux marked this pull request as ready for review August 12, 2025 14:31
@susnux susnux merged commit d93b789 into master Aug 12, 2025
9 checks passed
@susnux susnux deleted the feat/polyfills branch August 12, 2025 14:33
@skjnldsv skjnldsv modified the milestones: Nextcloud 32, Nextcloud 33 Sep 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants