Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80262 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96904 invoked from network); 8 Jan 2015 00:51:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Jan 2015 00:51:01 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.178 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.217.178 mail-lb0-f178.google.com Received: from [209.85.217.178] ([209.85.217.178:59221] helo=mail-lb0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 95/31-22693-374DDA45 for ; Wed, 07 Jan 2015 19:51:00 -0500 Received: by mail-lb0-f178.google.com with SMTP id u14so409748lbd.9 for ; Wed, 07 Jan 2015 16:50:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=8CWd5rx2a5kqY5DJhqfcxMTA2bUwJZz5j1HvCaN22bY=; b=dmehQ5JGp9d/irO+K47G8n4Hlq0ahF+Tf5oegldByjJMsVaxFeG4OU1ZvkvEY5egiH weGmzHaiXq8Gk64zfQD2R1L/mRtw0eokS1uqjdLFb8b05t9oYmeqQ1irv/0kAhALpwjy +P7OBAzSqV8PryBV9fAzXYZNna8h2rdrDV4gQm489gDIoTfAxtBOTk+vgKOB8Y3EP3sQ 8rU+RE8Gd71pBVKtgvmFAaR3NZYxVvYtGm2GAsvCYPwMUYSU5tU9JDiM1a9DO506XrKa HCFQDjZlcobiJSXfsE0LawRvXGv6TP8jvWVl4ZnCuDCyL4lIhvU5xkQBVuw//k16BJ+s pkhg== MIME-Version: 1.0 X-Received: by 10.152.23.98 with SMTP id l2mr9333857laf.46.1420678256789; Wed, 07 Jan 2015 16:50:56 -0800 (PST) Received: by 10.112.154.133 with HTTP; Wed, 7 Jan 2015 16:50:56 -0800 (PST) In-Reply-To: <00a201d02ac7$406a4830$c13ed890$@tekwire.net> References: <54AAF98B.4020709@gmail.com> <001b01d029bb$fa687fc0$ef397f40$@tekwire.net> <00a201d02ac7$406a4830$c13ed890$@tekwire.net> Date: Wed, 7 Jan 2015 16:50:56 -0800 Message-ID: To: francois@tekwire.net Cc: Derick Rethans , PHP internals , Sara Golemon , Stanislav Malyshev , Benjamin Eberlei Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Extension Prepend Files From: pierre.php@gmail.com (Pierre Joye) hi Fran=C3=A7ois, On Wed, Jan 7, 2015 at 2: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 a= ny >> other script, except that nothing can be done with them, not even disabl= e >> 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 in = extensions and make them available via a common stream wrapper can be usefu= l. What I don't like is the fact to execute them automatically at every RIN= IT. I prefer to let the extension free to load its PHP code when its logic = decides it is needed. Or let the extension defines a script to prepend, preload, whatever we end to do. It is however important, as you mentioned, to leave the engine and the user the ability not to load it, at all. >> Pickle integration is almost finished, that solves your worries about co= mposer and pecl extensions. > > Both mechanisms can coexist. They are not incompatible and probably fulfi= ll different needs. Indeed, but I did not refer to separate releases here but the ability for Composer to install extension. If a script is part of an extension release, it will be installed as well. > 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 future)= . I suppose you mean to the extension PHP code, right? That's what is done already for include_path for example. It has to be system and optionally loaded. > At install time, we could say that every files under /php/install, if this dir exists, are installed there. > > It is just an example but does it correspond to the mechanism you were th= inking about ? Yes, and it is very easy to do and maintained. At least compared to bundling script into binaries. Our build scripts already support installing custom files out of the box for example. > What is not clear to me is the question of packaging/versioning/deploymen= t. 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 parti= al packages ? or do you deliver 2 packages with independent versioning and = dependencies together ? In this case, should we define a versioning convent= ion for both packages ? It is up to the maintainers. I would not do separate releases as it makes it hard to track or support. Doing more releases even to "only" fix the PHP glue codes sounds like a good practice anyway. Cheers, --=20 Pierre @pierrejoye | http://www.libgd.org