-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[PHP] Fix parentSchema conditional causing parent call when parent isn't present #8705
Conversation
we cannot call `parent::` if parent isn't present. Everywhere else in the schema we're checking for `{{parentSchema}}` but here we're checking for `{{parent}}` which is causing errors when parent is not present
Can you please run the following the update the samples?
|
@wing328 done (I think), I don't get any updates when I run the commands you suggested. So I did the change manually. |
@wing328 apologize for bumping this, but is there anything else that needs to be done here? Or is it pending review from php committee? |
@sserbin @ganymedes01 do you mind sharing a spec (minimal) to repeat the issue (without this fix)? |
@wing328 the following spec: openapi: 3.0.0
servers:
components:
schemas:
Foo:
type: object
additionalProperties: true
properties:
id:
type: integer
format: int64
nullable: false produces this I think it's the In php 8 this procudes a fatal error: https://3v4l.org/nsQL3 |
Travis CI failure not related to this PR. Tested this PR locally and the result is good. Thanks for the fix. |
we cannot call
parent::
if parent isn't present. Everywhere else in the schema we're checking for{{parentSchema}}
but here we're checking for{{parent}}
which is causing errors when parent is not present@jebentier (2017/07), @dkarlovi (2017/07), @mandrean (2017/08), @jfastnacht (2017/09), @ackintosh (2017/09) ❤️, @ybelenko (2018/07), @renepardon (2018/12)
PR checklist
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*
.For Windows users, please run the script in Git BASH.
master
,5.1.x
,6.0.x