-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7639030
Showing
25 changed files
with
1,645 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
; This file is for unifying the coding style for different editors and IDEs. | ||
; More information at http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_size = 4 | ||
indent_style = space | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
block_comment_start = /* | ||
block_comment = * | ||
block_comment_end = */ | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
indent_size = unset | ||
block_comment_start = unset | ||
block_comment = unset | ||
block_comment_end = unset | ||
|
||
[*.yml] | ||
indent_size = 2 | ||
|
||
[phpunit.xml] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Path-based git attributes | ||
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html | ||
|
||
# Ignore all test and documentation with "export-ignore". | ||
/.github export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/phpunit.xml export-ignore | ||
/tests export-ignore | ||
/.editorconfig export-ignore | ||
/composer.lock export-ignore | ||
/.styleci.yml export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Let's keep it free and up to date | ||
github: DarkGhostHunter | ||
custom: "https://paypal.me/darkghosthunter" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: Bug Report | ||
description: | | ||
File a bug report to be fixed. | ||
Sponsors get priority issues, PRs, fixes and requests. Not a sponsor? [You're a just click away!](https://github.com/sponsors/DarkGhostHunter). | ||
title: "[X.x] What does happen that is considered an error or bug?" | ||
labels: ["bug"] | ||
assignees: | ||
- DarkGhostHunter | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thanks for taking the time to fill out this bug report! | ||
The more detailed this bug report is, the faster it can be reviewed and fixed. | ||
- type: input | ||
id: version-php-os | ||
attributes: | ||
label: PHP & Platform | ||
description: Exact PHP and Platform (OS) versions using this package. | ||
placeholder: 8.1.2 - Ubuntu 22.04 x64 | ||
validations: | ||
required: true | ||
- type: input | ||
id: version-db | ||
attributes: | ||
label: Database | ||
description: Exact DB version using this package, if applicable. | ||
placeholder: MySQL 8.0.28 | ||
validations: | ||
required: false | ||
- type: input | ||
id: version-laravel | ||
attributes: | ||
label: Laravel version | ||
description: Exact Laravel version using this package. | ||
placeholder: 9.2.3 | ||
validations: | ||
required: true | ||
- type: checkboxes | ||
id: requirements | ||
attributes: | ||
label: Have you done this? | ||
options: | ||
- label: I have checked my logs and I'm sure is a bug in this package. | ||
required: true | ||
- label: I can reproduce this bug in isolation (vanilla Laravel install) | ||
required: true | ||
- label: I can suggest a workaround as a Pull Request | ||
required: false | ||
- type: textarea | ||
id: expectation | ||
attributes: | ||
label: Expectation | ||
description: Write what you expect to (correctly) happen. | ||
placeholder: When I do this, I expect to happen that. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Description | ||
description: Write what (incorrectly) happens instead. | ||
placeholder: Instead, when I do this, I receive that. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: reproduction | ||
attributes: | ||
label: Reproduction | ||
description: Paste the code to assert in a test, or just comment with the repository with the bug to download. | ||
render: php | ||
placeholder: | | ||
$test = Laragear::make()->break(); | ||
static::assertFalse($test); | ||
// or comment with "https://github.com/my-name/my-bug-report" | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: logs | ||
attributes: | ||
label: Stack trace & logs | ||
description: If you have a **full** stack trace, you can copy it here. You may hide sensible information. | ||
placeholder: This is automatically formatted into code, no need for ``` backticks. | ||
render: shell | ||
validations: | ||
required: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
blank_issues_enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Feature request | ||
description: | | ||
Suggest a feature for this package. | ||
Sponsors get priority issues, PRs, fixes and requests. Not a sponsor? [You're a just click away!](https://github.com/sponsors/DarkGhostHunter). | ||
title: "[X.x] Add this cool feature for this package" | ||
labels: ["enhancement"] | ||
assignees: | ||
- DarkGhostHunter | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thanks for contributing to this package! | ||
New features keep this package fresh and fun for everybody to use. | ||
- type: checkboxes | ||
id: requirements | ||
attributes: | ||
label: Please check these requirements | ||
options: | ||
- label: This feature helps everyone using this package | ||
required: true | ||
- label: It's feasible and maintainable | ||
required: true | ||
- label: It's non breaking | ||
required: true | ||
- label: I issued a PR with the implementation (optional) | ||
required: false | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Description | ||
description: Describe how the feature works | ||
placeholder: | | ||
This new feature would accomplish... | ||
It could be implemented by doing... | ||
And it would be cool because... | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: sample | ||
attributes: | ||
label: Code sample | ||
description: Sample a small snippet on how the feature works | ||
placeholder: | | ||
Laragear::newFeature()->cool(); | ||
render: php | ||
validations: | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!-- | ||
Thanks for contributing to this package! We only accept PR to the latest stable version. | ||
If you're pushing a Feature: | ||
- Title it: "[X.x] This new feature" | ||
- Describe what the new feature enables | ||
- Show a small code snippet of the new feature | ||
- Ensure it doesn't break backward compatibility. | ||
If you're pushing a Fix: | ||
- Title it: "[X.x] FIX: The bug name" | ||
- Describe how it fixes in a few words. | ||
- Ensure it doesn't break backward compatibility. | ||
All Pull Requests run with extensive tests for stable and latest versions of PHP and Laravel. | ||
Ensure your tests pass or your PR may be taken down. | ||
If you're a Sponsor, this PR will have priority review. | ||
Not a Sponsor? Become one at https://github.com/sponsors/DarkGhostHunter | ||
--> | ||
|
||
# Description | ||
|
||
This feature/fix allows to... | ||
|
||
# Code samples | ||
|
||
```php | ||
Laragear::sample(); | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: composer | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "09:00" | ||
open-pull-requests-limit: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow | ||
|
||
name: Tests | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
|
||
byte_level: | ||
name: 0️⃣ Byte-level | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Check file permissions | ||
run: | | ||
test $(find . -type f -not -path './.git/*' -executable) == | ||
- name: Find non-printable ASCII characters | ||
run: | | ||
! LC_ALL=C.UTF-8 find ./src -type f -name *.php -print0 | xargs -0 -- grep -PHn [^ -~] | ||
syntax_errors: | ||
name: 1️⃣ Syntax errors | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: latest | ||
tools: parallel-lint | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Validate Composer configuration | ||
run: composer validate --strict | ||
|
||
- name: Check source code for syntax errors | ||
run: composer exec -- parallel-lint src/ | ||
|
||
unit_tests: | ||
name: 2️⃣ Unit and Feature tests | ||
needs: | ||
- byte_level | ||
- syntax_errors | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php-version: | ||
- 8.1 | ||
- 8.2 | ||
- 8.3 | ||
laravel-constraint: | ||
- 10.* | ||
- 11.* | ||
dependencies: | ||
- lowest | ||
- highest | ||
exclude: | ||
- php-version: 8.1 | ||
laravel-constraint: 11.* | ||
|
||
steps: | ||
- name: Set up PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
extensions: mbstring, intl | ||
coverage: xdebug | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
uses: ramsey/composer-install@v3 | ||
with: | ||
dependency-versions: ${{ matrix.dependencies }} | ||
composer-options: --with=illuminate/database:${{ matrix.laravel-constraint }} | ||
|
||
- name: Execute unit tests | ||
run: composer run-script test | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
slug: Laragear/MetaModel | ||
|
||
static_analysis: | ||
name: 3️⃣ Static Analysis | ||
needs: | ||
- byte_level | ||
- syntax_errors | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
tools: phpstan | ||
php-version: latest | ||
coverage: none | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Validate Composer configuration | ||
run: composer validate --strict | ||
|
||
- name: Install dependencies | ||
uses: ramsey/composer-install@v3 | ||
|
||
- name: Execute static analysis | ||
run: composer exec -- phpstan analyze -l 5 src/ | ||
|
||
exported_files: | ||
name: 4️⃣ Exported files | ||
needs: | ||
- byte_level | ||
- syntax_errors | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check exported files | ||
run: | | ||
EXPECTED=LICENSE.md,MIGRATIONS.md,README.md,composer.json | ||
CURRENT=$(git archive HEAD | tar --list --exclude=src --exclude=src/* --exclude=.stubs --exclude=.stubs/* --exclude=lang --exclude=lang/* --exclude=config --exclude=config/* --exclude=database --exclude=database/* --exclude=resources --exclude=resources/* | paste -s -d ,) | ||
echo CURRENT =${CURRENT} | ||
echo EXPECTED=${EXPECTED} | ||
test ${CURRENT} == ${EXPECTED} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/build | ||
/vendor | ||
/.idea | ||
.php-cs-fixer.cache | ||
.phpunit.result.cache | ||
composer.lock | ||
phpunit.xml.bak |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
preset: laravel | ||
version: 8.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) Italo Israel Baeza Cabrera | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.