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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
e7c98a49
Commit
e7c98a49
authored
May 23, 2013
by
Tobias Munk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added configuration file detection from composer.json (extra.config), path cleanup
parent
f53b2175
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
InstallHandler.php
extensions/composer/yii/composer/InstallHandler.php
+12
-3
No files found.
extensions/composer/yii/composer/InstallHandler.php
View file @
e7c98a49
...
@@ -66,12 +66,21 @@ class InstallHandler
...
@@ -66,12 +66,21 @@ class InstallHandler
{
{
$options
=
array_merge
(
array
(
$options
=
array_merge
(
array
(
'run'
=>
array
(),
'run'
=>
array
(),
'config'
=>
null
,
),
$event
->
getComposer
()
->
getPackage
()
->
getExtra
());
),
$event
->
getComposer
()
->
getPackage
()
->
getExtra
());
$appPath
=
realpath
(
__DIR__
.
'/../../../../..'
);
// resolve and include config file
if
((
$options
[
'config'
]
===
null
))
{
throw
new
console\Exception
(
'Config file not specified in composer.json extra.config'
);
}
else
{
if
(
!
is_file
(
getcwd
()
.
'/'
.
$options
[
'config'
]))
{
throw
new
console\Exception
(
"Config file '
{
$options
[
'config'
]
}
' specified in composer.json extra.config not found"
);
}
else
{
$config
=
require
(
$options
[
'config'
]);
}
}
require
(
$appPath
.
'/vendor/yiisoft/yii2/yii/Yii.php'
);
require
(
__DIR__
.
'/../../../yii2/yii/Yii.php'
);
$config
=
require
(
$appPath
.
'/config/console.php'
);
foreach
((
array
)
$options
[
'run'
]
as
$rawParams
)
{
foreach
((
array
)
$options
[
'run'
]
as
$rawParams
)
{
// TODO: we're doing about the same here like console\Request::resolve()
// TODO: we're doing about the same here like console\Request::resolve()
...
...
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