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
41dd1156
Commit
41dd1156
authored
Mar 10, 2012
by
Qiang Xue
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git.yiisoft.com:yii2
parents
c3216bd0
f6a6c2ce
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
14 deletions
+36
-14
Command.php
framework/console/Command.php
+23
-7
todo.md
todo.md
+8
-2
upgrade.md
upgrade.md
+5
-5
No files found.
framework/console/Command.php
View file @
41dd1156
...
...
@@ -304,19 +304,35 @@ abstract class Command extends \yii\base\Component
* Reads input via the readline PHP extension if that's available, or fgets() if readline is not installed.
*
* @param string $message to echo out before waiting for user input
* @param string $default the default string to be returned when user does not write anything.
* Defaults to null, means that default string is disabled.
* @return mixed line read as a string, or false if input has been closed
*/
public
function
prompt
(
$message
)
public
function
prompt
(
$message
,
$default
=
null
)
{
if
(
$default
!==
null
)
{
$message
.=
" [
$default
] "
;
}
else
{
$message
.=
' '
;
}
if
(
extension_loaded
(
'readline'
))
{
$input
=
readline
(
$message
.
' '
);
$input
=
readline
(
$message
);
if
(
$input
)
{
readline_add_history
(
$input
);
return
$input
;
}
else
{
echo
$message
.
' '
;
return
trim
(
fgets
(
STDIN
));
}
}
else
{
echo
$message
;
$input
=
fgets
(
STDIN
);
}
if
(
$input
===
false
)
{
return
false
;
}
else
{
$input
=
trim
(
$input
);
return
(
$input
===
''
&&
$default
!==
null
)
?
$default
:
$input
;
}
}
...
...
todo.md
View file @
41dd1156
-
logging
*
WebTarget
*
ProfileTarget
*
Toolbar ?
-
base
*
error/exception handling
*
Convert all PHP errors into exceptions, remove YII_ENABLE_ERROR_HANDLER and error handler (?)
*
module
-
Module should be able to define its own configuration including routes. Application should be able to overwrite it.
*
application
*
http exception
*
security
...
...
@@ -14,7 +14,7 @@
*
CompareValidator::clientValidateAttribute(): search for "CHtml::activeId"
*
FileValidator, UniqueValidator, ExistValidator, DateValidator: TBD
*
consider merging UniqueValidator and ExistValidator and using a NOT property.
-
console command support
-
console command support
[
DONE
]
-
built-in console commands
+
api doc builder
*
support for markdown syntax
...
...
@@ -49,6 +49,7 @@
-
web: TBD
*
get/setFlash() should be moved to session component
*
support optional parameter in URL patterns
*
Response object.
-
gii
*
move generation API out of gii, provide yiic commands to use it. Use same templates for gii/yiic.
*
i18n variant of templates
...
...
@@ -59,5 +60,9 @@
*
ability to manage scripts order (store these in a vector?)
*
http://ryanbigg.com/guides/asset_pipeline.html, http://guides.rubyonrails.org/asset_pipeline.html, use content hash instead of mtime + directory hash.
-
Requirement checker
-
Optional configurable input filtering in request
-
widgets
*
if we're going to supply default ones, these should generate really unique IDs. This will solve a lot of AJAX-nesting problems.
-
Make sure type hinting is used when components are passed to methods
-
Decouple controller from application (by passing web application instance to controller and if not passed, using Yii::app())?
-
Decouple view renderer from controller so it can be used separately (useful for sending emails from console etc.)
\ No newline at end of file
upgrade.md
View file @
41dd1156
...
...
@@ -10,14 +10,14 @@ for both A and B.
General upgrade instructions
---------------------------
---------------------------
-
-
Make a backup.
-
Clean up your 'assets' folder.
-
Replace 'framework' dir with the new one or point
SVN
to a fresh
release
and update
.
-
Check if everything is OK, if not — revert
from backup
and post
issues to
Yii issue tracker
.
-
Replace 'framework' dir with the new one or point
Git
to a fresh
release
tag and checkout
.
-
Check if everything is OK, if not — revert
to previous stable version
and post
issues to
[
Yii issue tracker
](
https://github.com/yiisoft/yii/issues
)
.
Upgrading from v1.1.x
...
...
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