From 2f27c331ad93bb16e20eca4f8f2d1c014d8c1404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 25 Oct 2020 11:43:06 +0200 Subject: [PATCH 1/8] Use 7.0.8 for php version. 7.0.0 does not resolve deps --- composer.json | 2 +- composer.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index b7cdf99a5..b50c4e180 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ }, "config": { "platform": { - "php": "7.0.0", + "php": "7.0.8", "ext-mongodb": "1.3.0" }, "sort-packages": true diff --git a/composer.lock b/composer.lock index 2bd002010..ff3f38bc0 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a5ff8076c131ae96fee3c6b23eaadcc2", + "content-hash": "85d3c2536a059671db43cee714e5ff3c", "packages": [ { "name": "alcaeus/mongo-php-adapter", @@ -1985,7 +1985,7 @@ }, "platform-dev": [], "platform-overrides": { - "php": "7.0.0", + "php": "7.0.8", "ext-mongodb": "1.3.0" }, "plugin-api-version": "1.1.0" From 2abba023d5f53c161a273dfece3c66e76fab54a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sat, 24 Oct 2020 17:55:04 +0300 Subject: [PATCH 2/8] Setup to run php-cs-fixer on CI pipeline --- .travis.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index 832ccdd79..d923a24d1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,6 +24,13 @@ jobs: include: - php: 7.2 env: COVERAGE=1 + - name: "PHP CS Fixer" + php: 7.0 + install: + - composer require --dev friendsofphp/php-cs-fixer:2.16 + script: + - PATH=vendor/bin:$PATH + - php-cs-fixer fix --verbose --diff --dry-run --ansi services: - mongodb From 3383163c373d01cf2844ee362d93709b006e8d5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 25 Oct 2020 22:49:44 +0200 Subject: [PATCH 3/8] Use composer global install --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index d923a24d1..8870b303b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,9 +27,8 @@ jobs: - name: "PHP CS Fixer" php: 7.0 install: - - composer require --dev friendsofphp/php-cs-fixer:2.16 + - composer global require friendsofphp/php-cs-fixer:2.16 script: - - PATH=vendor/bin:$PATH - php-cs-fixer fix --verbose --diff --dry-run --ansi services: From 822994464b7b9801f4b6214d4174a4b184cfc09a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 25 Oct 2020 22:52:07 +0200 Subject: [PATCH 4/8] Travis: Setup composer cache --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 8870b303b..031c788e0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,6 +36,10 @@ services: - mysql - postgresql +cache: + directories: + - $HOME/.composer/cache + install: - .travis/install.sh From 595eccbac54a942283b6de4c3dbaf1ed020255b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Mon, 26 Oct 2020 14:10:05 +0200 Subject: [PATCH 5/8] Update composer global path --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 031c788e0..77756b6d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,6 +29,7 @@ jobs: install: - composer global require friendsofphp/php-cs-fixer:2.16 script: + - PATH=vendor/bin:$HOME/.composer/vendor/bin:$PATH - php-cs-fixer fix --verbose --diff --dry-run --ansi services: From df036629dbe9ad9d9ef3591d3a612479918f099b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Mon, 26 Oct 2020 22:55:46 +0200 Subject: [PATCH 6/8] Use xdg composer home --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 77756b6d7..09d8347d8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ jobs: install: - composer global require friendsofphp/php-cs-fixer:2.16 script: - - PATH=vendor/bin:$HOME/.composer/vendor/bin:$PATH + - PATH=vendor/bin:$HOME/.config/composer/vendor/bin:$HOME/.composer/vendor/bin:$PATH - php-cs-fixer fix --verbose --diff --dry-run --ansi services: From 6c3c001cd38f46a6562c837b00955b216d6144ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Mon, 26 Oct 2020 23:23:10 +0200 Subject: [PATCH 7/8] Use composer config to find bin dir --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 09d8347d8..682562aa2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,8 @@ jobs: install: - composer global require friendsofphp/php-cs-fixer:2.16 script: - - PATH=vendor/bin:$HOME/.config/composer/vendor/bin:$HOME/.composer/vendor/bin:$PATH + # https://stackoverflow.com/questions/30664220/where-to-find-composers-global-packages/64545124#64545124 + - PATH=$(composer global config bin-dir --absolute --quiet):$PATH - php-cs-fixer fix --verbose --diff --dry-run --ansi services: From 9c711cebfbc3a063a929cebe4a6e9c5758a17bfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Wed, 28 Oct 2020 13:54:43 +0200 Subject: [PATCH 8/8] Any 2.16.x --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 682562aa2..5459f5d2b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ jobs: - name: "PHP CS Fixer" php: 7.0 install: - - composer global require friendsofphp/php-cs-fixer:2.16 + - composer global require friendsofphp/php-cs-fixer:^2.16 script: # https://stackoverflow.com/questions/30664220/where-to-find-composers-global-packages/64545124#64545124 - PATH=$(composer global config bin-dir --absolute --quiet):$PATH