Skip to content

Commit

Permalink
Merged pull request #327
Browse files Browse the repository at this point in the history
  • Loading branch information
derickr committed Feb 8, 2017
2 parents b4a1489 + 9e6e006 commit 379ab7a
Show file tree
Hide file tree
Showing 12 changed files with 126 additions and 30 deletions.
2 changes: 1 addition & 1 deletion tests/bug00421.phpt
Expand Up @@ -45,7 +45,7 @@ dbgpRun( $data, $commands );

-> context_get -i 5 -c 0
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="5" context="0"><property name="$currentPageXML" fullname="$currentPageXML" type="object" classname="SimpleXMLIterator" children="1" numchildren="2" page="0" pagesize="32"><property name="@attributes" fullname="$currentPageXML-&gt;@attributes" facet="public" type="array" children="1" numchildren="1" page="0" pagesize="32"><property name="name" fullname="$currentPageXML-&gt;@attributes[&#39;name&#39;]" type="string" size="8" encoding="base64"><![CDATA[cHJvamVjdHM=]]></property></property><property name="page" fullname="$currentPageXML-&gt;page" facet="public" type="array" children="1" numchildren="2" page="0" pagesize="32"><property name="0" fullname="$currentPageXML-&gt;page[0]" type="object" classname="SimpleXMLIterator" children="1" numchildren="1"></property><property name="1" fullname="$currentPageXML-&gt;page[1]" type="object" classname="SimpleXMLIterator" children="1" numchildren="1"></property></property></property><property name="$iterator" fullname="$iterator" type="object" classname="SimpleXMLIterator" children="1" numchildren="1" page="0" pagesize="32"><property name="page" fullname="$iterator-&gt;page" facet="public" type="object" classname="SimpleXMLIterator" children="1" numchildren="2" page="0" pagesize="32"><property name="@attributes" fullname="$iterator-&gt;page-&gt;@attributes" facet="public" type="array" children="1" numchildren="1"></property><property name="page" fullname="$iterator-&gt;page-&gt;page" facet="public" type="array" children="1" numchildren="2"></property></property></property><property name="$name" fullname="$name" type="uninitialized"></property><property name="$pageXML" fullname="$pageXML" type="object" classname="SimpleXMLIterator" children="1" numchildren="2" page="0" pagesize="32"><property name="@attributes" fullname="$pageXML-&gt;@attributes" facet="public" type="array" children="1" numchildren="1" page="0" pagesize="32"><property name="name" fullname="$pageXML-&gt;@attributes[&#39;name&#39;]" type="string" size="8" encoding="base64"><![CDATA[cHJvamVjdHM=]]></property></property><property name="page" fullname="$pageXML-&gt;page" facet="public" type="array" children="1" numchildren="2" page="0" pagesize="32"><property name="0" fullname="$pageXML-&gt;page[0]" type="object" classname="SimpleXMLIterator" children="1" numchildren="1"></property><property name="1" fullname="$pageXML-&gt;page[1]" type="object" classname="SimpleXMLIterator" children="1" numchildren="1"></property></property></property><property name="$projectsIterator" fullname="$projectsIterator" type="array" children="1" numchildren="3" page="0" pagesize="32"><property name="0" fullname="$projectsIterator[0]" type="object" classname="SimpleXMLIterator" children="1" numchildren="2" page="0" pagesize="32"><property name="@attributes" fullname="$projectsIterator[0]-&gt;@attributes" facet="public" type="array" children="1" numchildren="1"></property><property name="page" fullname="$projectsIterator[0]-&gt;page" facet="public" type="array" children="1" numchildren="2"></property></property><property name="1" fullname="$projectsIterator[1]" type="object" classname="SimpleXMLIterator" children="1" numchildren="1" page="0" pagesize="32"><property name="@attributes" fullname="$projectsIterator[1]-&gt;@attributes" facet="public" type="array" children="1" numchildren="1"></property></property><property name="2" fullname="$projectsIterator[2]" type="object" classname="SimpleXMLIterator" children="1" numchildren="1" page="0" pagesize="32"><property name="@attributes" fullname="$projectsIterator[2]-&gt;@attributes" facet="public" type="array" children="1" numchildren="1"></property></property></property><property name="$siteXMLString" fullname="$siteXMLString" type="string" size="161" encoding="base64"><![CDATA[PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHNpdGU+CiAgICA8cGFnZSBuYW1lPSJwcm9qZWN0cyI+CiAgICAgICAgPHBhZ2UgbmFtZT0iUHJvamVjdCAxIiAvPgogICAgICAgIDxwYWdlIG5hbWU9IlByb2plY3QgMiIgLz4KICAgIDwvcGFnZT4KPC9zaXRlPgo=]]></property></response>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="5" context="0"><property name="$currentPageXML" fullname="$currentPageXML" type="object" classname="SimpleXMLIterator" children="1" numchildren="2" page="0" pagesize="32"><property name="@attributes" fullname="$currentPageXML-&gt;@attributes" facet="public" type="array" children="1" numchildren="1" page="0" pagesize="32"><property name="name" fullname="$currentPageXML-&gt;@attributes[&quot;name&quot;]" type="string" size="8" encoding="base64"><![CDATA[cHJvamVjdHM=]]></property></property><property name="page" fullname="$currentPageXML-&gt;page" facet="public" type="array" children="1" numchildren="2" page="0" pagesize="32"><property name="0" fullname="$currentPageXML-&gt;page[0]" type="object" classname="SimpleXMLIterator" children="1" numchildren="1"></property><property name="1" fullname="$currentPageXML-&gt;page[1]" type="object" classname="SimpleXMLIterator" children="1" numchildren="1"></property></property></property><property name="$iterator" fullname="$iterator" type="object" classname="SimpleXMLIterator" children="1" numchildren="1" page="0" pagesize="32"><property name="page" fullname="$iterator-&gt;page" facet="public" type="object" classname="SimpleXMLIterator" children="1" numchildren="2" page="0" pagesize="32"><property name="@attributes" fullname="$iterator-&gt;page-&gt;@attributes" facet="public" type="array" children="1" numchildren="1"></property><property name="page" fullname="$iterator-&gt;page-&gt;page" facet="public" type="array" children="1" numchildren="2"></property></property></property><property name="$name" fullname="$name" type="uninitialized"></property><property name="$pageXML" fullname="$pageXML" type="object" classname="SimpleXMLIterator" children="1" numchildren="2" page="0" pagesize="32"><property name="@attributes" fullname="$pageXML-&gt;@attributes" facet="public" type="array" children="1" numchildren="1" page="0" pagesize="32"><property name="name" fullname="$pageXML-&gt;@attributes[&quot;name&quot;]" type="string" size="8" encoding="base64"><![CDATA[cHJvamVjdHM=]]></property></property><property name="page" fullname="$pageXML-&gt;page" facet="public" type="array" children="1" numchildren="2" page="0" pagesize="32"><property name="0" fullname="$pageXML-&gt;page[0]" type="object" classname="SimpleXMLIterator" children="1" numchildren="1"></property><property name="1" fullname="$pageXML-&gt;page[1]" type="object" classname="SimpleXMLIterator" children="1" numchildren="1"></property></property></property><property name="$projectsIterator" fullname="$projectsIterator" type="array" children="1" numchildren="3" page="0" pagesize="32"><property name="0" fullname="$projectsIterator[0]" type="object" classname="SimpleXMLIterator" children="1" numchildren="2" page="0" pagesize="32"><property name="@attributes" fullname="$projectsIterator[0]-&gt;@attributes" facet="public" type="array" children="1" numchildren="1"></property><property name="page" fullname="$projectsIterator[0]-&gt;page" facet="public" type="array" children="1" numchildren="2"></property></property><property name="1" fullname="$projectsIterator[1]" type="object" classname="SimpleXMLIterator" children="1" numchildren="1" page="0" pagesize="32"><property name="@attributes" fullname="$projectsIterator[1]-&gt;@attributes" facet="public" type="array" children="1" numchildren="1"></property></property><property name="2" fullname="$projectsIterator[2]" type="object" classname="SimpleXMLIterator" children="1" numchildren="1" page="0" pagesize="32"><property name="@attributes" fullname="$projectsIterator[2]-&gt;@attributes" facet="public" type="array" children="1" numchildren="1"></property></property></property><property name="$siteXMLString" fullname="$siteXMLString" type="string" size="161" encoding="base64"><![CDATA[PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHNpdGU+CiAgICA8cGFnZSBuYW1lPSJwcm9qZWN0cyI+CiAgICAgICAgPHBhZ2UgbmFtZT0iUHJvamVjdCAxIiAvPgogICAgICAgIDxwYWdlIG5hbWU9IlByb2plY3QgMiIgLz4KICAgIDwvcGFnZT4KPC9zaXRlPgo=]]></property></response>

