Skip to content

Commit c011248

Browse files
authored
Merge pull request #17 from CakeDC/3.next-cake5-ar-fixes
Thank you.
2 parents 66d138e + d69e889 commit c011248

File tree

5 files changed

+5
-41
lines changed

5 files changed

+5
-41
lines changed

.semver

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
:major: 2
2+
:major: 3
33
:minor: 0
4-
:patch: 1
4+
:patch: 0
55
:special: ''

README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# CakePHP 4 extension for PHPStan
1+
# CakePHP 5 extension for PHPStan
22

33
[![Build Status](https://secure.travis-ci.org/CakeDC/cakephp-phpstan.png?branch=master)](http://travis-ci.org/CakeDC/cakephp-phpstan)
44
[![Downloads](https://poser.pugx.org/CakeDC/cakephp-phpstan/d/total.png)](https://packagist.org/packages/CakeDC/cakephp-phpstan)
@@ -12,19 +12,11 @@ This extension provides following features:
1212

1313
1. Provide correct return type for `Cake\ORM\Locator\LocatorInterface::get()`
1414
1. Provide correct return type for `Cake\Controller\Controller::loadComponent()`
15-
1. Provide correct return type for `Cake\Controller\Controller::loadModel()`
16-
1. Provide correct return type for `Cake\Controller\Component::loadModel()`
17-
1. Provide correct return type for `Cake\Command\Command::loadModel()`
18-
1. Provide correct return type for `Cake\Console\Shell::loadModel()`
19-
1. Provide correct return type for `Cake\Mailer\Mailer::loadModel()`
20-
1. Provide correct return type for `Cake\View\Cell::loadModel()`
2115
1. Provide correct return type for `Cake\Controller\Controller::fetchTable()`
2216
1. Provide correct return type for `Cake\Controller\Component::fetchTable()`
2317
1. Provide correct return type for `Cake\Command\Command::fetchTable()`
24-
1. Provide correct return type for `Cake\Console\Shell::fetchTable()`
2518
1. Provide correct return type for `Cake\Mailer\Mailer::fetchTable()`
2619
1. Provide correct return type for `Cake\View\Cell::fetchTable()`
27-
1. Provide correct return type for `Cake\Console\Shell::helper()`
2820
1. Provide correct return type for `Cake\Console\ConsoleIo::helper()`
2921

3022
## Installation

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cakedc/cakephp-phpstan",
3-
"description": "CakePHP 4 plugin extension for PHPStan.",
3+
"description": "CakePHP 5 plugin extension for PHPStan.",
44
"type": "phpstan-extension",
55
"license": "MIT",
66
"authors": [

extension.neon

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ services:
1717
factory: CakeDC\PHPStan\Type\TableLocatorDynamicReturnTypeExtension(Cake\Command\Command, fetchTable)
1818
tags:
1919
- phpstan.broker.dynamicMethodReturnTypeExtension
20-
-
21-
factory: CakeDC\PHPStan\Type\TableLocatorDynamicReturnTypeExtension(Cake\Console\Shell, fetchTable)
22-
tags:
23-
- phpstan.broker.dynamicMethodReturnTypeExtension
2420
-
2521
factory: CakeDC\PHPStan\Type\TableLocatorDynamicReturnTypeExtension(Cake\Mailer\Mailer, fetchTable)
2622
tags:
@@ -37,30 +33,6 @@ services:
3733
factory: CakeDC\PHPStan\Type\TableLocatorDynamicReturnTypeExtension(Cake\ORM\Locator\LocatorInterface, get)
3834
tags:
3935
- phpstan.broker.dynamicMethodReturnTypeExtension
40-
-
41-
factory: CakeDC\PHPStan\Type\TableLocatorDynamicReturnTypeExtension(Cake\Controller\Controller, loadModel)
42-
tags:
43-
- phpstan.broker.dynamicMethodReturnTypeExtension
44-
-
45-
factory: CakeDC\PHPStan\Type\TableLocatorDynamicReturnTypeExtension(Cake\Command\Command, loadModel)
46-
tags:
47-
- phpstan.broker.dynamicMethodReturnTypeExtension
48-
-
49-
factory: CakeDC\PHPStan\Type\TableLocatorDynamicReturnTypeExtension(Cake\Console\Shell, loadModel)
50-
tags:
51-
- phpstan.broker.dynamicMethodReturnTypeExtension
52-
-
53-
factory: CakeDC\PHPStan\Type\TableLocatorDynamicReturnTypeExtension(Cake\Mailer\Mailer, loadModel)
54-
tags:
55-
- phpstan.broker.dynamicMethodReturnTypeExtension
56-
-
57-
factory: CakeDC\PHPStan\Type\TableLocatorDynamicReturnTypeExtension(Cake\View\Cell, loadModel)
58-
tags:
59-
- phpstan.broker.dynamicMethodReturnTypeExtension
60-
-
61-
factory: CakeDC\PHPStan\Type\TableLocatorDynamicReturnTypeExtension(Cake\Controller\Component, loadModel)
62-
tags:
63-
- phpstan.broker.dynamicMethodReturnTypeExtension
6436
-
6537
class: CakeDC\PHPStan\Type\ComponentLoadDynamicReturnTypeExtension
6638
tags:

src/Method/TableFindByPropertyMethodReflection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function getName(): string
106106
*/
107107
public function getReturnType(): ObjectType
108108
{
109-
return new ObjectType('\Cake\ORM\Query');
109+
return new ObjectType('\Cake\ORM\Query\SelectQuery');
110110
}
111111

112112
/**

0 commit comments

Comments
 (0)