Skip to content

Commit 3863f9e

Browse files
authored
Merge pull request #2 from TepuiLABS/upgrade-package-service-provider-from-spatie
Fixed what needed fixing and squished some bugs. 🐛
2 parents bd96403 + 447d407 commit 3863f9e

30 files changed

+233
-342
lines changed

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Please see the documentation for all configuration options:
2+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3+
4+
version: 2
5+
updates:
6+
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"
11+
labels:
12+
- "dependencies"

.github/workflows/php-cs-fixer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Run PHP CS Fixer
1616
uses: docker://oskarstark/php-cs-fixer-ga
1717
with:
18-
args: --config=.php_cs.dist --allow-risky=yes
18+
args: --config=.php_cs.dist.php --allow-risky=yes
1919

2020
- name: Commit changes
2121
uses: stefanzweifel/git-auto-commit-action@v4

.github/workflows/phpstan.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: PHPStan
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.php'
7+
- 'phpstan.neon.dist'
8+
9+
jobs:
10+
phpstan:
11+
name: phpstan
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Setup PHP
17+
uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: '8.0'
20+
coverage: none
21+
22+
- name: Install composer dependencies
23+
uses: ramsey/composer-install@v1
24+
25+
- name: Run PHPStan
26+
run: ./vendor/bin/phpstan --error-format=github

.github/workflows/psalm.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/run-tests.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
1-
name: Tests
1+
name: run-tests
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
48

59
jobs:
610
test:
711
runs-on: ${{ matrix.os }}
812
strategy:
913
fail-fast: true
1014
matrix:
11-
os: [ubuntu-latest]
12-
php: [7.4]
13-
laravel: [8.*]
15+
os: [ubuntu-latest, windows-latest]
16+
php: [8.1, 8.0]
17+
laravel: [9.*]
1418
stability: [prefer-lowest, prefer-stable]
1519
include:
16-
- laravel: 8.*
17-
testbench: 6.*
20+
- laravel: 9.*
21+
testbench: 7.*
1822

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

@@ -33,11 +37,9 @@ jobs:
3337
run: |
3438
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
3539
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
36-
3740
- name: Install dependencies
3841
run: |
3942
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
4043
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
41-
4244
- name: Execute tests
43-
run: vendor/bin/phpunit
45+
run: vendor/bin/pest
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: "Update Changelog"
2+
3+
on:
4+
release:
5+
types: [released]
6+
7+
jobs:
8+
update:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v2
14+
with:
15+
ref: main
16+
17+
- name: Update Changelog
18+
uses: stefanzweifel/changelog-updater-action@v1
19+
with:
20+
latest-version: ${{ github.event.release.name }}
21+
release-notes: ${{ github.event.release.body }}
22+
23+
- name: Commit updated CHANGELOG
24+
uses: stefanzweifel/git-auto-commit-action@v4
25+
with:
26+
branch: main
27+
commit_message: Update CHANGELOG
28+
file_pattern: CHANGELOG.md

.php-cs-fixer.cache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"php":"8.1.3","version":"3.7.0","indent":" ","lineEnding":"\n","rules":{"blank_line_after_opening_tag":true,"braces":{"allow_single_line_anonymous_class_with_empty_body":true},"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_typehint":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_braces":true,"no_blank_lines_after_class_opening":true,"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"sort_algorithm":"alpha"},"return_type_declaration":true,"short_scalar_cast":true,"single_blank_line_before_namespace":true,"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline","keep_multiple_spaces_after_comma":true},"no_break_comment":true,"no_closing_tag":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"array_syntax":{"syntax":"short"},"no_unused_imports":true,"not_operator_with_successor_space":true,"trailing_comma_in_multiline":true,"phpdoc_scalar":true,"unary_operator_spaces":true,"binary_operator_spaces":true,"blank_line_before_statement":{"statements":["break","continue","declare","return","throw","try"]},"phpdoc_single_line_var_spacing":true,"phpdoc_var_without_name":true,"class_attributes_separation":{"elements":{"method":"one"}}},"hashes":{"src\/Models\/Note.php":33057777,"src\/Models\/Service.php":1308036330,"src\/Models\/Lead.php":3909068467,"src\/SimpleCrmServiceProvider.php":944153556,"tests\/Unit\/LeadTest.php":614413385,"tests\/Unit\/ServiceTest.php":303507015,"tests\/Unit\/NoteTest.php":2065232214,"tests\/Models\/User.php":2662874227,"tests\/TestCase.php":1234141560,"tests\/Pest.php":2378833050}}

