Skip to content

Commit 242eedd

Browse files
authored
Redesign contributing workflow (#1673)
* Update Contributing Guidelines * Removed description section from PR template * Updated contributing guidelines
1 parent b34e692 commit 242eedd

9 files changed

Lines changed: 465 additions & 92 deletions

File tree

.github/CODEOWNERS

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,16 @@
1-
* @norberttech
1+
# [Core Contributors]
2+
#
3+
# People below are responsible for the entire project.
4+
# Those people can be considered project owners, they are responsible for managing the roadmap, preparing releases,
5+
# handling security issue, answering questions, fixing bugs but also working on new features.
6+
* @norberttech
7+
8+
# [Mantainers]
9+
#
10+
# People below are responsible for project maintenance.
11+
12+
# [Adapter Maintainers]
13+
#
14+
# People Below are responsible for specific adapters, they should keep adapters up to date, they should be the first
15+
# to review reported incidents and provide guidance. Whenever bigger architectural changes are proposed, Adapter Maintainers
16+
# should make sure that the adapters their are responsible for are going to be aligned with those changes.

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: "🐛Bug Report"
2+
description: "File a bug report. Bug report can be anything, from poor UX, through incorrect behavior to performance degradation."
3+
title: "[Bug]: "
4+
labels: ["triage"]
5+
projects: ["flow-php/projects/1"]
6+
assignees: [norberttech]
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
**Thanks for taking the time to fill out this bug report!**
12+
- type: markdown
13+
id: what-happened
14+
attributes:
15+
label: What happened?
16+
description: Also tell us, what did you expect to happen?
17+
placeholder: Tell us what you see!
18+
validations:
19+
required: true
20+
- type: textarea
21+
id: how-to-reproduce
22+
attributes:
23+
label: How to reproduce?
24+
description: Please provide a code required to reproduce given issue. This will be automatically formatted into a php code, so no need for backticks.
25+
render: php
26+
validations:
27+
required: true
28+
- type: markdown
29+
id: data
30+
attributes:
31+
label: Data required to reproduce bug locally
32+
description: |
33+
If given bug requires more data to reproduce, please provide it here in a convinient format.
34+
- php array
35+
- csv
36+
- json
37+
- any other format if bug is format specific
38+
validations:
39+
required: false
40+
- type: input
41+
id: version
42+
attributes:
43+
label: Version
44+
description: What version of Flow are you using?
45+
placeholder: "0.17.*"
46+
validations:
47+
required: true
48+
- type: textarea
49+
id: output
50+
attributes:
51+
label: Relevant error output
52+
description: Please copy and paste any relevant error output. This will be automatically formatted into code, so no need for backticks.
53+
render: shell
54+
- type: checkboxes
55+
id: terms
56+
attributes:
57+
label: Code of Conduct
58+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://example.com).
59+
options:
60+
- label: I agree to follow this project's Code of Conduct
61+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Discord Community Support
4+
url: https://discord.gg/5dNXfQyACW
5+
about: The fastest way to get answer to your questions
6+
- name: Project Documentation
7+
url: https://flow-php.com/documentation/
8+
about: Project Documentation
9+
- name: Project Roadmap
10+
url: https://github.com/orgs/flow-php/projects/1
11+
about: Project Roadmap - please check if given issue is not already there
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: "💡Proposal"
2+
title: "[Proposal]: "
3+
description: "Suggest a new feature or improvement for Flow PHP Framework"
4+
labels: ["proposal"]
5+
assignees: ["norberttech"]
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
**Thanks for taking the time to post this idea!**
11+
Please fill in the details below to help us understand it.
12+
Ideas evaluated based on their impact and feasibility.
13+
14+
- type: textarea
15+
id: proposal-description
16+
attributes:
17+
label: "Describe the Proposal"
18+
description: "What problem does this feature solve? How would it improve Project?"
19+
validations:
20+
required: true
21+
22+
- type: textarea
23+
id: api-adjustements
24+
attributes:
25+
label: API Adjustments
26+
description: |
27+
Please provide a high level API required by this proposal. Usually it should be enough to describe:
28+
- DataFrame class API changes (methods)
29+
- DSL functions
30+
validations:
31+
required: true
32+
33+
- type: dropdown
34+
id: author
35+
attributes:
36+
label: |
37+
Are you intenting to also work on proposed change?
38+
It's perfectly fine to just propose changes and wait for others to pick them up.
39+
multiple: false
40+
options:
41+
- Yes
42+
- No
43+
- Maybe
44+
45+
- type: dropdown
46+
id: sponsor
47+
attributes:
48+
label: |
49+
Are you interested in sponsoring this change? If you can't find time to work on given proposal but it's
50+
time sensitive, it might be a good idea to consider sponsoring this change. Please find more details at https://flow-php.com/sponsor/
51+
52+
multiple: false
53+
options:
54+
- Yes
55+
- No
56+
- Maybe
57+
58+
- type: textarea
59+
id: integration
60+
attributes:
61+
label: "Integration & Dependencies"
62+
description: |
63+
If proposal requires integration with third party software/library please provide as much data as possible.
64+
- Link to GitHub Project / Packagist
65+
- License
66+
- Dependencies that this integration would bring to Flow
67+
validations:
68+
required: false

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1+
<!--
2+
Please replace #xxx with a GitHub issue id from flow-php/flow repository. For example #1234
3+
If there is no item in a roadmap related to this PR, please check our contributing guidelines first.
4+
-->
5+
Resolves: #xxx
6+
17
<!--
28
Below section will be used to automatically generate changelog, please do not modify HTML code structure
39
DO NOT REMOVE that HTML STRUCTURE, INSTEAD ADD YOUR CHANGES INSIDE THE LISTS
410
PULL REQUESTS WITHOUT CHANGELOG CAN'T BE MERGED
511
-->
612
<h2>Change Log</h2>
13+
<hr />
714
<div id="change-log">
815
<h4>Added</h4>
916
<ul id="added">
@@ -29,9 +36,4 @@
2936
<ul id="security">
3037
<!-- <li>Something that was a security issue, is not an issue anymore</li> -->
3138
</ul>
32-
</div>
33-
<hr/>
34-
35-
<h2>Description</h2>
36-
37-
<!-- Please provide a short description of changes in this section, feel free to use markdown syntax -->
39+
</div>

documentation/components/libs/types/architecture.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ internally creates a new instance of `\Flow\Types\Type\TypeDetector` and calls i
6464
method.
6565

6666
The DSL definition can thus be considered the library's API, located in the
67-
file [functions.php](src/lib/types/src/Flow/Types/DSL/functions.php).
67+
file [functions.php](/src/lib/types/src/Flow/Types/DSL/functions.php).
6868

6969
One of the library's key principles is tight integration with static code analysis tools. This is achieved through
7070
proper use of template mechanisms and type narrowing, `@template` and `@phpstan-assert`.
@@ -80,7 +80,7 @@ Therefore, it is critical that all classes and functions in this library are pro
8080
## Testing
8181

8282
This library provides a set of unit tests that verify the correct operation of all types and DSL functions.
83-
All tests are located in the directory [`Flow/Types/Tests/Unit`](src/lib/types/tests/Flow/Types/Tests/Unit).
83+
All tests are located in the directory [`Flow/Types/Tests/Unit`](/src/lib/types/tests/Flow/Types/Tests/Unit).
8484

8585
Below is an example template that can be used to create cover a type with unit tests:
8686

documentation/contributing.md

Lines changed: 57 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,85 @@
11
# Contributing
22

3-
To run tests locally, please make sure you have [docker](https://www.docker.com/) up and running.
4-
You also need [PHP 8.2](https://www.php.net/) and [composer](https://getcomposer.org/) to be available from your CLI.
5-
Even though we are supporting 3 PHP versions at the time, we are using the lowest supported one for development, currently it's PHP 8.2.
3+
Below graph explains the process of contributing to Flow.
64

7-
## Before you change anything
5+
```mermaid
6+
flowchart TD
7+
subgraph "How to contribute"
88
9-
Please make sure that you are aware of our [Architecture Decision Records](/documentation/adrs.md).
10-
It's mandatory to follow all of them without any exceptions unless explicitly overridden by a new ADR.
11-
12-
## Prepare Project:
13-
14-
**HEADS UP** - instead of using php installed on your host machine, consider using Nix Shell.
15-
You can find detailed instructions how to use Nix in the [Nix Development Environment](/documentation/contributing/nix.md) section.
16-
17-
```shell
18-
cp compose.yml.dist compose.yml
19-
composer install
20-
docker compose up -d
21-
```
22-
23-
For the code coverage, please install [pcov](https://pecl.php.net/package/pcov).
24-
25-
Pcov extension is not mandatory, and tests are going to pass without it; however, you won't be able to run mutation tests.
26-
27-
## Run Test Suite
28-
29-
```shell
30-
composer test
31-
```
32-
33-
Above command will run all tests, including those that require custom extensions.
34-
In case you want to run tests only for a specific part of the project, you can use:
9+
is-a-bug[Did you found a bug?]
10+
is-a-bug -->|Yes| can-you-fix-it[Can you fix it?]
11+
is-a-bug -->|NO| is-a-question[Do you have a question?]
12+
can-you-fix-it -->|NO| report[Please open a new **Bug Report**]
13+
can-you-fix-it -->|YES| bug-fix[Please open a pull request with with a fixh]
3514
3615
37-
```shell
38-
composer test:core
39-
composer test:lib:doctrine-dbal-bulk
40-
composer test:lib:parquet
41-
composer test:adapter:csv
42-
composer test:bridge:symfony-http-foundation
43-
```
44-
45-
## Run Static Analyze
16+
is-a-question -->|YES| go-to-discord[Ask a **Community Question**]
17+
is-a-question -->|NO| is-a-proposal[Do you want to propose new feature or a change?]
4618
47-
```shell
48-
composer static:analyze
49-
```
19+
is-a-proposal -->|NO| looking-for-tasks[Are you looking for tasks?]
5020
51-
**Important** static analyze **MUST** be executed at the lowest supported PHP version
52-
and with dependencies locked by `composer.lock`.
53-
Please make sure to use PHP 8.2 and that you used the `composer install` command first.
21+
looking-for-tasks -->|YES| check-roadmap[Please check our Roadmap, there is always something to work on]
5422
55-
## Fixing Coding Standards
23+
is-a-proposal -->|YES| open-a-proposal[Open a **Proposal**]
5624
57-
Before committing your code, please make sure that your code is following our coding standards.
25+
open-a-proposal --> wait-for-proposal-review["Give us time to review your proposal. We should get back to you in the first 24h (usually much faster)"]
5826
59-
```shell
60-
composer cs:php:fix
61-
```
27+
wait-for-proposal-review --> is-proposal-approved[Was your proposal approved by core contributors?]
6228
63-
This command will automatically fix all coding standards issues in your code.
64-
If you want to first check what needs to be fixed, you can use:
29+
is-proposal-approved -->|YES| can-you-implement-it[Can you implement it?]
30+
is-proposal-approved -->|NO| proposal-rejected[Consider implementing that proposal through existing extension points or **Fork this Project**]
6531
32+
can-you-implement-it -->|YES| submit-a-pr[Open a **Pull Request**]
33+
can-you-implement-it -->|No| can-you-sponsor[Can you sponsor that proposal?]
6634
67-
```shell
68-
composer static:analyze:cs-fixer
69-
composer static:analyze:rector
35+
can-you-sponsor -->|YES| sponsor-proposal[Awesome! Please mention that in the proposal description.]
36+
can-you-sponsor -->|NO| wait-for-others[No worries, you will need to wait for someone to implement this one for you.]
37+
end
7038
```
7139

72-
## Test everything
73-
74-
This command will execute exactly the same tests as we run at GitHub Actions before a PR can get merged.
75-
If it passes locally, you are good to open a pull request.
40+
## How to?
7641

77-
```shell
78-
composer build
79-
```
42+
- [Submit a Bug Report](https://github.com/flow-php/flow/issues/new?template=bug)
43+
- [Submit a Proposal](https://github.com/flow-php/flow/issues/new?template=proposal)
44+
- Ask Community Question
45+
- [At Flow Discord Server](https://discord.gg/5dNXfQyACW)
46+
- [At GitHub Discussions](https://github.com/flow-php/flow-php.com/discussions/categories/questions)
47+
- [Sponsor Project of Proposal](http://flow-php.com/sponsor/)
48+
- [Project Roadmap](https://github.com/orgs/flow-php/projects/1)
8049

81-
## Building Documentation
50+
## Project Roadmap
8251

83-
Since documentation for DSL and our entire API is automatically generated, you can build it by running:
52+
> [!IMPORTANT]
53+
> Flow PHP is managed through [GitHub Projects](https://github.com/orgs/flow-php/projects/1).
54+
> All code changes **MUST** first be added to the [Roadmap](https://github.com/orgs/flow-php/projects/1).
55+
>
56+
> Pull requests without an item in Roadmap might take significantly longer time to review or even get rejected due to missalignment
57+
> with project architecture or future plans. In order to save time of contributors & maintainers, we would like to review
58+
> the proposal before anyone starts to code.
59+
>
60+
> The only exception from that rule are Bug Fixes - those can be opened without opening a proposal first.
61+
> However it's still recommened to reach out as sometimes bugs might not be solvable imidiatelly or at all.
8462
85-
```shell
86-
composer build:docs
87-
composer build:docs:api
88-
```
63+
If the idea you are planning to work on is not yet in the [Roadmap](https://github.com/orgs/flow-php/projects/1)
64+
please create a new [Proposal Issue](https://github.com/flow-php/flow/issues/new?template=PROPOSAL) and wait for further guidance.
8965

90-
`composer build:docs` must be executed after any adjustments to `functions.php` files (DSL).
66+
Proposal is considered "Accepted" when added to the Roadmap by one of the Core Contributors.
67+
By default proposal are added to the upcoming milestone, whatevr can't be delivered during milestone due date is going
68+
to be moved to the next milestone.
9169

92-
## Building PHAR
70+
> Weeks of coding can save you hours of planning.
9371
94-
```shell
95-
composer build:phar
96-
./build/flow.phar --version
97-
```
72+
Opening a pull request without reaching out first might get rejected and eventually closed.
9873

99-
## Building Docker Image
74+
**🐛 Bug Fixes** - bug fixes are the only exception from the above rule. Bug Fixes can be opened directly without
10075

101-
In order to build docker image and load it to local registry please use:
76+
## Before you start coding
10277

103-
```shell
104-
docker buildx build -t flow-php/flow:latest . --progress=plain --load
105-
```
78+
Please make sure that you are aware of our [Architecture Decision Records](/documentation/adrs.md).
79+
It's mandatory to follow all of them without any exceptions unless explicitly overridden by a new ADR.
10680

107-
Usage:
81+
## Next Steps
10882

109-
```shell
110-
docker run -v $(pwd):/flow-workspace -it flow-php/flow:latest --version
111-
```
83+
- [Setup development environment](/documentation/contributing/environment.md)
84+
- [Nix Shell](/documentation/contributing/nix.md)
85+
- [Development Guidelines](/documentation/contributing/guidelines.md)

0 commit comments

Comments
 (0)