From 3a8e4f73b9e1097de38599929466cf9a7de6de1d Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Tue, 7 May 2024 16:23:32 +1200 Subject: [PATCH] MNT Run module-standardiser --- .github/workflows/dispatch-ci.yml | 4 +- .github/workflows/keepalive.yml | 4 +- CONTRIBUTING.md | 91 ------------------------------- composer.json | 4 +- phpstan.neon.dist | 3 + 5 files changed, 10 insertions(+), 96 deletions(-) delete mode 100644 CONTRIBUTING.md create mode 100644 phpstan.neon.dist diff --git a/.github/workflows/dispatch-ci.yml b/.github/workflows/dispatch-ci.yml index 7605238..3bc615b 100644 --- a/.github/workflows/dispatch-ci.yml +++ b/.github/workflows/dispatch-ci.yml @@ -1,9 +1,9 @@ name: Dispatch CI on: - # At 12:00 PM UTC, only on Wednesday and Thursday + # At 5:25 PM UTC, only on Sunday and Monday schedule: - - cron: '0 12 * * 3,4' + - cron: '25 17 * * 0,1' jobs: dispatch-ci: diff --git a/.github/workflows/keepalive.yml b/.github/workflows/keepalive.yml index 11cee4a..cfbd46d 100644 --- a/.github/workflows/keepalive.yml +++ b/.github/workflows/keepalive.yml @@ -1,9 +1,9 @@ name: Keepalive on: - # At 12:00 AM UTC, on day 1 of the month + # At 5:25 PM UTC, on day 22 of the month schedule: - - cron: '0 0 1 * *' + - cron: '25 17 22 * *' workflow_dispatch: jobs: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 15b642a..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,91 +0,0 @@ -# Contributing - -Contributions are welcome! You can help making this module better by explaining -a bug, suggest a change or a new feature. The correct way to do -that is to [create an issue](https://github.com/silverstripe-labs/silverstripe-crontask/issues). - -We accept proposed code changes via [pull requests](https://github.com/silverstripe-labs/silverstripe-crontask/pulls). - -## Tests - -Tests must pass and new functionality should be extended to cover any new lines -of code. See the [SilverStripe Unit and Integration Testing](https://docs.silverstripe.org/en/3.3/developer_guides/testing/) -documentation. - -## Code style - -The code to this module is following the [PSR-2 standard](http://www.php-fig.org/psr/psr-2/) -with the exception of SilverStripe spefic variable naming like `private static -$has_many` etc. We will not merge code that doesn't adhere to the standard. -Every push to a PR will run a code quality check via https://scrutinizer-ci.com/ and the results will -show in the Github PR. - -It's also possible to use the [PHP Coding Standards Fixer](https://github.com/FriendsOfPhp/PHP-CS-Fixer) -to check and fix the code style for you. - -## Commit messages - -Having good commit messages serves multiple purposes: - -- To speed up the reviewing process. -- To help us write a good release note. -- To help the future maintainers of this module finding out why a particular - change was made to the code or why a specific feature was added. - -Structure your commit message like this: - -> Short (50 chars or less) summary of changes -> -> More detailed explanatory text, if necessary. Wrap it to about 72 characters -> or so. In some contexts, the first line is treated as the subject of an email -> and the rest of the text as the body. The blank line separating the summary -> from the body is critical (unless you omit the body entirely); tools like -> rebase can get confused if you run the two together. -> -> Further paragraphs come after blank lines. -> -> * Bullet points are okay, too -> -> * An asterisk is used for the bullet, preceded by a single space, with blank -> lines in between, but conventions vary here -> -> Source [http://git-scm.com/book/ch5-2.html](http://git-scm.com/book/ch5-2.html) - -Write the summary line and description of what you have done in the imperative -mode, that is as if you were commanding someone. Start the line with "`Fix`", -"`Add`", "`Change`" instead of "Fixed", "Added", "Changed". - -Don't end the summary line with a period - it's a title and titles don't end -with a period. - -Always leave the second line blank. - -If you are having trouble expressing the change in a short subject line, you -probably need to make several commits, see below: - -## How to group changes together - -Group related commits into one commit. Try finding a set of changes that -describes a minmal working chnage and commit them as one change. This might be -better descibed with a good and bad example: - -*Bad* - - - change variable name to blah - - add check if user is logged in - - clean up whitespace - - reset users password and send email - -*Good* - - - add possibility for users to reset passwords - -*Bad* - - - fix bug on user password reset and remove old password resets - -*Good* - - - fix bug on user password reset - - remove old reset tokens from database - diff --git a/composer.json b/composer.json index 25a5ba1..90ec304 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,9 @@ }, "require-dev": { "phpunit/phpunit": "^9.6", - "squizlabs/php_codesniffer": "^3" + "squizlabs/php_codesniffer": "^3", + "silverstripe/standards": "^1", + "phpstan/extension-installer": "^1.3" }, "extra": [], "autoload": { diff --git a/phpstan.neon.dist b/phpstan.neon.dist new file mode 100644 index 0000000..beb9de3 --- /dev/null +++ b/phpstan.neon.dist @@ -0,0 +1,3 @@ +parameters: + paths: + - src