Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
6ab6730c
Commit
6ab6730c
authored
Nov 02, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
multiple alias support.
parent
4c25e7c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
Installer.php
extensions/composer/Installer.php
+4
-2
No files found.
extensions/composer/Installer.php
View file @
6ab6730c
...
...
@@ -90,6 +90,7 @@ class Installer extends LibraryInstaller
}
$fs
=
new
Filesystem
;
$vendorDir
=
$fs
->
normalizePath
(
$this
->
vendorDir
);
$aliases
=
[];
foreach
(
$autoload
[
'psr-0'
]
as
$name
=>
$path
)
{
$name
=
str_replace
(
'\\'
,
'/'
,
trim
(
$name
,
'\\'
));
if
(
!
$fs
->
isAbsolutePath
(
$path
))
{
...
...
@@ -97,11 +98,12 @@ class Installer extends LibraryInstaller
}
$path
=
$fs
->
normalizePath
(
$path
);
if
(
strpos
(
$path
.
'/'
,
$vendorDir
.
'/'
)
===
0
)
{
return
[
"@
$name
"
=>
'<vendor-dir>'
.
substr
(
$path
,
strlen
(
$vendorDir
))
.
'/'
.
$name
]
;
$aliases
[
"@
$name
"
]
=
'<vendor-dir>'
.
substr
(
$path
,
strlen
(
$vendorDir
))
.
'/'
.
$name
;
}
else
{
return
[
"@
$name
"
=>
$path
.
'/'
.
$name
]
;
$aliases
[
"@
$name
"
]
=
$path
.
'/'
.
$name
;
}
}
return
$aliases
;
}
protected
function
removePackage
(
PackageInterface
$package
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment