Skip to content

Commit 13f7eaf

Browse files
committed
Update for Laravel 9.x and PHP 8.1
1 parent 296719e commit 13f7eaf

File tree

4 files changed

+64
-7
lines changed

4 files changed

+64
-7
lines changed

.github/workflows/latest.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ jobs:
1010
strategy:
1111
fail-fast: true
1212
matrix:
13-
php-version: [7.4, 8.0]
14-
laravel-version: [8.28]
13+
php-version: [8.1]
14+
laravel-version: [9.8.1]
1515

1616
steps:
1717
- uses: actions/checkout@v2
@@ -27,7 +27,7 @@ jobs:
2727
- name: Get composer cache directory
2828
id: composer-cache
2929
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
30-
30+
3131
- name: Cache dependencies
3232
uses: actions/cache@v2
3333
with:
@@ -49,7 +49,7 @@ jobs:
4949

5050
- name: Analyze
5151
run: vendor/bin/phpstan analyse -c phpstan.neon ./src/
52-
52+
5353
- name: phpcs
5454
run: php vendor/bin/phpcs --standard=PSR12 ./src/
5555

.github/workflows/test-php8.1.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: PHP8.1
2+
3+
# Manual run
4+
on: workflow_dispatch
5+
6+
jobs:
7+
matrix-build:
8+
runs-on: ubuntu-latest
9+
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
php-version: [8.1]
14+
# these versions supports php8 in their composer.json
15+
laravel-version:
16+
[
17+
9.0,
18+
9.1,
19+
9.2,
20+
9.3,
21+
9.4,
22+
9.5,
23+
9.6,
24+
9.7,
25+
9.8,
26+
]
27+
28+
steps:
29+
- uses: actions/checkout@v2
30+
31+
- name: Setup PHP
32+
uses: shivammathur/setup-php@master
33+
with:
34+
php-version: ${{ matrix.php-version }}
35+
36+
- name: Composer update
37+
run: composer self-update >/dev/null 2>&1
38+
39+
- name: Lock laravel/framework version
40+
env:
41+
LARAVEL_VERSION: ${{ matrix.laravel-version }}
42+
run: composer require laravel/framework:${{ matrix.laravel-version }} --no-update
43+
44+
- name: Vendor update
45+
run: composer update --prefer-source --no-interaction
46+
47+
- name: Run test suites
48+
run: composer run-script test
49+
50+
- name: Analyze
51+
run: vendor/bin/phpstan analyse -c phpstan.neon ./src/
52+
53+
- name: phpcs
54+
run: php vendor/bin/phpcs --standard=PSR12 ./src/

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
---
44

55
- New shortcut call for deviceType (by @mylesduncanking)
6+
- Testing on PHP 8.1
7+
- Testing with Laravel 9.x
68

79
### Changes in 4.4.0
810

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![Browser Detection Logo](https://user-images.githubusercontent.com/3441017/126362397-d9767164-4f44-4d41-a3cd-b669e10e95dc.png)
22

3-
## Browser Detection v4.4 by _[hisorange](https://hisorange.me)_
3+
## Browser Detection v4.5 by _[hisorange](https://hisorange.me)_
44

55
[![Latest Stable Version](https://poser.pugx.org/hisorange/browser-detect/v/stable)](https://packagist.org/packages/hisorange/browser-detect)
66
[![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)
@@ -10,7 +10,7 @@
1010

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

1515
### How to install
1616

@@ -92,6 +92,7 @@ The following matrix is has been continuously tested by the great and awesome **
9292
| Laravel 6.x | - | - | - | ✓ |
9393
| Laravel 7.x | - | - | - | ✓ |
9494
| Laravel 8.x | - | - | - | 4.4+ |
95+
| Laravel 9.x | - | - | - | 4.4+ |
9596
| Standalone | - | - | - | 4.2+ |
9697

9798
Since 2013 the package runs tests on every possible PHP / Laravel version matrix.
@@ -124,6 +125,7 @@ Every call on the **Browser** facade is proxied to a result object, so the follo
124125
| Browser::isTablet() | Is this a tablet device. | _(boolean)_ |
125126
| Browser::isDesktop() | Is this a desktop computer. | _(boolean)_ |
126127
| Browser::isBot() | Is this a crawler / bot. | _(boolean)_ |
128+
| Browser::deviceType() | Enumerated response for [Mobile, Tablet, Desktop, and Bot] | _(string)_ |
127129
| **Browser related functions** | | |
128130
| Browser::browserName() | Browser's human friendly name like Firefox 3.6, Chrome 42. | _(string)_ |
129131
| Browser::browserFamily() | Browser's vendor like Chrome, Firefox, Opera. | _(string)_ |
@@ -144,7 +146,6 @@ Every call on the **Browser** facade is proxied to a result object, so the follo
144146
| Browser::isLinux() | Is this a linux based operating system. | _(boolean)_ |
145147
| Browser::isMac() | Is this an iOS or Mac based operating system. | _(boolean)_ |
146148
| Browser::isAndroid() | Is this an Android operating system. | _(boolean)_ |
147-
| Browser::deviceType() | Enumerated response for [Mobile, Tablet, Desktop, and Bot] | _(string)_ |
148149
| **Device related functions** | | |
149150
| Browser::deviceFamily() | Device's vendor like Samsung, Apple, Huawei. | _(string)_ |
150151
| Browser::deviceModel() | Device's brand name like iPad, iPhone, Nexus. | _(string)_ |

0 commit comments

Comments
 (0)