Skip to content

Conversation

@joshtrichards
Copy link
Member

Summary

  • Standard PHP constant available
  • One less legacy (OC_Util) function1
  • Easier to read
  • Nobody was using it anyway
  • Technically more robust

TODO

  • ...

Checklist

Footnotes

  1. Once we feel comfortable removing it. Not really sure if it's considered a public API or not. I guess kinda sorta. So @deprecated it (and changed its implementation to use the constant meanwhile too).

- Easy enough query directly these days; Only used in one spot anyhow
- Updated the runningOnMac method to use PHP_OS_FAMILY just for clarity until we can remove the function entirely (same result; supported since PHP ~7.4).

Signed-off-by: Josh <[email protected]>
Use PHP's newer PHP_OS_FAMILY constant.

- Allows us to drop a legacy OC_Util method.
- This test isn't even enabled at the moment.

Signed-off-by: Josh <[email protected]>
PHP_OS_FAMILY

- Facilitates elimination of a legacy OC_Util method
  - `runningOnMac()` -- yes, really! ;-)
- Supported since PHP late 7.x-era

Signed-off-by: Josh <[email protected]>
@joshtrichards joshtrichards added this to the Nextcloud 33 milestone Dec 3, 2025
@joshtrichards joshtrichards requested a review from a team as a code owner December 3, 2025 03:07
@joshtrichards joshtrichards requested review from ArtificialOwl, leftybournes and yemkareems and removed request for a team December 3, 2025 03:07
@joshtrichards joshtrichards added the ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) label Dec 3, 2025
Copy link
Member

@CarlSchwan CarlSchwan left a comment

Choose a reason for hiding this comment

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

One less :)

@CarlSchwan
Copy link
Member

Doc part nextcloud/documentation#13907

Copy link
Contributor

@szaimen szaimen left a comment

Choose a reason for hiding this comment

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

LGTM but did not test

Removed deprecated method 'runningOnMac' that checks if PHP is running on macOS.

Signed-off-by: Josh <[email protected]>
@provokateurin provokateurin merged commit 842df49 into master Dec 5, 2025
224 of 232 checks passed
@provokateurin provokateurin deleted the jtr/chore-legacy-drop-mac-checker branch December 5, 2025 16:42
@SystemKeeper
Copy link
Contributor

This breaks MacOS CI as the error is now not ignored anymore on install: https://github.com/nextcloud/talk-ios/actions/runs/20001229346/job/57357971111?pr=2306

Needs adjustment at:

|| (string)$errors[0]['error'] !== 'Mac OS X is not supported and Nextcloud will not work properly on this platform. Use it at your own risk!') {

(Leaving out the question if there’s a better way to do this ..)

@provokateurin
Copy link
Member

Since we don't support macOS, you should also not use it in your CI this way 🙈 The right way is probably using a docker container for this in CI

@SystemKeeper
Copy link
Contributor

Since macOS runner don’t support docker or nested virtualisation, this is the only way right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews feature: install and update ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) technical debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants