Skip to content
This repository has been archived by the owner on Jul 8, 2023. It is now read-only.

Support PHP 8.x #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Support PHP 8.x #30

wants to merge 1 commit into from

Conversation

shin1x1
Copy link
Contributor

@shin1x1 shin1x1 commented Feb 26, 2023

I would like to use the eloquent/enumeration package with PHP 8.1 and PHP 8.2.

Currently, the CI in this repository only runs tests up to PHP 7.4, so I have added the ability to run tests in a PHP 8.x environment.

In this pull request I have done the following

  • Upgrade phpunit/phpunit to 9.6
    • phpunit/phpunit:7 is now EOL
  • Changed support PHP version to PHP 7.3 or higher
  • Migrated CI build environment to GitHub Actions

@shin1x1 shin1x1 marked this pull request as ready for review February 26, 2023 04:57
@shin1x1 shin1x1 changed the title Support 8.x Support PHP 8.x Feb 26, 2023
@ezzatron
Copy link
Contributor

Thanks for the PR.

I would highly suggest using the new built-in enumerations if you're targeting PHP 8.1/8.2. As far as I can tell they cover pretty much everything this library does. Especially since, when PHP 8.0 goes out of support, I plan to deprecate this library.

https://www.php.net/manual/en/language.enumerations.overview.php

@shin1x1
Copy link
Contributor Author

shin1x1 commented Feb 27, 2023

@ezzatron
Thanks for the reply.

You are right, if you are using PHP 8.1 or later, it would be better to use the built-in enum.
However, I have several applications that already use this library. It would be a big hassle to rewrite their code to use the native enum (because it works well!).

This library seems to work well with PHP 8.1 and 8.2, so I hope to be able to show that it works with CI as is.

@shin1x1
Copy link
Contributor Author

shin1x1 commented Mar 17, 2023

Hi, @ezzatron,

Is there anything I can do to help you merge this pull request?

@ezzatron
Copy link
Contributor

@shin1x1 There's a couple of reasons I haven't merged.

Firstly, all my open source time is currently occupied trying to get https://github.com/eloquent/phony ready for PHP 8/8.1/8.2. It's broken at the moment and people are unable to continue working with it until it's fixed. That takes precedence over this, because as far as I can tell, Enumeration is already working fine under PHP 8+.

Secondly, I already have established ways of setting up GitHub Actions, Composer etc. that I use in my other projects. It's generally something I like to curate carefully myself, and having one project set up in a unique way makes maintenance more of a pain.

In any case, I'll try to get around to looking at the CI setup here as soon as Phony gets a new release. If there's something specific in Enumeration that's not working under PHP 8+, please let me know.

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

Successfully merging this pull request may close these issues.

2 participants