Skip to content

Magento autoloader strategy for patching Mage.php and adding composer autoloader

Notifications You must be signed in to change notification settings

ashtonsax/composer-patcher

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Patcher

Applying generic patches using the patch tool using Composer's script feature.
The patching is idempotent as much as the patch tool is, meaning patches will not be re-applied if patch decides not to.

Project setup

a) Create composer-patches directory in project root.

b) Place .patch patches in composer-patches

c) Additional scripts callbacks need to be added for automatic patching on install or update (root package only):

  "scripts": {
    "post-install-cmd": "Inviqa\\Command::patch",
    "post-update-cmd": "Inviqa\\Command::patch"
  }

You can use whatever Composer Command event you want, or even trigger the events manually.
Again, note that only Command events are supported. Please check the above link to see which ones are they.

d) the patch tool must be available

About

Magento autoloader strategy for patching Mage.php and adding composer autoloader

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%