Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New pipeline #1070

Open
wants to merge 3 commits into
base: 2.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Contributing

First of all, **thank you** for contributing.

Bugs or feature requests can be posted online on the GitHub issues section of the project.

Few rules to ease code reviews and merges:

- You MUST follow the [PSR-12](http://www.php-fig.org/psr/psr-12/) coding standards.
- You MUST run the test suite.
- You MUST write (or update) unit tests when bugs are fixed or features are added.
- You SHOULD write documentation.

We use [Git-Flow](http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/) to automate our git branching
workflow.

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`
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/1_Bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +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."
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/2_Feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +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.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/3_Documentation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +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
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Support Question
url: https://to-be-defined.local
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 contact us for quoting
17 changes: 17 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
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

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

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. SECURITY.md
-->
21 changes: 16 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
version: 2

updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: github-actions
directory: /
- 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
interval: "monthly"
open-pull-requests-limit: 20
labels: [ "dependencies" ]
8 changes: 8 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
daysUntilStale: 30
daysUntilClose: 7
staleLabel: wontfix
markComment: >
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
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: "CI Tests"

on:
pull_request:
pull_request: null
push:
branches:
- "*.x"

jobs:
tests:
Expand Down Expand Up @@ -80,4 +82,4 @@ jobs:
SYMFONY_REQUIRE: "${{ matrix.symfony }}"

- name: "Run PHPUnit Tests"
run: "composer test"
run: make tests
4 changes: 2 additions & 2 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:

- name: CONDING STANDARDS (ECS)
run: |
vendor/bin/ecs check
make cs

- name: CONDING STANDARDS (RECTOR)
run: |
vendor/bin/rector process --ansi --dry-run --xdebug
make rector
17 changes: 17 additions & 0 deletions .github/workflows/merge-me.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Merge me!

on:
check_suite:
types:
- completed

jobs:
merge-me:
name: Merge me!
runs-on: ubuntu-latest
steps:
- name: Merge me!
uses: ridedott/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MERGE_METHOD: MERGE
72 changes: 72 additions & 0 deletions .github/workflows/release-on-milestone-closed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

name: "Automatic Releases"

on:
milestone:
types:
- "closed"

jobs:
release:
name: "GIT tag, release & create merge-up PR"
runs-on: ubuntu-latest

steps:
- name: "Checkout"
uses: "actions/checkout@v3"

- name: "Release"
uses: "laminas/[email protected]"
with:
command-name: "laminas:automatic-releases:release"
env:
"SHELL_VERBOSITY": "3"
"GITHUB_TOKEN": ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

- name: "Create Merge-Up Pull Request"
uses: "laminas/[email protected]"
with:
command-name: "laminas:automatic-releases:create-merge-up-pull-request"
env:
"SHELL_VERBOSITY": "3"
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

- name: "Create and/or Switch to new Release Branch"
uses: "laminas/[email protected]"
with:
command-name: "laminas:automatic-releases:switch-default-branch-to-next-minor"
env:
"SHELL_VERBOSITY": "3"
"GITHUB_TOKEN": ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

- name: "Bump Changelog Version On Originating Release Branch"
uses: "laminas/[email protected]"
with:
command-name: "laminas:automatic-releases:bump-changelog"
env:
"SHELL_VERBOSITY": "3"
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

- name: "Create new milestones"
uses: "laminas/[email protected]"
with:
command-name: "laminas:automatic-releases:create-milestones"
env:
"SHELL_VERBOSITY": "3"
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.PHONY: tests
tests: vendor ## Run all tests
vendor/bin/simple-phpunit
ENCODER=lcobucci vendor/bin/simple-phpunit
ENCODER=lcobucci ALGORITHM=HS256 vendor/bin/simple-phpunit
ENCODER=user_id_claim vendor/bin/simple-phpunit
PROVIDER=lexik_jwt vendor/bin/simple-phpunit

.PHONY: cs
ci-cs: vendor ## Check all files using defined ECS rules (for CI/CD only)
XDEBUG_MODE=off vendor/bin/ecs check

.PHONY: rector
rector: vendor ## Check all files using Rector
XDEBUG_MODE=off vendor/bin/rector process --ansi --dry-run --xdebug

vendor: composer.json
composer validate
composer install

.DEFAULT_GOAL := help
help:
@grep -E '(^[a-zA-Z_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
.PHONY: help