Changesets: MantisBT

master 9d4a140f

2023-08-18 11:18

dregad


Details Diff
relationship_get() throw Exception if not found

Until now, when the given $p_relationship_id did not exist, the function
would just return null.

This caused REST API DELETE /{id}/relationships/{relationship_id}
endpoint to return HTTP 200 despite actually failing due to a PHP
Warning: Attempt to read property "src_bug_id" on null in
./core/relationship_api.php on line 598

relationship_get() now throws a ClientException instead, and API returns
a 404.

Fixes 0032835
Affected Issues
0032835
mod - core/relationship_api.php Diff File

master 3610ae50

2023-08-17 12:03

dregad


Details Diff
Exception when version to delete does not exist

The initial implementation of VersionDeleteCommand did not throw an
exception when given a non-existing version number, causing the REST API
to succeed with HTTP 204 (version deleted) when it should in fact have
failed.

The Command now throws a ClientException, resulting in the API returning
a 404 (not found) in this situation.

Note: the version_exists() call before retrieving the project id with
version_get_field() is not necessary, as the latter already perform this
check (via version_cache_row()).

PHPUnit test has been updated accordingly.

Fixes 0030415
Affected Issues
0030415
mod - core/commands/VersionDeleteCommand.php Diff File
mod - tests/rest/RestProjectVersionTest.php Diff File

master 39d5f21c

2023-08-17 12:00

dregad


Details Diff
Throw Exception when unfound version is cached

Broken PHPUnit tests following e4b23f723464d01da12c1068c471779a6f386b2a.

version_cache_row()'s behavior was inconsistent for non-existing
versions, throwing an exception the first time around, and returning
false the second time (when the version is stored in the cache).

Fixes 0032832
Affected Issues
0032832
mod - core/version_api.php Diff File

master 770b990a

2023-08-17 07:11

translatewiki.net


Details Diff
Localisation updates from https://translatewiki.net.
mod - lang/strings_hebrew.txt Diff File
mod - lang/strings_swissgerman.txt Diff File
mod - plugins/MantisCoreFormatting/lang/strings_swissgerman.txt Diff File
mod - plugins/MantisGraph/lang/strings_swissgerman.txt Diff File
mod - plugins/XmlImportExport/lang/strings_swissgerman.txt Diff File

master 9224acb6

2023-08-14 11:26

dregad


Details Diff
Use fake sendmail script for TravisCI builds

This avoids 'sh: 1: /usr/sbin/sendmail: not found' error message
displayed after PHPUnit suite execution, as sendmail is not installed on
Travis.

Note: This is not a "real" error and does not actually cause the build
to fail, but it could lead someone reviewing the build's log to think
that something went wrong, so it should be fixed to avoid confusion.

The fakesendmail.sh script was copied from PHPMailer's test suite [1].
It will generate a .eml file in /tmp/fakemail directory, each time
the test suite sends an email.

Fixes 0032828

[1]: https://github.com/PHPMailer/PHPMailer/blob/v6.8.0/test/fakesendmail.sh
Affected Issues
0032828
mod - .travis.yml Diff File
add - tests/fakesendmail.sh Diff File

master c453af21

2023-08-14 07:11

translatewiki.net


Details Diff
Localisation updates from https://translatewiki.net.
mod - lang/strings_slovene.txt Diff File

master ffa0e90b

2023-08-10 12:23

dregad


Details Diff
Make UserTest uniqueness provider more dynamic

When building test email addresses, use the user and domain from the
TEST_EMAIL constant, to ensure the test cases in providerEmailUnique
remain relevant in case the reference email is modified.
mod - tests/Mantis/UserTest.php Diff File

master a3d0776a

2023-08-10 07:15

translatewiki.net


Details Diff
Localisation updates from https://translatewiki.net.
mod - lang/strings_chinese_traditional.txt Diff File
mod - lang/strings_dutch.txt Diff File
mod - lang/strings_french.txt Diff File
mod - lang/strings_galician.txt Diff File
mod - lang/strings_interlingua.txt Diff File
mod - lang/strings_macedonian.txt Diff File
mod - lang/strings_russian.txt Diff File

master f550281a

2023-08-09 19:52

dregad


Details Diff
Define the Test Suites with a phpunit.xml file

Until today, the test suites were defined in "AllTests.php" files using
the PHPUnit\Framework\TestSuite class, which is meant for internal use.

The official, documented method to compose a test suite is to use XML
configuration.

This commit introduces the phpunit.xml, which replaces the AllTests.php
scripts, and updates documentation and TravisCI script.

Fixes 0032816
Affected Issues
0032816
mod - build/travis_script.sh Diff File
mod - docbook/Developers_Guide/en-US/Contributors.xml Diff File
add - phpunit.xml Diff File
rm - tests/AllTests.php Diff
rm - tests/Mantis/AllTests.php Diff
rm - tests/rest/AllTests.php Diff
rm - tests/soap/AllTests.php Diff

master d79c663b

2023-08-09 13:07

dregad


Details Diff
Fix error when executing PHPUnit AllTests.php

Argument 0000001 of PHPUnit\Framework\TestSuite::addTestSuite() must be a
class name or object

AllTests::suite() method called addTest() instead of addTestSuite()
to include the 3 tests suites.

