Skip to content

Commit

Permalink
first
Browse files Browse the repository at this point in the history
  • Loading branch information
marco76tv committed Dec 20, 2023
0 parents commit 38e1f94
Show file tree
Hide file tree
Showing 179 changed files with 6,581 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
engines:
duplication:
enabled: true
exclude_paths:
- "Tests/"
- "config/"
- "src/config/"
- "Database/Migrations"

config:
languages:
- php

fixme:
enabled: true
exclude_paths:
- "Tests/"

phpmd:
enabled: true
exclude_paths:
- "Tests/"
- "Database/Migrations"
checks:
CleanCode/StaticAccess:
enabled: false
Design/CouplingBetweenObjects:
enabled: false
Naming/ShortVariable:
enabled: false

ratings:
paths:
- "**.php"

exclude_paths:
- "Tests/"
- "**.md"
- "**.json"
- "**.xml"
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
indent_size = 4
indent_style = space
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2
19 changes: 19 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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
/art export-ignore
/docs export-ignore
/tests export-ignore
/.editorconfig export-ignore
/.php_cs.dist.php export-ignore
/psalm.xml export-ignore
/psalm.xml.dist export-ignore
/testbench.yaml export-ignore
/UPGRADING.md export-ignore
/phpstan.neon.dist export-ignore
/phpstan-baseline.neon export-ignore
55 changes: 55 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Contributing

Contributions are **welcome** and will be fully **credited**.

Please read and understand the contribution guide before creating an issue or pull request.

## Etiquette

This project is open source, and as such, the maintainers give their free time to build and maintain the source code
held within. They make the code freely available in the hope that it will be of use to other developers. It would be
extremely unfair for them to suffer abuse or anger for their hard work.

Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the
world that developers are civilized and selfless people.

It's the duty of the maintainer to ensure that all submissions to the project are of sufficient
quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used.

## Viability

When requesting or submitting new features, first consider whether it might be useful to others. Open
source projects are used by many developers, who may have entirely different needs to your own. Think about
whether or not your feature is likely to be used by other users of the project.

## Procedure

Before filing an issue:

- Attempt to replicate the problem, to ensure that it wasn't a coincidental incident.
- Check to make sure your feature suggestion isn't already present within the project.
- Check the pull requests tab to ensure that the bug doesn't have a fix in progress.
- Check the pull requests tab to ensure that the feature isn't already in progress.

Before submitting a pull request:

- Check the codebase to ensure that your feature doesn't already exist.
- Check the pull requests to ensure that another person hasn't already submitted the feature or fix.

## Requirements

If the project maintainer has any additional requirements, you will find them listed here.

- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The standard can be enforced by running the `composer lint` console command.

- **Add tests!** - Your patch won't be accepted if it doesn't have tests.

- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.

- **Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option.

- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.

- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](https://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.

**Happy coding**!
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [marco76tv, laraxot]
3 changes: 3 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Security Policy

If you have found any issue regarding security, please send an email [[email protected]](mailto:[email protected]) instead of using the issue tracker and we will quickly work on it.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "daily"
Empty file added .github/workflows/.gitkeep
Empty file.
43 changes: 43 additions & 0 deletions .github/workflows/duster-fix-blame.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Duster Fix

# Commits made in here will not trigger any workflows
# Checkout Duster's documentation for a workaround

on:
push:
branches: [ master ]
pull_request:

jobs:
duster:
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}

- name: "Duster Fix"
uses: tighten/duster-action@v2
with:
args: fix

- uses: stefanzweifel/git-auto-commit-action@v4
id: auto_commit_action
with:
commit_message: Dusting
commit_user_name: GitHub Action
commit_user_email: [email protected]

- name: Ignore Duster commit in git blame
if: steps.auto_commit_action.outputs.changes_detected == 'true'
run: echo ${{ steps.auto_commit_action.outputs.commit_hash }} >> .git-blame-ignore-revs

- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Ignore Dusting commit in git blame
commit_user_name: GitHub Action
commit_user_email: [email protected]
23 changes: 23 additions & 0 deletions .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Check & fix styling

on: [push]

jobs:
php-cs-fixer:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}

- name: Run PHP CS Fixer
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --config=.php-cs-fixer.dist --allow-risky=yes

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Check & fix styling
19 changes: 19 additions & 0 deletions .github/workflows/phpinsights.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: phpinsights
on: [push]

jobs:
phpinsights:
runs-on: ubuntu-latest
name: PHP Insights checks
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: 8.1
- run: composer install --prefer-dist --no-progress
- run: composer require nunomaduro/phpinsights --dev
- run: cp vendor/nunomaduro/phpinsights/stubs/laravel.php phpinsights.php
- run: vendor/bin/phpinsights -n --ansi --format=github-action --fix
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: phpinsights
23 changes: 23 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Static Analysis

on: [push]

jobs:
phpstan:
name: phpstan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: none

- name: Install composer dependencies
run: composer install -n --prefer-dist

- name: Run Static Analysis
run: ./vendor/bin/phpstan --error-format=github

20 changes: 20 additions & 0 deletions .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: psalm
on: [push]

jobs:
phpinsights:
runs-on: ubuntu-latest
name: PHP Insights checks
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: 8.1
- run: composer install --prefer-dist --no-progress
- run: composer require --dev psalm/plugin-laravel -W
- run: ./vendor/bin/psalm --init
- run: ./vendor/bin/psalm-plugin enable psalm/plugin-laravel
- run: ./vendor/bin/psalm --alter --issues=all --dry-run
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: psalm
39 changes: 39 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish

on:
push:
branches:
- master

permissions:
contents: write

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@master

- name: Validate composer.json and composer.lock
run: cd docs && composer validate

- name: Composer
run: cd docs && composer install --no-progress --no-suggest

- name: Node
run: cd docs && npm install

- name: Production
run: cd docs && npm run prod

- name: CNAME
run: cd docs && echo "laraxot.github.io/module_chart" > ./build_production/CNAME

- name: gh-pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: ./docs/build_production
31 changes: 31 additions & 0 deletions .github/workflows/rector.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Inspiration https://github.com/symplify/symplify/blob/main/.github/workflows/rector.yaml
name: Rector

on:
pull_request: null

jobs:
rector:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
token: "${{ secrets.ACCESS_TOKEN || secrets.GITHUB_TOKEN }}"

- uses: shivammathur/setup-php@v2
with:
php-version: 8.1

- uses: "ramsey/composer-install@v2"

- run: vendor/bin/rector --ansi

- uses: EndBug/[email protected]
with:
add: .
message: "[ci-review] Rector Rectify"
author_name: "GitHub Action"
author_email: "[email protected]"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44 changes: 44 additions & 0 deletions .github/workflows/tag-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Tag Version

on:
push:
branches:
- main
- master

jobs:
test:
runs-on: ubuntu-latest

name: Tag New Version
if: "!contains(github.event.head_commit.message, '[release]')"

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}

- name: Set Node.js 19.x
uses: actions/setup-node@v3
with:
node-version: 19.x

# node dependency cache
# this is not required but speeds up the process
- uses: actions/cache@v3
with:
path: ./node_modules
key: node-${{ hashFiles('**/composer.lock') }}
restore-keys: |
node
- name: Install JS deps
uses: borales/actions-yarn@v4
with:
cmd: install

- name: Tag Version
run: ./node_modules/semantic-release/bin/semantic-release.js --no-ci
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
Loading

0 comments on commit 38e1f94

Please sign in to comment.