Skip to content

Commit 5b51d7c

Browse files
authored
Merge pull request #2 from devsrv/dev
Laravel 9 & php8.1
2 parents 820baab + 0fd3630 commit 5b51d7c

File tree

12 files changed

+152
-31
lines changed

12 files changed

+152
-31
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
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

.gitattributes

Lines changed: 19 additions & 0 deletions
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

.github/CONTRIBUTING.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Contributing
2+
3+
Contributions are **welcome** and will be fully **credited**.
4+
5+
Please read and understand the contribution guide before creating an issue or pull request.
6+
7+
## Etiquette
8+
9+
This project is open source, and as such, the maintainers give their free time to build and maintain the source code
10+
held within. They make the code freely available in the hope that it will be of use to other developers. It would be
11+
extremely unfair for them to suffer abuse or anger for their hard work.
12+
13+
Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the
14+
world that developers are civilized and selfless people.
15+
16+
It's the duty of the maintainer to ensure that all submissions to the project are of sufficient
17+
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.
18+
19+
## Viability
20+
21+
When requesting or submitting new features, first consider whether it might be useful to others. Open
22+
source projects are used by many developers, who may have entirely different needs to your own. Think about
23+
whether or not your feature is likely to be used by other users of the project.
24+
25+
## Procedure
26+
27+
Before filing an issue:
28+
29+
- Attempt to replicate the problem, to ensure that it wasn't a coincidental incident.
30+
- Check to make sure your feature suggestion isn't already present within the project.
31+
- Check the pull requests tab to ensure that the bug doesn't have a fix in progress.
32+
- Check the pull requests tab to ensure that the feature isn't already in progress.
33+
34+
Before submitting a pull request:
35+
36+
- Check the codebase to ensure that your feature doesn't already exist.
37+
- Check the pull requests to ensure that another person hasn't already submitted the feature or fix.
38+
39+
## Requirements
40+
41+
If the project maintainer has any additional requirements, you will find them listed here.
42+
43+
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](https://pear.php.net/package/PHP_CodeSniffer).
44+
45+
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
46+
47+
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
48+
49+
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option.
50+
51+
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
52+
53+
- **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.
54+
55+
**Happy coding**!

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 14 additions & 0 deletions
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/devsrv/laravel-scheduled-model-action/discussions/new?category=q-a
5+
about: Ask the community for help
6+
- name: Request a feature
7+
url: https://github.com/devsrv/laravel-scheduled-model-action/discussions/new?category=ideas
8+
about: Share ideas for new features
9+
- name: Report a security issue
10+
url: https://github.com/devsrv/laravel-scheduled-model-action/security/policy
11+
about: Learn how to notify us for sensitive bugs
12+
- name: Report a bug
13+
url: https://github.com/devsrv/laravel-scheduled-model-action/issues/new
14+
about: Report a reproducable bug

.github/SECURITY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Security Policy
2+
3+
If you discover any security related issues, please email hello@itsrav.dev instead of using the issue tracker.

.github/workflows/test.yaml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,33 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
php: [8.0, 7.4]
16-
laravel: [8.*]
17-
os: [ubuntu-latest]
15+
php: [8.1, 8.0]
16+
laravel: [9.*, 8.*]
17+
os: [ubuntu-latest, windows-latest]
18+
stability: [prefer-lowest, prefer-stable]
1819
include:
20+
- laravel: 9.*
21+
testbench: 7.*
1922
- laravel: 8.*
2023
testbench: 6.*
21-
enum: 3.*
2224

23-
name: PHP ${{ matrix.php }} with Laravel ${{ matrix.laravel }} - ${{ matrix.os }}
25+
name: PHP ${{ matrix.php }} with Laravel ${{ matrix.laravel }} -${{ matrix.stability }} - ${{ matrix.os }}
2426

2527
steps:
2628
- name: Checkout code
2729
uses: actions/checkout@v2
2830

2931
- name: Setup PHP
30-
uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
32+
uses: shivammathur/setup-php@v2
3133
with:
3234
php-version: ${{ matrix.php }}
3335
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, fileinfo
3436
coverage: none
3537

3638
- name: Install dependencies
3739
run: |
38-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "bensampo/laravel-enum:${{ matrix.enum }}" --no-interaction --no-update
39-
composer update --prefer-dist --no-interaction --no-suggest
40+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
41+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-suggest
4042
4143
- name: Execute pest tests
4244
run: vendor/bin/pest

.gitignore

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
/.idea
2-
/vendor
3-
/node_modules
4-
package-lock.json
5-
composer.phar
6-
composer.lock
1+
.idea
2+
.php_cs
3+
.php_cs.cache
74
.phpunit.result.cache
8-
.DS_Store
9-
Thumbs.db
5+
build
6+
composer.lock
7+
coverage
8+
docs
9+
phpunit.xml
10+
phpstan.neon
11+
testbench.yaml
12+
vendor
13+
node_modules
14+
.php-cs-fixer.cache

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## v3.0.0 - 2022-24-02
2+
3+
### removed
4+
- php 7 and php < 8.1 no longer supported minimum php requirement is 8.1
5+
### added
6+
- Laravel 9 support
7+
18
## v2.0.0 - 2021-12-05
29

310
### BREAKING CHANGES INTRODUCTED

composer.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^7.4|^8.0",
20-
"illuminate/config": "^7.0|^8.0",
21-
"illuminate/database": "^7.0|^8.0",
22-
"illuminate/support": "^7.0|^8.0",
23-
"bensampo/laravel-enum": "^3.4"
19+
"php": "^8.1",
20+
"illuminate/database": "^7.0|^8.0|^9.0",
21+
"illuminate/support": "^7.0|^8.0|^9.0",
22+
"nesbot/carbon": "^2.0"
2423
},
2524
"require-dev": {
26-
"orchestra/testbench": "^6.23",
25+
"orchestra/testbench": "^6.0|^7.0",
2726
"pestphp/pest": "^1.21"
2827
},
2928
"autoload": {

database/migrations/create_actions_table.php.stub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class CreateActionsTable extends Migration
1919
$table->morphs('actionable');
2020
$table->string('action', 20);
2121
$table->json('properties')->nullable();
22-
$table->enum('status', Status::getValues())->default(Status::PENDING); //TODO swap to native implementation
22+
$table->enum('status', Status::getValues())->default(Status::PENDING->value); //TODO swap to native implementation
2323
$table->date('act_date');
2424
$table->time('act_time');
2525
$table->timestamp('finished_at')->nullable();

0 commit comments

Comments
 (0)