Skip to content

Commit 29b3562

Browse files
authored
Merge pull request #12 from abordage/laravel-10
Laravel 10 support
2 parents 0144ed6 + 8364a18 commit 29b3562

File tree

13 files changed

+126
-39
lines changed

13 files changed

+126
-39
lines changed

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Bug Report
2+
description: Report a general package issue. Filling in the issue template is mandatory, issues without it will be closed.
3+
title: "[Bug]: "
4+
labels: [ bug ]
5+
body:
6+
- type: checkboxes
7+
id: terms
8+
attributes:
9+
label: Is the bug applicable and reproducible to the latest version of the package and hasn't it been reported before?
10+
options:
11+
- label: Yes, it's still reproducible
12+
required: true
13+
- type: input
14+
attributes:
15+
label: What version of Package are you using?
16+
description: 'For example: 1.2.0'
17+
validations:
18+
required: true
19+
- type: input
20+
attributes:
21+
label: What version of Laravel are you using?
22+
description: 'For example: 9.52.0'
23+
validations:
24+
required: true
25+
- type: input
26+
attributes:
27+
label: What version of PHP are you using?
28+
description: 'For example: 8.1.0'
29+
validations:
30+
required: true
31+
- type: textarea
32+
attributes:
33+
label: Describe your issue
34+
description: Describe the problem you're seeing, Please be short, but concise.
35+
validations:
36+
required: true
37+
- type: textarea
38+
attributes:
39+
label: How can the issue be reproduced?
40+
description: Please provide easy-to-reproduce steps (repository, simple code example, failing unit test). Please don't paste your entire code, but create a reproducible scenario that can be tested using a simple User model in a blank Laravel installation.
41+
validations:
42+
required: true
43+
- type: textarea
44+
attributes:
45+
label: What should be the expected behaviour?
46+
description: Please describe what the expected outcome should be. Any suggestions to what is wrong?
47+
validations:
48+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,3 @@ contact_links:
66
- name: Request a feature
77
url: https://github.com/abordage/laravel-last-modified/discussions/new?category=ideas
88
about: Share ideas for new features
9-
- name: Report a bug
10-
url: https://github.com/abordage/laravel-last-modified/issues/new
11-
about: Report a reproducible bug
12-
- name: Report a security issue
13-
url: https://github.com/abordage/laravel-last-modified/security/policy
14-
about: Learn how to notify us for sensitive bugs

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
2+
3+
4+
> 💡 Please take note of our [contributing guidelines](https://github.com/abordage/.github/blob/master/CONTRIBUTING.md)
5+
6+
1. Why should it be added? What are the benefits of this change?
7+
2. Does it contain multiple, unrelated changes? Please separate the PRs out.
8+
3. Does it include tests, if possible?
9+
4. Any drawbacks? Possible breaking changes?
10+
11+
**Mark the following tasks as done:**
12+
- [ ] Checked the codebase to ensure that your feature doesn't already exist.
13+
- [ ] Take note of the contributing guidelines.
14+
- [ ] Checked the pull requests to ensure that another person hasn't already submitted a fix.
15+
- [ ] Added tests to ensure against regression.
16+
- [ ] Updated the changelog
17+
18+
### Thanks for contributing!

.github/workflows/tests.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,24 @@ jobs:
1111
matrix:
1212
stability: [ prefer-stable ]
1313
os: [ ubuntu-latest ]
14-
php: [7.4, 8.0, 8.1]
15-
laravel: [8.*, 9.*]
14+
php: [7.4, 8.0, 8.1, 8.2]
15+
laravel: [8.*, 9.*, 10.*]
1616
include:
1717
- laravel: 8.*
1818
testbench: ^6.0
1919
- laravel: 9.*
2020
testbench: ^7.0
21+
- laravel: 10.*
22+
testbench: ^8.0
2123
exclude:
2224
- php: 7.4
2325
laravel: 9.*
26+
- php: 7.4
27+
laravel: 10.*
28+
- php: 8.0
29+
laravel: 10.*
30+
- php: 8.2
31+
laravel: 8.*
2432

2533
name: Laravel ${{ matrix.laravel }} on PHP ${{ matrix.php }}
2634

@@ -41,4 +49,4 @@ jobs:
4149
composer require "laravel/framework=${{ matrix.laravel }}" "orchestra/testbench=${{ matrix.testbench }}" --no-update
4250
composer update --prefer-dist --no-interaction --no-progress
4351
- name: Run tests
44-
run: vendor/bin/phpunit --verbose
52+
run: vendor/bin/phpunit

.php-cs-fixer.dist.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
$finder = Symfony\Component\Finder\Finder::create()
46
->in([
57
__DIR__ . '/config',

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!--suppress HtmlDeprecatedAttribute -->
2+
13
# Last-Modified / 304 Not Modified Handler for Laravel
24

35
Easily setting the `Last-Modified` header and `304 Not Modified` response code.
@@ -28,8 +30,8 @@ Easily setting the `Last-Modified` header and `304 Not Modified` response code.
2830

2931

3032
## Requirements
31-
- PHP 7.4 or higher
32-
- Laravel 8+
33+
- PHP 7.4 - 8.2
34+
- Laravel 8.x - 10.x
3335

3436
## Installation
3537

@@ -111,6 +113,8 @@ composer test:phpstan
111113
composer test:phpcsf
112114
```
113115

116+
or see https://github.com/abordage/laravel-last-modified/actions/workflows/tests.yml
117+
114118
## Feedback
115119

116120
If you have any feedback, comments or suggestions, please feel free to open an issue within this repository.

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
"homepage": "https://github.com/abordage/laravel-last-modified",
2020
"require": {
2121
"php": ">=7.4",
22-
"illuminate/support": "^8.0 || ^9.0"
22+
"illuminate/support": "^8.0 || ^9.0 || ^10.0"
2323
},
2424
"require-dev": {
2525
"friendsofphp/php-cs-fixer": "^3.0",
26-
"nunomaduro/collision": "^5.0 || ^6.0",
26+
"nunomaduro/collision": "^5.0 || ^6.0 || ^7.0",
2727
"nunomaduro/larastan": "^1.0 || ^2.0",
28-
"orchestra/testbench": "^6.0 || ^7.0",
28+
"orchestra/testbench": "^6.0 || ^7.0 || ^8.0",
2929
"phpstan/phpstan": "^1.0",
30-
"phpunit/phpunit": "^9.5"
30+
"phpunit/phpunit": "^9.5 || ^10.0"
3131
},
3232
"minimum-stability": "stable",
3333
"prefer-stable": true,

phpunit.xml.dist

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,10 @@
88
failOnWarning="true"
99
failOnRisky="true"
1010
failOnEmptyTestSuite="true"
11-
beStrictAboutOutputDuringTests="true"
12-
verbose="true"
1311
>
1412
<testsuites>
1513
<testsuite name="Abordage Test Suite">
1614
<directory>tests</directory>
1715
</testsuite>
1816
</testsuites>
19-
<coverage>
20-
<include>
21-
<directory suffix=".php">./src</directory>
22-
</include>
23-
<report>
24-
<html outputDirectory="build/coverage"/>
25-
<text outputFile="build/coverage.txt"/>
26-
<clover outputFile="build/logs/clover.xml"/>
27-
</report>
28-
</coverage>
29-
<logging>
30-
<junit outputFile="build/report.junit.xml"/>
31-
</logging>
3217
</phpunit>

src/Facades/LastModified.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Abordage\LastModified\Facades;
46

57
use Illuminate\Support\Facades\Facade;
68

79
/**
8-
* @method static void set(\Illuminate\Support\Carbon $updated_at)
10+
* @method static void set(\Illuminate\Support\Carbon|null $updated_at)
911
* @method static \Illuminate\Support\Carbon|null get()
1012
*
1113
* @see \Abordage\LastModified\LastModified

src/LastModified.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Abordage\LastModified;
46

57
use Illuminate\Support\Carbon;

0 commit comments

Comments
 (0)