Skip to content

Comments

Use @psalm-template annotation to avoid clashes#186

Merged
Ocramius merged 1 commit intodoctrine:masterfrom
muglug:psalm-template
Mar 25, 2019
Merged

Use @psalm-template annotation to avoid clashes#186
Ocramius merged 1 commit intodoctrine:masterfrom
muglug:psalm-template

Conversation

@muglug
Copy link
Contributor

@muglug muglug commented Mar 25, 2019

Following reports that some users encountered issues with @template annotations, this PR replaces @template with the functionally-equivalent @psalm-template.

@Ocramius Ocramius added this to the 1.6.1 milestone Mar 25, 2019
@Ocramius Ocramius self-assigned this Mar 25, 2019
@Ocramius Ocramius added the Bug label Mar 25, 2019
@Ocramius Ocramius merged commit 0852fa2 into doctrine:master Mar 25, 2019
@Ocramius Ocramius changed the title Use @psalm-template annotation to avoid clashes Use @psalm-template annotation to avoid clashes Mar 25, 2019
@muglug muglug deleted the psalm-template branch March 25, 2019 13:13
@Ocramius
Copy link
Member

Verified via following script:

<?php

declare(strict_types=1);

namespace A;

use Doctrine\Common\Annotations\AnnotationReader;
use Doctrine\Common\Collections\Collection;

(function () {
    require_once __DIR__ . '/vendor/autoload.php';

    AnnotationReader::addGlobalIgnoredName('psalm');

    $reader = new AnnotationReader();

    var_dump($reader->getClassAnnotations(new \ReflectionClass(Collection::class)));
})();

Produces:

php check-patch-186.php 
array(0) {
}

@Ocramius
Copy link
Member

Backported to 1.6 via 688aef6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants