| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
$baseVersion = '0.9.0'; |
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
require_once 'PEAR/PackageFileManager.php'; |
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
$version = $baseVersion . 'dev' . $argv[1]; |
|---|
| 27 |
$dir = dirname( __FILE__ ); |
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
$state = 'devel'; |
|---|
| 33 |
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 |
$notes = <<<EOT |
|---|
| 38 |
Changes since v0.9.0a2: |
|---|
| 39 |
* patForms main: |
|---|
| 40 |
- Added "namespace" support to patForms and patForms_Elements (closing ticket #129) (Sven Fuchs) |
|---|
| 41 |
- Added a class patForms_Definition: base class for xml based form definitions (Sven Fuchs) |
|---|
| 42 |
- Removed patForms_FormatChecker and replaced it with rules (closing ticket #156) (schst) |
|---|
| 43 |
- Added an event onValidate to patForms and registered storages to listen to this event. This allows patForms_Storage containers to do their own validation, e.g. for unique keys. (This closes bug #130) (Sven Fuchs) |
|---|
| 44 |
- Cleaned up event-management and added new onRender() event (schst) |
|---|
| 45 |
- Avoid multiple autoValidate checks in the same request (schst) |
|---|
| 46 |
- Changed datasources to receive the element (closing ticket #151) (schst) |
|---|
| 47 |
- Added datasource for country-selection (schst, argh) |
|---|
| 48 |
- Added createDatasource() method to patForms (schst) |
|---|
| 49 |
- patErrors triggered by event listeners will now bubble up to the user (schst) |
|---|
| 50 |
- Check, whether custom locale file exists prior to loading it (schst) |
|---|
| 51 |
- Fixed several PHP 4.4.0 notices (schst) |
|---|
| 52 |
- Added the getRenderer() method (argh) |
|---|
| 53 |
|
|---|
| 54 |
* Elements |
|---|
| 55 |
- Fixed bug #87: Passwords will not be sent back to the browser if the "resendpasswd" attribute is not set to "yes" (schst) |
|---|
| 56 |
- Fixed bug #148: Enum/RadioGroup/Set/Combobox Elements now accept retrieving values from a datasource additionally to the already defined value set (argh) |
|---|
| 57 |
- Fixed bug #147: Enum/RadioGroup/Set/Combobox Elements now support setting a 'disabled' attribute for values (argh) |
|---|
| 58 |
- Fixed bug #150: Date day element displays 32 days |
|---|
| 59 |
- Fixed bug #172: modified behavior of the setValue for the set element so that you may pass either a string for a single selected value, or an array with a list of selected entries (argh) |
|---|
| 60 |
- Fixed bug #149: Non-required date elements are validated against min and max dates (argh) |
|---|
| 61 |
- Fixed bug #179: Add errormanagment to patForms_Element::serialize*() (argh) |
|---|
| 62 |
- Fixed bug #174: New method removeRule() is used to remove the previously added rule when usign the format attribute (schst) |
|---|
| 63 |
- Fixed bug #171: Element_Date accepts invalid dates (argh) |
|---|
| 64 |
- Fixed bug #182: Switch element does not check for the correct value (argh) |
|---|
| 65 |
|
|---|
| 66 |
* Rules |
|---|
| 67 |
- Added several patForms_Rules to match Propel Validator classes and enable client side validation for these. New rules are: MaxLength, MinLength, MaxValue, MinValue, Match, NotMatch, ValidValues (Sven Fuchs) |
|---|
| 68 |
- Added new rule: AnyRequired (schst) |
|---|
| 69 |
- Fixed bug #173: translated missing french strings in patForms_Rule_URL as well as other rules (argh) |
|---|
| 70 |
- Added new rule that prohibits updating entries in a storage (Frank Kleine) |
|---|
| 71 |
- Added new rule that prohibits adding entries in a storage (schst) |
|---|
| 72 |
- Fixed bug #187: Storage* rules need french translations (argh) |
|---|
| 73 |
|
|---|
| 74 |
* Storages |
|---|
| 75 |
- Allowed the use of the DB storage container to only add entries (schst) |
|---|
| 76 |
- Added new feature to the DB storage container to provide additional values for new entries (schst) |
|---|
| 77 |
- Fixed the DB storage container to work with SQLite (schst) |
|---|
| 78 |
- Fixed bug in storage containers that did not provide the onValidate() method (schst) |
|---|
| 79 |
- Added new "Mail" storage (schst) |
|---|
| 80 |
- Fixed bug #140 (missing check for database error) (schst) |
|---|
| 81 |
- Fixed bug #177 (minor bugs in CSV storage) (schst) |
|---|
| 82 |
|
|---|
| 83 |
* Clientside features |
|---|
| 84 |
- Changed scripts collection mechanism in patForms, patForms_Element and patForms_Rule for clientside validation. (This closes bug #133) (Sven Fuchs) |
|---|
| 85 |
|
|---|
| 86 |
* Propel Integration |
|---|
| 87 |
- Added a class patForms_Definition_Propel: definition that either populates itself from a Propel ObjectPeer class and writes itself to an xml file OR reads an existing xml file and populates itself from it, when this file exists (Sven Fuchs) |
|---|
| 88 |
- Added a class patForms_Creator_Definition: creates a patForm instance and populates properties, elements and rules from a patForms_Definition instance (Sven Fuchs) |
|---|
| 89 |
- Added a class patForms_Datasource_Propel: used to populate data to form elements for foreign key/related tables from a Propel ObjectPeer. (Sven Fuchs) |
|---|
| 90 |
- Added a class patForms_Storage_Propel: implements the patForms_Storage interface to integrate with a Propel object peer. (Sven Fuchs) |
|---|
| 91 |
|
|---|
| 92 |
* Renderer |
|---|
| 93 |
- Changed patForms_Renderer_Array to not include patForms_Datasource objects in the results array (This closes bug #131) (Sven Fuchs) |
|---|
| 94 |
- Added new patTemplate Renderer (schst) |
|---|
| 95 |
|
|---|
| 96 |
* Parser |
|---|
| 97 |
- Edited patForms_Parser "sourcefile could not be read"-message to include some additional useful debugging information (argh) |
|---|
| 98 |
- Added filename to patForms_Parser error message (schst) |
|---|
| 99 |
- patForms_Parser_HTML now extracts attributes of the <form/> tag (schst) |
|---|
| 100 |
- Allow more than one element with the same name (schst) |
|---|
| 101 |
- Fixed bug with spaces in attribute values (schst) |
|---|
| 102 |
- Added value-namespace support via the namespace attribute of the <patForms:Form/> tag (schst) |
|---|
| 103 |
- Added event support via attributes of the <patForms:Form/> tag (schst) |
|---|
| 104 |
EOT; |
|---|
| 105 |
|
|---|
| 106 |
|
|---|
| 107 |
|
|---|
| 108 |
|
|---|
| 109 |
$description = <<<EOT |
|---|
| 110 |
patForms is a powerful package that helps you creating an validating forms. It is not limited to HTML forms. |
|---|
| 111 |
EOT; |
|---|
| 112 |
|
|---|
| 113 |
$package = new PEAR_PackageFileManager(); |
|---|
| 114 |
|
|---|
| 115 |
$result = $package->setOptions(array( |
|---|
| 116 |
'package' => 'patForms', |
|---|
| 117 |
'summary' => 'Powerful form management package.', |
|---|
| 118 |
'description' => $description, |
|---|
| 119 |
'version' => $version, |
|---|
| 120 |
'state' => $state, |
|---|
| 121 |
'license' => 'LGPL', |
|---|
| 122 |
'filelistgenerator' => 'file', |
|---|
| 123 |
'ignore' => array( 'package.php', 'autopackage.php', 'package.xml', '.cvsignore', '.svn', 'cache', 'rfcs' ), |
|---|
| 124 |
'notes' => $notes, |
|---|
| 125 |
'simpleoutput' => true, |
|---|
| 126 |
'baseinstalldir' => 'pat', |
|---|
| 127 |
'packagedirectory' => $dir, |
|---|
| 128 |
'dir_roles' => array( |
|---|
| 129 |
'docs' => 'doc', |
|---|
| 130 |
'examples' => 'doc', |
|---|
| 131 |
'tests' => 'test', |
|---|
| 132 |
) |
|---|
| 133 |
)); |
|---|
| 134 |
|
|---|
| 135 |
if (PEAR::isError($result)) { |
|---|
| 136 |
echo $result->getMessage(); |
|---|
| 137 |
die(); |
|---|
| 138 |
} |
|---|
| 139 |
|
|---|
| 140 |
$package->detectDependencies(); |
|---|
| 141 |
|
|---|
| 142 |
$package->addMaintainer('argh', 'lead', 'Sebastian Mordziol', 'argh@php-tools.net'); |
|---|
| 143 |
$package->addMaintainer('schst', 'lead', 'Stephan Schmidt', 'schst@php-tools.net'); |
|---|
| 144 |
$package->addMaintainer('sfuchs', 'lead', 'Sven Fuchs', 'svenfuchs@artweb-design.de'); |
|---|
| 145 |
$package->addMaintainer('gerd', 'developer', 'Gerd Schaufelberger', 'gerd@php-tools.net'); |
|---|
| 146 |
$package->addMaintainer('luckec', 'helper', 'Carsten Lucke', 'carsten@tool-garage.de'); |
|---|
| 147 |
|
|---|
| 148 |
$package->addDependency('patError', '', 'has', 'pkg', false); |
|---|
| 149 |
$package->addDependency('php', '4.3.0', 'ge', 'php', false); |
|---|
| 150 |
|
|---|
| 151 |
|
|---|
| 152 |
$package->addDependency('DB', '', 'has', 'pkg', true); |
|---|
| 153 |
|
|---|
| 154 |
|
|---|
| 155 |
$package->addDependency('Mail', '', 'has', 'pkg', true); |
|---|
| 156 |
|
|---|
| 157 |
|
|---|
| 158 |
$package->addDependency('Net_DNS', '', 'has', 'pkg', true); |
|---|
| 159 |
$package->addDependency('Net_SMTP', '', 'has', 'pkg', true); |
|---|
| 160 |
|
|---|
| 161 |
|
|---|
| 162 |
|
|---|
| 163 |
|
|---|
| 164 |
$result = $package->writePackageFile(); |
|---|
| 165 |
|
|---|
| 166 |
if (PEAR::isError($result)) { |
|---|
| 167 |
echo $result->getMessage(); |
|---|
| 168 |
die(); |
|---|
| 169 |
} |
|---|
| 170 |
?> |
|---|