Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87646 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81923 invoked from network); 5 Aug 2015 14:29:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Aug 2015 14:29:18 -0000 Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.178 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 209.85.212.178 mail-wi0-f178.google.com Received: from [209.85.212.178] ([209.85.212.178:35279] helo=mail-wi0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 87/2E-11835-DBD12C55 for ; Wed, 05 Aug 2015 10:29:17 -0400 Received: by wibxm9 with SMTP id xm9so211092881wib.0 for ; Wed, 05 Aug 2015 07:29:14 -0700 (PDT) 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:cc:content-type; bh=N3vahBOAq5IUQO+hieQiGX1arG3IfVCtXo9GrLx09X4=; b=fDX4jTWWfYKQP3E9v2ext3lBcDzIvu5uLNWazTcNY8CSJ0gyZJx1JqRn6kj8Xmj2tM lsH6n9c7cGUB12Oq8gBYW5PkPz4N1fsiQDRGfdnaXpvVt/KxsAqsdl/EShHAmMqiZuDX cXrmW/Z00NSG77Hm+B3eR5X4YeJ/06nQnqHqAlOb4D3cXICLGdZUPQEjVqdJMHpnqnsA TVf3PUxBnUBXu0SKrpRt0Yqp9Dll+aZyuzok+mBSuM1edxClgLpBkMyV/+1jttk6mOMe FU5BGWyANqe9MM8ERREys7XISeKo6yR+9sJ9V8Q2MTutYUt2rbDOUpr6VchrSirzxcl2 5Pxw== X-Received: by 10.194.192.99 with SMTP id hf3mr19878856wjc.78.1438784954292; Wed, 05 Aug 2015 07:29:14 -0700 (PDT) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.194.120.198 with HTTP; Wed, 5 Aug 2015 07:28:34 -0700 (PDT) In-Reply-To: References: Date: Wed, 5 Aug 2015 16:28:34 +0200 X-Google-Sender-Auth: B2eJxT_OvTbSHtlqXegakwTA5Rg Message-ID: To: Ferenc Kovacs Cc: Nicolas Grekas , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=047d7bae46961bdf35051c913adf Subject: Re: [PHP-DEV] realpath() on MacOSX doesn't normalize the case of characters From: jpauli@php.net (Julien Pauli) --047d7bae46961bdf35051c913adf Content-Type: text/plain; charset=UTF-8 On Tue, Aug 4, 2015 at 4:39 PM, Ferenc Kovacs wrote: > On Tue, Aug 4, 2015 at 2:22 PM, Nicolas Grekas < > nicolas.grekas+php@gmail.com > > wrote: > > > Hello, > > > > I reported this bug one year ago (https://bugs.php.net/67220) and it is > > now > > closed as "not a bug". I'd like this to be reconsidered. > > > > The documentation of realpath() says: > > > > > realpath() expands all symbolic links and resolves references to > '/./', > > > '/../' and extra '/' characters in the input path ***and returns the > > > canonicalized absolute pathname***. > > > > > > > the last part of this description is IMO what qualifies this behavior on > > MacOSX as a bug. > > > > I'm asking for this now because I spend many hours on Syfony trying to > find > > an efficient workaround, and this is far from easy. Here is the fastest > we > > found (it's a mix of scandir()+getcwd()+caching): > > https://github.com/symfony/symfony/pull/15443 > > > > If realpath were behaving on OSX the same as it does on Windows (and > > Linux), > > I could remove 60 lines of wtf lines. > > > > Do anyone else agree? > > > > Regards, > > Nicolas > > > > I do and commented on the ticket last year. > I just re-opened the issue. So the solution is weither we find a patch for the OSx case , or we patch the documentation to reflect the actual behavior. I confirm that patching realpath() can be tricky, as it expands to thousands lines of code, but nothing is impossible. For myself, I'm not OSx user, nor OSx fan, nor OSx developer, so I can't myself do it, as I dont master that platform and don't care about related bugs. Julien.Pauli --047d7bae46961bdf35051c913adf--