Skip to content

Commit af025bf

Browse files
authored
Merge pull request #36 from jakzal/deprecate-annotations
Deprecate annotations
2 parents a357c80 + 0d5546f commit af025bf

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ Supported annotations:
1515
* `@server` and `@unset-server` for `$_SERVER`
1616
* `@putenv` and `@unset-getenv` for [`putenv()`](http://php.net/putenv)
1717

18+
> Annotations are deprecated since v3.1.0 and will be removed in the next major or minor version (whichever comes first).
19+
> The latest annotation support is planned to be removed is when PHPUnit 11 is released.
20+
> Annotation support is complete, so if you plan on using them keep using v3.1 of this package.
21+
1822
Global variables are set before each test case is executed,
1923
and brought to the original state after each test case has finished.
2024
The same applies to `putenv()`/`getenv()` calls.

src/AnnotationExtension.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
use PHPUnit\Runner\Extension\ParameterCollection;
99
use PHPUnit\TextUI\Configuration\Configuration;
1010

11+
/**
12+
* @deprecated since 3.1.0, use Zalas\PHPUnit\Globals\AttributeExtension instead.
13+
*/
1114
final class AnnotationExtension implements Extension
1215
{
1316
public function bootstrap(Configuration $configuration, Facade $facade, ParameterCollection $parameters): void

src/GlobalsAnnotationReader.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
use PHPUnit\Event\Test\PreparationStartedSubscriber;
88
use PHPUnit\Metadata\Annotation\Parser\Registry;
99

10+
/**
11+
* @deprecated since 3.1.0, use Zalas\PHPUnit\Globals\GlobalsAttributeReader instead.
12+
*/
1013
final class GlobalsAnnotationReader implements PreparationStartedSubscriber
1114
{
1215
public function notify(PreparationStarted $event): void

0 commit comments

Comments
 (0)