Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"We live, in a very kooky time." -- Herb Blashtfalt


devel / comp.lang.php / Re: Using multiple versions of a component

SubjectAuthor
* Using multiple versions of a componentArno Welzel
`- Re: Using multiple versions of a componentAce of diamonds

1
Using multiple versions of a component

<ji9gbiF1jsjU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=596&group=comp.lang.php#596

  copy link   Newsgroups: comp.lang.php
Path: i2pn2.org!i2pn.org!aioe.org!news.freedyn.de!speedkom.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: usenet@arnowelzel.de (Arno Welzel)
Newsgroups: comp.lang.php
Subject: Using multiple versions of a component
Date: Sat, 2 Jul 2022 02:04:01 +0200
Lines: 29
Message-ID: <ji9gbiF1jsjU1@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Trace: individual.net Yz8Z8dj5gXfAhrXWZ7v9ow80KeAQqU6XMJdUvG+NHfYB1U8flD
Cancel-Lock: sha1:CD+Qss3gWhp6h4djNwchPFI3Pvw=
Content-Language: de-DE
 by: Arno Welzel - Sat, 2 Jul 2022 00:04 UTC

Recently I came across the followig problem:

Using Composer to manage dependencies for a WordPress plugin, in
particular to include Twig to make it easier to generate the backend UI.

So the code looks similar to this:

<?php
namespace MyPlugin;

use Twig\Loader\FilesystemLoader;
use Twig\Environment;

require(__DIR__ . '/vendor/autoload.php');

....

However - this caused a problem with another plugin which also use Twig
but in a different version. As the other plugin was loaded first the
older version of it was already present. Also having multiple
autoloaders seems not to be a wise idea anyway.

Is there any "best practice" to deal with this or should one just not
try to do such things?

--
Arno Welzel
https://arnowelzel.de

Re: Using multiple versions of a component

<efc0ac53-9be5-4237-a13c-0550add12fe7n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=607&group=comp.lang.php#607

  copy link   Newsgroups: comp.lang.php
X-Received: by 2002:a05:6214:509e:b0:470:3fdf:73fc with SMTP id kk30-20020a056214509e00b004703fdf73fcmr36395013qvb.26.1657124370959;
Wed, 06 Jul 2022 09:19:30 -0700 (PDT)
X-Received: by 2002:a81:6054:0:b0:31c:97f4:b5c with SMTP id
u81-20020a816054000000b0031c97f40b5cmr19469702ywb.432.1657124370589; Wed, 06
Jul 2022 09:19:30 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.php
Date: Wed, 6 Jul 2022 09:19:30 -0700 (PDT)
In-Reply-To: <ji9gbiF1jsjU1@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=82.131.37.215; posting-account=HfIszAoAAAC8ch6q3uChpTWUALHCfEoF
NNTP-Posting-Host: 82.131.37.215
References: <ji9gbiF1jsjU1@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <efc0ac53-9be5-4237-a13c-0550add12fe7n@googlegroups.com>
Subject: Re: Using multiple versions of a component
From: he12091983@gmail.com (Ace of diamonds)
Injection-Date: Wed, 06 Jul 2022 16:19:30 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 37
 by: Ace of diamonds - Wed, 6 Jul 2022 16:19 UTC

Hey guy. Would You want to get rich with me doing programming? If yes, call me !!!!!!!!!

✆☎☏📱📞 : 372 53900660

Arno Welzel kirjutas Laupäev, 2. juuli 2022 kl 02:04:10 UTC+2:
> Recently I came across the followig problem:
>
> Using Composer to manage dependencies for a WordPress plugin, in
> particular to include Twig to make it easier to generate the backend UI.
>
> So the code looks similar to this:
>
> <?php
> namespace MyPlugin;
>
> use Twig\Loader\FilesystemLoader;
> use Twig\Environment;
>
> require(__DIR__ . '/vendor/autoload.php');
>
> ...
>
> However - this caused a problem with another plugin which also use Twig
> but in a different version. As the other plugin was loaded first the
> older version of it was already present. Also having multiple
> autoloaders seems not to be a wise idea anyway.
>
> Is there any "best practice" to deal with this or should one just not
> try to do such things?
>
>
> --
> Arno Welzel
> https://arnowelzel.de

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor