Prepare test docblocks for annotation conversion to attributes

Created on 10 May 2024, 8 months ago
Updated 27 August 2024, 4 months ago

Problem/Motivation

Rector's PHP parser cannot manage properly annotation values if they are followed by normal comments.

For example,

/**
 * @coversDefaultClass \Drupal\Component\Annotation\Doctrine\DocParser
 *
 * This class is a near-copy of
 * Doctrine\Tests\Common\Annotations\DocParserTest, which is part of the
 * Doctrine project: <http://www.doctrine-project.org>.  It was copied from
 * version 1.2.7.
 *
 * The supporting test fixture classes in
 * core/tests/Drupal/Tests/Component/Annotation/Doctrine/Fixtures were also
 * copied from version 1.2.7.
 *
 * @group Annotation
 */

would be parsed with @coversDefaultClass value being

    \Drupal\Component\Annotation\Doctrine\DocParser\n
    This class is a near-copy of\n
    Doctrine\Tests\Common\Annotations\DocParserTest, which is part of the\n
    Doctrine project: <http://www.doctrine-project.org>.  It was copied from\n
    version 1.2.7.\n
    The supporting test fixture classes in\n
    core/tests/Drupal/Tests/Component/Annotation/Doctrine/Fixtures were also\n
    copied from version 1.2.7.

Proposed resolution

Correct the docblocks so that later Rector would not be fooled by this.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Fixed

Version

11.0 🔥

Component
PHPUnit  →

Last updated about 22 hours ago

Created by

🇮🇹Italy mondrake 🇮🇹

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024