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

Plugin should suppress PropertyNotSetInConstructor on Response #360

Open
laurentmuller opened this issue Jan 25, 2025 · 0 comments
Open

Comments

@laurentmuller
Copy link

I have derived the Response class like as follow:

public class PdfResponse extends Symfony\Component\HttpFoundation\Response
{
    // ...
}

PropertyNotSetInConstructor is raised for the following properties:

  • $content
  • $headers
  • $statusCode
  • $statusText
  • $version

If You check the class constructor of the Response:

public function __construct(?string $content = '', int $status = 200, array $headers = [])
{
    $this->headers = new ResponseHeaderBag($headers);
    $this->setContent($content);
    $this->setStatusCode($status);
    $this->setProtocolVersion('1.0');
}

You can see that the properties are set.

This is bit the same as #359

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

1 participant