Skip to content

Commit 4a83c0d

Browse files
authored
Merge pull request #60 from FriendsOfPHP/update
Prepare v5
2 parents 404366a + 58cfc84 commit 4a83c0d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+813
-890
lines changed

.gitattributes

Lines changed: 0 additions & 2 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
schedule:
8+
- cron: "0 0 * * MON"
9+
10+
jobs:
11+
php-cs-fixer:
12+
name: Check PHP Coding Standards
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
18+
- name: PHP-CS-Fixer
19+
uses: docker://oskarstark/php-cs-fixer-ga
20+
with:
21+
args: --config=.php-cs-fixer.php --diff --dry-run
22+
23+
phpstan:
24+
name: PHPStan
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v2
29+
30+
- name: PHPStan
31+
uses: docker://oskarstark/phpstan-ga
32+
with:
33+
args: analyse
34+
35+
ci:
36+
name: Test PHP ${{ matrix.php-version }} ${{ matrix.name }}
37+
runs-on: ubuntu-latest
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
php-version: ["7.4", "8.0", "8.1"]
42+
composer-flags: [""]
43+
name: [""]
44+
include:
45+
- php-version: 7.4
46+
composer-flags: "--prefer-lowest"
47+
name: "(prefer lowest dependencies)"
48+
49+
services:
50+
service-name-1:
51+
image: consul
52+
ports:
53+
- 8500:8500
54+
55+
steps:
56+
- name: Checkout
57+
uses: actions/checkout@v2
58+
59+
- name: Setup PHP, with composer and extensions
60+
uses: shivammathur/setup-php@v2
61+
with:
62+
php-version: ${{ matrix.php-version }}
63+
extensions: xml
64+
65+
- name: Install Composer dependencies
66+
run: composer update --prefer-dist --no-interaction ${{ matrix.composer-flags }}
67+
68+
- name: Run Tests
69+
run: make test-phpunit

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1+
/.phpunit.cache/
12
/composer.lock
2-
/build/
3-
/bin/consul/config/data-dir/
43
/vendor/

.php-cs-fixer.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
$finder = PhpCsFixer\Finder::create()
4+
->in(__DIR__)
5+
->append([
6+
__FILE__,
7+
])
8+
;
9+
10+
return (new PhpCsFixer\Config())
11+
->setRiskyAllowed(true)
12+
->setRules([
13+
'@PHP74Migration' => true,
14+
'@PhpCsFixer' => true,
15+
'@Symfony' => true,
16+
'@Symfony:risky' => true,
17+
'php_unit_internal_class' => false, // From @PhpCsFixer but we don't want it
18+
'php_unit_test_class_requires_covers' => false, // From @PhpCsFixer but we don't want it
19+
'phpdoc_add_missing_param_annotation' => false, // From @PhpCsFixer but we don't want it
20+
'ordered_class_elements' => true, // Symfony(PSR12) override the default value, but we don't want
21+
'blank_line_before_statement' => true, // Symfony(PSR12) override the default value, but we don't want
22+
])
23+
->setFinder($finder)
24+
;

.travis.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# CHANGELOG
2+
3+
## 5.0.0 (not released yet)
4+
5+
Release notes:
6+
7+
This is the first big release under friendsofphp umbrella. There are lot of BC
8+
Breaks, but they should be easy to fix. From now on, a particular attention will
9+
be given to not break the BC and to provide a nice upgrade path.
10+
11+
* Rename package from `sensiolabs/consul-php-sdk` to `friendsofphp/consul-php-sdk`
12+
* Get ride of SensioLabs namespace (from `SensioLabs\Consul` to `Consul`)
13+
* Add typehint where possible
14+
* Force JSON body request where possible (now you must pass an array as body)
15+
* Remove the factory and almost all interfaces
16+
* Bump to PHP 7.4
17+
* Add support for missing scheme in DSN
18+
* Switch from Travis to GitHub Action
19+
* Add some internal tooling (php-cs-fixer, phpstan, phpunit, Makefile)
20+
21+
---
22+
23+
Previous CHANGELOGs are missing

Consul/ClientInterface.php

Lines changed: 0 additions & 22 deletions
This file was deleted.

Consul/ConsulResponse.php

Lines changed: 0 additions & 37 deletions
This file was deleted.

Consul/ServiceFactory.php

Lines changed: 0 additions & 52 deletions
This file was deleted.

Consul/Services/Agent.php

Lines changed: 0 additions & 109 deletions
This file was deleted.

0 commit comments

Comments
 (0)