Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,25 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: 8.3
coverage: none
tools: composer:v2, cs2pr

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache composer dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-8.3-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-8.3-composer-

- run: composer update --no-progress

- run: vendor/bin/phpcs -q --report=checkstyle | cs2pr
Expand All @@ -29,11 +40,11 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['7.4', '8.0', '8.1']
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
stable: [true]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -43,6 +54,17 @@ jobs:
coverage: pcov
tools: composer:v2

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache composer dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer-

- run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- run: composer update --no-progress
Expand Down
20 changes: 10 additions & 10 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,17 +341,17 @@ protected function send(array $data, array $tags = []): void
} catch (ConnectionException $e) {
if ($this->throwConnectionExceptions) {
throw $e;
} else {
trigger_error(
sprintf(
'StatsD server connection failed (udp://%s:%d): %s',
$this->host,
$this->port,
$e->getMessage()
),
E_USER_WARNING
);
}

trigger_error(
sprintf(
'StatsD server connection failed (udp://%s:%d): %s',
$this->host,
$this->port,
$e->getMessage()
),
E_USER_WARNING
);
}
}
}