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

config: update repo config files and documents #112

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

adevade
Copy link
Contributor

@adevade adevade commented Feb 1, 2023

Description

.editorconfig

Helps contributors by making sure their editor is behaving according to our specifications.
More info

.gitattributes

Ignores repo files and tests when exporting this project. For example, when downloading as .zip or when installing via composer. This helps save a few hundred kilobytes for every install.

Examples from other popular PHP projects:

composer.json

Remove version field. This is handled automatically by packagist.org with the branches/tags/releases in this repo. This way, you only need to update the version numer in one place for each new release; the constant UrlBuilder::VERSION.

The easiest way to manage versioning is to just omit the version field from the composer.json file. The version numbers will then be parsed from the tag and branch names.
Source

Other changes:

CONTRIBUTING.md

Mostly formatting, fixing a broken link to Code of Conduct and clarifying the composer commands at the bottom. Also using the newly added composer custom script for running the tests.

pint.json

Update preset from psr12 to laravel. The laravel preset is based on psr12 with some other quality of life improvements. Formatting the code in its current state has no difference between the presets.

Another preset available is symfony. I don't like that one personally. Mostly because it uses "Yoda style" conditions. Ex: if ($meaning === 42) becomes if (42 === $meaning).

Checklist

@commit-lint
Copy link

commit-lint bot commented Feb 1, 2023

Config

  • add .editorconfig file (271b182)
  • add .gitattributes file (09a6fc0)
  • change to laravel preset for pint (6c82691)
  • reindent composer.json with 4 spaces (4fc0545)
  • reorder composer keys (1fa040b)
  • remove version from composer.json (0d2053d)
  • add links to composer.json (957a865)
  • add common settings to composer.json (2977413)
  • add custom scripts to composer.json (65d3910)
  • reference composer script in contribute.md (fd42dc6)
  • handle line endings same on all systems (de5a1d3)
  • use 2 space indentation for yaml (e4da087)

Documentation

Chore

Contributors

adevade

Commit-Lint commands

You can trigger Commit-Lint actions by commenting on this PR:

  • @Commit-Lint merge patch will merge dependabot PR on "patch" versions (X.X.Y - Y change)
  • @Commit-Lint merge minor will merge dependabot PR on "minor" versions (X.Y.Y - Y change)
  • @Commit-Lint merge major will merge dependabot PR on "major" versions (Y.Y.Y - Y change)
  • @Commit-Lint merge disable will desactivate merge dependabot PR
  • @Commit-Lint review will approve dependabot PR
  • @Commit-Lint stop review will stop approve dependabot PR

@adevade adevade marked this pull request as ready for review February 1, 2023 12:35
@adevade adevade requested a review from a team as a code owner February 1, 2023 12:35
@luqven luqven self-assigned this Feb 1, 2023
@luqven
Copy link
Contributor

luqven commented Feb 1, 2023

Hey @adevade , same comment as in #111 , any guidance on the "right" way of reading the diff would be great.

Thanks again for your hard work on this, we'll leave you feedback as soon as we're able.

@adevade
Copy link
Contributor Author

adevade commented Feb 1, 2023

@luqven This one should be fine to just read the diff, paired with my notes in the original comment.

The updates to composer.json has very detailed commits of what I changed, so config: reindent composer.json with 4 spaces to config: add custom scripts to composer.json could be read commit by commit for extra clarity.

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.

2 participants