Skip to content

Nova Problems with PHP Opcache on PHP 8.2? #5227

@ziming

Description

@ziming
  • Laravel Version: 9.47
  • Nova Version: 4.20.2
  • PHP Version: 8.2.1
  • Database Driver & Version: MySQL 8
  • Operating System and Version: Ubuntu 22.04.1 LTS
  • Browser type and version: Chrome Latest Stable

Description:

Since upgrading to PHP 8.2, My production server have been throwing intermittent errors in the following forms when accessing the Nova admin section of my site. 2, they only happen at the admin section of my website, which is using Nova

  • Class Laravel\Nova\Metrics\MySqlTrendDateExpression cannot extend interface from
  • Class Illuminate\Database\Eloquent\Relations\MorphMany cannot extend interface from
  • Class Illuminate\Database\Eloquent\Relations\MorphPivot cannot extend final class tryFrom
  • Illuminate\Database\Eloquent\Relations\HasOne cannot use from - it is not a trait
  • Cannot instantiate interface from (Laravel\Nova\Fields\BelongsTo::makeFilter)
  • Cannot instantiate abstract class from (Laravel\Nova\Http\Requests\ResourceSearchRequest::filters)

From my observation, it seem to only happen when OPcache is turned on in PHP 8.2, if I turn off OPcache or downgrade to PHP 8.1, the problems seem to disappear. But if op cache is off, my nova admin is very slow

I have also tried to uninstall PHP 8.1 and ensure only PHP 8.2 runs on my server, disable & re enable op cache on my server

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions