Skip to content

Declaration of setasign\Fpdi\FpdfTplTrait::setPageFormat($size, $orientation) should be compatible with TCPDF::setPageFormat($format, $orientation = 'P') #142

Closed
@williamdes

Description

@williamdes

Bug report

phpstan:

     Internal error: Internal error: Declaration of setasign\Fpdi\FpdfTplTrait::setPageFormat($size, $orientation) should be compatible with TCPDF::setPageFormat($format, $orientation = 'P') in file  
    InvoiceServiceImpl.php 

Code snippet that reproduces the problem

<?php

namespace App\xxx;

use iio\libmergepdf\Driver\Fpdi2Driver;
use iio\libmergepdf\Merger as PdfMerger;
use setasign\Fpdi\Tcpdf\Fpdi as FpdiTcpdf;

class InvoiceServiceImpl
{
    public static function getPDFMerger(string $title, string $subject, array $keywords): PdfMerger
    {
        $tcpdi = new FpdiTcpdf();
        return new PdfMerger(
            new Fpdi2Driver(
                $tcpdi
            )
        );
    }
}

composer.json

        "tecnickcom/tcpdf": "^6.4.4",
        "setasign/fpdi": "^2.3",
        "iio/libmergepdf": "^4.0",
        

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