summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-09-22 14:33:49 +0200
committerRemi Collet <remi@remirepo.net>2017-09-22 14:33:49 +0200
commitd2e3d9cf197097ebc5068d2d426c4809d46af108 (patch)
tree5437ba8938282a6cb7bf1017c526f392da8d253e
parentd220191853c299f5e497d09e532603622b1a6397 (diff)
v2.5.1 from Fedora
-rw-r--r--.gitignore8
-rw-r--r--composer.json21
-rw-r--r--php-doctrine-orm-bin.patch21
-rw-r--r--php-doctrine-orm-phpunit54.patch12
-rw-r--r--php-doctrine-orm.spec198
5 files changed, 145 insertions, 115 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fc9aa8c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+clog
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/composer.json b/composer.json
index 25eedef..1036b4a 100644
--- a/composer.json
+++ b/composer.json
@@ -11,16 +11,20 @@
{"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"},
{"name": "Jonathan Wage", "email": "jonwage@gmail.com"}
],
+ "minimum-stability": "dev",
"require": {
- "php": ">=5.3.2",
+ "php": ">=5.4",
"ext-pdo": "*",
- "doctrine/collections": "~1.1",
- "doctrine/dbal": "~2.4",
- "symfony/console": "~2.0"
+ "doctrine/collections": "~1.2",
+ "doctrine/dbal": ">=2.5-dev,<2.7-dev",
+ "doctrine/instantiator": "^1.0.1",
+ "doctrine/common": ">=2.5-dev,<2.9-dev",
+ "doctrine/cache": "~1.4",
+ "symfony/console": "~2.5|~3.0"
},
"require-dev": {
- "symfony/yaml": "~2.1",
- "satooshi/php-coveralls": "dev-master"
+ "symfony/yaml": "~2.3|~3.0",
+ "phpunit/phpunit": "~4.0"
},
"suggest": {
"symfony/yaml": "If you want to use YAML Metadata Mapping Driver"
@@ -28,10 +32,13 @@
"autoload": {
"psr-0": { "Doctrine\\ORM\\": "lib/" }
},
+ "autoload-dev": {
+ "psr-0": { "Doctrine\\Tests\\": "tests/" }
+ },
"bin": ["bin/doctrine", "bin/doctrine.php"],
"extra": {
"branch-alias": {
- "dev-master": "2.4.x-dev"
+ "dev-master": "2.6.x-dev"
}
},
"archive": {
diff --git a/php-doctrine-orm-bin.patch b/php-doctrine-orm-bin.patch
index 31772bb..08c7645 100644
--- a/php-doctrine-orm-bin.patch
+++ b/php-doctrine-orm-bin.patch
@@ -1,5 +1,5 @@
diff --git a/bin/doctrine.php b/bin/doctrine.php
-index c735562..99014f4 100755
+index 842c5493f..e1ccb7506 100755
--- a/bin/doctrine.php
+++ b/bin/doctrine.php
@@ -1,3 +1,4 @@
@@ -7,18 +7,19 @@ index c735562..99014f4 100755
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-@@ -20,7 +21,13 @@
+@@ -20,14 +21,7 @@
use Symfony\Component\Console\Helper\HelperSet;
use Doctrine\ORM\Tools\Console\ConsoleRunner;
--(@include_once __DIR__ . '/../vendor/autoload.php') || @include_once __DIR__ . '/../../../autoload.php';
-+require_once '/usr/share/php/Doctrine/Common/ClassLoader.php';
-+
-+$classLoader = new \Doctrine\Common\ClassLoader('Doctrine');
-+$classLoader->register();
-+
-+$classLoader = new \Doctrine\Common\ClassLoader('Symfony');
-+$classLoader->register();
+-$autoloadFiles = array(__DIR__ . '/../vendor/autoload.php',
+- __DIR__ . '/../../../autoload.php');
+-
+-foreach ($autoloadFiles as $autoloadFile) {
+- if (file_exists($autoloadFile)) {
+- require_once $autoloadFile;
+- }
+-}
++require_once '__PHPDIR__/Doctrine/ORM/autoload.php';
$directories = array(getcwd(), getcwd() . DIRECTORY_SEPARATOR . 'config');
diff --git a/php-doctrine-orm-phpunit54.patch b/php-doctrine-orm-phpunit54.patch
deleted file mode 100644
index 493c613..0000000
--- a/php-doctrine-orm-phpunit54.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2692Test.php.old 2016-06-13 18:09:07.905814745 +0200
-+++ tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2692Test.php 2016-06-13 18:09:59.319090970 +0200
-@@ -29,7 +29,8 @@
-
- public function testIsListenerCalledOnlyOnceOnPreFlush()
- {
-- $listener = $this->getMock('Doctrine\Tests\ORM\Functional\Ticket\DDC2692Listener', array('preFlush'));
-+ $listener = $this->getMockObjectGenerator()->getMock('Doctrine\Tests\ORM\Functional\Ticket\DDC2692Listener', array('preFlush'));
-+ $this->registerMockObject($listener);
- $listener->expects($this->once())->method('preFlush');
-
- $this->_em->getEventManager()->addEventSubscriber($listener);
diff --git a/php-doctrine-orm.spec b/php-doctrine-orm.spec
index e3512ad..ada4ad0 100644
--- a/php-doctrine-orm.spec
+++ b/php-doctrine-orm.spec
@@ -13,27 +13,37 @@
%global github_owner doctrine
%global github_name doctrine2
-%global github_version 2.4.8
-%global github_commit 5aedac1e5c5caaeac14798822c70325dc242d467
+%global github_version 2.5.11
+%global github_commit 249b737094f1e7cba4f0a8d19acf5be6cf3ed504
%global composer_vendor doctrine
%global composer_project orm
-# "php": ">=5.3.2"
-%global php_min_ver 5.3.2
-# "doctrine/collections": "~1.1"
-# NOTE: Min version not 1.1 because autoloader required
-%global collections_min_ver 1.3.0
+# "php": ">=5.4"
+%global php_min_ver 5.4
+# "doctrine/cache": "~1.4"
+# NOTE: Min version not 1.4.0 because autoloader required
+%global cache_min_ver 1.4.1
+%global cache_max_ver 2
+# "doctrine/collections": "~1.2"
+# NOTE: Min version not 1.2 because autoloader required
+%global collections_min_ver 1.3
%global collections_max_ver 2.0
-# "doctrine/dbal": "~2.4"
+# "doctrine/common": ">=2.5-dev,<2.9-dev"
+%global common_min_ver 2.5
+%global common_max_ver 2.9
+# "doctrine/dbal": ">=2.5-dev,<2.7-dev"
# NOTE: Min version not 2.4 because autoloader required
%global dbal_min_ver 2.5.4
-%global dbal_max_ver 3.0
-# "symfony/console": "~2.0"
-# "symfony/yaml": "~2.1"
-# NOTE: Min version not 2.1 because autoloader required
+%global dbal_max_ver 2.7
+# "doctrine/instantiator": "^1.0.1"
+%global instantiator_min_ver 1.0.1
+%global instantiator_max_ver 2.0
+# "symfony/console": "~2.5|~3.0"
+# "symfony/yaml": "~2.3|~3.0"
+# NOTE: Min version not 2.5 because autoloader required
%global symfony_min_ver 2.7.1
-%global symfony_max_ver 3.0
+%global symfony_max_ver 4.0
%{!?phpdir: %global phpdir %{_datadir}/php}
@@ -42,7 +52,7 @@
Name: php-%{composer_vendor}-%{composer_project}
Version: %{github_version}
-Release: 3%{?dist}
+Release: 1%{?dist}
Summary: Doctrine Object-Relational-Mapper (ORM)
Group: Development/Libraries
@@ -58,29 +68,32 @@ Source1: %{name}-get-source.sh
# 2) Auto-load using Doctrine\Common\ClassLoader
Patch0: %{name}-bin.patch
-# Fix test suite using PHPUnit 5.4
-Patch1: %{name}-phpunit54.patch
-
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
# Tests
%if %{with_tests}
-BuildRequires: php-composer(phpunit/phpunit)
## composer.json
-BuildRequires: php(language) >= %{php_min_ver}
+BuildRequires: php(language) >= %{php_min_ver}
+BuildRequires: php-composer(doctrine/cache) < %{cache_max_ver}
+BuildRequires: php-composer(doctrine/cache) >= %{cache_min_ver}
BuildRequires: php-composer(doctrine/collections) < %{collections_max_ver}
BuildRequires: php-composer(doctrine/collections) >= %{collections_min_ver}
-BuildRequires: php-composer(doctrine/dbal) < %{dbal_max_ver}
-BuildRequires: php-composer(doctrine/dbal) >= %{dbal_min_ver}
-BuildRequires: php-composer(symfony/console) < %{symfony_max_ver}
-BuildRequires: php-composer(symfony/console) >= %{symfony_min_ver}
-BuildRequires: php-composer(symfony/yaml) < %{symfony_max_ver}
-BuildRequires: php-composer(symfony/yaml) >= %{symfony_min_ver}
+BuildRequires: php-composer(doctrine/common) < %{common_max_ver}
+BuildRequires: php-composer(doctrine/common) >= %{common_min_ver}
+BuildRequires: php-composer(doctrine/dbal) < %{dbal_max_ver}
+BuildRequires: php-composer(doctrine/dbal) >= %{dbal_min_ver}
+BuildRequires: php-composer(doctrine/instantiator) < %{instantiator_max_ver}
+BuildRequires: php-composer(doctrine/instantiator) >= %{instantiator_min_ver}
+BuildRequires: php-composer(phpunit/phpunit)
+BuildRequires: php-composer(symfony/console) < %{symfony_max_ver}
+BuildRequires: php-composer(symfony/console) >= %{symfony_min_ver}
+BuildRequires: php-composer(symfony/yaml) < %{symfony_max_ver}
+BuildRequires: php-composer(symfony/yaml) >= %{symfony_min_ver}
BuildRequires: php-pdo
-# phpcompatinfo (computed from version 2.4.8)
+# phpcompatinfo (computed from version 2.5.11)
BuildRequires: php-ctype
BuildRequires: php-date
BuildRequires: php-dom
+BuildRequires: php-json
BuildRequires: php-pcre
BuildRequires: php-reflection
BuildRequires: php-simplexml
@@ -91,19 +104,28 @@ BuildRequires: php-composer(fedora/autoloader)
%endif
# composer.json
-Requires: php(language) >= %{php_min_ver}
+Requires: php(language) >= %{php_min_ver}
+Requires: php-composer(doctrine/cache) < %{cache_max_ver}
+Requires: php-composer(doctrine/cache) >= %{cache_min_ver}
Requires: php-composer(doctrine/collections) < %{collections_max_ver}
Requires: php-composer(doctrine/collections) >= %{collections_min_ver}
-Requires: php-composer(doctrine/dbal) < %{dbal_max_ver}
-Requires: php-composer(doctrine/dbal) >= %{dbal_min_ver}
-Requires: php-composer(symfony/console) < %{symfony_max_ver}
-Requires: php-composer(symfony/console) >= %{symfony_min_ver}
-Requires: php-composer(symfony/yaml) < %{symfony_max_ver}
-Requires: php-composer(symfony/yaml) >= %{symfony_min_ver}
+Requires: php-composer(doctrine/common) < %{common_max_ver}
+Requires: php-composer(doctrine/common) >= %{common_min_ver}
+Requires: php-composer(doctrine/dbal) < %{dbal_max_ver}
+Requires: php-composer(doctrine/dbal) >= %{dbal_min_ver}
+Requires: php-composer(doctrine/instantiator) < %{instantiator_max_ver}
+Requires: php-composer(doctrine/instantiator) >= %{instantiator_min_ver}
+Requires: php-composer(symfony/console) < %{symfony_max_ver}
+Requires: php-composer(symfony/console) >= %{symfony_min_ver}
Requires: php-pdo
-# phpcompatinfo (computed from version 2.4.8)
+# composer.json: suggest
+Requires: php-composer(symfony/yaml) < %{symfony_max_ver}
+Requires: php-composer(symfony/yaml) >= %{symfony_min_ver}
+# phpcompatinfo (computed from version 2.5.11)
Requires: php-ctype
+Requires: php-date
Requires: php-dom
+Requires: php-json
Requires: php-pcre
Requires: php-reflection
Requires: php-simplexml
@@ -145,18 +167,11 @@ Autoloader: %{phpdir}/Doctrine/ORM/autoload.php
: Patch bin script
%patch0 -p1
-
-if %{_bindir}/phpunit --atleast-version 5.4; then
-: Fix test suite using PHPUnit 5.4
-%patch1 -p0
-fi
+sed -i 's#__PHPDIR__#%{phpdir}#g' bin/doctrine.php
: Remove empty file
rm -f lib/Doctrine/ORM/README.markdown
-: Remove unnecessary executable bits
-chmod a-x lib/Doctrine/ORM/Tools/Pagination/Paginator.php
-
%build
: Create autoloader
@@ -170,18 +185,28 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('Doctrine\\ORM\\', __DIR__);
-\Fedora\Autoloader\Dependencies::required(array(
+\Fedora\Autoloader\Dependencies::required([
+ '%{phpdir}/Doctrine/Common/autoload.php',
+ '%{phpdir}/Doctrine/Common/Cache/autoload.php',
'%{phpdir}/Doctrine/Common/Collections/autoload.php',
'%{phpdir}/Doctrine/DBAL/autoload.php',
- '%{phpdir}/Symfony/Component/Console/autoload.php',
+ '%{phpdir}/Doctrine/Instantiator/autoload.php',
+ [
+ '%{phpdir}/Symfony3/Component/Console/autoload.php',
+ '%{phpdir}/Symfony/Component/Console/autoload.php',
+ ],
+]);
+
+\Fedora\Autoloader\Dependencies::optional([
+ [
+ '%{phpdir}/Symfony3/Component/Yaml/autoload.php',
'%{phpdir}/Symfony/Component/Yaml/autoload.php',
-));
+ ],
+]);
AUTOLOAD
%install
-rm -rf %{buildroot}
-
: Lib
mkdir -p %{buildroot}%{phpdir}
cp -rp lib/Doctrine %{buildroot}%{phpdir}/
@@ -209,56 +234,54 @@ require_once '%{buildroot}%{phpdir}/Doctrine/ORM/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('Doctrine\\Tests\\', __DIR__.'/tests/Doctrine/Tests');
BOOTSTRAP
-# Skip test known to fail
-sed -e 's/function testQueryCache_DependsOnHints/function SKIP_testQueryCache_DependsOnHints/' \
- -e 's/function testQueryCache_NoHitSaveParserResult/function SKIP_testQueryCache_NoHitSaveParserResult/' \
+: Skip tests known to fail
+sed \
+ -e 's/function testDeleteTransactionCommitShouldEvictCache/function SKIP_testDeleteTransactionCommitShouldEvictCache/' \
+ -e 's/function testInsertTransactionCommitShouldPutCache/function SKIP_testInsertTransactionCommitShouldPutCache/' \
+ -e 's/function testTransactionRollBackShouldClearQueue/function SKIP_testTransactionRollBackShouldClearQueue/' \
+ -e 's/function testUpdateTransactionCommitShouldPutCache/function SKIP_testUpdateTransactionCommitShouldPutCache/' \
+ -i tests/Doctrine/Tests/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersisterTest.php
+sed \
+ -e 's/function testLoadedAssociationToManyShouldTriggerEvent/function SKIP_testLoadedAssociationToManyShouldTriggerEvent/' \
+ -e 's/function testLoadedAssociationToOneShouldTriggerEvent/function SKIP_testLoadedAssociationToOneShouldTriggerEvent/' \
+ -e 's/function testLoadedEntityUsingFindShouldTriggerEvent/function SKIP_testLoadedEntityUsingFindShouldTriggerEvent/' \
+ -e 's/function testLoadedEntityUsingQueryShouldTriggerEvent/function SKIP_testLoadedEntityUsingQueryShouldTriggerEvent/' \
+ -e 's/function testLoadedProxyAssociationToManyShouldTriggerEvent/function SKIP_testLoadedProxyAssociationToManyShouldTriggerEvent/' \
+ -e 's/function testLoadedProxyAssociationToOneShouldTriggerEvent/function SKIP_testLoadedProxyAssociationToOneShouldTriggerEvent/' \
+ -e 's/function testLoadedProxyEntityShouldTriggerEvent/function SKIP_testLoadedProxyEntityShouldTriggerEvent/' \
+ -e 's/function testLoadedProxyPartialShouldTriggerEvent/function SKIP_testLoadedProxyPartialShouldTriggerEvent/' \
+ -i tests/Doctrine/Tests/ORM/Functional/PostLoadEventTest.php
+sed 's/function testQueryCache_NoHitSaveParserResult/function SKIP_testQueryCache_NoHitSaveParserResult/' \
-i tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php
-sed 's/function testNativeQueryResultCaching/function SKIP_testNativeQueryResultCaching/' \
- -i tests/Doctrine/Tests/ORM/Functional/ResultCacheTest.php
-sed 's/function testQueryCache_DependsOnFilters/function SKIP_testQueryCache_DependsOnFilters/' \
- -i tests/Doctrine/Tests/ORM/Functional/SQLFilterTest.php
-%if 0%{?fedora} > 24
-sed 's/function testReusedSplObjectHashDoesNotConfuseUnitOfWork/function SKIP_testReusedSplObjectHashDoesNotConfuseUnitOfWork/' \
- -i tests/Doctrine/Tests/ORM/Functional/IdentityMapTest.php
-%endif
-%if 1
-sed 's/function testFindMappingFileNamespacedFoundFileNotFound/function SKIP_testFindMappingFileNamespacedFoundFileNotFound/' \
- -i tests/Doctrine/Tests/ORM/Mapping/Symfony/AbstractDriverTest.php
-%endif
+rm -f \
+ tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2692Test.php \
+ tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3123Test.php
-# Weird el6 error
-# TODO: Investigate and submit upstream patch
-%if 0%{?el6}
-sed 's#$this->_em->clear();#if (isset($this->_em)) { $this->_em->clear(); }#' \
- -i tests/Doctrine/Tests/OrmFunctionalTestCase.php
-%endif
-%if 0%{?el5}
-# Seems to use sqlite3, not available
-rm tests/Doctrine/Tests/ORM/Functional/QueryDqlFunctionTest.php
+%if 0%{?rhel} < 7
+rm tests/Doctrine/Tests/ORM/Functional/Ticket/GH6464Test.php
%endif
-%{_bindir}/phpunit --verbose -d memory_limit="512M" --bootstrap bootstrap.php
-
-: Upstream tests with SCLs if available
-SCL_RETURN_CODE=0
-for SCL in %{?rhel:php54 php55} php56 php70 php71; do
- if which $SCL; then
- $SCL %{_bindir}/phpunit --verbose -d memory_limit="512M" \
- --bootstrap bootstrap.php || SCL_RETURN_CODE=1
+: Upstream tests
+RETURN_CODE=0
+PHPUNIT=$(which phpunit)
+for PHP_EXEC in "" %{?rhel:php55} php56 php70 php71 php72; do
+ if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
+ if [ $($PHP_EXEC -r 'echo PHP_VERSION_ID;') -ge 70200 ]; then
+ sed 's/function testQueryCache_HitDoesNotSaveParserResult/function SKIP_testQueryCache_HitDoesNotSaveParserResult/' \
+ -i tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php
+ fi
+
+ $PHP_EXEC $PHPUNIT --verbose -d memory_limit="512M" --bootstrap bootstrap.php \
+ || RETURN_CODE=1
fi
done
-exit $SCL_RETURN_CODE
+exit $RETURN_CODE
%else
: Tests skipped
%endif
-%clean
-rm -rf %{buildroot}
-
-
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc *.md *.markdown composer.json
@@ -267,6 +290,9 @@ rm -rf %{buildroot}
%changelog
+* Wed Sep 20 2017 Shawn Iwinski <shawn.iwinski@gmail.com> - 2.5.11-1
+- Updated to 2.5.11 (RHBZ #1207905)
+
* Sat Feb 25 2017 Shawn Iwinski <shawn.iwinski@gmail.com> - 2.4.8-3
- Fix FTBFS in rawhide (RHBZ #1424060)
- Use php-composer(fedora/autoloader)