Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 1 addition & 36 deletions build/target-repository/docs/rector_rules_overview.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 390 Rules Overview
# 389 Rules Overview

<br>

Expand All @@ -10,8 +10,6 @@

- [CodingStyle](#codingstyle) (34)

- [Compatibility](#compatibility) (1)

- [DeadCode](#deadcode) (46)

- [DependencyInjection](#dependencyinjection) (2)
Expand Down Expand Up @@ -2502,39 +2500,6 @@ Wrap encapsed variables in curly braces

<br>

## Compatibility

### AttributeCompatibleAnnotationRector

Change annotation to attribute compatible form, see https://tomasvotruba.com/blog/doctrine-annotations-and-attributes-living-together-in-peace/

- class: [`Rector\Compatibility\Rector\Class_\AttributeCompatibleAnnotationRector`](../rules/Compatibility/Rector/Class_/AttributeCompatibleAnnotationRector.php)

```diff
-use Doctrine\Common\Annotations\Annotation\Required;
+use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;

/**
* @annotation
+ * @NamedArgumentConstructor
*/
class SomeAnnotation
{
/**
- * @var string[]
- * @Required()
+ * @param string[] $enum
*/
- public array $enum;
+ public function __construct(
+ public array $enum
+ ) {
+ }
}
```

<br>

## DeadCode

### RecastingRemovalRector
Expand Down
3 changes: 3 additions & 0 deletions packages/BetterPhpDocParser/PhpDocInfo/PhpDocInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ public function getByAnnotationClass(string $class): ?DoctrineAnnotationTagValue
return $doctrineAnnotationTagValueNodes[0] ?? null;
}

/**
* @api used in tests
*/
public function hasByAnnotationClass(string $class): bool
{
return $this->findByAnnotationClass($class) !== [];
Expand Down
31 changes: 0 additions & 31 deletions packages/NodeTypeResolver/Node/AttributeKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,6 @@ final class AttributeKey
*/
public const ORIGINAL_NAME = 'originalName';

/**
* @api
* @deprecated Use $node->namespacedName instead
*
* Internal php-parser name. @see \PhpParser\NodeVisitor\NameResolver
* Do not change this even if you want!
*
* @var string
*/
public const RESOLVED_NAME = 'resolvedName';

/**
* @deprecated Refactor to a custom visitors/parent node instead,
* @see https://phpstan.org/blog/preprocessing-ast-for-custom-rules
Expand All @@ -85,26 +74,6 @@ final class AttributeKey
*/
public const PARENT_NODE = 'parent';

/**
* @api
* @internal of php-parser, do not change
* @deprecated Use StmtsAwareInterface instead
*
* @see https://github.com/nikic/PHP-Parser/pull/681/files
* @var string
*/
public const PREVIOUS_NODE = 'previous';

/**
* @api
* @internal of php-parser, do not change
* @deprecated Use StmtsAwareInterface instead
*
* @see https://github.com/nikic/PHP-Parser/pull/681/files
* @var string
*/
public const NEXT_NODE = 'next';

/**
* Internal php-parser name.
* Do not change this even if you want!
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

45 changes: 0 additions & 45 deletions rules/Compatibility/NodeFactory/ConstructorClassMethodFactory.php

This file was deleted.

Loading