From 1c683838691746d921be45ce5e135fd50f20343f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D1=80=D0=B8=D0=B2=D0=B8=D1=87=20=D0=A1=D0=B5=D1=80?= =?UTF-8?q?=D0=B3=D0=B5=D0=B9?= Date: Fri, 21 Oct 2022 13:50:39 +0300 Subject: [PATCH 1/2] Update .gitignore --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 37e1e60..8f6075b 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,7 @@ models/checksum.json .swp /nbproject .env + +.docker +docker* +Makefile From 66690ac5ddbb7a3f2af487d0410abce27712f210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D1=80=D0=B8=D0=B2=D0=B8=D1=87=20=D0=A1=D0=B5=D1=80?= =?UTF-8?q?=D0=B3=D0=B5=D0=B9?= Date: Fri, 21 Oct 2022 13:52:52 +0300 Subject: [PATCH 2/2] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BE=D1=87=D0=B8=D1=81=D1=82=D0=BA=D0=B0?= =?UTF-8?q?=20=D0=B2=D0=B5=D1=80=D1=81=D0=B8=D0=B8=20api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Component/Utils.php | 2 +- tests/src/Component/UtilsTest.php | 37 +++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 tests/src/Component/UtilsTest.php diff --git a/src/Component/Utils.php b/src/Component/Utils.php index 9275375..320b158 100644 --- a/src/Component/Utils.php +++ b/src/Component/Utils.php @@ -28,7 +28,7 @@ class Utils */ public static function removeVersionFromUri(string $uri): string { - return (string) preg_replace('/\/v\d{1,3}\/?/', '', $uri); + return (string) preg_replace('#api/v\d{1,3}/?#', 'api', $uri); } /** diff --git a/tests/src/Component/UtilsTest.php b/tests/src/Component/UtilsTest.php new file mode 100644 index 0000000..af4e024 --- /dev/null +++ b/tests/src/Component/UtilsTest.php @@ -0,0 +1,37 @@ +