Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for Laravel 11 #33

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/code-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.2']
php: [ 8.2, 8.3 ]

actions:
- name: ECS
run: 'composer test:style'
- name: ECS
run: 'composer test:style'

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

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

- name: Install Composer dependencies
uses: ramsey/composer-install@v1
uses: ramsey/composer-install@v2

- run: ${{ matrix.actions.run }}
15 changes: 10 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,20 @@ jobs:
fail-fast: true
matrix:
os: [ ubuntu-latest ]
php: [ 8.2 ]
laravel: [ 10.* ]
php: [ 8.2, 8.3 ]
laravel: [ 10.*, 11.* ]
stability: [ prefer-lowest, prefer-stable ]
include:
- laravel: 10.*
testbench: 8.*
- laravel: 11.*
testbench: 9.*

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

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -29,8 +34,8 @@ jobs:

- name: Install Composer dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction --ansi

- name: Test php code
- name: Execute tests
run: composer test:unit
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
[![Tests](https://github.com/worksome/cdn-headers/actions/workflows/tests.yml/badge.svg)](https://github.com/worksome/cdn-headers/actions/workflows/tests.yml)
[![Code Analysis](https://github.com/worksome/cdn-headers/actions/workflows/code-analysis.yml/badge.svg)](https://github.com/worksome/cdn-headers/actions/workflows/code-analysis.yml)


Package that wraps around CDN headers. Currently supports:

- Cloudflare
Expand Down
26 changes: 10 additions & 16 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
"description": "Package that wraps around CDN headers.",
"type": "library",
"license": "MIT",
"require": {
"php": "^8.2",
"illuminate/support": "^10.0 || ^11.0",
"illuminate/contracts": "^10.0 || ^11.0"
},
"require-dev": {
"pestphp/pest": "^2.33",
"worksome/coding-style": "^2.8",
"mockery/mockery": "^1.6"
},
"autoload": {
"psr-4": {
"Worksome\\CdnHeaders\\": "src/"
Expand All @@ -13,22 +23,6 @@
"Worksome\\CdnHeaders\\Tests\\": "tests"
}
},
"authors": [
{
"name": "Lukas Juhas",
"email": "lukas@worksome.com"
}
],
"require-dev": {
"pestphp/pest": "^2.0",
"worksome/coding-style": "^2.5",
"mockery/mockery": "^1.5.1"
},
"require": {
"php": "^8.2",
"illuminate/support": "^10.0",
"illuminate/contracts": "^10.0"
},
"scripts": {
"lint": "vendor/bin/ecs --fix",
"test:unit": "vendor/bin/pest",
Expand Down
1 change: 0 additions & 1 deletion config/cdn-headers.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

declare(strict_types=1);


// config for Worksome/cdn-headers
return [
'default-provider' => env('CDN_HEADERS_PROVIDER', 'cloudflare'),
Expand Down
4 changes: 2 additions & 2 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<coverage>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</coverage>
</source>
</phpunit>