Skip to content

Instantly share code, notes, and snippets.

View ProcessEight's full-sized avatar
💻
Working remotely

Simon Frost ProcessEight

💻
Working remotely
View GitHub Profile
@adamzero1
adamzero1 / README.md
Last active June 29, 2024 11:41
Get more descriptive error when DOM validation fails in Magento

Get a more debugable error message when DOM validation fails in Magento.

Original Error Message

1 exception(s):
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'arguments': This element is not expected.
Line: 1471
@hostep
hostep / composer-v2-support-older-magento2-versions.md
Last active January 27, 2024 10:37
Add composer v2 support to older Magento2 versions

Add composer v2 support to older Magento2 versions

Magento 2.3.7 and 2.4.2 ship with composer v2 support out of the box but as far as I can see the only thing that needs to happen is to use some more modern versions of certain composer plugins which are used by certain dependencies of Magento.

This means we should be able to add composer v2 support to older Magento2 versions as well if we get a bit creative.

See below for diffs of the composer.json files you can apply to your projects, be sure to keep a mental note of these things, they will need to maintained by yourself in case newer versions of these modules are released. And if one day you update to Magento 2.3.7 or 2.4.2 or higher, you can remove these changes again.

⚠️ Disclaimer: use these tricks at your own risk!

@scottsb
scottsb / m2-cache-cheat-sheet.md
Last active February 22, 2024 14:56
Magento 2 Cache Cheat Sheet

Magento 2 Cache Cheat Sheet

This page lists what caches or directories you will need to clear to apply various types of changes. It is consolidated and adapted from the complete official documentation on directories and caches.

💁 If your development environment supports it, you are better off using Vinai's automatic cache cleaner. As of this writing, the primary reason why it might not work is if your code is hosted on a NFS share (common with Vagrant).

@leek
leek / _Magento2_DeleteTestData.md
Last active June 20, 2024 06:48
Magento 2 - Delete All Test Data

These set of scripts are for Magento 2. For Magento 1, see this Gist.

@ProcessEight
ProcessEight / Debug API requests.md
Last active January 18, 2021 13:20
Example scripts showing how to debug API calls with Xdebug

Debugging with Xdebug

Debug from the command line in Xdebug

Just export the XDEBUG_CONFIG variable:

export XDEBUG_CONFIG="idekey=PHPSTORM"

Remember to enable Xdebug first:

@ProcessEight
ProcessEight / Composer cheatsheet.md
Last active December 19, 2022 02:50
Composer cheatsheet: Common Composer tasks
@ProcessEight
ProcessEight / Magento.md
Last active April 4, 2022 13:22
Magento 1 Cheatsheet: Common Magento 1 tasks

Magento Cheatsheet (For Magento 1)

Database operations

Download Sonassi database helper

wget sys.sonassi.com/mage-dbdump.sh && chmod +x ./mage-dbdump.sh

Download Magerun