swagger-codegen icon indicating copy to clipboard operation
swagger-codegen copied to clipboard

[PHP] Support \DateTimeImmutable

Open deguif opened this issue 6 years ago • 5 comments

PR checklist

  • [x] Read the contribution guidelines.
  • [x] Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • [x] Filed the PR against the correct branch: 3.0.0 branch for changes related to OpenAPI spec 3.0. Default: master.
  • [x] Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

Support \DateTimeImmutable

Ping @dkarlovi @mandrean

deguif avatar May 27 '19 18:05 deguif

I found this issue open a few time ago: https://github.com/swagger-api/swagger-codegen/issues/6534

deguif avatar May 27 '19 18:05 deguif

Ok, I'm going to adapt the code, as the date constants are only accessible on DateTimeInterface since PHP 7.2, my mistake.

deguif avatar May 27 '19 18:05 deguif

@dkarlovi or @mandrean do you think I can target 3.0 branch with this change?

deguif avatar May 28 '19 07:05 deguif

Hi, any update for this PR?? 👍

77web avatar Jul 22 '19 00:07 77web

Hi everyone, any news about this PR ?

AdrienWac avatar Feb 01 '24 21:02 AdrienWac