Skip to content

Commit fef7d60

Browse files
authored
Drop thecodingmachine/safe (#783)
1 parent 77c04be commit fef7d60

28 files changed

+150
-632
lines changed

composer.json

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
"staabm/phpstan-dba": "0.2.85",
1515
"staabm/phpstan-todo-by": "0.2",
1616
"symplify/phpstan-rules": "12.7.0",
17-
"thecodingmachine/phpstan-safe-rule": "1.2",
18-
"thecodingmachine/safe": "1.3.3",
1917
"tomasvotruba/cognitive-complexity": "0.2.3",
2018
"tomasvotruba/type-coverage": "1.0.0",
2119
"tomasvotruba/unused-public": "1.1.0"

composer.lock

+16-75
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/collector/RexModuleInputVarsCollector.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ public function processNode(Node $node, Scope $scope)
2727
return null;
2828
}
2929

30-
return RexModuleVarsReflection::matchInputVars(\Safe\file_get_contents($scope->getFile()));
30+
return RexModuleVarsReflection::matchInputVars(\rex_file::get($scope->getFile(), ''));
3131
}
3232
}

lib/collector/RexModuleOutputVarsCollector.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ public function processNode(Node $node, Scope $scope)
2727
return null;
2828
}
2929

30-
return RexModuleVarsReflection::matchOutputVars(\Safe\file_get_contents($scope->getFile()));
30+
return RexModuleVarsReflection::matchOutputVars(\rex_file::get($scope->getFile(), ''));
3131
}
3232
}

lib/collector/RexTemplateVarsCollector.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ public function processNode(Node $node, Scope $scope)
2727
return null;
2828
}
2929

30-
return RexTemplateVarsReflection::matchVars(\Safe\file_get_contents($scope->getFile()));
30+
return RexTemplateVarsReflection::matchVars(\rex_file::get($scope->getFile(), ''));
3131
}
3232
}

tests/data/rex-sapi.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ function doQux()
4444
assertType('int', rex_get('HTTP_REFERER', 'int', 1));
4545
assertType('int|null', rex_get('HTTP_REFERER', 'int', null));
4646
assertType("'foo'|int", rex_get('HTTP_REFERER', 'int', 'foo'));
47-
assertType("'foo'|int", rex_get('HTTP_REFERER', 'int', rand(0,1) ? 'foo' : ''));
47+
assertType("''|'foo'|int", rex_get('HTTP_REFERER', 'int', rand(0,1) === 1 ? 'foo' : ''));
4848
}

vendor/composer/autoload_classmap.php

