diff --git a/.gitattributes b/.gitattributes index 7325c690..16d8d293 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,8 +1,10 @@ -/test export-ignore -/vendor export-ignore -.coveralls.yml export-ignore -.gitattributes export-ignore -.gitignore export-ignore -.travis.yml export-ignore -.php_cs export-ignore -phpunit.xml.dist export-ignore +/.coveralls.yml export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore +/.travis.yml export-ignore +/composer.lock export-ignore +/docs/ export-ignore +/mkdocs.yml export-ignore +/phpcs.xml export-ignore +/phpunit.xml.dist export-ignore +/test/ export-ignore diff --git a/.gitignore b/.gitignore index 673fe323..245087af 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,7 @@ -.buildpath -.DS_Store -.idea -.project -.settings/ -.*.sw* -.*.un~ -nbproject -doc/html/ -tmp/ -zf-mkdoc-theme/ - -clover.xml -coveralls-upload.json -phpunit.xml -vendor +/clover.xml +/coveralls-upload.json +/docs/html/ +/phpunit.xml +/vendor/ +/zf-mkdoc-theme.tgz +/zf-mkdoc-theme/ diff --git a/.travis.yml b/.travis.yml index 37cf241d..951826d8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,6 @@ env: global: - COMPOSER_ARGS="--no-interaction" - COVERAGE_DEPS="satooshi/php-coveralls" - - LEGACY_DEPS="phpunit/phpunit" - TESTS_ZEND_FORM_ANNOTATION_SUPPORT=true - TESTS_ZEND_FORM_RECAPTCHA_SUPPORT=true @@ -28,17 +27,17 @@ matrix: - php: 5.6 env: - DEPS=locked - - CS_CHECK=true + - LEGACY_DEPS="phpunit/phpunit" - php: 5.6 env: - DEPS=latest - - TEST_COVERAGE=true - php: 7 env: - DEPS=lowest - php: 7 env: - DEPS=locked + - LEGACY_DEPS="phpunit/phpunit" - php: 7 env: - DEPS=latest @@ -48,6 +47,8 @@ matrix: - php: 7.1 env: - DEPS=locked + - CS_CHECK=true + - TEST_COVERAGE=true - php: 7.1 env: - DEPS=latest @@ -60,18 +61,15 @@ matrix: - php: 7.2 env: - DEPS=latest - allow_failures: - - php: 7.2 before_install: - if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi - - travis_retry composer self-update install: - travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs - - if [[ $TRAVIS_PHP_VERSION =~ ^5.6 ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi + - if [[ $LEGACY_DEPS != '' ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi - if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi - - if [[ $DEPS == 'lowest' ]]; then travis_retry composer update $COMPOSER_ARGS --prefer-lowest --prefer-stable ; fi + - if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi - if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi - stty cols 120 && composer show diff --git a/LICENSE.md b/LICENSE.md index dbb1b49c..63df4102 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,16 +1,15 @@ -Copyright (c) 2005-2015, Zend Technologies USA, Inc. - +Copyright (c) 2005-2017, Zend Technologies USA, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -- Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. +- Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. -- Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. +- Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. - Neither the name of Zend Technologies USA, Inc. nor the names of its contributors may be used to endorse or promote products derived from this diff --git a/README.md b/README.md index 5cfca93f..40bc56a7 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # zend-form [![Build Status](https://secure.travis-ci.org/zendframework/zend-form.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-form) -[![Coverage Status](https://coveralls.io/repos/zendframework/zend-form/badge.svg?branch=master)](https://coveralls.io/r/zendframework/zend-form?branch=master) +[![Coverage Status](https://coveralls.io/repos/github/zendframework/zend-form/badge.svg?branch=master)](https://coveralls.io/github/zendframework/zend-form?branch=master) zend-form is intended primarily as a bridge between your domain models and the View Layer. It composes a thin layer of objects representing form elements, diff --git a/composer.json b/composer.json index b033262b..9f822d5e 100644 --- a/composer.json +++ b/composer.json @@ -1,22 +1,22 @@ { "name": "zendframework/zend-form", - "description": " ", + "description": "Validate and display simple and complex forms, casting forms to business objects and vice versa", "license": "BSD-3-Clause", "keywords": [ - "zf2", + "zf", + "zendframework", "form" ], - "homepage": "https://github.com/zendframework/zend-form", - "autoload": { - "psr-4": { - "Zend\\Form\\": "src/" - }, - "files": [ - "autoload/formElementManagerPolyfill.php" - ] + "support": { + "docs": "https://docs.zendframework.com/zend-form/", + "issues": "https://github.com/zendframework/zend-form/issues", + "source": "https://github.com/zendframework/zend-form", + "rss": "https://github.com/zendframework/zend-form/releases.atom", + "slack": "https://zendframework-slack.herokuapp.com", + "forum": "https://discourse.zendframework.com/c/questions/components" }, "require": { - "php": "^7.0 || ^5.6", + "php": "^5.6 || ^7.0", "zendframework/zend-inputfilter": "^2.6", "zendframework/zend-hydrator": "^1.1 || ^2.1", "zendframework/zend-stdlib": "^2.7 || ^3.0" @@ -36,7 +36,7 @@ "zendframework/zend-validator": "^2.6", "zendframework/zend-view": "^2.6.2", "zendframework/zendservice-recaptcha": "^3.0.0", - "phpunit/phpunit": "^6.0.8 || ^5.7.15", + "phpunit/phpunit": "^5.7.23 || ^6.5.3", "zendframework/zend-coding-standard": "~1.0.0" }, "suggest": { @@ -48,8 +48,22 @@ "zendframework/zend-view": "^2.6.2, required for using the zend-form view helpers", "zendframework/zendservice-recaptcha": "in order to use the ReCaptcha form element" }, - "minimum-stability": "dev", - "prefer-stable": true, + "autoload": { + "psr-4": { + "Zend\\Form\\": "src/" + }, + "files": [ + "autoload/formElementManagerPolyfill.php" + ] + }, + "autoload-dev": { + "psr-4": { + "ZendTest\\Form\\": "test/" + } + }, + "config": { + "sort-packages": true + }, "extra": { "branch-alias": { "dev-master": "2.10-dev", @@ -60,14 +74,6 @@ "config-provider": "Zend\\Form\\ConfigProvider" } }, - "autoload-dev": { - "psr-4": { - "ZendTest\\Form\\": "test/" - } - }, - "config": { - "process-timeout": 0 - }, "scripts": { "check": [ "@cs-check", diff --git a/composer.lock b/composer.lock index f7c0648a..8ab0b104 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "74fd7606f4dae44fadc48fa9701cbeeb", + "content-hash": "bb5ff24714136f39babd777ac6d17a3d", "packages": [ { "name": "container-interop/container-interop", @@ -451,32 +451,32 @@ }, { "name": "doctrine/instantiator", - "version": "1.0.5", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", "shasum": "" }, "require": { - "php": ">=5.3,<8.0-DEV" + "php": "^7.1" }, "require-dev": { "athletic/athletic": "~0.1.8", "ext-pdo": "*", "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" + "phpunit/phpunit": "^6.2.3", + "squizlabs/php_codesniffer": "^3.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { @@ -501,7 +501,7 @@ "constructor", "instantiate" ], - "time": "2015-06-14T21:17:01+00:00" + "time": "2017-07-22T11:58:36+00:00" }, { "name": "doctrine/lexer", @@ -559,37 +559,40 @@ }, { "name": "myclabs/deep-copy", - "version": "1.6.1", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102" + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/8e6e04167378abf1ddb4d3522d8755c5fd90d102", - "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", "shasum": "" }, "require": { - "php": ">=5.4.0" + "php": "^5.6 || ^7.0" }, "require-dev": { - "doctrine/collections": "1.*", - "phpunit/phpunit": "~4.1" + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^4.1" }, "type": "library", "autoload": { "psr-4": { "DeepCopy\\": "src/DeepCopy/" - } + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "description": "Create deep copies (clones) of your objects", - "homepage": "https://github.com/myclabs/DeepCopy", "keywords": [ "clone", "copy", @@ -597,7 +600,7 @@ "object", "object graph" ], - "time": "2017-04-12T18:52:22+00:00" + "time": "2017-10-19T19:58:43+00:00" }, { "name": "paragonie/random_compat", @@ -751,16 +754,16 @@ }, { "name": "phpdocumentor/reflection-common", - "version": "1.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", "shasum": "" }, "require": { @@ -801,33 +804,39 @@ "reflection", "static analysis" ], - "time": "2015-12-27T11:43:31+00:00" + "time": "2017-09-11T18:02:19+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "3.1.1", + "version": "4.2.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" + "reference": "66465776cfc249844bde6d117abff1d22e06c2da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/66465776cfc249844bde6d117abff1d22e06c2da", + "reference": "66465776cfc249844bde6d117abff1d22e06c2da", "shasum": "" }, "require": { - "php": ">=5.5", - "phpdocumentor/reflection-common": "^1.0@dev", - "phpdocumentor/type-resolver": "^0.2.0", + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0.0", + "phpdocumentor/type-resolver": "^0.4.0", "webmozart/assert": "^1.0" }, "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^4.4" + "doctrine/instantiator": "~1.0.5", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, "autoload": { "psr-4": { "phpDocumentor\\Reflection\\": [ @@ -846,24 +855,24 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2016-09-30T07:12:33+00:00" + "time": "2017-11-27T17:38:31+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "0.2.1", + "version": "0.4.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb" + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", - "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", "shasum": "" }, "require": { - "php": ">=5.5", + "php": "^5.5 || ^7.0", "phpdocumentor/reflection-common": "^1.0" }, "require-dev": { @@ -893,37 +902,37 @@ "email": "me@mikevanriel.com" } ], - "time": "2016-11-25T06:54:22+00:00" + "time": "2017-07-14T14:27:02+00:00" }, { "name": "phpspec/prophecy", - "version": "v1.7.0", + "version": "1.7.3", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "93d39f1f7f9326d746203c7c056f300f7f126073" + "reference": "e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/93d39f1f7f9326d746203c7c056f300f7f126073", - "reference": "93d39f1f7f9326d746203c7c056f300f7f126073", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf", + "reference": "e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", "sebastian/comparator": "^1.1|^2.0", "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8 || ^5.6.5" + "phpunit/phpunit": "^4.8.35 || ^5.7" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6.x-dev" + "dev-master": "1.7.x-dev" } }, "autoload": { @@ -956,45 +965,44 @@ "spy", "stub" ], - "time": "2017-03-02T20:05:34+00:00" + "time": "2017-11-24T13:59:53+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "5.2.1", + "version": "5.3.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "dc421f9ca5082a0c0cb04afb171c765f79add85b" + "reference": "661f34d0bd3f1a7225ef491a70a020ad23a057a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/dc421f9ca5082a0c0cb04afb171c765f79add85b", - "reference": "dc421f9ca5082a0c0cb04afb171c765f79add85b", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/661f34d0bd3f1a7225ef491a70a020ad23a057a1", + "reference": "661f34d0bd3f1a7225ef491a70a020ad23a057a1", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", "php": "^7.0", - "phpunit/php-file-iterator": "^1.3", - "phpunit/php-text-template": "^1.2", - "phpunit/php-token-stream": "^1.4.11 || ^2.0", - "sebastian/code-unit-reverse-lookup": "^1.0", + "phpunit/php-file-iterator": "^1.4.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-token-stream": "^2.0.1", + "sebastian/code-unit-reverse-lookup": "^1.0.1", "sebastian/environment": "^3.0", - "sebastian/version": "^2.0", + "sebastian/version": "^2.0.1", "theseer/tokenizer": "^1.1" }, "require-dev": { - "ext-xdebug": "^2.5", "phpunit/phpunit": "^6.0" }, "suggest": { - "ext-xdebug": "^2.5.3" + "ext-xdebug": "^2.5.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.2.x-dev" + "dev-master": "5.3.x-dev" } }, "autoload": { @@ -1009,7 +1017,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -1020,20 +1028,20 @@ "testing", "xunit" ], - "time": "2017-04-21T08:03:57+00:00" + "time": "2017-12-06T09:29:45+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.4.2", + "version": "1.4.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", "shasum": "" }, "require": { @@ -1067,7 +1075,7 @@ "filesystem", "iterator" ], - "time": "2016-10-03T07:40:28+00:00" + "time": "2017-11-27T13:52:08+00:00" }, { "name": "phpunit/php-text-template", @@ -1161,29 +1169,29 @@ }, { "name": "phpunit/php-token-stream", - "version": "1.4.11", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7" + "reference": "791198a2c6254db10131eecfe8c06670700904db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e03f8f67534427a787e21a385a67ec3ca6978ea7", - "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db", + "reference": "791198a2c6254db10131eecfe8c06670700904db", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^6.2.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1206,20 +1214,20 @@ "keywords": [ "tokenizer" ], - "time": "2017-02-27T10:12:30+00:00" + "time": "2017-11-27T05:48:46+00:00" }, { "name": "phpunit/phpunit", - "version": "6.1.2", + "version": "6.5.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "fbf2e46d5c563ee78c9b559bcbeb1c97cad6af0f" + "reference": "882e886cc928a0abd3c61282b2a64026237d14a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fbf2e46d5c563ee78c9b559bcbeb1c97cad6af0f", - "reference": "fbf2e46d5c563ee78c9b559bcbeb1c97cad6af0f", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/882e886cc928a0abd3c61282b2a64026237d14a4", + "reference": "882e886cc928a0abd3c61282b2a64026237d14a4", "shasum": "" }, "require": { @@ -1228,24 +1236,24 @@ "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", - "myclabs/deep-copy": "^1.3", + "myclabs/deep-copy": "^1.6.1", "phar-io/manifest": "^1.0.1", "phar-io/version": "^1.0", "php": "^7.0", "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^5.2", - "phpunit/php-file-iterator": "^1.4", - "phpunit/php-text-template": "^1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "^4.0", - "sebastian/comparator": "^2.0", - "sebastian/diff": "^1.2", - "sebastian/environment": "^3.0.1", + "phpunit/php-code-coverage": "^5.3", + "phpunit/php-file-iterator": "^1.4.3", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^1.0.9", + "phpunit/phpunit-mock-objects": "^5.0.4", + "sebastian/comparator": "^2.1", + "sebastian/diff": "^2.0", + "sebastian/environment": "^3.1", "sebastian/exporter": "^3.1", - "sebastian/global-state": "^1.1 || ^2.0", - "sebastian/object-enumerator": "^3.0.2", + "sebastian/global-state": "^2.0", + "sebastian/object-enumerator": "^3.0.3", "sebastian/resource-operations": "^1.0", - "sebastian/version": "^2.0" + "sebastian/version": "^2.0.1" }, "conflict": { "phpdocumentor/reflection-docblock": "3.0.2", @@ -1264,7 +1272,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "6.1.x-dev" + "dev-master": "6.5.x-dev" } }, "autoload": { @@ -1290,33 +1298,33 @@ "testing", "xunit" ], - "time": "2017-04-25T21:30:13+00:00" + "time": "2017-12-06T09:42:03+00:00" }, { "name": "phpunit/phpunit-mock-objects", - "version": "4.0.1", + "version": "5.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "eabce450df194817a7d7e27e19013569a903a2bf" + "reference": "16b50f4167e5e85e81ca8a3dd105d0a5fd32009a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/eabce450df194817a7d7e27e19013569a903a2bf", - "reference": "eabce450df194817a7d7e27e19013569a903a2bf", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/16b50f4167e5e85e81ca8a3dd105d0a5fd32009a", + "reference": "16b50f4167e5e85e81ca8a3dd105d0a5fd32009a", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", + "doctrine/instantiator": "^1.0.5", "php": "^7.0", - "phpunit/php-text-template": "^1.2", + "phpunit/php-text-template": "^1.2.1", "sebastian/exporter": "^3.0" }, "conflict": { "phpunit/phpunit": "<6.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^6.5" }, "suggest": { "ext-soap": "*" @@ -1324,7 +1332,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0.x-dev" + "dev-master": "5.0.x-dev" } }, "autoload": { @@ -1339,7 +1347,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -1349,7 +1357,7 @@ "mock", "xunit" ], - "time": "2017-03-03T06:30:20+00:00" + "time": "2017-12-02T05:31:19+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -1398,30 +1406,30 @@ }, { "name": "sebastian/comparator", - "version": "2.0.0", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "20f84f468cb67efee293246e6a09619b891f55f0" + "reference": "1174d9018191e93cb9d719edec01257fc05f8158" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/20f84f468cb67efee293246e6a09619b891f55f0", - "reference": "20f84f468cb67efee293246e6a09619b891f55f0", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1174d9018191e93cb9d719edec01257fc05f8158", + "reference": "1174d9018191e93cb9d719edec01257fc05f8158", "shasum": "" }, "require": { "php": "^7.0", - "sebastian/diff": "^1.2", - "sebastian/exporter": "^3.0" + "sebastian/diff": "^2.0", + "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^6.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "2.1.x-dev" } }, "autoload": { @@ -1452,38 +1460,38 @@ } ], "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", + "homepage": "https://github.com/sebastianbergmann/comparator", "keywords": [ "comparator", "compare", "equality" ], - "time": "2017-03-03T06:26:08+00:00" + "time": "2017-11-03T07:16:52+00:00" }, { "name": "sebastian/diff", - "version": "1.4.1", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", + "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.8" + "phpunit/phpunit": "^6.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1510,20 +1518,20 @@ "keywords": [ "diff" ], - "time": "2015-12-08T07:14:41+00:00" + "time": "2017-08-03T08:09:46+00:00" }, { "name": "sebastian/environment", - "version": "3.0.2", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "11e7710b7724d42c62249b0e9d3030240398949d" + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/11e7710b7724d42c62249b0e9d3030240398949d", - "reference": "11e7710b7724d42c62249b0e9d3030240398949d", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", "shasum": "" }, "require": { @@ -1535,7 +1543,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "3.1.x-dev" } }, "autoload": { @@ -1560,7 +1568,7 @@ "environment", "hhvm" ], - "time": "2017-04-21T14:40:32+00:00" + "time": "2017-07-01T08:51:00+00:00" }, { "name": "sebastian/exporter", @@ -1631,23 +1639,23 @@ }, { "name": "sebastian/global-state", - "version": "1.1.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^6.0" }, "suggest": { "ext-uopz": "*" @@ -1655,7 +1663,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1678,25 +1686,25 @@ "keywords": [ "global state" ], - "time": "2015-10-12T03:26:01+00:00" + "time": "2017-04-27T15:39:26+00:00" }, { "name": "sebastian/object-enumerator", - "version": "3.0.2", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "31dd3379d16446c5d86dec32ab1ad1f378581ad8" + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/31dd3379d16446c5d86dec32ab1ad1f378581ad8", - "reference": "31dd3379d16446c5d86dec32ab1ad1f378581ad8", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", "shasum": "" }, "require": { "php": "^7.0", - "sebastian/object-reflector": "^1.0", + "sebastian/object-reflector": "^1.1.1", "sebastian/recursion-context": "^3.0" }, "require-dev": { @@ -1725,7 +1733,7 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-03-12T15:17:29+00:00" + "time": "2017-08-03T12:35:26+00:00" }, { "name": "sebastian/object-reflector", @@ -3009,12 +3017,12 @@ } ], "aliases": [], - "minimum-stability": "dev", + "minimum-stability": "stable", "stability-flags": [], - "prefer-stable": true, + "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.0 || ^5.6" + "php": "^5.6 || ^7.0" }, "platform-dev": [] } diff --git a/CONDUCT.md b/docs/CODE_OF_CONDUCT.md similarity index 96% rename from CONDUCT.md rename to docs/CODE_OF_CONDUCT.md index c663d2be..02fafcd1 100644 --- a/CONDUCT.md +++ b/docs/CODE_OF_CONDUCT.md @@ -1,6 +1,6 @@ # Contributor Code of Conduct -The Zend Framework project adheres to [The Code Manifesto](http://codemanifesto.com) +This project adheres to [The Code Manifesto](http://codemanifesto.com) as its guidelines for contributor interactions. ## The Code Manifesto diff --git a/CONTRIBUTING.md b/docs/CONTRIBUTING.md similarity index 54% rename from CONTRIBUTING.md rename to docs/CONTRIBUTING.md index 532fbd54..737d672b 100644 --- a/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -2,73 +2,43 @@ ## RESOURCES -If you wish to contribute to Zend Framework, please be sure to +If you wish to contribute to this project, please be sure to read/subscribe to the following resources: - - [Coding Standards](https://github.com/zendframework/zf2/wiki/Coding-Standards) - - [Contributor's Guide](http://framework.zend.com/participate/contributor-guide) - - ZF Contributor's mailing list: - Archives: http://zend-framework-community.634137.n4.nabble.com/ZF-Contributor-f680267.html - Subscribe: zf-contributors-subscribe@lists.zend.com - - ZF Contributor's IRC channel: - #zftalk.dev on Freenode.net + - [Coding Standards](https://github.com/zendframework/zend-coding-standard) + - [Forums](https://discourse.zendframework.com/c/contributors) + - [Slack](https://zendframework-slack.herokuapp.com) + - [Code of Conduct](CODE_OF_CONDUCT.md) -If you are working on new features or refactoring [create a proposal](https://github.com/zendframework/zend-form/issues/new). - -## Reporting Potential Security Issues - -If you have encountered a potential security vulnerability, please **DO NOT** report it on the public -issue tracker: send it to us at [zf-security@zend.com](mailto:zf-security@zend.com) instead. -We will work with you to verify the vulnerability and patch it as soon as possible. - -When reporting issues, please provide the following information: - -- Component(s) affected -- A description indicating how to reproduce the issue -- A summary of the security vulnerability and impact - -We request that you contact us via the email address above and give the project -contributors a chance to resolve the vulnerability and issue a new release prior -to any public exposure; this helps protect users and provides them with a chance -to upgrade and/or update in order to protect their applications. - -For sensitive email communications, please use [our PGP key](http://framework.zend.com/zf-security-pgp-key.asc). +If you are working on new features or refactoring +[create a proposal](https://github.com/zendframework/zend-form/issues/new). ## RUNNING TESTS -> ### Note: testing versions prior to 2.4 -> -> This component originates with Zend Framework 2. During the lifetime of ZF2, -> testing infrastructure migrated from PHPUnit 3 to PHPUnit 4. In most cases, no -> changes were necessary. However, due to the migration, tests may not run on -> versions < 2.4. As such, you may need to change the PHPUnit dependency if -> attempting a fix on such a version. - To run tests: - Clone the repository: ```console - $ git clone git@github.com:zendframework/zend-form.git - $ cd + $ git clone git://github.com/zendframework/zend-form.git + $ cd zend-form ``` - Install dependencies via composer: ```console - $ curl -sS https://getcomposer.org/installer | php -- - $ ./composer.phar install + $ composer install ``` - If you don't have `curl` installed, you can also download `composer.phar` from https://getcomposer.org/ + If you don't have `composer` installed, please download it from https://getcomposer.org/download/ -- Run the tests via `phpunit` and the provided PHPUnit config, like in this example: +- Run the tests using the "test" command shipped in the `composer.json`: ```console - $ ./vendor/bin/phpunit + $ composer test ``` -You can turn on conditional tests with the phpunit.xml file. +You can turn on conditional tests with the `phpunit.xml` file. To do so: - Copy `phpunit.xml.dist` file to `phpunit.xml` @@ -77,24 +47,22 @@ To do so: ## Running Coding Standards Checks -This component uses [phpcs](https://github.com/squizlabs/PHP_CodeSniffer) for coding -standards checks, and provides configuration for our selected checks. -`phpcs` is installed by default via Composer. +First, ensure you've installed dependencies via composer, per the previous +section on running tests. -To run checks only: +To run CS checks only: ```console $ composer cs-check ``` -`phpcs` also includes a tool for fixing most CS violations, `phpcbf`: - +To attempt to automatically fix common CS issues: ```console $ composer cs-fix ``` -If you allow `phpcbf` to fix CS issues, please re-run the tests to ensure +If the above fixes any CS issues, please re-run the tests to ensure they pass, and make sure you add and commit the changes after verification. ## Recommended Workflow for Contributions @@ -103,12 +71,12 @@ Your first step is to establish a public repository from which we can pull your work into the master repository. We recommend using [GitHub](https://github.com), as that is where the component is already hosted. -1. Setup a [GitHub account](http://github.com/), if you haven't yet -2. Fork the repository (http://github.com/zendframework/zend-form) +1. Setup a [GitHub account](https://github.com/), if you haven't yet +2. Fork the repository (https://github.com/zendframework/zend-form) 3. Clone the canonical repository locally and enter it. ```console - $ git clone git@github.com:zendframework/zend-form.git + $ git clone git://github.com/zendframework/zend-form.git $ cd zend-form ``` @@ -188,15 +156,7 @@ To send a pull request, you have two options. If using GitHub, you can do the pull request from there. Navigate to your repository, select the branch you just created, and then select the "Pull Request" button in the upper right. Select the user/organization -"zendframework" as the recipient. - -If using your own repository - or even if using GitHub - you can use `git -format-patch` to create a patchset for us to apply; in fact, this is -**recommended** for security-related patches. If you use `format-patch`, please -send the patches as attachments to: - -- zf-devteam@zend.com for patches without security implications -- zf-security@zend.com for security patches +"zendframework" (or whatever the upstream organization is) as the recipient. #### What branch to issue the pull request against? @@ -227,8 +187,3 @@ repository, we suggest doing some cleanup of these branches. ```console $ git push {username} : ``` - - -## Conduct - -Please see our [CONDUCT.md](CONDUCT.md) to understand expected behavior when interacting with others in the project. diff --git a/docs/ISSUE_TEMPLATE.md b/docs/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..af749eb7 --- /dev/null +++ b/docs/ISSUE_TEMPLATE.md @@ -0,0 +1,19 @@ + - [ ] I was not able to find an [open](https://github.com/zendframework/zend-form/issues?q=is%3Aopen) or [closed](https://github.com/zendframework/zend-form/issues?q=is%3Aclosed) issue matching what I'm seeing. + - [ ] This is not a question. (Questions should be asked on [slack](https://zendframework.slack.com/) ([Signup for Slack here](https://zendframework-slack.herokuapp.com/)) or our [forums](https://discourse.zendframework.com/).) + +Provide a narrative description of what you are trying to accomplish. + +### Code to reproduce the issue + + + +```php +``` + +### Expected results + + + +### Actual results + + diff --git a/docs/PULL_REQUEST_TEMPLATE.md b/docs/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..f00d90c0 --- /dev/null +++ b/docs/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,25 @@ +Provide a narrative description of what you are trying to accomplish: + +- [ ] Are you fixing a bug? + - [ ] Detail how the bug is invoked currently. + - [ ] Detail the original, incorrect behavior. + - [ ] Detail the new, expected behavior. + - [ ] Base your feature on the `master` branch, and submit against that branch. + - [ ] Add a regression test that demonstrates the bug, and proves the fix. + - [ ] Add a `CHANGELOG.md` entry for the fix. + +- [ ] Are you creating a new feature? + - [ ] Why is the new feature needed? What purpose does it serve? + - [ ] How will users use the new feature? + - [ ] Base your feature on the `develop` branch, and submit against that branch. + - [ ] Add only one feature per pull request; split multiple features over multiple pull requests + - [ ] Add tests for the new feature. + - [ ] Add documentation for the new feature. + - [ ] Add a `CHANGELOG.md` entry for the new feature. + +- [ ] Is this related to quality assurance? + + +- [ ] Is this related to documentation? + + diff --git a/docs/SUPPORT.md b/docs/SUPPORT.md new file mode 100644 index 00000000..7aeb9519 --- /dev/null +++ b/docs/SUPPORT.md @@ -0,0 +1,25 @@ +# Getting Support + +Zend Framework offers three support channels: + +- For real-time questions, use our + [Slack](https://zendframework-slack.herokuapp.com) +- For detailed questions (e.g., those requiring examples) use our + [forums](https://discourse.zendframework.com/c/questions/components) +- To report issues, use this repository's + [issue tracker](https://github.com/zendframework/zend-form/issues/new) + +**DO NOT** use the issue tracker to ask questions; use Slack or the forums for +that. Questions posed to the issue tracker will be closed. + +When reporting an issue, please include the following details: + +- A narrative description of what you are trying to accomplish. +- The minimum code necessary to reproduce the issue. +- The expected results of exercising that code. +- The actual results received. + +We may ask for additional details: what version of the library you are using, +and what PHP version was used to reproduce the issue. + +You may also submit a failing test case as a pull request. diff --git a/doc/book/advanced.md b/docs/book/advanced.md similarity index 98% rename from doc/book/advanced.md rename to docs/book/advanced.md index 1b847e93..4f0fd594 100644 --- a/doc/book/advanced.md +++ b/docs/book/advanced.md @@ -381,7 +381,7 @@ use Zend\Form\Fieldset; class AlbumFieldset extends Fieldset { public function __construct(AlbumTable $albumTable) - { + { // Add any elements that need to fetch data from database // using the album table ! } @@ -457,7 +457,7 @@ The method is defined in `Zend\Stdlib\InitializableInterface`, which instantiation! Within zend-form, the `FormElementManager` defines an -[initializer](http://zendframework.github.io/zend-servicemanager/configuring-the-service-manager/#initializers) +[initializer](http://docs.zendframework.com/zend-servicemanager/configuring-the-service-manager/#initializers) that is pushed to the bottom of the initializer stack, making it the last initializer invoked. This initializer checks if the instance created implements `InitializableInterface`, and, if so, calls its `init()` method. diff --git a/doc/book/collections.md b/docs/book/collections.md similarity index 99% rename from doc/book/collections.md rename to docs/book/collections.md index cfe99f5f..95bc1278 100644 --- a/doc/book/collections.md +++ b/docs/book/collections.md @@ -503,7 +503,7 @@ Now, let's create a zend-mvc controller action: $product = new Product(); $form->bind($product); $request = $this->getRequest(); - + if ($request->isPost()) { $form->setData($request->getPost()); diff --git a/doc/book/element/button.md b/docs/book/element/button.md similarity index 100% rename from doc/book/element/button.md rename to docs/book/element/button.md diff --git a/doc/book/element/captcha.md b/docs/book/element/captcha.md similarity index 100% rename from doc/book/element/captcha.md rename to docs/book/element/captcha.md diff --git a/doc/book/element/checkbox.md b/docs/book/element/checkbox.md similarity index 97% rename from doc/book/element/checkbox.md rename to docs/book/element/checkbox.md index 7efcedde..9065a3d1 100644 --- a/doc/book/element/checkbox.md +++ b/docs/book/element/checkbox.md @@ -23,14 +23,14 @@ $checkbox->setUncheckedValue('bad'); $form = new Form('my-form'); $form->add($checkbox); ``` - + Using array notation: ```php use Zend\Form\Element; use Zend\Form\Form; - -$form = new Form('my-form'); + +$form = new Form('my-form'); $form->add([ 'type' => Element\Checkbox::class, 'name' => 'checkbox', @@ -52,8 +52,8 @@ checkbox checked by default, make the `value` equal to the `checked_value` eg: ```php use Zend\Form\Element; use Zend\Form\Form; - -$form = new Form('my-form'); + +$form = new Form('my-form'); $form->add([ 'type' => Element\Checkbox::class, 'name' => 'checkbox', diff --git a/doc/book/element/collection.md b/docs/book/element/collection.md similarity index 99% rename from doc/book/element/collection.md rename to docs/book/element/collection.md index 8dd2335c..7f255124 100644 --- a/doc/book/element/collection.md +++ b/docs/book/element/collection.md @@ -30,8 +30,8 @@ Using array notation: ```php use Zend\Form\Element; use Zend\Form\Form; - -$form = new Form('my-form'); + +$form = new Form('my-form'); $form->add([ 'type' => Element\Collection::class, 'options' => [ diff --git a/doc/book/element/color.md b/docs/book/element/color.md similarity index 100% rename from doc/book/element/color.md rename to docs/book/element/color.md diff --git a/doc/book/element/csrf.md b/docs/book/element/csrf.md similarity index 99% rename from doc/book/element/csrf.md rename to docs/book/element/csrf.md index bd18ab33..b0764277 100644 --- a/doc/book/element/csrf.md +++ b/docs/book/element/csrf.md @@ -41,7 +41,7 @@ $form->add([ ``` > ### Multiple CSRF elements must be uniquely named -> +> > If you are using more than one form on a page, and each contains its own CSRF > element, you will need to make sure that each form uniquely names its element; > if you do not, it's possible for the value of one to override the other within diff --git a/doc/book/element/date-time-local.md b/docs/book/element/date-time-local.md similarity index 99% rename from doc/book/element/date-time-local.md rename to docs/book/element/date-time-local.md index 54251db7..1329d2e4 100644 --- a/doc/book/element/date-time-local.md +++ b/docs/book/element/date-time-local.md @@ -52,7 +52,7 @@ $form->add([ ``` > ### Set all attributes before calling prepare -> +> > The `min`, `max`, and `step` attributes should be set prior to calling > `Zend\Form::prepare()`. Otherwise, the default input specification for the > element may not contain the correct validation rules. diff --git a/doc/book/element/date-time.md b/docs/book/element/date-time.md similarity index 99% rename from doc/book/element/date-time.md rename to docs/book/element/date-time.md index 2d11bf88..d0dad7c5 100644 --- a/doc/book/element/date-time.md +++ b/docs/book/element/date-time.md @@ -52,7 +52,7 @@ $form->add([ ``` > ### Set all attributes before calling prepare -> +> > The `min`, `max`, and `step` attributes should be set prior to calling > `Zend\Form::prepare()`. Otherwise, the default input specification for the > element may not contain the correct validation rules. diff --git a/doc/book/element/date.md b/docs/book/element/date.md similarity index 99% rename from doc/book/element/date.md rename to docs/book/element/date.md index 276ecadf..54aa1974 100644 --- a/doc/book/element/date.md +++ b/docs/book/element/date.md @@ -52,7 +52,7 @@ $form->add([ ``` > ### Set all attributes before calling prepare -> +> > The `min`, `max`, and `step` attributes should be set prior to calling > `Zend\Form::prepare()`. Otherwise, the default input specification for the > element may not contain the correct validation rules. diff --git a/doc/book/element/element.md b/docs/book/element/element.md similarity index 100% rename from doc/book/element/element.md rename to docs/book/element/element.md diff --git a/doc/book/element/email.md b/docs/book/element/email.md similarity index 99% rename from doc/book/element/email.md rename to docs/book/element/email.md index 4f99e6ac..3bb13649 100644 --- a/doc/book/element/email.md +++ b/docs/book/element/email.md @@ -58,9 +58,9 @@ $form->add([ ], ]); ``` - + > ### Set multiple attribute before calling prepare -> +> > Note: the `multiple` attribute should be set prior to calling > `Zend\Form::prepare()`. Otherwise, the default input specification for the > element may not contain the correct validation rules. diff --git a/doc/book/element/file.md b/docs/book/element/file.md similarity index 100% rename from doc/book/element/file.md rename to docs/book/element/file.md diff --git a/doc/book/element/hidden.md b/docs/book/element/hidden.md similarity index 100% rename from doc/book/element/hidden.md rename to docs/book/element/hidden.md diff --git a/doc/book/element/image.md b/docs/book/element/image.md similarity index 100% rename from doc/book/element/image.md rename to docs/book/element/image.md diff --git a/doc/book/element/intro.md b/docs/book/element/intro.md similarity index 100% rename from doc/book/element/intro.md rename to docs/book/element/intro.md diff --git a/doc/book/element/month-select.md b/docs/book/element/month-select.md similarity index 100% rename from doc/book/element/month-select.md rename to docs/book/element/month-select.md diff --git a/doc/book/element/month.md b/docs/book/element/month.md similarity index 99% rename from doc/book/element/month.md rename to docs/book/element/month.md index 664bf7b1..dedaa384 100644 --- a/doc/book/element/month.md +++ b/docs/book/element/month.md @@ -25,7 +25,7 @@ $month->setAttributes([ $form = new Form('my-form'); $form->add($month); ``` - + Using array notation: ```php @@ -48,7 +48,7 @@ $form->add([ ``` > ### Set all attributes before calling prepare -> +> > The `min`, `max`, and `step` attributes should be set prior to calling > `Zend\Form::prepare()`. Otherwise, the default input specification for the > element may not contain the correct validation rules. diff --git a/doc/book/element/multi-checkbox.md b/docs/book/element/multi-checkbox.md similarity index 99% rename from doc/book/element/multi-checkbox.md rename to docs/book/element/multi-checkbox.md index f4c3e24f..c467dde8 100644 --- a/doc/book/element/multi-checkbox.md +++ b/docs/book/element/multi-checkbox.md @@ -96,7 +96,7 @@ $form->add([ ], ]); ``` - + ## Public Methods The following methods are specific to the `MultiCheckbox` element; all other methods diff --git a/doc/book/element/number.md b/docs/book/element/number.md similarity index 99% rename from doc/book/element/number.md rename to docs/book/element/number.md index 9f6db503..e52b9843 100644 --- a/doc/book/element/number.md +++ b/docs/book/element/number.md @@ -48,7 +48,7 @@ $form->add([ ``` > ### Set all attributes before calling prepare -> +> > The `min`, `max`, and `step` attributes should be set prior to calling > `Zend\Form::prepare()`. Otherwise, the default input specification for the > element may not contain the correct validation rules. diff --git a/doc/book/element/password.md b/docs/book/element/password.md similarity index 100% rename from doc/book/element/password.md rename to docs/book/element/password.md diff --git a/doc/book/element/radio.md b/docs/book/element/radio.md similarity index 96% rename from doc/book/element/radio.md rename to docs/book/element/radio.md index 8954c62d..fa70e462 100644 --- a/doc/book/element/radio.md +++ b/docs/book/element/radio.md @@ -49,8 +49,8 @@ $form->add([ ## Advanced Usage See [MultiCheckbox for examples](multi-checkbox.md) of how to apply attributes -and options to each radio button. - +and options to each radio button. + ## Public Methods The `Radio` element extends the `MultiCheckbox` element, and inherits diff --git a/doc/book/element/range.md b/docs/book/element/range.md similarity index 99% rename from doc/book/element/range.md rename to docs/book/element/range.md index 777de38d..5ab648cd 100644 --- a/doc/book/element/range.md +++ b/docs/book/element/range.md @@ -48,7 +48,7 @@ $form->add([ ``` > ### Set all attributes before calling prepare -> +> > The `min`, `max`, and `step` attributes should be set prior to calling > `Zend\Form::prepare()`. Otherwise, the default input specification for the > element may not contain the correct validation rules. diff --git a/doc/book/element/search.md b/docs/book/element/search.md similarity index 99% rename from doc/book/element/search.md rename to docs/book/element/search.md index f35cc619..b6c4088c 100644 --- a/doc/book/element/search.md +++ b/docs/book/element/search.md @@ -20,7 +20,7 @@ $search->setLabel('Search'); $form = new Form('my-form'); $form->add($search); ``` - + Using array notation: ```php diff --git a/doc/book/element/select.md b/docs/book/element/select.md similarity index 100% rename from doc/book/element/select.md rename to docs/book/element/select.md diff --git a/doc/book/element/submit.md b/docs/book/element/submit.md similarity index 100% rename from doc/book/element/submit.md rename to docs/book/element/submit.md diff --git a/doc/book/element/tel.md b/docs/book/element/tel.md similarity index 99% rename from doc/book/element/tel.md rename to docs/book/element/tel.md index 99f022be..fe7ec95a 100644 --- a/doc/book/element/tel.md +++ b/docs/book/element/tel.md @@ -22,7 +22,7 @@ $phone->setLabel('Phone'); $form = new Form('my-form'); $form->add($phone); ``` - + Using array notation: ```php diff --git a/doc/book/element/text.md b/docs/book/element/text.md similarity index 100% rename from doc/book/element/text.md rename to docs/book/element/text.md diff --git a/doc/book/element/textarea.md b/docs/book/element/textarea.md similarity index 100% rename from doc/book/element/textarea.md rename to docs/book/element/textarea.md diff --git a/doc/book/element/time.md b/docs/book/element/time.md similarity index 99% rename from doc/book/element/time.md rename to docs/book/element/time.md index 6425d39a..deea1b22 100644 --- a/doc/book/element/time.md +++ b/docs/book/element/time.md @@ -58,7 +58,7 @@ $form->add([ > element may not contain the correct validation rules. > ### Default date format -> +> > The default date format for the validator is `H:i:s`. However, a valid time > string is not required to have a "seconds" representation. In fact, some user > agent UIs such as Google Chrome and Opera submit time elements using the `H:i` diff --git a/doc/book/element/url.md b/docs/book/element/url.md similarity index 99% rename from doc/book/element/url.md rename to docs/book/element/url.md index 9bf24aba..5059ef9e 100644 --- a/doc/book/element/url.md +++ b/docs/book/element/url.md @@ -20,7 +20,7 @@ $url->setLabel('Webpage URL'); $form = new Form('my-form'); $form->add($url); ``` - + Using array notation: ```php diff --git a/doc/book/element/week.md b/docs/book/element/week.md similarity index 99% rename from doc/book/element/week.md rename to docs/book/element/week.md index fd24a3a5..7c98e8e7 100644 --- a/doc/book/element/week.md +++ b/docs/book/element/week.md @@ -46,7 +46,7 @@ $form->add([ ], ]); ``` - + > ### Set all attributes before calling prepare > > The `min`, `max`, and `step` attributes should be set prior to calling diff --git a/doc/book/file-upload.md b/docs/book/file-upload.md similarity index 99% rename from doc/book/file-upload.md rename to docs/book/file-upload.md index ed52607b..9c7d45d4 100644 --- a/doc/book/file-upload.md +++ b/docs/book/file-upload.md @@ -117,7 +117,7 @@ public function uploadFormAction() { $form = new UploadForm('upload-form'); - $request = $this->getRequest(); + $request = $this->getRequest(); if ($request->isPost()) { // Make certain to merge the $_FILES info! $post = array_merge_recursive( @@ -268,7 +268,7 @@ class UploadForm extends Form The `filerenameupload` options above would cause an uploaded file to be renamed and moved to: `./data/tmpuploads/avatar_4b3403665fea6.png`. -See the [RenameUpload filter](http://zendframework.github.io/zend-filter/file/#renameupload) +See the [RenameUpload filter](http://docs.zendframework.com/zend-filter/file/#renameupload) documentation for more information on its supported options. ### Call the fileprg plugin @@ -673,7 +673,7 @@ Related documentation: - [Form File Element](element/file.md) - [Form File View Helper](helper/form-file.md) - [List of File Validators](https://docs.zendframework.com/zend-validator/validators/file/intro/) -- [List of File Filters](http://zendframework.github.io/zend-filter/file/) +- [List of File Filters](http://docs.zendframework.com/zend-filter/file/) - [File Post-Redirect-Get Controller Plugin](https://docs.zendframework.com/zend-mvc-plugin-fileprg/) - [Zend\InputFilter\FileInput](https://docs.zendframework.com/zend-inputfilter/file-input/) - [Upload Progress Handlers](https://docs.zendframework.com/zend-progressbar/upload/) diff --git a/doc/book/helper/abstract-helper.md b/docs/book/helper/abstract-helper.md similarity index 95% rename from doc/book/helper/abstract-helper.md rename to docs/book/helper/abstract-helper.md index 9cddbe67..55bd9ba3 100644 --- a/doc/book/helper/abstract-helper.md +++ b/docs/book/helper/abstract-helper.md @@ -10,7 +10,7 @@ allows setting a translator and text domain. ## Public methods The following public methods are in addition to the inherited methods of -[Zend\I18n\View\Helper\AbstractTranslatorHelper](http://zendframework.github.io/zend-i18n/view-helpers/#abstract-translator-helper). +[Zend\I18n\View\Helper\AbstractTranslatorHelper](http://docs.zendframework.com/zend-i18n/view-helpers/#abstract-translator-helper). Method signature | Description -------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- @@ -49,7 +49,7 @@ $this->formLabel()->setTranslator($translator, 'my-text-domain'); ### What will be translated? -The specific view helpers are responsible to determine what exactly should be translated +The specific view helpers are responsible to determine what exactly should be translated (e. g. the Label in the FormLabel view helper or the "title" HTML attribute). If you want to have certain HTML attribute values translated you can mark them as "translatable": diff --git a/doc/book/helper/form-button.md b/docs/book/helper/form-button.md similarity index 100% rename from doc/book/helper/form-button.md rename to docs/book/helper/form-button.md diff --git a/doc/book/helper/form-captcha.md b/docs/book/helper/form-captcha.md similarity index 100% rename from doc/book/helper/form-captcha.md rename to docs/book/helper/form-captcha.md diff --git a/doc/book/helper/form-checkbox.md b/docs/book/helper/form-checkbox.md similarity index 100% rename from doc/book/helper/form-checkbox.md rename to docs/book/helper/form-checkbox.md diff --git a/doc/book/helper/form-collection.md b/docs/book/helper/form-collection.md similarity index 100% rename from doc/book/helper/form-collection.md rename to docs/book/helper/form-collection.md diff --git a/doc/book/helper/form-color.md b/docs/book/helper/form-color.md similarity index 100% rename from doc/book/helper/form-color.md rename to docs/book/helper/form-color.md diff --git a/doc/book/helper/form-date-time-local.md b/docs/book/helper/form-date-time-local.md similarity index 100% rename from doc/book/helper/form-date-time-local.md rename to docs/book/helper/form-date-time-local.md diff --git a/doc/book/helper/form-date-time.md b/docs/book/helper/form-date-time.md similarity index 100% rename from doc/book/helper/form-date-time.md rename to docs/book/helper/form-date-time.md diff --git a/doc/book/helper/form-date.md b/docs/book/helper/form-date.md similarity index 100% rename from doc/book/helper/form-date.md rename to docs/book/helper/form-date.md diff --git a/doc/book/helper/form-element-errors.md b/docs/book/helper/form-element-errors.md similarity index 100% rename from doc/book/helper/form-element-errors.md rename to docs/book/helper/form-element-errors.md diff --git a/doc/book/helper/form-element.md b/docs/book/helper/form-element.md similarity index 100% rename from doc/book/helper/form-element.md rename to docs/book/helper/form-element.md diff --git a/doc/book/helper/form-email.md b/docs/book/helper/form-email.md similarity index 100% rename from doc/book/helper/form-email.md rename to docs/book/helper/form-email.md diff --git a/doc/book/helper/form-file-apc-progress.md b/docs/book/helper/form-file-apc-progress.md similarity index 100% rename from doc/book/helper/form-file-apc-progress.md rename to docs/book/helper/form-file-apc-progress.md diff --git a/doc/book/helper/form-file-session-progress.md b/docs/book/helper/form-file-session-progress.md similarity index 100% rename from doc/book/helper/form-file-session-progress.md rename to docs/book/helper/form-file-session-progress.md diff --git a/doc/book/helper/form-file-upload-progress.md b/docs/book/helper/form-file-upload-progress.md similarity index 100% rename from doc/book/helper/form-file-upload-progress.md rename to docs/book/helper/form-file-upload-progress.md diff --git a/doc/book/helper/form-file.md b/docs/book/helper/form-file.md similarity index 100% rename from doc/book/helper/form-file.md rename to docs/book/helper/form-file.md diff --git a/doc/book/helper/form-hidden.md b/docs/book/helper/form-hidden.md similarity index 100% rename from doc/book/helper/form-hidden.md rename to docs/book/helper/form-hidden.md diff --git a/doc/book/helper/form-image.md b/docs/book/helper/form-image.md similarity index 100% rename from doc/book/helper/form-image.md rename to docs/book/helper/form-image.md diff --git a/doc/book/helper/form-input.md b/docs/book/helper/form-input.md similarity index 100% rename from doc/book/helper/form-input.md rename to docs/book/helper/form-input.md diff --git a/doc/book/helper/form-label.md b/docs/book/helper/form-label.md similarity index 100% rename from doc/book/helper/form-label.md rename to docs/book/helper/form-label.md diff --git a/doc/book/helper/form-month-select.md b/docs/book/helper/form-month-select.md similarity index 100% rename from doc/book/helper/form-month-select.md rename to docs/book/helper/form-month-select.md diff --git a/doc/book/helper/form-month.md b/docs/book/helper/form-month.md similarity index 100% rename from doc/book/helper/form-month.md rename to docs/book/helper/form-month.md diff --git a/doc/book/helper/form-multicheckbox.md b/docs/book/helper/form-multicheckbox.md similarity index 100% rename from doc/book/helper/form-multicheckbox.md rename to docs/book/helper/form-multicheckbox.md diff --git a/doc/book/helper/form-number.md b/docs/book/helper/form-number.md similarity index 100% rename from doc/book/helper/form-number.md rename to docs/book/helper/form-number.md diff --git a/doc/book/helper/form-password.md b/docs/book/helper/form-password.md similarity index 100% rename from doc/book/helper/form-password.md rename to docs/book/helper/form-password.md diff --git a/doc/book/helper/form-radio.md b/docs/book/helper/form-radio.md similarity index 100% rename from doc/book/helper/form-radio.md rename to docs/book/helper/form-radio.md diff --git a/doc/book/helper/form-range.md b/docs/book/helper/form-range.md similarity index 100% rename from doc/book/helper/form-range.md rename to docs/book/helper/form-range.md diff --git a/doc/book/helper/form-reset.md b/docs/book/helper/form-reset.md similarity index 100% rename from doc/book/helper/form-reset.md rename to docs/book/helper/form-reset.md diff --git a/doc/book/helper/form-row.md b/docs/book/helper/form-row.md similarity index 100% rename from doc/book/helper/form-row.md rename to docs/book/helper/form-row.md diff --git a/doc/book/helper/form-search.md b/docs/book/helper/form-search.md similarity index 100% rename from doc/book/helper/form-search.md rename to docs/book/helper/form-search.md diff --git a/doc/book/helper/form-select.md b/docs/book/helper/form-select.md similarity index 100% rename from doc/book/helper/form-select.md rename to docs/book/helper/form-select.md diff --git a/doc/book/helper/form-submit.md b/docs/book/helper/form-submit.md similarity index 100% rename from doc/book/helper/form-submit.md rename to docs/book/helper/form-submit.md diff --git a/doc/book/helper/form-tel.md b/docs/book/helper/form-tel.md similarity index 100% rename from doc/book/helper/form-tel.md rename to docs/book/helper/form-tel.md diff --git a/doc/book/helper/form-text.md b/docs/book/helper/form-text.md similarity index 100% rename from doc/book/helper/form-text.md rename to docs/book/helper/form-text.md diff --git a/doc/book/helper/form-textarea.md b/docs/book/helper/form-textarea.md similarity index 100% rename from doc/book/helper/form-textarea.md rename to docs/book/helper/form-textarea.md diff --git a/doc/book/helper/form-time.md b/docs/book/helper/form-time.md similarity index 100% rename from doc/book/helper/form-time.md rename to docs/book/helper/form-time.md diff --git a/doc/book/helper/form-url.md b/docs/book/helper/form-url.md similarity index 100% rename from doc/book/helper/form-url.md rename to docs/book/helper/form-url.md diff --git a/doc/book/helper/form-week.md b/docs/book/helper/form-week.md similarity index 100% rename from doc/book/helper/form-week.md rename to docs/book/helper/form-week.md diff --git a/doc/book/helper/form.md b/docs/book/helper/form.md similarity index 100% rename from doc/book/helper/form.md rename to docs/book/helper/form.md diff --git a/doc/book/helper/intro.md b/docs/book/helper/intro.md similarity index 100% rename from doc/book/helper/intro.md rename to docs/book/helper/intro.md diff --git a/doc/book/helper/upload-progress-helpers.md b/docs/book/helper/upload-progress-helpers.md similarity index 100% rename from doc/book/helper/upload-progress-helpers.md rename to docs/book/helper/upload-progress-helpers.md diff --git a/doc/book/images/collections.dynamic-elements.result.png b/docs/book/images/collections.dynamic-elements.result.png similarity index 100% rename from doc/book/images/collections.dynamic-elements.result.png rename to docs/book/images/collections.dynamic-elements.result.png diff --git a/doc/book/images/collections.dynamic-elements.template.png b/docs/book/images/collections.dynamic-elements.template.png similarity index 100% rename from doc/book/images/collections.dynamic-elements.template.png rename to docs/book/images/collections.dynamic-elements.template.png diff --git a/doc/book/images/collections.validation-groups.png b/docs/book/images/collections.validation-groups.png similarity index 100% rename from doc/book/images/collections.validation-groups.png rename to docs/book/images/collections.validation-groups.png diff --git a/doc/book/images/collections.view.png b/docs/book/images/collections.view.png similarity index 100% rename from doc/book/images/collections.view.png rename to docs/book/images/collections.view.png diff --git a/doc/book/images/collections.view.result.png b/docs/book/images/collections.view.result.png similarity index 100% rename from doc/book/images/collections.view.result.png rename to docs/book/images/collections.view.result.png diff --git a/doc/book/index.html b/docs/book/index.html similarity index 98% rename from doc/book/index.html rename to docs/book/index.html index cb72b726..cc60d069 100644 --- a/doc/book/index.html +++ b/docs/book/index.html @@ -1,7 +1,7 @@

zend-form

- +

Validate and display simple and complex forms, casting forms to business objects and vice versa.

$ composer require zendframework/zend-form
diff --git a/doc/book/index.md b/docs/book/index.md similarity index 100% rename from doc/book/index.md rename to docs/book/index.md diff --git a/doc/book/intro.md b/docs/book/intro.md similarity index 100% rename from doc/book/intro.md rename to docs/book/intro.md diff --git a/doc/book/quick-start.md b/docs/book/quick-start.md similarity index 99% rename from doc/book/quick-start.md rename to docs/book/quick-start.md index 808d5bc7..dbb50a59 100644 --- a/doc/book/quick-start.md +++ b/docs/book/quick-start.md @@ -435,11 +435,11 @@ if ($form->isValid()) { ``` > ### Always populate select elements with options -> +> > Always ensure that options for a select element are populated *prior* to > validation; otherwise, the element will fail validation, and you will receive > a `NotInArray` error message. -> +> > If you are populating the options from a database or other data source, make > sure this is done prior to validation. Alternately, you may disable the > `InArray` validator programmatically prior to validation: @@ -571,7 +571,7 @@ class SenderFieldset extends Fieldset implements InputFilterProviderInterface ], 'validators' => [ [ - 'name' => Validator\StringLength::class, + 'name' => Validator\StringLength::class, 'options' => [ 'min' => 3, 'max' => 256 diff --git a/doc/book/view-helpers.md b/docs/book/view-helpers.md similarity index 100% rename from doc/book/view-helpers.md rename to docs/book/view-helpers.md diff --git a/mkdocs.yml b/mkdocs.yml index 34954d8a..62f8be16 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,5 +1,5 @@ -docs_dir: doc/book -site_dir: doc/html +docs_dir: docs/book +site_dir: docs/html pages: - index.md - Intro: intro.md @@ -86,4 +86,4 @@ pages: site_name: zend-form site_description: zend-form repo_url: 'https://github.com/zendframework/zend-form' -copyright: 'Copyright (c) 2016 Zend Technologies USA Inc.' +copyright: 'Copyright (c) 2005-2017 Zend Technologies USA Inc.'