Skip to content

Commit

Permalink
PHPStan 2.0 Upgrade - Cleanup extension usage for fetchTable
Browse files Browse the repository at this point in the history
  • Loading branch information
rochamarcelo committed Nov 1, 2024
1 parent 5abe96d commit 2d6b693
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
16 changes: 0 additions & 16 deletions extension.neon
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,6 @@ services:
factory: CakeDC\PHPStan\Type\ControllerFetchTableDynamicReturnTypeExtension(Cake\Controller\Controller, fetchTable)
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension
-
factory: CakeDC\PHPStan\Type\TableLocatorDynamicReturnTypeExtension(Cake\Command\Command, fetchTable)
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension
-
factory: CakeDC\PHPStan\Type\TableLocatorDynamicReturnTypeExtension(Cake\Mailer\Mailer, fetchTable)
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension
-
factory: CakeDC\PHPStan\Type\TableLocatorDynamicReturnTypeExtension(Cake\View\Cell, fetchTable)
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension
-
factory: CakeDC\PHPStan\Type\TableLocatorDynamicReturnTypeExtension(Cake\Controller\Component, fetchTable)
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension
-
factory: CakeDC\PHPStan\Type\TableLocatorDynamicReturnTypeExtension(Cake\ORM\Locator\LocatorInterface, get)
tags:
Expand Down
4 changes: 4 additions & 0 deletions tests/test_app/Controller/Component/WarningComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@
namespace App\Controller\Component;

use Cake\Controller\Component;
use Cake\ORM\Locator\LocatorAwareTrait;

class WarningComponent extends Component
{
use LocatorAwareTrait;

/**
* @return void
*/
Expand All @@ -27,5 +30,6 @@ public function testWarning()
*/
$controller = $this->getController();
$controller->fetchTable()->warning();
$this->fetchTable('Users')->blockOld();
}
}

0 comments on commit 2d6b693

Please sign in to comment.