Skip to content

Commit

Permalink
New pipeline + ECS + Rector (#167)
Browse files Browse the repository at this point in the history
* New pipeline + ECS + Rector
* parallel-lint
* CI/CD fixes
* Deptrac
* Exported files
* Error fixed
  • Loading branch information
Spomky authored Nov 11, 2022
1 parent 9170b8e commit 63e4610
Show file tree
Hide file tree
Showing 32 changed files with 642 additions and 336 deletions.
29 changes: 29 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# https://EditorConfig.org

root = true

[*]
indent_style = space
# Reduce tab size on GitHub
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
block_comment_start = /*
block_comment = *
block_comment_end = */

[{*.yml,*.yaml}]
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[Makefile]
indent_style = tab

# Generated file
[infection.txt]
indent_size = unset
trim_trailing_whitespace = unset
4 changes: 2 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
/.github export-ignore
/doc export-ignore
/tests export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/CODE_OF_CONDUCT.md export-ignore
/deptrac.yaml export-ignore
/ecs.php export-ignore
/infection.json.dist export-ignore
/Makefile export-ignore
/phpstan.neon export-ignore
/phpunit.xml.dist export-ignore
/README.md export-ignore
/rector.php export-ignore
/SECURITY.md export-ignore
13 changes: 7 additions & 6 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@ Few rules to ease code reviews and merges:
- You MUST write (or update) unit tests when bugs are fixed or features are added.
- You SHOULD write documentation.

To contribute use [Pull Requests](https://help.github.com/articles/using-pull-requests), please, write commit messages that make sense, and rebase your branch before submitting your PR.
We use [Git-Flow](http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/) to automate our git branching
workflow.

May be asked to squash your commits too. This is used to "clean" your Pull Request before merging it, avoiding commits such as fix tests, fix 2, fix 3, etc.
To contribute use [Pull Requests](https://help.github.com/articles/using-pull-requests), please, write commit messages
that make sense, and rebase your branch before submitting your PR.

May be asked to squash your commits too. This is used to "clean" your Pull Request before merging it, avoiding commits
such as fix tests, fix 2, fix 3, etc.

Run test suite
------------

* install composer: `curl -s http://getcomposer.org/installer | php`
* install dependencies: `php composer.phar install`
* run tests: `vendor/bin/phpunit`
* check and fix coding standards:
* `vendor/bin/phpstan analyse`
* `vendor/bin/rector process`
* `vendor/bin/ecs check --fix`
77 changes: 38 additions & 39 deletions .github/ISSUE_TEMPLATE/1_Bug_report.yaml
Original file line number Diff line number Diff line change
@@ -1,43 +1,42 @@
name: 🐛 Bug Report
description: ⚠️ NEVER report security issues, email security AT spomky-labs.com instead
labels: Bug

body:
- type: input
id: affected-versions
attributes:
label: Version(s) affected
placeholder: x.y.z
validations:
required: true
- type: textarea
id: description
attributes:
label: Description
description: A clear and concise description of the problem
validations:
required: true
- type: textarea
id: how-to-reproduce
attributes:
label: How to reproduce
description: |
⚠️ This is the most important part of the report ⚠️
Without a way to easily reproduce your issue, there is little chance we will be able to help you and work on a fix.
Please, take the time to show us some code and/or config that is needed for others to reproduce the problem easily.
Most of the time, creating a "bug reproducer" is the best way to help us and increases the chances someone
will have a look at it.
validations:
required: true
- type: textarea
id: possible-solution
attributes:
label: Possible Solution
description: |
Optional: only if you have suggestions on a fix/reason for the bug
Don't hesitate to create a pull request with your solution, it helps get faster feedback.
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: "Optional: any other context about the problem: log messages, screenshots, etc."
- type: input
id: affected-versions
attributes:
label: Version(s) affected
placeholder: x.y.z
validations:
required: true
- type: textarea
id: description
attributes:
label: Description
description: A clear and concise description of the problem
validations:
required: true
- type: textarea
id: how-to-reproduce
attributes:
label: How to reproduce
description: |
⚠️ This is the most important part of the report ⚠️
Without a way to easily reproduce your issue, there is little chance we will be able to help you and work on a fix.
Please, take the time to show us some code and/or config that is needed for others to reproduce the problem easily.
Most of the time, creating a "bug reproducer" is the best way to help us and increases the chances someone
will have a look at it.
validations:
required: true
- type: textarea
id: possible-solution
attributes:
label: Possible Solution
description: |
Optional: only if you have suggestions on a fix/reason for the bug
Don't hesitate to create a pull request with your solution, it helps get faster feedback.
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: "Optional: any other context about the problem: log messages, screenshots, etc."
28 changes: 14 additions & 14 deletions .github/ISSUE_TEMPLATE/2_Feature_request.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: 🚀 Feature Request
description: RFC and ideas for new features and improvements
body:
- type: textarea
id: description
attributes:
label: Description
description: A clear and concise description of the new feature
validations:
required: true
- type: textarea
id: example
attributes:
label: Example
description: |
A simple example of the new feature in action (include PHP code, YAML config, etc.)
If the new feature changes an existing feature, include a simple before/after comparison.
- type: textarea
id: description
attributes:
label: Description
description: A clear and concise description of the new feature
validations:
required: true
- type: textarea
id: example
attributes:
label: Example
description: |
A simple example of the new feature in action (include PHP code, YAML config, etc.)
If the new feature changes an existing feature, include a simple before/after comparison.
14 changes: 7 additions & 7 deletions .github/ISSUE_TEMPLATE/3_Documentation.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: 📖 Documentation Issue
description: To report typo or obsolete section in the documentation
body:
- type: textarea
id: description
attributes:
label: Description
description: A clear and concise description of the error you found in the documentation
validations:
required: true
- type: textarea
id: description
attributes:
label: Description
description: A clear and concise description of the error you found in the documentation
validations:
required: true
9 changes: 6 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Support Question
url: https://spomky-labs.com/contact/
about: We use GitHub issues only to discuss about bugs and new features. For this kind of questions about using the library, please use Stackoverflow (or similar) or send a quote request at https://spomky-labs.com/contact/
- name: Support Question
url: https://spomky-labs.com/contact/
about:|
We use GitHub issues only to discuss about bugs and new features.
For this kind of questions about using the framework or third-party bundles,
please email us contact AT spomky-labs.com for quoting
32 changes: 15 additions & 17 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
| Q | A
| ------------- | ---
| Branch? | <!-- see below -->
| Bug fix? | yes/no
| New feature? | yes/no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | yes/no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
Target branch:
Resolves issue # <!-- #-prefixed issue number(s), if any -->

<!-- replace space with "x" in square brackets: [x] -->
- [ ] It is a Bug fix
- [ ] It is a New feature
- [ ] Breaks BC
- [ ] Includes Deprecations

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.
Fill in this template according to the PR you're about to submit.
Replace this comment by a description of what your PR is solving.
Additionally:
- Always add tests and ensure they pass.
- Never break backward compatibility (unless you are working on the next major release branch).
- Bug fixes must be submitted against the lowest maintained branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too.)
- Features and deprecations must be submitted against the last major branch (e.g. 1.x).
-->
Please consider the following requirement:
* Modification of existing tests should be avoided unless deemed necessary.
* You MUST never open a PR related to a security issue. Contact Spomky in private at https://gitter.im/Spomky/
-->
23 changes: 17 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
version: 2
updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: daily
time: "11:00"
open-pull-requests-limit: 10
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "weekly"
day: "friday"
versioning-strategy: "widen"
open-pull-requests-limit: 20
allow:
- dependency-type: all
labels: [ "Dependencies" ]

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
open-pull-requests-limit: 20
labels: [ "Dependencies" ]
8 changes: 4 additions & 4 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
daysUntilStale: 60
daysUntilStale: 30
daysUntilClose: 7
staleLabel: wontfix
markComment: >
Ce problème a été automatiquement marqué comme périmé car il n'a pas eu
d’activité récente. Il sera fermé dans 7 jours si aucune autre activité ne se produit. Merci
pour votre contribution.
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
closeComment: false
32 changes: 0 additions & 32 deletions .github/workflows/coding-standards.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/gitsplit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: gitsplit
on:
push:
tags:
- '*'
release:
types: [ published ]

jobs:
gitsplit:
runs-on: ubuntu-latest
steps:
- name: checkout
run: git clone https://github.com/web-auth/webauthn-framework /home/runner/work/web-auth/webauthn-framework && cd /home/runner/work/web-auth/webauthn-framework
- name: Split repositories
run: docker run --rm -t -e GH_TOKEN -v /cache/gitsplit:/cache/gitsplit -v /home/runner/work/web-auth/webauthn-framework:/srv jderusse/gitsplit gitsplit
env:
GH_TOKEN: ${{ secrets.GITSPLIT_TOKEN }}
Loading

0 comments on commit 63e4610

Please sign in to comment.