-
-
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][php-ze-ph] Support for PHP 7.1+, Zend Expressive 3.2 and PathHander 0.4 #1902
Conversation
👍 Thanks for opening this issue! The team will review the labels and make any necessary changes. |
CircleCI says that there are uncomitted files in: |
It seems to me as breaking change without fallback (PHP 7.1 and newer required) correct me if I'm wrong. Could you write any upgrade note for users? If it's already exists in generated README just copy it to current discussion. |
Oops, sorry - forgot to delete samples folder before regenerating, so obsolete generated files were kept and new files were not added :[ Should be fixed now.
Yes, that is correct. Updated generator creates server stub based on Zend Expressive 3.2 and PathHandler 0.4 . They both require PHP 7.1+ and are backward incompatible with their previous versions Zend Expressive 2.* and PathHandler 0.3 that were supported by |
Sorry, for long delay. Tried to test locally. I had to install $ composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- zendframework/zend-httphandlerrunner 1.0.1 requires psr/http-message-implementation ^1.0 -> no matching package found.
- articus/path-handler 0.4 requires zendframework/zend-expressive ^3.2 -> satisfiable by zendframework/zend-expressive[3.2.0, 3.2.1].
- zendframework/zend-expressive 3.2.0 requires zendframework/zend-httphandlerrunner ^1.0.1 -> satisfiable by zendframework/zend-httphandlerrunner[1.0.1].
- zendframework/zend-expressive 3.2.1 requires zendframework/zend-httphandlerrunner ^1.0.1 -> satisfiable by zendframework/zend-httphandlerrunner[1.0.1].
- Installation request for articus/path-handler ^0.4 -> satisfiable by articus/path-handler[0.4]. My config: Please, update |
- overwriting "*/*" media type for producers with "n/a" (PathHandler does not support that cause it makes no sense to return response with "Content-Type: */*") - "array" return type declaration for handler methods with ambiguous "container" return type - better way to generate attribute annotation stub for request body data with ambiguous "container" type - fixed missing dependency in composer.json - minor optimization for container.php - samples for OAS3 petstore spec
- note about ext-yaml in stub README - updated .gitignore
No problem, thanks for thorough review! Rushing with PR on Sunday evening was a terrible idea - made really silly and embarrassing mistakes :[ |
I've checked build locally and everything looks fine. All tested endpoints responded with Small notice, I'm embarrased, but I didn't know that |
.../main/java/org/openapitools/codegen/languages/PhpZendExpressivePathHandlerServerCodegen.java
Outdated
Show resolved
Hide resolved
I believe current variant |
- logging '*/*' replacement as warning
@Articus I'm not asking you to change host, just describe it in the readme how user can reach API. I thought that build is broken when I cannot reach |
Sorry, but I do believe that current information in README:
is enough for any PHP developer capable of making complete application from stub because the way you access API at this point entirely depends on your development environment and your programming habits. |
@Articus I've spend about 30-minutes to figured out why |
Tweet to promote the change: https://twitter.com/oas_generator/status/1090516974549909504 |
…nder 0.4 (OpenAPITools#1902) * - support for PHP 7.1, Zend Expressive 3.2 and PathHander 0.4 for php-ze-ph generator * - fixed mess with petstore samples (added new files, removed obsolete files) * php-ze-ph: - overwriting "*/*" media type for producers with "n/a" (PathHandler does not support that cause it makes no sense to return response with "Content-Type: */*") - "array" return type declaration for handler methods with ambiguous "container" return type - better way to generate attribute annotation stub for request body data with ambiguous "container" type - fixed missing dependency in composer.json - minor optimization for container.php - samples for OAS3 petstore spec * php-ze-ph: - note about ext-yaml in stub README - updated .gitignore * php-ze-ph: - logging '*/*' replacement as warning
PR checklist
./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\
.master
,. Default:3.4.x
,4.0.x
master
.@jebentier, @dkarlovi , @mandrean , @jfastnacht , @ackintosh , @ybelenko , @renepardon
Description of the PR
Update for
php-ze-ph
server generator - switch to PHP 7.1 for #1246 and corresponding dependency update.And I also believe that current generated README.md for
php-ze-ph
complies with suggestions here.