From d6e225b60edc9fec0ba15402234ad8d5f87df4d0 Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Wed, 23 Oct 2019 20:25:06 +0200 Subject: [PATCH 1/7] Drop nightly build --- .travis.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index c49dba84..5352e4c2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,11 +10,6 @@ php: - 7.1 - 7.2 - 7.3 - - nightly - -matrix: - allow_failures: - - php: nightly services: mongodb From 7de1e14bfaeaf60702a1c450dcd673621ab37001 Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Wed, 23 Oct 2019 20:25:11 +0200 Subject: [PATCH 2/7] Test against MongoDB ODM 1.x only --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5352e4c2..9d8137b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,10 +18,10 @@ before_install: before_script: - composer self-update - - composer install --prefer-source - composer config "platform.ext-mongo" "1.6.16" - - composer require alcaeus/mongo-php-adapter - - composer require doctrine/mongodb-odm + - composer require --no-update alcaeus/mongo-php-adapter + - composer require --no-update doctrine/mongodb-odm "^1.3.0" + - composer install --prefer-source - composer require jackalope/jackalope-doctrine-dbal doctrine/phpcr-odm script: From babb1480a1579fcf7d6a6b57f31078906e452129 Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Wed, 23 Oct 2019 20:42:45 +0200 Subject: [PATCH 3/7] Remove unsupported attribute in PHPUnit configuration --- phpunit.xml.dist | 1 - 1 file changed, 1 deletion(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 885d4308..b345e155 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -7,7 +7,6 @@ convertNoticesToExceptions="true" convertWarningsToExceptions="true" stopOnFailure="false" - syntaxCheck="false" bootstrap="vendor/autoload.php" > From 986bbc9a65e6fc6bb3cb70e01125a159db61a5b4 Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Wed, 23 Oct 2019 20:43:01 +0200 Subject: [PATCH 4/7] Fix risky test --- .../Tests/Common/DataFixtures/Executor/ORMExecutorTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/Doctrine/Tests/Common/DataFixtures/Executor/ORMExecutorTest.php b/tests/Doctrine/Tests/Common/DataFixtures/Executor/ORMExecutorTest.php index e50feb26..b5a184c5 100644 --- a/tests/Doctrine/Tests/Common/DataFixtures/Executor/ORMExecutorTest.php +++ b/tests/Doctrine/Tests/Common/DataFixtures/Executor/ORMExecutorTest.php @@ -49,6 +49,9 @@ public function testExecuteTransaction() $em = $this->getMockSqliteEntityManager(); $executor = new ORMExecutor($em); $fixture = $this->getMockFixture(); + $fixture->expects($this->once()) + ->method('load') + ->with($em); $executor->execute([$fixture], true); } From 98c6307fba8d470fa05174467b513314e6c5f04a Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Wed, 23 Oct 2019 20:43:12 +0200 Subject: [PATCH 5/7] Remove hack for doctrine/phpcr-odm --- .../Executor/PHPCRExecutorTest.php | 39 ++----------------- 1 file changed, 3 insertions(+), 36 deletions(-) diff --git a/tests/Doctrine/Tests/Common/DataFixtures/Executor/PHPCRExecutorTest.php b/tests/Doctrine/Tests/Common/DataFixtures/Executor/PHPCRExecutorTest.php index c601e377..42477aa4 100644 --- a/tests/Doctrine/Tests/Common/DataFixtures/Executor/PHPCRExecutorTest.php +++ b/tests/Doctrine/Tests/Common/DataFixtures/Executor/PHPCRExecutorTest.php @@ -128,7 +128,9 @@ private function getPurger() */ private function getDocumentManager() { - $this->loadDocumentManagerClass(); + if (!class_exists(DocumentManager::class)) { + $this->markTestSkipped('Missing doctrine/phpcr-odm'); + } return $this ->getMockBuilder(DocumentManager::class) @@ -148,39 +150,4 @@ private function getMockFixture() { return $this->createMock(FixtureInterface::class); } - - /** - * Ensures that the {@see \Doctrine\ODM\PHPCR\DocumentManager} class exists - */ - private function loadDocumentManagerClass() - { - - if (class_exists(DocumentManager::class)) { - return; - } - - // hold my beer while I do some mocking - eval( - <<<'PHP' -namespace Doctrine\ODM\PHPCR; - -class DocumentManager implements \Doctrine\Common\Persistence\ObjectManager -{ - public function find($className, $id) {} - public function persist($object) {} - public function remove($object) {} - public function merge($object) {} - public function clear($objectName = null) {} - public function detach($object) {} - public function refresh($object) {} - public function flush() {} - public function getRepository($className) {} - public function getClassMetadata($className) {} - public function getMetadataFactory() {} - public function initializeObject($obj) {} - public function contains($object) {} -} -PHP - ); - } } From ee6db173b07948034f4a8d80cfc6f5f66e40a876 Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Wed, 23 Oct 2019 20:46:27 +0200 Subject: [PATCH 6/7] Add all dev dependencies to composer.json --- .travis.yml | 6 +----- composer.json | 11 ++++++++++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9d8137b9..8e2c38e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,11 +18,7 @@ before_install: before_script: - composer self-update - - composer config "platform.ext-mongo" "1.6.16" - - composer require --no-update alcaeus/mongo-php-adapter - - composer require --no-update doctrine/mongodb-odm "^1.3.0" - - composer install --prefer-source - - composer require jackalope/jackalope-doctrine-dbal doctrine/phpcr-odm + - composer install script: - ./vendor/bin/phpunit -v diff --git a/composer.json b/composer.json index 7c2b6293..69394f74 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,11 @@ "require-dev": { "doctrine/orm": "^2.5.4", "doctrine/dbal": "^2.5.4", - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^7.0", + "alcaeus/mongo-php-adapter": "^1.1", + "doctrine/mongodb-odm": "^1.3.0", + "jackalope/jackalope-doctrine-dbal": "^1.3", + "doctrine/phpcr-odm": "^1.4" }, "suggest": { "doctrine/orm": "For loading ORM fixtures", @@ -36,5 +40,10 @@ }, "conflict": { "doctrine/phpcr-odm": "<1.3.0" + }, + "config": { + "platform": { + "ext-mongo": "1.6.16" + } } } From 328484f87e01ed416da394e4311adfeab6e0c7e6 Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Wed, 23 Oct 2019 21:08:58 +0200 Subject: [PATCH 7/7] Drop phpcr-odm from testing --- composer.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 69394f74..79647efd 100644 --- a/composer.json +++ b/composer.json @@ -17,9 +17,7 @@ "doctrine/dbal": "^2.5.4", "phpunit/phpunit": "^7.0", "alcaeus/mongo-php-adapter": "^1.1", - "doctrine/mongodb-odm": "^1.3.0", - "jackalope/jackalope-doctrine-dbal": "^1.3", - "doctrine/phpcr-odm": "^1.4" + "doctrine/mongodb-odm": "^1.3.0" }, "suggest": { "doctrine/orm": "For loading ORM fixtures",