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
6a794f6b
Commit
6a794f6b
authored
Oct 19, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simpler fix for #5402
parent
084d3554
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
45 deletions
+11
-45
CHANGELOG.md
extensions/debug/CHANGELOG.md
+1
-1
LogTarget.php
extensions/debug/LogTarget.php
+1
-42
AssetPanel.php
extensions/debug/panels/AssetPanel.php
+8
-1
CHANGELOG.md
framework/CHANGELOG.md
+1
-1
No files found.
extensions/debug/CHANGELOG.md
View file @
6a794f6b
...
@@ -4,7 +4,7 @@ Yii Framework 2 debug extension Change Log
...
@@ -4,7 +4,7 @@ Yii Framework 2 debug extension Change Log
2.
0.1 under development
2.
0.1 under development
-----------------------
-----------------------
-
Bug #5402: Debugger was not loading when there were closures
, resources or PDO instances in the logged data
(samdark)
-
Bug #5402: Debugger was not loading when there were closures
in asset classes
(samdark)
-
Enh #5600: Allow configuring debug panels in
`yii\debug\Module::panels`
as panel class name strings (qiangxue)
-
Enh #5600: Allow configuring debug panels in
`yii\debug\Module::panels`
as panel class name strings (qiangxue)
...
...
extensions/debug/LogTarget.php
View file @
6a794f6b
...
@@ -55,54 +55,13 @@ class LogTarget extends Target
...
@@ -55,54 +55,13 @@ class LogTarget extends Target
$data
[
$id
]
=
$panel
->
save
();
$data
[
$id
]
=
$panel
->
save
();
}
}
$data
[
'summary'
]
=
$summary
;
$data
[
'summary'
]
=
$summary
;
file_put_contents
(
$dataFile
,
serialize
(
$
this
->
replaceUnserializable
(
$data
)
));
file_put_contents
(
$dataFile
,
serialize
(
$
data
));
$indexFile
=
"
$path
/index.data"
;
$indexFile
=
"
$path
/index.data"
;
$this
->
updateIndexFile
(
$indexFile
,
$summary
);
$this
->
updateIndexFile
(
$indexFile
,
$summary
);
}
}
/**
/**
* Replacing everything that is not serializable with its text representation
*
* @param mixed $value
* @return mixed
*/
private
function
replaceUnserializable
(
$value
)
{
if
(
is_scalar
(
$value
)
||
$value
===
null
)
{
return
$value
;
}
if
(
is_array
(
$value
))
{
foreach
(
$value
as
&
$row
)
{
$row
=
$this
->
replaceUnserializable
(
$row
);
}
return
$value
;
}
if
(
$value
instanceof
\Closure
)
{
return
'\Closure'
;
}
if
(
is_resource
(
$value
))
{
return
'resource'
;
}
if
(
$value
instanceof
\PDO
)
{
return
'\PDO'
;
}
$properties
=
(
new
\ReflectionObject
(
$value
))
->
getProperties
();
foreach
(
$properties
as
&
$property
)
{
$property
->
setAccessible
(
true
);
$propertyValue
=
$property
->
getValue
(
$value
);
$property
->
setValue
(
$value
,
$this
->
replaceUnserializable
(
$propertyValue
));
}
return
$value
;
}
/**
* Updates index file with summary log data
* Updates index file with summary log data
*
*
* @param string $indexFile path to index file
* @param string $indexFile path to index file
...
...
extensions/debug/panels/AssetPanel.php
View file @
6a794f6b
...
@@ -57,7 +57,14 @@ class AssetPanel extends Panel
...
@@ -57,7 +57,14 @@ class AssetPanel extends Panel
$data
=
[];
$data
=
[];
foreach
(
$bundles
as
$name
=>
$bundle
)
{
foreach
(
$bundles
as
$name
=>
$bundle
)
{
if
(
$bundle
instanceof
AssetBundle
)
{
if
(
$bundle
instanceof
AssetBundle
)
{
$data
[
$name
]
=
(
array
)
$bundle
;
$bundleData
=
(
array
)
$bundle
;
if
(
isset
(
$bundleData
[
'publishOptions'
][
'beforeCopy'
])
&&
$bundleData
[
'publishOptions'
][
'beforeCopy'
]
instanceof
\Closure
)
{
$bundleData
[
'publishOptions'
][
'beforeCopy'
]
=
'\Closure'
;
}
if
(
isset
(
$bundleData
[
'publishOptions'
][
'afterCopy'
])
&&
$bundleData
[
'publishOptions'
][
'afterCopy'
]
instanceof
\Closure
)
{
$bundleData
[
'publishOptions'
][
'afterCopy'
]
=
'\Closure'
;
}
$data
[
$name
]
=
$bundleData
;
}
}
}
}
return
$data
;
return
$data
;
...
...
framework/CHANGELOG.md
View file @
6a794f6b
...
@@ -4,7 +4,7 @@ Yii Framework 2 Change Log
...
@@ -4,7 +4,7 @@ Yii Framework 2 Change Log
2.
0.1 under development
2.
0.1 under development
-----------------------
-----------------------
-
Bug #5402: Debugger was not loading when there were closures
, resources or PDO instances in the logged data
(samdark)
-
Bug #5402: Debugger was not loading when there were closures
in asset classes
(samdark)
-
Bug #5584:
`yii\rbac\DbRbacManager`
should not delete items when deleting a rule on a database not supporting cascade update (mdmunir)
-
Bug #5584:
`yii\rbac\DbRbacManager`
should not delete items when deleting a rule on a database not supporting cascade update (mdmunir)
-
Bug #5601: Simple conditions in Query::where() and ActiveQuery::where() did not allow
`yii\db\Expression`
to be used as the value (cebe, stevekr)
-
Bug #5601: Simple conditions in Query::where() and ActiveQuery::where() did not allow
`yii\db\Expression`
to be used as the value (cebe, stevekr)
-
Bug: Gii console command help information does not contain global options (qiangxue)
-
Bug: Gii console command help information does not contain global options (qiangxue)
...
...
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