Skip to content

Instantly share code, notes, and snippets.

View lnoering's full-sized avatar

Leonardo Noering lnoering

View GitHub Profile
lnoering /
Last active December 14, 2022 19:17
[ Magento 2 ] Tips

Find your not compatible custom modules in Magento.

  • Version - ( 2.4.4 ~ 2.4.5-p1) add code in vendor/magento/framework/Reflection/MethodsMap.php line 143
if($paramReflection->detectType() == NULL)
lnoering /
Created November 16, 2022 15:26
[Magento Cloud] - Creating new environment to test the upgrade

Creating new environment to test the upgrade

1 - Create new branch from master

git checkout -b cloud/upgrade-2.4.5

2 - Push that branch to cloud

git push -u cloud cloud/upgrade-2.4.5:upgrade-2.4.5
lnoering /
Last active September 2, 2022 17:37
[Magento 2] - Get all attributes from product

Get all product attributes from entity

	eav_attribute AS ea
LEFT JOIN eav_entity_type as eat ON eat.entity_type_code = 'catalog_product'
lnoering /
Last active August 10, 2022 13:17
[Magento 2] - Backup of database or media folder in server
# Magento 2 - Backup scripts (database | media)
# @author Leonardo <>
# @version 1.0.0
# UnComment it if bash is lower than 4.x version
shopt -s extglob
lnoering /
Last active July 6, 2022 14:01
Magento 2 - Get All Attribute values from entity by id

Magento 2

Get all eav data from specific product

use magento;

SET @ENTITY_TABLE = 'catalog_product_entity';
SET @COLUMNID = 'sku';
lnoering /
Last active June 3, 2022 14:23
[Magento 2] - Docker from cloud running at local
lnoering /
Created March 15, 2022 20:07
[ GIT - Flow ] - Deploy flow with git and magento.

Only on the commerce cloud projects, it goes like this: When branches are ready to deploy to production:

  • create a release/[yyyymmdd] branch (e.g. release/20220315) from git master
  • merge feature branches that are ready to deploy to this release branch (push release branch to git repo)
  • merge the release branch to git production (push git production up to repo)
  • merge git production to cloud production
  • merge git production to git master
  • optional: merge cloud production to cloud master

for all the other "on-premise" projects, we

lnoering /
Last active July 26, 2023 21:21
Zip All modules from vendor

Zip all modules to install by artifact


Go to the vendor_name folder.

  • Ex.: cd vendor/amasty

Create the file at that folder.

  • Ex.:
lnoering /
Last active April 26, 2021 18:40
Add remotes to the same project.

Working with more than one remotes at the same project.


Add new remote

Command: bash git add remote <name> <url>