Skip to content

Commit

Permalink
Merge branch 'release/3.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmypuckett committed Mar 14, 2023
2 parents e657fb0 + 2d829e6 commit 527ad2e
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 31 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [8.0, 8.1]
php: [8.1, 8.2]
stability: [prefer-lowest, prefer-stable]

name: PHP ${{ matrix.php }} - ${{ matrix.stability }}

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
# Fetch 10 commits or Scrutinizer will throw ("Failed to retrieve commit parents. If you use a shallow git checkout, please checkout at least a depth of one."), see: RepositoryIntrospector at scrutinizer-ci/ocular GitHub repository
# 10 commits is an arbitrary value that is more than 1 commit
fetch-depth: 10

- name: Cache dependencies
uses: actions/cache@v1
Expand All @@ -37,11 +41,11 @@ jobs:
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-suggest

- name: PHP Security Checker
uses: symfonycorp/security-checker-action@v2
uses: symfonycorp/security-checker-action@v5
if: ${{ matrix.stability == 'prefer-stable' }}

- name: Execute tests
run: vendor/bin/phpunit --coverage-clover=coverage.clover --verbose

- name: Upload Code Coverage
run: wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover
run: vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.0
3.1.0
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@
}
],
"require": {
"php": ">=8.0.2",
"php": ">=8.1",
"ext-json": "*",
"illuminate/cache": "^9.19",
"illuminate/routing": "^9.19",
"illuminate/support": "^9.42",
"illuminate/cache": "^9.19|^10",
"illuminate/routing": "^9.19|^10",
"illuminate/support": "^9.42|^10",
"mobiledetect/mobiledetectlib": "~2.8",
"ua-parser/uap-php": "~3.9"
},
"require-dev": {
"illuminate/http": "^9.19",
"illuminate/http": "^9.19|^10",
"laravel/pint": "^1.2",
"mockery/mockery": "^1.5.1",
"phpunit/phpunit": "^9.5.26",
"phpunit/phpunit": "^9.6.5",
"psy/psysh": "^0.11",
"symfony/var-dumper": "^6.2"
},
Expand Down
20 changes: 5 additions & 15 deletions src/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,38 +20,28 @@ abstract class Filter
{
/**
* Is this a block or allow filter?
*
* @var bool
*/
protected $block_filter = null;
protected ?bool $block_filter = null;

/**
* The client instance.
*
* @var Client
*/
protected $client;
protected Client $client;

/**
* Location of the config file.
*
* @var string
*/
protected $config_path = 'browserfilter.';
protected string $config_path = 'browserfilter.';

/**
* The path to redirect the user if client is blocked.
*
* @var string
*/
protected $redirect_route;
protected ?string $redirect_route = null;

/**
* The array of rules
*
* @var array
*/
protected $rules = [];
protected array $rules = [];

/**
* Create a new browser filter middleware instance.
Expand Down
4 changes: 1 addition & 3 deletions src/FilterServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ class FilterServiceProvider extends ServiceProvider
{
/**
* Location of the configuration file in the package
*
* @var string
*/
protected $config_file;
protected string $config_file;

public function __construct($app)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Route/AllowFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ class AllowFilter extends RouteFilter
/**
* {@inheritDoc}
*/
protected $block_filter = false;
protected ?bool $block_filter = false;
}
2 changes: 1 addition & 1 deletion src/Route/BlockFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ class BlockFilter extends RouteFilter
/**
* {@inheritDoc}
*/
protected $block_filter = true;
protected ?bool $block_filter = true;
}
2 changes: 1 addition & 1 deletion src/Stack/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Filter extends CoreFilter
/**
* {@inheritDoc}
*/
protected $block_filter = true;
protected ?bool $block_filter = true;

/**
* {@inheritDoc}
Expand Down

0 comments on commit 527ad2e

Please sign in to comment.