Skip to content

Commit d9c770e

Browse files
committed
feat: Initial commit
Release-As: 1.0.0
0 parents  commit d9c770e

35 files changed

+1270
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/php
3+
{
4+
"name": "PHP Coding Standard",
5+
6+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
7+
"image": "mcr.microsoft.com/devcontainers/base:debian",
8+
9+
"remoteEnv": {
10+
// https://github.com/devcontainers/features/tree/main/src/docker-outside-of-docker
11+
// Following settings are required for Bind Mounts to work with Docker outside of Docker
12+
"LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}",
13+
"GITHUB_TOKEN": "${localEnv:GITHUB_TOKEN}"
14+
},
15+
16+
// Features to add to the dev container. More info: https://containers.dev/features.
17+
"features": {
18+
"ghcr.io/devcontainers/features/common-utils:2": {
19+
"configureZshAsDefaultShell": true
20+
},
21+
"ghcr.io/devcontainers/features/php:1": {
22+
"version": "8.5"
23+
},
24+
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
25+
"moby": false
26+
},
27+
"ghcr.io/devcontainers/features/github-cli:1": {},
28+
"ghcr.io/devcontainers-extra/features/act:1": {}
29+
},
30+
31+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
32+
// "forwardPorts": [],
33+
34+
// Use 'postCreateCommand' to run commands after the container is created.
35+
"onCreateCommand": "docker pull catthehacker/ubuntu:act-latest",
36+
"postCreateCommand": "composer install",
37+
38+
// Configure tool-specific properties.
39+
"customizations": {
40+
"codespaces": {
41+
"openFiles": ["README.md"]
42+
},
43+
"vscode": {
44+
"extensions": [
45+
"junstyle.php-cs-fixer",
46+
"bierner.markdown-preview-github-styles",
47+
"davidanson.vscode-markdownlint",
48+
"editorconfig.editorconfig",
49+
"github.copilot",
50+
"github.copilot-chat",
51+
"github.vscode-github-actions",
52+
"github.vscode-pull-request-github",
53+
"me-dutour-mathieu.vscode-github-actions",
54+
"redhat.vscode-yaml",
55+
"yzhang.markdown-all-in-one"
56+
],
57+
"settings": {
58+
"editor.formatOnSave": true,
59+
"[php]": {
60+
"editor.tabSize": 4,
61+
"editor.defaultFormatter": "junstyle.php-cs-fixer"
62+
},
63+
"php-cs-fixer.executablePath": "${workspaceFolder}/vendor/bin/php-cs-fixer",
64+
"php-cs-fixer.config": "${workspaceFolder}/.php-cs-fixer.dist.php",
65+
"php-cs-fixer.onsave": true,
66+
"markdown.extension.list.indentationSize": "adaptive",
67+
"markdown.extension.italic.indicator": "_",
68+
"markdown.extension.orderedList.marker": "one"
69+
}
70+
}
71+
}
72+
73+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
74+
// "remoteUser": "root"
75+
}

