Open cptX opened 2 years ago
I have it running on 8 I'll see if i can put a patch together. Much less work than the PHP 7 conversion was.
I'm using Pressflow and I'm stack some versions behind. I now checked the changelog and it seems that the initial attempt for php 8 has began. That's good news!
Hello @mazzarito is it possible to make a zip of the version running in php 8 available for testing? It will be great help not just to me or hundreds but thousand of users. Many thanks.
@cptX if possible can you kindly share the link of Pressflow/drupal that seems to work or may work with php8? Best regards.
@dranii I'm running it on php 7.4. Never tested it with php 8 although my server now is php 8 and I don't want to have dual versions of php running. I tried to check the code with phan but I got 100.000 lines of errors so it's impossible to detect any php 8 incompatibilities with this tool. If anybode knows how to suppress messages like Undeclared functions, methods, etc... let me know, please!
@cptX 2 separate instances of Drupal 6x can run from two separate "folders" mydomain/abc/drupal6x and mydomain/xyz/drupal6x - now by "defining" via htaccess we can run one in php7x and another in php8x, as you know well. I am not sure which version of php8 we should first try with a minimum of modules. I was looking at this page - please have a look too if it can give a pointer or any help - https://programmingflow.com/2021/09/19/upgrading-old-drupal-6.html https://docs.lando.dev/drupal/ Thanks and regards.
@dranii my server is ubuntu 22.04 and the long term stable version of php is 8.1.x I suggest to focus compatibility with this version.
@cptX That sounds good. I think I will be able to test with php 8.1x also. However I am not sure what should be a good starting point. I hope someone comes forward with a reasonable starting point. Thanks.
I have it running on 8 I'll see if i can put a patch together. Much less work than the PHP 7 conversion was.
Drupal 6 core seems to be running fine on my site without needing to change anything. However some contributed modules caused fatal errors. These were:
I will need to do more testing (with my 70+ contrib modules) before putting into production
@neilt1700 Thanks a lot. Basically we are getting error messages only with d6lts and php8. It may be that some additional extensions for php 8 or some settings to be adjusted ?? If possible, can the php info file and what hosting you are using for d6lts+php8x be shared here? What changes need to be done for Views and CCK ?
@dranii for CCK here on d6lts, I don't know - perhaps nothing? I am using CCK 6.x-3.0-alpha4 as this has a multi-group feature that never made it beyond alpha. I needed to do this fix (note it's already been fixed in the CCK repo here):
diff --git a/httpdocs/sites/all/modules/contrib/cck/content.module b/httpdocs/sites/all/modules/contrib/cck/content.module
index b682d48..8d3f801 100644
--- a/httpdocs/sites/all/modules/contrib/cck/content.module
+++ b/httpdocs/sites/all/modules/contrib/cck/content.module
@@ -1227,7 +1227,7 @@ function content_write_record($table, &$object, $update = array()) {
}
// Build arrays for the fields, placeholders, and values in our query.
- if (isset($object->$field) || array_key_exists($field, $object)) {
+ if (isset($object->$field) || (is_array($object) && array_key_exists($field, $object))) {
$fields[] = $field;
if (isset($object->$field)) {
$placeholders[] = db_type_placeholder($info['type']);
The one fix I've needed to do for views had already been done here - see: https://github.com/d6lts/views/commit/e2f15e57ee953f92b6bfd04360f6043dfb1cd90c (So note to self - make sure I have indeed got the latest d6lts modules!)
Other modules that I use that needed fixing:
I have updated D6 core to make it function with PHP 8.1 (as on further checking there was a small amount of code in core which were causing fatal errors in PHP 8). I have made a pull request to bring the changes over to here: https://github.com/d6lts/drupal/pull/78. You can get the code from here to try it out.
I've updated a number of other modules which I will submit shortly:
Great job, thanks for your effort!
What tool are you using to detect the incompatibilities in the code?
FYI I have several open PHP 8 pull requests for contrib modules:
https://github.com/d6lts/elysia_cron/pull/3 https://github.com/d6lts/features/pull/2 https://github.com/d6lts/ubercart/pull/6 https://github.com/d6lts/ubercart/pull/7 https://github.com/d6lts/filefield/pull/1 https://github.com/d6lts/filefield_paths/pull/1 https://github.com/d6lts/filefield_paths/pull/2 https://github.com/d6lts/ctools/pull/4 https://github.com/d6lts/views_bulk_operations/pull/2 https://github.com/d6lts/emfield/pull/1
I have other changes for some contrib modules not listed on D6LTS. Does anyone know if there is a process for including additional contrib modules here?
@neilt1700 Millions of thanks. Now on the move, so yet to try! Looking forward to php 8.2 (in future) and some modules like CCK (if not, already) Many many thanks and gratitude goes to you from the entire community of drupal 6 users. Best regards.
Great job, thanks for your effort!
What tool are you using to detect the incompatibilities in the code?
Just wondering if there are any current active members of the d6lts organisation?
Unfortunately I think D6LTS is finally EOL as of Feb 24, 2023 after many extensions.
I have several pull requests since then and there has been no movement - I think it's dead. :(
it rather 1 year prior year, there is no change since Feb 2022 - and this is clear for some time. This project seems to have been frozen since the initial contributors have no interest and no other is allowed to take over. Such a classic.
So if you really want to continue, there might be a need for a fork to consolidate the patches. Or maybe the contributors read this and allow some hand picked contributors which are still active to manage the repo / prs / issues
Actually, mydropwizard company owned by dsnopek who took care this d6lts project closed since Feb 25, 2022. You can read some more information here -> https://www.drupal.org/project/d6lts/issues/3259488 Actually, there was an announcement in mydropwizard too but since the company was closed, the website was gone too.
Or maybe the contributors read this and allow some hand picked contributors which are still active to manage the repo / prs / issues
@EugenMayer that would be ideal rather than forking it somewhere else. I have sent a message to @dsnopek via his website.
I guess we'll give him a little bit to respond otherwise might have to just fork it if that's the only option. Can always just be consolidated back if he ever reappears.
I went ahead and forked this ... I have a repo with a ton of contrib modules working on PHP 8 such as DBTNG which required a few PDO related changes. I'll try and release some of them as I can get to them.
@mazzarito - have you thought about creating a GitHub organization to contain all the repos for D6 core and modules. It's free for public code, and you can invite people to help administer it.
@neilt1700 I've created an org D6LTS-contrib I'll try and post as many of the modules I've implemented PHP 8 compatibility for as I can... I listed the ones I have currently but I've started w/ core and DBTNG. I'll try and add ubercart as well as some of the more important contrib modules later. Not all of them require changes however and I'll try to fork from this org where possible so I have to sort through that.
@mazzarito this is fantastic - thank you! I'm happy to help too - though have a lot on at the moment.
@neilt1700 FYI haven't had a ton of time to devote to this but I submitted another patch to the repo... I have it running under 8.2 and MariaDB 10.11 seems to work fine,
Thanks @mazzarito, your work will be very useful to me. I switched my server to php 8.3 and the only site remaining to 7.4 is my drupal 6.
Is there any hope/plan for supporting php 8.*?