Skip to content

Provide mechanism to override libraries with custom/patched versions #54825

@summersab

Description

@summersab

How to use GitHub

  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Is your feature request related to a problem? Please describe.
A lot of times, system admins have patches or modifications to libraries that they need to apply for their specific use cases. Many times, they have submitted a PR, it is yet to be approved or has gone stale, but they still need the feature. However, directly editing core files is a bad idea and causes system integrity checks to fail.

Describe the solution you'd like
It would be great if there was a way to add library overrides to the system so that the autoloader picks them up at runtime. Perhaps they could be placed in config/overrides/[path-of-lib-from-root], for example config/overrides/lib/private/DB/AdapterMySQL.php)

Describe alternatives you've considered
I did write a very hacky piece of logic in a *.config file that implements this functionality, but it's not ideal, and it would be good if there was something officially supported.

Additional context
An example, this PR has been open forever, and there are other users who rely on this functionality:
nextcloud/user_saml#697

Until the PR is merged, it would be nice to be able to override the default libraries to provide the desired features.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmapenhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions