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
9aa006e5
Commit
9aa006e5
authored
Jan 21, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed implementation of `Arrayable` from `yii\Object`
parent
48448864
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
9 additions
and
19 deletions
+9
-19
CHANGELOG.md
framework/CHANGELOG.md
+1
-0
Model.php
framework/base/Model.php
+1
-1
Object.php
framework/base/Object.php
+1
-11
CookieCollection.php
framework/web/CookieCollection.php
+2
-1
HeaderCollection.php
framework/web/HeaderCollection.php
+2
-1
Session.php
framework/web/Session.php
+2
-1
FileValidatorTest.php
tests/unit/framework/validators/FileValidatorTest.php
+0
-4
No files found.
framework/CHANGELOG.md
View file @
9aa006e5
...
...
@@ -113,6 +113,7 @@ Yii Framework 2 Change Log
`index-test.php`
and
`yii`
files to point to the new location of
`Yii.php`
(qiangxue, cebe)
-
Chg: Advanced app template: moved database connection DSN, login and password to
`-local`
config not to expose it to VCS (samdark)
-
Chg: Renamed
`yii\web\Request::acceptedLanguages`
to
`acceptableLanguages`
(qiangxue)
-
Chg: Removed implementation of
`Arrayable`
from
`yii\Object`
(qiangxue)
-
New #66:
[
Auth client library
](
https://github.com/yiisoft/yii2-authclient
)
OpenId, OAuth1, OAuth2 clients (klimov-paul)
-
New #1393:
[
Codeception testing framework integration
](
https://github.com/yiisoft/yii2-codeception
)
(
Ragazzo
)
-
New #1438:
[
MongoDB integration
](
https://github.com/yiisoft/yii2-mongodb
)
ActiveRecord and Query (klimov-paul)
...
...
framework/base/Model.php
View file @
9aa006e5
...
...
@@ -52,7 +52,7 @@ use yii\validators\Validator;
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class
Model
extends
Component
implements
IteratorAggregate
,
ArrayAccess
class
Model
extends
Component
implements
IteratorAggregate
,
ArrayAccess
,
Arrayable
{
/**
* The name of the default scenario.
...
...
framework/base/Object.php
View file @
9aa006e5
...
...
@@ -17,7 +17,7 @@ use Yii;
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class
Object
implements
Arrayable
class
Object
{
/**
* @return string the fully qualified name of this class.
...
...
@@ -227,14 +227,4 @@ class Object implements Arrayable
{
return
method_exists
(
$this
,
$name
);
}
/**
* Converts the object into an array.
* The default implementation will return all public property values as an array.
* @return array the array representation of the object
*/
public
function
toArray
()
{
return
Yii
::
getObjectVars
(
$this
);
}
}
framework/web/CookieCollection.php
View file @
9aa006e5
...
...
@@ -9,6 +9,7 @@ namespace yii\web;
use
Yii
;
use
ArrayIterator
;
use
yii\base\Arrayable
;
use
yii\base\InvalidCallException
;
use
yii\base\Object
;
...
...
@@ -22,7 +23,7 @@ use yii\base\Object;
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class
CookieCollection
extends
Object
implements
\IteratorAggregate
,
\ArrayAccess
,
\Countable
class
CookieCollection
extends
Object
implements
\IteratorAggregate
,
\ArrayAccess
,
\Countable
,
Arrayable
{
/**
* @var boolean whether this collection is read only.
...
...
framework/web/HeaderCollection.php
View file @
9aa006e5
...
...
@@ -8,6 +8,7 @@
namespace
yii\web
;
use
Yii
;
use
yii\base\Arrayable
;
use
yii\base\Object
;
use
ArrayIterator
;
...
...
@@ -21,7 +22,7 @@ use ArrayIterator;
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class
HeaderCollection
extends
Object
implements
\IteratorAggregate
,
\ArrayAccess
,
\Countable
class
HeaderCollection
extends
Object
implements
\IteratorAggregate
,
\ArrayAccess
,
\Countable
,
Arrayable
{
/**
* @var array the headers in this collection (indexed by the header names)
...
...
framework/web/Session.php
View file @
9aa006e5
...
...
@@ -8,6 +8,7 @@
namespace
yii\web
;
use
Yii
;
use
yii\base\Arrayable
;
use
yii\base\Component
;
use
yii\base\InvalidConfigException
;
use
yii\base\InvalidParamException
;
...
...
@@ -71,7 +72,7 @@ use yii\base\InvalidParamException;
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class
Session
extends
Component
implements
\IteratorAggregate
,
\ArrayAccess
,
\Countable
class
Session
extends
Component
implements
\IteratorAggregate
,
\ArrayAccess
,
\Countable
,
Arrayable
{
/**
* @var boolean whether the session should be automatically started when the session component is initialized.
...
...
tests/unit/framework/validators/FileValidatorTest.php
View file @
9aa006e5
...
...
@@ -239,7 +239,6 @@ class FileValidatorTest extends TestCase
$val
->
validateAttribute
(
$m
,
'attr_err_part'
);
$this
->
assertTrue
(
$m
->
hasErrors
(
'attr_err_part'
));
$this
->
assertSame
(
Yii
::
t
(
'yii'
,
'File upload failed.'
),
current
(
$m
->
getErrors
(
'attr_err_part'
)));
$log
=
Yii
::
$app
->
getLog
()
->
toArray
();
}
public
function
testValidateAttributeErrCantWrite
()
...
...
@@ -249,7 +248,6 @@ class FileValidatorTest extends TestCase
$val
->
validateAttribute
(
$m
,
'attr_err_write'
);
$this
->
assertTrue
(
$m
->
hasErrors
(
'attr_err_write'
));
$this
->
assertSame
(
Yii
::
t
(
'yii'
,
'File upload failed.'
),
current
(
$m
->
getErrors
(
'attr_err_write'
)));
$log
=
Yii
::
$app
->
getLog
()
->
toArray
();
}
public
function
testValidateAttributeErrExtension
()
...
...
@@ -259,7 +257,6 @@ class FileValidatorTest extends TestCase
$val
->
validateAttribute
(
$m
,
'attr_err_ext'
);
$this
->
assertTrue
(
$m
->
hasErrors
(
'attr_err_ext'
));
$this
->
assertSame
(
Yii
::
t
(
'yii'
,
'File upload failed.'
),
current
(
$m
->
getErrors
(
'attr_err_ext'
)));
$log
=
Yii
::
$app
->
getLog
()
->
toArray
();
}
public
function
testValidateAttributeErrNoTmpDir
()
...
...
@@ -269,6 +266,5 @@ class FileValidatorTest extends TestCase
$val
->
validateAttribute
(
$m
,
'attr_err_tmp'
);
$this
->
assertTrue
(
$m
->
hasErrors
(
'attr_err_tmp'
));
$this
->
assertSame
(
Yii
::
t
(
'yii'
,
'File upload failed.'
),
current
(
$m
->
getErrors
(
'attr_err_tmp'
)));
$log
=
Yii
::
$app
->
getLog
()
->
toArray
();
}
}
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