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

Require PHP 5.6+, Upgrade PHPUnit #255

Merged
merged 3 commits into from
Jan 7, 2019
Merged

Conversation

Krinkle
Copy link
Contributor

@Krinkle Krinkle commented Jan 5, 2019

  • Require php 5.6+.
  • Add testing upto php 7.2.
  • Upgrade phpunit.
  • Fix some warnings in test output and prefer newer php for coverage.

@Krinkle Krinkle force-pushed the tests branch 3 times, most recently from 4e4b763 to 694b392 Compare January 5, 2019 05:56
The use of namespaces (new in PHPUnit 6) was backported to
PHPUnit 5, so we can use both PHPUnit 5 (PHP 5.6-7.1) and
PHPUnit 6 (PHP 7-7.2) on the same test suites.

PHP 5.5 went EOL in 2016,
<https://php.net/eol>,
<https://php.net/supported-versions>.
And PHPUnit 4 went EOL in 2017,
<https://phpunit.de/supported-versions.html>.

PHP 5.6 got an extra year of extended support, but also went EOL
as of December 31. However, I'd like to move to PHP 7+ in a
separate commit for the time being, but we could do both in the
same release.

The impact would be that those using LTS releases and Debian Linux,
that are on Debian 8 Jessie (still supported), which comes with
php 5.6, couldn't upgrade to latest master until they upgrade to
Debian 9 Stretch (php7.0), or use backports.

Ubunto 16 Xenial comes with php7.0, and Ubuntu 18 Bionic, php7.2.
* Use the 'install' command in .travis.yml to make the build
  a little bit easier to understand if familiar with other projects
  using Travis CI. Would also avoid potential problems in the future
  if lang:php on Travis does have a default 'install' command,
  right now it does not have a default.

* Fix a warning emitted by the install.sh composer command:
  > You are using the deprecated option "dev".
  > Dev packages are installed by default now.

* Fix a warning emitted by each php command due to pecl having
  loaded mongodb.so already, via /etc/php/conf.d:
  > PHP Warning:  Module 'mongodb' already loaded in Unknown on line 0

* Enable stricter mode for bash.

* The bash files have a hash bang and executable bit, but were
  run as sourced files to the bash command in .travis.yml.
  Fixed by executing the files as a command instead.

* Re-order the tests so that newer php runs first, which provides
  faster feedback.

* Run coverage on php7.2.
These two sniffs are consistently violated in most files, but
due to stickler only looking at files modified in the current
commit, it sometimes passes. To avoid those, disable those two
rules for now.
@markstory markstory merged commit ec97dd8 into perftools:master Jan 7, 2019
@Krinkle Krinkle deleted the tests branch January 7, 2019 02:08
@glensc glensc mentioned this pull request Jun 19, 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.

None yet

2 participants