Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80180 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31123 invoked from network); 5 Jan 2015 16:34:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jan 2015 16:34:44 -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.216.49 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.216.49 mail-qa0-f49.google.com Received: from [209.85.216.49] ([209.85.216.49:63585] helo=mail-qa0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 68/D1-21693-22DBAA45 for ; Mon, 05 Jan 2015 11:34:42 -0500 Received: by mail-qa0-f49.google.com with SMTP id dc16so15123756qab.36 for ; Mon, 05 Jan 2015 08:34:39 -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; bh=ZU1YponhPX8hF3Q0fK4rF2Tzt8UKKmn+ELIVtm6KcI8=; b=cKXIGXtz5V/vThD9xCl537viPtKP2pzj9uHuTgLoGJr1tRJbtq4jG0E4iCKp7SFreQ fZdHkJLUlJgmqvSdbsklOqlNwMOXHu8VeRfAvMYmqwfD8kEGay6a6y1k+0tObGPeWfvU nyGbF/QYFifpFelfUjqNOlMnM2G8QiO2qLceadlj3P26SfJZmoExXL9WzsUNOYgNCNiE leSvz5K0dOCVTLuz984EMZkeVVjyJxjG1hJUd8jLJoHzyqvXlE+dHnrO6eeUamydixjH ZHZSsX/GmqL9/5taRdX3QF9rZw/7C9D5wAeOcb3y6L6Fw7ANp7FPa+oZVHkuHXM28kH1 adIA== MIME-Version: 1.0 X-Received: by 10.224.112.9 with SMTP id u9mr136940199qap.18.1420475679201; Mon, 05 Jan 2015 08:34:39 -0800 (PST) Received: by 10.140.22.106 with HTTP; Mon, 5 Jan 2015 08:34:39 -0800 (PST) Received: by 10.140.22.106 with HTTP; Mon, 5 Jan 2015 08:34:39 -0800 (PST) In-Reply-To: References: Date: Mon, 5 Jan 2015 08:34:39 -0800 Message-ID: To: Benjamin Eberlei Cc: PHP internals Content-Type: multipart/alternative; boundary=001a11c2d62e455f77050bea44f8 Subject: Re: [PHP-DEV] [RFC] Extension Prepend Files From: pierre.php@gmail.com (Pierre Joye) --001a11c2d62e455f77050bea44f8 Content-Type: text/plain; charset=UTF-8 On Jan 5, 2015 10:41 PM, "Benjamin Eberlei" wrote: > > > On Mon, Jan 5, 2015 at 3:02 PM, Pierre Joye wrote: >> >> Hi, >> >> On Jan 4, 2015 6:52 PM, "Benjamin Eberlei" wrote: >> > >> > Hey everyone, >> > >> > I want to open discussion on my RFC to strengthen the ability of extensions >> > to provide functionality to developers in both C **and** PHP code. >> > >> > For this extensions can add PHP files to a list of "prepend files" that are >> > part of every request execution exactly the same way the INI >> > auto_prepend_file functionality works: >> > >> > https://wiki.php.net/rfc/extension_prepend_files >> > >> > I propose implementation details in the RFC, but they are completely up to >> > discussion. I am even sure there is probably a better way than what I >> > proposed, because I am not familiar with the code. >> >> I understand the idea however I wonder what are the gains for the user? On any case the file has to be at the right place, etc. > > The shared object file has to be at the right place as well. Make install, build dependent. Include paths are runtime dependent. It makes a slight bigger difference. >> >> Also as it is internals only, it could be nicer to expose the prepend config using the existing directive with options like first, before, last for the insert position. > > This assumes that we have dependencies between extensions, which we don't have anyways. Now if extensions depend on each other the order is important. I assume that the loading order is also the order that the MINIT is called, which then would also put dependent php files in order. > >> >> While being at it, a similar feature can be added to auto prepend/append as it can be very useful in user land as well. > > Yes maybe, although I don't see the benefit for userland TBH, compared to extensions. Extensions are about declaring functions/classes, prepend is normally about actually "executing"/running code. Not always really. But the two are so similar than I have some hard time to see why it should be different. Feel free to enlighten me :) Cheers, Pierre --001a11c2d62e455f77050bea44f8--