Skip to content
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
4 changes: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2
indent_size = 2
9 changes: 8 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@
/.gitattributes export-ignore
/.gitignore export-ignore
/phpunit.xml.dist export-ignore
/art export-ignore
/docs export-ignore
/tests export-ignore
/workbench 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
28 changes: 28 additions & 0 deletions .github/workflows/fix-php-code-style-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Fix PHP code style issues

on:
push:
paths:
- '**.php'

permissions:
contents: write

jobs:
php-code-styling:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Checkout code
uses: actions/checkout@v5
with:
ref: ${{ github.head_ref }}

- name: Fix PHP code style issues
uses: aglipanci/laravel-pint-action@2.6

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v6
with:
commit_message: Fix styling
23 changes: 0 additions & 23 deletions .github/workflows/php-cs-fixer.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: PHPStan

on:
push:
paths:
- '**.php'
- 'phpstan.neon.dist'
- '.github/workflows/phpstan.yml'

jobs:
phpstan:
name: phpstan
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v5

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: none

- name: Install composer dependencies
uses: ramsey/composer-install@v3

- name: Run PHPStan
run: ./vendor/bin/phpstan --error-format=github
33 changes: 0 additions & 33 deletions .github/workflows/psalm.yml

This file was deleted.

43 changes: 21 additions & 22 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,39 @@ name: run-tests

on:
push:
branches: [main]
pull_request:
branches: [main]
paths:
- '**.php'
- '.github/workflows/run-tests.yml'
- 'phpunit.xml.dist'
- 'composer.json'
- 'composer.lock'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 5
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.3, 8.2, 8.1, 8.0]
laravel: [11.*, 10.*, 9.*]
php: [8.4, 8.3, 8.2]
laravel: [12.*, 11.*]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 12.*
testbench: 10.*
- laravel: 11.*
testbench: 9.*
carbon: ^3.0
- laravel: 10.*
testbench: 8.*
carbon: ^2.63
- laravel: 9.*
testbench: 7.*
carbon: ^2.63
exclude:
- laravel: 10.*
php: 8.0
- laravel: 11.*
php: 8.1
- laravel: 11.*
php: 8.0

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

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -54,8 +50,11 @@ jobs:

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.carbon }}" --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

- name: List Installed Dependencies
run: composer show -D

- name: Execute tests
run: vendor/bin/phpunit
run: vendor/bin/pest --ci
41 changes: 29 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,32 @@
.idea
.php_cs
.php_cs.cache
.phpunit.result.cache
build
# Composer Related
composer.lock
coverage
docs
/vendor

# Frontend Assets
/node_modules

# Logs
npm-debug.log
yarn-error.log

# Caches
.phpunit.cache
.phpunit.result.cache
/build

# IDE Helper
_ide_helper.php
_ide_helper_models.php
.phpstorm.meta.php

# Editors
/.idea
/.fleet
/.vscode

# Misc
phpunit.xml
psalm.xml
phpstan.neon
testbench.yaml
vendor
node_modules
.php-cs-fixer.cache
.phpunit.cache/test-results
/docs
/coverage
35 changes: 0 additions & 35 deletions .php-cs-fixer.dist.php

This file was deleted.

33 changes: 19 additions & 14 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,21 @@
}
],
"require": {
"php": "^8.0",
"php": "^8.2",
"ext-openssl": "*",
"illuminate/contracts": "^9.0|^10.0|^11.0",
"illuminate/database": "^9.0|^10.0|^11.0",
"illuminate/support": "^9.0|^10.0|^11.0",
"illuminate/validation": "^9.0|^10.0|^11.0",
"illuminate/contracts": "^11.0|^12.0",
"illuminate/database": "^11.0|^12.0",
"illuminate/support": "^11.0|^12.0",
"illuminate/validation": "^11.0|^12.0",
"spatie/laravel-package-tools": "^1.14.1"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.4",
"orchestra/testbench": "^7.0|^8.0|^9.0",
"phpunit/phpunit": "^9.5|^10.5",
"vimeo/psalm": "^4.20|^5.22"
"larastan/larastan": "^3.7",
"laravel/pint": "^1.25",
"orchestra/testbench": "^9.0|^10.0",
"pestphp/pest": "^3.8",
"pestphp/pest-plugin-laravel": "^3.2",
"phpunit/phpunit": "^10.5|^11.0"
},
"autoload": {
"psr-4": {
Expand All @@ -48,13 +50,16 @@
}
},
"scripts": {
"format": "vendor/bin/php-cs-fixer fix --allow-risky=yes",
"psalm": "vendor/bin/psalm",
"test": "vendor/bin/phpunit --colors=always",
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
"format": "vendor/bin/pint",
"analyse": "vendor/bin/phpstan analyse",
"test": "vendor/bin/pest",
"test-coverage": "vendor/bin/pest --coverage"
},
"config": {
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true
}
},
"extra": {
"laravel": {
Expand Down
Empty file added phpstan-baseline.neon
Empty file.
16 changes: 0 additions & 16 deletions psalm.xml.dist

This file was deleted.

4 changes: 2 additions & 2 deletions src/Encrypter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ protected function getEncryptionKey(): string
$key = config('encryptable.key');

if (empty($key)) {
throw new MissingEncryptionKeyException();
throw new MissingEncryptionKeyException;
}

return (string) $key;
Expand All @@ -29,7 +29,7 @@ protected function getEncryptionCipher(): string
$cipher = config('encryptable.cipher');

if (empty($cipher)) {
throw new MissingEncryptionCipherException();
throw new MissingEncryptionCipherException;
}

return (string) $cipher;
Expand Down
Loading