Skip to content
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-symfony] Set required PHP version ^7.1.3 #6181

Merged
merged 11 commits into from
May 29, 2020

Conversation

ybelenko
Copy link
Contributor

@ybelenko ybelenko commented May 5, 2020

Changes:

  • Minimal PHP version set to ^7.3.1
  • symfony/framework-bundle version bumped to ^4.4.8
  • phpunit version bumped to ^7.0
  • php-cs-fixer version bumped to ^2.16.3
  • php_codesniffer has been removed
  • php-coveralls has been removed
  • Updated Travis CI config
  • Added Basic Coveralls config
  • composer.lock excluded from version control

Build has been tested under PHP 7.2.21(local machine) and PHP 7.1.3({"config": {"platform": {"php": "7.1.3"}}}).

Related issue about end of PHP 5.x #1246
Fixes #6081, fixes #6082

cc @jebentier @dkarlovi @mandrean @jfastnacht @ackintosh @renepardon
cc @reznikartem as last Symfony contributor

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.

@FlaverSaver
Copy link

I think we should take this chance and drop support for the outdated PHP 5 version.
It would also be great if we could support Symfony 5 in addition to Symfony 4. At first look, the main work is to upgrade the jms/serializer package from version 1 to version 3. To do this, the class StrictJsonDeserializationVisitor has to be adapted. See: https://github.com/schmittjoh/serializer/blob/master/UPGRADING.md#from-1x-to-300

@wing328 wing328 added this to the 5.0.0 milestone May 8, 2020
ybelenko added 11 commits May 8, 2020 09:29
I've tried to specify ^7.0 version at first, but main package which is
symfony/framework-bundle@v4.4.8 requires PHP ^7.1.3.
Current Symfony Framework stable version is v5.0.8, but I guess it
requires significant codebase upgrade, so I've sticked with 4.4.8 which
shouldn't cause any breaking changes. Old requirement was ^3.3|^4.1
which compatible with 4.4.8.
PHPUnit 8.x version required PHP ^7.2, so I'm setting 7.x version to
support PHP 7.1.
There is new way to specify Kernel class, related PR:
symfony/symfony#22668
Configuration and all renamed rules fixed.
Config file renamed to .php_cs.dist as recommended in migration guide.
Migration guide from 1.x to 2.x:
https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/master/UPGRADE.md#config-file
Second linter doesn't make sense. I think Symfony user would prefer
PHP CS Fixer over PHP_CodeSniffer because first one maintained by Symfony
members.
This package is abandoned and Coveralls recommends to install it directly
in Travis-CI task script.
I've changed test versions to PHP 7.1.3 and 7.2. PHPUnit generates
coverage report in report/logs/clover.xml file. Then PHP CS Fixer runs
with --dry-run option to not override anything just to show coding style
errors.
This is basic recommended config for a PHP based project.
This package was part of satooshi/php-coveralls, now it should be
defined as dev dependency.
I think committed composer.lock can cause CI errors while tests on fresh
installs are better.
@wing328 wing328 merged commit 83bad10 into OpenAPITools:master May 29, 2020
@ybelenko ybelenko deleted the 6081_symfony_migration branch May 29, 2020 10:44
jimschubert added a commit to jimschubert/openapi-generator that referenced this pull request May 30, 2020
* master:
  [PS] Refactor the http signing auth with ecdsa support (OpenAPITools#6397)
  [Rust Server] Hyper 0.13 + Async/Await support (OpenAPITools#6244)
  [Rust] set supportAsync to true as the default (OpenAPITools#6480)
  [php-symfony] Set required PHP version ^7.1.3 (OpenAPITools#6181)
  update doc
  [csharp] Rename netstandard to netstandard1.3 (OpenAPITools#6460)
  feat: support deprecated parameters for typescript-axios generator (OpenAPITools#6475)
  [REQ][typescript-axios] useSingleRequestParameter should mark parameter optional if all properties are optional (OpenAPITools#6477)
  better struct alias in rust (OpenAPITools#6470)
  Migrate Go server samples to OAS 3 only (OpenAPITools#6471)
  [Rust][reqwest] add async support (OpenAPITools#6464)
  [codegen][python-experimental] Composed schema with additionalProperties  (OpenAPITools#6290)
  [Java] Decommission Retrofit 1.x support (OpenAPITools#6447)
  remove scala oas3 samples (OpenAPITools#6446)
  [Java][jersey2] Fix RuntimeException when HTTP signature parameters are not configured (OpenAPITools#6457)
  [Java][jersey2] Improve http signature code comments (OpenAPITools#6463)
  [typescript-angular] drop support of angular below 6.0.0 (OpenAPITools#6360)
  [cli] new 'author template' command (OpenAPITools#6441)
  python-experimental updates ancestor + adds descendant discriminator tests (OpenAPITools#6417)
jimschubert added a commit that referenced this pull request May 30, 2020
* master: (36 commits)
  Improve handling spaces in example command (#6482)
  fix maven plugin snapshot version
  comment out erlang server test (#6499)
  Migrate Perl samples to use OAS v3 spec (#6490)
  [core] Refactor templating management (#6357)
  migrate apex samples to use oas3 spec (#6488)
  add new file in php-symfony sample
  [PS] Refactor the http signing auth with ecdsa support (#6397)
  [Rust Server] Hyper 0.13 + Async/Await support (#6244)
  [Rust] set supportAsync to true as the default (#6480)
  [php-symfony] Set required PHP version ^7.1.3 (#6181)
  update doc
  [csharp] Rename netstandard to netstandard1.3 (#6460)
  feat: support deprecated parameters for typescript-axios generator (#6475)
  [REQ][typescript-axios] useSingleRequestParameter should mark parameter optional if all properties are optional (#6477)
  better struct alias in rust (#6470)
  Migrate Go server samples to OAS 3 only (#6471)
  [Rust][reqwest] add async support (#6464)
  [codegen][python-experimental] Composed schema with additionalProperties  (#6290)
  [Java] Decommission Retrofit 1.x support (#6447)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants