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

fix for PHP 7.4 string index access #125

Merged
merged 1 commit into from
Mar 19, 2021

Conversation

pilif
Copy link
Contributor

@pilif pilif commented Sep 6, 2019

This PR fixes two instances of curly bracers used for array and/or string index access. This has been deprecated in PHP 7.4:

see https://wiki.php.net/rfc/deprecate_curly_braces_array_access

@giorgiosironi
Copy link
Owner

The build has some problems with old PHP versions to solve first. Thanks for the PR, will get it in soon.

@giorgiosironi
Copy link
Owner

Can you merge master in this to fix the build?

@pilif
Copy link
Contributor Author

pilif commented Jan 13, 2020

I have rebased on top of your current master

@jdecool
Copy link

jdecool commented Feb 20, 2020

Some news about this PR ?

@davedevelopment
Copy link
Collaborator

@giorgiosironi Hey, we could do with this fix, I'm happy to use a fork for now but if you need any help maintaining eris, I'd be happy to help out. I'm quite comfortable with most testing tools etc.

@antodippo
Copy link

Hi guys, I had the same deprecation problem in a Travis build, and I've fixed it with a Composer patch, while waiting for this to be merged and released.
I report here how, maybe it's useful for you:

  • require this library, it works also with --dev:
    composer require --dev cweagans/composer-patches
  • add this to your composer.json file:
"extra": {
    "patches": {
        "giorgiosironi/eris": {
            "Fix PHP 7.4 deprecation": "https://patch-diff.githubusercontent.com/raw/giorgiosironi/eris/pull/125.patch"
        }
    }
}
  • run a composer update on giorgiosironi/eris:
    composer update giorgiosironi/eris

This will refer to this PR, and it will apply it everytime you run a compose update on this library.
You can also take a look at how I did it here: antodippo/exif-reader#5

Hope it helps!

@ilario-pierbattista
Copy link
Collaborator

ilario-pierbattista commented Mar 11, 2021

@pilif your last commit broke the CI.
What was intended to fix? Might it be better to fix any other issue in a separate pr?

@pilif
Copy link
Contributor Author

pilif commented Mar 11, 2021

oh wow - this was a blast from the past. I didn't remember that this PR was still open when I added the commit.

getAnnotations() was removed from PHPUnit 9 and we internally migrated to PHPUnit 9

@ilario-pierbattista
Copy link
Collaborator

ilario-pierbattista commented Mar 11, 2021

Fine @pilif how about opening a new issue for adding support to Phpunit 8.x and 9.x?

If you need the change for internal usage, you could also reference a specific commit of your fork. How does it sound to you?

@pilif
Copy link
Contributor Author

pilif commented Mar 11, 2021

If you need the change for internal usage, you could also reference a specific commit of your fork. How does it sound to you?

of course. I made a honest mistake. I'm sorry. I have reset my branch back to where it was with just the PHP 7.4 fix.

For reference: My initial PR was from September 2019 and my erroneous commit was from December 2020, more than a year later and 6 months after this PR was approved but not merged. By the time I made that commit I had to assume that interesest in merging this has vaned

@ilario-pierbattista
Copy link
Collaborator

Thank you @pilif I have no doubt about your good faith.
I think that it's time to move on with php compatibility in order to keep this project alive.

@giorgiosironi I'm sorry for reaching you directly, but this PR has waited for a long time. Could you merge it please?

@giorgiosironi
Copy link
Owner

Unfortunately I can't dedicate more professional time to this project as I am not active in the PHP community anymore. Happy to hand over commit rights to someone that wants to give a future to this library,

@ilario-pierbattista
Copy link
Collaborator

ilario-pierbattista commented Mar 18, 2021

Hi @giorgiosironi I've seen a few of people around here very willing to help.

Personally I have a strong interest in keeping this project alive: it is amazing and I've a lot of tests written with it.
I would be pleased to help maintaining and giving a future to it.

@davedevelopment
Copy link
Collaborator

Like I mentioned above, I'm happy to help out if nobody else steps up. I'll be honest though and say it would be in a maintenance capacity rather than further active development, I barely have enough time for work on mockery, so I'd only be here to help fixes like this get merged.

@giorgiosironi
Copy link
Owner

giorgiosironi commented Mar 19, 2021

I have invited you two as Collaborators on this repository. Hopefully, that helps to get the repository into shape, let me know how it goes and if I can tweak anything else.

@ilario-pierbattista
Copy link
Collaborator

Thanks @giorgiosironi

Let's start from this pr: thank you @pilif for your contribution!
@davedevelopment from your comment above I assume that you agree to merge this.

@ilario-pierbattista ilario-pierbattista merged commit d27e532 into giorgiosironi:master Mar 19, 2021
@davedevelopment
Copy link
Collaborator

@ilario-pierbattista sorry, yes I agree :)

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.

7 participants