diff options
author | Remi Collet <remi@remirepo.net> | 2025-02-28 15:13:50 +0100 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2025-02-28 15:13:50 +0100 |
commit | 5bca132b1dc1f8b64c2db87daf5cea984f6fb8b8 (patch) | |
tree | e8a9b8290f5686b06f7e209c14b9aa94b2077ff8 | |
parent | 6003bee8c621975143a7aeacbca93cb14322554c (diff) |
update to 1.21.0
re-license spec file to CECILL-2.1
raise dependency on mongodb extension version 1.21
-rw-r--r-- | composer.json | 20 | ||||
-rw-r--r-- | php-mongodb-rpm.patch | 12 | ||||
-rw-r--r-- | php-mongodb.spec | 44 |
3 files changed, 39 insertions, 37 deletions
diff --git a/composer.json b/composer.json index fceee11..118943b 100644 --- a/composer.json +++ b/composer.json @@ -10,10 +10,10 @@ { "name": "Jérôme Tamarelle", "email": "jerome.tamarelle@mongodb.com" } ], "require": { - "php": "^7.4 || ^8.0", + "php": "^8.1", "ext-hash": "*", "ext-json": "*", - "ext-mongodb": "^1.20.0", + "ext-mongodb": "^1.21.0", "composer-runtime-api": "^2.0", "psr/log": "^1.1.4|^2|^3", "symfony/polyfill-php80": "^1.27", @@ -21,10 +21,13 @@ }, "require-dev": { "doctrine/coding-standard": "^12.0", - "rector/rector": "^1.1", + "phpunit/phpunit": "^10.5.35", + "rector/rector": "^1.2", "squizlabs/php_codesniffer": "^3.7", - "symfony/phpunit-bridge": "^5.2", - "vimeo/psalm": "^5.13" + "vimeo/psalm": "6.5.*" + }, + "replace": { + "mongodb/builder": "*" }, "autoload": { "psr-4": { "MongoDB\\": "src/" }, @@ -33,10 +36,11 @@ "autoload-dev": { "psr-4": { "MongoDB\\Tests\\": "tests/" - }, - "files": [ "tests/PHPUnit/Functions.php" ] + } }, "scripts": { + "pre-install-cmd": "git submodule update --init", + "pre-update-cmd": "git submodule update --init", "bench": "cd benchmark && composer update && vendor/bin/phpbench run --report=aggregate", "checks": [ "@check:cs", @@ -49,7 +53,7 @@ "fix:cs": "phpcbf", "fix:psalm:baseline": "psalm --set-baseline=psalm-baseline.xml", "fix:rector": "rector process --ansi", - "test": "simple-phpunit" + "test": "phpunit" }, "extra": { "branch-alias": { diff --git a/php-mongodb-rpm.patch b/php-mongodb-rpm.patch index b706e73..c200ba9 100644 --- a/php-mongodb-rpm.patch +++ b/php-mongodb-rpm.patch @@ -1,21 +1,21 @@ diff -up ./src/Client.php.rpm ./src/Client.php ---- ./src/Client.php.rpm 2024-03-28 07:31:35.800951756 +0100 -+++ ./src/Client.php 2024-03-28 07:33:06.605444491 +0100 +--- ./src/Client.php.rpm 2025-02-28 15:03:47.099826893 +0100 ++++ ./src/Client.php 2025-02-28 15:04:54.310620093 +0100 @@ -17,7 +17,6 @@ namespace MongoDB; -use Composer\InstalledVersions; use Iterator; - use MongoDB\Driver\ClientEncryption; - use MongoDB\Driver\Exception\InvalidArgumentException as DriverInvalidArgumentException; -@@ -395,11 +394,7 @@ class Client + use MongoDB\BSON\Document; + use MongoDB\BSON\PackedArray; +@@ -453,11 +452,7 @@ class Client private static function getVersion(): string { if (self::$version === null) { - try { - self::$version = InstalledVersions::getPrettyVersion('mongodb/mongodb') ?? 'unknown'; -- } catch (Throwable $t) { +- } catch (Throwable) { - self::$version = 'error'; - } + self::$version = '@VERSION@'; diff --git a/php-mongodb.spec b/php-mongodb.spec index 805e66f..7517420 100644 --- a/php-mongodb.spec +++ b/php-mongodb.spec @@ -1,8 +1,8 @@ # remirepo/fedora spec file for php-mongodb # -# Copyright (c) 2015-2024 Remi Collet -# License: CC-BY-SA-4.0 -# http://creativecommons.org/licenses/by-sa/4.0/ +# SPDX-FileCopyrightText: Copyright 2015-2025 Remi Collet +# SPDX-License-Identifier: CECILL-2.1 +# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt # # Please, preserve the changelog entries # @@ -10,17 +10,17 @@ # disabled for https://fedoraproject.org/wiki/Changes/MongoDB_Removal %bcond_with tests -%global gh_commit 75da9ea3b63d97b05e0e8648d8c09a17bc54c0b6 +%global gh_commit d216a5bfc62c9b63ba3523565a35856ab91f78d9 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner mongodb %global gh_project mongo-php-library %global psr0 MongoDB -%global upstream_version 1.20.0 +%global upstream_version 1.21.0 #global upstream_prever alpha1 #global upstream_lower alpha1 -%global ext_version 1.20.0 +%global ext_version 1.21.0 Name: php-%{gh_owner} Version: %{upstream_version}%{?upstream_prever:~%{upstream_lower}} @@ -39,35 +39,31 @@ Patch0: %{name}-rpm.patch BuildArch: noarch BuildRequires: php(language) >= 8.1 BuildRequires: php-cli -BuildRequires: php-reflection -BuildRequires: php-date BuildRequires: php-dom BuildRequires: php-hash BuildRequires: php-json -BuildRequires: php-spl BuildRequires: (php-composer(psr/log) >= 1.1.4 with php-composer(psr/log) < 4) %if %{with tests} BuildRequires: mongodb-server >= 2.4 BuildRequires: php-pecl(mongodb) >= %{ext_version} # From composer.json, "require-dev": { # "doctrine/coding-standard": "^12.0", -# "rector/rector": "^0.19", +# "phpunit/phpunit": "^10.5.35", +# "rector/rector": "^1.2", # "squizlabs/php_codesniffer": "^3.7", -# "symfony/phpunit-bridge": "^5.2", -# "vimeo/psalm": "^5.13" -%global phpunit %{_bindir}/phpunit9 -BuildRequires: %{phpunit} +# "vimeo/psalm": "6.5.*" +%global phpunit %{_bindir}/phpunit10 +BuildRequires: phpunit10 >= 10.5.35 %endif # For autoloader BuildRequires: php-composer(fedora/autoloader) # From composer.json, "require": { -# "php": "^7.4 || ^8.0" +# "php": "^8.1" # "ext-hash": "*", # "ext-json": "*", -# "ext-mongodb": "^1.18.0", +# "ext-mongodb": "^1.21.0", # "composer-runtime-api": "^2.0", -# "symfony/polyfill-php73": "^1.27", # "psr/log": "^1.1.4|^2|^3", # "symfony/polyfill-php80": "^1.27", # "symfony/polyfill-php81": "^1.27" @@ -77,9 +73,7 @@ Requires: php-json Requires: php-pecl(mongodb) >= %{ext_version} Requires: (php-composer(psr/log) >= 1.1.4 with php-composer(psr/log) < 4) # From phpcompatinfo report for 1.8.0 -Requires: php-reflection -Requires: php-date -Requires: php-spl +# Only reflection, php-date, spl # For autoloader Requires: php-composer(fedora/autoloader) @@ -165,15 +159,14 @@ cat << 'EOF' | tee tests/bootstrap.php require_once '%{buildroot}%{_datadir}/php/%{psr0}/autoload.php'; // Test suite \Fedora\Autoloader\Autoload::addPsr4('MongoDB\\Tests\\', __DIR__); -require_once __DIR__ . '/PHPUnit/Functions.php EOF : Run the test suite ret=0 -for cmdarg in "php %{phpunit}" php80 php81 php82; do +for cmdarg in "php %{phpunit}" php81 php82 php83 php83; do if which $cmdarg; then set $cmdarg - $1 ${2:-%{_bindir}/phpunit9} --verbose || ret=1 + $1 ${2:-%{_bindir}/phpunit10} --verbose || ret=1 fi done @@ -194,6 +187,11 @@ exit $ret %changelog +* Fri Feb 28 2025 Remi Collet <remi@remirepo.net> - 1.21.0-1 +- update to 1.21.0 +- re-license spec file to CECILL-2.1 +- raise dependency on mongodb extension version 1.21 + * Wed Sep 25 2024 Remi Collet <remi@remirepo.net> - 1.20.0-1 - update to 1.20.0 - drop docs |