Using Composer Packages in XenForo 2.1+ Addons Tutorial

Using Composer Packages in XenForo 2.1+ Addons Tutorial v2

No permission to download

Sim

Well-known member
Sim submitted a new resource:

Using Composer Packages in XenForo 2.1+ Addons Tutorial - How to use Composer packages in XenForo 2.1+ addons

Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.

XenForo v2 uses Composer behind the scenes to include certain packages used by the core software. As addon developers, we can include Composer packages in our own addons which will be autoloaded alongside those provided by the core.

In XenForo 2.0, we had to use extension points to do our...
Read more about this resource...
 

Xon

Well-known member
@Sim I recommend adding hashes.json and _metadata.json to the ignore list. Committing either of these into git is a nightmare if you need to work with another developer or rebase/merge at all.

I would also recommend a .gitattributes file with the contents;
Code:
*.php text eol=lf
*.js text eol=lf
(This forces consistent line-endings on commit, regardless of git client configuration. Just makes things easier)
 
Top