diff --git a/docs/languages/en/modules/zend.db.sql.ddl.rst b/docs/languages/en/modules/zend.db.sql.ddl.rst index b4372a5a3..e0eaedb59 100644 --- a/docs/languages/en/modules/zend.db.sql.ddl.rst +++ b/docs/languages/en/modules/zend.db.sql.ddl.rst @@ -181,6 +181,9 @@ In alphabetical order: | Decimal | ``$name, $precision, $scale = null`` | +------------------+----------------------------------------------------------------------------------+ | Float | ``$name, $digits, $decimal`` | +| | (Note: this class is deprecated as of 2.4.0; use Floating instead | ++------------------+----------------------------------------------------------------------------------+ +| Floating | ``$name, $digits, $decimal`` | +------------------+----------------------------------------------------------------------------------+ | Integer | ``$name, $nullable = false, $default = null, array $options = array()`` | +------------------+----------------------------------------------------------------------------------+ diff --git a/docs/languages/en/modules/zend.filter.int.rst b/docs/languages/en/modules/zend.filter.int.rst index d676a9623..995f889c9 100644 --- a/docs/languages/en/modules/zend.filter.int.rst +++ b/docs/languages/en/modules/zend.filter.int.rst @@ -2,17 +2,17 @@ .. _zend.filter.set.int: -Int ---- +ToInt +----- -``Zend\Filter\Int`` allows you to transform a scalar value which contains into an integer. +``Zend\Filter\ToInt`` allows you to transform a scalar value which contains into an integer. .. _zend.filter.set.int.options: Supported Options ^^^^^^^^^^^^^^^^^ -There are no additional options for ``Zend\Filter\Int``. +There are no additional options for ``Zend\Filter\ToInt``. .. _zend.filter.set.int.basic: @@ -24,10 +24,19 @@ A basic example of usage is below: .. code-block:: php :linenos: - $filter = new Zend\Filter\Int(); + $filter = new Zend\Filter\ToInt(); print $filter->filter('-4 is less than 0'); This will return '-4'. +Migration from 2.0-2.3 to 2.4+ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Version 2.4 adds support for PHP 7. In PHP 7, ``int`` is a reserved keyword, +which required renaming the ``Int`` filter. If you were using the ``Int`` filter +directly previously, you will now receive an ``E_USER_DEPRECATED`` notice on +instantiation. Please update your code to refer to the ``ToInt`` class instead. + +Users pulling their ``Int`` filter instance from the filter plugin manager +receive a ``ToInt`` instance instead starting in 2.4.0. diff --git a/docs/languages/en/modules/zend.filter.null.rst b/docs/languages/en/modules/zend.filter.null.rst index 609393fcb..5c6f3eb0d 100644 --- a/docs/languages/en/modules/zend.filter.null.rst +++ b/docs/languages/en/modules/zend.filter.null.rst @@ -2,8 +2,8 @@ .. _zend.filter.set.null: -Null ----- +ToNull +------ This filter will change the given input to be ``NULL`` if it meets specific criteria. This is often necessary when you work with databases and want to have a ``NULL`` value instead of a boolean or any other type. @@ -13,7 +13,7 @@ you work with databases and want to have a ``NULL`` value instead of a boolean o Supported Options ^^^^^^^^^^^^^^^^^ -The following options are supported for ``Zend\Filter\Null``: +The following options are supported for ``Zend\Filter\ToNull``: - **type**: The variable type which should be supported. @@ -28,12 +28,12 @@ Per default this filter works like *PHP*'s ``empty()`` method; in other words, i .. code-block:: php :linenos: - $filter = new Zend\Filter\Null(); + $filter = new Zend\Filter\ToNull(); $value = ''; $result = $filter->filter($value); // returns null instead of the empty string -This means that without providing any configuration, ``Zend\Filter\Null`` will accept all input types and return +This means that without providing any configuration, ``Zend\Filter\ToNull`` will accept all input types and return ``NULL`` in the same cases as ``empty()``. Any other value will be returned as is, without any changes. @@ -43,7 +43,7 @@ Any other value will be returned as is, without any changes. Changing the Default Behavior ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Sometimes it's not enough to filter based on ``empty()``. Therefor ``Zend\Filter\Null`` allows you to configure +Sometimes it's not enough to filter based on ``empty()``. Therefor ``Zend\Filter\ToNull`` allows you to configure which type will be converted and which not. The following types can be handled: @@ -69,21 +69,21 @@ them, you can give an array, you can use constants, or you can give a textual st :linenos: // converts false to null - $filter = new Zend\Filter\Null(Zend\Filter\Null::BOOLEAN); + $filter = new Zend\Filter\ToNull(Zend\Filter\ToNull::BOOLEAN); // converts false and 0 to null - $filter = new Zend\Filter\Null( - Zend\Filter\Null::BOOLEAN + Zend\Filter\Null::INTEGER + $filter = new Zend\Filter\ToNull( + Zend\Filter\ToNull::BOOLEAN + Zend\Filter\ToNull::INTEGER ); // converts false and 0 to null - $filter = new Zend\Filter\Null( array( - Zend\Filter\Null::BOOLEAN, - Zend\Filter\Null::INTEGER + $filter = new Zend\Filter\ToNull( array( + Zend\Filter\ToNull::BOOLEAN, + Zend\Filter\ToNull::INTEGER )); // converts false and 0 to null - $filter = new Zend\Filter\Null(array( + $filter = new Zend\Filter\ToNull(array( 'boolean', 'integer', )); @@ -91,4 +91,13 @@ them, you can give an array, you can use constants, or you can give a textual st You can also give a Traversable or an array to set the wished types. To set types afterwards use ``setType()``. +Migration from 2.0-2.3 to 2.4+ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Version 2.4 adds support for PHP 7. In PHP 7, ``null`` is a reserved keyword, +which required renaming the ``Null`` filter. If you were using the ``Null`` filter +directly previously, you will now receive an ``E_USER_DEPRECATED`` notice on +instantiation. Please update your code to refer to the ``ToNull`` class instead. + +Users pulling their ``Null`` filter instance from the filter plugin manager +receive a ``ToNull`` instance instead starting in 2.4.0. diff --git a/docs/languages/en/modules/zend.form.quick-start.rst b/docs/languages/en/modules/zend.form.quick-start.rst index 858e02662..971464193 100644 --- a/docs/languages/en/modules/zend.form.quick-start.rst +++ b/docs/languages/en/modules/zend.form.quick-start.rst @@ -923,8 +923,13 @@ Annotations allow us to solve this problem. You can define the following behavio - *Input*: specify the input class to use for this given element. A string value is expected. +- *Instance*: specify an object class instance to bind to the form or fieldset. + - *Name*: specify the name of the current element, fieldset, or form. A string value is expected. +- *Object*: specify an object class instance to bind to the form or fieldset. + (Note: this is deprecated in 2.4.0; use *Instance* instead.) + - *Options*: options to pass to the fieldset or form that are used to inform behavior -- things that are not attributes; e.g. labels, CAPTCHA adapters, etc. The annotation expects an associative array: ``@Options({"label": "Username:"})``. diff --git a/docs/languages/en/modules/zend.i18n.validator.float.rst b/docs/languages/en/modules/zend.i18n.validator.float.rst index 951aed2b4..3f5ca838f 100644 --- a/docs/languages/en/modules/zend.i18n.validator.float.rst +++ b/docs/languages/en/modules/zend.i18n.validator.float.rst @@ -2,18 +2,18 @@ .. _zend.i18n.validator.float: -Float -===== +IsFloat +======= -``Zend\I18n\Validator\Float`` allows you to validate if a given value contains a floating-point value. This validator +``Zend\I18n\Validator\IsFloat`` allows you to validate if a given value contains a floating-point value. This validator validates also localized input. .. _zend.i18n.validator.float.options: -Supported options for Zend\\I18n\\Validator\\Float --------------------------------------------------- +Supported options for Zend\\I18n\\Validator\\IsFloat +---------------------------------------------------- -The following options are supported for ``Zend\I18n\Validator\Float``: +The following options are supported for ``Zend\I18n\Validator\IsFloat``: - **locale**: Sets the locale which will be used to validate localized float values. @@ -28,7 +28,7 @@ locale is used for validation: .. code-block:: php :linenos: - $validator = new Zend\I18n\Validator\Float(); + $validator = new Zend\I18n\Validator\IsFloat(); $validator->isValid(1234.5); // returns true $validator->isValid('10a01'); // returns false @@ -45,13 +45,13 @@ Often it's useful to be able to validate also localized values. Float values are countries. For example using english you will write "1.5". In german you may write "1,5" and in other languages you may use grouping. -``Zend\I18n\Validator\Float`` is able to validate such notations. However,it is limited to the locale you set. See the +``Zend\I18n\Validator\IsFloat`` is able to validate such notations. However,it is limited to the locale you set. See the following code: .. code-block:: php :linenos: - $validator = new Zend\I18n\Validator\Float(array('locale' => 'de')); + $validator = new Zend\I18n\Validator\IsFloat(array('locale' => 'de')); $validator->isValid(1234.5); // returns true $validator->isValid("1 234,5"); // returns false @@ -62,5 +62,14 @@ As you can see, by using a locale, your input is validated localized. Using a di The locale can also be set afterwards by using ``setLocale()`` and retrieved by using ``getLocale()``. +Migration from 2.0-2.3 to 2.4+ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Version 2.4 adds support for PHP 7. In PHP 7, ``float`` is a reserved keyword, +which required renaming the ``Float`` validator. If you were using the ``Float`` validator +directly previously, you will now receive an ``E_USER_DEPRECATED`` notice on +instantiation. Please update your code to refer to the ``IsFloat`` class instead. + +Users pulling their ``Float`` validator instance from the validator plugin manager +receive an ``IsFloat`` instance instead starting in 2.4.0. diff --git a/docs/languages/en/modules/zend.i18n.validator.int.rst b/docs/languages/en/modules/zend.i18n.validator.int.rst index e5cbd310f..b282e6976 100644 --- a/docs/languages/en/modules/zend.i18n.validator.int.rst +++ b/docs/languages/en/modules/zend.i18n.validator.int.rst @@ -2,10 +2,10 @@ .. _zend.validator.set.int: -Int ---- +IsInt +----- -``Zend\I18n\Validator\Int`` validates if a given value is an integer. Also localized integer values are recognised and +``Zend\I18n\Validator\IsInt`` validates if a given value is an integer. Also localized integer values are recognised and can be validated. .. _zend.i18n.validator.int.options: @@ -13,7 +13,7 @@ can be validated. Supported Options ^^^^^^^^^^^^^^^^^ -The following options are supported for ``Zend\I18n\Validator\Int``: +The following options are supported for ``Zend\I18n\Validator\IsInt``: - **locale**: Sets the locale which will be used to validate localized integers. @@ -28,7 +28,7 @@ locale is used for validation: .. code-block:: php :linenos: - $validator = new Zend\I18n\Validator\Int(); + $validator = new Zend\I18n\Validator\IsInt(); $validator->isValid(1234); // returns true $validator->isValid(1234.5); // returns false @@ -46,13 +46,13 @@ Often it's useful to be able to validate also localized values. Integer values a countries. For example using english you can write "1234" or "1,234". Both are integer values but the grouping is optional. In german for example you may write "1.234" and in french "1 234". -``Zend\I18n\Validator\Int`` is able to validate such notations. But it is limited to the locale you set. This means that +``Zend\I18n\Validator\IsInt`` is able to validate such notations. But it is limited to the locale you set. This means that it not simply strips off the separator, it validates if the correct separator is used. See the following code: .. code-block:: php :linenos: - $validator = new Zend\I18n\Validator\Int(array('locale' => 'de')); + $validator = new Zend\I18n\Validator\IsInt(array('locale' => 'de')); $validator->isValid(1234); // returns true $validator->isValid("1,234"); // returns false @@ -63,4 +63,14 @@ As you can see, by using a locale, your input is validated localized. Using the The locale can also be set afterwards by using ``setLocale()`` and retrieved by using ``getLocale()``. +Migration from 2.0-2.3 to 2.4+ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Version 2.4 adds support for PHP 7. In PHP 7, ``int`` is a reserved keyword, +which required renaming the ``Int`` validator. If you were using the ``Int`` validator +directly previously, you will now receive an ``E_USER_DEPRECATED`` notice on +instantiation. Please update your code to refer to the ``IsInt`` class instead. + +Users pulling their ``Int`` validator instance from the validator plugin manager +receive an ``IsInt`` instance instead starting in 2.4.0. diff --git a/docs/languages/en/modules/zend.log.writers.rst b/docs/languages/en/modules/zend.log.writers.rst index 960a177e6..929c657e5 100644 --- a/docs/languages/en/modules/zend.log.writers.rst +++ b/docs/languages/en/modules/zend.log.writers.rst @@ -194,19 +194,30 @@ Writing to Zend Monitor Stubbing Out the Writer ----------------------- -The ``Zend\Log\Writer\Null`` is a stub that does not write log data to anything. It is useful for disabling logging +The ``Zend\Log\Writer\Noop`` is a stub that does not write log data to anything. It is useful for disabling logging or stubbing out logging during tests: .. code-block:: php :linenos: - $writer = new Zend\Log\Writer\Null; + $writer = new Zend\Log\Writer\Noop; $logger = new Zend\Log\Logger(); $logger->addWriter($writer); // goes nowhere $logger->info('Informational message'); +Migration from 2.0-2.3 to 2.4+ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Version 2.4 adds support for PHP 7. In PHP 7, ``null`` is a reserved keyword, +which required renaming the ``Null`` log writer. If you were using the ``Null`` writer +directly previously, you will now receive an ``E_USER_DEPRECATED`` notice on +instantiation. Please update your code to refer to the ``Noop`` class instead. + +Users pulling their ``Null`` writer instance from the writer plugin manager +receive a ``Noop`` instance instead starting in 2.4.0. + .. _zend.log.writers.mock: Testing with the Mock diff --git a/docs/languages/en/modules/zend.mail.transport.rst b/docs/languages/en/modules/zend.mail.transport.rst index 45ca4bf72..ee458d90f 100644 --- a/docs/languages/en/modules/zend.mail.transport.rst +++ b/docs/languages/en/modules/zend.mail.transport.rst @@ -106,6 +106,45 @@ File Transport Usage $transport->setOptions($options); $transport->send($message); +.. _zend.mail.transport.quick-start.inmemory-usage: + +InMemory Transport Usage +^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: php + :linenos: + + use Zend\Mail\Message; + use Zend\Mail\Transport\InMemory as InMemoryTransport; + + $message = new Message(); + $message->addTo('matthew@zend.com') + ->addFrom('ralph.schindler@zend.com') + ->setSubject('Greetings and Salutations!') + ->setBody("Sorry, I'm going to be late today!"); + + // Setup InMemory transport + $transport = new InMemoryTransport(); + $transport->send($message); + + // Verify the message: + $received = $transport->getLastMessage(); + +The InMemory transport is primarily of interest when in development or when +testing. + +Migration from 2.0-2.3 to 2.4+ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Version 2.4 adds support for PHP 7. In PHP 7, ``null`` is a reserved keyword, +which required renaming the ``Null`` transport. If you were using the ``Null`` transport +directly previously, you will now receive an ``E_USER_DEPRECATED`` notice on +instantiation. Please update your code to refer to the ``InMemory`` class instead. + +Users pulling their ``Null`` transport instance from the transport factory +(``Zend\Mail\Transport\Factory``) receive an ``InMemory`` instance instead +starting in 2.4.0. + .. _zend.mail.transport.options: Configuration Options diff --git a/docs/languages/en/modules/zend.paginator.usage.rst b/docs/languages/en/modules/zend.paginator.usage.rst index b35350066..667bb64ba 100644 --- a/docs/languages/en/modules/zend.paginator.usage.rst +++ b/docs/languages/en/modules/zend.paginator.usage.rst @@ -25,7 +25,7 @@ default: +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |Iterator |Accepts an Iterator instance | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - |Null |Does not use Zend\\Paginator to manage data pagination. You can still take advantage of the pagination control feature. | + |NullFill |Does not use Zend\\Paginator to manage data pagination. You can still take advantage of the pagination control feature. | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. note:: @@ -33,6 +33,16 @@ default: Instead of selecting every matching row of a given query, the DbSelect adapter retrieves only the smallest amount of data necessary for displaying the current page. Because of this, a second query is dynamically generated to determine the total number of matching rows. +.. note: + + Version 2.4 adds support for PHP 7. In PHP 7, ``null`` is a reserved keyword, + which required renaming the ``Null`` adapter. If you were using the ``Null`` adapter + directly previously, you will now receive an ``E_USER_DEPRECATED`` notice on + instantiation. Please update your code to refer to the ``NullFill`` class instead. + + Users pulling their ``Null`` adapter instance from the adapter plugin manager + receive a ``NullFill`` instance instead starting in 2.4.0. + To create an instance of ``Zend\Paginator``, you must supply an adapter to the constructor: .. code-block:: php @@ -40,7 +50,7 @@ To create an instance of ``Zend\Paginator``, you must supply an adapter to the c $paginator = new \Zend\Paginator\Paginator(new \Zend\Paginator\Adapter\ArrayAdapter($array)); -In the case of the ``Null`` adapter, in lieu of a data collection you must supply an item count to its +In the case of the ``NullFill`` adapter, in lieu of a data collection you must supply an item count to its constructor. Although the instance is technically usable in this state, in your controller action you'll need to tell the diff --git a/docs/languages/en/modules/zend.xmlrpc.client.rst b/docs/languages/en/modules/zend.xmlrpc.client.rst index 812de2860..ad7932e6e 100644 --- a/docs/languages/en/modules/zend.xmlrpc.client.rst +++ b/docs/languages/en/modules/zend.xmlrpc.client.rst @@ -184,7 +184,7 @@ subclasses directly, or use the static factory method ``Zend\XmlRpc\AbstractValu +----------------+--------------------------------------------------+-------------------------------+ |boolean |Zend\\XmlRpc\\AbstractValue::XMLRPC_TYPE_BOOLEAN |Zend\\XmlRpc\\Value\\Boolean | +----------------+--------------------------------------------------+-------------------------------+ - |string |Zend\\XmlRpc\\AbstractValue::XMLRPC_TYPE_STRING |Zend\\XmlRpc\\Value\\String | + |string |Zend\\XmlRpc\\AbstractValue::XMLRPC_TYPE_STRING |Zend\\XmlRpc\\Value\\Text | +----------------+--------------------------------------------------+-------------------------------+ |nil |Zend\\XmlRpc\\AbstractValue::XMLRPC_TYPE_NIL |Zend\\XmlRpc\\Value\\Nil | +----------------+--------------------------------------------------+-------------------------------+