+3-8
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,8 @@
384384
'Doctrine\\DBAL\\Types\\VarDateTimeImmutableType' => $vendorDir . '/doctrine/dbal/src/Types/VarDateTimeImmutableType.php',
385385
'Doctrine\\DBAL\\Types\\VarDateTimeType' => $vendorDir . '/doctrine/dbal/src/Types/VarDateTimeType.php',
386386
'Doctrine\\DBAL\\VersionAwarePlatformDriver' => $vendorDir . '/doctrine/dbal/src/VersionAwarePlatformDriver.php',
387-
'Doctrine\\Deprecations\\Deprecation' => $vendorDir . '/doctrine/deprecations/lib/Doctrine/Deprecations/Deprecation.php',
388-
'Doctrine\\Deprecations\\PHPUnit\\VerifyDeprecations' => $vendorDir . '/doctrine/deprecations/lib/Doctrine/Deprecations/PHPUnit/VerifyDeprecations.php',
387+
'Doctrine\\Deprecations\\Deprecation' => $vendorDir . '/doctrine/deprecations/src/Deprecation.php',
388+
'Doctrine\\Deprecations\\PHPUnit\\VerifyDeprecations' => $vendorDir . '/doctrine/deprecations/src/PHPUnit/VerifyDeprecations.php',
389389
'Dogma\\Application\\Colors' => $vendorDir . '/dogma/dogma/src/Application/Colors.php',
390390
'Dogma\\Application\\ConfigurationProfile' => $vendorDir . '/dogma/dogma/src/Application/ConfigurationProfile.php',
391391
'Dogma\\Application\\Configurator' => $vendorDir . '/dogma/dogma/src/Application/Configurator.php',
@@ -2023,11 +2023,6 @@
20232023
'Symplify\\PHPStanRules\\ValueObject\\ClassNamespaceAndDirectory' => $vendorDir . '/symplify/phpstan-rules/src/ValueObject/ClassNamespaceAndDirectory.php',
20242024
'Symplify\\PHPStanRules\\ValueObject\\Configuration\\RequiredWithMessage' => $vendorDir . '/symplify/phpstan-rules/src/ValueObject/Configuration/RequiredWithMessage.php',
20252025
'Symplify\\PHPStanRules\\ValueObject\\MethodCallReference' => $vendorDir . '/symplify/phpstan-rules/src/ValueObject/MethodCallReference.php',
2026-
'TheCodingMachine\\Safe\\PHPStan\\Rules\\UseSafeClassesRule' => $vendorDir . '/thecodingmachine/phpstan-safe-rule/src/Rules/UseSafeClassesRule.php',
2027-
'TheCodingMachine\\Safe\\PHPStan\\Rules\\UseSafeFunctionsRule' => $vendorDir . '/thecodingmachine/phpstan-safe-rule/src/Rules/UseSafeFunctionsRule.php',
2028-
'TheCodingMachine\\Safe\\PHPStan\\Type\\Php\\ReplaceSafeFunctionsDynamicReturnTypeExtension' => $vendorDir . '/thecodingmachine/phpstan-safe-rule/src/Type/Php/ReplaceSafeFunctionsDynamicReturnTypeExtension.php',
2029-
'TheCodingMachine\\Safe\\PHPStan\\Utils\\ClassListLoader' => $vendorDir . '/thecodingmachine/phpstan-safe-rule/src/Utils/ClassListLoader.php',
2030-
'TheCodingMachine\\Safe\\PHPStan\\Utils\\FunctionListLoader' => $vendorDir . '/thecodingmachine/phpstan-safe-rule/src/Utils/FunctionListLoader.php',
20312026
'TomasVotruba\\CognitiveComplexity\\AstCognitiveComplexityAnalyzer' => $vendorDir . '/tomasvotruba/cognitive-complexity/src/AstCognitiveComplexityAnalyzer.php',
20322027
'TomasVotruba\\CognitiveComplexity\\ClassReflectionParser' => $vendorDir . '/tomasvotruba/cognitive-complexity/src/ClassReflectionParser.php',
20332028
'TomasVotruba\\CognitiveComplexity\\Configuration' => $vendorDir . '/tomasvotruba/cognitive-complexity/src/Configuration.php',
@@ -2061,7 +2056,7 @@
20612056
'TomasVotruba\\UnusedPublic\\ClassTypeDetector' => $vendorDir . '/tomasvotruba/unused-public/src/ClassTypeDetector.php',
20622057
'TomasVotruba\\UnusedPublic\\CollectorMapper\\MethodCallCollectorMapper' => $vendorDir . '/tomasvotruba/unused-public/src/CollectorMapper/MethodCallCollectorMapper.php',
20632058
'TomasVotruba\\UnusedPublic\\Collectors\\Callable_\\AttributeCallableCollector' => $vendorDir . '/tomasvotruba/unused-public/src/Collectors/Callable_/AttributeCallableCollector.php',
2064-
'TomasVotruba\\UnusedPublic\\Collectors\\Callable_\\CallUserFuncCollector' => $vendorDir . '/tomasvotruba/unused-public/src/Collectors/Callable_/CallUserFuncCollector.php',
2059+
'TomasVotruba\\UnusedPublic\\Collectors\\Callable_\\CallableTypeCollector' => $vendorDir . '/tomasvotruba/unused-public/src/Collectors/Callable_/CallableTypeCollector.php',
20652060
'TomasVotruba\\UnusedPublic\\Collectors\\ClassConstFetchCollector' => $vendorDir . '/tomasvotruba/unused-public/src/Collectors/ClassConstFetchCollector.php',
20662061
'TomasVotruba\\UnusedPublic\\Collectors\\FormTypeClassCollector' => $vendorDir . '/tomasvotruba/unused-public/src/Collectors/FormTypeClassCollector.php',
20672062
'TomasVotruba\\UnusedPublic\\Collectors\\MethodCall\\MethodCallCollector' => $vendorDir . '/tomasvotruba/unused-public/src/Collectors/MethodCall/MethodCallCollector.php',

vendor/composer/autoload_files.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
return array(
99
'9b38cf48e83f5d8f60375221cd213eee' => $vendorDir . '/phpstan/phpstan/bootstrap.php',
1010
'a4ecaeafb8cfb009ad0e052c90355e98' => $vendorDir . '/beberlei/assert/lib/Assert/functions.php',
11+
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
1112
'51fcf4e06c07cc00c920b44bcd900e7a' => $vendorDir . '/thecodingmachine/safe/deprecated/apc.php',
1213
'47f619d9197b36cf5ab70738d7743fe2' => $vendorDir . '/thecodingmachine/safe/deprecated/libevent.php',
1314
'ea6bb8a12ef9b68f6ada99058e530760' => $vendorDir . '/thecodingmachine/safe/deprecated/mssql.php',
@@ -97,5 +98,4 @@
9798
'4af1dca6db8c527c6eed27bff85ff0e5' => $vendorDir . '/thecodingmachine/safe/generated/yaz.php',
9899
'fe43ca06499ac37bc2dedd823af71eb5' => $vendorDir . '/thecodingmachine/safe/generated/zip.php',
99100
'356736db98a6834f0a886b8d509b0ecd' => $vendorDir . '/thecodingmachine/safe/generated/zlib.php',
100-
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
101101
);

vendor/composer/autoload_psr4.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
'TomasVotruba\\UnusedPublic\\' => array($vendorDir . '/tomasvotruba/unused-public/src'),
1414
'TomasVotruba\\TypeCoverage\\' => array($vendorDir . '/tomasvotruba/type-coverage/src'),
1515
'TomasVotruba\\CognitiveComplexity\\' => array($vendorDir . '/tomasvotruba/cognitive-complexity/src'),
16-
'TheCodingMachine\\Safe\\PHPStan\\' => array($vendorDir . '/thecodingmachine/phpstan-safe-rule/src'),
1716
'Symplify\\PHPStanRules\\' => array($vendorDir . '/symplify/phpstan-rules/src'),
1817
'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'),
1918
'Spaze\\PHPStan\\Rules\\Disallowed\\' => array($vendorDir . '/spaze/phpstan-disallowed-calls/src'),
@@ -22,7 +21,7 @@
2221
'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'),
2322
'PHPStan\\' => array($vendorDir . '/phpstan/phpstan-deprecation-rules/src', $vendorDir . '/phpstan/phpstan-phpunit/src', $vendorDir . '/phpstan/phpstan-strict-rules/src', $vendorDir . '/phpstan/phpstan-symfony/src'),
2423
'JsonSchema\\' => array($vendorDir . '/justinrainbow/json-schema/src/JsonSchema'),
25-
'Doctrine\\Deprecations\\' => array($vendorDir . '/doctrine/deprecations/lib/Doctrine/Deprecations'),
24+
'Doctrine\\Deprecations\\' => array($vendorDir . '/doctrine/deprecations/src'),
2625
'Doctrine\\DBAL\\' => array($vendorDir . '/doctrine/dbal/src'),
2726
'Doctrine\\Common\\Cache\\' => array($vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache'),
2827
'Doctrine\\Common\\' => array($vendorDir . '/doctrine/event-manager/src'),

0 commit comments

Comments
 (0)