-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from Jeroeny/update
Update codestyle, php version, tests, add interface
- Loading branch information
Showing
35 changed files
with
540 additions
and
365 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
; top-most EditorConfig file | ||
root = true | ||
|
||
# All files. | ||
[*] | ||
end_of_line = LF | ||
indent_style = space | ||
indent_size = 4 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/tests/ export-ignore | ||
/.gitignore export-ignore | ||
/.gitattributes export-ignore | ||
/phpcs.xml.dist export-ignore | ||
/phpunit.xml.dist export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
on: | ||
push: ~ | ||
pull_request: ~ | ||
|
||
jobs: | ||
phpcs: | ||
name: PHPCS | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 7.4 | ||
coverage: none | ||
tools: composer:v2, cs2pr | ||
|
||
- run: composer update --no-progress | ||
|
||
- run: vendor/bin/phpcs -q --report=checkstyle | cs2pr | ||
|
||
phpunit: | ||
name: PHPUnit on ${{ matrix.php }} | ||
runs-on: ubuntu-latest | ||
continue-on-error: ${{ !matrix.stable }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: ['7.4', '8.0', '8.1'] | ||
stable: [true] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
coverage: pcov | ||
tools: composer:v2 | ||
|
||
- run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | ||
|
||
- run: composer update --no-progress | ||
|
||
- run: vendor/bin/phpunit --coverage-text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
vendor | ||
composer.lock | ||
/vendor | ||
/composer.lock | ||
/.phpcs-cache | ||
/.phpunit.result.cache |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# Change Log | ||
All notable changes to this project will be documented in this file. | ||
Updates should follow the [Keep a CHANGELOG](https://keepachangelog.com/) principles. | ||
|
||
## [Unreleased][unreleased] | ||
### Added | ||
- Added new `StatsDClient` interface, which `Client` now implements | ||
- Added new `Exception` interface, which all exceptions now implement | ||
|
||
### Changed | ||
- Supported PHP versions are now 7.4, 8.0, and 8.1 | ||
- All properties and methods now have type hints where applicable | ||
- The following methods return the `StatsDClient` interface instead of `Client`: | ||
- `ConfigurationException::getInstance()` | ||
- `ConnectionException::getInstance()` | ||
- The following `Client` methods now return `void` instead of returning `$this`: | ||
- `increment()` | ||
- `decrement()` | ||
- `startTiming()` | ||
- `endTiming()` | ||
- `timing()` | ||
- `timings()` | ||
- `time()` | ||
- `gauge()` | ||
- `set()` | ||
- `send()` | ||
- Renamed `Client::$instance_id` to `Client::$instanceId` | ||
|
||
## [1.5.0] - 2018-10-09 | ||
### Added | ||
- Added tags supporting Datadog format (#52) | ||
|
||
## [1.4.3] - 2017-07-17 | ||
### Added | ||
- Added Silex 2 support (#43) | ||
|
||
### Changed | ||
- Dropped support for PHP <5.6 | ||
- Test against PHP 7.1 | ||
|
||
## [1.4.2] - 2017-02-09 | ||
### Changed | ||
- Use `config` to allow publishing differently to views or assets within Laravel | ||
|
||
## [1.4.1] - 2017-02-02 | ||
### Added | ||
- Added Laravel 5.4 support | ||
|
||
## [1.4.0] - 2016-04-21 | ||
### Added | ||
- Custom timeout configurations | ||
- Exception handling is now configurable | ||
- Built-in Laravel 5 support | ||
|
||
### Fixed | ||
- DNS lookup failures no longer raise exceptions | ||
|
||
## [1.3.0] - 2015-06-11 | ||
### Changed | ||
- Throwing an exception is now optional during connections to server and can be silently ignored | ||
|
||
## [1.2.0] - 2015-05-15 | ||
### Added | ||
- Configurable timeouts | ||
- SET method: Count the number of unique values passed to a key | ||
- PHP 5.6 testing on Travis | ||
- Various test patches and improvements | ||
|
||
## [1.1.0] - 2014-02-01 | ||
### Added | ||
- PSR-4 support | ||
- New documentation | ||
|
||
## [1.0.0] - 2013-08-27 | ||
|
||
This is the first fully stable version of StatsD library. This version has the following features: | ||
|
||
- Counters | ||
- Gauges | ||
- Timers | ||
- Timing Blocks | ||
- 100% Code Coverage | ||
- Silex Service Provider | ||
|
||
[unreleased]: https://github.com/thephpleague/statsd/compare/1.5.0...master | ||
[1.5.0]: https://github.com/thephpleague/statsd/compare/1.4.5...1.5.0 | ||
[1.4.5]: https://github.com/thephpleague/statsd/compare/1.4.4...1.4.5 | ||
[1.4.4]: https://github.com/thephpleague/statsd/compare/1.4.3...1.4.4 | ||
[1.4.3]: https://github.com/thephpleague/statsd/compare/1.4.2...1.4.3 | ||
[1.4.2]: https://github.com/thephpleague/statsd/compare/1.4.1...1.4.2 | ||
[1.4.1]: https://github.com/thephpleague/statsd/compare/1.4.0...1.4.1 | ||
[1.4.0]: https://github.com/thephpleague/statsd/compare/1.3.0...1.4.0 | ||
[1.3.0]: https://github.com/thephpleague/statsd/compare/1.2.0...1.3.0 | ||
[1.2.0]: https://github.com/thephpleague/statsd/compare/1.1.0...1.2.0 | ||
[1.1.0]: https://github.com/thephpleague/statsd/compare/v1.0...1.1.0 | ||
[1.0.0]: https://github.com/thephpleague/statsd/releases/tag/v1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0"?> | ||
<ruleset | ||
name="PHPCS Coding Standards" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd" | ||
> | ||
<arg name="basepath" value="."/> | ||
<arg name="extensions" value="php"/> | ||
<arg name="colors" /> | ||
<arg name="cache" value=".phpcs-cache"/> | ||
|
||
<!-- Ignore warnings, show progress of the run and show sniff names --> | ||
<arg value="nps"/> | ||
|
||
<rule ref="PSR12"/> | ||
|
||
<file>src</file> | ||
<file>tests</file> | ||
|
||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit colors="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" bootstrap="vendor/autoload.php"> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
colors="true" | ||
bootstrap="vendor/autoload.php" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> | ||
|
||
<coverage> | ||
<include> | ||
<directory suffix=".php">src/</directory> | ||
</include> | ||
</coverage> | ||
|
||
<testsuites> | ||
<testsuite name="League StatsD Test Suite"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<filter> | ||
<whitelist> | ||
<directory suffix=".php">src/</directory> | ||
</whitelist> | ||
</filter> | ||
|
||
</phpunit> |
Oops, something went wrong.