Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68127 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2076 invoked from network); 15 Jul 2013 23:16:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jul 2013 23:16:19 -0000 Authentication-Results: pb1.pair.com header.from=hw2.eternity@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=hw2.eternity@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.52 as permitted sender) X-PHP-List-Original-Sender: hw2.eternity@gmail.com X-Host-Fingerprint: 209.85.219.52 mail-oa0-f52.google.com Received: from [209.85.219.52] ([209.85.219.52:56228] helo=mail-oa0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E4/72-20914-2C284E15 for ; Mon, 15 Jul 2013 19:16:18 -0400 Received: by mail-oa0-f52.google.com with SMTP id g12so25701oah.25 for ; Mon, 15 Jul 2013 16:16:15 -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=T6V2uDLNa+co42y7N4aul8DvWoWsD6DpyrcPmwR0IRA=; b=V8ZuElpbiNCeeg+oD3Mp+m91neW1Zd45PMA/H29WVwPOIRX2DKLMyN8SnBKXAbAMa2 HVFb8YasXI8LmTEjoAGgGg4tyK0UcCUw5LODSdTNiQpKWgS35sGJxMtdE6/XbqDN8497 Z9TKxxGhSHN1H0P1dpg2qah+TRJqceBx2oyf4yfxb7nzMEe4gJ7/4wPBTZ84+IDIBp2A yJxV1S4xb2h+DRdW4HAAdgDP1ExhAESZPrOINCzR+HwnIyhT+oBElKEVxLnG9h6RMvF4 An6cFXokEeCa0B4Bdgs3dJnvm/hQhvcVCLPpYqnn/I7j7qjqOqwn+S/IoikEtvcKGIgz W7aw== MIME-Version: 1.0 X-Received: by 10.182.241.71 with SMTP id wg7mr45211202obc.50.1373930175850; Mon, 15 Jul 2013 16:16:15 -0700 (PDT) Sender: hw2.eternity@gmail.com Received: by 10.182.135.76 with HTTP; Mon, 15 Jul 2013 16:16:15 -0700 (PDT) In-Reply-To: References: <1373879683.17031.4.camel@guybrush> Date: Tue, 16 Jul 2013 01:16:15 +0200 X-Google-Sender-Auth: 6FCMb0173BSroeaNOnWcfTKIdw4 Message-ID: To: internals@lists.php.net, krebs.seb@gmail.com Content-Type: multipart/alternative; boundary=001a11c2e0f013f07c04e1950c49 Subject: Re: [PHP-DEV] PHP proposal on modular systems From: giuseppe.ronca2@gmail.com (Giuseppe Ronca) --001a11c2e0f013f07c04e1950c49 Content-Type: text/plain; charset=ISO-8859-1 You can have multiple objects from the same type in different > implemenations in the same process? > No i'm not saying it. > What should happen, when I instanciate an object of "test" in version X and > pass it to a function, that expect it as version Y? To be consistent PHP > _must_ trigger an error too, if something from the locally included file > leaves its scope > class foo { > public static function bar () { > local_include "test.php" / / file which includes "test" class; > return new test (); // <-- error here > } > } > Because else it is not a local scope anymore. > the concept as i said is the same of "nesting" a class inside another ( or dynamically namespacing a file ) if two different components need "Library v1.0" and "Library v2.0" .. they will probably have same classes and namespaces ( but the code is not the same ). So how could we use both lib at the same time? Actually php can't load classes in a scope way so you can't do it in any way on global scope. nesting dynamically libraries inside a namespace or a class , we can create objects that can be accessed only throught their root namespace/class...something like: new Version1\ExternalLibrary\FooClass(); new Version2\ExternalLibrary\FooClass(); and also Composer will thankyou about it since they can solve automatically problems . > Backward compatibility (or compatibility in general) between component is > something the plugin maintainer should take care of, not the language. > Regards, > Sebastian i'm talking about backward compatibility of php version...not external plugins etc...i think that my idea doesn't require any change to php apps to adapt their code. --001a11c2e0f013f07c04e1950c49--