.php_cs.dist renamed to .php_cs.dist.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<?php
22

33
$finder = Symfony\Component\Finder\Finder::create()
4-
->notPath('bootstrap/*')
5-
->notPath('storage/*')
6-
->notPath('resources/view/mail/*')
74
->in([
85
__DIR__ . '/src',
96
__DIR__ . '/tests',
@@ -13,14 +10,14 @@
1310
->ignoreDotFiles(true)
1411
->ignoreVCS(true);
1512

16-
return PhpCsFixer\Config::create()
13+
return (new PhpCsFixer\Config())
1714
->setRules([
18-
'@PSR2' => true,
15+
'@PSR12' => true,
1916
'array_syntax' => ['syntax' => 'short'],
20-
'ordered_imports' => ['sortAlgorithm' => 'alpha'],
17+
'ordered_imports' => ['sort_algorithm' => 'alpha'],
2118
'no_unused_imports' => true,
2219
'not_operator_with_successor_space' => true,
23-
'trailing_comma_in_multiline_array' => true,
20+
'trailing_comma_in_multiline' => true,
2421
'phpdoc_scalar' => true,
2522
'unary_operator_spaces' => true,
2623
'binary_operator_spaces' => true,
@@ -31,7 +28,7 @@
3128
'phpdoc_var_without_name' => true,
3229
'class_attributes_separation' => [
3330
'elements' => [
34-
'method',
31+
'method' => 'one',
3532
],
3633
],
3734
'method_argument_space' => [

composer.json

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,20 @@
1515
}
1616
],
1717
"require": {
18-
"php": "^7.4|^8.0"
18+
"php": "^7.4|^8.0",
19+
"spatie/laravel-package-tools": "^1.11"
1920
},
2021
"require-dev": {
21-
"friendsofphp/php-cs-fixer": "^2.18",
22-
"orchestra/testbench": "^6.0",
23-
"phpunit/phpunit": "^9.3",
24-
"psalm/plugin-laravel": "^1.4",
25-
"vimeo/psalm": "^4.4"
22+
"nunomaduro/collision": "^6.0",
23+
"nunomaduro/larastan": "^2.0.1",
24+
"orchestra/testbench": "^7.0",
25+
"pestphp/pest": "^1.21",
26+
"pestphp/pest-plugin-laravel": "^1.1",
27+
"phpstan/extension-installer": "^1.1",
28+
"phpstan/phpstan-deprecation-rules": "^1.0",
29+
"phpstan/phpstan-phpunit": "^1.0",
30+
"phpunit/phpunit": "^9.5",
31+
"spatie/laravel-ray": "^1.26"
2632
},
2733
"autoload": {
2834
"psr-4": {
@@ -36,11 +42,9 @@
3642
}
3743
},
3844
"scripts": {
39-
"psalm": "vendor/bin/psalm",
40-
"test": "vendor/bin/phpunit --colors=always",
41-
"test-coverage": "vendor/bin/phpunit --coverage-html coverage",
42-
"format": "vendor/bin/php-cs-fixer fix --allow-risky=yes",
43-
"all": "composer psalm && composer test && composer test-coverage && composer format"
45+
"analyse": "vendor/bin/phpstan analyse",
46+
"test": "vendor/bin/pest",
47+
"test-coverage": "vendor/bin/pest --coverage"
4448
},
4549
"config": {
4650
"sort-packages": true

config/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)