<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif"><ul><li>Package dependencies are managed within composer itself e.g. Pear DB package is available in Composer (yes I know it's been superseded already by MDB2 but its an example) and is dependent on other Pear packages, except as developers we don't need to worry about those other dependencies as they are automatically handled.</li><li>Package updates can be handled very simply without the need to download the entire CRM again, so if a security issue is identified in for example Pear DB, in a couple of minutes it can be updated (in a non-breaking fashion because all packages adhere to semantic version numbering) - problem solved.</li><li>As Alan mentioned the autoload.php, which on a production environment is optimized for increased speed. </li><li>Using PSR-4 Namespaces and the autoload.php makes packages available application wide simply with the 'use' namespace syntax. (How many times have you gotten frustrated because include statements don't work as intended!)</li></ul><div>Yes there would be some complications around custom modules requiring other dependencies - I believe there are ways of calling composer to run composer commands as part of an installation script - this would need some further investigation though.</div><div><br></div><div>One of the biggest questions that needs to be answered is the intended audience for vTiger CRM going forward. Is it going to be designed for simple one-click install applications that anyone can download, or is it intended for technical/developer types who know/understand how to manage Composer installs / updates? </div><div>It would be possible to use Composer as part of the development process and then include the /vendor contents and everything else required inside the single ZIP download still. This would allow those who do not understand / have access to Composer to get SOME of the benefits but for those that do have access/knowledge can get ALL the benefits ?</div></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><p style="font-size:12.8px;color:rgb(80,0,80)"><span style="color:navy;font-family:Verdana,sans-serif;font-size:10pt">Martin Allen</span></p><p style="font-size:12.8px;color:rgb(80,0,80)"><b style="font-size:12.8px"><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(51,51,153)">01392 248692 - Main Office<br>01392 690659 - Direct Line</span></b><br></p><p style="font-size:12.8px;color:rgb(80,0,80)"><b><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(51,51,153)"><img width="288" height="65" src="cid:image001.png@01CFC1D6.1BCFF790" alt="signature2"></span></b><span style="color:rgb(31,73,125)"></span></p><p style="font-size:12.8px;color:rgb(80,0,80)"><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif;color:navy">Have you visited our website recently? <a href="http://www.clystnet.com/" style="color:rgb(17,85,204)" target="_blank">http://www.clystnet.com</a></span><span style="color:rgb(31,73,125)"></span></p><p style="font-size:12.8px;color:rgb(80,0,80)"><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif;color:navy"><br></span><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(153,153,153)">The information in this email is confidential If you are not the intended recipient, you must not read or use that information. This email and any attachments are believed to be virus free however no responsibility is accepted by Clystnet for any loss or damage arising in any way from receipt or use thereof. Clystnet Ltd (company reg number 7164503) is based at Silverdown Park, Fair Oak Close, Clyst Honiton, EX5 2UX</span></p></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 1 Oct 2020 at 23:44, nilay khatri <<a href="mailto:nilay.spartan@gmail.com">nilay.spartan@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">What I feel is that we can really do better dependent library management using composer.<div><br></div><div>The autoloader could be included in the Vtiger's Loader file.</div><div><br></div><div>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..</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 2, 2020 at 1:04 AM Alan Lord <<a href="mailto:alanslists@gmail.com" target="_blank">alanslists@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">For an old idiot like me, please could someone explain what the actual <br>
*benefits* of implementing composer in vtiger would be?<br>
<br>
I've made several modules for customers which require the weird <br>
namespace syntax and stuff and I have found that this is very trivial to <br>
support by creating an "AutoLoader" in my module and simply including <br>
it, e.g.<br>
<br>
> namespace PhpOffice;<br>
> <br>
> spl_autoload_register(function ($class) {<br>
>     if (substr($class, 0, strlen(__NAMESPACE__)) != __NAMESPACE__) {<br>
>         //Only autoload libraries from this package<br>
>         return;<br>
>     }<br>
>     $path = substr(str_replace('\\', '/', $class), 9);<br>
>     $path = 'modules/LSMyCustomModule/resources/PhpOffice' . $path . ".php";<br>
>     if (file_exists($path)) {<br>
>         require $path;<br>
>     }<br>
> });<br>
<br>
Maybe I am missing some of the other benefits, but I would like to know <br>
what benefits this would bring and how it would make my life easier?<br>
<br>
TIA<br>
<br>
Al<br>
<br>
<br>
On 01/10/2020 19:35, Matteo Baranzoni wrote:<br>
> Hi, my friend Francesco open discussion here: <br>
> <a href="https://discussions.vtiger.com/discussion/192211/official-php-composer-for-vtiger/p1?new=1" rel="noreferrer" target="_blank">https://discussions.vtiger.com/discussion/192211/official-php-composer-for-vtiger/p1?new=1</a><br>
> <br>
> And i just add it on hearken, i think that move php dependencies to <br>
> composer it was great improvement!<br>
> We can contribute in order to complete porting<br>
<br>
<br>
<br>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote></div>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote></div>