Skip to content

Conversation

@jrfnl
Copy link
Member

@jrfnl jrfnl commented Oct 31, 2025

Based on various things @afilina and me discussed in a video call while reviewing one of the new sniffs she pulled.

There are quite some conventions which were not explicit in the CONTRIBUTING guide. Along the same lines, there are a number of "best practices"/"pro-tips" which can be helpful for people new to contributing to this codebase.

No doubt we'll come across more things to be documented along the way, but this is a first step towards improving the contributor experience.

@jrfnl jrfnl added this to the 10.0.0-alpha2 milestone Oct 31, 2025
@jrfnl jrfnl requested a review from wimg October 31, 2025 01:07

Adding this information in the commit message also ensures that this information will still be available if the package would be hosted via another code hosting platform in the future.

A good commit message for a commit to PHPCompatibility would typically look something like this:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very useful, thanks!

Each sniff has its own remit and should function independently of other sniffs.

With that in mind, sniffs are, and should be, tested in isolation.
The tests for each sniff should only test the functionality of that specific sniff, independently of that the code used to test the sniff may also trigger errors from other sniffs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand the essence of the second part of this sentence, but I'm having trouble parsing it.

@jrfnl
Copy link
Member Author

jrfnl commented Oct 31, 2025

Thanks for the review @afilina ! I've made some further changes and I believe (hope) I've addressed all your remarks now.
I've added the additional changes in a separate commit to make it more straight forward to see what I've changed.

@wimg Please SQUASH-merge (if I don't squash the commits myself before you get to the PR).

A good commit message for a commit to PHPCompatibility would typically look something like this:
```
PHP #.# | SniffName: detect something specific
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question: given that sniff names are very long, does PHPCompatibility prescribe a char limit on commit subject lines (typically 72)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we don't have a character limit on commit subject lines. Rule of thumb: keep the title as short as possible while still conveying what the commit is about.

@jrfnl
Copy link
Member Author

jrfnl commented Nov 25, 2025

Rebased & squashed without changes to get a passing build now #1983 has been merged.

Edit: looks like in the mean time, we also need PR #1995 to be merged before the build will pass...

@jrfnl jrfnl force-pushed the feature/add-pull-request-template branch from 708954e to c0013d8 Compare November 25, 2025 00:41
Based on various things afilina and me discussed in a video call while reviewing one of the new sniffs she pulled.

There are quite some conventions which were not explicit in the CONTRIBUTING guide.
Along the same lines, there are a number of "best practices"/"pro-tips" which can be helpful for people new to contributing to this codebase.

No doubt we'll come across more things to be documented along the way, but this is a first step towards improving the contributor experience.

Co-authored-by: Anna Filina <afilina@gmail.com>
@jrfnl jrfnl force-pushed the feature/add-pull-request-template branch from c0013d8 to d224a94 Compare November 25, 2025 09:39
@jrfnl
Copy link
Member Author

jrfnl commented Nov 25, 2025

Rebased without changes to get a passing build now #1995 has been merged.

@wimg wimg merged commit 4adfa58 into develop Nov 25, 2025
80 checks passed
@wimg wimg deleted the feature/add-pull-request-template branch November 25, 2025 23:43
@github-actions github-actions bot removed PR: quick merge PR only contains relatively simple changes PR: ready for review labels Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants