Skip to content

Commit 1e0458e

Browse files
authored
Merge pull request #31 from houdaslassi/enhance-package-tooling
Enhance package tooling
2 parents db0f8c7 + 3f414b7 commit 1e0458e

File tree

64 files changed

+3546
-861
lines changed

Some content is hidden

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

64 files changed

+3546
-861
lines changed

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2
16+

.gitattributes

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,30 @@
1-
# Exclude screenshots from Composer exports
2-
# Screenshots are kept in repo for GitHub README but not distributed via Composer
3-
screenshots/ export-ignore
1+
# Path-based git attributes
2+
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
3+
4+
# Ignore all test and documentation with "export-ignore".
5+
/.github export-ignore
6+
/.gitattributes export-ignore
7+
/.gitignore export-ignore
8+
/.editorconfig export-ignore
9+
/phpunit.xml.dist export-ignore
10+
/phpstan.neon.dist export-ignore
11+
/phpstan-baseline.neon export-ignore
12+
/tests export-ignore
13+
/screenshots export-ignore
14+
415
# Exclude internal documentation from Composer exports
5-
RELEASE.md export-ignore
6-
HOW_TO_RELEASE.md export-ignore
7-
TODO.md export-ignore
8-
TAG_LOGIC_MAP.md export-ignore
9-
USAGE_EXAMPLES.md export-ignore
10-
PR_DESCRIPTION.md export-ignore
11-
.stashed-features/ export-ignore
12-
# Exclude test files from Composer exports (they're in require-dev anyway)
13-
tests/ export-ignore
16+
CHANGELOG.md export-ignore
17+
RELEASE.md export-ignore
18+
HOW_TO_RELEASE.md export-ignore
19+
TODO.md export-ignore
20+
TAG_LOGIC_MAP.md export-ignore
21+
USAGE_EXAMPLES.md export-ignore
22+
PR_DESCRIPTION.md export-ignore
23+
1424
# Exclude development files
25+
.stashed-features/ export-ignore
1526
gpg-batch-config.txt export-ignore
16-
gpg-public-key.txt export-ignore
27+
gpg-public-key.txt export-ignore
28+
29+
# Handle large files
1730
screenshots/*.mov filter=lfs diff=lfs merge=lfs -text

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Bug Report
2+
description: Report an Issue or Bug with the Package
3+
title: "[Bug]: "
4+
labels: ["bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
We're sorry to hear you have a problem. Can you help us solve it by providing the following details.
10+
- type: textarea
11+
id: what-happened
12+
attributes:
13+
label: What happened?
14+
description: What did you expect to happen?
15+
placeholder: I cannot currently do X thing because when I do, it breaks X thing.
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: how-to-reproduce
20+
attributes:
21+
label: How to reproduce the bug
22+
description: How did this occur, please add any config values used and provide a set of reliable steps if possible.
23+
placeholder: When I do X I see Y.
24+
validations:
25+
required: true
26+
- type: input
27+
id: package-version
28+
attributes:
29+
label: Package Version
30+
description: What version of Vantage are you running? Please be as specific as possible
31+
placeholder: 1.0.0
32+
validations:
33+
required: true
34+
- type: input
35+
id: php-version
36+
attributes:
37+
label: PHP Version
38+
description: What version of PHP are you running? Please be as specific as possible
39+
placeholder: 8.2.0
40+
validations:
41+
required: true
42+
- type: input
43+
id: laravel-version
44+
attributes:
45+
label: Laravel Version
46+
description: What version of Laravel are you running? Please be as specific as possible
47+
placeholder: 11.0.0
48+
validations:
49+
required: true
50+
- type: dropdown
51+
id: operating-systems
52+
attributes:
53+
label: Which operating systems does this happen with?
54+
description: You may select more than one.
55+
multiple: true
56+
options:
57+
- macOS
58+
- Windows
59+
- Linux
60+
- type: textarea
61+
id: notes
62+
attributes:
63+
label: Notes
64+
description: Use this field to provide any other notes that you feel might be relevant to the issue.
65+
validations:
66+
required: false
67+

.github/ISSUE_TEMPLATE/config.yml

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

.github/dependabot.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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"
13+
14+
- package-ecosystem: "composer"
15+
directory: "/"
16+
schedule:
17+
interval: "weekly"
18+
labels:
19+
- "dependencies"
20+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Fix PHP code style issues
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.php'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
php-code-styling:
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 5
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v5
19+
with:
20+
ref: ${{ github.head_ref }}
21+
22+
- name: Fix PHP code style issues
23+
uses: aglipanci/laravel-pint-action@2.6
24+
25+
- name: Commit changes
26+
uses: stefanzweifel/git-auto-commit-action@v7
27+
with:
28+
commit_message: Fix styling
29+

.github/workflows/phpstan.yml

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

.github/workflows/run-tests.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: run-tests
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.php'
7+
- '.github/workflows/run-tests.yml'
8+
- 'phpunit.xml.dist'
9+
- 'composer.json'
10+
- 'composer.lock'
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
test:
18+
runs-on: ${{ matrix.os }}
19+
timeout-minutes: 10
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
os: [ubuntu-latest]
24+
php: [8.4, 8.3, 8.2]
25+
laravel: [12.*, 11.*]
26+
stability: [prefer-stable]
27+
include:
28+
- laravel: 12.*
29+
testbench: 10.*
30+
- laravel: 11.*
31+
testbench: 9.*
32+
33+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }}
34+
35+
steps:
36+
- name: Checkout code
37+
uses: actions/checkout@v5
38+
39+
- name: Setup PHP
40+
uses: shivammathur/setup-php@v2
41+
with:
42+
php-version: ${{ matrix.php }}
43+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
44+
coverage: none
45+
46+
- name: Setup problem matchers
47+
run: |
48+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
49+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
50+
51+
- name: Install dependencies
52+
run: |
53+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
54+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
55+
56+
- name: List Installed Dependencies
57+
run: composer show -D
58+
59+
- name: Execute tests
60+
run: vendor/bin/pest --ci
61+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: "Update Changelog"
2+
3+
on:
4+
release:
5+
types: [released]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
update:
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 5
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v5
18+
with:
19+
ref: main
20+
21+
- name: Update Changelog
22+
uses: stefanzweifel/changelog-updater-action@v1
23+
with:
24+
latest-version: ${{ github.event.release.name }}
25+
release-notes: ${{ github.event.release.body }}
26+
27+
- name: Commit updated CHANGELOG
28+
uses: stefanzweifel/git-auto-commit-action@v7
29+
with:
30+
branch: main
31+
commit_message: Update CHANGELOG
32+
file_pattern: CHANGELOG.md
33+

.gitignore

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,41 @@
1-
# Dependencies
2-
/vendor/
3-
/node_modules/
1+
# Composer Related
2+
composer.lock
3+
/vendor
44

5-
# IDE
6-
.idea/
7-
.vscode/
8-
*.swp
9-
*.swo
5+
# Frontend Assets
6+
/node_modules
7+
8+
# Logs
9+
npm-debug.log
10+
yarn-error.log
11+
12+
# Caches
13+
.phpunit.cache
14+
.phpunit.result.cache
15+
/build
16+
17+
# IDE Helper
18+
_ide_helper.php
19+
_ide_helper_models.php
1020
.phpstorm.meta.php
1121

22+
# Editors
23+
/.idea
24+
/.fleet
25+
/.vscode
26+
27+
# Misc
28+
phpunit.xml
29+
phpstan.neon
30+
testbench.yaml
31+
/docs
32+
/coverage
33+
1234
# OS
1335
.DS_Store
1436
Thumbs.db
37+
*.swp
38+
*.swo
1539

1640
# Testing
1741
.phpunit.result.cache

0 commit comments

Comments
 (0)