-> detach -i 6
<?xml version="1.0" encoding="iso-8859-1"?>
Expand Down
2 changes: 1 addition & 1 deletion tests/bug00475.phpt
Expand Up @@ -35,7 +35,7 @@ dbgpRun( $data, $commands );

-> property_get -i 4 -n a
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="4"><property name="$a" fullname="$a" type="array" children="1" numchildren="2" page="0" pagesize="32"><property name="example&#0;key" fullname="$a[&#39;example&#0;key&#39;]" type="string" size="5" encoding="base64"><![CDATA[VmFsdWU=]]></property><property name="example" fullname="$a[&#39;example&#39;]" type="string" size="9" encoding="base64"><![CDATA[dmFsdWUAa2V5]]></property></property></response>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="4"><property name="$a" fullname="$a" type="array" children="1" numchildren="2" page="0" pagesize="32"><property name="example&#0;key" fullname="$a[&quot;example&#0;key&quot;]" type="string" size="5" encoding="base64"><![CDATA[VmFsdWU=]]></property><property name="example" fullname="$a[&quot;example&quot;]" type="string" size="9" encoding="base64"><![CDATA[dmFsdWUAa2V5]]></property></property></response>

-> detach -i 5
<?xml version="1.0" encoding="iso-8859-1"?>
Expand Down
2 changes: 1 addition & 1 deletion tests/bug00686.phpt
Expand Up @@ -40,7 +40,7 @@ dbgpRun( $data, $commands );

