[3.0] Manage third party libs via composer
This is a simple POC for allowing SMF to handle their internal third party libraries via composer.
Some key features to take into consideration for this POC
- Composer is solely used by SMF, that is, no access to mod authors. Mod authors can still ship their own vendor folder if they provide their respective configuration for it
- Modifications to Simplemachines/build-tools will have to be made to further remove hardcoded instances of third party libs, happy to do those changes myself if required.
- SMF release process will need to change to accommodate composer commands.
@MissAllSunday this is still marked as draft. You plan on more changes here?
@MissAllSunday this is still marked as draft. You plan on more changes here?
Nope, will mark it as ready and resolve the conflicts
Upon further testing, integrate_autoload doesn't work because it is called before settings are loaded. My fix https://github.com/live627/SMF2.1/commit/cfdfe79546def2a2de6e92b8d6b2d9924493c9a5 should I submit this as another PR?
Not really sure, it has to do with this PR so it makes sense to include it here but it could also be a separate PR specially if this one doesn't get merged, up to you. Best of options would be include it here and also send it as a separate PR I suppose.
I did a rebase from release-3.0 will take a look at this again
I've been waiting for this PR for 5 years. Please merge it soon.
3.0 is still in alpha so it will still be a while before it's ready for use on a production forum
I've been waiting for this PR for 5 years. Please merge it soon.
3.0 is still in alpha so it will still be a while before it's ready for use on a production forum
Probably just a spammer account, I wouldn't pay too much attention to it
Abuse reported.
Wildly inappropriate. First time I've seen anything like that on GH.
@MissAllSunday, can you also ensure that the readme is updated with relevant information for those looking to start using the development version? Nothing fancy, I would add a bullet to the how to contribute section.
@Sesquipedalian @jdarwood007
How about this approach? essentially removing the Autoloader file and the need to call Integration classes and instead, add the autoloader logic inside the already established closure which already checks and loads all what we need for using composer's autoloader. Since autoloading happens quite early and its a special case, I don't think we need to fully load Integration class to handle it, I used the same approach we already used when loading integrate_pre_include hooks on Config.
Regarding autoloading own classes, the SMF namespace was moved to composer's configuration, meaning all classes that has that namespace will still be autoloaded just like it was before this change. If there is a class that doesn't use the SMF namespace or lives outside its scope then it will have to be changed or its unique namespace to be added to composer's autoload setting
rebased against latest release-3.0
#8801 adds another library. So, figuring this out is becoming more important. Hopefully, we can get it tagged to a milestone.
Figuring this out will be needed if we want psr interoperability.
On Fri, Jul 25, 2025 at 2:24 PM Jeremy D @.***> wrote:
jdarwood007 left a comment (SimpleMachines/SMF#8240) https://github.com/SimpleMachines/SMF/pull/8240#issuecomment-3120408916
#8801 https://github.com/SimpleMachines/SMF/pull/8801 adds another library. So, figuring this out is becoming more important. Hopefully, we can get it tagged to a milestone.
— Reply to this email directly, view it on GitHub https://github.com/SimpleMachines/SMF/pull/8240#issuecomment-3120408916, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADJNN7XG34PC2PPL5BHNFL3KKOCHAVCNFSM6AAAAABITMPHWSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCMRQGQYDQOJRGY . You are receiving this because you commented.Message ID: @.***>
Figuring this out as in there is still something to be resolved on this PR?
As in, getting this assigned to a milestone; sorry for not being clear there.
This branch and release-3.0 has diverged quite significantly so a rebase was causing a lot of problems, better start fresh so a new PR was submitted at: https://github.com/SimpleMachines/SMF/pull/9015