-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Rewrite the PHP Laravel generator #20526
Rewrite the PHP Laravel generator #20526
Conversation
we can leave that as a day 2 requirement instead (if there's a demand to better handle it) |
suggestion: add the sample folder to https://github.com/OpenAPITools/openapi-generator/blob/master/.github/workflows/samples-php8.yaml so that it will be tested by CI moving forward. |
Thanks for the PR but your commit (as shown in the Commits tab) is not linked to your Github account, which means this PR won't count as your contribution in https://github.com/OpenAPITools/openapi-generator/graphs/contributors. Let me know if you need help fixing it. |
…by sample generation
…s it only contained old laravel
9431ca3
to
9714d8f
Compare
I think it's ready for a proper review! There's still a few limitations that I would like to tackle but that can wait till it's been merged. |
thanks. triggered the workflow but got some errors. can you please review those when you've time? |
I'm not sure on how to fix the failed test on CircleCI, would you mind taking a quick look? @wing328 |
for the circleci issue, please ignore it for the time being |
looks like a new file has not been committed. please have a look when you've time |
Sorry about the pipelines, hopefully it's all good now. |
Do you have time to look at it today? @wing328 |
please add the missing file when you've time |
I'm not sure how the 'Samples up-to-date' keeps failing. I'm very careful to run the 3 commands listed in the pull request template before each push. |
ok. i will take a look later today |
all tests passed. let's give it a try thanks for rewriting the generator |
Happy to help! |
This PR is currently a WIP, in order to get feedback on it. I can already see some issues in the sample generated code 😅 .
This PR completely rewrites the current Laravel generator to move away from the current stub paradigm to an interface paradigm. I've drawn inspiration from the PHP Symfony generator and the Rust Server generator.
As I've removed all the files belonging to the old generator, the diff is quite big and intertwined. It's easiest to look at the diff for this specific commit.
I incorporate the following components
Current shortcomings
Beside these specific shortcoming I'm interested in hearing general suggestions on how to better structure my code or approach certain issues. However, this is my first time contributing to any open source project; go easy on me! 😅
PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*
.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
master
(upcoming7.x.0
minor release - breaking changes with fallbacks),8.0.x
(breaking changes without fallbacks)I wouldn't say these are breaking changes as the current generator generates a server stub which you would not generate twice. The changes are however a big change in the usage of the generator so this might still belong in the next major version.
@jebentier (2017/07), @dkarlovi (2017/07), @mandrean (2017/08), @jfastnacht (2017/09), @ybelenko (2018/07), @renepardon (2018/12)