Skip to content

Update dependencies to support PHP 7.4#56

Merged
itafroma merged 18 commits intoacquia:masterfrom
itafroma:php-74-support
Sep 30, 2020
Merged

Update dependencies to support PHP 7.4#56
itafroma merged 18 commits intoacquia:masterfrom
itafroma:php-74-support

Conversation

@itafroma
Copy link
Copy Markdown
Contributor

Provides support for PHP 7.4 by updating development dependencies and expanding support for Symfony 5.

To support PHP 7.4, we've had to make the following backwards-incompatible changes:

  • PHPUnit 8 is the earliest version to support PHP 7.4, and it only supports PHP 7.2
  • The method signatures have changed for Symfony support to ensure it works with Symfony 3.0 to 5.0

Because of this, the next release after merging this PR will be 5.0.0 and will only support PHP 7.2 and later.

To ensure continued compatibility, I've also adjusted the Travis configuration file to test all permutations of the dependencies we support.

@itafroma itafroma self-assigned this Sep 27, 2020
@itafroma
Copy link
Copy Markdown
Contributor Author

itafroma commented Sep 27, 2020

Addressed some issues after running on Travis:

  • Travis only supports 200 jobs per build, so I pruned the build matrix to only support the latest minor version of each major version line
  • There is no constraint configuration that will allow PHPUnit 8, Symfony 5, phploc, and phpcpd to install. phploc and phpcpd are obviated by more modern static analysis tools, so I've removed them. We'll consider adding phpstan before releasing 5.0.0.
  • DiactorosFactory was deprecated in symfony/psr-http-message-bridge 1.2 and isn't available in 2.0, so refactored to use PsrHttpMessageBridge

@itafroma
Copy link
Copy Markdown
Contributor Author

Symfony's PSR7 Message Bridge dropped support for its Diactoros-specific message factory in 1.3, making it impossible to support the following configuration:

Diactoros < 2.0
PSR7 Bridge >= 1.3

Symfony recommends using Nyholm's PSR7 library instead: we were only using Diactoros for its message factories, so replaced it with Nyholm. This also vastly reduces the number of dependency configurations we need to test.

@itafroma
Copy link
Copy Markdown
Contributor Author

All build errors fixed and we finally have a green board: this is ready for review.

Copy link
Copy Markdown

@roseofgold roseofgold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just one code style question.

Comment thread src/Symfony/HmacResponseListener.php
Comment thread .gitignore
Comment thread Makefile Outdated
Comment thread Makefile
@itafroma itafroma merged commit 8e4c06d into acquia:master Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants