Your project should not use native PHP response functions 5

More information: https://insight.symfony.com/what-we-analyse/symfony.use_php_response_function

in src/PdfDocument.php, line 2543
  1. *
  2. * @throws PdfException if some data has already been output
  3. */
  4. protected function checkOutput(): void
  5. {
  6. if (\PHP_SAPI !== 'cli' && \headers_sent($file, $line)) {

    Using native PHP session or response functions (like headers_sent() here) is discouraged, as it bypasses the Symfony event system. Use the HttpFoundationResponse class instead.

    Time to fix: about 4 hours
    Read doc Open Issue Permalink
    Last edited by Laurent Muller
  7. throw PdfException::format('Some data has already been output, can not send PDF file (output started at %s:%s).', $file, $line);
  8. }
  9. if (false !== \ob_get_length()) {
  10. // the output buffer is not empty
  11. $content = \ob_get_contents();
in src/PdfDocument.php, line 2771
  1. protected function headers(string $name, bool $isUTF8, bool $inline): void
  2. {
  3. $disposition = $inline ? 'inline' : 'attachment';
  4. $encoded = $this->httpEncode('filename', $name, $isUTF8);
  5. \header('Pragma: public');

    Using native PHP session or response functions (like header() here) is discouraged, as it bypasses the Symfony event system. Use the HttpFoundationResponse class instead.

    Time to fix: about 4 hours
    Read doc Open Issue Permalink
    Last edited by Laurent Muller
  6. \header('Content-Type: application/pdf');
  7. \header('Cache-Control: private, max-age=0, must-revalidate');
  8. \header(\sprintf('Content-Disposition: %s; %s', $disposition, $encoded));
  9. }
in src/PdfDocument.php, line 2772
  1. {
  2. $disposition = $inline ? 'inline' : 'attachment';
  3. $encoded = $this->httpEncode('filename', $name, $isUTF8);
  4. \header('Pragma: public');
  5. \header('Content-Type: application/pdf');

    Using native PHP session or response functions (like header() here) is discouraged, as it bypasses the Symfony event system. Use the HttpFoundationResponse class instead.

    Time to fix: about 4 hours
    Read doc Open Issue Permalink
    Last edited by Laurent Muller
  6. \header('Cache-Control: private, max-age=0, must-revalidate');
  7. \header(\sprintf('Content-Disposition: %s; %s', $disposition, $encoded));
  8. }
  9. /**
in src/PdfDocument.php, line 2773
  1. $disposition = $inline ? 'inline' : 'attachment';
  2. $encoded = $this->httpEncode('filename', $name, $isUTF8);
  3. \header('Pragma: public');
  4. \header('Content-Type: application/pdf');
  5. \header('Cache-Control: private, max-age=0, must-revalidate');

    Using native PHP session or response functions (like header() here) is discouraged, as it bypasses the Symfony event system. Use the HttpFoundationResponse class instead.

    Time to fix: about 4 hours
    Read doc Open Issue Permalink
    Last edited by Laurent Muller
  6. \header(\sprintf('Content-Disposition: %s; %s', $disposition, $encoded));
  7. }
  8. /**
  9. * Encode the given name/value pair parameter.
in src/PdfDocument.php, line 2774
  1. $encoded = $this->httpEncode('filename', $name, $isUTF8);
  2. \header('Pragma: public');
  3. \header('Content-Type: application/pdf');
  4. \header('Cache-Control: private, max-age=0, must-revalidate');
  5. \header(\sprintf('Content-Disposition: %s; %s', $disposition, $encoded));

    Using native PHP session or response functions (like header() here) is discouraged, as it bypasses the Symfony event system. Use the HttpFoundationResponse class instead.

    Time to fix: about 4 hours
    Read doc Open Issue Permalink
    Last edited by Laurent Muller
  6. }
  7. /**
  8. * Encode the given name/value pair parameter.
  9. */