diff options
-rw-r--r-- | composer.json | 34 | ||||
-rw-r--r-- | php-amqplib.spec | 53 |
2 files changed, 50 insertions, 37 deletions
diff --git a/composer.json b/composer.json index ed41ed0..3bd7f20 100644 --- a/composer.json +++ b/composer.json @@ -13,29 +13,35 @@ "role": "Original Maintainer" }, { - "name": "John Kelly", - "email": "johnmkelly86@gmail.com", + "name": "Raúl Araya", + "email": "nubeiro@gmail.com", "role": "Maintainer" }, { - "name": "Raúl Araya", - "email": "nubeiro@gmail.com", + "name": "Luke Bakken", + "email": "luke@bakken.io", + "role": "Maintainer" + }, + { + "name": "Ramūnas Dronga", + "email": "github@ramuno.lt", "role": "Maintainer" } ], "require": { - "php": ">=5.3.0", - "ext-bcmath": "*", - "ext-mbstring": "*" + "php": "^7.0|~8.0.0", + "ext-sockets": "*", + "ext-mbstring": "*", + "phpseclib/phpseclib": "^2.0|^3.0" }, "require-dev": { - "phpunit/phpunit": "^4.8", - "scrutinizer/ocular": "^1.1", - "squizlabs/php_codesniffer": "^2.5", - "phpdocumentor/phpdocumentor": "^2.9" + "ext-curl": "*", + "phpunit/phpunit": "^6.5|^7.0|^9.5", + "squizlabs/php_codesniffer": "^3.5", + "nategood/httpful": "^0.2.20" }, - "suggest": { - "ext-sockets": "Use AMQPSocketConnection" + "conflict": { + "php": "7.4.0 - 7.4.1" }, "autoload": { "psr-4": { @@ -51,7 +57,7 @@ "license": "LGPL-2.1-or-later", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "3.0-dev" } } } diff --git a/php-amqplib.spec b/php-amqplib.spec index a3b8d3d..d445909 100644 --- a/php-amqplib.spec +++ b/php-amqplib.spec @@ -2,7 +2,7 @@ # # Fedora spec file for php-amqplib # -# Copyright (c) 2017-2020 Shawn Iwinski <shawn@iwin.ski> +# Copyright (c) 2017-2021 Shawn Iwinski <shawn@iwin.ski> # # License: MIT # http://opensource.org/licenses/MIT @@ -12,17 +12,17 @@ %global github_owner php-amqplib %global github_name php-amqplib -%global github_version 2.12.0 -%global github_commit dfcccd36bf12b4c7cc3ec74d571e00e0f767232e +%global github_version 3.0.0 +%global github_commit c0a8eade209b7e43d6a405303d8de716dfd02749 %global composer_vendor php-amqplib %global composer_project php-amqplib -# "php": ">=5.6.3" -%global php_min_ver 5.6.3 -# "phpseclib/phpseclib": "^2.0.0" +# "php": "^7.0|~8.0.0" +%global php_min_ver 7.0 +# "phpseclib/phpseclib": "^2.0|^3.0" %global phpseclib_min_ver 2.0 -%global phpseclib_max_ver 3.0 +%global phpseclib_max_ver 4.0 # Build using "--without tests" to disable tests %global with_tests 0%{!?_without_tests:1} @@ -45,7 +45,7 @@ License: LGPLv2+ URL: https://github.com/%{github_owner}/%{github_name} # GitHub export does not include tests -# Run php-php-amqplib-php-amqplib-get-source.sh to create full source +# Run php-amqplib-get-source.sh to create full source Source0: %{name}-%{github_version}-%{github_commit}.tar.gz Source1: %{name}-get-source.sh @@ -54,7 +54,8 @@ BuildArch: noarch %if %{with_tests} ## composer.json BuildRequires: php(language) >= %{php_min_ver} -BuildRequires: phpunit7 +BuildRequires: phpunit9 +BuildRequires: php-curl BuildRequires: php-mbstring BuildRequires: php-sockets %if %{with_range_dependencies} @@ -62,7 +63,7 @@ BuildRequires: (php-composer(phpseclib/phpseclib) >= %{phpseclib_min_ver} with p %else BuildRequires: php-phpseclib >= %{phpseclib_min_ver} %endif -## phpcompatinfo for version 2.12.0 +## phpcompatinfo for version 3.0.0 BuildRequires: php-date BuildRequires: php-hash BuildRequires: php-json @@ -83,7 +84,7 @@ Requires: php-phpseclib >= %{phpseclib_min_ver} %endif Requires: php-mbstring Requires: php-sockets -# phpcompatinfo for version 2.12.0 +# phpcompatinfo for version 3.0.0 Requires: php-date Requires: php-pcntl Requires: php-pcre @@ -131,7 +132,10 @@ cat <<'AUTOLOAD' | tee PhpAmqpLib/autoload.php require_once '%{phpdir}/Fedora/Autoloader/autoload.php'; \Fedora\Autoloader\Dependencies::required([ - '%{phpdir}/phpseclib/autoload.php', + [ + '%{phpdir}/phpseclib3/autoload.php', + '%{phpdir}/phpseclib/autoload.php', + ] ]); \Fedora\Autoloader\Autoload::addPsr4('PhpAmqpLib\\', __DIR__); @@ -145,17 +149,14 @@ cp -rp PhpAmqpLib %{buildroot}%{phpdir}/ %check %if %{with_tests} -: Create tests bootstrap -cat <<'BOOTSTRAP' | tee bootstrap.php +: Mock Composer autoloader +mkdir vendor +cat <<'BOOTSTRAP' | tee vendor/autoload.php <?php date_default_timezone_set('UTC'); require '%{buildroot}%{phpdir}/PhpAmqpLib/autoload.php'; -\Fedora\Autoloader\Dependencies::required([ - __DIR__.'/tests/config.php', -]); - -\Fedora\Autoloader\Autoload::addPsr4('PhpAmqpLib\\Tests\\Unit\\', __DIR__.'/tests/Unit'); +\Fedora\Autoloader\Autoload::addPsr4('PhpAmqpLib\\Tests\\Unit\\', dirname(__DIR__).'/tests/Unit'); BOOTSTRAP : Remove tests requiring a running AMQP service @@ -163,11 +164,10 @@ rm -f tests/Unit/Wire/IO/SocketIOTest.php : Upstream tests RETURN_CODE=0 -PHPUNIT=$(which phpunit7) -for PHP_EXEC in php %{?rhel:php54 php55 php56 php70} php71 php72 php73 php74; do +PHPUNIT=$(which phpunit9) +for PHP_EXEC in php php74 php80 php81; do if [ "php" == "$PHP_EXEC" ] || which $PHP_EXEC; then - $PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \ - --testsuite="Unit Tests" || RETURN_CODE=1 + $PHP_EXEC $PHPUNIT --verbose --testsuite="Unit Tests" || RETURN_CODE=1 fi done exit $RETURN_CODE @@ -185,6 +185,13 @@ exit $RETURN_CODE %changelog +* Mon Sep 13 2021 Shawn Iwinski <shawn@iwin.ski> - 3.0.0-1 +- Update to 3.0.0 (RHBZ #1882890) +- Fix FTBFS (RHBZ #1987805) +- Note: Major version upgrade required because v3 introduces PHP8 compatibility + which is required for f35+ +- Use PHPUnit 9 + * Sat Sep 05 2020 Shawn Iwinski <shawn@iwin.ski> - 2.12.0-2 - Require phpseclib for runtime in additional to build require |