diff options
author | Remi Collet <remi@remirepo.net> | 2018-10-17 18:06:45 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2018-10-17 18:06:45 +0200 |
commit | 42573f22cede9c4358cf9503b288b8dad6a68d48 (patch) | |
tree | 991ea2eda1d790e0e75ffb68a5c084868e3826e2 | |
parent | fb619be5ab918c2d050644b01eaab1dad155fbf2 (diff) |
update to 1.3.1
raise dependencies on PHP 7.1
use range dependencies
doctrine/orm is optional
add optional dependency on alcaeus/mongo-php-adapter
-rw-r--r-- | composer.json | 18 | ||||
-rw-r--r-- | php-doctrine-datafixtures.spec | 86 |
2 files changed, 60 insertions, 44 deletions
diff --git a/composer.json b/composer.json index f5389f9..7c2b629 100644 --- a/composer.json +++ b/composer.json @@ -9,26 +9,32 @@ {"name": "Jonathan Wage", "email": "jonwage@gmail.com"} ], "require": { - "php": ">=5.3.2", + "php": "^7.1", "doctrine/common": "~2.2" }, "require-dev": { - "doctrine/orm": "~2.2" + "doctrine/orm": "^2.5.4", + "doctrine/dbal": "^2.5.4", + "phpunit/phpunit": "^7.0" }, "suggest": { "doctrine/orm": "For loading ORM fixtures", "doctrine/mongodb-odm": "For loading MongoDB ODM fixtures", - "doctrine/phpcr-odm": "For loading PHPCR ODM fixtures" + "doctrine/phpcr-odm": "For loading PHPCR ODM fixtures", + "alcaeus/mongo-php-adapter": "For using MongoDB ODM with PHP 7" }, "autoload": { - "psr-0": { "Doctrine\\Common\\DataFixtures": "lib/" } + "psr-4": { "Doctrine\\Common\\DataFixtures\\": "lib/Doctrine/Common/DataFixtures" } }, "autoload-dev": { - "psr-0": { "Doctrine\\Tests": "tests/" } + "psr-4": { "Doctrine\\Tests\\": "tests/Doctrine/Tests" } }, "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.3.x-dev" } + }, + "conflict": { + "doctrine/phpcr-odm": "<1.3.0" } } diff --git a/php-doctrine-datafixtures.spec b/php-doctrine-datafixtures.spec index e117a18..c48811a 100644 --- a/php-doctrine-datafixtures.spec +++ b/php-doctrine-datafixtures.spec @@ -12,22 +12,24 @@ %global github_owner doctrine %global github_name data-fixtures -%global github_version 1.0.2 -%global github_commit 422952ccf7151c02bb5c01fadb305dce266a3b5f +%global github_version 1.3.1 +%global github_commit 3a1e2c3c600e615a2dffe56d4ca0875cc5233e0a %global composer_vendor doctrine %global composer_project data-fixtures -# "php": ">=5.3.2" -%global php_min_ver 5.3.2 +# "php": "^7.1" +%global php_min_ver 7.1 # "doctrine/common": "~2.2" # NOTE: Min version not 2.2 because autoloader required %global doctrine_common_min_ver 2.5 %global doctrine_common_max_ver 3.0 -# "doctrine/orm": "~2.2" -# NOTE: Min version not 2.2 because autoloader required -%global doctrine_orm_min_ver 2.4.8 +# "doctrine/orm": "^2.5.4" +%global doctrine_orm_min_ver 2.5.4 %global doctrine_orm_max_ver 3.0 +# "doctrine/dbal": "^2.5.4" +%global doctrine_dbal_min_ver 2.5.4 +%global doctrine_dbal_max_ver 3.0 # Build using "--without tests" to disable tests %global with_tests 0%{!?_without_tests:1} @@ -36,7 +38,7 @@ Name: php-%{composer_vendor}-datafixtures Version: %{github_version} -Release: 5%{?dist} +Release: 1%{?dist} Summary: Data Fixtures for all Doctrine Object Managers Group: Development/Libraries @@ -49,11 +51,19 @@ BuildArch: noarch %if %{with_tests} ## composer.json BuildRequires: php(language) >= %{php_min_ver} -BuildRequires: php-composer(doctrine/common) < %{doctrine_common_max_ver} +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires:(php-composer(doctrine/common) >= %{doctrine_common_min_ver} with php-composer(doctrine/common) < %{doctrine_common_max_ver}) +BuildRequires:(php-composer(doctrine/orm) >= %{doctrine_orm_min_ver} with php-composer(doctrine/orm) < %{doctrine_orm_max_ver}) +BuildRequires:(php-composer(doctrine/dbal) >= %{doctrine_dbal_min_ver} with php-composer(doctrine/dbal) < %{doctrine_dbal_max_ver}) +%else +BuildRequires: php-composer(doctrine/common) < %{doctrine_common_max_ver} BuildRequires: php-composer(doctrine/common) >= %{doctrine_common_min_ver} -BuildRequires: php-composer(doctrine/orm) < %{doctrine_orm_max_ver} -BuildRequires: php-composer(doctrine/orm) >= %{doctrine_orm_min_ver} -BuildRequires: php-composer(phpunit/phpunit) +BuildRequires: php-composer(doctrine/orm) < %{doctrine_orm_max_ver} +BuildRequires: php-composer(doctrine/orm) >= %{doctrine_orm_min_ver} +BuildRequires: php-composer(doctrine/dbal) < %{doctrine_dbal_max_ver} +BuildRequires: php-composer(doctrine/dbal) >= %{doctrine_dbal_min_ver} +%endif +BuildRequires: phpunit7 ## phpcompatinfo (computed from version 1.0.2) BuildRequires: php-json BuildRequires: php-reflection @@ -64,11 +74,15 @@ BuildRequires: php-composer(fedora/autoloader) # composer.json Requires: php(language) >= %{php_min_ver} -Requires: php-composer(doctrine/common) >= %{doctrine_common_min_ver} -Requires: php-composer(doctrine/common) < %{doctrine_common_max_ver} +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Requires: (php-composer(doctrine/common) >= %{doctrine_common_min_ver} with php-composer(doctrine/common) < %{doctrine_common_max_ver}) # composer.json: optional -Requires: php-composer(doctrine/orm) >= %{doctrine_orm_min_ver} -Requires: php-composer(doctrine/orm) < %{doctrine_orm_max_ver} +Suggests: php-composer(doctrine/orm) +Suggests: php-composer(alcaeus/mongo-php-adapter) +%else +Requires: php-composer(doctrine/common) < %{doctrine_common_max_ver} +Requires: php-composer(doctrine/common) >= %{doctrine_common_min_ver} +%endif # phpcompatinfo (computed from version 1.0.2) Requires: php-json Requires: php-reflection @@ -104,13 +118,14 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php'; \Fedora\Autoloader\Autoload::addPsr4('Doctrine\\Common\\DataFixtures\\', __DIR__); -\Fedora\Autoloader\Dependencies::required(array( +\Fedora\Autoloader\Dependencies::required([ '%{phpdir}/Doctrine/Common/autoload.php', -)); +]); -\Fedora\Autoloader\Dependencies::optional(array( +\Fedora\Autoloader\Dependencies::optional([ '%{phpdir}/Doctrine/ORM/autoload.php', -)); + '%{phpdir}/Alcaeus/MongoDbAdapter/autoload.php', +]); AUTOLOAD @@ -121,33 +136,21 @@ cp -rp lib/* %{buildroot}%{phpdir}/ %check %if %{with_tests} -%if 0%{?el6} -: Skip tests known to fail -sed -e 's#function testSharedFixtures#function SKIP_testSharedFixtures#' \ - -i tests/Doctrine/Tests/Common/DataFixtures/Executor/ORMExecutorSharedFixtureTest.php -sed -e 's#function testReferenceIdentityPopulation#function SKIP_testReferenceIdentityPopulation#' \ - -e 's#function testReferenceReconstruction#function SKIP_testReferenceReconstruction#' \ - -e 's#function testReferenceMultipleEntries#function SKIP_testReferenceMultipleEntries#' \ - -i tests/Doctrine/Tests/Common/DataFixtures/ProxyReferenceRepositoryTest.php -sed -e 's#function testReferenceIdentityPopulation#function SKIP_testReferenceIdentityPopulation#' \ - -e 's#function testReferenceReconstruction#function SKIP_testReferenceReconstruction#' \ - -e 's#function testReferenceMultipleEntries#function SKIP_testReferenceMultipleEntries#' \ - -i tests/Doctrine/Tests/Common/DataFixtures/ReferenceRepositoryTest.php -%endif - : Create tests bootstrap -cat <<'BOOTSTRAP' | tee bootstrap.php +cat << 'BOOTSTRAP' | tee bootstrap.php <?php require_once '%{buildroot}%{phpdir}/Doctrine/Common/DataFixtures/autoload.php'; \Fedora\Autoloader\Autoload::addPsr0('Doctrine\\Tests\\', __DIR__.'/tests'); BOOTSTRAP +: ignore as doctrine/phpcr-odm not available +rm tests/Doctrine/Tests/Common/DataFixtures/Executor/PHPCRExecutorTest.php + : Upstream tests RETURN_CODE=0 -PHPUNIT=$(which phpunit) -for PHP_EXEC in "" %{?rhel:php54 php55} php56 php70 php71 php72; do +for PHP_EXEC in "" php71 php72 php73; do if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then - $PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \ + $PHP_EXEC %{_bindir}/phpunit7 --verbose --bootstrap bootstrap.php \ || RETURN_CODE=1 fi done @@ -167,6 +170,13 @@ exit $RETURN_CODE %changelog +* Wed Oct 17 2018 Remi Collet <remi@remirepo.net> - 1.3.1-1 +- update to 1.3.1 +- raise dependencies on PHP 7.1 +- use range dependencies +- doctrine/orm is optional +- add optional dependency on alcaeus/mongo-php-adapter + * Fri May 12 2017 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.0.2-5 - Switch autoloader to php-composer(fedora/autoloader) - Add max versions to build dependencies |