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

Duplicate Method Names #19

Open
GenieTim opened this issue Mar 4, 2021 · 1 comment
Open

Duplicate Method Names #19

GenieTim opened this issue Mar 4, 2021 · 1 comment

Comments

@GenieTim
Copy link

GenieTim commented Mar 4, 2021

Thank you very much for this awesome tool. I encountered an (admittedly, rather odd) edge-case for which I would open a PR if you consider it worth it (and tell me what your desired resolution is).

The problem is the following:

Duplicate methods are generated for an API with two fields in two different "cases".

Example: an API that has a field timeZone and a field time_zone (of which one might be deprecated) (this applies e.g. to Pipefy: https://api-docs.pipefy.com/reference/objects/User/) will result in two times the function

public function selectTimeZone()

, one time selecting timeZone and one time time_zone.

PHP does not like that of course.
I can imagine various resultions: If there are multiple,

  1. just discard the deprecated one,
  2. use the case as used in the API (i.e. resulting in one selectTimeZone() and one selectTime_zone(),
  3. select both at once

Shall I open a PR with which of these possibilities? (Any hints on where to look for the deciding code?)

@GenieTim
Copy link
Author

GenieTim commented Mar 4, 2021

This particular API also includes fields with the name field (e.g. here: https://api-docs.pipefy.com/reference/objects/CardField/) which leads to SomeChileQueryObject::selectField( overriding AbstractQueryBuilder::selectField(

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

No branches or pull requests

1 participant