Permalink
Browse files

Merge branch 'prep-release-3.0.12'

* prep-release-3.0.12: (443 commits)
  [prep-release-3.0.12] Update changelog for 3.0.12 release.
  [ticket/11873] Add unit test for large password input.
  [ticket/11873] Do not hash very large passwords in order to safe resources.
  [prep-release-3.0.12] Bumping version number for 3.0.12 final.
  [prep-release-3.0.12] Remove changelog entry for ticket that was not resolved.
  [prep-release-3.0.12] Update Changelog for 3.0.12-RC3 release.
  [prep-release-3.0.12] Bumping version number for 3.0.12-RC3.
  [ticket/11769] Allow using 0 as poster name
  [ticket/11769] Allow '0' as username
  [ticket/11769] Allow '0' as username in notification mails
  [ticket/11769] Fix language issues in the doc blocks
  [ticket/11769] Correctly supply the post author's username in posting.php
  [ticket/11802] replace $browser with $user->browser
  [ticket/11775] Fix doc blocks syntax
  [ticket/11775] Remove spaces at line ends
  [ticket/11775] Split test into multiple steps
  [ticket/11775] Add functional test for moving the last post
  [ticket/11775] Backport moving of the posting functions to 3.0
  [ticket/11775] Fix error when moving the last post to another topic
  [prep-release-3.0.12] Update Changelog for 3.0.12-RC2 release.
  ...
  • Loading branch information...
