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

Bump requirements to php 8.1 and add additional tools to ease development #50

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

Zombaya
Copy link
Contributor

@Zombaya Zombaya commented Nov 22, 2024

I've spend some time getting the project up to date. I have tried to split all changes by meaningful commits to make reviewing it a bit easier.

I have used a number of tools to automatically fix things, most of which I added to the project. The only exception would be the use of rector, which I kept outside of the project since I consider that to be only needed once in a while, compared to the other tools.

Overview of changes

Bump requirements

I marked php 8.1 as the minimum required version as that is the oldest one officially supported php-version.

I bumped the minimal version for pear/pear-core-minimal to the oldest one supporting 8.1 and restricted pear/console_getopt so no versions not supporting 8.1 are used.

Upgraded phpunit to 10.0

This was needed for getting to run on php 8.1.

I did not upgrade to 11.0 (latest) since that one does not support php 8.1.

Added php-cs-fixer

To avoid having to spend time discussing code-style during merge-reviews, I prefer to have php-cs-fixer decide on the codestyle.

I did configure it to my preference, but feel free to propose a different configuration.

It's mostly the configuration for Symfony, but with a couple minor changes as I dislike certain aspects of it.

Added phpstan

This helps in preventing bugs, I cleaned up the code it complained about.

Added github-CI

To be certain MR's do not break the code or add new possible bugs using PHPStan, I've added configuration for github actions to automatically lint and test the code.

General code cleanup

I ran rector and manually fixed some stuff to modernize the code since we now can use syntax not supported in php 7.4.

Gitattributes

I've added .gitattributes to make the project lighter when it is installed as a dependency since it will no longer install tests or other unneeded files.

More information about it can be found here

Untested

I did not yet test this version using additional messages, so only the test messages from the unittests have been tested with this new version.

I'm not certain if that is enough as quite a lot of code was changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant