Reply New Topic
2025/1/5 11:40:58
#1
Offline
Webmaster

Integration of Composer in the core

Composer is the de-facto package system for PHP. In the TNG branch, we are using it extensively, and it allows us to re-use basic code from other people, and integrate libraries with much less overhead than we have today.

Also, it would free us from the quite complex code around the autoloader. Not only the autoloader itself, but the code taking care of loading classes and registering classes for modules and such. Composer could be used to handle that.

I have done a proof of concept in removing the autoloader and replacing it with Composer, and that worked out allright.

I've also started work on listing modules using composer functionality in the admin screen. After that, it's performing actions on those modules : installing/uninstalling/updating.


_________________

Me on OpenHub


2025/1/12 12:20:37
#2
Offline
Home away from home

Re: Integration of Composer in the core

I like this approach - adding the functionality and allowing module developers to begin the work to enable it and leverage it in their modules in advance. It will make the move to TNG much easier and smoother.


_________________
Christian Web Resources
Facebook

2025/1/14 19:25:01
#3
Offline
Webmaster

Re: Integration of Composer in the core

I agree, that was one of the mistakes we made in our previous approach to 2.0 : we were looking for a big bang approach.

This way, we can gradually introduce functionality and change without breaking too much at once

On the subject of the composer integration, I have a working proof of concept for the included libraries, but if we want to leverage this for our addons, this will need more work

  • trigger a re-build of the composer autoloader for every module action
  • this means integrating composer as a library
  • re-write the detection of modules using composer instead of the way it is done now (folder-based)

Let's see where I get by the time we ship ImpressCMS 2.1


_________________

Me on OpenHub


2025/1/17 17:21:13
#4
Offline
Home away from home

Re: Integration of Composer in the core

Sounds reasonable.

What would be the migration path? Would composer support be added as another library like IPF was, supporting both types of modules?


_________________
Christian Web Resources
Facebook

Reply New Topic extras
 Previous Topic   Next Topic
You can view topic.
You can start a new topic.
You can reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You can post without approval.