Skip to content

Commit

Permalink
Merge pull request #17 from comes/upgrade-php
Browse files Browse the repository at this point in the history
Laravel 10 / PHP 8.2
  • Loading branch information
bilfeldt committed May 1, 2023
2 parents 6327b9e + 2112909 commit fa24bbc
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 60 deletions.
20 changes: 6 additions & 14 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,15 @@ jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.1, 8.0, 7.4]
laravel: [9.*, 8.*]
stability: [prefer-stable]
php: [8.2]
laravel: [10.*]
dependency-version: [prefer-stable]
include:
- laravel: 9.*
testbench: 7.*
- laravel: 8.*
testbench: 6.*
exclude:
- laravel: 7.*
php: 8.1
- laravel: 9.*
php: 7.4
- laravel: 10.*
testbench: 8.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}

Expand All @@ -52,4 +44,4 @@ jobs:
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/phpunit
run: composer run-script test
29 changes: 20 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,35 @@

All notable changes to `laravel-route-statistics` will be documented in this file.

## Development
### 1.* => 2.*

## 1.1.0
No breaking changes. The only changes are to the development dependencies used for testing and then the minimum Laravel and PHP requirements.

## Changes

### 2.0.0 - 2023-05-01

- Add support for PHP 8.2
- Minimum PHP requirement 8.2
- Add support for Laravel 10.*
- Minimum Laravel requirement 10.0

### 1.1.0

- Add query scopes `whereApi` and `whereWeb` to the `RouteStatistics` model.
- Add a new `route:stats` artisan command to show statistics of all logged routes.
- Add a new `route:unused` artisan command to show all routes without any logs.

## 1.0.0
### 1.0.0

- First production ready release

## 0.5.0
### 0.5.0

- Rename field `code` to `status` (**breaking change**)
- Cast date field to Carbon (**breaking change**)

## 0.4.0
### 0.4.0

- Remove the facade and listener and instead rely on the `bilfeldt/laravel-request-logger` package for actual logging.
- Remove `RouteStatisticInterface` in favor of `\Bilfeldt\RequestLogger\Contracts\RequestLoggerInterface`
Expand All @@ -28,19 +39,19 @@ All notable changes to `laravel-route-statistics` will be documented in this fil
- Set minimum Laravel requirement to ^8.50
- Note that this release contains breaking changes if one interacting with the facade, model, listener or interface directly but for those simply relying on the default macros and middleware there is no problem updating.

## 0.3.0
### 0.3.0

- Fix issue with Factory
- Fix issue with event/listener registration

## 0.2.0
### 0.2.0

- Implement usage of facade and singleton class instead of adding data to the request input

## 0.1.1
### 0.1.1

- Fix issue with publishing of config and migration

## 0.1.0
### 0.1.0

- initial release
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@

Log Laravel requests and responses for statistical purposes and optionally aggregate by hours/days/months for minimal db requirements.

| Version | Laravel | PHP |
|---------|-------------|-------------------------|
| 1.* | 8.* \| 9.* | 7.4.* \| 8.0.* \| 8.1.* |
| 2.* | 10.* | 8.2.* |

## Description

Log requests and group them together for aggregated statistics of route usage. Grouping requests by route means that this package saves a minimum of data to the database and subsequent purging of old data can improve this even further.
Expand Down
21 changes: 9 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,16 @@
}
],
"require": {
"php": "^7.4 || ^8.0 || ^8.1",
"bilfeldt/laravel-request-logger": "^1.0",
"illuminate/contracts": "^8.50 || ^9.0",
"laravel/framework": "^8.50 || ^9.0"
"php": "~8.2.0",
"bilfeldt/laravel-request-logger": "^2.0",
"illuminate/contracts": "^10.0",
"laravel/framework": "^10.0"
},
"require-dev": {
"brianium/paratest": "^6.2",
"nunomaduro/collision": "^5.3 || ^6.0",
"orchestra/testbench": "^6.25 || ^7.0",
"phpunit/phpunit": "^9.3",
"spatie/laravel-ray": "^1.9",
"vimeo/psalm": "^4.4"
"nunomaduro/collision": "^7.2",
"orchestra/testbench": "^8.0",
"phpunit/phpunit": "^10.0",
"spatie/laravel-ray": "^1.32"
},
"autoload": {
"psr-4": {
Expand All @@ -42,8 +40,7 @@
}
},
"scripts": {
"psalm": "vendor/bin/psalm",
"test": "./vendor/bin/testbench package:test --parallel --no-coverage",
"test": "./vendor/bin/testbench package:test --no-coverage",
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
},
"config": {
Expand Down
48 changes: 23 additions & 25 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,39 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
executionOrder="random"
failOnWarning="true"
failOnRisky="true"
failOnEmptyTestSuite="true"
beStrictAboutOutputDuringTests="true"
verbose="true"
>
<testsuites>
<testsuite name="Bilfeldt Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage>
<include>
<directory suffix=".php">./src</directory>
</include>
<report>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
<clover outputFile="build/logs/clover.xml"/>
</report>
</coverage>
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
cacheDirectory=".phpunit.cache"
backupStaticProperties="false">
<testsuites>
<testsuite name="Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage>
<report>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
<clover outputFile="build/logs/clover.xml"/>
</report>
</coverage>
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>

0 comments on commit fa24bbc

Please sign in to comment.