[Vtigercrm-developers] Let's make 7.4 fruitful

nilay khatri nilay.spartan at gmail.com
Thu Oct 1 22:43:57 GMT 2020


What I feel is that we can really do better dependent library management
using composer.

The autoloader could be included in the Vtiger's Loader file.

The challenge would be if a custom module needs a library which is not
included as default, so then how do we package the extension..

On Fri, Oct 2, 2020 at 1:04 AM Alan Lord <alanslists at gmail.com> wrote:

> For an old idiot like me, please could someone explain what the actual
> *benefits* of implementing composer in vtiger would be?
>
> I've made several modules for customers which require the weird
> namespace syntax and stuff and I have found that this is very trivial to
> support by creating an "AutoLoader" in my module and simply including
> it, e.g.
>
> > namespace PhpOffice;
> >
> > spl_autoload_register(function ($class) {
> >     if (substr($class, 0, strlen(__NAMESPACE__)) != __NAMESPACE__) {
> >         //Only autoload libraries from this package
> >         return;
> >     }
> >     $path = substr(str_replace('\\', '/', $class), 9);
> >     $path = 'modules/LSMyCustomModule/resources/PhpOffice' . $path .
> ".php";
> >     if (file_exists($path)) {
> >         require $path;
> >     }
> > });
>
> Maybe I am missing some of the other benefits, but I would like to know
> what benefits this would bring and how it would make my life easier?
>
> TIA
>
> Al
>
>
> On 01/10/2020 19:35, Matteo Baranzoni wrote:
> > Hi, my friend Francesco open discussion here:
> >
> https://discussions.vtiger.com/discussion/192211/official-php-composer-for-vtiger/p1?new=1
> >
> > And i just add it on hearken, i think that move php dependencies to
> > composer it was great improvement!
> > We can contribute in order to complete porting
>
>
>
> _______________________________________________
> http://www.vtiger.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20201002/b82a0f01/attachment.html>


More information about the vtigercrm-developers mailing list