How to fix PHP ArgumentCountError: array_merge() does not accept unknown named parameters?

Recently I have faced an issue in the project while upgrading PHP version 7.* to 8.* and also upgrade composer version 1 from composer 2.

When I checked the pages in the latest version of PHP that used the array_merge(…$this->items) function in PHP 7.4, I got an error like given,

ArgumentCountError: array_merge() does not accept unknown named parameters in Items.php class.

Continue reading “How to fix PHP ArgumentCountError: array_merge() does not accept unknown named parameters?”

Magento 2 truncate string to specific limit.

Magento 2 You can truncate the string using Magento best practice.

By default, You can truncate the string using substr() PHP method.

Magento gives Out of the box feature for a truncate string using Magento\Framework\Stdlib\StringUtils class. Continue reading “Magento 2 truncate string to specific limit.”

Complete List of All SSH CLI Commands Magento 2.

A Complete list of useful SSH CLI Command in Magento 2 that will be useful in daily routine for development tasks.

Magento comes with multiple Commands by default and if you want to use any of the commands, You have to type the command in CLI, bin/magento help
Continue reading “Complete List of All SSH CLI Commands Magento 2.”