.editorconfig

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# EditorConfig is awesome
2+
# http://EditorConfig.org
3+
4+
# This file is based on The Common EditorConfig Template project
5+
# https://github.com/Lin-Buo-Ren/the-common-editorconfig-template
6+
# Public Domain
7+
8+
# This is the top-most EditorConfig file
9+
root = true
10+
11+
# Common settings
12+
[*]
13+
# The character set of the file
14+
charset = utf-8
15+
16+
# The end of line(EOL) sequence of the file
17+
end_of_line = lf
18+
19+
# Determine the actual(Space)/visual(Tab) width of one indentation level
20+
indent_size = 2
21+
22+
# Determine the default indentation character sequence
23+
# tab: 1 tab per indentation level
24+
# space: {indent_size} per indentation level
25+
indent_style = space
26+
27+
# Whether to ensure there's always a single end of line sequence at the end of
28+
# the file for compatibility of some utilities
29+
insert_final_newline = true
30+
31+
# Whether to trim out the (unnecessary) trailing whitespace(s) of the line
32+
trim_trailing_whitespace = true
33+
34+
ij_continuation_indent_size = 2
35+
ij_visual_guides = 80, 120, 150
36+
37+
[.git/**]
38+
# Avoid git patch fail to apply due to the stripped unmodified lines that
39+
# contains only spaces, which also matches as "trailing spaces"
40+
trim_trailing_whitespace = false
41+
42+
[*.{markdown,md}]
43+
# Trailing whitespace means manual linebreaks in Markdown thus is not trimmable
44+
trim_trailing_whitespace = false
45+
46+
[{*.php,.php_cs.dist}]
47+
indent_size = 4
48+
tab_width = 4
49+
ij_continuation_indent_size = 4
50+
51+
[{composer.json,.phpunit.result.cache,composer.lock}]
52+
indent_size = 4
53+
tab_width = 4
54+
ij_continuation_indent_size = 4

.gitattributes

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Created by https://www.richie-bendall.ml/gitattributes-generator/
2+
# End of https://www.richie-bendall.ml/gitattributes-generator/
3+
4+
# This is what is relevant for composer installs
5+
.devcontainer export-ignore
6+
.github export-ignore
7+
.editorconfig export-ignore
8+
.gitignore export-ignore
9+
.gitattributes export-ignore
10+
CODEOWNERS export-ignore
11+
*.md export-ignore
12+
*.dist.php export-ignore

.github/FUNDING.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/displaying-a-sponsor-button-in-your-repository
2+
github: D3strukt0r
3+
patreon: d3strukt0r
4+
open_collective: d3strukt0r
5+
buy_me_a_coffee: d3strukt0r
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Bug report 🐛
2+
description: Existing feature does not behave as expected.
3+
labels: [kind/bug, status/to verify]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Before reporting a bug, make sure you are up-to-date and the problem is/was not reported already.
9+
- type: textarea
10+
id: problem-description
11+
attributes:
12+
label: Problem description
13+
description:
14+
Please describe encountered problem and provide the background of it
15+
maybe including contextual information and images.
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: to-reproduce
20+
attributes:
21+
label: To reproduce
22+
description: |
23+
Steps to reproduce the behavior:
24+
25+
1. Go to '...'
26+
2. Click on '....'
27+
3. Scroll down to '....'
28+
4. See error
29+
30+
Please use markdown syntax for each code snippet.
31+
validations:
32+
required: true
33+
- type: input
34+
id: version
35+
attributes:
36+
label: Version
37+
description: Provide the action version in X.Y.Z format
38+
validations:
39+
required: true
40+
- type: checkboxes
41+
id: terms
42+
attributes:
43+
label: Contribution Checks
44+
options:
45+
- label: I have verified if this problem was already reported
46+
required: false
47+
- label:
48+
I am familiar with ["Feature or
49+
bug?"](https://github.com/iwf-web/php-coding-standard/blob/master/.github/feature-or-bug.md)
50+
required: false
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Feature request 🚀
2+
description:
3+
I have a suggestion about a new feature (and may want to implement it)!
4+
labels: [kind/feature request, status/to verify]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Before requesting a new feature, make sure your version is up-to-date.
10+
11+
> [!IMPORTANT]
12+
> For initial ideas it's preferable to use [discussions](https://github.com/iwf-web/php-coding-standard/discussions).
13+
14+
As a maintainers we prefer to have only actionable issues in the backlog, with clear definition of done,
15+
that's why Discussions are the best way to start. When scope of the request is established, then actual issue can be created.
16+
- type: textarea
17+
id: feature-request
18+
attributes:
19+
label: Feature request
20+
description:
21+
Please describe the feature you would like to see implemented.
22+
validations:
23+
required: true
24+
- type: input
25+
id: discussion-reference
26+
attributes:
27+
label: Link to Discussion where feature request was formed
28+
placeholder: https://github.com/iwf-web/php-coding-standard/discussions/<ID>
29+
validations:
30+
required: false
31+
- type: checkboxes
32+
id: terms
33+
attributes:
34+
label: Contribution Checks
35+
options:
36+
- label: I have verified if this feature request was already discussed
37+
required: false
38+
- label:
39+
I am familiar with ["Feature or
40+
bug?"](https://github.com/iwf-web/php-coding-standard/blob/master/.github/feature-or-bug.md)
41+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Community Support
4+
url: https://github.com/iwf-web/php-coding-standard/discussions
5+
about: Please ask and answer questions here.

.github/PULL_REQUEST_TEMPLATE/default.md

Whitespace-only changes.

.github/dependabot.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
# Note: unique combination of 'package-ecosystem', 'directory', and 'target-branch'
7+
8+
version: 2
9+
updates:
10+
- package-ecosystem: github-actions
11+
directory: /
12+
labels:
13+
- "dependabot :robot:"
14+
schedule:
15+
interval: weekly # on monday
16+
time: '09:30'
17+
timezone: Europe/Zurich
18+
19+
- package-ecosystem: devcontainers
20+
directory: /
21+
labels:
22+
- "dependabot :robot:"
23+
schedule:
24+
interval: weekly
25+
time: '09:30'
26+
timezone: Europe/Zurich
27+
28+
- package-ecosystem: composer
29+
directory: /
30+
labels:
31+
- "dependabot :robot:"
32+
schedule:
33+
interval: weekly
34+
time: '09:30'
35+
timezone: Europe/Zurich

.github/feature-or-bug.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Is it a feature or a bug ?
2+
3+
Sometimes it's a bit tricky to define if given change proposal or change request
4+
is adding new feature or fixing existing issue. This document is providing more
5+
clarity about categorisation we use.
6+
7+
## Bug
8+
9+
Example of bugs:
10+
11+
- crash during application or rule execution
12+
- wrong changes are applied during "fixing codebase" process
13+
- issue with generated report
14+
15+
## Feature
16+
17+
Example of features:
18+
19+
- introduction of new rule
20+
- enhancement of existing rule to cover more cases (for example adding support
21+
for newly introduced PHP syntax)
22+
- introduction of new ruleset
23+
- update of existing ruleset (for example adjusting it to match newest style of
24+
given community or adding newly implemented rule that was supposed to be
25+
followed by style of given community, yet not implemented as a rule before)

0 commit comments

Comments
 (0)