diff --git a/.phpstan-dba-mysqli.cache b/.phpstan-dba-mysqli.cache index e9c026a0e..8ad0e7e9d 100644 --- a/.phpstan-dba-mysqli.cache +++ b/.phpstan-dba-mysqli.cache @@ -3,6 +3,207 @@ 'schemaHash' => 'f8243f08e312cc01a89e4e0e639e78ef', 'records' => array ( + 'SELECT + coalesce(COLUMN_NAME, "") as COLUMN_NAME, + coalesce(EXTRA, "") as EXTRA, + COLUMN_TYPE + FROM information_schema.columns + WHERE table_name = \'1970-01-01\' AND table_schema = DATABASE()' => + array ( + 'result' => + array ( + 5 => + PHPStan\Type\Constant\ConstantArrayType::__set_state(array( + 'keyType' => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 2 => '0|1|2|\'COLUMN_NAME\'|\'COLUMN_TYPE\'|\'EXTRA\'', + 1 => 'int|string', + ), + 'types' => + array ( + 0 => + PHPStan\Type\Constant\ConstantIntegerType::__set_state(array( + 'value' => 0, + )), + 1 => + PHPStan\Type\Constant\ConstantIntegerType::__set_state(array( + 'value' => 1, + )), + 2 => + PHPStan\Type\Constant\ConstantIntegerType::__set_state(array( + 'value' => 2, + )), + 3 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'COLUMN_NAME', + 'isClassString' => false, + )), + 'value' => 'COLUMN_NAME', + 'isClassString' => false, + )), + 'value' => 'COLUMN_NAME', + 'isClassString' => false, + )), + 4 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'COLUMN_TYPE', + 'isClassString' => false, + )), + 'value' => 'COLUMN_TYPE', + 'isClassString' => false, + )), + 'value' => 'COLUMN_TYPE', + 'isClassString' => false, + )), + 5 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'EXTRA', + 'isClassString' => false, + )), + 'value' => 'EXTRA', + 'isClassString' => false, + )), + 'value' => 'EXTRA', + 'isClassString' => false, + )), + ), + 'normalized' => false, + )), + 'itemType' => + PHPStan\Type\StringType::__set_state(array( + )), + 'allArrays' => NULL, + 'nextAutoIndexes' => + array ( + 0 => 3, + ), + 'keyTypes' => + array ( + 0 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'COLUMN_NAME', + 'isClassString' => false, + )), + 'value' => 'COLUMN_NAME', + 'isClassString' => false, + )), + 'value' => 'COLUMN_NAME', + 'isClassString' => false, + )), + 1 => + PHPStan\Type\Constant\ConstantIntegerType::__set_state(array( + 'value' => 0, + )), + 2 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'EXTRA', + 'isClassString' => false, + )), + 'value' => 'EXTRA', + 'isClassString' => false, + )), + 'value' => 'EXTRA', + 'isClassString' => false, + )), + 3 => + PHPStan\Type\Constant\ConstantIntegerType::__set_state(array( + 'value' => 1, + )), + 4 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'COLUMN_TYPE', + 'isClassString' => false, + )), + 'value' => 'COLUMN_TYPE', + 'isClassString' => false, + )), + 'value' => 'COLUMN_TYPE', + 'isClassString' => false, + )), + 5 => + PHPStan\Type\Constant\ConstantIntegerType::__set_state(array( + 'value' => 2, + )), + ), + 'valueTypes' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\StringType::__set_state(array( + )), + 2 => + PHPStan\Type\StringType::__set_state(array( + )), + 3 => + PHPStan\Type\StringType::__set_state(array( + )), + 4 => + PHPStan\Type\StringType::__set_state(array( + )), + 5 => + PHPStan\Type\StringType::__set_state(array( + )), + ), + 'optionalKeys' => + array ( + ), + 'isList' => false, + )), + ), + ), 'SELECT MD5( GROUP_CONCAT( @@ -172,6 +373,319 @@ ), 'isList' => false, )), + 3 => + PHPStan\Type\Constant\ConstantArrayType::__set_state(array( + 'keyType' => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 2 => '\'dbsignature\'|\'grouper\'', + 1 => 'string', + ), + 'types' => + array ( + 0 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'dbsignature', + 'isClassString' => false, + )), + 1 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'grouper', + 'isClassString' => false, + )), + ), + 'normalized' => false, + )), + 'itemType' => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 1 => 'int<-128, 127>|string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -128, + 'max' => 127, + )), + 1 => + PHPStan\Type\StringType::__set_state(array( + )), + 2 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 'allArrays' => NULL, + 'nextAutoIndexes' => + array ( + 0 => 0, + ), + 'keyTypes' => + array ( + 0 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'dbsignature', + 'isClassString' => false, + )), + 1 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'grouper', + 'isClassString' => false, + )), + ), + 'valueTypes' => + array ( + 0 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'string|null', + 3 => 'string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 1 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -128, + 'max' => 127, + )), + ), + 'optionalKeys' => + array ( + ), + 'isList' => false, + )), + ), + ), + 'SELECT column_name, column_default, is_nullable + FROM information_schema.columns + WHERE table_name = \'1970-01-01\'' => + array ( + 'result' => + array ( + 5 => + PHPStan\Type\Constant\ConstantArrayType::__set_state(array( + 'keyType' => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 2 => '0|1|2|\'column_default\'|\'column_name\'|\'is_nullable\'', + 1 => 'int|string', + ), + 'types' => + array ( + 0 => + PHPStan\Type\Constant\ConstantIntegerType::__set_state(array( + 'value' => 0, + )), + 1 => + PHPStan\Type\Constant\ConstantIntegerType::__set_state(array( + 'value' => 1, + )), + 2 => + PHPStan\Type\Constant\ConstantIntegerType::__set_state(array( + 'value' => 2, + )), + 3 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'column_default', + 'isClassString' => false, + )), + 'value' => 'column_default', + 'isClassString' => false, + )), + 4 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'column_name', + 'isClassString' => false, + )), + 'value' => 'column_name', + 'isClassString' => false, + )), + 5 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'is_nullable', + 'isClassString' => false, + )), + 'value' => 'is_nullable', + 'isClassString' => false, + )), + ), + 'normalized' => false, + )), + 'itemType' => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 1 => 'string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 'allArrays' => NULL, + 'nextAutoIndexes' => + array ( + 0 => 3, + ), + 'keyTypes' => + array ( + 0 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'column_name', + 'isClassString' => false, + )), + 'value' => 'column_name', + 'isClassString' => false, + )), + 1 => + PHPStan\Type\Constant\ConstantIntegerType::__set_state(array( + 'value' => 0, + )), + 2 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'column_default', + 'isClassString' => false, + )), + 'value' => 'column_default', + 'isClassString' => false, + )), + 3 => + PHPStan\Type\Constant\ConstantIntegerType::__set_state(array( + 'value' => 1, + )), + 4 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'is_nullable', + 'isClassString' => false, + )), + 'value' => 'is_nullable', + 'isClassString' => false, + )), + 5 => + PHPStan\Type\Constant\ConstantIntegerType::__set_state(array( + 'value' => 2, + )), + ), + 'valueTypes' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\StringType::__set_state(array( + )), + 2 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 3 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 4 => + PHPStan\Type\StringType::__set_state(array( + )), + 5 => + PHPStan\Type\StringType::__set_state(array( + )), + ), + 'optionalKeys' => + array ( + ), + 'isList' => false, + )), ), ), ), diff --git a/.phpstan-dba-pdo-mysql.cache b/.phpstan-dba-pdo-mysql.cache index 842a4e8cc..4a440dcf6 100644 --- a/.phpstan-dba-pdo-mysql.cache +++ b/.phpstan-dba-pdo-mysql.cache @@ -267,12 +267,14 @@ 'sortedTypes' => true, 'cachedDescriptions' => array ( - 1 => 'int|string|null', + 1 => 'int<-128, 127>|string|null', ), 'types' => array ( 0 => - PHPStan\Type\IntegerType::__set_state(array( + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -128, + 'max' => 127, )), 1 => PHPStan\Type\StringType::__set_state(array( @@ -356,10 +358,14 @@ 'normalized' => true, )), 2 => - PHPStan\Type\IntegerType::__set_state(array( + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -128, + 'max' => 127, )), 3 => - PHPStan\Type\IntegerType::__set_state(array( + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -128, + 'max' => 127, )), ), 'optionalKeys' => @@ -401,12 +407,14 @@ 'sortedTypes' => true, 'cachedDescriptions' => array ( - 1 => 'int|string|null', + 1 => 'int<-128, 127>|string|null', ), 'types' => array ( 0 => - PHPStan\Type\IntegerType::__set_state(array( + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -128, + 'max' => 127, )), 1 => PHPStan\Type\StringType::__set_state(array( @@ -461,7 +469,9 @@ 'normalized' => true, )), 1 => - PHPStan\Type\IntegerType::__set_state(array( + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -128, + 'max' => 127, )), ), 'optionalKeys' => @@ -484,7 +494,7 @@ 'sortedTypes' => true, 'cachedDescriptions' => array ( - 2 => '0|1|2|\'COLUMN_DEFAULT\'|\'COLUMN_NAME\'|\'IS_NULLABLE\'', + 2 => '0|1|2|\'column_default\'|\'column_name\'|\'is_nullable\'', 1 => 'int|string', ), 'types' => @@ -508,10 +518,10 @@ PHPStan\Type\Constant\ConstantStringType::__set_state(array( 'objectType' => NULL, 'arrayKeyType' => NULL, - 'value' => 'COLUMN_DEFAULT', + 'value' => 'column_default', 'isClassString' => false, )), - 'value' => 'COLUMN_DEFAULT', + 'value' => 'column_default', 'isClassString' => false, )), 4 => @@ -521,10 +531,10 @@ PHPStan\Type\Constant\ConstantStringType::__set_state(array( 'objectType' => NULL, 'arrayKeyType' => NULL, - 'value' => 'COLUMN_NAME', + 'value' => 'column_name', 'isClassString' => false, )), - 'value' => 'COLUMN_NAME', + 'value' => 'column_name', 'isClassString' => false, )), 5 => @@ -534,10 +544,10 @@ PHPStan\Type\Constant\ConstantStringType::__set_state(array( 'objectType' => NULL, 'arrayKeyType' => NULL, - 'value' => 'IS_NULLABLE', + 'value' => 'is_nullable', 'isClassString' => false, )), - 'value' => 'IS_NULLABLE', + 'value' => 'is_nullable', 'isClassString' => false, )), ), @@ -575,10 +585,10 @@ PHPStan\Type\Constant\ConstantStringType::__set_state(array( 'objectType' => NULL, 'arrayKeyType' => NULL, - 'value' => 'COLUMN_NAME', + 'value' => 'column_name', 'isClassString' => false, )), - 'value' => 'COLUMN_NAME', + 'value' => 'column_name', 'isClassString' => false, )), 1 => @@ -592,10 +602,10 @@ PHPStan\Type\Constant\ConstantStringType::__set_state(array( 'objectType' => NULL, 'arrayKeyType' => NULL, - 'value' => 'COLUMN_DEFAULT', + 'value' => 'column_default', 'isClassString' => false, )), - 'value' => 'COLUMN_DEFAULT', + 'value' => 'column_default', 'isClassString' => false, )), 3 => @@ -609,10 +619,10 @@ PHPStan\Type\Constant\ConstantStringType::__set_state(array( 'objectType' => NULL, 'arrayKeyType' => NULL, - 'value' => 'IS_NULLABLE', + 'value' => 'is_nullable', 'isClassString' => false, )), - 'value' => 'IS_NULLABLE', + 'value' => 'is_nullable', 'isClassString' => false, )), 5 => @@ -623,40 +633,10 @@ 'valueTypes' => array ( 0 => - PHPStan\Type\UnionType::__set_state(array( - 'sortedTypes' => true, - 'cachedDescriptions' => - array ( - 4 => 'string|null', - ), - 'types' => - array ( - 0 => - PHPStan\Type\StringType::__set_state(array( - )), - 1 => - PHPStan\Type\NullType::__set_state(array( - )), - ), - 'normalized' => true, + PHPStan\Type\StringType::__set_state(array( )), 1 => - PHPStan\Type\UnionType::__set_state(array( - 'sortedTypes' => true, - 'cachedDescriptions' => - array ( - 4 => 'string|null', - ), - 'types' => - array ( - 0 => - PHPStan\Type\StringType::__set_state(array( - )), - 1 => - PHPStan\Type\NullType::__set_state(array( - )), - ), - 'normalized' => true, + PHPStan\Type\StringType::__set_state(array( )), 2 => PHPStan\Type\UnionType::__set_state(array( diff --git a/tests/default/DbaInferenceTest.php b/tests/default/DbaInferenceTest.php index 6f56ad1a6..01660c4fe 100644 --- a/tests/default/DbaInferenceTest.php +++ b/tests/default/DbaInferenceTest.php @@ -27,8 +27,10 @@ public function dataFileAsserts(): iterable if ('pdo-pgsql' === getenv('DBA_REFLECTOR')) { yield from $this->gatherAssertTypes(__DIR__ . '/data/pdo-pgsql.php'); + yield from $this->gatherAssertTypes(__DIR__ . '/data/typemix-pgsql.php'); } else { yield from $this->gatherAssertTypes(__DIR__ . '/data/pdo-mysql.php'); + yield from $this->gatherAssertTypes(__DIR__ . '/data/typemix-mysql.php'); } // DbaApi related tests cannot be replayed, because cache file keys do not reflect the used DbaApi diff --git a/tests/default/config/.phpunit-phpstan-dba-mysqli.cache b/tests/default/config/.phpunit-phpstan-dba-mysqli.cache index 070cc1c98..ee4156997 100644 --- a/tests/default/config/.phpunit-phpstan-dba-mysqli.cache +++ b/tests/default/config/.phpunit-phpstan-dba-mysqli.cache @@ -443,6 +443,1007 @@ array ( 'result' => array ( + 3 => + PHPStan\Type\Constant\ConstantArrayType::__set_state(array( + 'keyType' => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 2 => '\'c_bigint\'|\'c_bit\'|\'c_blob\'|\'c_boolean\'|\'c_char5\'|\'c_date\'|\'c_datetime\'|\'c_decimal\'|\'c_decimal_not_null\'|\'c_double\'|\'c_enum\'|\'c_float\'|\'c_int\'|\'c_json\'|\'c_json_not_null\'|\'c_long_text\'|\'c_longblob\'|\'c_medium_text\'|\'c_mediumblog\'|\'c_mediumint\'|\'c_real\'|\'c_set\'|\'c_smallint\'|\'c_text\'|\'c_time\'|\'c_timestamp\'|\'c_tiny_text\'|\'c_tinyblob\'|\'c_tinyint\'|\'c_unsigned_bigint\'|\'c_unsigned_int\'|\'c_unsigned_mediumint\'|\'c_unsigned_smallint\'|\'c_unsigned_tinyint\'|\'c_varbinary25\'|\'c_varbinary255\'|\'c_varchar25\'|\'c_varchar255\'|\'c_year\'|\'pid\'', + ), + 'types' => + array ( + 0 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_bigint', + 'isClassString' => false, + )), + 1 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_bit', + 'isClassString' => false, + )), + 2 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_blob', + 'isClassString' => false, + )), + 3 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_boolean', + 'isClassString' => false, + )), + 4 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_char5', + 'isClassString' => false, + )), + 5 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_date', + 'isClassString' => false, + )), + 6 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_datetime', + 'isClassString' => false, + )), + 7 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_decimal', + 'isClassString' => false, + )), + 8 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_decimal_not_null', + 'isClassString' => false, + )), + 9 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_double', + 'isClassString' => false, + )), + 10 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_enum', + 'isClassString' => false, + )), + 11 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_float', + 'isClassString' => false, + )), + 12 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_int', + 'isClassString' => false, + )), + 13 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_json', + 'isClassString' => false, + )), + 14 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_json_not_null', + 'isClassString' => false, + )), + 15 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_long_text', + 'isClassString' => false, + )), + 16 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_longblob', + 'isClassString' => false, + )), + 17 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_medium_text', + 'isClassString' => false, + )), + 18 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_mediumblog', + 'isClassString' => false, + )), + 19 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_mediumint', + 'isClassString' => false, + )), + 20 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_real', + 'isClassString' => false, + )), + 21 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_set', + 'isClassString' => false, + )), + 22 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_smallint', + 'isClassString' => false, + )), + 23 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_text', + 'isClassString' => false, + )), + 24 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_time', + 'isClassString' => false, + )), + 25 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_timestamp', + 'isClassString' => false, + )), + 26 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_tiny_text', + 'isClassString' => false, + )), + 27 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_tinyblob', + 'isClassString' => false, + )), + 28 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_tinyint', + 'isClassString' => false, + )), + 29 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_unsigned_bigint', + 'isClassString' => false, + )), + 30 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_unsigned_int', + 'isClassString' => false, + )), + 31 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_unsigned_mediumint', + 'isClassString' => false, + )), + 32 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_unsigned_smallint', + 'isClassString' => false, + )), + 33 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_unsigned_tinyint', + 'isClassString' => false, + )), + 34 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_varbinary25', + 'isClassString' => false, + )), + 35 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_varbinary255', + 'isClassString' => false, + )), + 36 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_varchar25', + 'isClassString' => false, + )), + 37 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_varchar255', + 'isClassString' => false, + )), + 38 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_year', + 'isClassString' => false, + )), + 39 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'pid', + 'isClassString' => false, + )), + ), + 'normalized' => false, + )), + 'itemType' => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => false, + 'cachedDescriptions' => + array ( + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\FloatType::__set_state(array( + )), + 2 => + PHPStan\Type\IntegerType::__set_state(array( + )), + 3 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 'allArrays' => NULL, + 'nextAutoIndexes' => + array ( + 0 => 0, + ), + 'keyTypes' => + array ( + 0 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'pid', + 'isClassString' => false, + )), + 1 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_char5', + 'isClassString' => false, + )), + 2 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_varchar255', + 'isClassString' => false, + )), + 3 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_varchar25', + 'isClassString' => false, + )), + 4 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_varbinary255', + 'isClassString' => false, + )), + 5 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_varbinary25', + 'isClassString' => false, + )), + 6 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_date', + 'isClassString' => false, + )), + 7 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_time', + 'isClassString' => false, + )), + 8 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_datetime', + 'isClassString' => false, + )), + 9 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_timestamp', + 'isClassString' => false, + )), + 10 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_year', + 'isClassString' => false, + )), + 11 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_tiny_text', + 'isClassString' => false, + )), + 12 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_medium_text', + 'isClassString' => false, + )), + 13 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_text', + 'isClassString' => false, + )), + 14 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_long_text', + 'isClassString' => false, + )), + 15 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_enum', + 'isClassString' => false, + )), + 16 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_set', + 'isClassString' => false, + )), + 17 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_bit', + 'isClassString' => false, + )), + 18 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_int', + 'isClassString' => false, + )), + 19 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_tinyint', + 'isClassString' => false, + )), + 20 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_smallint', + 'isClassString' => false, + )), + 21 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_mediumint', + 'isClassString' => false, + )), + 22 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_bigint', + 'isClassString' => false, + )), + 23 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_double', + 'isClassString' => false, + )), + 24 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_real', + 'isClassString' => false, + )), + 25 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_float', + 'isClassString' => false, + )), + 26 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_boolean', + 'isClassString' => false, + )), + 27 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_blob', + 'isClassString' => false, + )), + 28 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_tinyblob', + 'isClassString' => false, + )), + 29 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_mediumblog', + 'isClassString' => false, + )), + 30 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_longblob', + 'isClassString' => false, + )), + 31 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_unsigned_tinyint', + 'isClassString' => false, + )), + 32 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_unsigned_int', + 'isClassString' => false, + )), + 33 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_unsigned_smallint', + 'isClassString' => false, + )), + 34 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_unsigned_mediumint', + 'isClassString' => false, + )), + 35 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_unsigned_bigint', + 'isClassString' => false, + )), + 36 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_json', + 'isClassString' => false, + )), + 37 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_json_not_null', + 'isClassString' => false, + )), + 38 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_decimal', + 'isClassString' => false, + )), + 39 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_decimal_not_null', + 'isClassString' => false, + )), + ), + 'valueTypes' => + array ( + 0 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => 0, + 'max' => 4294967295, + )), + 1 => + PHPStan\Type\StringType::__set_state(array( + )), + 2 => + PHPStan\Type\StringType::__set_state(array( + )), + 3 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'string|null', + 3 => 'string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 4 => + PHPStan\Type\StringType::__set_state(array( + )), + 5 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'string|null', + 3 => 'string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 6 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'string|null', + 3 => 'string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 7 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'string|null', + 3 => 'string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 8 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'string|null', + 3 => 'string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 9 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'string|null', + 3 => 'string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 10 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'int<0, 2155>|null', + 3 => 'int<0, 2155>|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => 0, + 'max' => 2155, + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 11 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'string|null', + 3 => 'string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 12 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'string|null', + 3 => 'string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 13 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'string|null', + 3 => 'string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 14 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'string|null', + 3 => 'string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 15 => + PHPStan\Type\StringType::__set_state(array( + )), + 16 => + PHPStan\Type\StringType::__set_state(array( + )), + 17 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'int|null', + 3 => 'int|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\IntegerType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 18 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -2147483648, + 'max' => 2147483647, + )), + 19 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -128, + 'max' => 127, + )), + 20 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -32768, + 'max' => 32767, + )), + 21 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -8388608, + 'max' => 8388607, + )), + 22 => + PHPStan\Type\IntegerType::__set_state(array( + )), + 23 => + PHPStan\Type\FloatType::__set_state(array( + )), + 24 => + PHPStan\Type\FloatType::__set_state(array( + )), + 25 => + PHPStan\Type\FloatType::__set_state(array( + )), + 26 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -128, + 'max' => 127, + )), + 27 => + PHPStan\Type\StringType::__set_state(array( + )), + 28 => + PHPStan\Type\StringType::__set_state(array( + )), + 29 => + PHPStan\Type\StringType::__set_state(array( + )), + 30 => + PHPStan\Type\StringType::__set_state(array( + )), + 31 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => 0, + 'max' => 255, + )), + 32 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => 0, + 'max' => 4294967295, + )), + 33 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => 0, + 'max' => 65535, + )), + 34 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => 0, + 'max' => 16777215, + )), + 35 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => 0, + 'max' => NULL, + )), + 36 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'string|null', + 3 => 'string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 37 => + PHPStan\Type\StringType::__set_state(array( + )), + 38 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'numeric-string|null', + 3 => 'numeric-string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\IntersectionType::__set_state(array( + 'sortedTypes' => true, + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\Accessory\AccessoryNumericStringType::__set_state(array( + )), + ), + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 39 => + PHPStan\Type\IntersectionType::__set_state(array( + 'sortedTypes' => true, + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\Accessory\AccessoryNumericStringType::__set_state(array( + )), + ), + )), + ), + 'optionalKeys' => + array ( + ), + 'isList' => false, + )), 5 => PHPStan\Type\Constant\ConstantArrayType::__set_state(array( 'keyType' => diff --git a/tests/default/config/.phpunit-phpstan-dba-pdo-mysql.cache b/tests/default/config/.phpunit-phpstan-dba-pdo-mysql.cache index 5a0f4bbdd..77ad492f0 100644 --- a/tests/default/config/.phpunit-phpstan-dba-pdo-mysql.cache +++ b/tests/default/config/.phpunit-phpstan-dba-pdo-mysql.cache @@ -443,6 +443,1007 @@ array ( 'result' => array ( + 3 => + PHPStan\Type\Constant\ConstantArrayType::__set_state(array( + 'keyType' => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 2 => '\'c_bigint\'|\'c_bit\'|\'c_blob\'|\'c_boolean\'|\'c_char5\'|\'c_date\'|\'c_datetime\'|\'c_decimal\'|\'c_decimal_not_null\'|\'c_double\'|\'c_enum\'|\'c_float\'|\'c_int\'|\'c_json\'|\'c_json_not_null\'|\'c_long_text\'|\'c_longblob\'|\'c_medium_text\'|\'c_mediumblog\'|\'c_mediumint\'|\'c_real\'|\'c_set\'|\'c_smallint\'|\'c_text\'|\'c_time\'|\'c_timestamp\'|\'c_tiny_text\'|\'c_tinyblob\'|\'c_tinyint\'|\'c_unsigned_bigint\'|\'c_unsigned_int\'|\'c_unsigned_mediumint\'|\'c_unsigned_smallint\'|\'c_unsigned_tinyint\'|\'c_varbinary25\'|\'c_varbinary255\'|\'c_varchar25\'|\'c_varchar255\'|\'c_year\'|\'pid\'', + ), + 'types' => + array ( + 0 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_bigint', + 'isClassString' => false, + )), + 1 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_bit', + 'isClassString' => false, + )), + 2 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_blob', + 'isClassString' => false, + )), + 3 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_boolean', + 'isClassString' => false, + )), + 4 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_char5', + 'isClassString' => false, + )), + 5 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_date', + 'isClassString' => false, + )), + 6 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_datetime', + 'isClassString' => false, + )), + 7 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_decimal', + 'isClassString' => false, + )), + 8 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_decimal_not_null', + 'isClassString' => false, + )), + 9 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_double', + 'isClassString' => false, + )), + 10 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_enum', + 'isClassString' => false, + )), + 11 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_float', + 'isClassString' => false, + )), + 12 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_int', + 'isClassString' => false, + )), + 13 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_json', + 'isClassString' => false, + )), + 14 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_json_not_null', + 'isClassString' => false, + )), + 15 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_long_text', + 'isClassString' => false, + )), + 16 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_longblob', + 'isClassString' => false, + )), + 17 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_medium_text', + 'isClassString' => false, + )), + 18 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_mediumblog', + 'isClassString' => false, + )), + 19 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_mediumint', + 'isClassString' => false, + )), + 20 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_real', + 'isClassString' => false, + )), + 21 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_set', + 'isClassString' => false, + )), + 22 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_smallint', + 'isClassString' => false, + )), + 23 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_text', + 'isClassString' => false, + )), + 24 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_time', + 'isClassString' => false, + )), + 25 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_timestamp', + 'isClassString' => false, + )), + 26 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_tiny_text', + 'isClassString' => false, + )), + 27 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_tinyblob', + 'isClassString' => false, + )), + 28 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_tinyint', + 'isClassString' => false, + )), + 29 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_unsigned_bigint', + 'isClassString' => false, + )), + 30 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_unsigned_int', + 'isClassString' => false, + )), + 31 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_unsigned_mediumint', + 'isClassString' => false, + )), + 32 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_unsigned_smallint', + 'isClassString' => false, + )), + 33 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_unsigned_tinyint', + 'isClassString' => false, + )), + 34 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_varbinary25', + 'isClassString' => false, + )), + 35 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_varbinary255', + 'isClassString' => false, + )), + 36 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_varchar25', + 'isClassString' => false, + )), + 37 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_varchar255', + 'isClassString' => false, + )), + 38 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_year', + 'isClassString' => false, + )), + 39 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'pid', + 'isClassString' => false, + )), + ), + 'normalized' => false, + )), + 'itemType' => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => false, + 'cachedDescriptions' => + array ( + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\FloatType::__set_state(array( + )), + 2 => + PHPStan\Type\IntegerType::__set_state(array( + )), + 3 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 'allArrays' => NULL, + 'nextAutoIndexes' => + array ( + 0 => 0, + ), + 'keyTypes' => + array ( + 0 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'pid', + 'isClassString' => false, + )), + 1 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_char5', + 'isClassString' => false, + )), + 2 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_varchar255', + 'isClassString' => false, + )), + 3 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_varchar25', + 'isClassString' => false, + )), + 4 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_varbinary255', + 'isClassString' => false, + )), + 5 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_varbinary25', + 'isClassString' => false, + )), + 6 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_date', + 'isClassString' => false, + )), + 7 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_time', + 'isClassString' => false, + )), + 8 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_datetime', + 'isClassString' => false, + )), + 9 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_timestamp', + 'isClassString' => false, + )), + 10 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_year', + 'isClassString' => false, + )), + 11 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_tiny_text', + 'isClassString' => false, + )), + 12 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_medium_text', + 'isClassString' => false, + )), + 13 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_text', + 'isClassString' => false, + )), + 14 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_long_text', + 'isClassString' => false, + )), + 15 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_enum', + 'isClassString' => false, + )), + 16 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_set', + 'isClassString' => false, + )), + 17 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_bit', + 'isClassString' => false, + )), + 18 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_int', + 'isClassString' => false, + )), + 19 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_tinyint', + 'isClassString' => false, + )), + 20 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_smallint', + 'isClassString' => false, + )), + 21 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_mediumint', + 'isClassString' => false, + )), + 22 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_bigint', + 'isClassString' => false, + )), + 23 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_double', + 'isClassString' => false, + )), + 24 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_real', + 'isClassString' => false, + )), + 25 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_float', + 'isClassString' => false, + )), + 26 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_boolean', + 'isClassString' => false, + )), + 27 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_blob', + 'isClassString' => false, + )), + 28 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_tinyblob', + 'isClassString' => false, + )), + 29 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_mediumblog', + 'isClassString' => false, + )), + 30 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_longblob', + 'isClassString' => false, + )), + 31 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_unsigned_tinyint', + 'isClassString' => false, + )), + 32 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_unsigned_int', + 'isClassString' => false, + )), + 33 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_unsigned_smallint', + 'isClassString' => false, + )), + 34 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_unsigned_mediumint', + 'isClassString' => false, + )), + 35 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_unsigned_bigint', + 'isClassString' => false, + )), + 36 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_json', + 'isClassString' => false, + )), + 37 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_json_not_null', + 'isClassString' => false, + )), + 38 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_decimal', + 'isClassString' => false, + )), + 39 => + PHPStan\Type\Constant\ConstantStringType::__set_state(array( + 'objectType' => NULL, + 'arrayKeyType' => NULL, + 'value' => 'c_decimal_not_null', + 'isClassString' => false, + )), + ), + 'valueTypes' => + array ( + 0 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => 0, + 'max' => 4294967295, + )), + 1 => + PHPStan\Type\StringType::__set_state(array( + )), + 2 => + PHPStan\Type\StringType::__set_state(array( + )), + 3 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'string|null', + 3 => 'string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 4 => + PHPStan\Type\StringType::__set_state(array( + )), + 5 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'string|null', + 3 => 'string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 6 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'string|null', + 3 => 'string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 7 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'string|null', + 3 => 'string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 8 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'string|null', + 3 => 'string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 9 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'string|null', + 3 => 'string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 10 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'int<0, 2155>|null', + 3 => 'int<0, 2155>|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => 0, + 'max' => 2155, + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 11 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'string|null', + 3 => 'string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 12 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'string|null', + 3 => 'string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 13 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'string|null', + 3 => 'string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 14 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'string|null', + 3 => 'string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 15 => + PHPStan\Type\StringType::__set_state(array( + )), + 16 => + PHPStan\Type\StringType::__set_state(array( + )), + 17 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'int|null', + 3 => 'int|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\IntegerType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 18 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -2147483648, + 'max' => 2147483647, + )), + 19 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -128, + 'max' => 127, + )), + 20 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -32768, + 'max' => 32767, + )), + 21 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -8388608, + 'max' => 8388607, + )), + 22 => + PHPStan\Type\IntegerType::__set_state(array( + )), + 23 => + PHPStan\Type\FloatType::__set_state(array( + )), + 24 => + PHPStan\Type\FloatType::__set_state(array( + )), + 25 => + PHPStan\Type\FloatType::__set_state(array( + )), + 26 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -128, + 'max' => 127, + )), + 27 => + PHPStan\Type\StringType::__set_state(array( + )), + 28 => + PHPStan\Type\StringType::__set_state(array( + )), + 29 => + PHPStan\Type\StringType::__set_state(array( + )), + 30 => + PHPStan\Type\StringType::__set_state(array( + )), + 31 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => 0, + 'max' => 255, + )), + 32 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => 0, + 'max' => 4294967295, + )), + 33 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => 0, + 'max' => 65535, + )), + 34 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => 0, + 'max' => 16777215, + )), + 35 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => 0, + 'max' => NULL, + )), + 36 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'string|null', + 3 => 'string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 37 => + PHPStan\Type\StringType::__set_state(array( + )), + 38 => + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => true, + 'cachedDescriptions' => + array ( + 4 => 'numeric-string|null', + 3 => 'numeric-string|null', + ), + 'types' => + array ( + 0 => + PHPStan\Type\IntersectionType::__set_state(array( + 'sortedTypes' => true, + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\Accessory\AccessoryNumericStringType::__set_state(array( + )), + ), + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, + )), + 39 => + PHPStan\Type\IntersectionType::__set_state(array( + 'sortedTypes' => true, + 'types' => + array ( + 0 => + PHPStan\Type\StringType::__set_state(array( + )), + 1 => + PHPStan\Type\Accessory\AccessoryNumericStringType::__set_state(array( + )), + ), + )), + ), + 'optionalKeys' => + array ( + ), + 'isList' => false, + )), 5 => PHPStan\Type\Constant\ConstantArrayType::__set_state(array( 'keyType' => diff --git a/tests/default/data/pdo-mysql.php b/tests/default/data/pdo-mysql.php index 139d326e1..c2bb85ee1 100644 --- a/tests/default/data/pdo-mysql.php +++ b/tests/default/data/pdo-mysql.php @@ -15,12 +15,6 @@ public function execute(PDO $pdo) assertType('PDOStatement, 1: int<-32768, 32767>}>', $stmt); } - public function mysqlTypes(PDO $pdo) - { - $stmt = $pdo->query('SELECT * FROM typemix', PDO::FETCH_ASSOC); - assertType('PDOStatement, c_char5: string, c_varchar255: string, c_varchar25: string|null, c_varbinary255: string, c_varbinary25: string|null, c_date: string|null, c_time: string|null, c_datetime: string|null, c_timestamp: string|null, c_year: int<0, 2155>|null, c_tiny_text: string|null, c_medium_text: string|null, c_text: string|null, c_long_text: string|null, c_enum: string, c_set: string, c_bit: int|null, c_int: int<-2147483648, 2147483647>, c_tinyint: int<-128, 127>, c_smallint: int<-32768, 32767>, c_mediumint: int<-8388608, 8388607>, c_bigint: int, c_double: float, c_real: float, c_float: float, c_boolean: int<-128, 127>, c_blob: string, c_tinyblob: string, c_mediumblog: string, c_longblob: string, c_unsigned_tinyint: int<0, 255>, c_unsigned_int: int<0, 4294967295>, c_unsigned_smallint: int<0, 65535>, c_unsigned_mediumint: int<0, 16777215>, c_unsigned_bigint: int<0, max>, c_json: string|null, c_json_not_null: string, c_decimal: numeric-string|null, c_decimal_not_null: numeric-string}>', $stmt); - } - public function aggregateFunctions(PDO $pdo) { $query = 'SELECT MAX(adaid), MIN(adaid), COUNT(adaid), AVG(adaid) FROM ada WHERE adaid = 1'; diff --git a/tests/default/data/typemix-mysql.php b/tests/default/data/typemix-mysql.php new file mode 100644 index 000000000..f8860319a --- /dev/null +++ b/tests/default/data/typemix-mysql.php @@ -0,0 +1,24 @@ +, c_char5: string, c_varchar255: string, c_varchar25: string|null, c_varbinary255: string, c_varbinary25: string|null, c_date: string|null, c_time: string|null, c_datetime: string|null, c_timestamp: string|null, c_year: int<0, 2155>|null, c_tiny_text: string|null, c_medium_text: string|null, c_text: string|null, c_long_text: string|null, c_enum: string, c_set: string, c_bit: int|null, c_int: int<-2147483648, 2147483647>, c_tinyint: int<-128, 127>, c_smallint: int<-32768, 32767>, c_mediumint: int<-8388608, 8388607>, c_bigint: int, c_double: float, c_real: float, c_float: float, c_boolean: int<-128, 127>, c_blob: string, c_tinyblob: string, c_mediumblog: string, c_longblob: string, c_unsigned_tinyint: int<0, 255>, c_unsigned_int: int<0, 4294967295>, c_unsigned_smallint: int<0, 65535>, c_unsigned_mediumint: int<0, 16777215>, c_unsigned_bigint: int<0, max>, c_json: string|null, c_json_not_null: string, c_decimal: numeric-string|null, c_decimal_not_null: numeric-string}'; + + public function typemixMysqli(mysqli $mysqli) + { + $result = mysqli_query($mysqli, 'SELECT * FROM typemix'); + assertType('mysqli_result<' . self::MYSQL_DATATYPES . '>', $result); + } + + public function typemixPdoMysql(PDO $pdo) + { + $stmt = $pdo->query('SELECT * FROM typemix', PDO::FETCH_ASSOC); + assertType('PDOStatement<' . self::MYSQL_DATATYPES . '>', $stmt); + } +} diff --git a/tests/default/data/typemix-pgsql.php b/tests/default/data/typemix-pgsql.php new file mode 100644 index 000000000..d3a3f5043 --- /dev/null +++ b/tests/default/data/typemix-pgsql.php @@ -0,0 +1,24 @@ +, c_varchar5: string, c_varchar25: string|null, c_varchar255: string, c_date: string|null, c_time: string|null, c_datetime: string|null, c_timestamp: string|null, c_text: string|null, c_enum: mixed, c_bit255: int, c_bit25: int|null, c_bit: int|null, c_int: int<-2147483648, 2147483647>, c_smallint: int<-32768, 32767>, c_bigint: int, c_float: float, c_boolean: bool, c_json: string, c_json_nullable: string|null, c_jsonb: string, c_jsonb_nullable: string|null}'; + + public function typemixMysqli(mysqli $mysqli) + { + $result = mysqli_query($mysqli, 'SELECT * FROM typemix'); + assertType('mysqli_result<' . self::PGSQL_DATATYPES . '>', $result); + } + + public function typemixPdoPgsql(PDO $pdo) + { + $stmt = $pdo->query('SELECT * FROM typemix', PDO::FETCH_ASSOC); + assertType('PDOStatement<' . self::PGSQL_DATATYPES . '>', $stmt); + } +} diff --git a/tests/sqlAst/config/.phpunit-phpstan-dba-mysqli.cache b/tests/sqlAst/config/.phpunit-phpstan-dba-mysqli.cache index b6036cb54..d5e227fa6 100644 --- a/tests/sqlAst/config/.phpunit-phpstan-dba-mysqli.cache +++ b/tests/sqlAst/config/.phpunit-phpstan-dba-mysqli.cache @@ -2416,9 +2416,23 @@ 'normalized' => false, )), 'itemType' => - PHPStan\Type\IntegerRangeType::__set_state(array( - 'min' => -2147483648, - 'max' => 2147483647, + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => false, + 'cachedDescriptions' => + array ( + ), + 'types' => + array ( + 0 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -2147483648, + 'max' => 2147483647, + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, )), 'allArrays' => NULL, 'nextAutoIndexes' => @@ -2442,14 +2456,42 @@ 'valueTypes' => array ( 0 => - PHPStan\Type\IntegerRangeType::__set_state(array( - 'min' => -2147483648, - 'max' => 2147483647, + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => false, + 'cachedDescriptions' => + array ( + ), + 'types' => + array ( + 0 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -2147483648, + 'max' => 2147483647, + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, )), 1 => - PHPStan\Type\IntegerRangeType::__set_state(array( - 'min' => -2147483648, - 'max' => 2147483647, + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => false, + 'cachedDescriptions' => + array ( + ), + 'types' => + array ( + 0 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -2147483648, + 'max' => 2147483647, + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, )), ), 'optionalKeys' => @@ -19790,7 +19832,9 @@ FROM ada' => 'normalized' => false, )), 'itemType' => - PHPStan\Type\IntegerType::__set_state(array( + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -32768, + 'max' => 32767, )), 'allArrays' => NULL, 'nextAutoIndexes' => @@ -19814,10 +19858,14 @@ FROM ada' => 'valueTypes' => array ( 0 => - PHPStan\Type\IntegerType::__set_state(array( + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -32768, + 'max' => 32767, )), 1 => - PHPStan\Type\IntegerType::__set_state(array( + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -32768, + 'max' => 32767, )), ), 'optionalKeys' => diff --git a/tests/sqlAst/config/.phpunit-phpstan-dba-pdo-mysql.cache b/tests/sqlAst/config/.phpunit-phpstan-dba-pdo-mysql.cache index 1e1cfbd4a..9475fdb55 100644 --- a/tests/sqlAst/config/.phpunit-phpstan-dba-pdo-mysql.cache +++ b/tests/sqlAst/config/.phpunit-phpstan-dba-pdo-mysql.cache @@ -1764,9 +1764,23 @@ 'normalized' => false, )), 'itemType' => - PHPStan\Type\IntegerRangeType::__set_state(array( - 'min' => -2147483648, - 'max' => 2147483647, + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => false, + 'cachedDescriptions' => + array ( + ), + 'types' => + array ( + 0 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -2147483648, + 'max' => 2147483647, + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, )), 'allArrays' => NULL, 'nextAutoIndexes' => @@ -1790,14 +1804,42 @@ 'valueTypes' => array ( 0 => - PHPStan\Type\IntegerRangeType::__set_state(array( - 'min' => -2147483648, - 'max' => 2147483647, + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => false, + 'cachedDescriptions' => + array ( + ), + 'types' => + array ( + 0 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -2147483648, + 'max' => 2147483647, + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, )), 1 => - PHPStan\Type\IntegerRangeType::__set_state(array( - 'min' => -2147483648, - 'max' => 2147483647, + PHPStan\Type\UnionType::__set_state(array( + 'sortedTypes' => false, + 'cachedDescriptions' => + array ( + ), + 'types' => + array ( + 0 => + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -2147483648, + 'max' => 2147483647, + )), + 1 => + PHPStan\Type\NullType::__set_state(array( + )), + ), + 'normalized' => true, )), ), 'optionalKeys' => @@ -17796,7 +17838,9 @@ FROM ada' => 'normalized' => false, )), 'itemType' => - PHPStan\Type\IntegerType::__set_state(array( + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -32768, + 'max' => 32767, )), 'allArrays' => NULL, 'nextAutoIndexes' => @@ -17820,10 +17864,14 @@ FROM ada' => 'valueTypes' => array ( 0 => - PHPStan\Type\IntegerType::__set_state(array( + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -32768, + 'max' => 32767, )), 1 => - PHPStan\Type\IntegerType::__set_state(array( + PHPStan\Type\IntegerRangeType::__set_state(array( + 'min' => -32768, + 'max' => 32767, )), ), 'optionalKeys' =>