Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55927 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70611 invoked from network); 24 Oct 2011 16:45:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Oct 2011 16:45:19 -0000 Authentication-Results: pb1.pair.com header.from=pencap@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pencap@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.170 as permitted sender) X-PHP-List-Original-Sender: pencap@gmail.com X-Host-Fingerprint: 209.85.220.170 mail-vx0-f170.google.com Received: from [209.85.220.170] ([209.85.220.170:60408] helo=mail-vx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1E/24-43916-A1695AE4 for ; Mon, 24 Oct 2011 12:45:15 -0400 Received: by vcbfl10 with SMTP id fl10so5574891vcb.29 for ; Mon, 24 Oct 2011 09:45:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=vnVGkHWamVhqoziFTY+FoIL85Bhr6MPofI+VEwcL5y4=; b=gozT8em9yf7VLQVfsyiCSYQDs0HcB823/QvAAs9RdJcPsqG798Yzg+VhYjMkwc3SJW yDZRXnU8gkjiEJBM0MAZ1TZ/h31P9wM+cC8vGUhKuhFk0A8dnHcKDyAGEHTPQmkdohWI w2ZLe++1114UyKExAzp7pgqa08J1+rf8dI1Ho= MIME-Version: 1.0 Received: by 10.52.98.166 with SMTP id ej6mr18408316vdb.33.1319474712093; Mon, 24 Oct 2011 09:45:12 -0700 (PDT) Received: by 10.52.113.229 with HTTP; Mon, 24 Oct 2011 09:45:12 -0700 (PDT) In-Reply-To: References: <4E208FE7.4020606@sugarcrm.com> Date: Mon, 24 Oct 2011 11:45:12 -0500 Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary=20cf307ca05681233f04b00e25ae Subject: Re: [PHP-DEV] SplClassLoader From: pencap@gmail.com (Mike Willbanks) --20cf307ca05681233f04b00e25ae Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I've been following this but not on the internal portions of PSR-0... Why it is needed: Currently all of the implementations on the autoloading side is pushed in through a custom class or function inside of spl_autoload whereas the registered autoloading takes place. Currently each framework that utilizes this implements it within their own source code: * ZF: http://framework.zend.com/apidoc/1.11/db_Loader_Autoloader.html#%5CZend_Loa= der_Autoloader * Symfony: https://github.com/symfony/ClassLoader By standardizing this inside of an extension gains us 2 very major features (IMO): 1. Extension would force the standard but could be extended to add in various needs in the event there is additional functionality. 2. Easier for someone to implement PSR-0 without having to create a custom autoloader elsewhere The speed of this should give us a slight bump (only slight seeing as w/o the use of absolute paths apc doesn't really gain us anything). Overall; it should clean up the various implementations that are scattered about. Additionally; this should gain greater acceptance and an easier implementations by people creating their custom frameworks or leveraging something such as PSR-0. From the RFC prospective it does seem like many things are missing: 1. Examples * The easiest example being that of a folder structure and class naming suc= h as in PSR-0 with the instance of the autoloader. 2. Use Cases * Examples of framework cases... additionally extending framework libraries in separate folders. Regards, Mike On Mon, Oct 24, 2011 at 11:25 AM, Pierre Joye wrote: > hi, > > I'd to be in favor to include it. However I would like to hear more > from the people behind PSR-0 to be sure that it is actually what is > needed and to complete the RFC (it is rather missing real info, > examples and tests). > > Please also update the patch and attach it to the RFC. > > Cheers, > > On Mon, Oct 24, 2011 at 4:47 PM, guilhermeblanco@gmail.com > wrote: > > Hi internals, > > > > It's been a while since Stas accepted that, but it seems the class > > haven't been merged since then. > > What's the status of this? Can I expect SplClassLoader in 5.4.0? > > > > It seems it was approved, but wasn't merged and thread was lost in spac= e. > =3D( > > > > There's an RFC for it: https://wiki.php.net/rfc/splclassloader > > There's a patch for it: https://github.com/metagoto/splclassloader > > > > I'm not 100% sure the patch still works since it's been over 1 year > > since it was proposed... =3D\ > > > > Cheers, > > > > On Fri, Jul 15, 2011 at 4:07 PM, Stas Malyshev > wrote: > >> Hi! > >> > >> On 6/29/11 6:31 AM, Mike Willbanks wrote: > >>>> > >>>> There's a RFC covering this. There's a patch also. > >>>> > >>>> https://wiki.php.net/rfc/splclassloader > >>> > >>> > >>> This one seems to have fallen through the cracks? > >> > >> Well, nobody proposed it in time (especially not the RFC author :) > >> > >>> * The other implementation I could see is to modify spl_autoload to b= e > >>> able > >>> to pass it a parameter for the auto loading type - right now it will > >>> attempt > >>> to autoload everything lowercase (been brought up a few times). > >> > >> I think the class looks better. I think RFC needs to be expanded with > >> description of what the class actually does and how, and then if there > are > >> no objections I think we could take it into 5.4.0, since the > implementation > >> already exists. > >> -- > >> Stanislav Malyshev, Software Architect > >> SugarCRM: http://www.sugarcrm.com/ > >> (408)454-6900 ext. 227 > >> > >> -- > >> PHP Internals - PHP Runtime Development Mailing List > >> To unsubscribe, visit: http://www.php.net/unsub.php > >> > >> > > > > > > > > -- > > Guilherme Blanco > > Mobile: +55 (11) 8118-4422 > > MSN: guilhermeblanco@hotmail.com > > S=C3=A3o Paulo - SP/Brazil > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > -- > Pierre > > @pierrejoye | http://blog.thepimp.net | http://www.libgd.org > --20cf307ca05681233f04b00e25ae--