Skip to content

Commit

Permalink
release PHP 7.2 downgraded
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Sep 16, 2024
1 parent 0d3003f commit 9a0ba0f
Show file tree
Hide file tree
Showing 194 changed files with 521 additions and 3,136 deletions.
3 changes: 0 additions & 3 deletions .github/FUNDING.yml

This file was deleted.

57 changes: 0 additions & 57 deletions .github/workflows/code_analysis.yaml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/downgraded_release.yaml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/rector.yaml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/various_php_install.yaml

This file was deleted.

24 changes: 0 additions & 24 deletions build/composer-php-72.json

This file was deleted.

10 changes: 0 additions & 10 deletions build/rector-downgrade-php-72.php

This file was deleted.

11 changes: 0 additions & 11 deletions composer-dependency-analyser.php

This file was deleted.

39 changes: 3 additions & 36 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,15 @@
"license": "MIT",
"keywords": ["static analysis", "phpstan-extension"],
"require": {
"php": "^8.2",
"phpstan/phpstan": "^1.12",
"webmozart/assert": "^1.11",
"nikic/php-parser": "^4.19"
},
"require-dev": {
"phpstan/extension-installer": "^1.4",
"tracy/tracy": "^2.10",
"symplify/easy-coding-standard": "^12.3",
"rector/rector": "^1.2.5",
"phpunit/phpunit": "^10.5",
"tomasvotruba/class-leak": "^0.2.11",
"tomasvotruba/type-coverage": "^0.3",
"symplify/easy-ci": "^12.1",
"shipmonk/composer-dependency-analyser": "^1.7",
"symplify/phpstan-rules": "^13.0"
"php": "^7.2 || ^8.0",
"phpstan/phpstan": "^1.10.19",
"webmozart/assert": "^1.11"
},
"autoload": {
"psr-4": {
"TomasVotruba\\UnusedPublic\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"TomasVotruba\\UnusedPublic\\Tests\\": "tests"
},
"classmap": [
"stubs"
]
},
"scripts": {
"check-cs": "vendor/bin/ecs check --ansi",
"fix-cs": "vendor/bin/ecs check --fix --ansi",
"phpstan": "vendor/bin/phpstan --ansi",
"rector": "vendor/bin/rector --dry-run --ansi",
"release": "vendor/bin/monorepo-builder release patch --ansi"
},
"config": {
"allow-plugins": {
"phpstan/extension-installer": true
}
},
"extra": {
"phpstan": {
"includes": [
Expand Down
14 changes: 0 additions & 14 deletions ecs.php

This file was deleted.

27 changes: 0 additions & 27 deletions phpstan.neon

This file was deleted.

12 changes: 0 additions & 12 deletions phpunit.xml

This file was deleted.

4 changes: 2 additions & 2 deletions src/ApiDocStmtAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function isApiDoc(Stmt $stmt, ClassReflection $classReflection): bool
{
if ($classReflection->getResolvedPhpDoc() instanceof ResolvedPhpDocBlock) {
$resolvedPhpDoc = $classReflection->getResolvedPhpDoc();
if (str_contains($resolvedPhpDoc->getPhpDocString(), '@api')) {
if (strpos($resolvedPhpDoc->getPhpDocString(), '@api') !== false) {
return true;
}
}
Expand All @@ -30,6 +30,6 @@ public function isApiDoc(Stmt $stmt, ClassReflection $classReflection): bool

public function isApiDocComment(string $docComment): bool
{
return str_contains($docComment, '@api');
return strpos($docComment, '@api') !== false;
}
}
14 changes: 10 additions & 4 deletions src/CallReferece/ParentCallReferenceResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@

use PHPStan\Reflection\ReflectionProvider;

final readonly class ParentCallReferenceResolver
final class ParentCallReferenceResolver
{
public function __construct(
private ReflectionProvider $reflectionProvider,
) {
/**
* @readonly
* @var \PHPStan\Reflection\ReflectionProvider
*/
private $reflectionProvider;

public function __construct(ReflectionProvider $reflectionProvider)
{
$this->reflectionProvider = $reflectionProvider;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/CollectorMapper/MethodCallCollectorMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function mapToMethodCallReferences(array $nestedReferencesByFiles): array

// remove ReferenceMaker::LOCAL prefix
return array_map(static function (string $methodCallReference): string {
if (str_starts_with($methodCallReference, ReferenceMarker::LOCAL)) {
if (strncmp($methodCallReference, ReferenceMarker::LOCAL, strlen(ReferenceMarker::LOCAL)) === 0) {
return substr($methodCallReference, strlen(ReferenceMarker::LOCAL));
}

Expand All @@ -39,7 +39,7 @@ public function mapToLocalAndExternal(array $nestedReferencesByFiles): LocalAndE
$externalMethodCallReferences = [];

foreach ($methodCallReferences as $methodCallReference) {
if (str_starts_with($methodCallReference, ReferenceMarker::LOCAL)) {
if (strncmp($methodCallReference, ReferenceMarker::LOCAL, strlen(ReferenceMarker::LOCAL)) === 0) {
$localMethodCallReferences[] = substr($methodCallReference, strlen(ReferenceMarker::LOCAL));
} else {
$externalMethodCallReferences[] = $methodCallReference;
Expand Down
Loading

0 comments on commit 9a0ba0f

Please sign in to comment.