mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 12:55:26 +01:00
Merge pull request #7474 from orklah/removePositiveInt
deprecate TPositiveInt
This commit is contained in:
commit
8230efba63
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<files psalm-version="4.9999999.9999999.9999999-dev">
|
||||
<files psalm-version="4.x-dev@64206d9c3a9723bba093beb7d1a77ee767332d8a">
|
||||
<file src="examples/TemplateChecker.php">
|
||||
<PossiblyUndefinedIntArrayOffset occurrences="2">
|
||||
<code>$comment_block->tags['variablesfrom'][0]</code>
|
||||
@ -21,11 +21,13 @@
|
||||
<code>$matches[0]</code>
|
||||
<code>$symbol_parts[1]</code>
|
||||
</PossiblyUndefinedIntArrayOffset>
|
||||
<PossiblyUnusedProperty occurrences="1">
|
||||
<code>$analysis_php_version_id</code>
|
||||
</PossiblyUnusedProperty>
|
||||
</file>
|
||||
<file src="src/Psalm/Config.php">
|
||||
<DeprecatedMethod occurrences="3">
|
||||
<code>getAdditionalFileExtensions</code>
|
||||
<code>getAdditionalFileTypeAnalyzers</code>
|
||||
<code>getAdditionalFileTypeScanners</code>
|
||||
</DeprecatedMethod>
|
||||
<DeprecatedProperty occurrences="7">
|
||||
<code>$codebase->php_major_version</code>
|
||||
<code>$codebase->php_major_version</code>
|
||||
@ -35,11 +37,6 @@
|
||||
<code>$codebase->php_minor_version</code>
|
||||
<code>$this->load_xdebug_stub</code>
|
||||
</DeprecatedProperty>
|
||||
<DeprecatedMethod occurrences="3">
|
||||
<code>getAdditionalFileExtensions</code>
|
||||
<code>getAdditionalFileTypeScanners</code>
|
||||
<code>getAdditionalFileTypeAnalyzers</code>
|
||||
</DeprecatedMethod>
|
||||
</file>
|
||||
<file src="src/Psalm/Config/FileFilter.php">
|
||||
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
||||
@ -205,17 +202,26 @@
|
||||
</DeprecatedMethod>
|
||||
</file>
|
||||
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ArithmeticOpAnalyzer.php">
|
||||
<DeprecatedMethod occurrences="4">
|
||||
<DeprecatedClass occurrences="1">
|
||||
<code>new TPositiveInt()</code>
|
||||
</DeprecatedClass>
|
||||
<DeprecatedMethod occurrences="5">
|
||||
<code>Type::getEmpty()</code>
|
||||
<code>Type::getEmpty()</code>
|
||||
<code>Type::getEmpty()</code>
|
||||
<code>Type::getEmpty()</code>
|
||||
<code>Type::getPositiveInt(true)</code>
|
||||
</DeprecatedMethod>
|
||||
<PossiblyUndefinedIntArrayOffset occurrences="2">
|
||||
<code>$invalid_left_messages[0]</code>
|
||||
<code>$invalid_right_messages[0]</code>
|
||||
</PossiblyUndefinedIntArrayOffset>
|
||||
</file>
|
||||
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ConcatAnalyzer.php">
|
||||
<DeprecatedMethod occurrences="1">
|
||||
<code>Type::getPositiveInt()</code>
|
||||
</DeprecatedMethod>
|
||||
</file>
|
||||
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentAnalyzer.php">
|
||||
<DeprecatedProperty occurrences="4">
|
||||
<code>$codebase->php_major_version</code>
|
||||
@ -256,6 +262,11 @@
|
||||
</PossiblyUndefinedIntArrayOffset>
|
||||
</file>
|
||||
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/Call/FunctionCallReturnTypeFetcher.php">
|
||||
<DeprecatedClass occurrences="3">
|
||||
<code>new TPositiveInt</code>
|
||||
<code>new TPositiveInt</code>
|
||||
<code>new TPositiveInt</code>
|
||||
</DeprecatedClass>
|
||||
<DeprecatedMethod occurrences="1">
|
||||
<code>Type::getEmpty()</code>
|
||||
</DeprecatedMethod>
|
||||
@ -337,6 +348,11 @@
|
||||
<code>Type::getEmpty()</code>
|
||||
</DeprecatedMethod>
|
||||
</file>
|
||||
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/ConstFetchAnalyzer.php">
|
||||
<DeprecatedMethod occurrences="1">
|
||||
<code>Type::getPositiveInt()</code>
|
||||
</DeprecatedMethod>
|
||||
</file>
|
||||
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/InstancePropertyFetchAnalyzer.php">
|
||||
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
||||
<code>$invalid_fetch_types[0]</code>
|
||||
@ -567,10 +583,21 @@
|
||||
<code>$codebase->php_major_version</code>
|
||||
</DeprecatedProperty>
|
||||
</file>
|
||||
<file src="src/Psalm/Internal/Type/Comparator/IntegerRangeComparator.php">
|
||||
<DeprecatedClass occurrences="1">
|
||||
<code>TPositiveInt::class</code>
|
||||
</DeprecatedClass>
|
||||
</file>
|
||||
<file src="src/Psalm/Internal/Type/Comparator/ScalarTypeComparator.php">
|
||||
<DeprecatedClass occurrences="1">
|
||||
<code>TPositiveInt::class</code>
|
||||
</DeprecatedClass>
|
||||
</file>
|
||||
<file src="src/Psalm/Internal/Type/SimpleAssertionReconciler.php">
|
||||
<DeprecatedClass occurrences="2">
|
||||
<DeprecatedClass occurrences="3">
|
||||
<code>new TEmpty()</code>
|
||||
<code>new TEmpty()</code>
|
||||
<code>new TPositiveInt()</code>
|
||||
</DeprecatedClass>
|
||||
<DeprecatedMethod occurrences="13">
|
||||
<code>Type::getEmpty()</code>
|
||||
@ -601,6 +628,9 @@
|
||||
</DeprecatedMethod>
|
||||
</file>
|
||||
<file src="src/Psalm/Internal/Type/TypeCombiner.php">
|
||||
<DeprecatedClass occurrences="1">
|
||||
<code>new TPositiveInt()</code>
|
||||
</DeprecatedClass>
|
||||
<PossiblyUndefinedIntArrayOffset occurrences="6">
|
||||
<code>$combination->array_type_params[1]</code>
|
||||
<code>$combination->array_type_params[1]</code>
|
||||
@ -611,6 +641,9 @@
|
||||
</PossiblyUndefinedIntArrayOffset>
|
||||
</file>
|
||||
<file src="src/Psalm/Internal/Type/TypeParser.php">
|
||||
<DeprecatedClass occurrences="1">
|
||||
<code>new TPositiveInt()</code>
|
||||
</DeprecatedClass>
|
||||
<PossiblyUndefinedIntArrayOffset occurrences="9">
|
||||
<code>$intersection_types[0]</code>
|
||||
<code>$parse_tree->children[0]</code>
|
||||
@ -623,12 +656,6 @@
|
||||
<code>array_keys($template_type_map[$template_param_name])[0]</code>
|
||||
</PossiblyUndefinedIntArrayOffset>
|
||||
</file>
|
||||
<file src="src/Psalm/PluginRegistrationSocket.php">
|
||||
<DeprecatedMethod occurrences="2">
|
||||
<code>addFileExtension</code>
|
||||
<code>addFileExtension</code>
|
||||
</DeprecatedMethod>
|
||||
</file>
|
||||
<file src="src/Psalm/Node/Stmt/VirtualClass.php">
|
||||
<PropertyNotSetInConstructor occurrences="1">
|
||||
<code>VirtualClass</code>
|
||||
@ -654,22 +681,30 @@
|
||||
<code>VirtualConst</code>
|
||||
</PropertyNotSetInConstructor>
|
||||
</file>
|
||||
<file src="src/Psalm/PluginRegistrationSocket.php">
|
||||
<DeprecatedMethod occurrences="2">
|
||||
<code>addFileExtension</code>
|
||||
<code>addFileExtension</code>
|
||||
</DeprecatedMethod>
|
||||
</file>
|
||||
<file src="src/Psalm/Storage/Assertion.php">
|
||||
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
||||
<code>$rules[0]</code>
|
||||
</PossiblyUndefinedIntArrayOffset>
|
||||
</file>
|
||||
<file src="src/Psalm/Type.php">
|
||||
<DeprecatedClass occurrences="3">
|
||||
<DeprecatedClass occurrences="4">
|
||||
<code>new TEmpty</code>
|
||||
<code>new TEmpty</code>
|
||||
<code>new TEmpty()</code>
|
||||
<code>new TPositiveInt()</code>
|
||||
</DeprecatedClass>
|
||||
</file>
|
||||
<file src="src/Psalm/Type/Atomic.php">
|
||||
<DeprecatedClass occurrences="2">
|
||||
<DeprecatedClass occurrences="3">
|
||||
<code>new TEmpty()</code>
|
||||
<code>new THtmlEscapedString()</code>
|
||||
<code>new TPositiveInt()</code>
|
||||
</DeprecatedClass>
|
||||
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
||||
<code>array_keys($template_type_map[$value])[0]</code>
|
||||
|
@ -196,6 +196,7 @@ abstract class Type
|
||||
return new Union([$type]);
|
||||
}
|
||||
|
||||
/** @deprecated will be removed in Psalm 5 */
|
||||
public static function getPositiveInt(bool $from_calculation = false): Union
|
||||
{
|
||||
$union = new Union([new TPositiveInt()]);
|
||||
|
@ -4,6 +4,7 @@ namespace Psalm\Type\Atomic;
|
||||
|
||||
/**
|
||||
* Denotes an int that is also positive (strictly > 0)
|
||||
* @deprecated will be removed in Psalm 5
|
||||
*/
|
||||
class TPositiveInt extends TInt
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user