Report use of deprecated phpdoc annotations

Open
#240 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
php
Domain
testing-qa

Research direction

Start by reading the PHPUnit 11 announcement and the discussion linked in phpstan/phpstan-phpunit#239 to understand which annotations are deprecated and how reporting is expected to work. Done means deprecated phpdoc annotation usage is reported consistently for PHPUnit 11 and later, without relying on removed PHPUnit 12 support.

Written by the indexing model from the issue text.

Description

PHPUnit 12.x removed support for annotations, therefore we can prevent unneccessary phpdoc parsing, when PHPUnit 12+ is detected

see https://phpunit.de/announcements/phpunit-11.html

Metadata

PHPUnit 10 introduced support for PHP 8 attributes to add metadata to test classes and test methods. Previously, annotations in special PHP comments called "docblocks" or "doc-comments" were the only way to add metadata to units of code.

In PHPUnit 11, the annotations that can be used in special PHP comments to add metadata to test classes and test methods are deprecated. Support for these annotations will be removed in PHPUnit 12.

see also discussion at https://github.com/phpstan/phpstan-phpunit/pull/239#pullrequestreview-3334380118

Dominant language
PHP
Stars
544
Forks
58
Avg merge
2d 1h
Merged PRs (30d)
5

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from phpstan/phpstan-phpunit

All issues in phpstan/phpstan-phpunit

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.