Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move php extension config to yml #185

Closed
emteknetnz opened this issue Jan 18, 2024 · 3 comments
Closed

Move php extension config to yml #185

emteknetnz opened this issue Jan 18, 2024 · 3 comments

Comments

@emteknetnz
Copy link
Member

While peer reviewing silverstripe/silverstripe-framework#11066 I noticed that the vast majority of extension config is in yml, will a small amount in php using private static $extensions.

It would be preferable to if ALL extension config was in a single place rather than two possible places. This make it easier to search for extensions e.g. filter by yml files in vscode

We should standarise putting it all in yml because:

  • The vast majority of it is already there
  • We'll never be able to use PHP only, because many extensions are in optional modules which can only be added via yml i.e. the class having the extension added to it isn't aware of the optional module.
@GuySartorelli
Copy link
Member

I disagree with this.

I think that extension config that is inherently necessary for a class to function as expected should be in the class itself.
e.g. SiteTree is always expected to be versioned, so we have the versioned extension declared in the class directly.

This implies those extensions should never be removed - whereas extensions added via yaml should be allowed to be removed without negative impacts.

@madmatt
Copy link
Member

madmatt commented Jan 19, 2024

Do we need to document this pseudo-rule somewhere so it becomes more standard? I think I tend to agree with you Guy but it only makes sense if it's accurate.

@emteknetnz
Copy link
Member Author

I've spun up a new issue #186 - I've put it into our internal backlog so at some point we'll decide if we want to do this.

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

No branches or pull requests

3 participants