Permalink
Browse files

Merge branch 'master' into form/select-date

  • Loading branch information...
2 parents b201562 + 022113e commit 883b217c7a7bbe32dd53962d31ff7f9d6c7811ee @bakura10 bakura10 committed Aug 18, 2012
Showing with 2,251 additions and 1,734 deletions.
  1. +1 −0 .travis.yml
  2. +50 −35 README.md
  3. +1 −1 library/Zend/Db/Adapter/Driver/Pdo/Connection.php
  4. +2 −2 library/Zend/Db/Adapter/Driver/Pdo/Result.php
  5. +0 −4 library/Zend/Db/Adapter/Driver/Pgsql/Pgsql.php
  6. +2 −25 library/Zend/Db/Adapter/Driver/StatementInterface.php
  7. +15 −3 library/Zend/Db/Adapter/ParameterContainer.php
  8. +74 −0 library/Zend/Db/Adapter/StatementContainer.php
  9. +44 −0 library/Zend/Db/Adapter/StatementContainerInterface.php
  10. +71 −32 library/Zend/Db/RowGateway/AbstractRowGateway.php
  11. +1 −1 library/Zend/Db/RowGateway/RowGateway.php
  12. +54 −13 library/Zend/Db/Sql/AbstractSql.php
  13. +10 −12 library/Zend/Db/Sql/Delete.php
  14. +1 −0 library/Zend/Db/Sql/ExpressionInterface.php
  15. +10 −12 library/Zend/Db/Sql/Insert.php
  16. +5 −5 library/Zend/Db/Sql/Platform/AbstractPlatform.php
  17. +17 −17 library/Zend/Db/Sql/Platform/SqlServer/SelectDecorator.php
  18. +19 −5 library/Zend/Db/Sql/Predicate/In.php
  19. +2 −2 library/Zend/Db/Sql/Predicate/Predicate.php
  20. +3 −3 library/Zend/Db/Sql/PreparableSqlInterface.php
  21. +127 −64 library/Zend/Db/Sql/Select.php
  22. +14 −18 library/Zend/Db/Sql/Update.php
  23. +5 −20 library/Zend/Db/TableGateway/Feature/MetadataFeature.php
  24. +7 −1 library/Zend/Dom/Query.php
  25. +20 −6 library/Zend/Feed/Reader/Reader.php
  26. +1 −1 library/Zend/Filter/StringTrim.php
  27. +55 −2 library/Zend/Form/Element/Collection.php
  28. +1 −1 library/Zend/Form/Element/Month.php
  29. +1 −1 library/Zend/Form/Element/MultiCheckbox.php
  30. +34 −4 library/Zend/Form/Element/Select.php
  31. +1 −1 library/Zend/Form/Element/Week.php
  32. +27 −11 library/Zend/Form/Fieldset.php
  33. +15 −0 library/Zend/Form/FieldsetInterface.php
  34. +12 −5 tests/ZendTest/Paginator/_files/TestTable.php → library/Zend/Form/FieldsetPrepareAwareInterface.php
  35. +30 −8 library/Zend/Form/Form.php
  36. +15 −5 library/Zend/Form/View/Helper/FormCheckbox.php
  37. +5 −2 library/Zend/Form/View/Helper/FormMultiCheckbox.php
  38. +1 −1 library/Zend/InputFilter/BaseInputFilter.php
  39. +11 −3 library/Zend/InputFilter/Factory.php
  40. +2 −0 library/Zend/Log/Formatter/Xml.php
  41. +4 −4 library/Zend/Log/Writer/Mail.php
  42. +0 −6 library/Zend/Mvc/Application.php
  43. +0 −35 library/Zend/Mvc/Controller/AbstractActionController.php
  44. +38 −5 library/Zend/Mvc/Controller/AbstractController.php
  45. +1 −18 library/Zend/Mvc/Controller/AbstractRestfulController.php
  46. +47 −27 library/Zend/Mvc/Controller/Plugin/Params.php
  47. +6 −2 library/Zend/Mvc/Controller/Plugin/PostRedirectGet.php
  48. +2 −2 library/Zend/Mvc/Router/Http/Regex.php
  49. +1 −1 library/Zend/Mvc/Router/Http/Segment.php
  50. +2 −2 library/Zend/Mvc/Router/Http/TreeRouteStack.php
  51. +49 −156 library/Zend/Paginator/Adapter/DbSelect.php
  52. +0 −32 library/Zend/Paginator/Adapter/DbTableSelect.php
  53. +1 −5 library/Zend/Paginator/Paginator.php
  54. +11 −1 library/Zend/Serializer/Adapter/Wddx.php
  55. +0 −9 library/Zend/ServiceManager/AbstractPluginManager.php
  56. +2 −0 library/Zend/Session/Container.php
  57. +7 −0 library/Zend/Soap/Client/Local.php
  58. +15 −3 library/Zend/Soap/Server.php
  59. +7 −0 library/Zend/Soap/Wsdl.php
  60. +10 −28 library/Zend/Stdlib/SplPriorityQueue.php
  61. +3 −1 library/Zend/Validator/Db/AbstractDb.php
  62. +41 −26 library/Zend/Validator/EmailAddress.php
  63. +1 −1 library/Zend/Version/Version.php
  64. +1 −2 library/Zend/View/Model/ViewModel.php
  65. +11 −1 library/Zend/XmlRpc/Request.php
  66. +11 −0 library/Zend/XmlRpc/Response.php
  67. +231 −0 tests/ZendTest/Db/RowGateway/AbstractRowGatewayTest.php
  68. +0 −118 tests/ZendTest/Db/RowGateway/RowGatewayTest.php
  69. +48 −39 tests/ZendTest/Db/Sql/AbstractSqlTest.php
  70. +12 −0 tests/ZendTest/Db/Sql/Predicate/InTest.php
  71. +73 −7 tests/ZendTest/Db/Sql/SelectTest.php
  72. +36 −0 tests/ZendTest/Db/TableGateway/Feature/MetadataFeatureTest.php
  73. +14 −0 tests/ZendTest/Dom/QueryTest.php
  74. +2 −1 tests/ZendTest/Feed/Reader/ReaderTest.php
  75. +13 −0 tests/ZendTest/Filter/StringTrimTest.php
  76. +11 −0 tests/ZendTest/Form/Annotation/AnnotationBuilderTest.php
  77. +1 −1 tests/ZendTest/Form/Element/CollectionTest.php
  78. +26 −0 tests/ZendTest/Form/Element/MonthTest.php
  79. +36 −6 tests/ZendTest/Form/Element/MultiCheckboxTest.php
  80. +38 −11 tests/ZendTest/Form/Element/RadioTest.php
  81. +72 −3 tests/ZendTest/Form/Element/SelectTest.php
  82. +25 −3 tests/ZendTest/Form/Element/WeekTest.php
  83. +34 −0 tests/ZendTest/Form/FormTest.php
  84. +23 −0 tests/ZendTest/Form/TestAsset/Annotation/EntityWithTypeAsElementName.php
  85. +10 −0 tests/ZendTest/Form/View/Helper/FormCheckboxTest.php
  86. +9 −9 tests/ZendTest/Form/View/Helper/FormMultiCheckboxTest.php
  87. +9 −9 tests/ZendTest/Form/View/Helper/FormRadioTest.php
  88. +37 −0 tests/ZendTest/InputFilter/FactoryTest.php
  89. +19 −0 tests/ZendTest/Log/Formatter/XmlTest.php
  90. +0 −10 tests/ZendTest/Mvc/ApplicationTest.php
  91. +91 −3 tests/ZendTest/Mvc/Controller/Plugin/ParamsTest.php
  92. +2 −0 tests/ZendTest/Mvc/Controller/Plugin/PostRedirectGetTest.php
  93. +6 −0 tests/ZendTest/Mvc/Router/Http/RegexTest.php
  94. +6 −0 tests/ZendTest/Mvc/Router/Http/SegmentTest.php
  95. +6 −6 tests/ZendTest/Mvc/Router/Http/TreeRouteStackTest.php
  96. +0 −119 tests/ZendTest/Paginator/Adapter/DbSelect/OracleTest.php
  97. +33 −443 tests/ZendTest/Paginator/Adapter/DbSelectTest.php
  98. +0 −37 tests/ZendTest/Paginator/Adapter/DbTableSelect/OracleTest.php
  99. +0 −41 tests/ZendTest/Paginator/Adapter/DbTableSelectTest.php
  100. +158 −168 tests/ZendTest/Paginator/PaginatorTest.php
  101. BIN tests/ZendTest/Paginator/_files/test.sqlite
  102. BIN tests/ZendTest/Paginator/_files/testempty.sqlite
  103. +11 −2 tests/ZendTest/Serializer/Adapter/WddxTest.php
  104. +19 −0 tests/ZendTest/Session/ContainerTest.php
  105. +30 −0 tests/ZendTest/Soap/ServerTest.php
  106. +13 −0 tests/ZendTest/Validator/Db/RecordExistsTest.php
  107. +36 −5 tests/ZendTest/Validator/EmailAddressTest.php
  108. +7 −0 tests/ZendTest/View/Model/ViewModelTest.php
  109. +10 −0 tests/ZendTest/XmlRpc/RequestTest.php
  110. +7 −0 tests/ZendTest/XmlRpc/ResponseTest.php
