Closed (fixed)
Project:
Entity Translation
Version:
7.x-3.x-dev
Component:
Base system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
15 Dec 2022 at 09:53 UTC
Updated:
4 Jan 2023 at 10:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
joseph.olstadComment #3
joseph.olstadComment #4
joseph.olstadNew patch with interdiff
Comment #5
joseph.olstadComment #6
joseph.olstadnew patch fix oops
Comment #7
joseph.olstadah , oops again
Comment #8
joseph.olstadfix
Comment #9
joseph.olstadComment #10
stefanos.petrakis1. Change
call_user_func_array(array('parent', 'setUp'), $args);tocall_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
and this to our *.info file (since core can support earlier PHP versions >5.3.3)
2. Why not add a
protected $revisionIdproperty to theEntityTranslationDefaultHandlerclass? That would make adding the deprecation overrides directive unnecessary.Thanks Joseph, back to you for another round!
Comment #11
joseph.olstad@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
Comment #12
joseph.olstadNew patch
Comment #13
joseph.olstadPatch 12 is smaller, gets us through the day.
**BEGIN EDIT**
Patch 13 is again slightly smaller,
should workbut doesn't work.**END EDIT**
Comment #14
joseph.olstadComment #15
joseph.olstadtrying parent::class suggestion again, this time with single quotes.
With that said, why break PHP 5.3 when we don't have to?
Comment #16
joseph.olstadComment #17
joseph.olstadI made the suggested changes, patch 12 appears to be the best option.
Comment #18
joseph.olstadMinor simplification
Comment #19
stefanos.petrakisPatch #3 failed most probably because you provided
parent::classas a string; if you drop the single quotes it should work.Comment #20
joseph.olstadHi @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.
Comment #21
joseph.olstadpatch 20 should work on all supported versions of PHP
Comment #22
joseph.olstadminor change
Comment #23
joseph.olstadHere's verbatim what you were asking for @stefanos.petrakis
Just to see if it will fail on PHP 5.3 as advertised.
Comment #24
joseph.olstadComment #25
joseph.olstadanother 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
Comment #26
joseph.olstadComment #27
joseph.olstadI'm suggesting we use patch #18 because it has no issues with PHPLint, works on all supported versions of PHP
Comment #28
joseph.olstadok one more test
Comment #30
joseph.olstadpatch 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.
Comment #31
joseph.olstadComment #32
stefanos.petrakisIt 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
Comment #33
joseph.olstad@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
Comment #34
joseph.olstadComment #35
joseph.olstadlooks good thanks @stefanos.petrakis
Comment #36
joseph.olstad@stefanos.petrakis, please let me know if patch #33 is exactly what you're looking for?
Comment #37
stefanos.petrakisCommited into a new branch and released.