From 6a8d60b8d643d6e7ad9180191ec46438d62ba607 Mon Sep 17 00:00:00 2001 From: Zach Borboa Date: Wed, 14 Dec 2022 05:06:30 -0800 Subject: [PATCH 1/3] Exclude testing information file from git archive --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index 8830e8f..937974a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,5 +6,6 @@ /www/ export-ignore /.gitattributes export-ignore /.gitignore export-ignore +/TESTING.md export-ignore /TROUBLESHOOTING.md export-ignore /psalm.xml From 3cfe83b222f3b821ae4ea04389f9fd04f42cbb05 Mon Sep 17 00:00:00 2001 From: Zach Borboa Date: Wed, 14 Dec 2022 05:12:41 -0800 Subject: [PATCH 2/3] Move static analysis config under tests/ and exclude from git archive --- .gitattributes | 1 - .github/workflows/ci.yml | 2 +- psalm.xml => tests/psalm.xml | 8 ++++---- 3 files changed, 5 insertions(+), 6 deletions(-) rename psalm.xml => tests/psalm.xml (78%) diff --git a/.gitattributes b/.gitattributes index 937974a..e08e0ce 100644 --- a/.gitattributes +++ b/.gitattributes @@ -8,4 +8,3 @@ /.gitignore export-ignore /TESTING.md export-ignore /TROUBLESHOOTING.md export-ignore -/psalm.xml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6153dad..738cf49 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,5 +47,5 @@ jobs: CI_PHP_FUTURE_RELEASE: ${{ matrix.future-release }} - name: Static analysis - run: "vendor/bin/psalm" + run: 'vendor/bin/psalm --config="tests/psalm.xml"' if: ${{ !matrix.future-release && matrix.php-version >= 7.1 }} diff --git a/psalm.xml b/tests/psalm.xml similarity index 78% rename from psalm.xml rename to tests/psalm.xml index 94720bc..b163591 100644 --- a/psalm.xml +++ b/tests/psalm.xml @@ -7,20 +7,20 @@ xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" > - + - + - + - + From e8fdd2377f9d7b9f7f9e7a65223d0cd622721750 Mon Sep 17 00:00:00 2001 From: Zach Borboa Date: Fri, 16 Dec 2022 04:43:07 -0800 Subject: [PATCH 3/3] Fix static analysis error Error message: ERROR: MethodSignatureMustProvideReturnType - ../src/Curl/Url.php:18:21 - Method Curl\Url::__toString must have a return type signature! (see https://psalm.dev/282) public function __toString() --- src/Curl/Url.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Curl/Url.php b/src/Curl/Url.php index 125c4d6..a249d78 100644 --- a/src/Curl/Url.php +++ b/src/Curl/Url.php @@ -15,7 +15,7 @@ class Url $this->relativeUrl = $relative_url; } - public function __toString() + public function __toString() : string { return $this->absolutizeUrl(); }