Skip to content

Commit

Permalink
feat: add support for Laravel 11
Browse files Browse the repository at this point in the history
  • Loading branch information
owenvoke committed Feb 7, 2024
1 parent 4946810 commit 89b60a1
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: dependabot-auto-merge
name: Dependabot Auto-Merge
on: pull_request_target

permissions:
Expand All @@ -13,7 +13,7 @@ jobs:

- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.3.5
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: phpstan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-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 Down
4 changes: 2 additions & 2 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

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

Expand All @@ -21,7 +21,7 @@ jobs:
release-notes: ${{ github.event.release.body }}

- name: Commit updated CHANGELOG
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: main
commit_message: Update CHANGELOG
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ If your app needs information about a given company, then there are public servi

The Company Info package provides a service that wraps the public services and gives you a simple way to perform the lookups.

Currently the package supports the public service API's of the Danish VIRK and CVR API services and the GB Gazette service.
Currently, the package supports the public service API's of the Danish VIRK and CVR API services and the GB Gazette service.

## Installation

Expand Down
20 changes: 10 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@
],
"require": {
"php": "^8.2",
"illuminate/contracts": "^10.0",
"spatie/laravel-package-tools": "^1.14.1"
"illuminate/contracts": "^10.0 || ^11.0",
"spatie/laravel-package-tools": "^1.16"
},
"require-dev": {
"guzzlehttp/guzzle": "^7.5",
"nunomaduro/collision": "^7.0",
"nunomaduro/larastan": "^2.4",
"orchestra/testbench": "^8.0",
"pestphp/pest": "^2.0",
"guzzlehttp/guzzle": "^7.8",
"nunomaduro/collision": "^7.0 || ^8.1",
"larastan/larastan": "^2.6",
"orchestra/testbench": "^8.0 || ^9.0",
"pestphp/pest": "^2.33",
"pestphp/pest-plugin-laravel": "^2.0",
"worksome/coding-style": "^2.5"
"worksome/coding-style": "^2.8"
},
"autoload": {
"psr-4": {
Expand All @@ -40,10 +40,10 @@
}
},
"scripts": {
"lint": "vendor/bin/phpcbf",
"lint": "vendor/bin/ecs --fix",
"test:unit": "vendor/bin/pest",
"test:types": "vendor/bin/phpstan analyse",
"test:style": "vendor/bin/phpcs -n",
"test:style": "vendor/bin/ecs",
"test": [
"@test:style",
"@test:types",
Expand Down
1 change: 0 additions & 1 deletion ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Symplify\EasyCodingStandard\Config\ECSConfig;
use Worksome\CodingStyle\WorksomeEcsConfig;


return static function (ECSConfig $ecsConfig): void {
$ecsConfig->paths([
__DIR__ . '/src',
Expand Down
15 changes: 5 additions & 10 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
parameters:
ignoreErrors:
-
message: "#^Parameter \\#1 \\$name of method Worksome\\\\CompanyInfo\\\\CompanyInfo\\:\\:lookupName\\(\\) expects string, array\\|string\\|true given\\.$#"
count: 1
path: src/Commands/CompanyInfoLookupCommand.php

-
message: "#^Parameter \\#1 \\$number of method Worksome\\\\CompanyInfo\\\\CompanyInfo\\:\\:lookupNumber\\(\\) expects string, array\\|string\\|true given\\.$#"
count: 1
path: src/Commands/CompanyInfoLookupCommand.php

-
message: "#^Unable to resolve the template type TKey in call to function collect$#"
count: 1
Expand All @@ -20,3 +10,8 @@ parameters:
count: 1
path: src/CompanyInfo.php

-
message: "#^Worksome\\\\CompanyInfo\\\\Facades\\\\CompanyInfo facade should not be used\\.$#"
count: 1
path: src/Facades/CompanyInfo.php

2 changes: 1 addition & 1 deletion src/Commands/CompanyInfoLookupCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ final class CompanyInfoLookupCommand extends Command
/**
* Options for JSON display.
*/
private const JSON_OPTIONS = JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_NUMERIC_CHECK | JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR;
private const JSON_OPTIONS = JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES|JSON_NUMERIC_CHECK|JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR;

public $signature = 'company-info:lookup
{--name= : The company name to lookup.}
Expand Down

0 comments on commit 89b60a1

Please sign in to comment.