From 181327f5416952403607f1674b407e39431afab8 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 5 Oct 2021 08:18:22 +0200 Subject: update to 1.5.1 add patch for test suite with doctrine/dbal v3 from https://github.com/doctrine/data-fixtures/pull/370 --- composer.json | 4 ++-- php-doctrine-datafixtures-dbal3.patch | 41 +++++++++++++++++++++++++++++++++++ php-doctrine-datafixtures.spec | 27 +++++++++++++++++------ 3 files changed, 63 insertions(+), 9 deletions(-) create mode 100644 php-doctrine-datafixtures-dbal3.patch diff --git a/composer.json b/composer.json index 9ec9b4b..b3d2b37 100644 --- a/composer.json +++ b/composer.json @@ -23,8 +23,8 @@ }, "require-dev": { "ext-sqlite3": "*", - "doctrine/coding-standard": "^8.2", - "doctrine/dbal": "^2.5.4", + "doctrine/coding-standard": "^9.0", + "doctrine/dbal": "^2.5.4 || ^3.0", "doctrine/mongodb-odm": "^1.3.0 || ^2.0.0", "doctrine/orm": "^2.7.0", "phpunit/phpunit": "^8.0" diff --git a/php-doctrine-datafixtures-dbal3.patch b/php-doctrine-datafixtures-dbal3.patch new file mode 100644 index 0000000..c2bdcbd --- /dev/null +++ b/php-doctrine-datafixtures-dbal3.patch @@ -0,0 +1,41 @@ +From 5abdfad7119646725461472c392e90c9b4121d84 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Tue, 5 Oct 2021 08:10:52 +0200 +Subject: [PATCH] skip test using setFilterSchemaAssetsExpression removed in + DBAL3 + +Signed-off-by: Remi Collet +--- + .../DataFixtures/Purger/ORMPurgerExcludeTest.php | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/tests/Doctrine/Tests/Common/DataFixtures/Purger/ORMPurgerExcludeTest.php b/tests/Doctrine/Tests/Common/DataFixtures/Purger/ORMPurgerExcludeTest.php +index c4169af..fce0057 100644 +--- a/tests/Doctrine/Tests/Common/DataFixtures/Purger/ORMPurgerExcludeTest.php ++++ b/tests/Doctrine/Tests/Common/DataFixtures/Purger/ORMPurgerExcludeTest.php +@@ -44,7 +44,9 @@ protected function loadTestData() + + $connection = $em->getConnection(); + $configuration = $connection->getConfiguration(); +- $configuration->setFilterSchemaAssetsExpression(null); ++ if (method_exists($configuration, 'setFilterSchemaAssetsExpression')) { ++ $configuration->setFilterSchemaAssetsExpression(null); ++ } + + $schemaTool = new SchemaTool($em); + $schemaTool->dropDatabase(); +@@ -86,7 +88,13 @@ public function executeTestPurge($expression, array $list, ?callable $filter = n + + $connection = $em->getConnection(); + $configuration = $connection->getConfiguration(); +- $configuration->setFilterSchemaAssetsExpression($expression); ++ if ($expression !== null) { ++ if (! method_exists($configuration, 'setFilterSchemaAssetsExpression')) { ++ $this->markTestSkipped('DBAL 2 is required to test schema assets filters'); ++ } ++ ++ $configuration->setFilterSchemaAssetsExpression($expression); ++ } + + if ($filter !== null) { + if (! method_exists($configuration, 'setSchemaAssetsFilter')) { diff --git a/php-doctrine-datafixtures.spec b/php-doctrine-datafixtures.spec index 0c88bc4..45e3230 100644 --- a/php-doctrine-datafixtures.spec +++ b/php-doctrine-datafixtures.spec @@ -2,7 +2,7 @@ # # Fedora spec file for php-doctrine-datafixtures # -# Copyright (c) 2013-2019 Shawn Iwinski +# Copyright (c) 2013-2021 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT @@ -12,8 +12,8 @@ %global github_owner doctrine %global github_name data-fixtures -%global github_version 1.5.0 -%global github_commit 51d3d4880d28951fff42a635a2389f8c63baddc5 +%global github_version 1.5.1 +%global github_commit f18adf13f6c81c67a88360dca359ad474523f8e3 %global github_short %(c=%{github_commit}; echo ${c:0:7}) %global composer_vendor doctrine @@ -27,9 +27,9 @@ # "doctrine/orm": "^2.7.0" %global doctrine_orm_min_ver 2.7.0 %global doctrine_orm_max_ver 3.0 -# "doctrine/dbal": "^2.5.4" +# "doctrine/dbal": "^2.5.4 || ^3.0" %global doctrine_dbal_min_ver 2.5.4 -%global doctrine_dbal_max_ver 3.0 +%global doctrine_dbal_max_ver 4 # "doctrine/persistence": "^1.3.3|^2.0" %global doctrine_pers_min_ver 1.3.3 %global doctrine_pers_max_ver 3 @@ -50,6 +50,8 @@ URL: https://github.com/%{github_owner}/%{github_name} Source0: %{name}-%{github_version}-%{github_short}.tgz Source1: makesrc.sh +Patch0: %{name}-dbal3.patch + BuildArch: noarch # Tests %if %{with tests} @@ -120,7 +122,7 @@ Autoloader: %{phpdir}/Doctrine/Common/DataFixtures/autoload.php %prep %setup -qn %{github_name}-%{github_commit} - +%patch0 -p1 %build : Create autoloader @@ -163,6 +165,12 @@ cat << 'BOOTSTRAP' | tee bootstrap.php - 1.5.1-1 +- update to 1.5.1 +- add patch for test suite with doctrine/dbal v3 from + https://github.com/doctrine/data-fixtures/pull/370 + * Mon Jan 25 2021 Remi Collet - 1.5.0-1 - update to 1.5.0 -- cgit