diff --git a/.github/workflows/check-subtree-split.yml b/.github/workflows/check-subtree-split.yml deleted file mode 100644 index 16be48b..0000000 --- a/.github/workflows/check-subtree-split.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Check subtree split - -on: - pull_request_target: - -jobs: - close-pull-request: - runs-on: ubuntu-latest - - steps: - - name: Close pull request - uses: actions/github-script@v6 - with: - script: | - if (context.repo.owner === "symfony") { - github.rest.issues.createComment({ - owner: "symfony", - repo: context.repo.repo, - issue_number: context.issue.number, - body: ` - Thanks for your Pull Request! We love contributions. - - However, you should instead open your PR on the main repository: - https://github.com/symfony/symfony - - This repository is what we call a "subtree split": a read-only subset of that main repository. - We're looking forward to your PR there! - ` - }); - - github.rest.pulls.update({ - owner: "symfony", - repo: context.repo.repo, - pull_number: context.issue.number, - state: "closed" - }); - } diff --git a/.github/workflows/close-pull-request.yml b/.github/workflows/close-pull-request.yml new file mode 100644 index 0000000..e55b478 --- /dev/null +++ b/.github/workflows/close-pull-request.yml @@ -0,0 +1,20 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [opened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: | + Thanks for your Pull Request! We love contributions. + + However, you should instead open your PR on the main repository: + https://github.com/symfony/symfony + + This repository is what we call a "subtree split": a read-only subset of that main repository. + We're looking forward to your PR there! diff --git a/Loader/FilesystemLoader.php b/Loader/FilesystemLoader.php index 6499e30..cd486d7 100644 --- a/Loader/FilesystemLoader.php +++ b/Loader/FilesystemLoader.php @@ -89,7 +89,7 @@ protected static function isAbsolutePath(string $file): bool && ':' == $file[1] && ('\\' == $file[2] || '/' == $file[2]) ) - || null !== parse_url($file, \PHP_URL_SCHEME) + || parse_url($file, \PHP_URL_SCHEME) ) { return true; } diff --git a/Tests/DelegatingEngineTest.php b/Tests/DelegatingEngineTest.php index fab4a7a..00700e6 100644 --- a/Tests/DelegatingEngineTest.php +++ b/Tests/DelegatingEngineTest.php @@ -134,7 +134,7 @@ private function getEngineMock($template, $supports) private function getStreamingEngineMock($template, $supports) { - $engine = $this->getMockForAbstractClass(MyStreamingEngine::class); + $engine = $this->createMock(MyStreamingEngine::class); $engine->expects($this->once()) ->method('supports')