diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 4a3e8ac..6be5d58 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -3,4 +3,3 @@ | Is bugfix? | ✔️/❌ | New feature? | ✔️/❌ | Breaks BC? | ✔️/❌ -| Fixed issues | comma-separated list of tickets # fixed by the PR, if any diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d7ebdbf..db86156 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,16 +1,16 @@ version: 2 updates: - # Maintain dependencies for GitHub Actions. - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "daily" - # Too noisy. See https://github.community/t/increase-if-necessary-for-github-actions-in-dependabot/179581 - open-pull-requests-limit: 0 + # Maintain dependencies for GitHub Actions. + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + # Too noisy. See https://github.community/t/increase-if-necessary-for-github-actions-in-dependabot/179581 + open-pull-requests-limit: 0 - # Maintain dependencies for Composer - - package-ecosystem: "composer" - directory: "/" - schedule: - interval: "daily" - versioning-strategy: increase-if-necessary + # Maintain dependencies for Composer + - package-ecosystem: "composer" + directory: "/" + schedule: + interval: "daily" + versioning-strategy: increase-if-necessary diff --git a/.github/workflows/bc.yml b/.github/workflows/bc.yml index 9127600..f8cc564 100644 --- a/.github/workflows/bc.yml +++ b/.github/workflows/bc.yml @@ -1,8 +1,28 @@ on: - - pull_request - - push + pull_request: + paths-ignore: + - 'docs/**' + - 'README.md' + - 'CHANGELOG.md' + - '.gitignore' + - '.gitattributes' + - 'infection.json.dist' + - 'phpunit.xml.dist' + - 'psalm.xml' + push: + branches: ['master'] + paths-ignore: + - 'docs/**' + - 'README.md' + - 'CHANGELOG.md' + - '.gitignore' + - '.gitattributes' + - 'infection.json.dist' + - 'phpunit.xml.dist' + - 'psalm.xml' name: backwards compatibility + jobs: roave_bc_check: uses: yiisoft/actions/.github/workflows/bc.yml@master diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8506ea1..f980c7f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,6 +10,7 @@ on: - 'psalm.xml' push: + branches: ['master'] paths-ignore: - 'docs/**' - 'README.md' @@ -28,4 +29,4 @@ jobs: os: >- ['ubuntu-latest', 'windows-latest'] php: >- - ['8.0', '8.1'] + ['8.0', '8.1', '8.2', '8.3'] diff --git a/.github/workflows/composer-require-checker.yml b/.github/workflows/composer-require-checker.yml index ae5893f..5473ec9 100644 --- a/.github/workflows/composer-require-checker.yml +++ b/.github/workflows/composer-require-checker.yml @@ -11,6 +11,7 @@ on: - 'psalm.xml' push: + branches: ['master'] paths-ignore: - 'docs/**' - 'README.md' @@ -30,4 +31,4 @@ jobs: os: >- ['ubuntu-latest'] php: >- - ['8.0', '8.1'] + ['8.0', '8.1', '8.2', '8.3'] diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index c1aca98..92e4f8d 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -9,6 +9,7 @@ on: - 'psalm.xml' push: + branches: ['master'] paths-ignore: - 'docs/**' - 'README.md' diff --git a/.github/workflows/rector.yml b/.github/workflows/rector.yml index b5a5649..35411d0 100644 --- a/.github/workflows/rector.yml +++ b/.github/workflows/rector.yml @@ -20,4 +20,4 @@ jobs: os: >- ['ubuntu-latest'] php: >- - ['8.0'] + ['8.3'] diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 96b2679..8694d2d 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -10,6 +10,7 @@ on: - 'phpunit.xml.dist' push: + branches: ['master'] paths-ignore: - 'docs/**' - 'README.md' @@ -28,4 +29,4 @@ jobs: os: >- ['ubuntu-latest'] php: >- - ['8.0', '8.1'] + ['8.0', '8.1', '8.2', '8.3'] diff --git a/CHANGELOG.md b/CHANGELOG.md index 8be2a52..eec0d18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## 3.0.1 under development -- Bug #133: Don't add not substituted arguments to a query string (@rustamwin) +- Bug #133, #136: Don't add not substituted arguments to a query string (@rustamwin, @vjik) - Bug #134: Don't add query string if it's empty (@rustamwin) ## 3.0.0 February 17, 2023 diff --git a/src/UrlGenerator.php b/src/UrlGenerator.php index 2226405..e41b4da 100644 --- a/src/UrlGenerator.php +++ b/src/UrlGenerator.php @@ -264,7 +264,6 @@ private function missingArguments(array $parts, array $substitutions): array */ private function generatePath(array $arguments, array $queryParameters, array $parts): string { - $notSubstitutedArguments = $arguments; $path = $this->getUriPrefix(); foreach ($parts as $part) { @@ -292,7 +291,6 @@ private function generatePath(array $arguments, array $queryParameters, array $p ? rawurlencode($arguments[$part[0]]) : urlencode($arguments[$part[0]]); } - unset($notSubstitutedArguments[$part[0]]); } $path = str_replace('//', '/', $path);