Skip to content

Commit

Permalink
Release for 4.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hisorange authored Feb 23, 2021
2 parents 49dcf0e + 65ae693 commit 4f1fb99
Show file tree
Hide file tree
Showing 11 changed files with 263 additions and 48 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Latest

# Triggers the workflow on push or pull request events
on: [push, pull_request]

jobs:
matrix-build:
runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
php-version: [7.4, 8.0]
laravel-version: [8.28]

steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-version }}

- name: Composer update
run: composer self-update >/dev/null 2>&1

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

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

- name: Lock laravel/framework version
env:
LARAVEL_VERSION: ${{ matrix.laravel-version }}
run: composer require laravel/framework:${{ matrix.laravel-version }} --no-update

- name: Vendor update
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer update --prefer-source --no-interaction

- name: Run test suites
run: composer run-script test

- name: Analyze
run: vendor/bin/phpstan analyse -c phpstan.neon ./src/

- name: phpcs
run: php vendor/bin/phpcs --standard=PSR12 ./src/

- name: Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: php vendor/bin/php-coveralls -v
79 changes: 79 additions & 0 deletions .github/workflows/test-php7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: PHP7

# Manual run
on: workflow_dispatch

jobs:
matrix-build:
# Ubuntu latest will be ubuntu-20.04 which doesn't support php 7.3
runs-on: ubuntu-18.04

strategy:
fail-fast: false
matrix:
php-version: [7.3]
laravel-version:
[
6.2,
6.4,
6.5,
6.8,
6.12,
6.18,
6.19,
6.20.0,
7.0,
7.3,
7.6,
7.12,
7.25,
7.28,
7.29,
7.30.1,
8.0,
8.12,
8.13,
8.14,
8.15,
8.16,
8.17,
8.18,
8.19,
8.20.1,
8.21,
8.22,
8.23,
8.24,
8.25,
8.26,
8.27,
8.28,
]

steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-version }}

- name: Composer update
run: composer self-update >/dev/null 2>&1

- name: Lock laravel/framework version
env:
LARAVEL_VERSION: ${{ matrix.laravel-version }}
run: composer require laravel/framework:${{ matrix.laravel-version }} --no-update

- name: Vendor update
run: composer update --prefer-source --no-interaction

- name: Run test suites
run: composer run-script test

- name: Analyze
run: vendor/bin/phpstan analyse -c phpstan.neon ./src/

- name: phpcs
run: php vendor/bin/phpcs --standard=PSR12 ./src/
65 changes: 65 additions & 0 deletions .github/workflows/test-php8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: PHP8

# Manual run
on: workflow_dispatch

jobs:
matrix-build:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php-version: [8.0]
# these versions supports php8 in their composer.json
laravel-version:
[
6.20.0,
7.29,
7.30.1,
8.12,
8.13,
8.14,
8.15,
8.16,
8.17,
8.18,
8.19,
8.20.1,
8.21,
8.22,
8.23,
8.24,
8.25,
8.26,
8.27,
8.28,
]

steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-version }}

- name: Composer update
run: composer self-update >/dev/null 2>&1

- name: Lock laravel/framework version
env:
LARAVEL_VERSION: ${{ matrix.laravel-version }}
run: composer require laravel/framework:${{ matrix.laravel-version }} --no-update

- name: Vendor update
run: composer update --prefer-source --no-interaction

- name: Run test suites
run: composer run-script test

- name: Analyze
run: vendor/bin/phpstan analyse -c phpstan.neon ./src/

- name: phpcs
run: php vendor/bin/phpcs --standard=PSR12 ./src/
21 changes: 18 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,28 @@ language: php

php:
- 7.3
- 8.0

env:
- LARAVEL_VERSION=6.2
- LARAVEL_VERSION=6.3
- LARAVEL_VERSION=6.4
- LARAVEL_VERSION=6.5
- LARAVEL_VERSION=7.0
- LARAVEL_VERSION=8.0

matrix:
exclude:
- php: 8.0
env: LARAVEL_VERSION=6.2
- php: 8.0
env: LARAVEL_VERSION=6.3
- php: 8.0
env: LARAVEL_VERSION=6.4
- php: 8.0
env: LARAVEL_VERSION=6.5
- php: 8.0
env: LARAVEL_VERSION=7.0

before_install:
- composer self-update >/dev/null 2>&1
Expand All @@ -19,9 +34,9 @@ install: composer update --prefer-source --no-interaction
script: composer run-script test

after_success:
- "if [ $LARAVEL_VERSION = '7.0' ]; then vendor/bin/phpstan analyse -c phpstan.neon ./src/; fi"
- "if [ $LARAVEL_VERSION = '7.0' ]; then php vendor/bin/phpcs --standard=PSR12 ./src/; fi"
- "if [ $LARAVEL_VERSION = '7.0' ]; then php vendor/bin/coveralls -v; fi"
- "if [ $LARAVEL_VERSION = '8.0' ]; then vendor/bin/phpstan analyse -c phpstan.neon ./src/; fi"
- "if [ $LARAVEL_VERSION = '8.0' ]; then php vendor/bin/phpcs --standard=PSR12 ./src/; fi"
- "if [ $LARAVEL_VERSION = '8.0' ]; then php vendor/bin/coveralls -v; fi"

