Skip to content

magento man

PHP Fatal error: Cannot use ::class with dynamic class name in /home/magento/web/MYWEBSITE/public_html/vendor/laminas/laminas-mail/src/Message.php

When I ran the command php bin/magento s:s:d -f while upgrading Magento from 2.4.2 to 2.4.4, I get the following error. PHP Fatal error: Cannot use ::class with dynamic class name in /home/magento/web/magento2.perfectmakeupmirrors.com/public_html/vendor/laminas/laminas-mail/src/Message.php on line 394 I picked up the… Read More »PHP Fatal error: Cannot use ::class with dynamic class name in /home/magento/web/MYWEBSITE/public_html/vendor/laminas/laminas-mail/src/Message.php

Magento2.4.2: how to add sort order filter in order collection?

I’m trying to add sort order filter in my order collection as you can see in this piece of code $collection = $this->orderCollectionFactory->create() ->addAttributeToSelect(‘*’) ->addAttributeToFilter(‘created_at’, array(‘from’ => $from, ‘to’ => $to)) ->addAttributeToFilter(“consignment_status”, $orderStatus, “eq”) ->addAttributeToFilter(“status”, $statusToGet, “in”) ->setPageSize($this->_consignmentHelper->getGeneralPageSize()) ->setOrder(‘entity_id’, ‘DESC’)… Read More »Magento2.4.2: how to add sort order filter in order collection?