I can't run version 3 on PHP 7.4.33
desbest opened this issue · comments
Make sure that your issue is reproducible by doing the following tasks
- I am using application packages whose source code is not optimized for production (source code is not minified).
- I have activated the test mode by changing the
TEST
constant value totrue
in the.\index.php
file. - I have made sure that there are files named
error
orerror-x
orerror-y
in the.\engine\log
folder.
What installation method did you use?
File
Describe your issue in the field below
I can't run version 3 on PHP 7.4.33
Package version
Development version (package on the main
branch)
Package version number
3.0.0
What browsers are you seeing the problem on?
Firefox
Error logs of the core application if any
[14-May-2024 16:52:14 UTC] PHP Fatal error: Clone method Genome::__clone() cannot declare a return type in /home/desbest/public_html/flatfiledemo/mecha3/engine/kernel/genome.php on line 3
[14-May-2024 16:52:14 UTC] PHP Fatal error: Class 'Hook' not found in /home/desbest/public_html/flatfiledemo/mecha3/engine/kernel/genome.php on line 3
[14-May-2024 16:52:14 UTC] PHP Fatal error: Uncaught Error: Class 'Genome' not found in /home/desbest/public_html/flatfiledemo/mecha3/engine/kernel/hook.php:3
Stack trace:
#0 /home/desbest/public_html/flatfiledemo/mecha3/engine/f.php(1059): require()
#1 [internal function]: {closure}('Hook')
#2 /home/desbest/public_html/flatfiledemo/mecha3/engine/fire.php(170): spl_autoload_call('Hook')
#3 [internal function]: {closure}()
#4 {main}
thrown in /home/desbest/public_html/flatfiledemo/mecha3/engine/kernel/hook.php on line 3
Error log of the extension if any
No response
Error log of the layout if any
No response
General error logs if any (if the application fails to set a custom error log path, then the error log will usually appear in this location)
[14-May-2024 16:43:35 UTC] PHP Fatal error: Uncaught Error: Call to undefined function zone() in /home/desbest/public_html/flatfiledemo/mecha/state.php:7
Stack trace:
#0 {main}
thrown in /home/desbest/public_html/flatfiledemo/mecha/state.php on line 7
Remove the : void
part in /home/desbest/public_html/flatfiledemo/mecha3/engine/kernel/genome.php
on line 29 and see if it works. I will change it later.
public function __clone() {}
After doing that, now I'm getting this error.
Fatal error: Declaration of Genome::unserialize(string $lot): void must be compatible with Serializable::unserialize($serialized) in /home/desbest/public_html/flatfiletest/mecha3/engine/kernel/genome.php on line 100
Fatal error: Uncaught Error: Class 'Genome' not found in /home/desbest/public_html/flatfiletest/mecha3/engine/kernel/hook.php:3 Stack trace:
#0 /home/desbest/public_html/flatfiletest/mecha3/engine/f.php(1059): require()
#1 [internal function]: {closure}('Hook')
#2 /home/desbest/public_html/flatfiletest/mecha3/engine/fire.php(164): spl_autoload_call('Hook')
#3 /home/desbest/public_html/flatfiletest/mecha3/engine/kernel/genome.php(3): {closure}()
#4 /home/desbest/public_html/flatfiletest/mecha3/engine/f.php(1059): require('/home/desbest/p...')
#5 [internal function]: {closure}('Genome')
#6 /home/desbest/public_html/flatfiletest/mecha3/engine/kernel/state.php(3): spl_autoload_call('Genome')
#7 /home/desbest/public_html/flatfiletest/mecha3/engine/f.php(1059): require('/home/desbest/p...')
#8 [internal function]: {closure}('State')
#9 /home/desbest/public_html/flatfiletest/mecha3/engine/fire.php(176): spl_autoload_call('State')
#10 /home/desbest/public_html/flatfiletest/mecha3/index.php(25): require('/home/desbest/p...')
#11 { in /home/desbest/public_html/flatfiletest/mecha3/engine/kernel/hook.php on line 3
Fatal error: Uncaught Error: Class 'Genome' not found in /home/desbest/public_html/flatfiletest/mecha3/engine/kernel/hook.php:3 Stack trace:
#0 /home/desbest/public_html/flatfiletest/mecha3/engine/f.php(1059): require()
#1 [internal function]: {closure}('Hook')
#2 /home/desbest/public_html/flatfiletest/mecha3/engine/fire.php(170): spl_autoload_call('Hook')
#3 [internal function]: {closure}()
#4 {main} thrown in /home/desbest/public_html/flatfiletest/mecha3/engine/kernel/hook.php on line 3
Looks like : void
return type was not set on the Serializable
’s unserialize()
method interface. Find any methods that ends with : void
in the Genome
class and then remove that return type as how I did in the last commit. Should fix the issue. Will change it later.
I still get errors after removing every : void
Fatal error: Declaration of Genome::unserialize(string $lot) must be compatible with Serializable::unserialize($serialized) in /home/desbest/public_html/flatfiletest/mecha3/engine/kernel/genome.php on line 100
Fatal error: Uncaught Error: Class 'Genome' not found in /home/desbest/public_html/flatfiletest/mecha3/engine/kernel/hook.php:3 Stack trace:
#0 /home/desbest/public_html/flatfiletest/mecha3/engine/f.php(1059): require()
#1 [internal function]: {closure}('Hook')
#2 /home/desbest/public_html/flatfiletest/mecha3/engine/fire.php(164): spl_autoload_call('Hook')
#3 /home/desbest/public_html/flatfiletest/mecha3/engine/kernel/genome.php(3): {closure}()
#4 /home/desbest/public_html/flatfiletest/mecha3/engine/f.php(1059): require('/home/desbest/p...')
#5 [internal function]: {closure}('Genome')
#6 /home/desbest/public_html/flatfiletest/mecha3/engine/kernel/state.php(3): spl_autoload_call('Genome')
#7 /home/desbest/public_html/flatfiletest/mecha3/engine/f.php(1059): require('/home/desbest/p...')
#8 [internal function]: {closure}('State')
#9 /home/desbest/public_html/flatfiletest/mecha3/engine/fire.php(176): spl_autoload_call('State')
#10 /home/desbest/public_html/flatfiletest/mecha3/index.php(25): require('/home/desbest/p...')
#11 { in /home/desbest/public_html/flatfiletest/mecha3/engine/kernel/hook.php on line 3
Fatal error: Uncaught Error: Class 'Genome' not found in /home/desbest/public_html/flatfiletest/mecha3/engine/kernel/hook.php:3 Stack trace:
#0 /home/desbest/public_html/flatfiletest/mecha3/engine/f.php(1059): require()
#1 [internal function]: {closure}('Hook')
#2 /home/desbest/public_html/flatfiletest/mecha3/engine/fire.php(170): spl_autoload_call('Hook')
#3 [internal function]: {closure}() #4 {main} thrown in /home/desbest/public_html/flatfiletest/mecha3/engine/kernel/hook.php on line 3
Remove the string
from the method argument:
public function unserialize($lot) {}
It works now. Thanks for your help.