-> property_get -i 5 -n $storage->storage
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="5"><property name="$storage-&gt;storage" fullname="$storage-&gt;storage" type="array" children="1" numchildren="2" page="0" pagesize="32"><property name="%s" fullname="$storage-&gt;storage[&#39;%s&#39;]" type="array" children="1" numchildren="2"></property><property name="%s" fullname="$storage-&gt;storage[&#39;%s&#39;]" type="array" children="1" numchildren="2"></property></property></response>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="5"><property name="$storage-&gt;storage" fullname="$storage-&gt;storage" type="array" children="1" numchildren="2" page="0" pagesize="32"><property name="%s" fullname="$storage-&gt;storage[&quot;%s&quot;]" type="array" children="1" numchildren="2"></property><property name="%s" fullname="$storage-&gt;storage[&quot;%s&quot;]" type="array" children="1" numchildren="2"></property></property></response>

-> detach -i 6
<?xml version="1.0" encoding="iso-8859-1"?>
Expand Down
2 changes: 1 addition & 1 deletion tests/bug00806.phpt
Expand Up @@ -33,7 +33,7 @@ dbgpRun( $data, $commands );

-> context_get -i 3
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="3" context="0"><property name="$x" fullname="$x" type="array" children="1" numchildren="2" page="0" pagesize="32"><property name="a" fullname="$x[&#39;a&#39;]" type="array" children="1" numchildren="2"></property><property name="a b" fullname="$x[&#39;a b&#39;]" type="array" children="1" numchildren="2"></property></property></response>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="3" context="0"><property name="$x" fullname="$x" type="array" children="1" numchildren="2" page="0" pagesize="32"><property name="a" fullname="$x[&quot;a&quot;]" type="array" children="1" numchildren="2"></property><property name="a b" fullname="$x[&quot;a b&quot;]" type="array" children="1" numchildren="2"></property></property></response>

-> property_get -i 4 -n $x['a b'] -d 0 -c 0 -p 0
<?xml version="1.0" encoding="iso-8859-1"?>
Expand Down
14 changes: 7 additions & 7 deletions tests/bug00996-001.phpt
Expand Up @@ -16,11 +16,11 @@ $commands = array(
'property_get -n $a',
'property_get -n $a->b',
'property_get -n $a->b[0]',
'property_get -n $a->b[\'c\']',
'property_get -n $a->b["c"]',
'property_get -n $a->b[9]',
'run',
'context_get',
'property_get -n $a[\'f\']',
'property_get -n $a["f"]',
);

dbgpRun( $data, $commands );
Expand Down Expand Up @@ -51,15 +51,15 @@ dbgpRun( $data, $commands );

-> property_get -i 6 -n $a->b
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="6"><property name="$a-&gt;b" fullname="$a-&gt;b" type="array" children="1" numchildren="3" page="0" pagesize="32"><property name="0" fullname="$a-&gt;b[0]" type="int"><![CDATA[1]]></property><property name="1" fullname="$a-&gt;b[1]" type="int"><![CDATA[2]]></property><property name="c" fullname="$a-&gt;b[&#39;c&#39;]" type="int"><![CDATA[3]]></property></property></response>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="6"><property name="$a-&gt;b" fullname="$a-&gt;b" type="array" children="1" numchildren="3" page="0" pagesize="32"><property name="0" fullname="$a-&gt;b[0]" type="int"><![CDATA[1]]></property><property name="1" fullname="$a-&gt;b[1]" type="int"><![CDATA[2]]></property><property name="c" fullname="$a-&gt;b[&quot;c&quot;]" type="int"><![CDATA[3]]></property></property></response>

