Skip to content

Commit ba767a1

Browse files
committed
Initial commit
0 parents  commit ba767a1

29 files changed

+886
-0
lines changed

Diff for: .editorconfig

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_size = 4
6+
indent_style = space
7+
end_of_line = lf
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

Diff for: .gitattributes

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
/phpunit.xml.dist export-ignore
9+
/art export-ignore
10+
/docs export-ignore
11+
/tests export-ignore
12+
/.editorconfig export-ignore
13+
/.php_cs.dist.php export-ignore
14+
/psalm.xml export-ignore
15+
/psalm.xml.dist export-ignore
16+
/testbench.yaml export-ignore
17+
/UPGRADING.md export-ignore
18+
/phpstan.neon.dist export-ignore
19+
/phpstan-baseline.neon export-ignore

Diff for: .github/ISSUE_TEMPLATE/config.yml

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

Diff for: .github/dependabot.yml

+12
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"

Diff for: .github/workflows/dependabot-auto-merge.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: dependabot-auto-merge
2+
on: pull_request_target
3+
4+
permissions:
5+
pull-requests: write
6+
contents: write
7+
8+
jobs:
9+
dependabot:
10+
runs-on: ubuntu-latest
11+
if: ${{ github.actor == 'dependabot[bot]' }}
12+
steps:
13+
14+
- name: Dependabot metadata
15+
id: metadata
16+
uses: dependabot/[email protected]
17+
with:
18+
github-token: "${{ secrets.GITHUB_TOKEN }}"
19+
20+
- name: Auto-merge Dependabot PRs for semver-minor updates
21+
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
22+
run: gh pr merge --auto --merge "$PR_URL"
23+
env:
24+
PR_URL: ${{github.event.pull_request.html_url}}
25+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
26+
27+
- name: Auto-merge Dependabot PRs for semver-patch updates
28+
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
29+
run: gh pr merge --auto --merge "$PR_URL"
30+
env:
31+
PR_URL: ${{github.event.pull_request.html_url}}
32+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

Diff for: .github/workflows/fix-php-code-style-issues.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Fix PHP code style issues
2+
3+
on: [push]
4+
5+
jobs:
6+
php-code-styling:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v3
12+
with:
13+
ref: ${{ github.head_ref }}
14+
15+
- name: Fix PHP code style issues
16+
uses: aglipanci/[email protected]
17+
18+
- name: Commit changes
19+
uses: stefanzweifel/git-auto-commit-action@v4
20+
with:
21+
commit_message: Fix styling

Diff for: .github/workflows/phpstan.yml

+26
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

Diff for: .github/workflows/run-tests.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: run-tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: true
14+
matrix:
15+
os: [ubuntu-latest, windows-latest]
16+
php: [8.1]
17+
laravel: [9.*]
18+
stability: [prefer-lowest, prefer-stable]
19+
include:
20+
- laravel: 9.*
21+
testbench: 7.*
22+
23+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
24+
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v3
28+
29+
- name: Setup PHP
30+
uses: shivammathur/setup-php@v2
31+
with:
32+
php-version: ${{ matrix.php }}
33+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
34+
coverage: none
35+
36+
- name: Setup problem matchers
37+
run: |
38+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
39+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
40+
41+
- name: Install dependencies
42+
run: |
43+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
44+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
45+
46+
- name: Execute tests
47+
run: vendor/bin/pest

Diff for: .github/workflows/update-changelog.yml

+28
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

Diff for: .gitignore

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.idea
2+
.phpunit.result.cache
3+
build
4+
composer.lock
5+
coverage
6+
docs
7+
phpunit.xml
8+
phpstan.neon
9+
testbench.yaml
10+
vendor
11+
node_modules

Diff for: CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Changelog
2+
3+
All notable changes to `:package_name` will be documented in this file.

Diff for: LICENSE.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) :vendor_name <[email protected]>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

Diff for: README.md

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# :package_description
2+
3+
[![Latest Version on Packagist](https://img.shields.io/packagist/v/:vendor_slug/:package_slug.svg?style=flat-square)](https://packagist.org/packages/:vendor_slug/:package_slug)
4+
[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/:vendor_slug/:package_slug/run-tests?label=tests)](https://github.com/:vendor_slug/:package_slug/actions?query=workflow%3Arun-tests+branch%3Amain)
5+
[![GitHub Code Style Action Status](https://img.shields.io/github/workflow/status/:vendor_slug/:package_slug/Fix%20PHP%20code%20style%20issues?label=code%20style)](https://github.com/:vendor_slug/:package_slug/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
6+
[![Total Downloads](https://img.shields.io/packagist/dt/:vendor_slug/:package_slug.svg?style=flat-square)](https://packagist.org/packages/:vendor_slug/:package_slug)
7+
<!--delete-->
8+
---
9+
This repo can be used to scaffold a Laravel package. Follow these steps to get started:
10+
11+
1. Press the "Use this template" button at the top of this repo to create a new repo with the contents of this skeleton.
12+
2. Run "php ./configure.php" to run a script that will replace all placeholders throughout all the files.
13+
3. Have fun creating your package.
14+
4. If you need help creating a package, consider picking up our <a href="https://laravelpackage.training">Laravel Package Training</a> video course.
15+
---
16+
<!--/delete-->
17+
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
18+
19+
## Support us
20+
21+
[<img src="https://github-ads.s3.eu-central-1.amazonaws.com/:package_name.jpg?t=1" width="419px" />](https://spatie.be/github-ad-click/:package_name)
22+
23+
We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).
24+
25+
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).
26+
27+
## Installation
28+
29+
You can install the package via composer:
30+
31+
```bash
32+
composer require :vendor_slug/:package_slug
33+
```
34+
35+
You can publish and run the migrations with:
36+
37+
```bash
38+
php artisan vendor:publish --tag=":package_slug-migrations"
39+
php artisan migrate
40+
```
41+
42+
You can publish the config file with:
43+
44+
```bash
45+
php artisan vendor:publish --tag=":package_slug-config"
46+
```
47+
48+
This is the contents of the published config file:
49+
50+
```php
51+
return [
52+
];
53+
```
54+
55+
Optionally, you can publish the views using
56+
57+
```bash
58+
php artisan vendor:publish --tag=":package_slug-views"
59+
```
60+
61+
## Usage
62+
63+
```php
64+
$variable = new VendorName\Skeleton();
65+
echo $variable->echoPhrase('Hello, VendorName!');
66+
```
67+
68+
## Testing
69+
70+
```bash
71+
composer test
72+
```
73+
74+
## Changelog
75+
76+
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
77+
78+
## Contributing
79+
80+
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
81+
82+
## Security Vulnerabilities
83+
84+
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
85+
86+
## Credits
87+
88+
- [:author_name](https://github.com/:author_username)
89+
- [All Contributors](../../contributors)
90+
91+
## License
92+
93+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

0 commit comments

Comments
 (0)