Skip to content

feat: add config header and tests.#59462

Merged
come-nc merged 2 commits intonextcloud:masterfrom
Keeper-of-the-Keys:config-header-attempt-2
Apr 7, 2026
Merged

feat: add config header and tests.#59462
come-nc merged 2 commits intonextcloud:masterfrom
Keeper-of-the-Keys:config-header-attempt-2

Conversation

@Keeper-of-the-Keys
Copy link
Copy Markdown
Contributor

@Keeper-of-the-Keys Keeper-of-the-Keys commented Apr 5, 2026

Summary

config.php is re-rendered by nextcloud regularly removing comments and rendering constants into their values, nextcloud supports using multiple config files and renders their content into the main config.php without modifying the external files.
This PR adds a header to config.php warning the admin/user of this and suggesting the use of the multiple config files mechanism.

TODO

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Signed-off-by: E.S. Rosenberg a.k.a. Keeper of the Keys <es-github@rosenberg.org.il>
@Keeper-of-the-Keys Keeper-of-the-Keys requested a review from a team as a code owner April 5, 2026 21:53
@Keeper-of-the-Keys Keeper-of-the-Keys requested review from ArtificialOwl, artonge, leftybournes and salmart-dev and removed request for a team April 5, 2026 21:53
@Keeper-of-the-Keys
Copy link
Copy Markdown
Contributor Author

Tagging: @provokateurin @miaulalala

Copy link
Copy Markdown
Contributor

@come-nc come-nc left a comment

Choose a reason for hiding this comment

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

Please use a constant in the test instead of copy/pasting the comment multiple times.

Ideally, you can even have the comment in a public const in Config and use it in the test, so that if we change it later the test does not need to be changed.

@Keeper-of-the-Keys
Copy link
Copy Markdown
Contributor Author

@come-nc thanks for the feedback!
I am so far only familiar with the few small areas of the NC code I touched, is there a preferred location/file that consts should be defined at?

@Keeper-of-the-Keys
Copy link
Copy Markdown
Contributor Author

Or should it just be part of the Class?

@come-nc
Copy link
Copy Markdown
Contributor

come-nc commented Apr 7, 2026

A public const in Config class is enough I think

Signed-off-by: E.S. Rosenberg a.k.a. Keeper of the Keys <es-github@rosenberg.org.il>
@come-nc come-nc merged commit 3f6d0c4 into nextcloud:master Apr 7, 2026
180 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

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.

[Bug]: Upgrade process re-renders config.php in a less readable/useable fashion

4 participants