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

Rename SS_List to ListInterface #11396

Open
2 tasks
emteknetnz opened this issue Sep 23, 2024 · 0 comments
Open
2 tasks

Rename SS_List to ListInterface #11396

emteknetnz opened this issue Sep 23, 2024 · 0 comments

Comments

@emteknetnz
Copy link
Member

emteknetnz commented Sep 23, 2024

SS_List is the sole archaically named class/interface from Silverstripe 3 when there were 42 classes and 4 interfaces prefixed with SS_. I think the rational behind the prefix was there we no namespaces back in those days and using an underscore was a way to make quasi namespaces.

I'm not sure why this particular interface wasn't renamed to get rid of the SS_ prefix, possibly because of a risk of a collision with a potential php reserved List class or the list() function, or maybe because it was simply missed

I think we should simply rename it to ListInterface to avoid any potential collision. Suffixing with Interface isn't ideal though it's also not completely out of line with Silverstripe naming:

Doing a quick search is sink in vendor/silverstripe/**/*.php

^interface .*Interface = 46 matches
^interface = 171 results

While we're doing also rename any SSList* classes to remove the SS prefix, e.g. SSListExporter to simply ListExporter:

Related issues

Acceptance criteria

  • SS_List is renamed to ListInterface
  • SSList* classes are renamed to remove the SS prefix
@emteknetnz emteknetnz changed the title Rename SS_List Rename SS_List to ListInterface Sep 23, 2024
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

1 participant