-
Notifications
You must be signed in to change notification settings - Fork 49
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
Proposal to rename StopwordArray class to StopwordsArray #40
Comments
In my opinion you can just rename In addition, you can mark And, I would recommend moving these three classes and the abstract class into a different folder ( |
I personally did not really want to introduce breaking changes to the API. The reason is that I actually want to be able to keep updating the v1 branch with additional languages as they are introduced and it is going to cause issues in the documentation. That being said, I'm not 100% decided yet, give me a day or so to finalise my decision. See my thoughts at the end...
If we rename
I agree with this, good idea but it is again going to cause backwards compatibility issues. I need to make a decision whether to make breaking changes now or later. Let me quickly explain what my thoughts are:
My plight is for people who are stuck with a particular PHP version as I am myself in the same situation having to maintain old PHP software on old servers which I have no control over. |
I've finalised my decision on this and have decided we should go ahead with making the breaking change by renaming StopwordArray to StopwordsArray. This also includes moving the Stopwords*.php and AbstractStopwordProvider.php files into a sub folder but I will create a new issue for it. |
Yeah, almost done 👍 |
A question was asked by @kudashevs asking why the
StopwordArray
provider class is in singular form, where the rest of the Stopword classes are all plural, e.g.StopwordsPatternFile
andStopwordsPHP
.This was simply a poor decision on my side back when I initially created the library. This is the proposed solutions to make it consistent:
StopwordArray
and call itStopwordsArray
, thereby creating an alias for it. The advantage of this is that if a user already usesStopwordArray
there will be no impact as only one class will still be loaded.StopwordArray
array class toStopwordsArray
, then create a new "alias" class calledStopwordArray
that extendsStopwordsArray
and that will simply act as a backwards compatibility implementation.The documentation will be changed to specifically use
StopwordsArray
instead ofStopwordArray
. I'm personally leaning towards option 2.The text was updated successfully, but these errors were encountered: