In Symfony I'm using TCPDF package for creating PDF documents and I have it installed via composer. I need to modify TCPDF
class a little before I use it in production, so I created MyPDF
class that extends TCPDF
class and that is stored in the same file as original class (Symfony-project/vendor/tecnick.com/tcpdf/tcpdf.php
).
Problem is, that every time I update composer and new version of TCPDF package is installed, file tcpdf.php
is being replaced, so class MyPDF
disappears. What is consider as best practice for creating and storing such classes?