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

Add Support for Laravel 11 and Enhance CI Testing #109

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
17 changes: 13 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,19 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [8.0, 8.1, 8.2]
php: ["8.0", "8.1", "8.2", "8.3"]
laravel: ["^9.0", "^10.0", "^11.0"]
exclude:
- { php: "8.0", laravel: "^10.0"}
- { php: "8.0", laravel: "^11.0"}
- { php: "8.1", laravel: "^11.0"}
- { php: "8.3", laravel: "^9.0"}

name: PHP ${{ matrix.php }}
name: PHP ${{ matrix.php }} / Laravel ${{ matrix.laravel }}

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -28,8 +34,11 @@ jobs:
extensions: dom, curl, libxml, mbstring, zip
coverage: none

- name: Set laravel version
run: composer require "laravel/framework=${{ matrix.laravel }}" --no-update --no-interaction --no-progress

- name: Install dependencies
run: composer update --prefer-dist --no-interaction --no-progress

- name: Execute tests
run: vendor/bin/phpunit --verbose
run: vendor/bin/phpunit
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
"ext-json": "*",
"doctrine/dbal": "^2.6|^3.0",
"goldspecdigital/oooas": "^2.7.1",
"laravel/framework": "5.8.*|^6.0|^7.0|^8.0|^9.0|^10.0",
"laravel/framework": "5.8.*|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0",
"phpdocumentor/reflection-docblock": "^5.0"
},
"require-dev": {
"orchestra/testbench": "^5.3|^6.0|^7.0",
"phpunit/phpunit": "^9.5.13"
"orchestra/testbench": "^5.3|^6.0|^7.0|^8.0|^9.0",
"phpunit/phpunit": "^9.5.13|^10.5"
},
"autoload": {
"psr-4": {
Expand Down
56 changes: 28 additions & 28 deletions tests/Builders/InfoBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function testBuildContact(array $config, array $expected): void
$this->assertSameAssociativeArray($expected, $info->toArray());
}

public function providerBuildContact(): array
public static function providerBuildContact(): array
{
$common = [
'title' => 'sample_title',
Expand All @@ -40,8 +40,8 @@ public function providerBuildContact(): array
'url' => 'sample_contact_url',
],
'license' => [
'name'=>'sample_license_name',
'url'=>'sample_license_url',
'name' => 'sample_license_name',
'url' => 'sample_license_url',
],
]),
array_merge($common, [
Expand All @@ -51,8 +51,8 @@ public function providerBuildContact(): array
'url' => 'sample_contact_url',
],
'license' => [
'name'=>'sample_license_name',
'url'=>'sample_license_url',
'name' => 'sample_license_name',
'url' => 'sample_license_url',
],
]),
],
Expand All @@ -63,8 +63,8 @@ public function providerBuildContact(): array
'url' => 'sample_contact_url',
],
'license' => [
'name'=>'sample_license_name',
'url'=>'sample_license_url',
'name' => 'sample_license_name',
'url' => 'sample_license_url',
],
]),
array_merge($common, [
Expand All @@ -73,8 +73,8 @@ public function providerBuildContact(): array
'url' => 'sample_contact_url',
],
'license' => [
'name'=>'sample_license_name',
'url'=>'sample_license_url',
'name' => 'sample_license_name',
'url' => 'sample_license_url',
],
]),
],
Expand All @@ -85,8 +85,8 @@ public function providerBuildContact(): array
'url' => 'sample_contact_url',
],
'license' => [
'name'=>'sample_license_name',
'url'=>'sample_license_url',
'name' => 'sample_license_name',
'url' => 'sample_license_url',
],
]),
array_merge($common, [
Expand All @@ -95,8 +95,8 @@ public function providerBuildContact(): array
'url' => 'sample_contact_url',
],
'license' => [
'name'=>'sample_license_name',
'url'=>'sample_license_url',
'name' => 'sample_license_name',
'url' => 'sample_license_url',
],
]),
],
Expand All @@ -107,8 +107,8 @@ public function providerBuildContact(): array
'email' => 'sample_contact_email',
],
'license' => [
'name'=>'sample_license_name',
'url'=>'sample_license_url',
'name' => 'sample_license_name',
'url' => 'sample_license_url',
],
]),
array_merge($common, [
Expand All @@ -117,37 +117,37 @@ public function providerBuildContact(): array
'email' => 'sample_contact_email',
],
'license' => [
'name'=>'sample_license_name',
'url'=>'sample_license_url',
'name' => 'sample_license_name',
'url' => 'sample_license_url',
],
]),
],
'If Contact does not exist, the correct json can be output.' => [
array_merge($common, [
'license' => [
'name'=>'sample_license_name',
'url'=>'sample_license_url',
'name' => 'sample_license_name',
'url' => 'sample_license_url',
],
]),
array_merge($common, [
'license' => [
'name'=>'sample_license_name',
'url'=>'sample_license_url',
'name' => 'sample_license_name',
'url' => 'sample_license_url',
],
]),
],
'If Contact.* does not exist, the correct json can be output.' => [
array_merge($common, [
'contact' => [],
'license' => [
'name'=>'sample_license_name',
'url'=>'sample_license_url',
'name' => 'sample_license_name',
'url' => 'sample_license_url',
],
]),
array_merge($common, [
'license' => [
'name'=>'sample_license_name',
'url'=>'sample_license_url',
'name' => 'sample_license_name',
'url' => 'sample_license_url',
],
]),
],
Expand All @@ -160,7 +160,7 @@ public function providerBuildContact(): array
'url' => 'sample_contact_url',
],
'license' => [
'url'=>'sample_license_url',
'url' => 'sample_license_url',
],
]),
array_merge($common, [
Expand All @@ -179,7 +179,7 @@ public function providerBuildContact(): array
'url' => 'sample_contact_url',
],
'license' => [
'name'=>'sample_license_name',
'name' => 'sample_license_name',
],
]),
array_merge($common, [
Expand All @@ -189,7 +189,7 @@ public function providerBuildContact(): array
'url' => 'sample_contact_url',
],
'license' => [
'name'=>'sample_license_name',
'name' => 'sample_license_name',
],
]),
],
Expand Down
2 changes: 1 addition & 1 deletion tests/Builders/ServersBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function testBuild(array $config, array $expected): void
$this->assertSameAssociativeArray($expected[0], $servers[0]->toArray());
}

public function providerBuild(): array
public static function providerBuild(): array
{
return [
'If the variables field does not exist, it is possible to output the correct json.' => [
Expand Down
2 changes: 1 addition & 1 deletion tests/Builders/TagsBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function testBuild(array $config, array $expected): void
$this->assertSameAssociativeArray($expected[0], $tags[0]->toArray());
}

public function providerBuild(): array
public static function providerBuild(): array
{
return [
'If the external docs do not exist, it can output the correct json.' => [
Expand Down