Ok, so..
would it be a problem if getPrefixes() and/or getPrefixesPsr0() returns the
directories with trailing slash?
I guess it will break BC?

So, if we do this, we have to strip if off again on getters..

And btw, currently we do nothing to prevent duplicate directory
registration.
We could prevent this either with array_unique() or by using the
directories as array keys instead of as values.
Again this is going to be annoying for getters.

Or we could simply leave it to the application to avoid duplicate
registration..
(Composer itself probably won't do this anyway, but some applications might)

2013/7/29 Jordi Boggiano <notifications@github.com>

> In src/Composer/Autoload/ClassLoader.php:
>
> > +                $this->fallbackDirsPsr4 = array_merge(
> > +                    (array) $paths,
> > +                    $this->fallbackDirsPsr4
> > +                );
> > +            } else {
> > +                $this->fallbackDirsPsr4 = array_merge(
> > +                    $this->fallbackDirsPsr4,
> > +                    (array) $paths
> > +                );
> > +            }
> > +
> > +            return;
> > +        }
> > +
> > +        $prefix = rtrim($prefix, '\\');
> > +        $prefix = $prefix . '\\';
> >
>
> Always appending a "/" is fine and works cross-platform.
> DIRECTORY_SEPARATOR has no use really beyond making some strict comparisons
> pass in unit tests sometimes. See for example: ``` $ php -r
> 'var_dump(realpath(glob("c:\\/\/\//\Users\/\\/*")[3]));' string(13)
> "C:\\Users\\seld" ```
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/composer/composer/pull/2121/files#r5450066>
> .
>