forked from phpbb/phpbb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/phpbb/phpbb into feature…
…/passwords Conflicts: phpBB/config/services.yml
- Loading branch information
Showing
619 changed files
with
13,397 additions
and
6,001 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,22 +4,33 @@ php: | |
- 5.3 | ||
- 5.4 | ||
- 5.5 | ||
- hhvm | ||
|
||
env: | ||
- DB=mariadb | ||
- DB=mysql | ||
- DB=postgres | ||
|
||
before_script: | ||
- 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" | ||
services: | ||
- redis-server | ||
|
||
install: | ||
- sh -c "if [ '$DB' = 'mariadb' ]; then travis/setup-mariadb.sh; fi" | ||
- sh -c "if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.3.19', '>=');"` = "1" ]; then travis/setup-webserver.sh; fi" | ||
- travis/install-php-extensions.sh | ||
- cd phpBB | ||
- php ../composer.phar install --dev --no-interaction --prefer-source | ||
- cd .. | ||
- sh -c "if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.3.19', '>=');"` = "1" ]; then travis/setup-webserver.sh; fi" | ||
|
||
before_script: | ||
- 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' -o '$DB' = 'mariadb' ]; then mysql -e 'create database IF NOT EXISTS phpbb_tests;'; fi" | ||
|
||
script: | ||
- cd build | ||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.5' -a '$DB' = 'mysql' ]; then ../phpBB/vendor/bin/phing sniff; fi" | ||
- cd .. | ||
- phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml | ||
|
||
notifications: | ||
|
@@ -28,3 +39,7 @@ notifications: | |
- [email protected] | ||
on_success: change | ||
on_failure: change | ||
|
||
matrix: | ||
allow_failures: | ||
- php: hhvm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
/** | ||
* | ||
* @package build | ||
* @copyright (c) 2013 phpBB Group | ||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 | ||
* | ||
*/ | ||
|
||
if (php_sapi_name() !== 'cli' || $_SERVER['argc'] != 5) | ||
{ | ||
echo "Usage (CLI only): build_announcement.php email|bbcode new_version release_files_dir checksum_algorithm\n"; | ||
exit(1); | ||
} | ||
|
||
$mode = $_SERVER['argv'][1]; | ||
$version = $_SERVER['argv'][2]; | ||
$root = $_SERVER['argv'][3]; | ||
$checksum_algorithm = $_SERVER['argv'][4]; | ||
|
||
$series_version = substr($version, 0, 3); | ||
$base_url = "https://download.phpbb.com/pub/release/$series_version"; | ||
|
||
if (version_compare($version, "$series_version.0", '<')) | ||
{ | ||
// Everything before 3.x.0, i.e. unstable (e.g. alpha, beta, rc) | ||
$url = "$base_url/unstable/$version"; | ||
} | ||
else if (strpos($version, 'RC') !== false) | ||
{ | ||
// Release candidate of stable release | ||
$url = "$base_url/qa/$version"; | ||
} | ||
else | ||
{ | ||
// Stable release (e.g. 3.x.0, 3.x.1, 3.x.2, 3.x.3-PL1) | ||
$url = "$base_url/$version"; | ||
} | ||
|
||
if ($mode === 'bbcode') | ||
{ | ||
$template = "[url=%1\$s/%2\$s]%2\$s[/url]\n{$checksum_algorithm}sum: %3\$s\n"; | ||
} | ||
else | ||
{ | ||
$template = "%s/%s\n{$checksum_algorithm}sum: %s\n"; | ||
} | ||
|
||
function phpbb_rnatsort($array) | ||
{ | ||
$strrnatcmp = function($a, $b) | ||
{ | ||
return strnatcmp($b, $a); | ||
}; | ||
usort($array, $strrnatcmp); | ||
return $array; | ||
} | ||
|
||
function phpbb_string_ends_with($haystack, $needle) | ||
{ | ||
return substr($haystack, -strlen($needle)) === $needle; | ||
} | ||
|
||
function phpbb_get_checksum($checksum_file) | ||
{ | ||
return array_shift(explode(' ', file_get_contents($checksum_file))); | ||
} | ||
|
||
foreach (phpbb_rnatsort(array_diff(scandir($root), array('.', '..'))) as $filename) | ||
{ | ||
if (phpbb_string_ends_with($filename, $checksum_algorithm)) | ||
{ | ||
continue; | ||
} | ||
else | ||
{ | ||
printf($template, $url, $filename, phpbb_get_checksum("$root/$filename.$checksum_algorithm")); | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="phpBB Minimum Standard"> | ||
|
||
<description>phpBB minimum coding standard</description> | ||
|
||
<!-- All code files MUST use only UTF-8 without BOM. --> | ||
<rule ref="Generic.Files.ByteOrderMark" /> | ||
|
||
<!-- All code files MUST use the Unix LF (linefeed) line ending. --> | ||
<rule ref="Generic.Files.LineEndings" /> | ||
|
||
<!-- Tabs MUST be used for indentation --> | ||
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent" /> | ||
|
||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="phpBB PHP Legacy Standard"> | ||
|
||
<description>phpBB legacy coding standard for PHP files</description> | ||
|
||
<rule ref="./ruleset-minimum.xml" /> | ||
|
||
<!-- "for (; bar; )" should be "while (bar)" instead --> | ||
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop" /> | ||
|
||
<!-- A method MUST not only call its parent --> | ||
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod" /> | ||
|
||
<!-- The body of each structure MUST be enclosed by braces. --> | ||
<rule ref="Generic.ControlStructures.InlineControlStructure" /> | ||
|
||
<!-- There MUST not be more than one statement per line. --> | ||
<rule ref="Generic.Formatting.DisallowMultipleStatements" /> | ||
|
||
<!-- Call-time pass-by-reference MUST not be used. --> | ||
<rule ref="Generic.Functions.CallTimePassByReference.NotAllowed" /> | ||
|
||
<!-- Class constants MUST be declared in all upper case with underscore separators. --> | ||
<rule ref="Generic.NamingConventions.UpperCaseConstantName" /> | ||
|
||
<!-- Only <?php, no short tags. --> | ||
<rule ref="Generic.PHP.DisallowShortOpenTag.EchoFound" /> | ||
|
||
<!-- Method arguments with default values MUST go at the end of the argument list. --> | ||
<rule ref="PEAR.Functions.ValidDefaultValue" /> | ||
|
||
<!-- In the argument list, there MUST NOT be a space before each comma, | ||
and there MUST be one space after each comma. --> | ||
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing"> | ||
<properties> | ||
<property name="equalsSpacing" value="1"/> | ||
</properties> | ||
</rule> | ||
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint" /> | ||
|
||
<!-- The ?> closing tag MUST be omitted from files containing only PHP. --> | ||
<rule ref="Zend.Files.ClosingTag" /> | ||
|
||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="phpBB PHP Strict Standard"> | ||
|
||
<description>phpBB coding standard for PHP files</description> | ||
|
||
<rule ref="./ruleset-php-legacy.xml" /> | ||
|
||
<!-- There SHOULD NOT be more than 80 characters per line | ||
There MUST NOT be more than 120 characters per line --> | ||
<!-- | ||
<rule ref="Generic.Files.LineLength"> | ||
<properties> | ||
<property name="lineLimit" value="80"/> | ||
<property name="absoluteLineLimit" value="120"/> | ||
</properties> | ||
</rule> | ||
--> | ||
|
||
<!-- The PHP constants true, false, and null MUST be in lower case. --> | ||
<rule ref="Generic.PHP.LowerCaseConstant" /> | ||
|
||
<!-- PHP keywords MUST be in lower case. --> | ||
<rule ref="Generic.PHP.LowerCaseKeyword" /> | ||
|
||
<!-- There MUST NOT be trailing whitespace at the end of lines. --> | ||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" /> | ||
|
||
<!-- There MUST NOT be whitespace before the first content of a file --> | ||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.StartFile" /> | ||
|
||
<!-- There MUST NOT be whitespace after the last content of a file --> | ||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndFile" /> | ||
|
||
<!-- Functions MUST NOT contain multiple empty lines in a row --> | ||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines" /> | ||
|
||
<!-- Classes etc. MUST be namespaced --> | ||
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace" /> | ||
|
||
<!-- A file MUST not contain more than one class/interface --> | ||
<rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses" /> | ||
|
||
<!-- Files containing classes MUST not have any side-effects --> | ||
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols" /> | ||
|
||
<!-- When present, all use declarations MUST go after the namespace declaration. | ||
There MUST be one use keyword per declaration. | ||
There MUST be one blank line after the use block. --> | ||
<rule ref="PSR2.Namespaces.UseDeclaration" /> | ||
|
||
</ruleset> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.