We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Description Singularized form of adder/remover method name for collections is hardcoded to the first item from the list returned by EnglishInflector:
schema-generator/src/Model/Class_.php
Line 335 in ed297c7
If transformation is ambiguous inflector return list of proposition, and in some cases first one it not we want to, for example:
$ php -r 'require "vendor/autoload.php"; echo (new Symfony\Component\String\Inflector\EnglishInflector())->singularize("languages")[0].PHP_EOL;' languag
How to reproduce
types: Book: properties: languages: cardinality: "(1..*)" range: Language
gives:
class Book (...) function addLanguag(Language $languag) (...)
Possible Solution
The text was updated successfully, but these errors were encountered:
The generator is using an interface:
schema-generator/src/TypesGenerator.php
Line 87 in ed297c7
However having an additional config parameter could be a good idea.
Sorry, something went wrong.
No branches or pull requests
Description
Singularized form of adder/remover method name for collections is hardcoded to the first item from the list returned by EnglishInflector:
schema-generator/src/Model/Class_.php
Line 335 in ed297c7
If transformation is ambiguous inflector return list of proposition, and in some cases first one it not we want to, for example:
$ php -r 'require "vendor/autoload.php"; echo (new Symfony\Component\String\Inflector\EnglishInflector())->singularize("languages")[0].PHP_EOL;' languag
How to reproduce
gives:
Possible Solution
The text was updated successfully, but these errors were encountered: