Skip to content

Commit e396329

Browse files
authored
Merge pull request #3 from rappasoft/develop
v2.0.0
2 parents 87cd753 + bf79b52 commit e396329

File tree

14 files changed

+104
-93
lines changed

14 files changed

+104
-93
lines changed

.github/stale.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 30
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 7
5+
# Issues with these labels will never be considered stale
6+
exemptLabels:
7+
- pinned
8+
- security
9+
# Label to use when marking an issue as stale
10+
staleLabel: wontfix
11+
# Comment to post when marking an issue as stale. Set to `false` to disable
12+
markComment: >
13+
This issue has been automatically marked as stale because it has not had
14+
recent activity. It will be closed if no further activity occurs. Thank you
15+
for your contributions.
16+
# Comment to post when closing a stale issue. Set to `false` to disable
17+
closeComment: false

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ 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-fixer.php --allow-risky=yes
1919

2020
- name: Commit changes
2121
uses: stefanzweifel/git-auto-commit-action@v4
2222
with:
23-
commit_message: Fix styling
23+
commit_message: Fix Styling

.github/workflows/psalm.yml

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

.github/workflows/run-tests.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Run Tests
22

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

59
jobs:
610
test:
@@ -9,12 +13,12 @@ jobs:
913
fail-fast: true
1014
matrix:
1115
os: [ubuntu-latest, windows-latest]
12-
php: [8.0, 7.4]
13-
laravel: [8.*]
16+
php: [8.0, 8.1]
17+
laravel: [9.*]
1418
stability: [prefer-lowest, prefer-stable]
1519
include:
16-
- laravel: 8.*
17-
testbench: 6.*
20+
- laravel: 9.*
21+
testbench: 7.0
1822

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

@@ -33,9 +37,11 @@ jobs:
3337
run: |
3438
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
3539
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
40+
3641
- name: Install dependencies
3742
run: |
3843
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
3944
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
45+
4046
- name: Execute tests
41-
run: vendor/bin/phpunit
47+
run: vendor/bin/phpunit

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.idea
22
.php_cs
33
.php_cs.cache
4+
.php-cs-fixer.cache
45
.phpunit.result.cache
56
build
67
composer.lock

.php-cs-fixer.php

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?php
2+
3+
$finder = Symfony\Component\Finder\Finder::create()
4+
->notPath('bootstrap/*')
5+
->notPath('storage/*')
6+
->notPath('resources/view/mail/*')
7+
->in([
8+
__DIR__ . '/config',
9+
__DIR__ . '/src',
10+
__DIR__ . '/tests',
11+
])
12+
->name('*.php')
13+
->notName('*.blade.php')
14+
->ignoreDotFiles(true)
15+
->ignoreVCS(true);
16+
17+
$config = new PhpCsFixer\Config();
18+
return $config->setRules([
19+
'@PSR2' => true,
20+
'array_syntax' => ['syntax' => 'short'],
21+
'ordered_imports' => ['sort_algorithm' => 'alpha'],
22+
'no_unused_imports' => true,
23+
'not_operator_with_successor_space' => true,
24+
'trailing_comma_in_multiline' => true,
25+
'phpdoc_scalar' => true,
26+
'unary_operator_spaces' => true,
27+
'binary_operator_spaces' => true,
28+
'blank_line_before_statement' => [
29+
'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'],
30+
],
31+
'phpdoc_single_line_var_spacing' => true,
32+
'phpdoc_var_without_name' => true,
33+
'class_attributes_separation' => [
34+
'elements' => [
35+
'method' => 'one',
36+
],
37+
],
38+
'method_argument_space' => [
39+
'on_multiline' => 'ensure_fully_multiline',
40+
'keep_multiple_spaces_after_comma' => true,
41+
],
42+
'single_trait_insert_per_statement' => false,
43+
])
44+
->setFinder($finder);

.php_cs.dist

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

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to `laravel-patches` will be documented in this file.
44

5+
## 2.0.0 - 2022-02-21
6+
7+
### Added
8+
9+
- Laravel 9 Support
10+
- Ability to specify table name
11+
512
## 1.0.0 - 2021-03-07
613

714
- Initial Release

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ You can install the package via composer:
1717
composer require rappasoft/laravel-patches
1818
```
1919

20+
You can publish the config file with:
21+
22+
```bash
23+
php artisan vendor:publish --provider="Rappasoft\LaravelPatches\LaravelPatchesServiceProvider" --tag="laravel-patches-config"
24+
```
25+
2026
You can publish and run the migrations with:
2127

2228
```bash

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
}
1616
],
1717
"require": {
18-
"php": "^7.4|^8.0",
18+
"php": "^8.0",
1919
"spatie/laravel-package-tools": "^1.1",
20-
"illuminate/contracts": "^8.0"
20+
"illuminate/contracts": "^9.0"
2121
},
2222
"require-dev": {
23-
"orchestra/testbench": "^6.0",
23+
"friendsofphp/php-cs-fixer": "^3.1",
24+
"orchestra/testbench": "^7.0",
2425
"phpunit/phpunit": "^9.3",
25-
"spatie/laravel-ray": "^1.9",
26-
"vimeo/psalm": "^4.4"
26+
"spatie/laravel-ray": "^1.9"
2727
},
2828
"autoload": {
2929
"psr-4": {
@@ -36,7 +36,7 @@
3636
}
3737
},
3838
"scripts": {
39-
"psalm": "vendor/bin/psalm",
39+
"format": "vendor/bin/php-cs-fixer fix --allow-risky=yes",
4040
"test": "vendor/bin/phpunit --colors=always",
4141
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
4242
},

0 commit comments

Comments
 (0)