Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68121 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68349 invoked from network); 15 Jul 2013 14:51:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jul 2013 14:51:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=hw2.eternity@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=hw2.eternity@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.47 as permitted sender) X-PHP-List-Original-Sender: hw2.eternity@gmail.com X-Host-Fingerprint: 209.85.219.47 mail-oa0-f47.google.com Received: from [209.85.219.47] ([209.85.219.47:36386] helo=mail-oa0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 90/0A-21836-C6C04E15 for ; Mon, 15 Jul 2013 10:51:25 -0400 Received: by mail-oa0-f47.google.com with SMTP id m1so15980212oag.34 for ; Mon, 15 Jul 2013 07:51:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=m6c4gyapFwEx70KIv+e4B6TJz799+U+uMwYPrwU5KrA=; b=GfeEya1pb+gVGBrYKbkZ3Kp+pqSgbT3YB3s29CQP0yGsZQxHaKKTulih0EtvKl/sTy eCPxGO0hVg7tALAHF4JOhCd0OGjyMTK/R+GwBMfAdaYXxws7Gfi70SM/RMaQtr8Edo5x IwWLgdMMnDTJ9re7MfhdBemm6UUn6HZ87hRIhB06D/IUo5pEQj51q9/OETxpAioOtbG6 iDpXe1/Us1V8oSqAASk5j2f/jgOWh4zXAIKehxMGbJF5TcKG1s1/OaW3WTBUZmGWZeXA Z/Tk236kUs4rTeE+NQyVDJxI9GpacYw4nwK8JY5VoE2TdSUu1fGXIpm/iSVQ27tPMmGs P6Uw== MIME-Version: 1.0 X-Received: by 10.182.241.71 with SMTP id wg7mr43750077obc.50.1373899882152; Mon, 15 Jul 2013 07:51:22 -0700 (PDT) Sender: hw2.eternity@gmail.com Received: by 10.182.135.76 with HTTP; Mon, 15 Jul 2013 07:51:22 -0700 (PDT) In-Reply-To: References: <1373879683.17031.4.camel@guybrush> Date: Mon, 15 Jul 2013 16:51:22 +0200 X-Google-Sender-Auth: uEbbPhKWtuxOfqeaGMEiJs5heHs Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary=001a11c2e0f06ecbed04e18dfec4 Subject: Fwd: [PHP-DEV] PHP proposal on modular systems From: giuseppe.ronca2@gmail.com (Giuseppe Ronca) --001a11c2e0f06ecbed04e18dfec4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable ---------- Forwarded message ---------- From: Giuseppe Ronca Date: 2013/7/15 Subject: Re: [PHP-DEV] PHP proposal on modular systems To: Johannes Schl=FCter I'm not talking about this kind of problem... I think you know how a CMS works ... we've for example : * *CMS sources that are developed by Joomla devs ( i.g ) with theirs libraries.* * *Plugin (A) developed externally and installed by the final user, that includes inside its sources pclzip library ( the version and library doesn't matter) .* * *Component (B) developed externally and installed by the final user, that includes inside its sources pclzip library again.* Now ..since that library could not be installed in CMS by default, since devs of the Plugin (A) can't know if needed library is installed ( at their needed version ) inside another component...*we will have ofc a name collision when both plugin and component will be loaded.* It could be also a problem of various languages...but classes in local scope / nested are a known technique used by different languages..and php could implements it even better. In this way any CMS/Extension can arbitrary decide to use load their components/library in a private scope ( avoiding collision ) . i.g: class Loader { public static function LoadComponent () { local_include "foo_component/loader.php"; } } PS i'm not so practice with composer ( used few times ) but when modular systems , such as CMS , give the possibility to extends them with external components...i don't think that composer could solve this problem. 2013/7/15 Johannes Schl=FCter > On Sun, 2013-07-14 at 12:39 +0200, Sebastian Krebs wrote: > > > > Backward compatibility (or compatibility in general) between component > > is something the plugin maintainer should take care of, not the > > language. > > Ack. If a library becomes incompatible one should change the name or > namespace or something. > > Besides the pure compatibility issue "traditionally" we also had a > distribution problem in PHP - if a module requires a generic library > either the library had to be bundled or the user had to be sent for a > hunt and manually do it, which became complicated if there are further > dependencies and different libraries have the same dependencies ... for > that Composer is a quite good solution which > does a great job in handling projects and its dependencies. > > johannes > > --001a11c2e0f06ecbed04e18dfec4--