3sd / civicrm-recalculate-recipients

Moved to https://lab.civicrm.org/extensions/civicrm-recalculate-recipients
Other
6 stars 5 forks source link

Error under PHP 8.x #20

Closed alexmarketaccess closed 2 months ago

alexmarketaccess commented 2 years ago

Extension triggers an error under PHP 8.x :

Fatal error: Array and string offset access syntax with curly braces is no longer supported in /public_html/media/civicrm/ext/civicrm-recalculate-recipients-1.0.1-beta/recalculate_recipients.civix.php on line 246

michaelmcandrew commented 2 years ago

The fix for this should be as simple as upgrading Civix. Not sure if you are aware of how to do that but it you wanted to submit a PR, I would be happy to merge it.

alexmarketaccess commented 2 years ago

Being a a bit of a noob, I'm not sure I understand what I should do!

michaelmcandrew commented 2 years ago

@alexmarketaccess - ok, no worries.

I have upgraded civix in master: https://github.com/3sd/civicrm-recalculate-recipients/commit/befccb2e1478b5763c66ac5bea6fbe88cc422ec5 and have done a quick code review (looks like nothing consequential has changed) but not tested it.

If you could download and test the latest version - you can get that here https://github.com/3sd/civicrm-recalculate-recipients/archive/refs/heads/master.zip - and let me know if it is working for you, we can then create a new release.

michaelmcandrew commented 2 years ago

@jmcclelland - looks like you did a similar civix upgrade in #19. Wondering if you have thoughts on the civix upgrade I did (I just ran civix upgrade and accepted the defaults).

jmcclelland commented 2 years ago

Oh - I didn't know about that command. I ran civix generate:module from inside the extension. I would assume it's the same. Or, if different you should probably take your results (I think I have an old version of civix installed).

michaelmcandrew commented 2 years ago

My command asked me some questions. I am guessing they are reasonably similar. Thanks for the feedback @jmcclelland !