diff --git a/.gitattributes b/.gitattributes index 886475c..9e9519b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,9 +6,14 @@ /.gitattributes export-ignore /.gitignore export-ignore /phpunit.xml.dist export-ignore +/art export-ignore +/docs export-ignore /tests export-ignore /.editorconfig export-ignore -/.php_cs.dist export-ignore +/.php_cs.dist.php export-ignore /psalm.xml export-ignore /psalm.xml.dist export-ignore /testbench.yaml export-ignore +/UPGRADING.md export-ignore +/phpstan.neon.dist export-ignore +/phpstan-baseline.neon export-ignore diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 7546b77..bc5e177 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,18 +1,18 @@ name: Bug Report description: Report an Issue or Bug with the Package title: "[Bug]: " -labels: ["bug"] +labels: [ "bug" ] body: - type: markdown attributes: - value: | - We're sorry to hear you have a problem. Can you help us solve it by providing the following details. + value: "| +We're sorry to hear you have a problem. Can you help us solve it by providing the following details." - type: textarea id: what-happened attributes: label: What happened? description: What did you expect to happen? - placeholder: I cannot currently do X thing because when I do, it breaks X thing. + placeholder: "I cannot currently do X thing because when I do, it breaks X thing." validations: required: true - type: input @@ -20,7 +20,8 @@ body: attributes: label: Package Version description: What version of our Package are you running? Please be as specific as possible - placeholder: 1.0.0 + placeholder: "12.0" + value: "12.0" validations: required: true - type: input @@ -28,7 +29,8 @@ body: attributes: label: PHP Version description: What version of PHP are you running? Please be as specific as possible - placeholder: 8.3.0 + placeholder: "8.4.0" + value: "8.4.0" validations: required: true - type: input @@ -36,7 +38,8 @@ body: attributes: label: Laravel Version description: What version of Laravel are you running? Please be as specific as possible - placeholder: 11.0.0 + placeholder: "12.0.0" + value: "12.0.0" validations: required: true - type: dropdown diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..0bc378d --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + labels: + - "dependencies" diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml new file mode 100644 index 0000000..2df1631 --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yml @@ -0,0 +1,32 @@ +name: dependabot-auto-merge +on: pull_request_target + +permissions: + pull-requests: write + contents: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: ${{ github.actor == 'dependabot[bot]' }} + steps: + + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v2.3.0 + 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'}} + run: gh pr merge --auto --merge "$PR_URL" + env: + 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'}} + run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml new file mode 100644 index 0000000..0d4a013 --- /dev/null +++ b/.github/workflows/dependency-review.yml @@ -0,0 +1,20 @@ +# Dependency Review Action +# +# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging. +# +# Source repository: https://github.com/actions/dependency-review-action +# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement +name: 'Dependency Review' +on: [pull_request] + +permissions: + contents: read + +jobs: + dependency-review: + runs-on: ubuntu-latest + steps: + - name: 'Checkout Repository' + uses: actions/checkout@v4 + - name: 'Dependency Review' + uses: actions/dependency-review-action@v4 diff --git a/.github/workflows/fix-php-code-style-issues.yml b/.github/workflows/fix-php-code-style-issues.yml new file mode 100644 index 0000000..ef2fadf --- /dev/null +++ b/.github/workflows/fix-php-code-style-issues.yml @@ -0,0 +1,21 @@ +name: Fix PHP code style issues + +on: [push] + +jobs: + php-code-styling: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + + - name: Fix PHP code style issues + uses: aglipanci/laravel-pint-action@2.5 + + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: Fix styling diff --git a/.github/workflows/php-cs-fixer.yml b/.github/workflows/php-cs-fixer.yml deleted file mode 100644 index a83d708..0000000 --- a/.github/workflows/php-cs-fixer.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Check & fix styling - -on: [push] - -jobs: - php-cs-fixer: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - with: - ref: ${{ github.head_ref }} - - - name: Run PHP CS Fixer - uses: docker://oskarstark/php-cs-fixer-ga - with: - args: --config=.php-cs-fixer.dist.php --allow-risky=yes - - - name: Commit changes - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: Fix styling diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml new file mode 100644 index 0000000..b0cde6a --- /dev/null +++ b/.github/workflows/phpstan.yml @@ -0,0 +1,26 @@ +name: PHPStan + +on: + push: + paths: + - '**.php' + - 'phpstan.neon.dist' + +jobs: + phpstan: + name: phpstan + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.4' + coverage: none + + - name: Install composer dependencies + uses: ramsey/composer-install@v3 + + - name: Run PHPStan + run: ./vendor/bin/phpstan --error-format=github diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml deleted file mode 100644 index a05ccc0..0000000 --- a/.github/workflows/psalm.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Psalm - -on: - push: - paths: - - '**.php' - - 'psalm.xml.dist' - -jobs: - psalm: - name: psalm - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '8.1' - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick - coverage: none - - - name: Cache composer dependencies - uses: actions/cache@v2 - with: - path: vendor - key: composer-${{ hashFiles('composer.lock') }} - - - name: Run composer install - run: composer install -n --prefer-dist - - - name: Run psalm - run: ./vendor/bin/psalm --output-format=github diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..afa28ff --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,23 @@ +name: release + +on: + pull_request: + types: + - closed + branches: + - main +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: '0' + - name: Bump version and push tag + uses: anothrNick/github-tag-action@master + env: + GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }} + WITH_V: true + RELEASE_BRANCHES: main + DEFAULT_BUMP: minor diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index ae885d2..c4d9e45 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -13,19 +13,16 @@ jobs: fail-fast: true max-parallel: 1 matrix: - os: [ ubuntu-latest, windows-latest ] - php: [ 8.2, 8.3 ] - laravel: [ 10.* ] + os: [ ubuntu-latest ] + php: [ 8.2, 8.3, 8.4 ] + laravel: [ 12.* ] stability: [ prefer-lowest, prefer-stable ] - include: - - laravel: 10.* - testbench: 8.* 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 @@ -41,19 +38,18 @@ jobs: - name: Install dependencies run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update composer update --${{ matrix.stability }} --prefer-dist --no-interaction - - name: Set phpunit.xml + - name: Execute tests run: cp phpunit.xml.dist phpunit.xml - name: Execute tests run: vendor/bin/pest - - name: Store test reports - uses: actions/upload-artifact@v2 + - name: Store Log Artifacts + if: failure() + uses: actions/upload-artifact@v4 with: - name: Store report - retention-days: 1 - path: | - ./reports + name: Store report artifacts + path: ./vendor/orchestra/testbench-core/laravel/storage/logs diff --git a/.gitignore b/.gitignore index 8e0aaae..91b23b2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,12 @@ .idea -.php-cs-fixer.php -.php-cs-fixer.cache .phpunit.result.cache -build +.phpunit.cache composer.lock coverage -docs phpunit.xml -psalm.xml +phpstan.neon testbench.yaml vendor node_modules +.phpactor.json +build diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php deleted file mode 100644 index a0168ac..0000000 --- a/.php-cs-fixer.dist.php +++ /dev/null @@ -1,51 +0,0 @@ - true, - 'array_indentation' => true, - 'array_syntax' => ['syntax' => 'short'], - 'binary_operator_spaces' => true, - 'blank_line_before_statement' => [ - 'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'], - ], - 'cast_spaces' => ['space' => 'single'], - 'class_attributes_separation' => [ - 'elements' => ['method' => 'one'], - ], - 'concat_space' => ['spacing' => 'one'], - 'function_declaration' => false, - 'method_argument_space' => [ - 'on_multiline' => 'ensure_fully_multiline', - 'keep_multiple_spaces_after_comma' => true, - ], - 'method_chaining_indentation' => true, - 'no_empty_statement' => true, - 'no_unused_imports' => true, - 'not_operator_with_successor_space' => false, - 'ordered_imports' => ['sort_algorithm' => 'alpha'], - 'phpdoc_scalar' => true, - 'phpdoc_single_line_var_spacing' => true, - 'phpdoc_var_without_name' => true, - 'return_type_declaration' => true, - 'single_quote' => true, - 'single_trait_insert_per_statement' => true, - 'trailing_comma_in_multiline' => ['elements' => ['arrays', 'arguments', 'parameters']], - 'unary_operator_spaces' => true, -]; - -$finder = Finder::create() - ->in([ - __DIR__ . '/src', - __DIR__ . '/tests', - ]) - ->name('*.php') - ->notName('*.blade.php') - ->ignoreDotFiles(true) - ->ignoreVCS(true); - -return (new Config()) - ->setRules($rules) - ->setFinder($finder); diff --git a/README.md b/README.md index 182d0c8..b469929 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,9 @@ -[![Latest Version on Packagist](https://img.shields.io/packagist/v/codebar-ag/laravel-twilio-verify.svg?style=flat-square)](https://packagist.org/packages/codebar-ag/laravel-twilio-verify) -[![Total Downloads](https://img.shields.io/packagist/dt/codebar-ag/laravel-twilio-verify.svg?style=flat-square)](https://packagist.org/packages/codebar-ag/laravel-twilio-verify) -[![run-tests](https://github.com/codebar-ag/laravel-twilio-verify/actions/workflows/run-tests.yml/badge.svg)](https://github.com/codebar-ag/laravel-twilio-verify/actions/workflows/run-tests.yml) -[![Psalm](https://github.com/codebar-ag/laravel-twilio-verify/actions/workflows/psalm.yml/badge.svg)](https://github.com/codebar-ag/laravel-twilio-verify/actions/workflows/psalm.yml) -[![Check & fix styling](https://github.com/codebar-ag/laravel-twilio-verify/actions/workflows/php-cs-fixer.yml/badge.svg)](https://github.com/codebar-ag/laravel-twilio-verify/actions/workflows/php-cs-fixer.yml) +[![Latest Version on Packagist](https://img.shields.io/packagist/v/codebar-ag/laravel-twillio-verify.svg?style=flat-square)](https://packagist.org/packages/codebar-ag/laravel-twillio-verify) +[![GitHub-Tests](https://github.com/codebar-ag/laravel-twillio-verify/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/codebar-ag/laravel-twillio-verify/actions/workflows/run-tests.yml) +[![GitHub Code Style](https://github.com/codebar-ag/laravel-twillio-verify/actions/workflows/fix-php-code-style-issues.yml/badge.svg?branch=main)](https://github.com/codebar-ag/laravel-twillio-verify/actions/workflows/fix-php-code-style-issues.yml) +[![Total Downloads](https://img.shields.io/packagist/dt/codebar-ag/laravel-twillio-verify.svg?style=flat-square)](https://packagist.org/packages/codebar-ag/laravel-twillio-verify) This package was developed to give you a quick start to communicate with the Twilio Verify service. @@ -19,6 +18,12 @@ Push. Add verification to any step of your user‘s journey with a single API. ## 🛠 Requirements +| Package | PHP | Laravel | +|:-------:|:-----------:|:-------:| +| v12.0.0 | ^8.2 - ^8.4 | 12.x | +| v11.0.0 | ^8.2 - ^8.3 | 11.x | +| | ^8.0 | ... | + - PHP: `^8.0` - Laravel: `^8.12` - Twilio Account diff --git a/composer.json b/composer.json index 578a1ce..525932e 100644 --- a/composer.json +++ b/composer.json @@ -11,9 +11,14 @@ "license": "MIT", "authors": [ { - "name": "Sebastian x", - "email": "sebastian.fix@codebar.ch", - "role": "Developer" + "name": "Sebastian Bürgin-Fix", + "email": "sebastian.buergin@buergin.ch", + "homepage": "https://www.codebar.ch", + "role": "Sofware-Engineer" + }, + { + "name": "Rhys Lees", + "role": "Software-Engineer" }, { "name": "Ruslan Steiger", @@ -21,20 +26,20 @@ } ], "require": { - "php": "^8.1", + "php": "8.2.*|8.3.*|8.4.*", "guzzlehttp/guzzle": "^7.8", - "illuminate/contracts": "^10.0", - "spatie/laravel-package-tools": "^1.16" + "illuminate/contracts": "^12.0", + "spatie/laravel-package-tools": "^1.19" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.46", - "laravel/pint": "^1.14", - "nunomaduro/collision": "^7.10", - "orchestra/testbench": "^8.20", - "pestphp/pest": "^2.31", - "phpunit/phpunit": "^10.5", - "spatie/laravel-ray": "^1.35", - "vimeo/psalm": "^5.19" + "laravel/pint": "^1.21", + "larastan/larastan": "^v3.1", + "orchestra/testbench": "^10.0", + "pestphp/pest": "^3.7", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan-deprecation-rules": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "spatie/laravel-ray": "^1.39" }, "autoload": { "psr-4": { @@ -56,7 +61,8 @@ "sort-packages": true, "allow-plugins": { "composer/package-versions-deprecated": true, - "pestphp/pest-plugin": true + "pestphp/pest-plugin": true, + "phpstan/extension-installer": true } }, "extra": { diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon new file mode 100644 index 0000000..e69de29 diff --git a/phpstan.neon.dist b/phpstan.neon.dist new file mode 100644 index 0000000..0cc2d04 --- /dev/null +++ b/phpstan.neon.dist @@ -0,0 +1,12 @@ +includes: + - phpstan-baseline.neon + +parameters: + level: 5 + paths: + - src + - config + tmpDir: build/phpstan + checkOctaneCompatibility: true + checkModelProperties: true + noEnvCallsOutsideOfConfig: false diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 5f4e879..55fd27f 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,32 +1,15 @@ - + - + tests - - ./src - @@ -37,9 +20,15 @@ + + + + ./src + + diff --git a/psalm.xml.dist b/psalm.xml.dist deleted file mode 100644 index c6df33e..0000000 --- a/psalm.xml.dist +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - diff --git a/src/DTO/Carrier.php b/src/DTO/Carrier.php index f0d84c0..50fe17a 100644 --- a/src/DTO/Carrier.php +++ b/src/DTO/Carrier.php @@ -4,6 +4,9 @@ use Illuminate\Support\Arr; +/** + * @phpstan-consistent-constructor + */ class Carrier { public static function fromJson(array $data): self @@ -23,8 +26,7 @@ public function __construct( public string $mobile_country_code, public string $mobile_network_code, public string $type, - ) { - } + ) {} public static function fake( ?string $error_code = null, diff --git a/src/DTO/Lookup.php b/src/DTO/Lookup.php index e6fee8a..927fbd2 100644 --- a/src/DTO/Lookup.php +++ b/src/DTO/Lookup.php @@ -4,6 +4,9 @@ use Illuminate\Support\Arr; +/** + * @phpstan-consistent-constructor + */ class Lookup { public static function fromJson(array $lookup): ?self @@ -17,9 +20,7 @@ public static function fromJson(array $lookup): ?self ); } - public function __construct(public Carrier $carrier) - { - } + public function __construct(public Carrier $carrier) {} public static function fake(?Carrier $carrier = null): self { diff --git a/src/DTO/SendCodeAttempt.php b/src/DTO/SendCodeAttempt.php index 7629f18..eeaaa13 100644 --- a/src/DTO/SendCodeAttempt.php +++ b/src/DTO/SendCodeAttempt.php @@ -7,6 +7,9 @@ use Illuminate\Support\Collection; use Illuminate\Support\Str; +/** + * @phpstan-consistent-constructor + */ class SendCodeAttempt { public static function fromJson(array $attempts): Collection @@ -24,8 +27,7 @@ public function __construct( public Carbon $time, public string $channel, public string $attempt_sid, - ) { - } + ) {} public static function fake( ?Carbon $time = null, @@ -35,7 +37,7 @@ public static function fake( return new static( time: $time ?? now(), channel: $channel ?? 'sms', - attempt_sid: $attempt_sid ?? 'VL' . Str::random(32), + attempt_sid: $attempt_sid ?? 'VL'.Str::random(32), ); } } diff --git a/src/DTO/VerificationCheck.php b/src/DTO/VerificationCheck.php index 2ea334c..47f6115 100644 --- a/src/DTO/VerificationCheck.php +++ b/src/DTO/VerificationCheck.php @@ -6,6 +6,9 @@ use Illuminate\Support\Arr; use Illuminate\Support\Str; +/** + * @phpstan-consistent-constructor + */ class VerificationCheck { public static function fromJson(array $data): self @@ -33,8 +36,7 @@ public function __construct( public bool $valid, public Carbon $created_at, public Carbon $updated_at, - ) { - } + ) {} public static function fake( ?string $sid = null, @@ -48,9 +50,9 @@ public static function fake( ?string $updated_at = null, ): self { return new static( - sid: $sid ?? 'VE' . Str::random(32), - service_sid: $service_sid ?? 'VA' . Str::random(32), - account_sid: $account_sid ?? 'AC' . Str::random(32), + sid: $sid ?? 'VE'.Str::random(32), + service_sid: $service_sid ?? 'VA'.Str::random(32), + account_sid: $account_sid ?? 'AC'.Str::random(32), to: $to ?? '+41795555825', channel: $channel ?? 'sms', status: $status ?? 'approved', diff --git a/src/DTO/VerificationStart.php b/src/DTO/VerificationStart.php index e3401f0..1aff3bc 100644 --- a/src/DTO/VerificationStart.php +++ b/src/DTO/VerificationStart.php @@ -8,6 +8,8 @@ use Illuminate\Support\Str; /** + * @phpstan-consistent-constructor + * * @property Collection|SendCodeAttempt[] $send_code_attempts */ class VerificationStart @@ -43,8 +45,7 @@ public function __construct( public ?Lookup $lookup, public Collection $send_code_attempts, public string $url, - ) { - } + ) {} public static function fake( ?string $sid = null, @@ -60,12 +61,12 @@ public static function fake( ?Collection $send_code_attempts = null, ?string $url = null, ): self { - $service = 'VA' . Str::random(32); + $service = 'VA'.Str::random(32); return new static( - sid: $sid ?? 'VE' . Str::random(32), + sid: $sid ?? 'VE'.Str::random(32), service_sid: $service_sid ?? $service, - account_sid: $account_sid ?? 'AC' . Str::random(32), + account_sid: $account_sid ?? 'AC'.Str::random(32), to: $to ?? '+41795555825', channel: $channel ?? 'sms', status: $status ?? 'pending', diff --git a/src/Events/TwilioVerifyResponseLog.php b/src/Events/TwilioVerifyResponseLog.php index dba2a81..94cad09 100644 --- a/src/Events/TwilioVerifyResponseLog.php +++ b/src/Events/TwilioVerifyResponseLog.php @@ -13,7 +13,5 @@ class TwilioVerifyResponseLog use InteractsWithSockets; use SerializesModels; - public function __construct(public Response $response) - { - } + public function __construct(public Response $response) {} } diff --git a/tests/Feature/TwilioVerifyTest.php b/tests/Feature/TwilioVerifyTest.php index 7acabf5..40d9ff2 100644 --- a/tests/Feature/TwilioVerifyTest.php +++ b/tests/Feature/TwilioVerifyTest.php @@ -18,7 +18,7 @@ public function it_does_start_a_verification_with_sms() Event::fake(); $phoneNumber = '+12085059915'; - $verification = (new TwilioVerify())->start(to: $phoneNumber); + $verification = (new TwilioVerify)->start(to: $phoneNumber); $this->assertInstanceOf(VerificationStart::class, $verification); $this->assertSame($phoneNumber, $verification->to); @@ -37,7 +37,7 @@ public function it_does_check_a_verification_with_sms() $code = '4804'; $phoneNumber = '+12085059915'; - $verification = (new TwilioVerify())->check( + $verification = (new TwilioVerify)->check( to: $phoneNumber, code: $code, ); diff --git a/tests/TestCase.php b/tests/TestCase.php index 6f1caea..43e021a 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -8,12 +8,12 @@ class TestCase extends Orchestra { - public function setUp(): void + protected function setUp(): void { parent::setUp(); Factory::guessFactoryNamesUsing( - fn (string $modelName) => 'Spatie\\TwilioVerify\\Database\\Factories\\' . class_basename($modelName) . 'Factory', + fn (string $modelName) => 'Spatie\\TwilioVerify\\Database\\Factories\\'.class_basename($modelName).'Factory', ); }