Skip to content

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.

@bierpub
Copy link

bierpub commented Jun 3, 2025

This change also fixes a few deprecation warning messages that show up when updating to PHP 8.4.
implicitly marking parameter as nullable is deprecated
Would be great if we could get this merged in to a new release. Thanks.

@hfig
Copy link
Owner

hfig commented Jun 14, 2025

It would require a v2.0 release.

I have reviewed @Zombaya's changes. Apart from me disliking certain rector-isms and php-cs reformatting, it's fine. But a v2.0 release would also need to:

  • Add types throughout. This mostly only touches returns.
  • phpstan level 6, as a minimum I guess
  • Change the MIME library from Swiftmailer to symfony/mailer
  • Drop Symfony lib support below 6.4 / 7.0

@hfig
Copy link
Owner

hfig commented Jun 14, 2025

@bierpub - v1.4.2 for your specific issue.

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.

3 participants