Problem/Motivation

I just tagged and released a PHP 8.2 compatible version of i18n, core is also compatible with PHP 8.2.

Please add head tests for PHP 8.2

Meanwhile, let's kick this forward.

Steps to reproduce

Run PHP 8.2 tests against a patch

Proposed resolution

Review/develop/patch/test/commit

Remaining tasks

write a patch, review a patch, test a patch, publish a PHP 8.2 compatible release of entity_translation

User interface changes

n/a

API changes

TBD

Data model changes

N/A

Comments

joseph.olstad created an issue. See original summary.

joseph.olstad’s picture

joseph.olstad’s picture

StatusFileSize
new1.92 KB
joseph.olstad’s picture

StatusFileSize
new1.78 KB
new3.18 KB

New patch with interdiff

joseph.olstad’s picture

Title: Fully Support PHP 8.1, PHP 8.2 » Fully Support PHP 8.2
Issue tags: -PHP 8.1
joseph.olstad’s picture

StatusFileSize
new1.79 KB
new3.19 KB

new patch fix oops

joseph.olstad’s picture

ah , oops again

joseph.olstad’s picture

StatusFileSize
new3.43 KB
new1.3 KB

fix

joseph.olstad’s picture

Status: Active » Reviewed & tested by the community
stefanos.petrakis’s picture

Status: Reviewed & tested by the community » Needs work

1. Change call_user_func_array(array('parent', 'setUp'), $args); to call_user_func_array(array(parent::class, 'setUp'), $args);. That is compatible with PHP >5.5 and should do the trick, instead of doing that long rewrite.
And to make this more solid, we should add the following to our composer.json

"require": {
  "php": ">=5.5"
},

and this to our *.info file (since core can support earlier PHP versions >5.3.3)

php = 5.5

2. Why not add a protected $revisionId property to the EntityTranslationDefaultHandler class? That would make adding the deprecation overrides directive unnecessary.

Thanks Joseph, back to you for another round!

joseph.olstad’s picture

@stephanos.petrakis ,
call_user_func_array(array(parent::class, 'setUp'), $args);

does not work

see patch #3, I already tried this and it failed 10 fails
The test did not complete due to a fatal error. 10 times.

the change in #8 works and passes all tests.

as for EntityTranslationDefaultHandler yes I can add that $revisionId property and try that

joseph.olstad’s picture

StatusFileSize
new1.74 KB

New patch

joseph.olstad’s picture

StatusFileSize
new784 bytes
new1.58 KB

Patch 12 is smaller, gets us through the day.

**BEGIN EDIT**
Patch 13 is again slightly smaller, should work but doesn't work.
**END EDIT**

joseph.olstad’s picture

joseph.olstad’s picture

StatusFileSize
new970 bytes

trying parent::class suggestion again, this time with single quotes.

With that said, why break PHP 5.3 when we don't have to?

joseph.olstad’s picture

joseph.olstad’s picture

Status: Needs work » Needs review

I made the suggested changes, patch 12 appears to be the best option.

joseph.olstad’s picture

StatusFileSize
new1.65 KB

Minor simplification

stefanos.petrakis’s picture

Status: Needs review » Needs work

Patch #3 failed most probably because you provided parent::class as a string; if you drop the single quotes it should work.

joseph.olstad’s picture

StatusFileSize
new1.98 KB

Hi @stefanos.petrakis,

Thanks for your guidance on this.

Here is a new patch that will do the suggested approach for PHP 5.5.0 +

I know of a very large organisation that still uses PHP 5.3 in production for over 180 websites, I'd prefer to extend support. They have RHEL 7 (LTS type of os).

Let's see if it passes this time.

joseph.olstad’s picture

Status: Needs work » Needs review

patch 20 should work on all supported versions of PHP

joseph.olstad’s picture

StatusFileSize
new558 bytes
new1.98 KB

minor change

joseph.olstad’s picture

Status: Needs review » Needs work
StatusFileSize
new968 bytes

Here's verbatim what you were asking for @stefanos.petrakis

Just to see if it will fail on PHP 5.3 as advertised.

joseph.olstad’s picture

Status: Needs work » Needs review
joseph.olstad’s picture

StatusFileSize
new1014 bytes

another patch

this time using get_parent_class
https://www.php.net/manual/en/function.get-parent-class.php

this is compatible with PHP 4, 5, 7, 8

joseph.olstad’s picture

joseph.olstad’s picture

I'm suggesting we use patch #18 because it has no issues with PHPLint, works on all supported versions of PHP

joseph.olstad’s picture

StatusFileSize
new1003 bytes

ok one more test

Status: Needs review » Needs work

The last submitted patch, 28: et-php82x-3327347-28.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

joseph.olstad’s picture

Status: Needs work » Needs review

patch 18 works for everyone, otherwise patch 23 is a second option, does not work with php 5.3/php 5.4

I'm suggesting patch 18, however if you prefer patch 23 I won't be terribly upset.

joseph.olstad’s picture

stefanos.petrakis’s picture

Status: Needs review » Needs work

It wiil be #23 then.

If requested we could back port.new features or bug fixes to the 7.2.x branch, I will move this now to a new major release since this is a big change (support for 8.1 and 8.2 as well as dropping support for 5.3, 5.4)

But first, there is a couple more things from #10 that need to be added to #23

joseph.olstad’s picture

Status: Needs work » Needs review
StatusFileSize
new1.61 KB

@stefanos.petrakis,

Here's the new patch based on #23 with the missing bits included from #10

added require for composer.json, added php version for entity_translation.info

joseph.olstad’s picture

joseph.olstad’s picture

Status: Needs review » Reviewed & tested by the community

looks good thanks @stefanos.petrakis

joseph.olstad’s picture

@stefanos.petrakis, please let me know if patch #33 is exactly what you're looking for?

stefanos.petrakis’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
Status: Reviewed & tested by the community » Fixed

Commited into a new branch and released.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.