Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80270 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34070 invoked from network); 8 Jan 2015 11:41:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Jan 2015 11:41:14 -0000 Authentication-Results: pb1.pair.com smtp.mail=kontakt@beberlei.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=kontakt@beberlei.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain beberlei.de from 74.125.82.48 cause and error) X-PHP-List-Original-Sender: kontakt@beberlei.de X-Host-Fingerprint: 74.125.82.48 mail-wg0-f48.google.com Received: from [74.125.82.48] ([74.125.82.48:38076] helo=mail-wg0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3D/A1-21915-9DC6EA45 for ; Thu, 08 Jan 2015 06:41:14 -0500 Received: by mail-wg0-f48.google.com with SMTP id l2so2096908wgh.7 for ; Thu, 08 Jan 2015 03:41:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=LZJZlby2IUyX8lvaWblTwYmWffuK1eJ83QYicGTmlAw=; b=Mn2XeFuQwn/7mvo6nxUHBcQr2nhouD8DADnARvoDxBeRJDDckvY62v2ub8HtENTsEJ NdV9tZG0kBmtW/JOiIsfKnDZCWHQIshyg50qpO/ExHNBmSYv6ZPb1o6yWFou2FFICFxm 9sIYcjdJkUJA6S4+KId44GU0w6xsL8m9kNCxSxQG1sT7G/hLZHhf8+K2dOEEAcfGutAH T+mB8aZCMUmj5a7Q9wlMNavLRrPjRzj2ltSsEFkHu9gqi8qFSOI5RrC7BP0dEzC7Rujz PJt892bYV+VKYIyALsbtptnDz/HmWkmMZp/2epE2Am7fc/RTfWUy4jxCI3eamDr9jx38 gpcQ== X-Gm-Message-State: ALoCoQkvip1XD9c2yABc+dCo2IKwSeM7sA26BJfnMFTXkJm51r3OPcYhUqUDPikwwwmBjcwOXijg MIME-Version: 1.0 X-Received: by 10.180.105.68 with SMTP id gk4mr18426950wib.30.1420717270318; Thu, 08 Jan 2015 03:41:10 -0800 (PST) Received: by 10.194.57.73 with HTTP; Thu, 8 Jan 2015 03:41:10 -0800 (PST) X-Originating-IP: [77.180.19.30] In-Reply-To: <00a201d02ac7$406a4830$c13ed890$@tekwire.net> References: <54AAF98B.4020709@gmail.com> <001b01d029bb$fa687fc0$ef397f40$@tekwire.net> <00a201d02ac7$406a4830$c13ed890$@tekwire.net> Date: Thu, 8 Jan 2015 12:41:10 +0100 Message-ID: To: francois@tekwire.net Cc: Pierre Joye , Derick Rethans , PHP internals , Sara Golemon , Stanislav Malyshev Content-Type: multipart/alternative; boundary=f46d04426a603959b5050c22845a Subject: Re: [PHP-DEV] [RFC] Extension Prepend Files From: kontakt@beberlei.de (Benjamin Eberlei) --f46d04426a603959b5050c22845a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Jan 7, 2015 at 11:14 PM, Fran=C3=A7ois Laupretre wrote: > > De : Pierre Joye [mailto:pierre.php@gmail.com] > > > > ... here, > > it is proposed to bundle scripts that will be executed at runtime like > any > > other script, except that nothing can be done with them, not even disab= le > > them if not required (like using its own glue codes). > > I agree. Bundling scripts in extensions to execute them at each RINIT is, > IMO, not a good idea (mostly for performance reasons and lack of control, > as you note), but I keep thinking that a mechanism to embed PHP scripts i= n > extensions and make them available via a common stream wrapper can be > useful. What I don't like is the fact to execute them automatically at > every RINIT. I prefer to let the extension free to load its PHP code when > its logic decides it is needed. > To be honest, I don't see the use case of shipping optional PHP code inside an extension. As the user of an extension I want all the functions/classes to be available all the time, no matter if the extension developer wrote everything in C or in PHP. For optional code there is Composer/PEAR/php include path, this is already a solved problem. > > Pickle integration is almost finished, that solves your worries about > composer and pecl extensions. > > Both mechanisms can coexist. They are not incompatible and probably > fulfill different needs. > > You are asking for a standard path for plain files linked to an extension= . > As putting the shared library and plain files together is not a good idea= , > what about something like this : > > /lib/php/extensions/php/ > > A C macro can be defined to provide the path to the extension C code, in > order to avoid hardcoding it (this way, it could be modified in the futur= e). > > At install time, we could say that every files under > /php/install, if this dir exists, are installed the= re. > > It is just an example but does it correspond to the mechanism you were > thinking about ? > > What is not clear to me is the question of > packaging/versioning/deployment. If you consider the PHP glue code is > modified more often than the C code, which will be the most frequent case= , > how do you version/distribute partial packages ? or do you deliver 2 > packages with independent versioning and dependencies together ? In this > case, should we define a versioning convention for both packages ? > > Regards > > Fran=C3=A7ois > > > --f46d04426a603959b5050c22845a--