2 parents 7eb16cb + 446ea99 commit 21e55ea6d23c94cbbcd672dcf31c939dd7ef08e9 @bantu bantu committed Sep 28, 2013
Showing with 7,076 additions and 930 deletions.
  1. +1 −1 .gitignore
  2. +10 −6 .travis.yml
  3. +1 −1 README.md
  4. +64 −11 build/build.xml
  5. BIN composer.phar
  6. +5 −52 git-tools/hooks/pre-commit
  7. +21 −6 git-tools/merge.php
  8. +66 −26 git-tools/setup_github_network.php
  9. +8 −1 phpBB/adm/index.php
  10. +2 −1 phpBB/adm/style/acp_users_overview.html
  11. +1 −1 phpBB/adm/style/install_footer.html
  12. +6 −1 phpBB/common.php
  13. +8 −0 phpBB/composer.json
  14. +966 −0 phpBB/composer.lock
  15. +1 −1 phpBB/develop/create_schema_files.php
  16. +1 −1 phpBB/develop/generate_utf_casefold.php
  17. +1 −1 phpBB/develop/generate_utf_confusables.php
  18. +1 −1 phpBB/develop/generate_utf_tables.php
  19. +21 −3 phpBB/develop/mysql_upgrader.php
  20. +1 −1 phpBB/develop/utf_normalizer_test.php
  21. +12 −9 phpBB/docs/AUTHORS
  22. +177 −21 phpBB/docs/CHANGELOG.html
  23. +6 −6 phpBB/docs/FAQ.html
  24. +89 −70 phpBB/docs/INSTALL.html
  25. +29 −29 phpBB/docs/README.html
  26. +2 −2 phpBB/docs/auth_api.html
  27. +5 −3 phpBB/docs/coding-guidelines.html
  28. +1 −1 phpBB/docs/hook_system.html
  29. +31 −10 phpBB/download/file.php
  30. +1 −1 phpBB/includes/acm/acm_apc.php
  31. +2 −2 phpBB/includes/acm/acm_eaccelerator.php
  32. +2 −2 phpBB/includes/acm/acm_memcache.php
  33. +2 −2 phpBB/includes/acm/acm_redis.php
  34. +1 −1 phpBB/includes/acm/acm_wincache.php
  35. +1 −1 phpBB/includes/acm/acm_xcache.php
  36. +11 −3 phpBB/includes/acp/acp_bbcodes.php
  37. +2 −2 phpBB/includes/acp/acp_board.php
  38. +2 −0 phpBB/includes/acp/acp_captcha.php
  39. +76 −38 phpBB/includes/acp/acp_groups.php
  40. +2 −2 phpBB/includes/acp/acp_main.php
  41. +1 −1 phpBB/includes/acp/acp_send_statistics.php
  42. +1 −1 phpBB/includes/acp/acp_update.php
  43. +1 −1 phpBB/includes/captcha/captcha_non_gd.php
  44. +2 −1 phpBB/includes/constants.php
  45. +16 −0 phpBB/includes/db/db_tools.php
  46. +1 −1 phpBB/includes/db/dbal.php
  47. +42 −24 phpBB/includes/db/mssql.php
  48. +35 −5 phpBB/includes/db/mssql_odbc.php
  49. +34 −21 phpBB/includes/db/mssqlnative.php
  50. +37 −8 phpBB/includes/db/mysql.php
  51. +25 −7 phpBB/includes/db/mysqli.php
  52. +45 −8 phpBB/includes/db/oracle.php
  53. +36 −5 phpBB/includes/db/sqlite.php
  54. +74 −10 phpBB/includes/functions.php
  55. +3 −3 phpBB/includes/functions_admin.php
  56. +206 −0 phpBB/includes/functions_database_helper.php
  57. +10 −1 phpBB/includes/functions_install.php
  58. +1 −1 phpBB/includes/functions_jabber.php
  59. +33 −4 phpBB/includes/functions_messenger.php
  60. +24 −16 phpBB/includes/functions_posting.php
  61. +27 −2 phpBB/includes/functions_user.php
  62. +9 −6 phpBB/includes/mcp/mcp_forum.php
  63. +22 −0 phpBB/includes/mcp/mcp_main.php
  64. +1 −0 phpBB/includes/mcp/mcp_pm_reports.php
  65. +51 −5 phpBB/includes/mcp/mcp_topic.php
  66. +1 −1 phpBB/includes/questionnaire/questionnaire.php
  67. +10 −3 phpBB/includes/search/fulltext_mysql.php
  68. +4 −3 phpBB/includes/session.php
  69. +1 −1 phpBB/includes/ucp/info/ucp_profile.php
  70. +1 −1 phpBB/includes/ucp/ucp_activate.php
  71. +8 −0 phpBB/includes/ucp/ucp_groups.php
  72. +7 −9 phpBB/includes/ucp/ucp_pm_compose.php
  73. +32 −0 phpBB/includes/ucp/ucp_prefs.php
  74. +2 −2 phpBB/install/convertors/convert_phpbb20.php
  75. +170 −24 phpBB/install/database_update.php
  76. +1 −1 phpBB/install/index.php
  77. +1 −1 phpBB/install/install_convert.php
  78. +8 −13 phpBB/install/install_install.php
  79. +3 −1 phpBB/install/install_update.php
  80. +1 −1 phpBB/install/schemas/schema_data.sql
  81. +1 −1 phpBB/language/en/acp/board.php
  82. +2 −2 phpBB/language/en/acp/common.php
  83. +1 −1 phpBB/language/en/acp/permissions.php
  84. +2 −1 phpBB/language/en/acp/posting.php
  85. +1 −1 phpBB/language/en/acp/search.php
  86. +8 −3 phpBB/language/en/common.php
  87. +1 −1 phpBB/language/en/email/forum_notify.txt
  88. +1 −1 phpBB/language/en/email/installed.txt
  89. +1 −1 phpBB/language/en/email/newtopic_notify.txt
  90. +1 −1 phpBB/language/en/email/topic_notify.txt
  91. +2 −2 phpBB/language/en/help_faq.php
  92. +8 −8 phpBB/language/en/install.php
  93. +3 −3 phpBB/language/en/posting.php
  94. +1 −0 phpBB/language/en/search.php
  95. +3 −3 phpBB/language/en/ucp.php
  96. +12 −4 phpBB/posting.php
  97. +98 −57 phpBB/report.php
  98. +2 −1 phpBB/search.php
  99. +1 −1 phpBB/styles/prosilver/imageset/imageset.cfg
  100. +1 −1 phpBB/styles/prosilver/style.cfg
  101. +25 −20 phpBB/styles/prosilver/template/login_forum.html
  102. +1 −1 phpBB/styles/prosilver/template/mcp_front.html
  103. +4 −0 phpBB/styles/prosilver/template/memberlist_search.html
  104. +4 −4 phpBB/styles/prosilver/template/posting_editor.html
  105. +4 −0 phpBB/styles/prosilver/template/report_body.html
  106. +1 −0 phpBB/styles/prosilver/template/search_results.html
  107. +1 −1 phpBB/styles/prosilver/template/template.cfg
  108. +9 −10 phpBB/styles/prosilver/template/ucp_groups_manage.html
  109. +1 −1 phpBB/styles/prosilver/template/ucp_pm_history.html
  110. +3 −4 phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html
  111. +7 −5 phpBB/styles/prosilver/template/ucp_prefs_personal.html
  112. +1 −1 phpBB/styles/prosilver/template/viewtopic_print.html
  113. +1 −1 phpBB/styles/prosilver/theme/stylesheet.css
  114. +1 −1 phpBB/styles/prosilver/theme/theme.cfg
  115. +1 −1 phpBB/styles/subsilver2/imageset/imageset.cfg
  116. +1 −1 phpBB/styles/subsilver2/style.cfg
  117. +1 −1 phpBB/styles/subsilver2/template/captcha_qa.html
  118. +8 −0 phpBB/styles/subsilver2/template/login_forum.html
  119. +8 −0 phpBB/styles/subsilver2/template/report_body.html
  120. +1 −1 phpBB/styles/subsilver2/template/simple_footer.html
  121. +1 −1 phpBB/styles/subsilver2/template/template.cfg
  122. +1 −1 phpBB/styles/subsilver2/template/ucp_pm_history.html
  123. +1 −1 phpBB/styles/subsilver2/template/ucp_pm_viewmessage_print.html
  124. +3 −1 phpBB/styles/subsilver2/template/ucp_prefs_personal.html
  125. +1 −1 phpBB/styles/subsilver2/template/viewforum_body.html
  126. +1 −1 phpBB/styles/subsilver2/template/viewtopic_print.html
  127. +1 −1 phpBB/styles/subsilver2/theme/stylesheet.css
  128. +1 −1 phpBB/styles/subsilver2/theme/theme.cfg
  129. +0 −6 phpBB/ucp.php
  130. +8 −1 phpBB/viewtopic.php
  131. +4 −0 phpunit.xml.all
  132. +4 −0 phpunit.xml.dist
  133. +4 −0 phpunit.xml.functional
  134. +151 −0 tests/RUNNING_TESTS.md
  135. +0 −76 tests/RUNNING_TESTS.txt
  136. +1 −1 tests/bbcode/url_bbcode_test.php
  137. +15 −0 tests/bootstrap.php
  138. 0 tests/compress/archive/.gitkeep
  139. +173 −0 tests/compress/compress_test.php
  140. 0 tests/compress/extract/.gitkeep
  141. +1 −0 tests/compress/fixtures/1.txt
  142. BIN tests/compress/fixtures/archive.tar
  143. BIN tests/compress/fixtures/archive.tar.bz2
  144. BIN tests/compress/fixtures/archive.tar.gz
  145. BIN tests/compress/fixtures/archive.zip
  146. +1 −0 tests/compress/fixtures/dir/2.txt
  147. +1 −0 tests/compress/fixtures/dir/3.txt
  148. +1 −0 tests/compress/fixtures/dir/subdir/4.txt
  149. +43 −0 tests/dbal/connect_test.php
  150. +7 −2 tests/dbal/order_lower_test.php
  151. +8 −8 tests/dbal/select_test.php
  152. +55 −0 tests/dbal/write_sequence_test.php
  153. +2 −2 tests/dbal/write_test.php
  154. +9 −0 tests/fixtures/empty.xml
  155. +21 −0 tests/functional/acp_groups_test.php
  156. +11 −3 tests/functional/auth_test.php
  157. +3 −3 tests/functional/browse_test.php
  158. +93 −0 tests/functional/common_groups_test.php
  159. +45 −0 tests/functional/forum_style_test.php
  160. +67 −0 tests/functional/mcp_test.php
  161. +35 −0 tests/functional/posting_test.php
  162. +66 −0 tests/functional/report_post_captcha_test.php
  163. +21 −0 tests/functional/ucp_groups_test.php
  164. +44 −0 tests/functions/clean_path_test.php
  165. +21 −0 tests/functions/fixtures/language_select.xml
  166. +121 −0 tests/functions/fixtures/obtain_online.xml
  167. +23 −0 tests/functions/fixtures/style_select.xml
  168. +23 −0 tests/functions/fixtures/validate_email.xml
  169. +38 −0 tests/functions/fixtures/validate_username.xml
  170. +71 −0 tests/functions/get_formatted_filesize_test.php
  171. +75 −0 tests/functions/get_remote_file_test.php
  172. +56 −0 tests/functions/is_absolute_test.php
  173. +39 −0 tests/functions/language_select_test.php
  174. +238 −0 tests/functions/obtain_online_test.php
  175. +41 −0 tests/functions/style_select_test.php
  176. +36 −0 tests/functions/validate_data_helper.php
  177. +82 −0 tests/functions/validate_date_test.php
  178. +108 −0 tests/functions/validate_email_test.php
  179. +121 −0 tests/functions/validate_hex_colour_test.php
  180. +79 −0 tests/functions/validate_jabber_test.php
  181. +60 −0 tests/functions/validate_lang_iso_test.php
  182. +49 −0 tests/functions/validate_match_test.php
  183. +59 −0 tests/functions/validate_num_test.php
  184. +96 −0 tests/functions/validate_password_test.php
  185. +70 −0 tests/functions/validate_string_test.php
  186. +190 −0 tests/functions/validate_username_test.php
  187. +47 −0 tests/functions_database_helper/fixtures/bookmarks_duplicates.xml
  188. +80 −0 tests/functions_database_helper/fixtures/topics_watch_duplicates.xml
  189. +101 −0 tests/functions_database_helper/update_rows_avoiding_duplicates_notify_status_test.php
  190. +71 −0 tests/functions_database_helper/update_rows_avoiding_duplicates_test.php
  191. +74 −0 tests/lint_test.php
  192. +26 −1 tests/mock/cache.php
  193. +42 −0 tests/mock/null_cache.php
  194. +13 −0 tests/{mock_user.php → mock/user.php}
  195. +1 −1 tests/privmsgs/delete_user_pms_test.php
  196. +1 −1 tests/request/request_var_test.php
  197. +1 −1 tests/security/extract_current_page_test.php
  198. +8 −0 tests/security/hash_test.php
  199. +1 −1 tests/security/redirect_test.php
  200. +50 −51 tests/session/append_sid_test.php
  201. +4 −3 tests/session/{init_test.php → creation_test.php}
  202. +41 −8 tests/template/template_test.php
  203. +2 −0 tests/template/templates/include_define.html
  204. +2 −0 tests/template/templates/include_define_variable.html
  205. +4 −0 tests/template/templates/include_loop_define.html
  206. +37 −0 tests/test_framework/phpbb_database_connection_odbc_pdo_wrapper.php
  207. +88 −0 tests/test_framework/phpbb_database_test_case.php
  208. +291 −9 tests/test_framework/phpbb_database_test_connection_manager.php
  209. +566 −80 tests/test_framework/phpbb_functional_test_case.php
  210. +3 −1 tests/test_framework/phpbb_test_case_helpers.php
  211. +1 −1 tests/text_processing/censor_text_test.php
  212. +1 −1 tests/text_processing/make_clickable_test.php
  213. +1 −1 tests/utf/utf8_clean_string_test.php
  214. +3 −1 travis/phpunit-mysql-travis.xml
  215. +3 −1 travis/phpunit-postgres-travis.xml
  216. +54 −0 travis/setup-webserver.sh
  217. BIN vendor/goutte.phar
View
@@ -2,7 +2,7 @@
/phpunit.xml
/phpBB/cache/*.html
/phpBB/cache/*.php
-/phpBB/cache/queue.php.lock
+/phpBB/cache/*.lock
/phpBB/composer.phar
/phpBB/config.php
/phpBB/config_dev.php
View
@@ -4,21 +4,25 @@ php:
- 5.3.3
- 5.3
- 5.4
+ - 5.5
env:
- DB=mysql
- DB=postgres
before_script:
- - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS phpbb_tests;' -U postgres; fi"
- - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database phpbb_tests;' -U postgres; fi"
+ - sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'DROP DATABASE IF EXISTS phpbb_tests;' -U postgres; fi"
+ - sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'create database phpbb_tests;' -U postgres; fi"
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS phpbb_tests;'; fi"
- - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.2' ]; then pear install --force phpunit/DbUnit; else pyrus install --force phpunit/DbUnit; fi"
- - phpenv rehash
+ - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.2' ]; then pear install --force phpunit/DbUnit; phpenv rehash; fi"
+ - cd phpBB
+ - sh -c "if [ '$TRAVIS_PHP_VERSION' != '5.2' ]; then php ../composer.phar install --dev --no-interaction --prefer-source; fi"
+ - cd ..
+ - sh -c "if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.3.19', '>=');"` = "1" ]; then travis/setup-webserver.sh; fi"
script:
- - phpunit --configuration travis/phpunit-$DB-travis.xml
-
+ - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.2' ]; then phpunit --configuration travis/phpunit-$DB-travis.xml; else phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml; fi"
+
notifications:
email:
recipients:
View
@@ -1,4 +1,4 @@
-[![phpBB](http://www.phpbb.com/theme/images/logos/blue/160x52.png)](http://www.phpbb.com)
+[![phpBB](https://www.phpbb.com/theme/images/logos/blue/160x52.png)](http://www.phpbb.com)
## ABOUT
View
@@ -2,18 +2,17 @@
<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
<!-- a few settings for the build -->
- <property name="newversion" value="3.0.11" />
- <property name="prevversion" value="3.0.10" />
- <property name="olderversions" value="3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.7-PL1, 3.0.8, 3.0.9, 3.0.11-RC1, 3.0.11-RC2" />
+ <property name="newversion" value="3.0.12" />
+ <property name="prevversion" value="3.0.11" />
+ <property name="olderversions" value="3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.7-PL1, 3.0.8, 3.0.9, 3.0.10, 3.0.12-RC1, 3.0.12-RC2, 3.0.12-RC3" />
<!-- no configuration should be needed beyond this point -->
<property name="oldversions" value="${olderversions}, ${prevversion}" />
<property name="versions" value="${oldversions}, ${newversion}" />
<!-- These are the main targets which you will probably want to use -->
- <target name="package" depends="clean,prepare,create-package" />
- <target name="all" depends="clean,prepare,test,docs,create-package" />
- <target name="build" depends="clean,prepare,test,docs" />
+ <target name="all" depends="clean,prepare,composer,test,docs,package" />
+ <target name="build" depends="clean,prepare,composer,test,docs" />
<target name="prepare">
<mkdir dir="build/logs" />
@@ -43,17 +42,31 @@
<delete dir="build/save" />
</target>
- <target name="test" depends="clean,prepare">
+ <!--
+ This target basically just runs composer in the phpBB tree to ensure
+ all dependencies are loaded. Additional development dependencies are
+ loaded because testing framework may depend on them.
+ -->
+ <target name="composer">
+ <exec dir="phpBB"
+ command="php ../composer.phar install --dev"
+ checkreturn="true"
+ passthru="true" />
+ </target>
+
+ <target name="test" depends="clean,prepare,composer">
<exec dir="."
- command="phpunit --log-junit build/logs/phpunit.xml
+ command="phpBB/vendor/bin/phpunit
+ --log-junit build/logs/phpunit.xml
--coverage-clover build/logs/clover.xml
--coverage-html build/coverage"
passthru="true" />
</target>
- <target name="test-slow" depends="clean,prepare">
+ <target name="test-slow" depends="clean,prepare,composer">
<exec dir="."
- command="phpunit --log-junit build/logs/phpunit.xml
+ command="phpBB/vendor/bin/phpunit
+ --log-junit build/logs/phpunit.xml
--configuration phpunit.xml.all
--group slow
--coverage-clover build/logs/clover-slow.xml
@@ -116,7 +129,7 @@
</target>
- <target name="create-package" depends="prepare-new-version,old-version-diffs">
+ <target name="package" depends="clean,prepare,prepare-new-version,old-version-diffs">
<exec dir="build" command="php -f package.php '${versions}' > logs/package.log" escape="false" />
<exec dir="build" command="php -f build_diff.php '${prevversion}' '${newversion}' > logs/build_diff.log" escape="false" />
@@ -155,6 +168,45 @@
<exec dir="phpBB"
command="git archive ${revision} | tar -xf - -C ../${dir}"
checkreturn="true" />
+
+ <!-- Install composer dependencies, if there are any. -->
+ <exec dir="."
+ command='php -r "\$j = json_decode(file_get_contents("composer.json")); echo isset(\$j->require);"'
+ checkreturn="true"
+ outputProperty='composer-has-dependencies' />
+ <if>
+ <equals arg1="${composer-has-dependencies}" arg2="1" trim="true" />
+ <then>
+ <!-- We have non-dev composer dependencies -->
+ <exec dir="."
+ command="git ls-tree ${revision} composer.phar"
+ checkreturn="true"
+ outputProperty='composer-ls-tree-output' />
+ <if>
+ <equals arg1="${composer-ls-tree-output}" arg2="" trim="true" />
+ <then>
+ <fail message="There are composer dependencies, but composer.phar is missing." />
+ </then>
+ <else>
+ <!-- Export the phar, install dependencies, delete phar. -->
+ <exec dir="."
+ command="git archive ${revision} composer.phar | tar -xf - -C ${dir}"
+ checkreturn="true" />
+ <exec dir="${dir}"
+ command="php composer.phar install"
+ checkreturn="true"
+ passthru="true" />
+ <delete file="${dir}/composer.phar" />
+ </else>
+ </if>
+ </then>
+ <else>
+ <!-- We do not have composer dependencies, do not ship composer files -->
+ <delete file="${dir}/composer.json" />
+ <delete file="${dir}/composer.lock" />
+ </else>
+ </if>
+
<delete file="${dir}/config.php" />
<delete dir="${dir}/develop" />
<delete dir="${dir}/install/data" />
@@ -176,6 +228,7 @@
<delete dir="${dir}/files" />
<delete dir="${dir}/install" />
<delete dir="${dir}/store" />
+ <delete dir="${dir}/vendor" />
</target>
</project>
View
Binary file not shown.
@@ -33,9 +33,7 @@ else
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi
-error=0
errors=""
-
if ! which "$PHP_BIN" >/dev/null 2>&1
then
echo "PHP Syntax check failed:"
@@ -73,63 +71,18 @@ do
# check the staged file content for syntax errors
# using php -l (lint)
- # note: if display_errors=stderr in php.ini,
- # parse errors are printed on stderr; otherwise
- # they are printed on stdout.
- # we filter everything other than parse errors
- # with a grep below, therefore it should be safe
- # to combine stdout and stderr in all circumstances
- result=$(git cat-file -p $sha | "$PHP_BIN" -l 2>&1)
+ result=$(git cat-file -p $sha | "$PHP_BIN" -n -l -ddisplay_errors\=1 -derror_reporting\=E_ALL -dlog_errrors\=0 2>&1)
if [ $? -ne 0 ]
then
- error=1
# Swap back in correct filenames
- errors=$(echo "$errors"; echo "$result" |sed -e "s@in - on@in $filename on@g")
+ errors=$(echo "$errors"; echo "$result" | grep ':' | sed -e "s@in - on@in $filename on@g")
fi
done
unset IFS
-if [ $error -eq 1 ]
+if [ -n "$errors" ]
then
- echo "PHP Syntax check failed:"
- # php "display errors" (display_errors php.ini value)
- # and "log errors" (log_errors php.ini value).
- # these are independent settings - see main/main.c in php source.
- # the "log errors" setting produces output which
- # starts with "PHP Parse error:"; the "display errors"
- # setting produces output starting with "Parse error:".
- # if both are turned on php dumps the parse error twice.
- # therefore here we try to grep for one version and
- # if that yields no results grep for the other version.
- #
- # other fun php facts:
- #
- # 1. in cli, display_errors and log_errors have different
- # destinations by default. display_errors prints to
- # standard output and log_errors prints to standard error.
- # whether these destinations make sense is left
- # as an exercise for the reader.
- # 2. as mentioned above, with all output turned on
- # php will print parse errors twice, one time on stdout
- # and one time on stderr.
- # 3. it is possible to set both display_errors and log_errors
- # to off. if this is done php will print the text
- # "Errors parsing <file>" but will not say what
- # the errors are. useful behavior, this.
- # 4. on my system display_errors defaults to on and
- # log_errors defaults to off, therefore providing
- # by default one copy of messages. your mileage may vary.
- # 5. by setting display_errors=stderr and log_errors=on,
- # both sets of messages will be printed on stderr.
- # 6. php-cgi binary, given display_errors=stderr and
- # log_errors=on, still prints both sets of messages
- # on stderr, but formats one set as an html fragment.
- # 7. your entry here? ;)
- $echo_e "$errors" | grep "^Parse error:"
- if [ $? -ne 0 ]
- then
- # match failed
- $echo_e "$errors" | grep "^PHP Parse error:"
- fi
+ echo "PHP Syntax check failed: "
+ $echo_e "$errors"
exit 1
fi
View
@@ -78,12 +78,12 @@ function work($pull_id, $remote)
add_remote($pull_user, 'phpbb3');
run("git fetch $pull_user");
run("git merge --no-ff $pull_user/$pull_branch");
- run("phpunit");
+ run("phpBB/vendor/bin/phpunit");
run("git checkout develop");
run("git pull $remote develop");
run("git merge --no-ff develop-olympus");
- run("phpunit");
+ run("phpBB/vendor/bin/phpunit");
break;
case 'develop':
@@ -93,7 +93,7 @@ function work($pull_id, $remote)
add_remote($pull_user, 'phpbb3');
run("git fetch $pull_user");
run("git merge --no-ff $pull_user/$pull_branch");
- run("phpunit");
+ run("phpBB/vendor/bin/phpunit");
break;
default:
@@ -124,19 +124,34 @@ function get_repository_url($username, $repository, $ssh = false)
function api_request($query)
{
- $contents = file_get_contents("http://github.com/api/v2/json/$query");
+ return api_url_request("https://api.github.com/$query?per_page=100");
+}
+
+function api_url_request($url)
+{
+ $contents = file_get_contents($url, false, stream_context_create(array(
+ 'http' => array(
+ 'header' => "User-Agent: phpBB/1.0\r\n",
+ ),
+ )));
if ($contents === false)
{
throw new RuntimeException("Error: failed to retrieve pull request data\n", 4);
}
+ $contents = json_decode($contents);
+
+ if (isset($contents->message) && strpos($contents->message, 'API Rate Limit') === 0)
+ {
+ throw new RuntimeException('Reached github API Rate Limit. Please try again later' . "\n", 4);
+ }
- return json_decode($contents);
+ return $contents;
}
function get_pull($username, $repository, $pull_id)
{
- $request = api_request("pulls/$username/$repository/$pull_id");
+ $request = api_request("repos/$username/$repository/pulls/$pull_id");
$pull = $request->pull;
Oops, something went wrong.

0 comments on commit 21e55ea

Please sign in to comment.