-> property_get -i 7 -n $a->b[0]
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="7"><property name="$a-&gt;b[0]" fullname="$a-&gt;b[0]" type="int"><![CDATA[1]]></property></response>

-> property_get -i 8 -n $a->b['c']
-> property_get -i 8 -n $a->b["c"]
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="8"><property name="$a-&gt;b[&#39;c&#39;]" fullname="$a-&gt;b[&#39;c&#39;]" type="int"><![CDATA[3]]></property></response>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="8"><property name="$a-&gt;b[&quot;c&quot;]" fullname="$a-&gt;b[&quot;c&quot;]" type="int"><![CDATA[3]]></property></response>

-> property_get -i 9 -n $a->b[9]
<?xml version="1.0" encoding="iso-8859-1"?>
Expand All @@ -73,6 +73,6 @@ dbgpRun( $data, $commands );
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="11" context="0"><property name="$a" fullname="$a" type="object" classname="Clazz" children="1" numchildren="2" page="0" pagesize="32"><property name="b" fullname="$a-&gt;b" facet="public" type="array" children="1" numchildren="3"></property><property name="*ArrayObject*storage" fullname="$a-&gt;*ArrayObject*storage" facet="private" type="array" children="1" numchildren="1"></property></property></response>

-> property_get -i 12 -n $a['f']
-> property_get -i 12 -n $a["f"]
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="12"><property name="$a[&#39;f&#39;]" fullname="$a[&#39;f&#39;]" type="string" size="7" encoding="base64"><![CDATA[Y29va2llcw==]]></property></response>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="12"><property name="$a[&quot;f&quot;]" fullname="$a[&quot;f&quot;]" type="string" size="7" encoding="base64"><![CDATA[Y29va2llcw==]]></property></response>
12 changes: 6 additions & 6 deletions tests/bug00996-002.phpt
Expand Up @@ -15,10 +15,10 @@ $commands = array(
'context_get',
'property_get -n $a',
'property_get -n $a->*ArrayObject*storage',
'property_get -n $a->*ArrayObject*storage[\'f\']',
'property_get -n $a->*ArrayObject*storage["f"]',
'property_get -n $a->*ArrayObject*storage->$a',
'property_get -n $a->*ArrayObject*storage[44]',
'property_get -n $a->*ArrayObject*storage[\'p\']',
'property_get -n $a->*ArrayObject*storage["p"]',
);

dbgpRun( $data, $commands );
Expand Down Expand Up @@ -49,11 +49,11 @@ dbgpRun( $data, $commands );

-> property_get -i 6 -n $a->*ArrayObject*storage
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="6"><property name="$a-&gt;*ArrayObject*storage" fullname="$a-&gt;*ArrayObject*storage" type="array" children="1" numchildren="1" page="0" pagesize="32"><property name="f" fullname="$a-&gt;*ArrayObject*storage[&#39;f&#39;]" type="string" size="7" encoding="base64"><![CDATA[Y29va2llcw==]]></property></property></response>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="6"><property name="$a-&gt;*ArrayObject*storage" fullname="$a-&gt;*ArrayObject*storage" type="array" children="1" numchildren="1" page="0" pagesize="32"><property name="f" fullname="$a-&gt;*ArrayObject*storage[&quot;f&quot;]" type="string" size="7" encoding="base64"><![CDATA[Y29va2llcw==]]></property></property></response>

-> property_get -i 7 -n $a->*ArrayObject*storage['f']
-> property_get -i 7 -n $a->*ArrayObject*storage["f"]
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="7"><property name="$a-&gt;*ArrayObject*storage[&#39;f&#39;]" fullname="$a-&gt;*ArrayObject*storage[&#39;f&#39;]" type="string" size="7" encoding="base64"><![CDATA[Y29va2llcw==]]></property></response>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="7"><property name="$a-&gt;*ArrayObject*storage[&quot;f&quot;]" fullname="$a-&gt;*ArrayObject*storage[&quot;f&quot;]" type="string" size="7" encoding="base64"><![CDATA[Y29va2llcw==]]></property></response>

-> property_get -i 8 -n $a->*ArrayObject*storage->$a
<?xml version="1.0" encoding="iso-8859-1"?>
Expand All @@ -63,6 +63,6 @@ dbgpRun( $data, $commands );
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="9" status="break" reason="ok"><error code="300"><message><![CDATA[can not get property]]></message></error></response>

-> property_get -i 10 -n $a->*ArrayObject*storage['p']
-> property_get -i 10 -n $a->*ArrayObject*storage["p"]
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="10" status="break" reason="ok"><error code="300"><message><![CDATA[can not get property]]></message></error></response>

0 comments on commit 379ab7a

Please sign in to comment.