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: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- name: Generate changelog
id: changelog
uses: metcalfc/changelog-generator@v4.0.1
uses: metcalfc/changelog-generator@v4.1.0
with:
myToken: ${{ secrets.PHPSTAN_BOT_TOKEN }}

Expand Down
8 changes: 4 additions & 4 deletions build-cs/composer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"require-dev": {
"consistence-community/coding-standard": "^3.11",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"slevomat/coding-standard": "^7.0",
"squizlabs/php_codesniffer": "^3.6.2"
"consistence-community/coding-standard": "^3.11.0",
"dealerdirect/phpcodesniffer-composer-installer": "^1.0.0",
"slevomat/coding-standard": "^8.8.0",
"squizlabs/php_codesniffer": "^3.5.3"
},
"config": {
"allow-plugins": {
Expand Down
119 changes: 64 additions & 55 deletions build-cs/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions extension.neon
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ parameters:
- stubs/Collections/ReadableCollection.stub
- stubs/Collections/Selectable.stub
- stubs/ORM/AbstractQuery.stub
- stubs/ORM/Id/AbstractIdGenerator.stub
- stubs/ORM/Mapping/ClassMetadata.stub
- stubs/ORM/Mapping/ClassMetadataInfo.stub
- stubs/ORM/ORMException.stub
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,20 @@

namespace PHPStan\Reflection\Doctrine;

use PHPStan\Broker\Broker;
use PHPStan\Reflection\BrokerAwareExtension;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\MethodsClassReflectionExtension;
use PHPStan\Reflection\ReflectionProvider;

class DoctrineSelectableClassReflectionExtension implements MethodsClassReflectionExtension, BrokerAwareExtension
class DoctrineSelectableClassReflectionExtension implements MethodsClassReflectionExtension
{

/** @var Broker */
private $broker;
/** @var ReflectionProvider */
private $reflectionProvider;

public function setBroker(Broker $broker): void
public function __construct(ReflectionProvider $reflectionProvider)
{
$this->broker = $broker;
$this->reflectionProvider = $reflectionProvider;
}

public function hasMethod(ClassReflection $classReflection, string $methodName): bool
Expand All @@ -27,7 +26,7 @@ public function hasMethod(ClassReflection $classReflection, string $methodName):

public function getMethod(ClassReflection $classReflection, string $methodName): MethodReflection
{
$selectableReflection = $this->broker->getClass('Doctrine\Common\Collections\Selectable');
$selectableReflection = $this->reflectionProvider->getClass('Doctrine\Common\Collections\Selectable');
return $selectableReflection->getNativeMethod($methodName);
}

Expand Down
Loading