Skip to content

Commit

Permalink
Prepare release 2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sad-spirit committed Apr 2, 2022
1 parent d3cc641 commit 31bd077
Show file tree
Hide file tree
Showing 9 changed files with 153 additions and 123 deletions.
12 changes: 11 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changes in HTML_QuickForm2

## 2.3.0 - 2022-04-02
* Upgraded tests, [PHPUnit Polyfills package] is used to run them on PHP 5.6 to PHP 8.1
* Test suite now runs on Github Actions rather than on Travis
* The package runs under PHP 8.1 without `E_DEPRECATED` messages (see [issue #6])
* Use [psalm] for static analysis
* Minimum required PHP version is now 5.6

## 2.2.2 - 2021-06-25
* Incorrect option name used in `HTML_QuickForm2_Element_Script::__toString()`.
Thanks to Julian Striegl (striegljulian at gmail dot com) for reporting
Expand Down Expand Up @@ -82,4 +89,7 @@ Other features and changes
[request #19955]: https://pear.php.net/bugs/bug.php?id=19955
[request #20103]: https://pear.php.net/bugs/bug.php?id=20103
[bug #20295]: https://pear.php.net/bugs/bug.php?id=20295
[on PEAR website]: https://pear.php.net/package/HTML_QuickForm2/download/All
[on PEAR website]: https://pear.php.net/package/HTML_QuickForm2/download/All
[PHPUnit Polyfills package]: https://github.com/Yoast/PHPUnit-Polyfills
[issue #6]: https://github.com/pear/HTML_QuickForm2/issues/6
[psalm]: https://psalm.dev/
2 changes: 1 addition & 1 deletion data/js/min/quickform-hierselect.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion data/js/min/quickform-repeat.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion data/js/min/quickform.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion data/js/quickform-hierselect.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* HTML_QuickForm2: support functions for hierselect elements
* Package version 2.2.2
* Package version 2.3.0
* https://pear.php.net/package/HTML_QuickForm2
*
* Copyright 2006-2022, Alexey Borzov, Bertrand Mansion
Expand Down
2 changes: 1 addition & 1 deletion data/js/quickform-repeat.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* HTML_QuickForm2: support functions for repeat elements
* Package version 2.2.2
* Package version 2.3.0
* https://pear.php.net/package/HTML_QuickForm2
*
* Copyright 2006-2022, Alexey Borzov, Bertrand Mansion
Expand Down
2 changes: 1 addition & 1 deletion data/js/quickform.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* HTML_QuickForm2 client-side validation library
* Package version 2.2.2
* Package version 2.3.0
* https://pear.php.net/package/HTML_QuickForm2
*
* Copyright 2006-2022, Alexey Borzov, Bertrand Mansion
Expand Down
224 changes: 112 additions & 112 deletions js/build.xml
Original file line number Diff line number Diff line change
@@ -1,113 +1,113 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<project name="QuickForm2 Javascript" basedir="." default="build-all">

<property file="build.properties" />

<property name="js.src.basefirst" value="base.js" />
<property name="js.src.basesecond" value="map.js, form.js, classes.js, events.js, validator.js, rules.js" />

<property name="js.concat.base" value="build/quickform.js" />
<property name="js.concat.hs" value="build/quickform-hierselect.js" />
<property name="js.concat.repeat" value="build/quickform-repeat.js" />
<property name="js.filelist.base" value="build/filelist.txt" />
<property name="js.minified.base" value="build/quickform.min.js" />
<property name="js.minified.hs" value="build/quickform-hierselect.min.js" />
<property name="js.minified.repeat" value="build/quickform-repeat.min.js" />

<property name="release.concat" value="../data/js/" />
<property name="release.minified" value="../data/js/min/" />

<property name="closure_command" value="java -jar ${path.closure} --compilation_level SIMPLE_OPTIMIZATIONS --rewrite_polyfills=false" />

<property name="package_version" value="2.2.2" />

<target name="init">
<mkdir dir="build"/>
<mkdir dir="docs"/>
</target>

<target name="concat" depends="init" description="Build concatenated javascript files">
<copy file="src/${js.src.basefirst}" tofile="${js.concat.base}">
<filterchain>
<replaceregexp>
<regexp pattern="@preserve\s+" replace="" />
</replaceregexp>
</filterchain>
</copy>
<append destFile="${js.concat.base}">
<filelist dir="src/" files="${js.src.basesecond}" />
</append>
<copy file="src/hierselect.js" tofile="${js.concat.hs}">
<filterchain>
<replaceregexp>
<regexp pattern="@preserve\s+" replace="" />
</replaceregexp>
</filterchain>
</copy>
<copy file="src/repeat.js" tofile="${js.concat.repeat}">
<filterchain>
<replaceregexp>
<regexp pattern="@preserve\s+" replace="" />
</replaceregexp>
</filterchain>
</copy>
</target>

<target name="appendjsfile">
<echo append="true" file="${js.filelist.base}" message=" --js src/${srcname}" />
</target>
<target name="minify" depends="init" description="Build minified javascript files using closure compiler">
<available file="${path.closure}" property="has_closure" />
<fail unless="has_closure" message="Closure compiler is not available" />
<echo append="false" file="${js.filelist.base}" message=" --js src/${js.src.basefirst}" />
<foreach list="${js.src.basesecond}" param="srcname" target="appendjsfile" />
<exec logoutput="true" command="${closure_command} --js_output_file ${js.minified.base} --flagfile ${js.filelist.base}" />
<exec logoutput="true" command="${closure_command} --js_output_file ${js.minified.hs} --js src/hierselect.js" />
<exec logoutput="true" command="${closure_command} --js_output_file ${js.minified.repeat} --js src/repeat.js" />
</target>

<target name="docs" depends="init" description="Build API documentation using JSDoc toolkit">
<available file="${path.jsdoc}jsrun.jar" property="has_jsdoc" />
<fail unless="has_jsdoc" message="JSDoc toolkit is not available" />
<exec logoutput="true" command="java -Djsdoc.dir=${path.jsdoc} -Djsdoc.template.dir=${path.jsdoc.template} -jar ${path.jsdoc}jsrun.jar ${path.jsdoc.app} -a -d=./docs -r=4 ./src" />
</target>

<target name="clean-js" description="Removes generated javascript files">
<delete dir="build" />
</target>
<target name="clean-docs" description="Removes generated API docs">
<delete dir="docs" />
</target>
<target name="clean" depends="clean-js, clean-docs" description="Removes all generated files" />

<target name="build-all" depends="clean, concat, minify, docs" description="Builds everything" />

<target name="release" depends="clean, concat, minify" description="Builds JS files and copies them to data">
<copy todir="${release.concat}">
<mapper type="flatten" />
<fileset dir=".">
<include name="${js.concat.base}" />
<include name="${js.concat.hs}" />
<include name="${js.concat.repeat}" />
</fileset>
<filterchain>
<replaceregexp>
<regexp pattern="@package_version@" replace="${package_version}" />
</replaceregexp>
</filterchain>
</copy>
<copy todir="${release.minified}">
<mapper type="regexp" from="build.(.+)\.min\.js" to="\1.js" />
<fileset dir=".">
<include name="${js.minified.base}" />
<include name="${js.minified.hs}" />
<include name="${js.minified.repeat}" />
</fileset>
<filterchain>
<replaceregexp>
<regexp pattern="@package_version@" replace="${package_version}" />
</replaceregexp>
</filterchain>
</copy>
</target>
<?xml version="1.0" encoding="iso-8859-1"?>
<project name="QuickForm2 Javascript" basedir="." default="build-all">

<property file="build.properties" />

<property name="js.src.basefirst" value="base.js" />
<property name="js.src.basesecond" value="map.js, form.js, classes.js, events.js, validator.js, rules.js" />

<property name="js.concat.base" value="build/quickform.js" />
<property name="js.concat.hs" value="build/quickform-hierselect.js" />
<property name="js.concat.repeat" value="build/quickform-repeat.js" />
<property name="js.filelist.base" value="build/filelist.txt" />
<property name="js.minified.base" value="build/quickform.min.js" />
<property name="js.minified.hs" value="build/quickform-hierselect.min.js" />
<property name="js.minified.repeat" value="build/quickform-repeat.min.js" />

<property name="release.concat" value="../data/js/" />
<property name="release.minified" value="../data/js/min/" />

<property name="closure_command" value="java -jar ${path.closure} --compilation_level SIMPLE_OPTIMIZATIONS --rewrite_polyfills=false" />

<property name="package_version" value="2.3.0" />

<target name="init">
<mkdir dir="build"/>
<mkdir dir="docs"/>
</target>

<target name="concat" depends="init" description="Build concatenated javascript files">
<copy file="src/${js.src.basefirst}" tofile="${js.concat.base}">
<filterchain>
<replaceregexp>
<regexp pattern="@preserve\s+" replace="" />
</replaceregexp>
</filterchain>
</copy>
<append destFile="${js.concat.base}">
<filelist dir="src/" files="${js.src.basesecond}" />
</append>
<copy file="src/hierselect.js" tofile="${js.concat.hs}">
<filterchain>
<replaceregexp>
<regexp pattern="@preserve\s+" replace="" />
</replaceregexp>
</filterchain>
</copy>
<copy file="src/repeat.js" tofile="${js.concat.repeat}">
<filterchain>
<replaceregexp>
<regexp pattern="@preserve\s+" replace="" />
</replaceregexp>
</filterchain>
</copy>
</target>

<target name="appendjsfile">
<echo append="true" file="${js.filelist.base}" message=" --js src/${srcname}" />
</target>
<target name="minify" depends="init" description="Build minified javascript files using closure compiler">
<available file="${path.closure}" property="has_closure" />
<fail unless="has_closure" message="Closure compiler is not available" />
<echo append="false" file="${js.filelist.base}" message=" --js src/${js.src.basefirst}" />
<foreach list="${js.src.basesecond}" param="srcname" target="appendjsfile" />
<exec logoutput="true" command="${closure_command} --js_output_file ${js.minified.base} --flagfile ${js.filelist.base}" />
<exec logoutput="true" command="${closure_command} --js_output_file ${js.minified.hs} --js src/hierselect.js" />
<exec logoutput="true" command="${closure_command} --js_output_file ${js.minified.repeat} --js src/repeat.js" />
</target>

<target name="docs" depends="init" description="Build API documentation using JSDoc toolkit">
<available file="${path.jsdoc}jsrun.jar" property="has_jsdoc" />
<fail unless="has_jsdoc" message="JSDoc toolkit is not available" />
<exec logoutput="true" command="java -Djsdoc.dir=${path.jsdoc} -Djsdoc.template.dir=${path.jsdoc.template} -jar ${path.jsdoc}jsrun.jar ${path.jsdoc.app} -a -d=./docs -r=4 ./src" />
</target>

<target name="clean-js" description="Removes generated javascript files">
<delete dir="build" />
</target>
<target name="clean-docs" description="Removes generated API docs">
<delete dir="docs" />
</target>
<target name="clean" depends="clean-js, clean-docs" description="Removes all generated files" />

<target name="build-all" depends="clean, concat, minify, docs" description="Builds everything" />

<target name="release" depends="clean, concat, minify" description="Builds JS files and copies them to data">
<copy todir="${release.concat}">
<mapper type="flatten" />
<fileset dir=".">
<include name="${js.concat.base}" />
<include name="${js.concat.hs}" />
<include name="${js.concat.repeat}" />
</fileset>
<filterchain>
<replaceregexp>
<regexp pattern="@package_version@" replace="${package_version}" />
</replaceregexp>
</filterchain>
</copy>
<copy todir="${release.minified}">
<mapper type="regexp" from="build.(.+)\.min\.js" to="\1.js" />
<fileset dir=".">
<include name="${js.minified.base}" />
<include name="${js.minified.hs}" />
<include name="${js.minified.repeat}" />
</fileset>
<filterchain>
<replaceregexp>
<regexp pattern="@package_version@" replace="${package_version}" />
</replaceregexp>
</filterchain>
</copy>
</target>
</project>
28 changes: 24 additions & 4 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
<email>[email protected]</email>
<active>yes</active>
</lead>
<date>2021-06-25</date>
<date>2022-04-02</date>
<version>
<release>2.2.2</release>
<release>2.3.0</release>
<api>2.0.1</api>
</version>
<stability>
Expand All @@ -53,8 +53,12 @@
</stability>
<license uri="https://opensource.org/licenses/BSD-3-Clause">BSD 3-Clause License</license>
<notes>
* Incorrect option name used in HTML_QuickForm2_Element_Script::__toString()
Thanks to Julian Striegl (striegljulian at gmail dot com) for reporting
* Upgraded tests, PHPUnit Polyfills package is used to run them on PHP 5.6 to PHP 8.1
* Test suite now runs on Github Actions rather than on Travis
* The package runs under PHP 8.1 without E_DEPRECATED messages
https://github.com/pear/HTML_QuickForm2/issues/6
* Use psalm for static analysis
* Minimum required PHP version is now 5.6
</notes>
<contents>
<dir name="/">
Expand Down Expand Up @@ -743,6 +747,22 @@
</filelist>
</phprelease>
<changelog>
<release>
<date>2021-06-25</date>
<version>
<release>2.2.2</release>
<api>2.0.1</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="https://opensource.org/licenses/BSD-3-Clause">BSD 3-Clause License</license>
<notes>
* Incorrect option name used in HTML_QuickForm2_Element_Script::__toString()
Thanks to Julian Striegl (striegljulian at gmail dot com) for reporting
</notes>
</release>
<release>
<date>2021-05-09</date>
<version>
Expand Down

0 comments on commit 31bd077

Please sign in to comment.