Skip to content

Commit

Permalink
Merge pull request #232 from mimmi20/issue-191
Browse files Browse the repository at this point in the history
remove Log command
  • Loading branch information
asgrim authored Dec 29, 2017
2 parents b14934e + eb37a7e commit d1b2d58
Show file tree
Hide file tree
Showing 15 changed files with 12 additions and 886 deletions.
7 changes: 0 additions & 7 deletions .scrutinizer.yml

This file was deleted.

15 changes: 9 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ cache:

stages:
- composer validate
- test
- test with coverage
- check coding style
- static code analysis
- test
- test with coverage
- compare results

before_install:
Expand All @@ -32,9 +32,7 @@ before_install:

install: travis_retry composer update --optimize-autoloader --prefer-dist --prefer-stable --no-progress --no-interaction -vv $COMPOSER_FLAGS

script:
- composer validate --strict
- vendor/bin/phpunit -c phpunit.xml.dist --no-coverage --colors --verbose --exclude-group compare
script: vendor/bin/phpunit -c phpunit.xml.dist --no-coverage --colors --verbose --exclude-group compare

jobs:
fast_finish: true
Expand All @@ -58,25 +56,30 @@ jobs:
- travis_retry composer self-update
script: vendor/bin/phpunit -c phpunit.xml.dist --colors --verbose --exclude-group compare --coverage-text --coverage-clover=coverage.clover
after_success:
- wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover
- bash <(curl -s https://codecov.io/bash) -f coverage.clover -F phpunit

- stage: composer validate
php: 7.1
env: COMPOSER_FLAGS=""
before_install:
- phpenv config-rm xdebug.ini || echo "xdebug not available"
- echo 'opcache.enable=1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo 'opcache.enable_cli=1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
install: skip
script: composer validate --strict

- stage: check coding style
php: 7.1
env: COMPOSER_FLAGS=""
script:
- vendor/bin/phpcs
- php -n -d memory_limit=768M vendor/bin/php-cs-fixer fix --dry-run -vv

- stage: static code analysis
php: 7.1
env: COMPOSER_FLAGS=""
script: vendor/bin/phpstan analyse -l 7 -c phpstan.neon --autoload-file=vendor/autoload.php --memory-limit=768M --no-progress src tests

- stage: compare results
php: 7.1
env: COMPOSER_FLAGS=""
Expand Down
23 changes: 2 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This is a userland replacement for PHP's native `get_browser()` function, which

**Note that you are currently viewing the 4.x series. If you're looking for any 2.x version, please read the documentation for that branch [here](https://github.com/browscap/browscap-php/tree/2.x).**

[![Build Status](https://secure.travis-ci.org/browscap/browscap-php.png?branch=master)](http://travis-ci.org/browscap/browscap-php) [![Code Coverage](https://scrutinizer-ci.com/g/browscap/browscap-php/badges/coverage.png?s=61cb32ca83d2053ed9b140690b6e18dfa00e4639)](https://scrutinizer-ci.com/g/browscap/browscap-php/) [![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/browscap/browscap-php/badges/quality-score.png?s=db1cc1699b1cb6ac6ae46754ef9612217eba5526)](https://scrutinizer-ci.com/g/browscap/browscap-php/)
[![Build Status](https://secure.travis-ci.org/browscap/browscap-php.png?branch=master)](http://travis-ci.org/browscap/browscap-php) [![codecov](https://codecov.io/gh/browscap/browscap-php/branch/master/graph/badge.svg)](https://codecov.io/gh/browscap/browscap-php)

Installation
------------
Expand Down Expand Up @@ -59,6 +59,7 @@ What's changed in version 4.x
* `PropertyFormatter` now assumes any non-truthy values are `false`
* `checkUpdate` method now throws an exception if we could not determine the "remote" version, or if there is no
version in cache already.
* `log` method was removed

## Changes

Expand Down Expand Up @@ -238,26 +239,6 @@ vendor/bin/browscap-php browscap:parse
- `user-agent` (required) the user agent which should be parsed
- `cache` (optional) the relative path to your cache directory

## log

The `log` command parses a single access log file or a directory with access log files and writes the results into an output file.

```php
vendor/bin/browscap-php browscap:log
```

### options

- `output` (required) the path to a log file where the results are stored
- `cache` (optional) the relative path to your cache directory
- `log-file` (optional) the relative path to an access log file
- `log-dir` (optional) the relative path to directory with the log files
- `include` (optional) a glob compatible list of files which should be included, only used in comination with the `log-dir` option
- `exclude` (optional) a glob compatible list of files which should be excluded from parsing, only used in comination with the `log-dir` option

NOTE: One of both options `log-file` and `log-dir` is required.
NOTE: At the moment only Apache access logs are supported.

CLI Examples
------------

Expand Down
1 change: 0 additions & 1 deletion bin/browscap-php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ $application = new Application('browscap.php');
$application->add(new Command\ConvertCommand($cacheDirectory, $defaultIniFile));
$application->add(new Command\UpdateCommand($cacheDirectory));
$application->add(new Command\ParserCommand($cacheDirectory));
$application->add(new Command\LogfileCommand($cacheDirectory));
$application->add(new Command\FetchCommand($cacheDirectory, $defaultIniFile));
$application->add(new Command\CheckUpdateCommand($cacheDirectory));

Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,13 @@
"roave/doctrine-simplecache": "^1.1",
"guzzlehttp/guzzle": "^6.2",
"symfony/filesystem": "^3.3||^4.0",
"symfony/finder": "^3.3||^4.0",
"symfony/console": "^3.3||^4.0",
"monolog/monolog": "^1.23"
},
"require-dev": {
"phpunit/phpunit": "^6.5",
"mikey179/vfsStream": "^1.6",
"squizlabs/php_codesniffer": "^3.1",
"squizlabs/php_codesniffer": "^3.2",
"friendsofphp/php-cs-fixer": "^2.9",
"phpstan/phpstan": "^0.9"
},
Expand Down
Loading

0 comments on commit d1b2d58

Please sign in to comment.