Fixes 0032815
Affected Issues
0032815
mod - tests/AllTests.php Diff File

master-2.25 f7c7d297

2023-08-09 12:50

dregad


Details Diff
Ignore .phpunit.result.cache file

(cherry picked from commit f50431108a5ea0e6b5e12882f43eb5d25cedecbb)
mod - .gitignore Diff File

master f7c7d297

2023-08-09 12:50

dregad


Details Diff
Ignore .phpunit.result.cache file

(cherry picked from commit f50431108a5ea0e6b5e12882f43eb5d25cedecbb)
mod - .gitignore Diff File

master f5043110

2023-08-09 12:50

dregad


Details Diff
Ignore .phpunit.result.cache file
mod - .gitignore Diff File

master e6827c4a

2023-08-09 12:48

dregad


Details Diff
Fix errors when SOAP extension is not loaded

Initialize defaultSoapClientOptions property in setUp(), to avoid a
syntax error due to undefined constant WSDL_CACHE_NONE.

Remove useless SoapAllTests::setUp() method. TestSuite class does not
have this method so it is never actually called. Extension availability
check is performed by `@requires extension` hints in the test cases'
PHPDoc blocks.

Fixes 0032814
Affected Issues
0032814
mod - tests/soap/AllTests.php Diff File
mod - tests/soap/SoapBase.php Diff File

master b04349f7

2023-08-08 16:09

atrol


Details Diff
Fix tag filter display when using PHP 7.x

Fixes 0032811
Affected Issues
0032811
mod - manage_tags_page.php Diff File

master e7609d9d

2023-08-08 03:39

dregad


Details Diff
Revert "Merge branch 'master-2.25' [skip ci]"

This reverts commit daba2acd66e22045834595363945173b311f8bc3, reversing
changes made to 20724c486b2e08cb4d21ce4be8e2e467c6cc61ea.

I typed the merge commit message, but forgot to unstage the change :-/
mod - core/user_api.php Diff File

master daba2acd

2023-08-08 03:36

dregad


Details Diff
Merge branch 'master-2.25' [skip ci]

Discarding the change, which only applies to 2.25.x (PHP 5.x is no
longer supported in master)
mod - core/user_api.php Diff File

master-2.25 519b5b63

2023-08-08 03:32

dregad


Details Diff
Remove null-coalescing operator

Not supported in PHP 5.x.

Fixes 0032809, follow-up on a1b5eae881a5675dcd78b2d7a0d03371b2228d79.
Affected Issues
0032809
mod - core/user_api.php Diff File

master 20724c48

2023-08-07 19:55

dregad


Details Diff
Merge branch 'master-2.25'
mod - core/user_api.php Diff File

master-2.25 a1b5eae8

2023-08-07 19:54

dregad


Details Diff
Fix deprecated notice in user_search_cache()

PHPUnit test case LoginTest::testLoginWithNullPasswordIsRejected fails
on PHP 8.1 due to error: "strcmp(): Passing null to parameter 0000002
($string2) of type string is deprecated".

When $p_value is null, convert it to empty string before calling
strcmp/strcasecmp.

Fixes 0032809
Affected Issues
0032809
mod - core/user_api.php Diff File

master 839c4f08

2023-08-07 19:14

dregad


Details Diff
Composer update

- Removing symfony/polyfill-php72 (v1.19.0)
- Removing symfony/polyfill-php70 (v1.19.0)
- Removing symfony/polyfill-intl-normalizer (v1.19.0)
- Removing symfony/polyfill-intl-idn (v1.19.0)
- Removing paragonie/random_compat (v9.99.100)
- Installing symfony/deprecation-contracts (v2.5.2)
- Installing psr/http-client (1.0.2)
- Upgrading guzzlehttp/guzzle (6.5.8 => 7.6.1)

Fixes 0032807
Affected Issues
0032807
mod - composer.lock Diff File

master 73fd23dd

2023-08-07 19:11

dregad


Details Diff
Updating GuzzleHttp minimum version to 7.5

Fixes 0032807
Affected Issues
0032807
mod - composer.json Diff File

master 9e2eebf5

2023-08-07 18:49

dregad


Details Diff
Update minimum PHP version to 7.2.5

Fixes 0027840
Affected Issues
0027840
mod - README.md Diff File
mod - composer.json Diff File
mod - core/constant_inc.php Diff File
mod - docbook/Admin_Guide/en-US/Installation.xml Diff File

master 68639d03

2023-08-07 14:21

dregad


Details Diff
Merge branch 'email-unique-case-sensitive'
mod - account_page.php Diff File
mod - admin/check/check_email_inc.php Diff File
mod - core/user_api.php Diff File
mod - docbook/Admin_Guide/en-US/config/email.xml Diff File
mod - lang/strings_english.txt Diff File
mod - manage_user_edit_page.php Diff File
mod - manage_user_page.php Diff File

master d6681928

2023-08-07 14:20

dregad


Details Diff
Merge branch 'master-2.25'
mod - core/user_api.php Diff File
add - tests/Mantis/UserTest.php Diff File
 First  Prev  1 2 3 ... 70 71 72 73 74 75 76 ... 80 ... 160 ... 240 ... 320 ... 400 ... 480 ... 560 ... 640 ... 720 ... 762 763 764  Next  Last