fluent / fluent-logger-php

A structured logger for Fluentd (PHP)
Other
215 stars 57 forks source link

fix warning : Deprecated configuration setting "strict" used #37

Closed DQNEO closed 9 years ago

DQNEO commented 9 years ago

the current phpunit.xml.dist raises a warning like below:

$ phpunit
PHPUnit 4.5.1 by Sebastian Bergmann and contributors.

Configuration read from /Users/DQNEO/src/github.com/DQNEO/fluent-logger-php/phpunit.xml.dist

Deprecated configuration setting "strict" used

The Xdebug extension is not loaded. No code coverage will be generated.

......ChainLogger: Fluent\Logger\FluentLogger failed fwrite retry: retry count exceeds limit. debug.test: {"hello":"world"}
...Entity::__construct(): unexpected time format `not int` specified.
........Fluent\Logger\FluentLogger failed fwrite retry: retry count exceeds limit. debug.test: {"foo":"bar"}
.Mock_FluentLogger_98f18707 could not write message debug.test: {"foo":"bar"}
.Mock_FluentLogger_98f18707 connection aborted debug.test: {"foo":"bar"}
........................

Time: 164 ms, Memory: 4.75Mb

OK (43 tests, 57 assertions)
sasezaki commented 9 years ago

more preferable such below.

reportUselessTests="true"
strictCoverage="true"
disallowTestOutput="true"

@see https://github.com/sebastianbergmann/phpunit-documentation/issues/282

DQNEO commented 9 years ago

done. how about this?

DQNEO commented 9 years ago

Before

$ vendor/bin/phpunit
PHPUnit 4.8.9 by Sebastian Bergmann and contributors.

Runtime:        PHP 7.0.0RC2
Configuration:  /Users/DQNEO/src/github.com/DQNEO/fluent-logger-php/phpunit.xml.dist
Warning:        Deprecated configuration setting "strict" used
Warning:        The Xdebug extension is not loaded
                No code coverage will be generated.

......ChainLogger: Fluent\Logger\FluentLogger failed fwrite retry: retry count exceeds limit. debug.test: {"hello":"world"}
...Entity::__construct(): unexpected time format `not int` specified.
........Fluent\Logger\FluentLogger failed fwrite retry: retry count exceeds limit. debug.test: {"foo":"bar"}
.Mock_FluentLogger_7d6836e2 could not write message debug.test: {"foo":"bar"}
.Mock_FluentLogger_7d6836e2 connection aborted debug.test: {"foo":"bar"}
........................

Time: 76 ms, Memory: 4.00Mb

OK (43 tests, 57 assertions)

After

$ vendor/bin/phpunit
PHPUnit 4.8.9 by Sebastian Bergmann and contributors.

Runtime:        PHP 7.0.0RC2
Configuration:  /Users/DQNEO/src/github.com/DQNEO/fluent-logger-php/phpunit.xml.dist
Warning:        The Xdebug extension is not loaded
                No code coverage will be generated.

......ChainLogger: Fluent\Logger\FluentLogger failed fwrite retry: retry count exceeds limit. debug.test: {"hello":"world"}
...Entity::__construct(): unexpected time format `not int` specified.
........Fluent\Logger\FluentLogger failed fwrite retry: retry count exceeds limit. debug.test: {"foo":"bar"}
.Mock_FluentLogger_8110f28b could not write message debug.test: {"foo":"bar"}
.Mock_FluentLogger_8110f28b connection aborted debug.test: {"foo":"bar"}
........................

Time: 90 ms, Memory: 4.00Mb

OK (43 tests, 57 assertions)
hanabokuro commented 9 years ago

:+1: LGTM

cosmo0920 commented 9 years ago

:+1: