Skip to content

PHP8.1.3. opcache bug with monolog/monolog #8164

Closed
@R4c00n

Description

@R4c00n

Description

Using monolog/monolog on PHP8.1.3 results in some very weird problems with the class vendor/monolog/monolog/src/Monolog/DateTimeImmutable.php not being found.
There's also already a bugreport in monolog Seldaek/monolog#1626, but it looks like this is an opcache bug.

Our deployment process looks like this:

  • Upload files to server into release directory
  • symlink release directory
  • reset opcache (opcache_reset)

After that, we get the PHP message: PHP Fatal error: Uncaught Error: Class "Monolog\DateTimeImmutable" not found in ... error.
Resetting opcache a second time fixes the bug and everything is fine until the next deployment.

PHP Version

PHP 8.1.3

Operating System

Debian

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions