From f044a9b0281e8a55944968a2ec0f6aa86bd923c1 Mon Sep 17 00:00:00 2001 From: MilesChou Date: Fri, 6 Jan 2023 00:11:17 +0800 Subject: [PATCH] Fix string cast int bug --- .gitattributes | 2 +- .travis.yml | 27 --------------------------- phpunit.xml.dist.bak | 27 --------------------------- src/Api/Api.php | 4 ++-- 4 files changed, 3 insertions(+), 57 deletions(-) delete mode 100644 .travis.yml delete mode 100644 phpunit.xml.dist.bak diff --git a/.gitattributes b/.gitattributes index 960dd4e..61ca09a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,11 +2,11 @@ * text=lf # Exclude unused files +/.github export-ignore /docs export-ignore /tests export-ignore /.gitattributes export-ignore /.gitignore export-ignore -/.travis.yml export-ignore /CONTRIBUTING.md export-ignore /Makefile export-ignore /phpcs.xml export-ignore diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e24165b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -os: linux -dist: xenial -language: php - -php: - - 8.0 - - 8.1 - - 8.2 - -branches: - only: - - master - - /^\d+\.x$/ - - /^\d+\.\d+\.\d+$/ - -install: - - composer install --prefer-dist - -script: - - php vendor/bin/phpcs - - php vendor/bin/phpunit - -cache: - directories: - # See https://blog.wyrihaximus.net/2015/07/composer-cache-on-travis/ - - $HOME/.composer/cache/files - - vendor diff --git a/phpunit.xml.dist.bak b/phpunit.xml.dist.bak deleted file mode 100644 index 829e628..0000000 --- a/phpunit.xml.dist.bak +++ /dev/null @@ -1,27 +0,0 @@ - - - - - ./tests - - - - - ./src - - - - - - - - - diff --git a/src/Api/Api.php b/src/Api/Api.php index 407715a..8b52fe9 100644 --- a/src/Api/Api.php +++ b/src/Api/Api.php @@ -121,12 +121,12 @@ public function bindUri(array $binding = []): string if (static::guessArrayIsSequence($binding)) { $binding = static::buildBindingBySequence( $this->getUriBindingKeys(), - $binding + $binding, ); } foreach ($binding as $key => $value) { - $uri = str_replace("{{$key}}", $value, $uri); + $uri = str_replace("{{$key}}", "$value", $uri); } if (preg_match('/{.+}/', $uri)) {