From f24a11df068426628eaa885bc24f0abac1e5caf1 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Wed, 8 Apr 2020 17:09:36 +0300 Subject: Vendor directory fix (php vs golang) --- .dockerignore | 1 + .gitignore | 1 + Makefile | 1 - composer.json | 7 +++++-- service/headers/service_test.go | 4 ++-- tests/client.php | 2 +- tests/http/client.php | 2 +- tests/http/slow-client.php | 2 +- tests/slow-client.php | 2 +- tests/slow-destroy.php | 2 +- 10 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.dockerignore b/.dockerignore index 9bfb38f4..b817b3c8 100644 --- a/.dockerignore +++ b/.dockerignore @@ -7,3 +7,4 @@ /tests /bin composer.json +vendor_php diff --git a/.gitignore b/.gitignore index 7fb2cf09..852b8881 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .idea composer.lock vendor +vendor_php builds/ tests/vendor/ .rr-sample.yaml diff --git a/Makefile b/Makefile index f1a0fa55..d7e85f90 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,6 @@ install: all uninstall: rm -f /usr/local/bin/rr test: - go mod vendor composer update go test -v -race -cover go test -v -race -cover ./util diff --git a/composer.json b/composer.json index beed4175..aa461df3 100644 --- a/composer.json +++ b/composer.json @@ -22,11 +22,14 @@ "symfony/console": "^2.5.0 || ^3.0.0 || ^4.0.0 || ^5.0.0", "laminas/laminas-diactoros": "^1.3 || ^2.0" }, + "config": { + "vendor-dir": "vendor_php" + }, "require-dev": { - "phpstan/phpstan": "~0.12" + "phpstan/phpstan": "~0.12" }, "scripts": { - "analyze": "@php ./vendor/bin/phpstan analyze -c ./phpstan.neon.dist --no-progress --ansi" + "analyze": "@php ./vendor_php/bin/phpstan analyze -c ./phpstan.neon.dist --no-progress --ansi" }, "autoload": { "psr-4": { diff --git a/service/headers/service_test.go b/service/headers/service_test.go index 8d727c15..a67def02 100644 --- a/service/headers/service_test.go +++ b/service/headers/service_test.go @@ -200,7 +200,7 @@ func TestCORS_OPTIONS(t *testing.T) { }`, httpCfg: `{ "enable": true, - "address": ":6379", + "address": ":16379", "maxRequestSize": 1024, "workers":{ "command": "php ../../tests/http/client.php headers pipes", @@ -222,7 +222,7 @@ func TestCORS_OPTIONS(t *testing.T) { time.Sleep(time.Millisecond * 100) defer c.Stop() - req, err := http.NewRequest("OPTIONS", "http://localhost:6379", nil) + req, err := http.NewRequest("OPTIONS", "http://localhost:16379", nil) if err != nil { return err } diff --git a/tests/client.php b/tests/client.php index 31caa410..835b1c6c 100644 --- a/tests/client.php +++ b/tests/client.php @@ -3,7 +3,7 @@ use Spiral\Goridge; ini_set('display_errors', 'stderr'); -require dirname(__DIR__) . "/vendor/autoload.php"; +require dirname(__DIR__) . "/vendor_php/autoload.php"; if (count($argv) < 3) { die("need 2 arguments"); diff --git a/tests/http/client.php b/tests/http/client.php index 166acfb6..9f21b273 100644 --- a/tests/http/client.php +++ b/tests/http/client.php @@ -4,7 +4,7 @@ use Spiral\Goridge; use Spiral\RoadRunner; ini_set('display_errors', 'stderr'); -require dirname(__DIR__) . "/../vendor/autoload.php"; +require dirname(__DIR__) . "/../vendor_php/autoload.php"; if (count($argv) < 3) { die("need 2 arguments"); diff --git a/tests/http/slow-client.php b/tests/http/slow-client.php index 58250dfb..4d3963d7 100644 --- a/tests/http/slow-client.php +++ b/tests/http/slow-client.php @@ -4,7 +4,7 @@ use Spiral\Goridge; use Spiral\RoadRunner; ini_set('display_errors', 'stderr'); -require dirname(__DIR__) . "/../vendor/autoload.php"; +require dirname(__DIR__) . "/../vendor_php/autoload.php"; if (count($argv) < 3) { die("need 2 arguments"); diff --git a/tests/slow-client.php b/tests/slow-client.php index bc4b0561..ece0a439 100644 --- a/tests/slow-client.php +++ b/tests/slow-client.php @@ -3,7 +3,7 @@ use Spiral\Goridge; ini_set('display_errors', 'stderr'); -require dirname(__DIR__) . "/vendor/autoload.php"; +require dirname(__DIR__) . "/vendor_php/autoload.php"; if (count($argv) < 3) { die("need 2 arguments"); diff --git a/tests/slow-destroy.php b/tests/slow-destroy.php index 6af61050..e2a01af2 100644 --- a/tests/slow-destroy.php +++ b/tests/slow-destroy.php @@ -3,7 +3,7 @@ use Spiral\Goridge; ini_set('display_errors', 'stderr'); -require dirname(__DIR__) . "/vendor/autoload.php"; +require dirname(__DIR__) . "/vendor_php/autoload.php"; if (count($argv) < 3) { die("need 2 arguments"); -- cgit v1.2.3 From 24a461c050f62acaf5a18db770aeb330af9c92ab Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Wed, 8 Apr 2020 17:14:10 +0300 Subject: ci fix --- .github/workflows/ci-build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 7bf9c77e..f5f096d9 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -64,11 +64,10 @@ jobs: run: go mod download - name: Download binary roadrunner - run: php ./bin/rr get-binary + run: composer install && php ./bin/rr get-binary - name: Run golang tests run: | - go mod vendor composer update go test -race -v -coverprofile=lib.txt -covermode=atomic go test ./util -race -v -coverprofile=util.txt -covermode=atomic -- cgit v1.2.3 From 1a43203c7f9c2a1b933315848dac0b8dde614d18 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Wed, 8 Apr 2020 17:19:24 +0300 Subject: remove get-binary --- .github/workflows/ci-build.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index f5f096d9..f62220d1 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -63,9 +63,6 @@ jobs: - name: Install Go dependencies run: go mod download - - name: Download binary roadrunner - run: composer install && php ./bin/rr get-binary - - name: Run golang tests run: | composer update -- cgit v1.2.3 From 97983ba7f91ea6e2c2792a394a88d83800c4c11a Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Wed, 8 Apr 2020 17:20:07 +0300 Subject: remved php 7.1 and 7.2 as old --- .github/workflows/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index f62220d1..6045fd57 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: false matrix: - php: [7.1, 7.2, 7.3, 7.4] + php: [7.3, 7.4] go: [1.13, 1.14] os: [ubuntu-latest] env: -- cgit v1.2.3 From cb730f42b45769ee2af5d2e610ebaef0c8756325 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Wed, 8 Apr 2020 18:49:19 +0300 Subject: Update bors.toml --- bors.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/bors.toml b/bors.toml index fcedac59..51ac6357 100644 --- a/bors.toml +++ b/bors.toml @@ -1,8 +1,4 @@ status = [ -'Build (PHP 7.1, Go 1.13, OS ubuntu-latest)', -'Build (PHP 7.1, Go 1.14, OS ubuntu-latest)', -'Build (PHP 7.2, Go 1.13, OS ubuntu-latest)', -'Build (PHP 7.2, Go 1.14, OS ubuntu-latest)', 'Build (PHP 7.3, Go 1.13, OS ubuntu-latest)', 'Build (PHP 7.3, Go 1.14, OS ubuntu-latest)', 'Build (PHP 7.4, Go 1.13, OS ubuntu-latest)', -- cgit v1.2.3