<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Dear Mohan,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">When you do composer install / update - it pulls all the bundles (like docs / tests etc...) that are not required on the production build. </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">These extra fat need to be removed when persisting in the repo.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Regards,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Prasad</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Aug 15, 2021 at 11:24 PM Sukhdev Mohan <<a href="mailto:s.mohan@myti.it">s.mohan@myti.it</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>
<div name="messageBodySection">
<div dir="auto">Hi Prasad,<br>
<br>
What do you mean by “optimize <span style="font-family:arial,helvetica,sans-serif">required files to reduce </span><span style="font-family:arial,helvetica,sans-serif">the source file-size.” ?</span><br>
<br>
<span style="font-family:arial,helvetica,sans-serif">When dev runs composer install on their machine, composer downloads the required projects and stores them under vendor. Then you just use Namespace to load the files you want - are you guys creating a vtiger namespace to avoid conflicts? - how would you like to optimise this code?</span><br></div>
</div>
<div name="messageSignatureSection"><br>
<div><font color="#C6C6C6"><b><span>Sukhdev Mohan</span></b></font><span></span><br>
<font color="#999999"><b><span>Developer</span></b></font><br></div>
</div>
<div name="messageReplySection">On 15 Aug 2021, 19:24 +0200, Prasad <<a href="mailto:prasad@vtiger.com" target="_blank">prasad@vtiger.com</a>>, wrote:<br>
<blockquote type="cite" style="border-left:thin solid grey;margin:5px;padding-left:10px">
<div dir="ltr">
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif">While working with RedBeanPHP, I found some advice on distancing </div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif">(runtime tight-coupling) with dynamic dependency management.</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><a href="https://sensorstechforum.com/arch-linux-aur-repository-found-contain-malware/" target="_blank">Arch Linux Incident</a> and more (read <a href="https://redbeanphp.com/index.php?p=/install" target="_blank">Composer section</a>)</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Even with use of composer we will have the need to carefully </div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif">freeze the dependencies and optimize required files to reduce</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif">the source file-size.</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Regards,</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Prasad</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Jul 28, 2021 at 11:47 AM Prasad <<a href="mailto:prasad@vtiger.com" target="_blank">prasad@vtiger.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">
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thank you all for sharing the feedback.</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Keep it coming.</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Jul 28, 2021 at 10:23 AM nilay khatri <<a href="mailto:nilay.spartan@gmail.com" target="_blank">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">My take:
<div><br></div>
<div>1. Agree with Ruben let's start with some selected dependencies first, which are currently actively maintained. I don't think we need to bundle them with Vtiger.</div>
<div>2. This is a general challenge. I am not fully aware, but cPanel for example has been doing some work to introduce support for composer. In general where composer is not available or you can not SSH, steps are provided to setup locally and then upload the files via FTP. It is generally well known thing to anyone who works on FTP only.</div>
<div>3. The packages do not have standard format, one can put the files in src other in dist as such there is no mechanism to do that. Moreover as per composer philosophy, a package must contain all required tests, docs etc. More on this here: <a href="https://github.com/composer/composer/issues/1750" target="_blank">https://github.com/composer/composer/issues/1750</a></div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Jul 27, 2021 at 11:12 PM Rubén A. Estrada Orozco <<a href="mailto:rulotec1@gmail.com" target="_blank">rulotec1@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">Ok, I understand Parsad,
<div><br></div>
<div>I think we could proceed little by little. Moving only some well known libraries at first like  PHPMailer which is actively being maintained. There are other libraries like CKFinder (if I recall the name correctly) which are still being used in vtiger but have been dead for a long time. I don't know what we should do about those. Find a replacement, I guess.</div>
<div><br></div>
<div>About how it would work with commercial hosting companies. Maybe create a build with the dependent libraries already there, but move the libraries out of the code repository.</div>
<div><br></div>
<div>About 3. I have no idea.</div>
<div><br clear="all">
<div>
<div dir="ltr">
<div dir="ltr">Saludos
<div><br></div>
<div>Rubén</div>
</div>
</div>
</div>
<br></div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Jul 27, 2021 at 7:34 AM Prasad <<a href="mailto:prasad@vtiger.com" target="_blank">prasad@vtiger.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">
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Dear Ruben,</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif">There were many questions on the composer adoption for long-term:</div>
<div class="gmail_default">
<ol>
<li style="font-family:arial,helvetica,sans-serif">Should we bundle the dependency (as they may vanish if not maintained) or change rapidly</li>
<li><font face="arial, helvetica, sans-serif">How w</font>ould composer work on hosting providers (who provide Cpanel or FTP) based site management?</li>
<ul>
<li>Will two different builds - one-with and one-without dependencies be maintained?</li>
</ul>
<li style="font-family:arial,helvetica,sans-serif">Composer install brings in dependent docs/tests etc... Is there a way to do optimal install?</li>
<ul style="font-family:arial,helvetica,sans-serif">
<li>How to cut-down the size of package - can this be achieved? Without this overall size of application zip will increase.</li>
</ul>
</ol>
<div>This discussion thread was opened to gather feedback before planning the way ahead.</div>
<div><br></div>
<div>Regards,</div>
<div>Prasad</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Jul 27, 2021 at 4:57 AM Rubén A. Estrada Orozco <<a href="mailto:rulotec1@gmail.com" target="_blank">rulotec1@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">Composer was supposed to make it into 7.4.
<div>Would it be a priority for 7.5? I think this was one of the most voted changes when Uma asked for input for 7.4.</div>
<div><br></div>
<div>
<div dir="ltr">
<div dir="ltr">Saludos
<div><br></div>
<div>Rubén</div>
</div>
</div>
</div>
<br></div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, Jul 23, 2021 at 11:18 AM Prasad <<a href="mailto:prasad@vtiger.com" target="_blank">prasad@vtiger.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">
<div dir="ltr">
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><span style="font-family:Arial,Helvetica,sans-serif">Since we are talking about composer, what exactly do you want to do?</span></blockquote>
<div><br></div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif">
<div dir="ltr">
<div style="font-family:arial,helvetica,sans-serif">
<div><span class="gmail_default"></span>How would composer work on hosting providers (who provide Cpanel or FTP) based site management?</div>
<div><br></div>
<div>
<div name="messageBodySection" style="font-family:Arial,Helvetica,sans-serif">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">You mentioned npm, are you guy’s touching frontend and migrating/integrating vue or some other library?</blockquote>
</div>
<br></div>
<div>I wanted to check how npm dependencies and sub-dependencies are handled for comparison. </div>
<div>Where some night-mares was cited due to version different in child-dependencies. Hope such are not the</div>
<div>case with composer - but wanted to still check.</div>
<div><br></div>
<div>Regards,</div>
<div>Prasad</div>
</div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, Jul 23, 2021 at 9:19 PM Sukhdev Mohan <<a href="mailto:s.mohan@myti.it" target="_blank">s.mohan@myti.it</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>
<div name="messageBodySection">
<div dir="auto">Hi,<br></div>
<ol type="1">
<li>When creating composer.json you’re inserting all the dependencies and you can lock versions of the libraries you are importing. Also look at PSR 4 for namespaces: in the same composer.json you define the namespace for your app.</li>
<li>Yup, I’d leave it upon admin the decision to update. Vtiger can advise and don’t proceed with update with dependencies aren’t met.</li>
<li>If core depends on something that you need to import/install how can you proceed with installation/update? In other projects when you install through composer it handles dependencies and proceeds to install. May be also vtiger should create it’s composer install?</li>
<li>Composer doesn’t needs to be installed globally, if the user who downloads composer has RWX access he can launch composer and download the dependencies, which are PHP code and binary files. These may require some components that are missing in the standard php installation (ie. ioncube), so this is upon the single user.</li>
</ol>
<div dir="auto"><br>
Since we are talking about composer, what exactly do you want to do?<br>
<br>
You mentioned npm, are you guy’s touching frontend and migrating/integrating vue or some other library?</div>
</div>
<div name="messageSignatureSection"><br>
<div><font color="#C6C6C6"><b><span>Sukhdev Mohan</span></b></font><span></span><br>
<font color="#999999"><b><span>Developer</span></b></font><br></div>
</div>
<div name="messageReplySection">On 23 Jul 2021, 16:39 +0200, Prasad <<a href="mailto:prasad@vtiger.com" target="_blank">prasad@vtiger.com</a>>, wrote:<br>
<blockquote type="cite" style="border-left:thin solid grey;margin:5px;padding-left:10px">
<div dir="ltr">
<div style="font-family:arial,helvetica,sans-serif">Team,</div>
<div style="font-family:arial,helvetica,sans-serif"><br></div>
<div style="font-family:arial,helvetica,sans-serif">I know I'm too late on this thread - did some homework using composer</div>
<div style="font-family:arial,helvetica,sans-serif">and npm packages got some questions that need assistance:</div>
<div style="font-family:arial,helvetica,sans-serif"><br></div>
<div style="font-family:arial,helvetica,sans-serif">1. With composer  - we are not expected to package the dependencies?</div>
<div style="font-family:arial,helvetica,sans-serif"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"></span>Would admin expected to (composer install) command-line and then launch the install.php?</div>
<div style="font-family:arial,helvetica,sans-serif"><br></div>
<div style="font-family:arial,helvetica,sans-serif">2. When a package need update in subsequent version of Vtiger</div>
<div style="font-family:arial,helvetica,sans-serif"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"></span>Would admin be expected to (composer update) command-line and then launch the migration.php?</div>
<div style="font-family:arial,helvetica,sans-serif"><br></div>
<div style="font-family:arial,helvetica,sans-serif">
<div>3. <span class="gmail_default" style="font-family:arial,helvetica,sans-serif"></span><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"></span>What if composer fails with unmet / unavailable packages - should install.php or </div>
<div>migration.php check if all dependencies was installed?</div>
<div><br></div>
<div>4. <span class="gmail_default" style="font-family:arial,helvetica,sans-serif"></span>How would composer work on hosting providers (who provide Cpanel or FTP) based site management?</div>
<div><br></div>
<div>Regards,<br>
Prasad</div>
</div>
<div style="font-family:arial,helvetica,sans-serif"><br></div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Aug 13, 2013 at 2:47 AM Adam Heinz <<a href="mailto:amh@metricwise.net" target="_blank">amh@metricwise.net</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">
<div>Has anyone on the vtiger team looked into the use of Composer to supply dependencies?  It would certainly make things a little more flexible, reduce the size of the download, and discourage the light hacking that tends to go on when you have the code checked into the main development branch.</div>
<div><br></div>
<a href="http://getcomposer.org/" target="_blank">http://getcomposer.org/</a><br>
<div><br></div>
<div>I recently wired our systems up to use it to pull in the Sauce Labs "sausage" Selenium web driver for our automated tests.  Doing a bit more research, it seems to be the <i>de facto</i> replacement for PEAR these days.</div>
</div>
_______________________________________________<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/" target="_blank">http://www.vtiger.com/</a><br></blockquote>
</div>
</div>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote>
</div>
</div>
_______________________________________________<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>
_______________________________________________<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>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote>
</div>
</blockquote>
</div>
_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br></blockquote>
</div>
</div>

_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote></div>