Skip to content

Conversation

@simonhammes
Copy link
Contributor

@simonhammes simonhammes commented Jul 25, 2025

This fixes #21485 by backporting #21458 to the php generator.

I ran the integration tests inside samples/client/petstore/php/OpenAPIClient-php and manually verified the fix.

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package || exit
    ./bin/generate-samples.sh ./bin/configs/*.yaml || exit
    ./bin/utils/export_docs_generators.sh || exit
    
    (For Windows users, please run the script in WSL)
    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.
  • File the PR against the correct branch: master (upcoming 7.x.0 minor release - breaking changes with fallbacks), 8.0.x (breaking changes without fallbacks)
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

OpenAPI\Client\FakeHttpClient::setResponse(): Implicitly marking parameter $response as nullable is deprecated, the explicit nullable type must be used instead
@wing328
Copy link
Member

wing328 commented Jul 28, 2025

thanks for backporting the fix

@wing328 wing328 merged commit d69714f into OpenAPITools:master Jul 28, 2025
15 checks passed
@wing328 wing328 added this to the 7.15.0 milestone Jul 28, 2025
@simonhammes simonhammes deleted the 21485-php-fix-file-uploads branch July 28, 2025 20:53
Goopher pushed a commit to Goopher/openapi-generator that referenced this pull request Sep 9, 2025
…s#21632)

* [php] Backport OpenAPITools#21458 to php client

Fixes OpenAPITools#21485

Credits to @jozefbriss

* [php] Fix deprecation warning when running integration tests

OpenAPI\Client\FakeHttpClient::setResponse(): Implicitly marking parameter $response as nullable is deprecated, the explicit nullable type must be used instead

---------

Co-authored-by: simonhammes <[email protected]>
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.

[BUG][php] PHP api client is not working for file uploads

2 participants