Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Worker configuration with FRANKENPHP_WORKER_CONFIG watch #792

Copy link
Copy link
Closed
@tdumalin

Description

@tdumalin
Issue body actions

The worker mode can previously be disabled by overriding the FRANKENPHP_CONFIG, it is now imported by default in the CaddyFile and cannot be disabled

I have several issue on dev / prod with he worker mode:

Dev:

  • the dd() method is not woking anymore, the browser throw an error but not showing the dump result
  • Symfony is not throwing the custom error page for code syntax error but only show message like:
    "Parse error: syntax error, unexpected token "return" in /app/src/Controller/MainController.php on line 34"

Dev / prod

  • Handling class that should be "refreshed on every request" (can you help me to how we should handle case like this one):
<?php

namespace App\Service;

use App\Repository\ParameterRepository;

class MyService
{
    private ?int $myParam = null;

    public function __construct(private ParameterRepository $parameterRepository)
    {
    }

    public function getMyParam(): int
    {
        if ($this->myParam === null) {
            $this->myParam = $this->parameterRepository->getParameter('my_param');
        }

        return $this->myParam;
    }
}

In this example the getMyParam always return the initial entity instance even if it as been updated in database

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.