Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polr fails to render in php8 due to fatal error #639

Open
fleish opened this issue Jan 21, 2024 · 2 comments
Open

Polr fails to render in php8 due to fatal error #639

fleish opened this issue Jan 21, 2024 · 2 comments

Comments

@fleish
Copy link

fleish commented Jan 21, 2024

Expected Behavior

Polr code should render and pages should load

Current Behavior

Polr code fails due to PHP fatal error

Steps to Reproduce (for bugs)

  1. Upgrade from php7.4 (PHP Version 7.4.3-4ubuntu2.19) to php8.3 (PHP Version 8.3.2-1+ubuntu20.04.1+deb.sury.org+1)
  2. Attempt to load polr in web browser
  3. Observe php fatal error in logs and page does not render

From trying to load /:

Stack trace:
#0 /var/www/html/polr/vendor/illuminate/config/Repository.php(9): Laravel\Lumen\Application->Laravel\Lumen\{closure}()
#1 /var/www/html/polr/vendor/composer/ClassLoader.php(444): include('...')
#2 /var/www/html/polr/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile()
#3 /var/www/html/polr/vendor/laravel/lumen-framework/src/Application.php(524): Composer\Autoload\ClassLoader->loadClass()
#4 /var/www/html/polr/vendor/illuminate/container/Container.php(738): Laravel\Lumen\Application->Laravel\Lumen\{closure}()
#5 /var/www/html/polr/vendor/illuminate/container/Container.php(631): Illu...; PHP message: PHP Fatal error:  During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Http\Request::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/polr/vendor/illuminate/http/Request.php:850
Stack trace:
#0 /var/www/html/polr/vendor/illuminate/http/Request.php(14): Laravel\Lumen\Application->Laravel\Lumen\{closure}()
#1 /var/www/html/polr/vendor/composer/ClassLoader.php(444): include('...')
#2 /var/www/html/polr/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile()
#3 /var/www/html/polr/vendor/laravel/lumen-framework/src/Application.php(712): Composer\Autoload\ClassLoader->loadClass()
#4 /var/www/html/polr/vendor/illuminate/container/Container.php(738): Laravel\Lumen\Application->Laravel\Lumen\{closure}()
#5 /var/www/html/polr/vendor/illu
2024/01/21 21:34:20 [error] 24186#24186: *20 FastCGI sent in stderr: "PHP message: PHP Fatal error:  During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Config\Repository::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/polr/vendor/illuminate/config/Repository.php:118
Stack trace:
#0 /var/www/html/polr/vendor/illuminate/config/Repository.php(9): Laravel\Lumen\Application->Laravel\Lumen\{closure}()
#1 /var/www/html/polr/vendor/composer/ClassLoader.php(444): include('...')
#2 /var/www/html/polr/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile()
#3 /var/www/html/polr/vendor/laravel/lumen-framework/src/Application.php(524): Composer\Autoload\ClassLoader->loadClass()
#4 /var/www/html/polr/vendor/illuminate/container/Container.php(738): Laravel\Lumen\Application->Laravel\Lumen\{closure}()
#5 /var/www/html/polr/vendor/illuminate/container/Container.php(631): Illu...; PHP message: PHP Fatal error:  During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Http\Request::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/polr/vendor/illuminate/http/Request.php:850
Stack trace:
#0 /var/www/html/polr/vendor/illuminate/http/Request.php(14): Laravel\Lumen\Application->Laravel\Lumen\{closure}()
#1 /var/www/html/polr/vendor/composer/ClassLoader.php(444): include('...')
#2 /var/www/html/polr/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile()
#3 /var/www/html/polr/vendor/laravel/lumen-framework/src/Application.php(712): Composer\Autoload\ClassLoader->loadClass()
#4 /var/www/html/polr/vendor/illuminate/container/Container.php(738): Laravel\Lumen\Application->Laravel\Lumen\{closure}()
#5 /var/www/html/polr/vendor/illu

From trying to load /login

2024/01/21 21:34:24 [error] 24186#24186: *20 FastCGI sent in stderr: "PHP message: PHP Fatal error:  During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Config\Repository::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/polr/vendor/illuminate/config/Repository.php:118
Stack trace:
#0 /var/www/html/polr/vendor/illuminate/config/Repository.php(9): Laravel\Lumen\Application->Laravel\Lumen\{closure}()
#1 /var/www/html/polr/vendor/composer/ClassLoader.php(444): include('...')
#2 /var/www/html/polr/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile()
#3 /var/www/html/polr/vendor/laravel/lumen-framework/src/Application.php(524): Composer\Autoload\ClassLoader->loadClass()
#4 /var/www/html/polr/vendor/illuminate/container/Container.php(738): Laravel\Lumen\Application->Laravel\Lumen\{closure}()
#5 /var/www/html/polr/vendor/illuminate/container/Container.php(631): Illu...; PHP message: PHP Fatal error:  During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Http\Request::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/polr/vendor/illuminate/http/Request.php:850
Stack trace:
#0 /var/www/html/polr/vendor/illuminate/http/Request.php(14): Laravel\Lumen\Application->Laravel\Lumen\{closure}()
#1 /var/www/html/polr/vendor/composer/ClassLoader.php(444): include('...')
#2 /var/www/html/polr/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile()
#3 /var/www/html/polr/vendor/laravel/lumen-framework/src/Application.php(712): Composer\Autoload\ClassLoader->loadClass()
#4 /var/www/html/polr/vendor/illuminate/container/Container.php(738): Laravel\Lumen\Application->Laravel\Lumen\{closure}()
#5 /var/www/html/polr/vendor/illu

Context

Trying to keep system code up to date

Your Environment

  • Version or latest commit hash (git rev-parse HEAD):
    2.3.0b downloaded from github releases page

  • Environment name and version (e.g. Chrome 39, PHP 7.0, etc):
    Ubuntu server running Focal 20.04LTS (same issue persists upon upgrade to Jammy 22.04LTS)
    NGINX (nginx version: nginx/1.18.0 (Ubuntu))
    PHP 8.3 (PHP Version 8.3.2-1+ubuntu20.04.1+deb.sury.org+1)

@fleish
Copy link
Author

fleish commented Jun 24, 2024

@cydrobolt any chance you could take a look at this? I just got bit by it again when I blindly ran an apt autoremove which pulled the php7.4 packages in favor of php8.3. I restored php7.4 to fix, but since that's been EOL since November 2022 it would be great to be able to upgrade and still have polr be functional. Thanks in advance.

@redlukas
Copy link

redlukas commented Aug 7, 2024

running into the same issues, compatibility with PHP > 8 would be greatly appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants