From 3da58dcf3238bf27ef115f7fc047eb755c70104b Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Wed, 18 Dec 2024 17:13:03 +1300 Subject: [PATCH] DEP Bump minimum version of phpstan --- composer.json | 10 ++++++++-- public/_resources/.htaccess | 10 ++++++++++ public/_resources/.method | 1 + .../vendor/silverstripe/framework/client/images | 1 + .../vendor/silverstripe/framework/client/styles | 1 + tests/PHPStan/KeywordSelfRuleTest.php | 6 +++--- 6 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 public/_resources/.htaccess create mode 100644 public/_resources/.method create mode 120000 public/_resources/vendor/silverstripe/framework/client/images create mode 120000 public/_resources/vendor/silverstripe/framework/client/styles diff --git a/composer.json b/composer.json index 29152e3..ff8810e 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "license": "BSD-3-Clause", "require": { "php": "^8.1", - "phpstan/phpstan": "^1.11" + "phpstan/phpstan": "^1.12.13" }, "require-dev": { "phpunit/phpunit": "^9.6", @@ -28,5 +28,11 @@ } }, "minimum-stability": "dev", - "prefer-stable": true + "prefer-stable": true, + "config": { + "allow-plugins": { + "composer/installers": true, + "silverstripe/vendor-plugin": true + } + } } diff --git a/public/_resources/.htaccess b/public/_resources/.htaccess new file mode 100644 index 0000000..b151b54 --- /dev/null +++ b/public/_resources/.htaccess @@ -0,0 +1,10 @@ +# Block .method file + + Require all denied + + +# Prevent file listings + + DirectoryIndex disabled + DirectorySlash On + diff --git a/public/_resources/.method b/public/_resources/.method new file mode 100644 index 0000000..4d18c3e --- /dev/null +++ b/public/_resources/.method @@ -0,0 +1 @@ +auto \ No newline at end of file diff --git a/public/_resources/vendor/silverstripe/framework/client/images b/public/_resources/vendor/silverstripe/framework/client/images new file mode 120000 index 0000000..4f5528f --- /dev/null +++ b/public/_resources/vendor/silverstripe/framework/client/images @@ -0,0 +1 @@ +../../../../../../vendor/silverstripe/framework/client/images \ No newline at end of file diff --git a/public/_resources/vendor/silverstripe/framework/client/styles b/public/_resources/vendor/silverstripe/framework/client/styles new file mode 120000 index 0000000..882c6ce --- /dev/null +++ b/public/_resources/vendor/silverstripe/framework/client/styles @@ -0,0 +1 @@ +../../../../../../vendor/silverstripe/framework/client/styles \ No newline at end of file diff --git a/tests/PHPStan/KeywordSelfRuleTest.php b/tests/PHPStan/KeywordSelfRuleTest.php index 6c82fbb..30ef3eb 100644 --- a/tests/PHPStan/KeywordSelfRuleTest.php +++ b/tests/PHPStan/KeywordSelfRuleTest.php @@ -24,17 +24,17 @@ public function provideRule() 'interface' => [ 'filePaths' => [__DIR__ . '/KeywordSelfRuleTest/TestInterface.php'], 'errorMessage' => "Can't use keyword 'self'. Use 'TestInterface' instead.", - 'errorLines' => [13, 18, 18], + 'errorLines' => [13, 13, 18, 18], ], 'class' => [ 'filePaths' => [__DIR__ . '/KeywordSelfRuleTest/TestClass.php'], 'errorMessage' => "Can't use keyword 'self'. Use 'TestClass' instead.", - 'errorLines' => [9, 11, 16, 16, 18, 20, 21, 21, 25], + 'errorLines' => [9, 9, 11, 16, 16, 18, 20, 21, 21, 21, 25], ], 'enum' => [ 'filePaths' => [__DIR__ . '/KeywordSelfRuleTest/TestEnum.php'], 'errorMessage' => "Can't use keyword 'self'. Use 'TestEnum' instead.", - 'errorLines' => [9, 14, 14, 16, 17, 18, 20, 24], + 'errorLines' => [9, 9, 14, 14, 16, 16, 17, 17, 18, 20, 24], ], 'trait' => [ 'filePaths' => [