Skip to content

Manually merge 3.1.x into 4.0.x#4501

Merged
morozov merged 23 commits intodoctrine:4.0.xfrom
morozov:4.0.x
Feb 19, 2021
Merged

Manually merge 3.1.x into 4.0.x#4501
morozov merged 23 commits intodoctrine:4.0.xfrom
morozov:4.0.x

Conversation

@morozov
Copy link
Copy Markdown
Member

@morozov morozov commented Feb 17, 2021

No description provided.

simPod and others added 22 commits January 11, 2021 11:22
Use param instead of ENV to fetch dev deps with Psalm in CI
This class is almost 2 years old and never received BC breaking change. We need to rely on its API so we can build DI integration in DoctrineBundle
It seems to be working now we switched to Github ACtions.
…lize

Remove internal flag from TypeRegistry
…ravis

Cleanup references to Travis and master branch
Message from old pages is "This page has moved or been replaced. The new page is located here..."
Fixed outdated links in AbstractMySQLDriver.php
@morozov morozov requested review from greg0ire and removed request for greg0ire February 17, 2021 18:41
@morozov
Copy link
Copy Markdown
Member Author

morozov commented Feb 18, 2021

The PHPStan failure is really weird:

$ phpstan a tests/Platforms/AbstractPlatformTestCase.php

 1/1 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ------------------------------------------------------------------------------------
  Line   AbstractPlatformTestCase.php
 ------ ------------------------------------------------------------------------------------
  378    Parameter #1 $originalClassName of method PHPUnit\Framework\TestCase::createMock()
         expects class-string<T of Doctrine\DBAL\Platforms\AbstractPlatform>, string given.
  378    Unable to resolve the template type T in call to method
         PHPUnit\Framework\TestCase::createMock()
  1. TestCase::createMock() doesn't use the T template (not even speaking of expecting it to be an AbstractPlatform).
  2. If I replace the newly introduced template T with something else, the issue disappears:
    diff --git a/tests/Platforms/AbstractPlatformTestCase.php b/tests/Platforms/AbstractPlatformTestCase.php
    index f737da68a..d4ef1462c 100644
    --- a/tests/Platforms/AbstractPlatformTestCase.php
    +++ b/tests/Platforms/AbstractPlatformTestCase.php
    @@ -26,15 +26,15 @@ use function sprintf;
     use function str_repeat;
    
     /**
    - * @template T of AbstractPlatform
    + * @template Z of AbstractPlatform
      */
     abstract class AbstractPlatformTestCase extends TestCase
     {
    -    /** @var T */
    +    /** @var Z */
         protected $platform;
    
         /**
    -     * @return T
    +     * @return Z
          */
         abstract public function createPlatform(): AbstractPlatform;

@morozov morozov merged commit 45834e5 into doctrine:4.0.x Feb 19, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants