# 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/ # # Please, preserve the changelog entries # # disabled for https://fedoraproject.org/wiki/Changes/MongoDB_Removal %bcond_with tests %global gh_commit 75da9ea3b63d97b05e0e8648d8c09a17bc54c0b6 %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_prever alpha1 #global upstream_lower alpha1 %global ext_version 1.20.0 Name: php-%{gh_owner} Version: %{upstream_version}%{?upstream_prever:~%{upstream_lower}} Release: 1%{?dist} Summary: MongoDB driver library License: Apache-2.0 URL: https://github.com/%{gh_owner}/%{gh_project} # use git snapshot to retrieve full sources with tests Source0: %{name}-%{upstream_version}%{?upstream_prever}-%{gh_short}.tgz Source1: makesrc.sh # Get rid of composer-runtime-api 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", # "squizlabs/php_codesniffer": "^3.7", # "symfony/phpunit-bridge": "^5.2", # "vimeo/psalm": "^5.13" %global phpunit %{_bindir}/phpunit9 BuildRequires: %{phpunit} %endif # For autoloader BuildRequires: php-composer(fedora/autoloader) # From composer.json, "require": { # "php": "^7.4 || ^8.0" # "ext-hash": "*", # "ext-json": "*", # "ext-mongodb": "^1.18.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" Requires: php(language) >= 8.1 Requires: php-hash 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 # For autoloader Requires: php-composer(fedora/autoloader) # Composer Provides: php-composer(%{gh_owner}/%{gh_owner}) = %{version}%{?prever} %description This library provides a high-level abstraction around the lower-level drivers for PHP and HHVM (i.e. the mongodb extension). While the extension provides a limited API for executing commands, queries, and write operations, this library implements an API similar to that of the legacy PHP driver. It contains abstractions for client, database, and collection objects, and provides methods for CRUD operations and common commands (e.g. index and collection management). Autoloader: %{_datadir}/php/%{psr0}/autoload.php %prep %setup -q -n %{gh_project}-%{gh_commit} cat << 'EOF' | tee src/autoload.php phpunit.xml cat << 'EOF' | tee tests/bootstrap.php - 1.20.0-1 - update to 1.20.0 - drop docs - raise dependency on mongodb extension version 1.20 * Mon Sep 9 2024 Remi Collet - 1.19.1-3 - drop dependency on symfony/polyfill * Fri Jun 14 2024 Remi Collet - 1.19.1-1 - update to 1.19.1 (no change) * Tue May 14 2024 Remi Collet - 1.19.0-1 - update to 1.19.0 * Thu Mar 28 2024 Remi Collet - 1.18.0-1 - update to 1.18.0 - raise dependency on mongodb extension version 1.18 * Tue Mar 19 2024 Remi Collet - 1.17.1-1 - update to 1.17.1 * Wed Nov 15 2023 Remi Collet - 1.17.0-1 - update to 1.17.0 - raise dependency on PHP 7.4 - raise dependency on mongodb extension version 1.17 - add dependency on psr/log * Thu Sep 28 2023 Remi Collet - 1.16.1-1 - update to 1.16.1 * Thu Jun 22 2023 Remi Collet - 1.16.0-1 - update to 1.16.0 - raise dependency on mongodb extension version 1.16 - raise dependency on symfony/polyfill 1.27 * Wed Nov 23 2022 Remi Collet - 1.15.0-1 - update to 1.15.0 - raise dependency on mongodb extension version 1.15 * Fri Sep 16 2022 Remi Collet - 1.13.1-1 - update to 1.13.1 * Tue Jul 19 2022 Remi Collet - 1.13.0-1 - update to 1.13.0 - raise dependency on mongodb extension version 1.14 * Thu Mar 24 2022 Remi Collet - 1.12.0-1 - update to 1.12.0 - raise dependency on mongodb extension version 1.13 * Wed Dec 15 2021 Remi Collet - 1.11.0-1 - update to 1.11.0 - raise dependency on PHP 7.2 - raise dependency on mongodb extension version 1.12 * Wed Dec 8 2021 Remi Collet - 1.10.1-1 - update to 1.10.1 * Tue Nov 2 2021 Remi Collet - 1.10.0-1 - update to 1.10.0 - raise dependency on mongodb extension version 1.11 * Wed Jul 14 2021 Remi Collet - 1.9.0-1 - update to 1.9.0 - raise dependency on PHP 7.1 * Fri Apr 9 2021 Remi Collet - 1.9.0~alpha1-1 - update to 1.9.0 - raise dependency on mongodb extension version 1.10 * Wed Nov 25 2020 Remi Collet - 1.8.0-1 - update to 1.8.0 - raise dependency on mongodb extension 1.8.1 - add dependency on symfony/polyfill-php80 * Fri Nov 6 2020 Remi Collet - 1.7.2-1 - update to 1.7.2 * Mon Oct 12 2020 Remi Collet - 1.7.1-1 - update to 1.7.1 * Mon Aug 10 2020 Remi Collet - 1.7.0-1 - update to 1.7.0 - raise dependency on PHP 7.0 - raise dependency on mongodb extension 1.8 * Wed Feb 5 2020 Remi Collet - 1.6.0-1 - update to 1.6.0 - raise dependency on mongodb extension 1.7 * Tue Jan 14 2020 Remi Collet - 1.5.2-1 - update to 1.5.2 * Thu Nov 14 2019 Remi Collet - 1.5.1-1 - update to 1.5.1 * Mon Sep 9 2019 Remi Collet - 1.5.0-1 - update to 1.5.0 - raise dependency on PHP 5.6 - raise dependency on mongodb extension 1.6 * Mon Aug 19 2019 Remi Collet - 1.4.3-1 - update to 1.4.3 * Tue Feb 5 2019 Remi Collet - 1.4.2-3 - disable test suite and so mongodb-server build dependency for https://fedoraproject.org/wiki/Changes/MongoDB_Removal * Fri Aug 24 2018 Remi Collet - 1.4.2-1 - update to 1.4.2 * Wed Jul 11 2018 Remi Collet - 1.4.1-1 - update to 1.4.1 * Thu Jun 28 2018 Remi Collet - 1.4.0-1 - update to 1.4.0 - raise dependency on mongodb extension 1.5.0 * Fri Apr 20 2018 Remi Collet - 1.3.2-1 - update to 1.3.2 * Wed Apr 4 2018 Remi Collet - 1.3.1-1 - update to 1.3.1 * Fri Feb 9 2018 Remi Collet - 1.3.0-1 - Update to 1.3.0 - raise dependency on mongodb extension 1.4.0 * Tue Nov 14 2017 Remi Collet - 1.2.0-1 - Update to 1.2.0 - raise dependency on PHP 5.5 - raise dependency on mongodb extension 1.3.0 * Sun May 14 2017 Remi Collet - 1.1.2-2 - ensure fedora/autoloader is used * Fri Feb 17 2017 Remi Collet - 1.1.2-1 - update to 1.1.2 * Thu Jan 19 2017 Remi Collet - 1.1.1-1 - update to 1.1.1 * Wed Dec 7 2016 Remi Collet - 1.1.0-1 - update to 1.1.0 - raise dependency on php-pecl-mongodb 1.2.0 - switch to fedora/autoloader * Tue Dec 6 2016 Remi Collet - 1.0.4-1 - update to 1.0.4 * Tue Sep 27 2016 Remi Collet - 1.0.3-1 - update to 1.0.3 * Thu Jul 28 2016 Remi Collet - 1.0.2-2 - only run upstream test suite when build --with tests * Thu Mar 31 2016 Remi Collet - 1.0.2-1 - update to 1.0.2 * Sat Mar 5 2016 Remi Collet - 1.0.1-1 - update to 1.0.1 * Fri Jan 22 2016 Remi Collet - 1.0.0-1 - update to 1.0.0 * Mon Jan 4 2016 Remi Collet - 1.0.0-0.4.beta2 - update to 1.0.0beta2 - raise dependency on pecl/mongodb ^1.1.1 - run test suite with both PHP 5 and 7 when available * Tue Nov 3 2015 Remi Collet - 1.0.0-0.3.beta1 - update to 1.0.0beta1 * Mon Nov 2 2015 Remi Collet - 1.0.0-0.2.20151102gita3c0b97 - git snapshot * Sat Oct 31 2015 Remi Collet - 1.0.0-0.1.alpha1 - initial package