rectorphp/rector
### [`v0.13.0`](https://togithub.com/rectorphp/rector/releases/tag/0.13.0)
[Compare Source](https://togithub.com/rectorphp/rector/compare/0.12.23...0.13.0)
##### New Features :tada:
- \[Php82] Add ReadOnlyClassRector ([#2296](https://togithub.com/rectorphp/rector-src/pull/2296)), Thanks [@samsonasik](https://togithub.com/samsonasik)!
- \[Order] Add a-z ordering feature to OrderAttributesRector ([#2243](https://togithub.com/rectorphp/rector-src/pull/2243)), Thanks [@Lenny4](https://togithub.com/Lenny4)!
- \[Symfony] Add CommandPropertyToAttributeRector ([#163](https://togithub.com/rectorphp/rector-symfony/pull/163)), Thanks [@stephanvierkant](https://togithub.com/stephanvierkant)
- \[Experimental] Add refactorWithScope() method to get typed Scope easily and required ([#2227](https://togithub.com/rectorphp/rector-src/pull/2227))
- Add Scope refresh for changed or new nodes ([#2292](https://togithub.com/rectorphp/rector-src/pull/2292))
##### From YAML routes to Annotations :rocket:
- \[Symfony] Add new rule to add annotations from router configuration to symfony controllers ([#169](https://togithub.com/rectorphp/rector-symfony/pull/169)), Thanks [@malteschlueter](https://togithub.com/malteschlueter)
```diff
-foo_baz:
- path: /foo/{baz}
- defaults: { _controller: FooBundle:Bar:baz, _format: json }
- methods: [ GET, POST ]
+/**
+ * @Route(name="foo_baz", path="/foo/{baz}", methods={"GET","POST"}, defaults={_format="json"})
+ */
public function bazAction(string $baz)
```
##### New `StmtsAwareInterface` node
- \[DX] Add StmtsAwareInterface to catch node by type ([#2269](https://togithub.com/rectorphp/rector-src/pull/2269))
Do you need to iterface all rules with stmts in them? Hook in one node type:
```php
/**
* @return array>
*/
public function getNodeTypes(): array
{
return [StmtsAwareInterface::class];
}
```
##### Bugfixes :bug:
- \[CodeQuality] Skip CallableThisArrayToAnonymousFunctionRector when inside of Attribute ([#2212](https://togithub.com/rectorphp/rector-src/pull/2212)), [#6910](https://togithub.com/rectorphp/rector/issues/6910), Thanks [@samsonasik](https://togithub.com/samsonasik)!
- Added new functions to NullToStrictStringFuncCallArgRector ([#2217](https://togithub.com/rectorphp/rector-src/pull/2217)), Thanks [@FlorinProfeanu](https://togithub.com/FlorinProfeanu)!
- \[Parallel] Fix --debug not working in parallel ([#2307](https://togithub.com/rectorphp/rector-src/pull/2307)), Thanks [@samsonasik](https://togithub.com/samsonasik)!
- \[DowngradePhp80] Handle match inside ArrowFunction on DowngradeMatchToSwitchRector ([#2330](https://togithub.com/rectorphp/rector-src/pull/2330)), Thanks [@samsonasik](https://togithub.com/samsonasik)!
- \[DowngradePhp80] Add in arrow function in return support on DowngradeMatchToSwitchRector ([#2332](https://togithub.com/rectorphp/rector-src/pull/2332)), Thanks [@alfredbez](https://togithub.com/alfredbez)!
- \[DowngradePhp80] Apply PHPStan 1.7.x-dev compatible for PhpParameterReflection ([#2336](https://togithub.com/rectorphp/rector-src/pull/2336)), Thanks [@samsonasik](https://togithub.com/samsonasik)!
- \[DeadCode] Skip used in Closure use on RemoveUnusedConstructorParamRector ([#2341](https://togithub.com/rectorphp/rector-src/pull/2341)), Thanks [@samsonasik](https://togithub.com/samsonasik)!
- \[Naming] Move collecting param names method to FunctionLikeManipulator ([#2347](https://togithub.com/rectorphp/rector-src/pull/2347)), Thanks [@samsonasik](https://togithub.com/samsonasik)!
- \[Naming] Handle Grouped use import on UseImportsResolver ([#2348](https://togithub.com/rectorphp/rector-src/pull/2348)), Thanks [@samsonasik](https://togithub.com/samsonasik)!
Configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, click this checkbox.
This PR contains the following updates:
^0.12
->^0.13
Release Notes
rectorphp/rector
### [`v0.13.0`](https://togithub.com/rectorphp/rector/releases/tag/0.13.0) [Compare Source](https://togithub.com/rectorphp/rector/compare/0.12.23...0.13.0) ##### New Features :tada: - \[Php82] Add ReadOnlyClassRector ([#2296](https://togithub.com/rectorphp/rector-src/pull/2296)), Thanks [@samsonasik](https://togithub.com/samsonasik)! - \[Order] Add a-z ordering feature to OrderAttributesRector ([#2243](https://togithub.com/rectorphp/rector-src/pull/2243)), Thanks [@Lenny4](https://togithub.com/Lenny4)! - \[Symfony] Add CommandPropertyToAttributeRector ([#163](https://togithub.com/rectorphp/rector-symfony/pull/163)), Thanks [@stephanvierkant](https://togithub.com/stephanvierkant) - \[Experimental] Add refactorWithScope() method to get typed Scope easily and required ([#2227](https://togithub.com/rectorphp/rector-src/pull/2227)) - Add Scope refresh for changed or new nodes ([#2292](https://togithub.com/rectorphp/rector-src/pull/2292))##### From YAML routes to Annotations :rocket: - \[Symfony] Add new rule to add annotations from router configuration to symfony controllers ([#169](https://togithub.com/rectorphp/rector-symfony/pull/169)), Thanks [@malteschlueter](https://togithub.com/malteschlueter) ```diff -foo_baz: - path: /foo/{baz} - defaults: { _controller: FooBundle:Bar:baz, _format: json } - methods: [ GET, POST ] +/** + * @Route(name="foo_baz", path="/foo/{baz}", methods={"GET","POST"}, defaults={_format="json"}) + */ public function bazAction(string $baz) ```
##### New `StmtsAwareInterface` node - \[DX] Add StmtsAwareInterface to catch node by type ([#2269](https://togithub.com/rectorphp/rector-src/pull/2269)) Do you need to iterface all rules with stmts in them? Hook in one node type: ```php /** * @return array
##### Bugfixes :bug: - \[CodeQuality] Skip CallableThisArrayToAnonymousFunctionRector when inside of Attribute ([#2212](https://togithub.com/rectorphp/rector-src/pull/2212)), [#6910](https://togithub.com/rectorphp/rector/issues/6910), Thanks [@samsonasik](https://togithub.com/samsonasik)! - Added new functions to NullToStrictStringFuncCallArgRector ([#2217](https://togithub.com/rectorphp/rector-src/pull/2217)), Thanks [@FlorinProfeanu](https://togithub.com/FlorinProfeanu)! - \[Parallel] Fix --debug not working in parallel ([#2307](https://togithub.com/rectorphp/rector-src/pull/2307)), Thanks [@samsonasik](https://togithub.com/samsonasik)! - \[DowngradePhp80] Handle match inside ArrowFunction on DowngradeMatchToSwitchRector ([#2330](https://togithub.com/rectorphp/rector-src/pull/2330)), Thanks [@samsonasik](https://togithub.com/samsonasik)! - \[DowngradePhp80] Add in arrow function in return support on DowngradeMatchToSwitchRector ([#2332](https://togithub.com/rectorphp/rector-src/pull/2332)), Thanks [@alfredbez](https://togithub.com/alfredbez)! - \[DowngradePhp80] Apply PHPStan 1.7.x-dev compatible for PhpParameterReflection ([#2336](https://togithub.com/rectorphp/rector-src/pull/2336)), Thanks [@samsonasik](https://togithub.com/samsonasik)! - \[DeadCode] Skip used in Closure use on RemoveUnusedConstructorParamRector ([#2341](https://togithub.com/rectorphp/rector-src/pull/2341)), Thanks [@samsonasik](https://togithub.com/samsonasik)! - \[Naming] Move collecting param names method to FunctionLikeManipulator ([#2347](https://togithub.com/rectorphp/rector-src/pull/2347)), Thanks [@samsonasik](https://togithub.com/samsonasik)! - \[Naming] Handle Grouped use import on UseImportsResolver ([#2348](https://togithub.com/rectorphp/rector-src/pull/2348)), Thanks [@samsonasik](https://togithub.com/samsonasik)!
Configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.