View
@@ -17,3 +17,4 @@ script:
notifications:
irc: "irc.freenode.org#zftalk.2"
+ email: false
View
@@ -4,47 +4,62 @@ Master: [![Build Status](https://secure.travis-ci.org/zendframework/zf2.png?bran
## RELEASE INFORMATION
-*Zend Framework 2.0.0rc3*
+*Zend Framework 2.0.0rc4*
-This is the third release candidate for 2.0.0. We will be releasing RCs
+This is the fourth release candidate for 2.0.0. We will be releasing RCs
on a weekly basis until we feel all critical issues are addressed. At
this time, we anticipate few API changes before the stable release, and
recommend testing your production applications against it.
-09 August 2012
-
-### UPDATES IN RC3
-
+17 August 2012
+
+### UPDATES IN RC4
+
+- Zend\Db
+ - RowGateway: delete() now works; RowGateway objects now no longer duplicates
+ the content internally leading to a larger than necessary memory footprint.
+ - Adapter for PDO: fixed such that all calls to rowCount() will always be an
+ integer; also fixed disconnect() from unsetting property
+ - Zend\Validator\Db: fixed such that TableIdentifier can be used to promote
+ schema.table identifiers
+ - Sql\Select: added reset() API to reset parts of a Select object, also
+ includes updated constants to refer to the parts by
+ - Sql\Select and others: Added subselect support in Select, In Expression and
+ the processExpression() abstraction for Zend\Db\Sql
+ - Metadata: fixed various incorrect keys when refering to contstraint data in
+ metadata value objects
+- Zend\Filter
+ - StringTrim filter now properly handles unicode whitespace
+- Zend\Form
+ - FieldsetInterface now defines the methods allowObjectBinding() and
+ allowValueBinding().
+ - New interface, FieldsetPrepareAwareInterface. Collection and Fieldset both
+ implement this.
+ - See https://github.com/zendframework/zf2/pull/2184 for details
+ - Select elements now handle options and validation more consistently with
+ other multi-value elements.
- Zend\Http
- - Socket client: Updated to enable verify_peer by default, to prevent
- potential Man-In-The-Middle attacks.
-
-- Zend\EventManager\SharedEventManager
- - SharedEventManager::attach now returns a callbackhandler for detaching,
- inline with what EventManager::attach does.
-
-- Zend\Form\Annotation
- - Form annotation builder - if isRequired is true, automatically add required attribute.
-
-- Zend\Mvc\Controller
- - Removed duplication between AbstractActionController and AbstractRestfullController.
- The AbstractController has the shared functions of both and allows to reuse it without the unneeded
- specific functions from AbstractActionController.
-
-- Zend\Feed
- - Added trim() to XML input when importing an XML or HTML string. This prevent a few isolated problems
- with the feeds of some applications having illegal preceeding space in an XML feed.
-
-- PSR-2 compatible
- - We refactored some of the components in order to be PSR-2 compatible. We will continue to check for
- PSR-2 compatibility in the next RC.
-
-- Removed the doc2rst scripts
- - We removed the scripts bin/doc2rst.php, bin/doc2rst.xsl, and bin/ZendBin for the conversion from
- DocBook to reStructuredText (all the doc files have been converted).
-
-Around 65 pull requests for a variety of features and bugfixes were handled
-since RC2!
+ - SSL options are now propagated to all Socket Adapter subclasses
+- Zend\InputFilter
+ - Allows passing ValidatorChain and FilterChain instances to the factory
+- Zend\Log
+ - Fixed xml formatter to not display empty extra information
+- Zend\Loader
+ - SplAutoloader was renamed to SplAutoloaderInterface (consistency issue)
+- Zend\Mvc
+ - params() helper now allows fetching full parameter containers if no
+ arguments are provided to its various methods (consistency issue)
+- Zend\Paginator
+ - The DbSelect adapter now works
+- Zend\View
+ - ViewModel now allows unsetting variables properly
+- Security
+ - Fixed issues in Zend\Dom, Zend\Soap, Zend\Feed, and Zend\XmlRpc with regards
+ to the way libxml2 allows xml entity expansion from DOCTYPE entities when it
+ is provided.
+
+Around 50 pull requests for a variety of features and bugfixes were handled
+since RC3, as well as almost 30 documentation changes!
### SYSTEM REQUIREMENTS
@@ -263,7 +263,7 @@ public function isConnected()
public function disconnect()
{
if ($this->isConnected()) {
- unset($this->resource);
+ $this->resource = null;
}
return $this;
}
@@ -176,9 +176,9 @@ public function count()
return $this->rowCount;
}
if ($this->rowCount instanceof \Closure) {
- $this->rowCount = call_user_func($this->rowCount);
+ $this->rowCount = (int) call_user_func($this->rowCount);
} else {
- $this->rowCount = $this->resource->rowCount();
+ $this->rowCount = (int) $this->resource->rowCount();
}
return $this->rowCount;
}
@@ -53,10 +53,6 @@ public function __construct($connection, Statement $statementPrototype = null, R
$connection = new Connection($connection);
}
- if (!$connection instanceof Connection) {
- throw new Exception\InvalidArgumentException('$connection must be an array of parameters or a Pdo\Connection object');
- }
-
$this->registerConnection($connection);
$this->registerStatementPrototype(($statementPrototype) ?: new Statement());
$this->registerResultPrototype(($resultPrototype) ?: new Result());
@@ -10,45 +10,22 @@
namespace Zend\Db\Adapter\Driver;
+use Zend\Db\Adapter\StatementContainerInterface;
use Zend\Db\Adapter\ParameterContainer;
/**
* @category Zend
* @package Zend_Db
* @subpackage Adapter
*/
-interface StatementInterface
+interface StatementInterface extends StatementContainerInterface
{
/**
* @return resource
*/
public function getResource();
- /**
- * @abstract
- * @param string $sql
- */
- public function setSql($sql);
-
- /**
- * @abstract
- * @return string
- */
- public function getSql();
-
- /**
- * @abstract
- * @param ParameterContainer $parameterContainer
- */
- public function setParameterContainer(ParameterContainer $parameterContainer);
-
- /**
- * @abstract
- * @return ParameterContainer
- */
- public function getParameterContainer();
-
/**
* @abstract
* @param string $sql
@@ -15,7 +15,7 @@
* @package Zend_Db
* @subpackage Adapter
*/
-class ParameterContainer implements \Iterator, \ArrayAccess
+class ParameterContainer implements \Iterator, \ArrayAccess, \Countable
{
const TYPE_AUTO = 'auto';
@@ -288,9 +288,21 @@ public function rewind()
* @param array $array
* @return ParameterContainer
*/
- public function merge(array $array)
+ public function merge($parameters)
{
- foreach ($array as $key => $value) {
+ if (!is_array($parameters) && !$parameters instanceof ParameterContainer) {
+ throw new Exception\InvalidArgumentException('$parameters must be an array or an instance of ParameterContainer');
+ }
+
+ if (count($parameters) == 0) {
+ return;
+ }
+
+ if ($parameters instanceof ParameterContainer) {
+ $parameters = $parameters->getNamedArray();
+ }
+
+ foreach ($parameters as $key => $value) {
if (is_int($key)) {
$key = null;
}
@@ -0,0 +1,74 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @package Zend_Db
+ */
+
+namespace Zend\Db\Adapter;
+
+/**
+ * @category Zend
+ * @package Zend_Db
+ * @subpackage Adapter
+ */
+class StatementContainer implements StatementContainerInterface
+{
+
+ /**
+ * @var string
+ */
+ protected $sql = '';
+
+ /**
+ * @var ParameterContainer
+ */
+ protected $parameterContainer = null;
+
+ /**
+ * @param string|null $sql
+ * @param ParameterContainer|null $parameterContainer
+ */
+ public function __construct($sql = null, ParameterContainer $parameterContainer = null)
+ {
+ if ($sql) {
+ $this->setSql($sql);
+ }
+ $this->parameterContainer = ($parameterContainer) ?: new ParameterContainer;
+ }
+
+ /**
+ * @param $sql
+ * @return StatementContainer
+ */
+ public function setSql($sql)
+ {
+ $this->sql = $sql;
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getSql()
+ {
+ return $this->sql;
+ }
+
+ public function setParameterContainer(ParameterContainer $parameterContainer)
+ {
+ $this->parameterContainer = $parameterContainer;
+ return $this;
+ }
+
+ /**
+ * @return null|ParameterContainer
+ */
+ public function getParameterContainer()
+ {
+ return $this->parameterContainer;
+ }
+}
@@ -0,0 +1,44 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @package Zend_Db
+ */
+
+namespace Zend\Db\Adapter;
+
+/**
+ * @category Zend
+ * @package Zend_Db
+ * @subpackage Adapter
+ */
+interface StatementContainerInterface
+{
+ /**
+ * @abstract
+ * @param $sql
+ * @return mixed
+ */
+ public function setSql($sql);
+
+ /**
+ * @abstract
+ * @return mixed
+ */
+ public function getSql();
+
+ /**
+ * @abstract
+ * @return mixed
+ */
+ public function setParameterContainer(ParameterContainer $parameterContainer);
+
+ /**
+ * @abstract
+ * @return mixed
+ */
+ public function getParameterContainer();
+}
Oops, something went wrong.

0 comments on commit 883b217

Please sign in to comment.