I wrote an override to \vendor\magento\module-sales\Model\Order\Pdf\AbstractPdf.php
I did enable my override, I did run magento setup, di compile and flush the cache. Everything went smooth. But seems still using the old AbstractPdf.php. I don't see anything from the log, what can I do about it?
Thank you
Update Question I want to override AbstractPdf class in magento2
Here is my code
di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="Magento\Sales\Model\Order\Pdf\AbstractPdf" type="ProjectA\ShipmentPdf\Model\Order\Pdf\AbstractPdf" />
</config>
AbstractPdf.php(ProjectA/ShipmentPdf/Model/Order/Pdf/AbstractPdf.php
)
<?php
// @codingStandardsIgnoreFile
namespace ProjectA\ShipmentPdf\Model\Order\Pdf;
// use Magento\Eav\Model\Entity\Attribute as EntityAttribute;
// use Magento\Eav\Model\Entity\Attribute\AbstractAttribute;
// use Magento\Framework\DB\Select;
// use Magento\Framework\Model\AbstractModel;
// use Magento\Framework\App\Filesystem\DirectoryList;
// use Magento\Framework\DataObject;
/**
* Sales Order PDF abstract model
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class AbstractPdf extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
{
/**
* Insert logo to pdf page
*
* @param \Zend_Pdf_Page &$page
* @param null $store
* @return void
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
*/
protected function insertLogo(&$page, $store = null)
{
echo "override";die;
}
}
Before I was modify on the core and its work, then I roll it back and create above for to override
AbstractPdf.php