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
119 changes: 24 additions & 95 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -40,98 +40,54 @@ parameters:
count: 1
path: src/Domain/EnumImplicits.php

-
message: '''
#^Call to deprecated method fromAstNode\(\) of interface Firehed\\PhpLsp\\Repository\\ClassInfoFactory\:
sweep\: source\-context factory$#
'''
identifier: method.deprecated
count: 1
path: src/Knowledge/DeclarationSymbolInfoFactory.php

-
message: '''
#^Call to deprecated method fromGlobalDeclaration\(\) of class Firehed\\PhpLsp\\Domain\\ConstantInfo\:
sweep\: source\-context factory$#
'''
identifier: staticMethod.deprecated
count: 1
path: src/Knowledge/DeclarationSymbolInfoFactory.php

-
message: '''
#^Call to deprecated method fromNode\(\) of class Firehed\\PhpLsp\\Domain\\FunctionInfo\:
sweep\: source\-context factory$#
'''
identifier: staticMethod.deprecated
count: 1
path: src/Knowledge/DeclarationSymbolInfoFactory.php

-
message: '''
#^Call to deprecated method fromReflection\(\) of class Firehed\\PhpLsp\\Domain\\FunctionInfo\:
sweep\: source\-context factory$#
'''
identifier: staticMethod.deprecated
count: 1
path: src/Knowledge/ReflectionSymbolInfoFactory.php

-
message: '''
#^Call to deprecated method fromReflection\(\) of interface Firehed\\PhpLsp\\Repository\\ClassInfoFactory\:
sweep\: source\-context factory$#
'''
identifier: method.deprecated
count: 1
path: src/Knowledge/ReflectionSymbolInfoFactory.php
path: src/Knowledge/BuiltinBackend.php

-
message: '''
#^Call to deprecated method fromNode\(\) of class Firehed\\PhpLsp\\Domain\\ParameterInfo\:
sweep\: source\-context factory$#
'''
identifier: staticMethod.deprecated
count: 1
path: src/Repository/DefaultClassInfoFactory.php

-
message: '''
#^Call to deprecated method fromReflection\(\) of class Firehed\\PhpLsp\\Domain\\ParameterInfo\:
sweep\: source\-context factory$#
#^Call to method className\(\) of deprecated class Firehed\\PhpLsp\\Domain\\TypeFactory\:
sweep\: source\-context factory; resolution should go through
TypeSource, construction primitives will migrate elsewhere$#
'''
identifier: staticMethod.deprecated
count: 1
path: src/Repository/DefaultClassInfoFactory.php
identifier: staticMethod.deprecatedClass
count: 3
path: src/Knowledge/BuiltinBackend.php

-
message: '''
#^Call to method className\(\) of deprecated class Firehed\\PhpLsp\\Domain\\TypeFactory\:
#^Call to method fromReflection\(\) of deprecated class Firehed\\PhpLsp\\Domain\\TypeFactory\:
sweep\: source\-context factory; resolution should go through
TypeSource, construction primitives will migrate elsewhere$#
'''
identifier: staticMethod.deprecatedClass
count: 4
path: src/Repository/DefaultClassInfoFactory.php
path: src/Knowledge/BuiltinBackend.php

-
message: '''
#^Call to method fromNode\(\) of deprecated class Firehed\\PhpLsp\\Domain\\TypeFactory\:
#^Call to method className\(\) of deprecated class Firehed\\PhpLsp\\Domain\\TypeFactory\:
sweep\: source\-context factory; resolution should go through
TypeSource, construction primitives will migrate elsewhere$#
'''
identifier: staticMethod.deprecatedClass
count: 4
path: src/Repository/DefaultClassInfoFactory.php
count: 2
path: src/Knowledge/DeclarationSymbolInfoFactory.php

-
message: '''
#^Call to method fromReflection\(\) of deprecated class Firehed\\PhpLsp\\Domain\\TypeFactory\:
#^Call to method fromNode\(\) of deprecated class Firehed\\PhpLsp\\Domain\\TypeFactory\:
sweep\: source\-context factory; resolution should go through
TypeSource, construction primitives will migrate elsewhere$#
'''
identifier: staticMethod.deprecatedClass
count: 3
path: src/Repository/DefaultClassInfoFactory.php
count: 6
path: src/Knowledge/DeclarationSymbolInfoFactory.php

-
message: '''
Expand All @@ -141,7 +97,7 @@ parameters:
'''
identifier: staticMethod.deprecatedClass
count: 1
path: src/Repository/DefaultClassInfoFactory.php
path: src/Knowledge/DeclarationSymbolInfoFactory.php

-
message: '''
Expand All @@ -155,33 +111,33 @@ parameters:

-
message: '''
#^Call to method fromNode\(\) of deprecated class Firehed\\PhpLsp\\Domain\\TypeFactory\:
#^Call to method union\(\) of deprecated class Firehed\\PhpLsp\\Domain\\TypeFactory\:
sweep\: source\-context factory; resolution should go through
TypeSource, construction primitives will migrate elsewhere$#
'''
identifier: staticMethod.deprecatedClass
count: 1
path: src/Resolution/ParameterTyping.php
path: src/Resolution/ExpressionResolver.php

-
message: '''
#^Call to method union\(\) of deprecated class Firehed\\PhpLsp\\Domain\\TypeFactory\:
#^Call to method className\(\) of deprecated class Firehed\\PhpLsp\\Domain\\TypeFactory\:
sweep\: source\-context factory; resolution should go through
TypeSource, construction primitives will migrate elsewhere$#
'''
identifier: staticMethod.deprecatedClass
count: 1
path: src/Resolution/ExpressionResolver.php
count: 5
path: src/Resolution/MemberAccessDetector.php

-
message: '''
#^Call to method className\(\) of deprecated class Firehed\\PhpLsp\\Domain\\TypeFactory\:
#^Call to method fromNode\(\) of deprecated class Firehed\\PhpLsp\\Domain\\TypeFactory\:
sweep\: source\-context factory; resolution should go through
TypeSource, construction primitives will migrate elsewhere$#
'''
identifier: staticMethod.deprecatedClass
count: 5
path: src/Resolution/MemberAccessDetector.php
count: 1
path: src/Resolution/ParameterTyping.php

-
message: '''
Expand Down Expand Up @@ -299,33 +255,6 @@ parameters:
count: 2
path: tests/Domain/TypeFactoryTest.php

-
message: '''
#^Call to deprecated method fromAstNode\(\) of class Firehed\\PhpLsp\\Repository\\DefaultClassInfoFactory\:
sweep\: source\-context factory$#
'''
identifier: method.deprecated
count: 37
path: tests/Repository/DefaultClassInfoFactoryTest.php

-
message: '''
#^Call to deprecated method fromReflection\(\) of class Firehed\\PhpLsp\\Repository\\DefaultClassInfoFactory\:
sweep\: source\-context factory$#
'''
identifier: method.deprecated
count: 15
path: tests/Repository/DefaultClassInfoFactoryTest.php

-
message: '''
#^Call to deprecated method fromAstNode\(\) of class Firehed\\PhpLsp\\Repository\\DefaultClassInfoFactory\:
sweep\: source\-context factory$#
'''
identifier: method.deprecated
count: 1
path: tests/Resolution/AstTextAgreementTest.php

-
message: '''
#^Call to method className\(\) of deprecated class Firehed\\PhpLsp\\Domain\\TypeFactory\:
Expand Down
10 changes: 4 additions & 6 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,10 @@ parameters:
- tests/*
-
namespace: 'Reflection*'
message: 'runtime reflection is confined: ReflectionNamespaceSource and the fromReflection factories'
message: 'runtime reflection is confined: ReflectionNamespaceSource, BuiltinBackend, and the fromReflection factories'
allowIn:
- src/Knowledge/ReflectionSymbolInfoFactory.php
- src/Knowledge/BuiltinBackend.php
- src/Index/ReflectionNamespaceSource.php
- src/Repository/ClassInfoFactory.php
- src/Repository/DefaultClassInfoFactory.php
- src/Domain/TypeFactory.php
- src/Domain/FunctionInfo.php
- src/Domain/ParameterInfo.php
Expand Down Expand Up @@ -156,9 +154,9 @@ parameters:
- 'method_exists()'
- 'property_exists()'
- 'is_callable()'
message: 'asking the runtime whether a symbol exists, or what it holds, is a SymbolSource query (RFC 1 §4.2); ReflectionSymbolInfoFactory is the one place it may be the server''s own runtime'
message: 'asking the runtime whether a symbol exists, or what it holds, is a SymbolSource query (RFC 1 §4.2); BuiltinBackend is the one place it may be the server''s own runtime'
allowIn:
- src/Knowledge/ReflectionSymbolInfoFactory.php
- src/Knowledge/BuiltinBackend.php
- tests/*
-
function:
Expand Down
Loading