Skip to content

Commit

Permalink
v3.0 (#9)
Browse files Browse the repository at this point in the history
* Added PHP 8.1 support
* Added Laravel 9 support
* Dropped PHP 7.4 and Laravel 6 support
  • Loading branch information
Okipa committed May 23, 2022
1 parent a1b76bc commit bfa6866
Show file tree
Hide file tree
Showing 26 changed files with 301 additions and 259 deletions.
3 changes: 0 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
; This file is for unifying the coding style for different editors and IDEs.
; More information at http://editorconfig.org

root = true

[*]
Expand Down
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.scrutinizer.yml export-ignore
/phpcs.xml export-ignore
/phpmd.xml export-ignore
/phpstan.neon.dist export-ignore
Expand Down
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-12 Coding Standard](https://www.php-fig.org/psr/psr-12/)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](https://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](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
@@ -1,2 +1,3 @@
github: Okipa
ko_fi: arthurlorent
custom: https://paypal.me/arthurlorent
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com/okipa/laravel-form-components/discussions/new?category=q-a
about: Ask the community for help
- name: Request a feature
url: https://github.com/okipa/laravel-form-components/discussions/new?category=ideas
about: Share ideas for new features
- name: Report a bug
url: https://github.com/okipa/laravel-form-components/issues/new
about: Report a reproducable bug
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 arthur.lorent@gmail.com instead of using the issue tracker.
27 changes: 14 additions & 13 deletions .github/workflows/main.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ jobs:
strategy:
fail-fast: true
matrix:
php: ['7.4', '8.0']
laravel: ['7.*', '8.*']
php: ['8.1', '8.0']
laravel: ['9.*', '8.*']
include:
- laravel: '7.*'
testbench: '5.*'
- laravel: '9.*'
testbench: '7.*'
larastan: '2.*'
- laravel: '8.*'
testbench: '6.*'
larastan: '1.*'

name: P${{ matrix.php }} - L${{ matrix.laravel }}

Expand Down Expand Up @@ -49,30 +51,29 @@ jobs:
# Lower PHP and laravel versions.

- name: PHPUnit
if: matrix.php != '8.0' || matrix.laravel != '8.*'
run: vendor/bin/phpunit
if: matrix.php != '8.1' || matrix.laravel != '9.*'
run: vendor/bin/testbench package:test --parallel --no-coverage

# Last PHP and laravel versions.

- name: Code analysis
if: matrix.php == '8.0' && matrix.laravel == '8.*'
if: matrix.php == '8.1' && matrix.laravel == '9.*'
run: |
vendor/bin/phpcs
vendor/bin/phpmd config,src text phpmd.xml
vendor/bin/phpmd config,src,tests text phpmd.xml
vendor/bin/phpstan analyse
- name: PHPUnit + Code coverage
if: matrix.php == '8.0' && matrix.laravel == '8.*'
if: matrix.php == '8.1' && matrix.laravel == '9.*'
run: |
mkdir -p build/logs
vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
vendor/bin/testbench package:test --parallel --coverage-text --coverage-clover build/logs/clover.xml
- name: Code coverage upload to Coveralls
if: matrix.php == '8.0' && matrix.laravel == '8.*'
if: matrix.php == '8.1' && matrix.laravel == '9.*'
env:
COVERALLS_RUN_LOCALLY: 1
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
echo ${GITHUB_REF##*/}
composer require php-coveralls/php-coveralls
composer require php-coveralls/php-coveralls --with-all-dependencies
vendor/bin/php-coveralls -v --coverage_clover=build/logs/clover.xml
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ build
composer.lock
vendor
coverage
tests/Support/temp
tests/temp
.phpunit.result.cache
.php-cs-fixer.cache
.phpunit.result.cache
.idea
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [3.0.0](https://github.com/Okipa/laravel-stuck-jobs-notifier/compare/2.1.0...3.0.0)

2022-05-23

* Added PHP 8.1 support
* Added Laravel 9 support
* Dropped PHP 7.4 and Laravel 6 support

## [2.1.0](https://github.com/Okipa/laravel-stuck-jobs-notifier/compare/2.0.0...2.1.0)

2020-11-11
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
![Laravel Stuck Jobs Notifier](/docs/laravel-stuck-jobs-notifier.png)
<p align="center">
<p style="text-align: center;">
<a href="https://github.com/Okipa/laravel-stuck-jobs-notifier/releases" title="Latest Stable Version">
<img src="https://img.shields.io/github/release/Okipa/laravel-stuck-jobs-notifier.svg?style=flat-square" alt="Latest Stable Version">
</a>
Expand Down Expand Up @@ -30,11 +30,13 @@ Found this package helpful? Please consider supporting my work!

| Laravel version | PHP version | Package version |
|---|---|---|
| ^7.0 | ^7.4 | ^2.0 |
| ^6.0 | ^7.4 | ^1.0 |
| ^8.0 &#124; ^9.0 | ^8.0 &#124; ^8.1 | ^3.0 |
| ^7.0 &#124; ^8.0 | ^7.4 &#124; ^8.0 | ^2.0 |
| ^6.0 &#124; ^7.0 | ^7.4 | ^1.0 |

## Upgrade guide

* [From v2 to V3](/docs/upgrade-guides/from-v2-to-v3.md)
* [From v1 to V2](/docs/upgrade-guides/from-v1-to-v2.md)
* [From okipa/failed-jobs-notifier](/docs/upgrade-guides/from-failed-job-notifier.md)

Expand Down
31 changes: 16 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,19 @@
}
],
"require": {
"php": "^7.4||^8.0",
"illuminate/support": "^7.0||^8.0"
"php": "^8.0|^8.1",
"illuminate/contracts": "^8.0|^9.0"
},
"require-dev": {
"nunomaduro/larastan": "^0.6",
"orchestra/testbench": "^5.0||^6.0",
"phpmd/phpmd": "^2.8",
"squizlabs/php_codesniffer": "^3.5",
"laravel-notification-channels/webhook": "^2.0",
"laravel/slack-notification-channel": "^2.0"
"brianium/paratest": "^6.4",
"laravel-notification-channels/webhook": "^2.3",
"laravel/slack-notification-channel": "^2.4",
"nunomaduro/collision": "^5.10|^6.0",
"nunomaduro/larastan": "^1.0|^2.0",
"orchestra/testbench": "^6.0|^7.0",
"phpmd/phpmd": "^2.11",
"roave/security-advisories": "dev-latest",
"squizlabs/php_codesniffer": "^3.6"
},
"autoload": {
"psr-4": {
Expand All @@ -47,13 +50,11 @@
}
},
"scripts": {
"test": [
"vendor/bin/phpcbf",
"vendor/bin/phpcs",
"vendor/bin/phpmd config,src text phpmd.xml",
"vendor/bin/phpstan analyse --memory-limit=-1 --error-format=table",
"vendor/bin/phpunit -d --memory-limit=-1 --testdox --coverage-text"
]
"phpcs": ["vendor/bin/phpcbf", "vendor/bin/phpcs"],
"phpmd": "vendor/bin/phpmd config,src,tests text phpmd.xml",
"phpstan": "vendor/bin/phpstan analyse --memory-limit=2G",
"phpunit" : "vendor/bin/testbench package:test --parallel --no-coverage",
"test": ["@phpcs", "@phpmd", "@phpstan", "@phpunit"]
},
"suggest": {
"guzzlehttp/guzzle": "Required for sending notifications via Slack",
Expand Down
2 changes: 1 addition & 1 deletion docs/upgrade-guides/from-v1-to-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ In the opposite, if you intend to send Slack and/or webhook notifications, insta

## See all changes

See all change with the [comparison tool](https://github.com/Okipa/laravel-table/compare/1.5.0...2.0.0).
See all change with the [comparison tool](https://github.com/Okipa/laravel-stuck-job-notifier/compare/1.5.0...2.0.0).

## Undocumented changes

Expand Down
25 changes: 25 additions & 0 deletions docs/upgrade-guides/from-v2-to-v3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Upgrade from v1 to V2

Follow the steps below to upgrade the package.

## Laravel and PHP supported versions update

This package does now support PHP 8.0, PHP 8.1, Laravel 8 and Laravel 9.

PHP 7.4 and Laravel 7.0 are no longer supported in v3.

## How to upgrade ?

Just bump the version the package to version `^3.0`.

You also may have to bump the package optional dependencies listed in the [installation documentation part](../../README.md#installation) if you have installed them:
* `laravel-notification-channels/webhook` should be upgrade to version `^2.3`
* `laravel/slack-notification-channel` should be upgrade to version `^2.4`

## See all changes

See all change with the [comparison tool](https://github.com/Okipa/laravel-stuck-job-notifier/compare/2.1.0...3.0.0).

## Undocumented changes

If you see any forgotten and undocumented change, please submit a PR to add them to this upgrade guide.
19 changes: 18 additions & 1 deletion phpcs.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
<?xml version="1.0"?>
<ruleset name="PSR12">
<description>PSR-12 validation</description>
<file>./config</file>
<!-- Included directories -->
<file>./config</file>
<file>./src</file>
<file>./tests</file>
<!-- Excluded patterns -->
<exclude-pattern>*/*.js</exclude-pattern>
<exclude-pattern>*/*.css</exclude-pattern>
<exclude-pattern>*/*.xml</exclude-pattern>
<exclude-pattern>*/*.blade.php</exclude-pattern>
<!-- Configuration -->
<arg name="colors"/>
<arg value="p"/>
<!-- Rules -->
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
<exclude-pattern>./tests/*</exclude-pattern>
</rule>
<rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps">
<exclude-pattern>./tests/*</exclude-pattern>
</rule>
<rule ref="Generic.Files.LineLength">
<exclude-pattern>./config/*</exclude-pattern>
<exclude-pattern>./tests/*</exclude-pattern>
</rule>
<rule ref="PSR12"/>
</ruleset>
Loading

0 comments on commit bfa6866

Please sign in to comment.