Skip to content

Commit

Permalink
📦 Initial commit L8
Browse files Browse the repository at this point in the history
  • Loading branch information
allysonsilva committed Apr 13, 2022
0 parents commit a2bf825
Show file tree
Hide file tree
Showing 90 changed files with 5,189 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 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
/codecov.yml export-ignore
/art export-ignore
/images export-ignore
/docs export-ignore
/phpunit.xml.dist export-ignore
/phpstan.neon.dist export-ignore
/tests export-ignore
/CHANGELOG.md export-ignore
/CONTRIBUTING.md export-ignore
/UPGRADING.md export-ignore
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: "🐛 Report a bug"
about: Create a report to help us improve
title: "[BUG]"
labels: ''
assignees: allysonsilva
---

- Package Version: #.#.#
- Laravel Version: #.#.#
- PHP Version: #.#.#

### Describe the bug:

A clear and concise description of what the bug is.

### Steps To Reproduce:

Steps to reproduce the behavior.

### Expected behavior:

A clear and concise description of what you expected to happen.

### Screenshots

If applicable, add screenshots to help explain your problem.

### Additional context

Add any other context about the problem here
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: 🙏 Ask a Question
url: https://github.com/allysonsilva/laravel-multienv/discussions/new?category=q-a
about: Ask the community for help
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: 🚀 Feature Request
about: Suggest an idea for this project
title: "[FEATURE REQUEST]"
labels: ''
assignees: allysonsilva
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
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 discover any security related issues, please email github@allyson.dev instead of using the issue tracker.
66 changes: 66 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Continuous Integration

on:
push:
paths:
- '**.php'
pull_request:
paths:
- '**.php'
schedule:
- cron: '0 0 * * *'

jobs:
tests:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['7.4', '8.0']
laravel: ['^8.0']
stability: [prefer-lowest, prefer-stable]

name: "CI - PHP: ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.stability }}"

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, mysqli, pdo_mysql, soap, intl, gd, exif, iconv, fileinfo
ini-values: error_reporting=E_ALL
tools: composer:v2
coverage: pcov

- name: Setup Problem Matches
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install PHP Dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction --ansi
- name: PHPUnit Testing
run: composer test:unit

- name: Upload Code Coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./tests/reports/clover.xml
flags: tests
name: codecov-umbrella
verbose: true
fail_ci_if_error: false
41 changes: 41 additions & 0 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: PHP CodeSniffer - Coding Standards

on:
push:
paths:
- '**.php'
- 'phpcs.xml.dist'

jobs:

phpcs:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.1', '8.0']
slevomat-coding-standard: [^7.0]
squizlabs-php-codesniffer: [^3.6]

name: "PHPCS | PHP: ${{ matrix.php }}"

steps:

- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none

- name: Install Dependencies
run: |
composer require \
"slevomat/coding-standard:${{ matrix.slevomat-coding-standard }}" \
"squizlabs/php_codesniffer:${{ matrix.squizlabs-php-codesniffer }}" \
--no-interaction --no-update
composer update --prefer-stable --prefer-dist --no-interaction --ansi
- name: Run PHPCS
run: composer test:standard
37 changes: 37 additions & 0 deletions .github/workflows/phpmd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: PHPMD - PHP Mess Detector

on:
push:
paths:
- '**.php'
- 'phpmd.xml.dist'

jobs:

phpmd:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.1', '8.0']
phpmd: [^2.11]

name: "PHPMD | PHP: ${{ matrix.php }}"

steps:

- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none

- name: Install Dependencies
run: |
composer require "phpmd/phpmd:${{ matrix.phpmd }}" --no-interaction --no-update
composer update --prefer-stable --prefer-dist --no-interaction --ansi
- name: Run PHPMD
run: composer test:mess
49 changes: 49 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: PHPStan - Code Static Analysis

on:
push:
paths:
- '**.php'
- 'phpstan.neon.dist'
# pull_request:
# paths:
# - '**.php'
# - 'phpstan.neon.dist'

jobs:

phpstan:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.1', '8.0']
phpstan: [^1.0]
symplify-rules: ['10.1.2']
nunomaduro-larastan: [^1.0]
ergebnis-phpstan-rules: [^1.0]

name: "PHPStan | PHP: ${{ matrix.php }}"

steps:

- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none

- name: Install Dependencies
run: |
composer require \
"phpstan/phpstan:${{ matrix.phpstan }}" \
"nunomaduro/larastan:${{ matrix.nunomaduro-larastan }}" \
"symplify/phpstan-rules:${{ matrix.symplify-rules }}" \
"ergebnis/phpstan-rules:${{ matrix.ergebnis-phpstan-rules }}" \
--no-interaction --no-update
composer update --prefer-stable --prefer-dist --no-interaction --ansi
- name: Run PHPStan
run: ./vendor/bin/phpstan analyse --error-format=github --no-progress --ansi
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/vendor
/report
/logging
/tests/reports
/tests/**/config/envs.php
.env
.phpcs-cache
.phpunit.result.cache
composer.lock
phpstan.neon
phpstan-baseline.neon
phpmd.baseline.xml
ruleset.xml
phpmd.xml
phpcs.xml
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Changelog

All notable changes to `laravel-multienv` will be documented in this file.

## [Unreleased](https://github.com/allysonsilva/laravel-multienv/compare/v1.0.0...1.x)

## [v1.0.0 (2022-04-10)](https://github.com/allysonsilva/laravel-multienv/releases/tag/v1.0.0)

- Initial release
21 changes: 21 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Contributing

Contributions are **welcome**!

We accept contributions via Pull Requests on [Github](https://github.com/allysonsilva/laravel-multienv).

## Pull Requests / Guidelines

- **[PSR-12 Coding Standard.](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-12-extended-coding-style-guide-meta.md)** The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer).

- **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](http://semver.org/). Randomly breaking public APIs is not an option.

- **Create feature branches.** Don't ask us to pull from your main branch.

- **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](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2022 Allyson Silva

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.
Loading

0 comments on commit a2bf825

Please sign in to comment.