Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80175 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22015 invoked from network); 5 Jan 2015 15:41:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jan 2015 15:41:19 -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.51 cause and error) X-PHP-List-Original-Sender: kontakt@beberlei.de X-Host-Fingerprint: 74.125.82.51 mail-wg0-f51.google.com Received: from [74.125.82.51] ([74.125.82.51:50990] helo=mail-wg0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 85/00-21693-D90BAA45 for ; Mon, 05 Jan 2015 10:41:18 -0500 Received: by mail-wg0-f51.google.com with SMTP id x12so27766395wgg.10 for ; Mon, 05 Jan 2015 07:41:14 -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=dvB8ontAJs+XI5sQVxUQ6eVkdgI8k4xCFN7manoDHek=; b=Lw6i+Lq6VBcsIphG6vi6eEtcxJZ5k2k/m9Tn62jJJWpaBrpfY/SGsSVxQgmScfMD/+ hzXa4vDkFv4oXohjrE+e9RuyU4QrTaU24meYaXq0Ejh4RvpCL3PF1Kabk73/3uYEeOsG VNZqUTtKsnxdE/qoCUYxrm9rjzjNdt9rkGihwPpG2I0RW+MdZ3SCbmz44Pz7acbrIGKs hBR36+6uvG5cPK+z3JINclVlC/G//qmqFxcnbldyjGAF+llt1xEjMSn4wMVpNrGHyczc MxZZ3T+wqIPZwq4STBaMZFe8qgZB89ZoPn+IOvHlQZFqzycdRrpsdtUSDTBmRIlwkCqd 0wCQ== X-Gm-Message-State: ALoCoQmH76yGIRVcSsuswJ00pjrpcmW5ayhv1ElEWdZk6tYFdFNrgaqIDzjF0Y6OeXJa+FCCd75+ MIME-Version: 1.0 X-Received: by 10.180.75.199 with SMTP id e7mr27034200wiw.21.1420472473390; Mon, 05 Jan 2015 07:41:13 -0800 (PST) Received: by 10.194.57.73 with HTTP; Mon, 5 Jan 2015 07:41:13 -0800 (PST) X-Originating-IP: [77.180.7.62] In-Reply-To: References: Date: Mon, 5 Jan 2015 16:41:13 +0100 Message-ID: To: Pierre Joye Cc: PHP internals Content-Type: multipart/alternative; boundary=f46d0438957730a43d050be985c0 Subject: Re: [PHP-DEV] [RFC] Extension Prepend Files From: kontakt@beberlei.de (Benjamin Eberlei) --f46d0438957730a43d050be985c0 Content-Type: text/plain; charset=UTF-8 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. > 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. > Cheers, > Pierre > --f46d0438957730a43d050be985c0--