Skip to content

Commit 79ddf6e

Browse files
authored
Update underlying skeleton (#3)
1 parent 3d13512 commit 79ddf6e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+347
-398
lines changed

.codecov.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
coverage:
2+
status:
3+
patch:
4+
default:
5+
target: 90%

.gitattributes

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@
66
/.gitattributes export-ignore
77
/.gitignore export-ignore
88
/phpunit.xml.dist export-ignore
9+
/art export-ignore
10+
/docs export-ignore
911
/tests export-ignore
1012
/.editorconfig export-ignore
11-
/.php_cs.dist export-ignore
13+
/.php_cs.dist.php export-ignore
1214
/psalm.xml export-ignore
1315
/psalm.xml.dist export-ignore
1416
/testbench.yaml export-ignore
17+
/UPGRADING.md export-ignore
18+
/phpstan.neon.dist export-ignore
19+
/phpstan-baseline.neon export-ignore

.github/CONTRIBUTING.md

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

.github/FUNDING.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
blank_issues_enabled: false
22
contact_links:
3-
- name: Ask a question
4-
url: https://github.com/vendor_slug/package_slug/discussions/new?category=q-a
5-
about: Ask the community for help
6-
- name: Request a feature
7-
url: https://github.com/vendor_slug/package_slug/discussions/new?category=ideas
8-
about: Share ideas for new features
9-
- name: Report a bug
10-
url: https://github.com/vendor_slug/package_slug/issues/new
11-
about: Report a reproducable bug
3+
- name: Ask a question
4+
url: https://github.com/limenet/laravel-elastica-bridge/discussions/new?category=q-a
5+
about: Ask the community for help
6+
- name: Request a feature
7+
url: https://github.com/limenet/laravel-elastica-bridge/discussions/new?category=ideas
8+
about: Share ideas for new features
9+
- name: Report a security issue
10+
url: https://github.com/limenet/laravel-elastica-bridge/security/policy
11+
about: Learn how to notify us for sensitive bugs
12+
- name: Report a bug
13+
url: https://github.com/limenet/laravel-elastica-bridge/issues/new
14+
about: Report a reproducable bug

.github/SECURITY.md

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

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ jobs:
88

99
steps:
1010
- name: Checkout code
11-
uses: actions/checkout@v2
11+
uses: actions/checkout@v3
1212
with:
1313
ref: ${{ github.head_ref }}
1414

1515
- name: Run PHP CS Fixer
1616
uses: docker://oskarstark/php-cs-fixer-ga
1717
with:
18-
args: --config=.php_cs.dist.php --allow-risky=yes
18+
args: --config=.php-cs-fixer.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@v3
15+
16+
- name: Setup PHP
17+
uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: '8.1'
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: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,16 @@ jobs:
1010
test:
1111
runs-on: ${{ matrix.os }}
1212
strategy:
13-
fail-fast: false
13+
fail-fast: true
1414
matrix:
1515
os: [ubuntu-latest]
1616
php: [8.0, 8.1]
17-
laravel: [^8.67, ^9.0]
18-
elasticsearch: ["7.17.0"]
17+
laravel: [9.*]
18+
elasticsearch: ["7.17.4"]
1919
stability: [prefer-lowest, prefer-stable]
2020
include:
21-
- laravel: ^8.67
22-
testbench: ^6.6
23-
- laravel: ^9.0
24-
testbench: ^7.0
21+
- laravel: 9.*
22+
testbench: 7.*
2523

2624
name: P${{ matrix.php }} - L${{ matrix.laravel }} - E${{ matrix.elasticsearch }} - ${{ matrix.stability }} - ${{ matrix.os }}
2725

@@ -39,25 +37,27 @@ jobs:
3937
stack-version: ${{ matrix.elasticsearch }}
4038

4139
- name: Checkout code
42-
uses: actions/checkout@v2
40+
uses: actions/checkout@v3
4341

4442
- name: Setup PHP
4543
uses: shivammathur/setup-php@v2
4644
with:
4745
php-version: ${{ matrix.php }}
48-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
46+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo,xml, sqlite
4947
coverage: xdebug
5048

5149
- name: Setup problem matchers
5250
run: |
5351
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
5452
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
53+
5554
- name: Install dependencies
5655
run: |
5756
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
5857
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
58+
5959
- name: Execute tests
60-
run: composer run test-coverage -- --coverage-text
60+
run: composer run test-github
6161

6262
- uses: codecov/codecov-action@v1
6363
with:
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@v3
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

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ composer.lock
77
coverage
88
docs
99
phpunit.xml
10-
psalm.xml
10+
phpstan.neon
1111
testbench.yaml
1212
vendor
1313
node_modules

.php-cs-fixer.dist.php

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?php
2+
3+
use PhpCsFixer\Config;
4+
use PhpCsFixer\Finder;
5+
6+
$rules = [
7+
'@Symfony' => true,
8+
'@Symfony:risky' => true,
9+
'@PHP80Migration' => true,
10+
'@PHP80Migration:risky' => true,
11+
'@PSR12:risky' => true,
12+
'array_indentation' => true,
13+
'heredoc_to_nowdoc' => true,
14+
'increment_style' => ['style' => 'post'],
15+
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
16+
'native_constant_invocation' => false,
17+
'native_function_invocation' => false,
18+
'no_empty_comment' => false,
19+
'no_useless_return' => true,
20+
'nullable_type_declaration_for_default_null_value' => true,
21+
'protected_to_private' => false,
22+
'simplified_null_return' => false, // disabled by Shift
23+
'use_arrow_functions' => true,
24+
'yoda_style' => false,
25+
'php_unit_method_casing' => ['case' => 'snake_case']
26+
];
27+
28+
$project_path = getcwd();
29+
$finder = Finder::create()
30+
->in([
31+
$project_path . '/src',
32+
$project_path . '/tests',
33+
])
34+
->name('*.php')
35+
->notName('*.blade.php')
36+
->ignoreDotFiles(true)
37+
->ignoreVCS(true);
38+
39+
return (new Config())
40+
->setFinder($finder)
41+
->setRules($rules)
42+
->setRiskyAllowed(true)
43+
->setUsingCache(true);

0 commit comments

Comments
 (0)