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 8, 2024
1 parent c181358 commit 4aea5f0
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 52 deletions.
22 changes: 11 additions & 11 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 @@ -10,23 +10,23 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:

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

- name: Auto-merge Dependabot PRs for semver-minor updates
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-minor' }}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Auto-merge Dependabot PRs for semver-patch updates
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' }}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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 @@ -13,18 +13,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 Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.idea
.php_cs
.php_cs.cache
.phpunit.result.cache
.phpunit.cache
build
composer.lock
coverage
Expand Down
9 changes: 0 additions & 9 deletions CHANGELOG.md

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ composer test

## Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
Please see [GitHub Releases](https://github.com/worksome/verify-by-phone/releases) for more information on what has changed recently.

## Contributing

Expand Down
9 changes: 0 additions & 9 deletions RELEASE.md

This file was deleted.

20 changes: 10 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@
],
"require": {
"php": "^8.2",
"illuminate/contracts": "^10.0",
"propaganistas/laravel-phone": "^5.0.3",
"spatie/laravel-package-tools": "^1.14.2",
"twilio/sdk": "^6.44"
"illuminate/contracts": "^10.0 || ^11.0",
"propaganistas/laravel-phone": "^5.1",
"spatie/laravel-package-tools": "^1.16",
"twilio/sdk": "^6.44 || ^7.0"
},
"require-dev": {
"guzzlehttp/guzzle": "^7.5",
"nunomaduro/collision": "^7.3.2",
"orchestra/testbench": "^8.0",
"pestphp/pest": "^2.0",
"pestphp/pest-plugin-laravel": "^2.0",
"worksome/coding-style": "^2.5"
"guzzlehttp/guzzle": "^7.8",
"nunomaduro/collision": "^7.10 || ^8.1",
"orchestra/testbench": "^8.21 || ^9.0",
"pestphp/pest": "^2.33",
"pestphp/pest-plugin-laravel": "^2.2",
"worksome/coding-style": "^2.8"
},
"autoload": {
"psr-4": {
Expand Down
20 changes: 20 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
parameters:
ignoreErrors:
-
message: "#^Parameter \\#1 \\$value of function strval expects bool\\|float\\|int\\|resource\\|string\\|null, mixed given\\.$#"
count: 1
path: src/Commands/SendVerificationCodeCommand.php

-
message: "#^Parameter \\#1 \\$value of function strval expects bool\\|float\\|int\\|resource\\|string\\|null, mixed given\\.$#"
count: 2
path: src/Commands/VerifyVerificationCodeCommand.php

-
message: "#^Illuminate\\\\Support\\\\Facades\\\\Http facade should not be used\\.$#"
count: 1
Expand All @@ -9,3 +19,13 @@ parameters:
message: "#^Parameter \\#1 \\$number of class Propaganistas\\\\LaravelPhone\\\\PhoneNumber constructor expects string\\|null, mixed given\\.$#"
count: 1
path: src/Validation/Rules/VerificationCodeIsValid.php

-
message: "#^Parameter \\#1 \\$value of function strval expects bool\\|float\\|int\\|resource\\|string\\|null, mixed given\\.$#"
count: 2
path: src/VerifyByPhoneManager.php

-
message: "#^Parameter \\#1 \\$value of function strval expects bool\\|float\\|int\\|resource\\|string\\|null, mixed given\\.$#"
count: 2
path: src/VerifyByPhoneServiceProvider.php
15 changes: 8 additions & 7 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
cacheDirectory=".phpunit.cache"
>
<coverage>
<testsuites>
<testsuite name="Worksome Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory>src</directory>
</include>
<exclude>
<directory>src/Exceptions</directory>
</exclude>
</coverage>
<testsuites>
<testsuite name="Worksome Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
</source>
</phpunit>

0 comments on commit 4aea5f0

Please sign in to comment.