From 3b5d0785bcac113963970d1e5eb94a4b446b1644 Mon Sep 17 00:00:00 2001 From: Rimvydas Zilinskas Date: Sat, 2 Jan 2021 23:59:32 +0000 Subject: [PATCH 1/7] PHP8 support --- .github/workflows/coding-standards.yml | 1 + .github/workflows/continuous-integration.yml | 2 ++ composer.json | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 4d42ad00..ae08c722 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -19,6 +19,7 @@ jobs: matrix: php-version: - "7.4" + - "8.0" steps: - name: "Checkout" diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index dcf35d55..9b32a75d 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -23,9 +23,11 @@ jobs: - "7.2" - "7.3" - "7.4" + - "8.0" symfony-version: - "4.4.x" - "5.1.x" + - "5.2.x" driver-version: - "stable" deps: diff --git a/composer.json b/composer.json index 33cc1f09..3490f742 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ {"name": "Jonathan H. Wage", "email": "jonwage@gmail.com"} ], "require": { - "php": "^7.2", + "php": "^7.2 || ^8.0", "doctrine/annotations": "^1.2", "doctrine/mongodb-odm": "^2.0.0", "doctrine/persistence": "^1.3.6|^2.0", From 6fcd4a6a78c27ba3e81dd9b65b8decb6b820da24 Mon Sep 17 00:00:00 2001 From: Rimvydas Zilinskas Date: Sun, 3 Jan 2021 00:43:05 +0000 Subject: [PATCH 2/7] Fix Coding standard version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3490f742..b6d14cc6 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "doctrine/data-fixtures": "<1.3" }, "require-dev": { - "doctrine/coding-standard": "^6.0", + "doctrine/coding-standard": "^8.0", "doctrine/data-fixtures": "^1.3", "phpunit/phpunit": "^8.5 || ^9.3", "squizlabs/php_codesniffer": "^3.5", From 0db49f9247459073465c6a1f0259e4b09f6feeee Mon Sep 17 00:00:00 2001 From: Rimvydas Zilinskas Date: Sun, 3 Jan 2021 01:25:24 +0000 Subject: [PATCH 3/7] Fix phpunit deprection --- Tests/CacheWarmer/HydratorCacheWarmerTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/CacheWarmer/HydratorCacheWarmerTest.php b/Tests/CacheWarmer/HydratorCacheWarmerTest.php index 281f479e..10b33ba5 100644 --- a/Tests/CacheWarmer/HydratorCacheWarmerTest.php +++ b/Tests/CacheWarmer/HydratorCacheWarmerTest.php @@ -64,7 +64,7 @@ public function testWarmerNotExecuted($autoGenerate) try { $this->warmer->warmUp('meh'); - $this->assertFileNotExists($hydratorFilename); + $this->assertFileDoesNotExist($hydratorFilename); } finally { @unlink($hydratorFilename); } From b1f1b87d4c9ae8b7a8df96ac69e6605fa3a86f88 Mon Sep 17 00:00:00 2001 From: rimvislt Date: Sun, 3 Jan 2021 12:38:48 +0000 Subject: [PATCH 4/7] Fixes for CI tests --- Tests/CacheWarmer/HydratorCacheWarmerTest.php | 2 +- Tests/Fixtures/Form/Guesser.php | 6 ------ Tests/Form/Type/GuesserTestType.php | 2 -- Tests/Form/Type/TypeGuesserTest.php | 2 -- composer.json | 6 +++--- 5 files changed, 4 insertions(+), 14 deletions(-) diff --git a/Tests/CacheWarmer/HydratorCacheWarmerTest.php b/Tests/CacheWarmer/HydratorCacheWarmerTest.php index 10b33ba5..281f479e 100644 --- a/Tests/CacheWarmer/HydratorCacheWarmerTest.php +++ b/Tests/CacheWarmer/HydratorCacheWarmerTest.php @@ -64,7 +64,7 @@ public function testWarmerNotExecuted($autoGenerate) try { $this->warmer->warmUp('meh'); - $this->assertFileDoesNotExist($hydratorFilename); + $this->assertFileNotExists($hydratorFilename); } finally { @unlink($hydratorFilename); } diff --git a/Tests/Fixtures/Form/Guesser.php b/Tests/Fixtures/Form/Guesser.php index 2a1ee3e0..c67a6a1d 100644 --- a/Tests/Fixtures/Form/Guesser.php +++ b/Tests/Fixtures/Form/Guesser.php @@ -35,18 +35,12 @@ class Guesser /** @ODM\Field(type="bool") */ public $boolField; - /** @ODM\Field(type="boolean") */ - public $booleanField; - /** @ODM\Field(type="float") */ public $floatField; /** @ODM\Field(type="int") */ public $intField; - /** @ODM\Field(type="integer") */ - public $integerField; - /** @ODM\Field(type="collection") */ public $collectionField; diff --git a/Tests/Form/Type/GuesserTestType.php b/Tests/Form/Type/GuesserTestType.php index 620764e0..1f9eb53b 100644 --- a/Tests/Form/Type/GuesserTestType.php +++ b/Tests/Form/Type/GuesserTestType.php @@ -19,10 +19,8 @@ public function buildForm(FormBuilderInterface $builder, array $options) ->add('ts') ->add('categories', null, ['document_manager' => $options['dm']]) ->add('boolField') - ->add('booleanField') ->add('floatField') ->add('intField') - ->add('integerField') ->add('collectionField') ->add('nonMappedField'); } diff --git a/Tests/Form/Type/TypeGuesserTest.php b/Tests/Form/Type/TypeGuesserTest.php index 12bc2c62..3452a071 100644 --- a/Tests/Form/Type/TypeGuesserTest.php +++ b/Tests/Form/Type/TypeGuesserTest.php @@ -62,10 +62,8 @@ public function testTypesShouldBeGuessedCorrectly() $this->assertType('datetime', $form->get('date')); $this->assertType('datetime', $form->get('ts')); $this->assertType('checkbox', $form->get('boolField')); - $this->assertType('checkbox', $form->get('booleanField')); $this->assertType('number', $form->get('floatField')); $this->assertType('integer', $form->get('intField')); - $this->assertType('integer', $form->get('integerField')); $this->assertType('collection', $form->get('collectionField')); $this->assertType('text', $form->get('nonMappedField')); } diff --git a/composer.json b/composer.json index b6d14cc6..5138055a 100644 --- a/composer.json +++ b/composer.json @@ -13,14 +13,14 @@ ], "require": { "php": "^7.2 || ^8.0", - "doctrine/annotations": "^1.2", - "doctrine/mongodb-odm": "^2.0.0", + "doctrine/annotations": "^1.6", + "doctrine/mongodb-odm": "^2.2", "doctrine/persistence": "^1.3.6|^2.0", "psr/log": "^1.0", + "symfony/config": "^4.3.3|^5.0", "symfony/console": "^4.3.3|^5.0", "symfony/dependency-injection": "^4.3.3|^5.0", "symfony/doctrine-bridge": "^4.3.3|^5.0", - "symfony/config": "^4.3.3|^5.0", "symfony/framework-bundle": "^4.3.3|^5.0", "symfony/http-kernel": "^4.3.7|^5.0", "symfony/options-resolver": "^4.3.3|^5.0" From 7fe0fa6b5c668e40182fc5bd5861416764aabc48 Mon Sep 17 00:00:00 2001 From: Rimvydas Zilinskas Date: Sun, 3 Jan 2021 13:04:11 +0000 Subject: [PATCH 5/7] run coding standards only on php8 --- .github/workflows/coding-standards.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index ae08c722..99705f60 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -18,7 +18,6 @@ jobs: strategy: matrix: php-version: - - "7.4" - "8.0" steps: From a1fde44f1d39e4d513b051fc6abfc6944430fa3b Mon Sep 17 00:00:00 2001 From: Rimvydas Zilinskas Date: Sun, 31 Jan 2021 15:53:33 +0000 Subject: [PATCH 6/7] Revert back to mongo-odm 2.0.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 5138055a..91eed2fa 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "require": { "php": "^7.2 || ^8.0", "doctrine/annotations": "^1.6", - "doctrine/mongodb-odm": "^2.2", + "doctrine/mongodb-odm": "^2.0.0", "doctrine/persistence": "^1.3.6|^2.0", "psr/log": "^1.0", "symfony/config": "^4.3.3|^5.0", From 59a7ae1088ac5e3bc931926bd7e6d3f9ac7e3349 Mon Sep 17 00:00:00 2001 From: Rimvydas Zilinskas Date: Sun, 31 Jan 2021 15:57:34 +0000 Subject: [PATCH 7/7] Fix coding standard version conflict with parent branch --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 91eed2fa..25b79589 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "doctrine/data-fixtures": "<1.3" }, "require-dev": { - "doctrine/coding-standard": "^8.0", + "doctrine/coding-standard": "^8.2", "doctrine/data-fixtures": "^1.3", "phpunit/phpunit": "^8.5 || ^9.3", "squizlabs/php_codesniffer": "^3.5",