Upgraded to PHP 8.3

85 views
Skip to first unread message

Adrian London

unread,
Feb 27, 2024, 6:43:40 PM2/27/24
to Gallery 3 Users
My gallery is running very well, although the migration from 7.x to 8.3 needed some work, especially to my uncommon modules and hacks, err I mean customisations.

Some important changes I had to make to core files to remove "depreciation" errors:

system/libraries/database_result.php
add:
#[AllowDynamicProperties]

before line:
abstract class Database_Result_Core implements Countable, Iterator, SeekableIterator, ArrayAccess {

system/core/Kohana_Config.php
add:
#[\ReturnTypeWillChange]

before lines:
        public function offsetGet($key)
        public function offsetSet($key, $value)
        public function offsetExists($key)
        public function offsetUnset($key)

"non-static method Foo::bar() should not be called statically"

If you get errors like the above (and you will), ignore all the google fixes and trying to work out the differences between "::", "->", "foo()", "new $Foo" etc and simply find the relevant function (it'll be in the logs) and add the word "static" in front of it.  Easy peasy.

Adrian


J.R.

unread,
Mar 1, 2024, 12:36:21 PM3/1/24
to gallery...@googlegroups.com
Adrian,

Thanks again for keeping up updated on the tweaks you've been making. We're all going to have to move to PHP 8.3 or higher sometime in the next few years, so it's important stuff -- I hope some of this can be integrated into the next Gallery releases.

-- J.R.
--
WHEN USING AN EMAIL PROGRAM to reply to this message, click REPLY TO LIST or REPLY TO ALL so your reply goes out to everyone in the group. If you click REPLY or REPLY TO SENDER Google will *only* send your reply to the original author (not recommended).
 
To post a NEW MESSAGE to the group, send an new email to:
gallery...@googlegroups.com
 
To view or sign in to this group on the web, use this URL:
https://groups.google.com/forum/#!forum/gallery-3-users
---
You received this message because you are subscribed to the Google Groups "Gallery 3 Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gallery-3-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gallery-3-users/746dcedd-62d4-4b53-bdbf-b2e1a42be52dn%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages