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
2 changes: 0 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@
"Rector\\SOLID\\": "rules/solid/src",
"Rector\\NodeNestingScope\\": "packages/node-nesting-scope/src",
"Rector\\Sensio\\": "rules/sensio/src",
"Rector\\Shopware\\": "rules/shopware/src",
"Rector\\StaticTypeMapper\\": "packages/static-type-mapper/src",
"Rector\\StrictCodeQuality\\": "rules/strict-code-quality/src",
"Rector\\SymfonyCodeQuality\\": "rules/symfony-code-quality/src",
Expand Down Expand Up @@ -191,7 +190,6 @@
"Rector\\Restoration\\Tests\\": "rules/restoration/tests",
"Rector\\SOLID\\Tests\\": "rules/solid/tests",
"Rector\\Sensio\\Tests\\": "rules/sensio/tests",
"Rector\\Shopware\\Tests\\": "rules/shopware/tests",
"Rector\\StrictCodeQuality\\Tests\\": "rules/strict-code-quality/tests",
"Rector\\SymfonyCodeQuality\\Tests\\": "rules/symfony-code-quality/tests",
"Rector\\SymfonyPHPUnit\\Tests\\": "rules/symfony-phpunit/tests",
Expand Down
2 changes: 0 additions & 2 deletions config/set/shopware/shopware55.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,3 @@ services:
Shopware_Components_Config:
isset: 'offsetExists'
unset: 'offsetUnset'

Rector\Shopware\Rector\ClassConstFetch\ShopwareVersionConstsRector: null
5 changes: 0 additions & 5 deletions config/set/shopware/shopware56.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,10 @@ imports:
- { resource: '../elasticsearch-dsl/elasticsearch-dsl50.yaml' }

services:
Rector\Shopware\Rector\MethodCall\ReplaceEnlightResponseWithSymfonyResponseRector: null

Rector\Renaming\Rector\MethodCall\RenameMethodCallRector:
$oldToNewMethodsByClass:
Enlight_Controller_Response_Response:
getHttpResponseCode: getStatusCode
setHttpResponseCode: setStatusCode
sendCookies: sendHeaders
setBody: setContent

Rector\Shopware\Rector\ClassConstFetch\ShopwareVersionConstsRector: null
Rector\Shopware\Rector\MethodCall\ShopRegistrationServiceRector: null
66 changes: 1 addition & 65 deletions docs/rector_rules_overview.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# All 487 Rectors Overview
# All 484 Rectors Overview

- [Projects](#projects)
- [General](#general)
Expand Down Expand Up @@ -58,7 +58,6 @@
- [Restoration](#restoration) (3)
- [SOLID](#solid) (11)
- [Sensio](#sensio) (1)
- [Shopware](#shopware) (3)
- [StrictCodeQuality](#strictcodequality) (1)
- [Symfony](#symfony) (29)
- [SymfonyCodeQuality](#symfonycodequality) (1)
Expand Down Expand Up @@ -9217,69 +9216,6 @@ Turns `@Template` annotation to explicit method call in Controller of FrameworkE

<br>

## Shopware

### `ReplaceEnlightResponseWithSymfonyResponseRector`

- class: [`Rector\Shopware\Rector\MethodCall\ReplaceEnlightResponseWithSymfonyResponseRector`](/../master/rules/shopware/src/Rector/MethodCall/ReplaceEnlightResponseWithSymfonyResponseRector.php)
- [test fixtures](/../master/rules/shopware/tests/Rector/MethodCall/ReplaceEnlightResponseWithSymfonyResponseRector/Fixture)

Replace Enlight Response methods with Symfony Response methods

```diff
class FrontendController extends \Enlight_Controller_Action
{
public function run()
{
- $this->Response()->setHeader('Foo', 'Yea');
+ $this->Response()->headers->set('Foo', 'Yea');
}
}
```

<br>

### `ShopRegistrationServiceRector`

- class: [`Rector\Shopware\Rector\MethodCall\ShopRegistrationServiceRector`](/../master/rules/shopware/src/Rector/MethodCall/ShopRegistrationServiceRector.php)
- [test fixtures](/../master/rules/shopware/tests/Rector/MethodCall/ShopRegistrationServiceRector/Fixture)

Replace $shop->registerResources() with ShopRegistrationService

```diff
class SomeClass
{
public function run()
{
$shop = new \Shopware\Models\Shop\Shop();
- $shop->registerResources();
+ Shopware()->Container()->get('shopware.components.shop_registration_service')->registerShop($shop);
}
}
```

<br>

### `ShopwareVersionConstsRector`

- class: [`Rector\Shopware\Rector\ClassConstFetch\ShopwareVersionConstsRector`](/../master/rules/shopware/src/Rector/ClassConstFetch/ShopwareVersionConstsRector.php)
- [test fixtures](/../master/rules/shopware/tests/Rector/ClassConstFetch/ShopwareVersionConstsRector/Fixture)

Use version from di parameter

```diff
class SomeClass
{
public function run()
{
- echo \Shopware::VERSION;
+ echo Shopware()->Container()->getParameter('shopware.release.version');
}
}
```

<br>

## StrictCodeQuality

### `VarInlineAnnotationToAssertRector`
Expand Down

This file was deleted.

This file was deleted.

Loading