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
8264c5c5
Commit
8264c5c5
authored
May 23, 2013
by
Tobias Munk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactored param parsing
parent
c73ab910
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
InstallHandler.php
extensions/composer/yii/composer/InstallHandler.php
+8
-8
No files found.
extensions/composer/yii/composer/InstallHandler.php
View file @
8264c5c5
...
@@ -80,17 +80,17 @@ class InstallHandler
...
@@ -80,17 +80,17 @@ class InstallHandler
}
}
}
}
// prepare console application
require
(
__DIR__
.
'/../../../yii2/yii/Yii.php'
);
require
(
__DIR__
.
'/../../../yii2/yii/Yii.php'
);
$application
=
new
\yii\console\Application
(
$config
);
$request
=
$application
->
getRequest
();
foreach
((
array
)
$options
[
'run'
]
as
$rawParams
)
{
// run commands from extra.run
// TODO: we're doing about the same here like console\Request::resolve()
foreach
((
array
)
$options
[
'run'
]
as
$rawCommand
)
{
$command
=
$rawParams
[
0
];
$opts
=
str_getcsv
(
$rawCommand
,
' '
);
// see http://stackoverflow.com/a/6609509/291573
unset
(
$rawParams
[
0
]);
$request
->
setParams
(
$opts
);
$params
[
\yii\console\Request
::
ANONYMOUS_PARAMS
]
=
$rawParams
;
list
(
$command
,
$params
)
=
$request
->
resolve
();
// TODO end
echo
"Running command:
{
$command
}
\n
"
;
echo
"Running command:
{
$command
}
\n
"
;
$application
=
new
\yii\console\Application
(
$config
);
$application
->
runAction
(
$command
,
$params
);
$application
->
runAction
(
$command
,
$params
);
}
}
}
}
...
...
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