You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously some class were required to be named with a suffix to avoid conflicting with some reserved keywords.
For examples these classes use different naming than others:
Elastica\Query\BoolQuery instead of Elastica\Query\Bool previously
Elastica\Query\MatchQuery instead of Elastica\Query\Match previously
I think it would be nice to standardise the suffix strategy by suffixing all classes from Aggregation, Query and Processor namespaces. It could be done in a BC manner by creating a new class with the suffix part and making the previous class extends from it (which would trigger a deprecation too to help fixing it).
Regarding _getBaseName()method each base abstract class like Elastica\Aggregration\AbstractAggregation, Elastica\Query\AbstractQuery, Elastica\Processor\AbstractProcessor could take care of removing the suffix by overriding the method.
What do you think?
The text was updated successfully, but these errors were encountered:
I'm not a big fan of having the directory name repeated also in the class name itself. My hope initially was that this would be the exception, but it seems we have more and more use cases around it.
Is there any specific issue that triggered this or more generally to unify things?
Previously some class were required to be named with a suffix to avoid conflicting with some reserved keywords.
For examples these classes use different naming than others:
Elastica\Query\BoolQuery
instead ofElastica\Query\Bool
previouslyElastica\Query\MatchQuery
instead ofElastica\Query\Match
previouslyElastica\Aggregation\GlobalAggregation
Elastica\Aggregation\ParentAggregation
Elastica\Processor\ForeachProcessor
in PR Add foreach processor #1813I think it would be nice to standardise the suffix strategy by suffixing all classes from
Aggregation
,Query
andProcessor
namespaces. It could be done in a BC manner by creating a new class with the suffix part and making the previous class extends from it (which would trigger a deprecation too to help fixing it).Regarding
_getBaseName()
method each base abstract class likeElastica\Aggregration\AbstractAggregation
,Elastica\Query\AbstractQuery
,Elastica\Processor\AbstractProcessor
could take care of removing the suffix by overriding the method.What do you think?
The text was updated successfully, but these errors were encountered: