-
-
Notifications
You must be signed in to change notification settings - Fork 862
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed a crashing issue when a different version of a class from the a…
…utoloaded one is analyzed
- Loading branch information
1 parent
733145c
commit 2bab7f3
Showing
8 changed files
with
86 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
namespace PHPStan\Reflection; | ||
|
||
class MissingMethodFromReflectionException extends \PHPStan\AnalysedCodeException | ||
{ | ||
|
||
public function __construct(string $className, string $methodName) | ||
{ | ||
parent::__construct( | ||
sprintf( | ||
'Method %s() was not found in reflection of class %s - probably the wrong version of class is autoloaded.', | ||
$methodName, | ||
$className | ||
) | ||
); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
namespace PHPStan\Reflection; | ||
|
||
class MissingPropertyFromReflectionException extends \PHPStan\AnalysedCodeException | ||
{ | ||
|
||
public function __construct(string $className, string $propertyName) | ||
{ | ||
parent::__construct( | ||
sprintf( | ||
'Property $%s was not found in reflection of class %s - probably the wrong version of class is autoloaded.', | ||
$propertyName, | ||
$className | ||
) | ||
); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
namespace PHPStan\Tests; | ||
|
||
class Foo | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
namespace PHPStan\Tests; | ||
|
||
class Foo | ||
{ | ||
|
||
/** @var string */ | ||
private $fooProperty; | ||
|
||
public function doFoo(): string | ||
{ | ||
$this->fooProperty = 'test'; | ||
|
||
return $this->fooProperty; | ||
} | ||
|
||
} |