Skip to content

[PHP] fix php codegen ordering issue with CodegenSecurity#5001

Merged
macjohnny merged 1 commit intoOpenAPITools:masterfrom
CiscoM31:phpsymfonyfix
Jan 15, 2020
Merged

[PHP] fix php codegen ordering issue with CodegenSecurity#5001
macjohnny merged 1 commit intoOpenAPITools:masterfrom
CiscoM31:phpsymfonyfix

Conversation

@sebastien-rosset
Copy link
Contributor

@sebastien-rosset sebastien-rosset commented Jan 15, 2020

Fix transient build issues with PHP symfony. The generated list of authMethods in codegen is not sorted because it is in a HashSet, hence the output is not deterministic. This means the generated code may potentially change when the code is executed or when the hash code changes.

I think codegen should return collections in a deterministic order, such that when generating samples (in the bin directory), it does not keep swapping generated code around.

PR checklist

  • Read the contribution guidelines.
  • If contributing template-only or documentation-only changes which will change sample output, build the project before.
  • Run the shell script(s) under ./bin/ (or Windows batch scripts under.\bin\windows) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run ./bin/{LANG}-petstore.sh, ./bin/openapi3/{LANG}-petstore.sh if updating the code or mustache templates for a language ({LANG}) (e.g. php, ruby, python, etc).
  • File the PR against the correct branch: master, 4.3.x, 5.0.x. Default: master.
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

@macjohnny
Copy link
Member

@sebastien-rosset thanks for the PR!

@macjohnny macjohnny added this to the 4.2.3 milestone Jan 15, 2020
@macjohnny macjohnny merged commit fe8775a into OpenAPITools:master Jan 15, 2020
@sebastien-rosset
Copy link
Contributor Author

Thanks for merging quickly!

@sebastien-rosset sebastien-rosset deleted the phpsymfonyfix branch May 23, 2020 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants