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
c04e6507
Commit
c04e6507
authored
Dec 23, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed composer about yii2-dev installation
parent
d7f17b92
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
Installer.php
extensions/yii/composer/Installer.php
+7
-7
No files found.
extensions/yii/composer/Installer.php
View file @
c04e6507
...
@@ -44,7 +44,7 @@ class Installer extends LibraryInstaller
...
@@ -44,7 +44,7 @@ class Installer extends LibraryInstaller
$this
->
addPackage
(
$package
);
$this
->
addPackage
(
$package
);
// ensure the yii2-dev package also provides Yii.php in the same place as yii2 does
// ensure the yii2-dev package also provides Yii.php in the same place as yii2 does
if
(
$package
->
getName
()
==
'yiisoft/yii2-dev'
)
{
if
(
$package
->
getName
()
==
'yiisoft/yii2-dev'
)
{
$this
->
link
YiiBase
Files
();
$this
->
link
BaseYii
Files
();
}
}
}
}
...
@@ -58,7 +58,7 @@ class Installer extends LibraryInstaller
...
@@ -58,7 +58,7 @@ class Installer extends LibraryInstaller
$this
->
addPackage
(
$target
);
$this
->
addPackage
(
$target
);
// ensure the yii2-dev package also provides Yii.php in the same place as yii2 does
// ensure the yii2-dev package also provides Yii.php in the same place as yii2 does
if
(
$initial
->
getName
()
==
'yiisoft/yii2-dev'
)
{
if
(
$initial
->
getName
()
==
'yiisoft/yii2-dev'
)
{
$this
->
link
YiiBase
Files
();
$this
->
link
BaseYii
Files
();
}
}
}
}
...
@@ -73,7 +73,7 @@ class Installer extends LibraryInstaller
...
@@ -73,7 +73,7 @@ class Installer extends LibraryInstaller
$this
->
removePackage
(
$package
);
$this
->
removePackage
(
$package
);
// remove links for Yii.php
// remove links for Yii.php
if
(
$package
->
getName
()
==
'yiisoft/yii2-dev'
)
{
if
(
$package
->
getName
()
==
'yiisoft/yii2-dev'
)
{
$this
->
remove
YiiBase
Files
();
$this
->
remove
BaseYii
Files
();
}
}
}
}
...
@@ -169,13 +169,13 @@ class Installer extends LibraryInstaller
...
@@ -169,13 +169,13 @@ class Installer extends LibraryInstaller
}
}
}
}
protected
function
link
YiiBase
Files
()
protected
function
link
BaseYii
Files
()
{
{
$yiiDir
=
$this
->
vendorDir
.
'/yiisoft/yii2/yii'
;
$yiiDir
=
$this
->
vendorDir
.
'/yiisoft/yii2/yii'
;
if
(
!
file_exists
(
$yiiDir
))
{
if
(
!
file_exists
(
$yiiDir
))
{
mkdir
(
$yiiDir
,
0777
,
true
);
mkdir
(
$yiiDir
,
0777
,
true
);
}
}
foreach
([
'Yii.php'
,
'
YiiBase
.php'
,
'classes.php'
]
as
$file
)
{
foreach
([
'Yii.php'
,
'
BaseYii
.php'
,
'classes.php'
]
as
$file
)
{
file_put_contents
(
$yiiDir
.
'/'
.
$file
,
<<<EOF
file_put_contents
(
$yiiDir
.
'/'
.
$file
,
<<<EOF
<?php
<?php
/**
/**
...
@@ -193,10 +193,10 @@ EOF
...
@@ -193,10 +193,10 @@ EOF
}
}
}
}
protected
function
remove
YiiBase
Files
()
protected
function
remove
BaseYii
Files
()
{
{
$yiiDir
=
$this
->
vendorDir
.
'/yiisoft/yii2/yii'
;
$yiiDir
=
$this
->
vendorDir
.
'/yiisoft/yii2/yii'
;
foreach
([
'Yii.php'
,
'
YiiBase
.php'
,
'classes.php'
]
as
$file
)
{
foreach
([
'Yii.php'
,
'
BaseYii
.php'
,
'classes.php'
]
as
$file
)
{
if
(
file_exists
(
$yiiDir
.
'/'
.
$file
))
{
if
(
file_exists
(
$yiiDir
.
'/'
.
$file
))
{
unlink
(
$yiiDir
.
'/'
.
$file
);
unlink
(
$yiiDir
.
'/'
.
$file
);
}
}
...
...
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