Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82952 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96712 invoked from network); 17 Feb 2015 12:41:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Feb 2015 12:41:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=lisachenko.it@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=lisachenko.it@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.41 as permitted sender) X-PHP-List-Original-Sender: lisachenko.it@gmail.com X-Host-Fingerprint: 74.125.82.41 mail-wg0-f41.google.com Received: from [74.125.82.41] ([74.125.82.41:42239] helo=mail-wg0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6A/12-19463-41733E45 for ; Tue, 17 Feb 2015 07:41:58 -0500 Received: by mail-wg0-f41.google.com with SMTP id b13so35178631wgh.0 for ; Tue, 17 Feb 2015 04:41:53 -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=N08PBrk+FeIMTdvtE7c/MpXz9PLPJ0UNftyCX0srPOU=; b=PBcU2QNgEvh21TLvArAWvmfBeqK0KE3S6jerBfX88BoVN+/taAdQpRRe3U8r3lM4UX WZqkD/dMS3of/i7zYznPOFvQnnEtd9FFCANZtuYj23dtQ1soA8nG8Nywp7eNHYzIn/21 YHjHkl3bvSbxtutPMMf8VPxNv6dm/bwfnYSe7Va8Tffp2d6ZLcZliYxY9WsucgEq2i2O RmzA7WCoyxeon5yUUZS4e80OLKyVzj+hCtF48bIfb5BBp5MPRMUVu2+++RV4f4Js+K3C IjlhrqkupM1dYsBbpLDISYVVqRg9vWwwSFrQTmZiof1h9PUrkb1qlyqH8gV75KjugimH JAiQ== MIME-Version: 1.0 X-Received: by 10.181.13.14 with SMTP id eu14mr45069013wid.2.1424176913782; Tue, 17 Feb 2015 04:41:53 -0800 (PST) Received: by 10.194.154.229 with HTTP; Tue, 17 Feb 2015 04:41:53 -0800 (PST) In-Reply-To: References: Date: Tue, 17 Feb 2015 15:41:53 +0300 Message-ID: To: Benjamin Eberlei Cc: PHP internals list Content-Type: multipart/alternative; boundary=f46d04388eb70b1c96050f48077d Subject: Re: [PHP-DEV] [RFC][Discussion] Parser extension API From: lisachenko.it@gmail.com (Alexander Lisachenko) --f46d04388eb70b1c96050f48077d Content-Type: text/plain; charset=UTF-8 2015-02-17 15:29 GMT+03:00 Benjamin Eberlei : > Well not really, depending on the path towards a require a parser > extension is already registered or not. Or you have conditional > registration of extensions. So you could load a file with an extension > registered, but it still serves the old opcodes for that file. Technically, this will be possible, however, Parser Extensions should be registered ASAP during bootstrap process, near spl_autoload_register(), stream_wrapper_register(), stream_filter_register(), etc.. So, no conditional code hooks should be used for that. But this can be the consistent with stream wrappers, filters and autoloaders. Developer can decide what he need to enable some features. One more possible way for this RFC is to remove these register/unregister methods from the `Php\Parser\Engine` class and add an option to the php.ini with list of classes to load. This option can be adjusted then per project/directory. Is this more suitable? Thanks! --f46d04388eb70b1c96050f48077d--