Skip to content

Plugin should suppress PropertyNotSetInConstructor on Response #360

@laurentmuller

Description

@laurentmuller

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

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