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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set PHP 7.2 as minimum version, upgrade to PHPUnit 8.5 and GuzzleHttp 7.7 #1903

Merged
merged 21 commits into from Aug 18, 2023

Commits on Aug 14, 2023

  1. Update minimum PHP version to 7.2.5

    Fixes #27840
    dregad committed Aug 14, 2023
    Copy the full SHA
    9e2eebf View commit details
    Browse the repository at this point in the history
  2. Remove PHP 7.0 and 7.1 from Travis

    Issue #27840
    atrol authored and dregad committed Aug 14, 2023
    Copy the full SHA
    379b176 View commit details
    Browse the repository at this point in the history
  3. Remove PHP 5.6 from Travis

    Issue #27840
    atrol authored and dregad committed Aug 14, 2023
    Copy the full SHA
    555f52a View commit details
    Browse the repository at this point in the history
  4. Update PHPUnit minimum version to 8.5

    With PHPUnit 8.5, which supports PHP >= 7.2, we no longer need the
    temporary changes from issue #29882 to provide PHP 8.1 compatibility.
    
    This reverts commit f82c03b by removing
    the dependencies on custom forks of PHPUnit and required libraries.
    
    Fixes #32810
    dregad committed Aug 14, 2023
    Copy the full SHA
    4452595 View commit details
    Browse the repository at this point in the history
  5. Composer update

      - Removing phpdocumentor/reflection-common (1.0.1)
      - Removing phpdocumentor/reflection-docblock (4.3.4)
      - Removing phpdocumentor/type-resolver (0.5.1)
      - Removing phpspec/prophecy (v1.10.3)
      - Removing phpunit/phpunit-mock-objects (5.0.10)
      - Removing symfony/polyfill-ctype (v1.19.0)
      - Removing webmozart/assert (1.9.1)
      - Upgrading doctrine/instantiator (1.0.5 => 1.5.0)
      - Upgrading myclabs/deep-copy (1.7.0 => 1.11.1)
      - Upgrading phar-io/manifest (1.0.1 => 2.0.3)
      - Upgrading phar-io/version (1.0.1 => 3.2.1)
      - Upgrading phpunit/php-code-coverage (dev-mantis-5.3 7642884 => 7.0.15)
      - Upgrading phpunit/php-file-iterator (dev-mantis-1.4 89be108 => 2.0.5)
      - Upgrading phpunit/php-timer (1.0.9 => 2.1.3)
      - Upgrading phpunit/php-token-stream (2.0.2 => 3.1.3)
      - Upgrading phpunit/phpunit (dev-mantis-6.5 215feef => 8.5.33)
      - Upgrading sebastian/comparator (2.1.3 => 3.0.5)
      - Upgrading sebastian/diff (2.0.1 => 3.0.4)
      - Upgrading sebastian/environment (3.1.0 => 4.2.4)
      - Upgrading sebastian/exporter (3.1.4 => 3.1.5)
      - Upgrading sebastian/global-state (2.0.0 => 3.0.3)
      - Upgrading sebastian/resource-operations (1.0.0 => 2.0.2)
      - Locking sebastian/type (1.1.4)
      - Upgrading theseer/tokenizer (1.1.3 => 1.2.1)
    dregad committed Aug 14, 2023
    Copy the full SHA
    aabd6fe View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    0931227 View commit details
    Browse the repository at this point in the history
  7. Fix deprecated assertInternalType()

    Replace with assertThat() and isType() constraint.
    dregad committed Aug 14, 2023
    Copy the full SHA
    4dc7db6 View commit details
    Browse the repository at this point in the history
  8. Fix deprecated @ExpectedException annotation

    Replace with $this->expectException()
    dregad committed Aug 14, 2023
    Copy the full SHA
    0ff93e5 View commit details
    Browse the repository at this point in the history
  9. Fix deprecated assertContains() with String haystack

    Replace with assertStringContainsString()
    dregad committed Aug 14, 2023
    Copy the full SHA
    d3203e0 View commit details
    Browse the repository at this point in the history
  10. Fix deprecated expectExceptionMessageRegExp()

    Replace with expectExceptionMessageMatches()
    dregad committed Aug 14, 2023
    Copy the full SHA
    2b2121d View commit details
    Browse the repository at this point in the history
  11. Copy the full SHA
    86202f0 View commit details
    Browse the repository at this point in the history
  12. Whitespace

    dregad committed Aug 14, 2023
    Copy the full SHA
    f706c1e View commit details
    Browse the repository at this point in the history
  13. Make RestBase an abstract class

    Prevents PHPUnit from throwing a warning:
    No tests found in class "RestBase".
    dregad committed Aug 14, 2023
    Copy the full SHA
    7ee3ddd View commit details
    Browse the repository at this point in the history
  14. Updating GuzzleHttp minimum version to 7.5

    Fixes #32807
    dregad committed Aug 14, 2023
    Copy the full SHA
    73fd23d View commit details
    Browse the repository at this point in the history
  15. Composer update

      - Removing symfony/polyfill-php72 (v1.19.0)
      - Removing symfony/polyfill-php70 (v1.19.0)
      - Removing symfony/polyfill-intl-normalizer (v1.19.0)
      - Removing symfony/polyfill-intl-idn (v1.19.0)
      - Removing paragonie/random_compat (v9.99.100)
      - Installing symfony/deprecation-contracts (v2.5.2)
      - Installing psr/http-client (1.0.2)
      - Upgrading guzzlehttp/guzzle (6.5.8 => 7.6.1)
    
    Fixes #32807
    dregad committed Aug 14, 2023
    Copy the full SHA
    839c4f0 View commit details
    Browse the repository at this point in the history
  16. Copy the full SHA
    f504311 View commit details
    Browse the repository at this point in the history
  17. Fix errors when SOAP extension is not loaded

    Initialize defaultSoapClientOptions property in setUp(), to avoid a
    syntax error due to undefined constant WSDL_CACHE_NONE.
    
    Remove useless SoapAllTests::setUp() method. TestSuite class does not
    have this method so it is never actually called. Extension availability
    check is performed by `@requires extension` hints in the test cases'
    PHPDoc blocks.
    
    Fixes #32814
    dregad committed Aug 14, 2023
    Copy the full SHA
    e6827c4 View commit details
    Browse the repository at this point in the history
  18. Fix error when executing PHPUnit AllTests.php

    Argument #1 of PHPUnit\Framework\TestSuite::addTestSuite() must be a
    class name or object
    
    AllTests::suite() method called addTest() instead of addTestSuite()
    to include the 3 tests suites.
    
    Fixes #32815
    dregad committed Aug 14, 2023
    Copy the full SHA
    d79c663 View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2023

  1. Define the Test Suites with a phpunit.xml file

    Until today, the test suites were defined in "AllTests.php" files using
    the PHPUnit\Framework\TestSuite class, which is meant for internal use.
    
    The official, documented method to compose a test suite is to use XML
    configuration.
    
    This commit introduces the phpunit.xml, which replaces the AllTests.php
    scripts, and updates documentation and TravisCI script.
    
    Fixes #32816
    dregad committed Aug 15, 2023
    Copy the full SHA
    f550281 View commit details
    Browse the repository at this point in the history
  2. Make UserTest uniqueness provider more dynamic

    When building test email addresses, use the user and domain from the
    TEST_EMAIL constant, to ensure the test cases in providerEmailUnique
    remain relevant in case the reference email is modified.
    dregad committed Aug 15, 2023
    Copy the full SHA
    ffa0e90 View commit details
    Browse the repository at this point in the history
  3. Use fake sendmail script for TravisCI builds

    This avoids 'sh: 1: /usr/sbin/sendmail: not found' error message
    displayed after PHPUnit suite execution, as sendmail is not installed on
    Travis.
    
    Note: This is not a "real" error and does not actually cause the build
    to fail, but it could lead someone reviewing the build's log to think
    that something went wrong, so it should be fixed to avoid confusion.
    
    The fakesendmail.sh script was copied from PHPMailer's test suite [1].
    It will generate a .eml file in /tmp/fakemail directory, each time
    the test suite sends an email.
    
    Fixes #32828
    
    [1]: https://github.com/PHPMailer/PHPMailer/blob/v6.8.0/test/fakesendmail.sh
    dregad committed Aug 15, 2023
    Copy the full SHA
    9224acb View commit details
    Browse the repository at this point in the history