notifications:
email:
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
### Changes in 4.4.0

---

- Support for Laravel 8.x
- Support for PHP 8.x
- New github actions tests to cover an even bigger test matrix
- Fixes some PHPStan testing issue

### Changes in 4.3.0

---
Expand Down
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
## Browser Detection v4.3 by _[hisorange](https://hisorange.me)_
## Browser Detection v4.4 by _[hisorange](https://hisorange.me)_

[![Latest Stable Version](https://poser.pugx.org/hisorange/browser-detect/v/stable)](https://packagist.org/packages/hisorange/browser-detect)
[![Build Status](https://travis-ci.org/hisorange/browser-detect.svg?branch=stable)](https://travis-ci.org/hisorange/browser-detect)
[![Build](https://github.com/hisorange/browser-detect/actions/workflows/latest.yml/badge.svg?branch=stable)](https://github.com/hisorange/browser-detect/actions/workflows/latest.yml)
[![Coverage Status](https://coveralls.io/repos/github/hisorange/browser-detect/badge.svg)](https://coveralls.io/github/hisorange/browser-detect)
[![Total Downloads](https://poser.pugx.org/hisorange/browser-detect/downloads)](https://packagist.org/packages/hisorange/browser-detect)
[![License](https://poser.pugx.org/hisorange/browser-detect/license)](https://packagist.org/packages/hisorange/browser-detect)

Easy to use package to identify the visitor's browser details and device type.
Magic is **not** involved the results are generated by multiple well tested and developed packages.
Supporting **every laravel** version between **4.0 » 7.0**, also tested on **every PHP** version between **5.6 » 7.3**.
Supporting **every laravel** version between **4.0 » 8.0**, also tested on **every PHP** version between **5.6 » 8.0**.

### How to install

Expand Down Expand Up @@ -81,14 +81,15 @@ Easy peasy, ain't it?

---

The following matrix is has been continuously tested by the great and awesome [Travis CI](https://travis-ci.org/hisorange)!
The following matrix is has been continuously tested by the great and awesome **Github Actions**!

| ----- | Browser Detect 1.x | Browser Detect 2.x | Browser Detect 3.x | Browser Detect 4.x |
| :---------: | :----------------: | :----------------: | :----------------: | :----------------: |
| Laravel 4.x | ✓ | ✓ | - | - |
| Laravel 5.x | - | ✓ | ✓ | - |
| Laravel 6.x | - | - | - | ✓ |
| Laravel 7.x | - | - | - | ✓ |
| Laravel 8.x | - | - | - | 4.4+ |
| Standalone | - | - | - | 4.2+ |

Since 2013 the package runs tests on every possible PHP / Laravel version matrix.
Expand Down Expand Up @@ -217,6 +218,10 @@ with new Laravel and PHP versions, but not planning to do any new features.

Thank You for your support over the years, and worry not, the library is stable, and has all the features You ever need.

~ Update on this :D

No major features are added in the past months, but with the help of [Raymund Ács](https://github.com/PoOwAa) we are patching and continuing the support for micro features and version ports.

### Changelog

---
Expand Down
14 changes: 10 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,23 @@
"email": "[email protected]"
}
],
"repositories": [
{
"type": "vcs",
"url": "https://github.com/mustangostang/spyc"
}
],
"require": {
"php": ">=7.2",
"php": "^7.2 || ^8.0",
"ua-parser/uap-php": "~3.9",
"league/pipeline": "^1.0",
"mobiledetect/mobiledetectlib": "~2.8",
"jaybizzle/crawler-detect": "~1.2",
"matomo/device-detector": "^4.0"
},
"require-dev": {
"phpunit/phpunit": "~5.0 || ~6.0 || ~7.0 || ~8.0",
"orchestra/testbench": "~4.0 || ~5.0",
"phpunit/phpunit": "~5.0 || ~6.0 || ~7.0 || ~8.0 || ~9.0",
"orchestra/testbench": "~4.0 || ~5.0 || ~6.0",
"php-coveralls/php-coveralls": "~1.0 || ~2.0",
"squizlabs/php_codesniffer": "^3.5",
"phpstan/phpstan": "^0.12.11"
Expand Down Expand Up @@ -62,4 +68,4 @@
"test-dev": "phpunit --coverage-text",
"test": "phpunit --coverage-clover ./tests/logs/clover.xml"
}
}
}
3 changes: 1 addition & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ parameters:
checkMissingIterableValueType: false
reportUnmatchedIgnoredErrors: false
ignoreErrors:
- '%Call to an undefined method Illuminate\\\Cache\\\CacheManager::remember\(\).%'
- '%Parameter #1 \$function of function call_user_func_array expects callable\(\)\: mixed, array\(hisorange\\BrowserDetect\\Contracts\\ResultInterface, string\) given\.%'
- '%Call to an undefined method Illuminate\\\Cache\\\CacheManager::remember\(\).%'
Loading

0 comments on commit 4f1fb99

Please sign in to comment.