Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81191 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79714 invoked from network); 27 Jan 2015 02:21:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Jan 2015 02:21:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.175 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.216.175 mail-qc0-f175.google.com Received: from [209.85.216.175] ([209.85.216.175:61853] helo=mail-qc0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0B/C9-25415-336F6C45 for ; Mon, 26 Jan 2015 21:21:39 -0500 Received: by mail-qc0-f175.google.com with SMTP id c9so10156667qcz.6 for ; Mon, 26 Jan 2015 18:21:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=Mp+QznHnohKth9QB3nMkYs6ylWGLQAjB/y9shUcS4Z4=; b=Lbpi/bRW3SMqyVND6OYStee6vGZInWpnwASt95vbMXfCzppJlo5fK5oJhFAsQcy6Y0 xF8smvYtjDsAwAQDWtVbdMD0n1II+YPI67mGxpyb+o20NI8BImy3Fdiw2tw2MLHGBx8t BuD6tN3ho9OBvTcX1YCAtENAlMpavvqQPMohGXLPtpiMG1QRQOlKLJyDCFUboK5v0MRU pcMs1EJUPsG8UheHq0teJoDLyFDQi2nSflL9sbVcdZB5KYs0mnIDnNPC9ZknqWPQ1q8d gxR6uXmnL0SfiF0GsFy4sk2KkXzZC2iyJEEChkGvwJ2LA/5VeUBCG97P9Q38vuJn+nEl TsBQ== X-Received: by 10.140.20.226 with SMTP id 89mr3230574qgj.43.1422325296743; Mon, 26 Jan 2015 18:21:36 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.93.70 with HTTP; Mon, 26 Jan 2015 18:20:56 -0800 (PST) In-Reply-To: References: Date: Tue, 27 Jan 2015 11:20:56 +0900 X-Google-Sender-Auth: 6QFXa_zxmkzywH9SEC0whLUTi_o Message-ID: To: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11c1257e114bcc050d98ea77 Subject: Re: Deprecating all INI set/get functions and use ini_set/get() From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11c1257e114bcc050d98ea77 Content-Type: text/plain; charset=UTF-8 Hi all, On Sun, Jan 25, 2015 at 9:29 AM, Yasuo Ohgaki wrote: > I would like to propose INI set/get function deprecation, raise > E_DEPRECATED, > and make PHP_INI_MH() use the CODING_STANDARDS. > > For example, session module has following INI set/get functions > > - http://php.net/manual/en/function.session-save-path.php > - http://php.net/manual/en/function.session-module-name.php > - http://php.net/manual/en/function.session-cache-expire.php > - http://php.net/manual/en/function.session-cache-limiter.php > - http://php.net/manual/en/function.session-name.php > > There are 5 PHP functions for session module alone. Some of them include > runtime check, but > these checks can be done with PHP_INI_MH() by using state parameter. In > fact, runtime > check should be done in PHP_INI_MH() to avoid bugs. > > Use of ini_set/get() has following pros and cons > > Pros > - Less API, hence simpler API. > - Modules will be less buggy. > i.e. PHP_INI_MH() must handle "state" properly, but it tends to be > forgotten, 3rd party modules especially. > - Consistent coding style/API across modules, both internal and script. > - Reduced documentations. INI descriptions are only in INI section. > - Less documentations, hence less documentation bugs. > - Better documentation. All user needs to know will be in INI section. > - Awareness of INI setting use. Users are better to know they are using > INI. i.e. All INI values has the same limitations, > INI_SYSTEM/INI_PERDIR/INI_USER, stage limitations if any. > - (Please point it out more advantages) > > Cons > - Existing code modifications. (It's E_DEPRECATED. User may ignore.) > - (Please point it out more disadvantages) > > Comments are appreciated. > > Regards, > > P.S. Enum for PHP_INI_MH() "stage" parameter type is better in PHP7. IMO. > Since there isn't comment, I guess everyone on this list agree this proposal. Shall I start writing this RFC? Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a11c1257e114bcc050d98ea77--