Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68118 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51866 invoked from network); 15 Jul 2013 10:08:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jul 2013 10:08:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=sebastian@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=sebastian@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 93.190.64.238 as permitted sender) X-PHP-List-Original-Sender: sebastian@php.net X-Host-Fingerprint: 93.190.64.238 mail-2.de-punkt.de Linux 2.6 Received: from [93.190.64.238] ([93.190.64.238:39010] helo=mail-2.de-punkt.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D9/C7-21836-40AC3E15 for ; Mon, 15 Jul 2013 06:08:05 -0400 Received: from localhost (localhost [127.0.0.1]) by mail-2.de-punkt.de (Postfix) with ESMTP id BFA7D3A33A for ; Mon, 15 Jul 2013 12:08:01 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail-2.de-punkt.de Received: from mail-2.de-punkt.de ([127.0.0.1]) by localhost (mail-2.de-punkt.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KvQU-Doc+W6P for ; Mon, 15 Jul 2013 12:08:01 +0200 (CEST) Received: from [192.168.2.31] (p5DD69FB8.dip0.t-ipconnect.de [93.214.159.184]) (Authenticated sender: sb@sebastian-bergmann.de) by mail-2.de-punkt.de (Postfix) with ESMTPSA id 8DDD53A30E for ; Mon, 15 Jul 2013 12:08:00 +0200 (CEST) Message-ID: <51E3C9FB.4080107@php.net> Date: Mon, 15 Jul 2013 12:07:55 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: internals@lists.php.net References: <1373879683.17031.4.camel@guybrush> In-Reply-To: <1373879683.17031.4.camel@guybrush> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] PHP proposal on modular systems From: sebastian@php.net (Sebastian Bergmann) Am 15.07.2013 11:14, schrieb Johannes Schlüter: > 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. The original poster described a situation where an application uses component A and component B each of which depend on different versions of component C. Unless I missed a corresponding feature so far, Composer does not solve this problem. This problem could be solved, however, by encoding the version number in the namespace name: namespace vendor\component\v100 { class foo {} } namespace vendor\component\v110 { class foo {} } This would allow the usage of two versions of a component inside the same PHP process. -- Sebastian Bergmann Co-Founder and Principal Consultant http://sebastian-bergmann.de/ http://thePHP.cc/