[Vtigercrm-developers] Let's make 7.4 fruitful

Martin Allen martin.allen at clystnet.com
Fri Oct 2 07:13:58 GMT 2020


   - 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.
   - 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.
   - As Alan mentioned the autoload.php, which on a production environment
   is optimized for increased speed.
   - 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!)

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.

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?
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 ?

Martin Allen


*01392 248692 - Main Office01392 690659 - Direct Line*

*[image: signature2]*

Have you visited our website recently? http://www.clystnet.com


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


On Thu, 1 Oct 2020 at 23:44, nilay khatri <nilay.spartan at gmail.com> wrote:

> 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/
>
> _______________________________________________
> http://www.vtiger.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20201002/e94dae5e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 10550 bytes
Desc: not available
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20201002/e94dae5e/attachment-0001.png>


More information about the vtigercrm-developers mailing list