Composer implementation

The idea is to fully integrate composer in OSClass.
Please comment below if you have a different view or understanding and let’s make a great implementation.

There are many approaches we could follow. However, we should have different strategies for 3.x and 4.x (or any other name for future major version)

For the 3.x version and to keep backward compatibility, I think the best would be to:

  • Remove libraries files from OSCclass repository
  • Load libraries via composer
  • Add composer call into Installer

For the 4.x version, we will probably have breaking changes as this will change the project structure.
The idea is to split the codebase, initially in 3 parts and independent repositories:

  • Platform
  • Core
  • Admin
  • Plugins

This is the entry-point in which people will use OSClass, install plugins, languages, etc.
The composer will know and load Core and Admin repositories.

As the name says, it is the core of the system.
We basically move everything from /oc-includes/osclass to this repo.
As there is a lot of legacy, we need to map all the files to be able to autoload.

The admin part should have its own repository as well.

We should have a better plugin system loaded via composer
Need to mature the idea and shouldn’t be in the initial release of version 4.

Lemme know your thoughts :slight_smile:

1 Like

I was doing some tests and thinking about it, I think the composer should be a step before the installer.
I will add a Shell or Phar to do a preparation, a step before people go to the installation wizard.

Also, what is the Build process? For the zipfiles, I would like to add the composer install during build time.

For the build I currently have a dirty simple shell script which does two things invoke git-archive for latest tag and then copy theme-bender content from GitHub in oc-content/themes/bender. It also adds tag in file name.
Nothing special about that script I hope you can replicate that easily.

For 4.x or Next build
I am up for those change I was hoping to do the same in future with some help.
I am up for these changes because it will alleviate the upgrade process of osclass core and core thems and plugins.

1 Like