summaryrefslogtreecommitdiff
path: root/ext/bcmath
Commit message (Collapse)AuthorAgeFilesLines
* Migrate skip checks to --EXTENSIONS--, p1Max Semenik2021-03-2247-135/+95
| | | | | | | | | | | | | For rationale, see https://github.com/php/php-src/pull/6787 Extensions migrated in this part: * bcmath * bz2 * calendar * com_dotnet * ctype Closes GH-6797.
* Add test cases for bcmath ValueErrorsAlex McLean2021-03-0310-0/+232
| | | | | | Closes GH-6714 Signed-off-by: George Peter Banyard <girgias@php.net>
* Improve class entry generationMáté Kocsis2021-02-161-1/+0
| | | | Related to GH-6701
* Implicitly enable function entry generation when class entry generation is ↵Máté Kocsis2021-02-092-5/+2
| | | | | | enabled Closes GH-6675
* Generate class entries for a few extensionsMáté Kocsis2021-02-032-2/+6
| | | | Relates to GH-6644
* Replace zend_bool uses with boolNikita Popov2021-01-151-10/+10
| | | | | | | We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool is retained as an alias.
* Fixed bug #80545Jens de Nies2021-01-123-84/+244
| | | | | | | | This converts the remaining "non well-formed" warnings in bcmath to ValueErrors, in line with the other warning promotions that have been performed in this extension. Closes GH-80545.
* Fix memory leak with bcsqrt on number 0<X<1Nikita Popov2020-11-122-1/+3
|
* Update bcmath.scale when calling bcscale()Nikita Popov2020-10-212-1/+13
| | | | | | | | | We should keep the value of bcmath.scale and the internal bc_precision global synchronized. Probably more important than the ability to retrieve bcmath.scale via ini_get(), this also makes sure that the set scale does not leak into the next request, as it currently does.
* Update gmp+bcmath parameter namesNikita Popov2020-09-294-25/+21
| | | | Closes GH-6205.
* Promote some warnings in BCMath to ErrorsGeorge Peter Banyard2020-09-1118-152/+99
| | | | | | Also do a bit of refactoring at the same time. Closes GH-6105
* Add many missing closing PHP tags to testsMáté Kocsis2020-08-091-1/+0
| | | | Closes GH-5958
* Remove proto comments from C filesMax Semenik2020-07-061-30/+15
| | | | Closes GH-5758
* Include stub hash in generated arginfo filesNikita Popov2020-06-241-1/+2
| | | | | | | | | | | | The hash is used to check whether the arginfo file needs to be regenerated. PHP-Parser will only be downloaded if this is actually necessary. This ensures that release artifacts will never try to regenerate stubs and thus fetch PHP-Parser, as long as you do not modify any files. Closes GH-5739.
* make bcpowmod stricter by not returning false, instead throw exceptionVladyslav Startsev2020-06-226-10/+38
| | | | Closes GH-5747
* Fix [-Wundef] warning in BCMath extensionGeorge Peter Banyard2020-05-161-1/+1
|
* Convert UNKNOWN default values to null in ext/bcmathMáté Kocsis2020-05-023-88/+105
|
* Ensure bcmath scale is between 0 and INT_MAXVladyslav Startsev2020-04-276-36/+177
| | | | | | | | Make sure bcmatch scale is between 0 and INT_MAX, both for the ini setting, and all the functions accepting a scale argument. A ValueError is thrown if a function argument is out of range. Closes GH-5455.
* Generate function entries from stubs for a couple of extensionsMáté Kocsis2020-04-044-26/+30
| | | | Closes GH-5347
* Make error messages more consistent by fixing capitalizationMáté Kocsis2020-01-176-10/+10
| | | | Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
* Fix #78880: Final spelling fixesMáté Kocsis2020-01-161-1/+1
|
* Fix smaller issues with stubsMáté Kocsis2019-12-201-9/+9
| | | | GH-5025
* Merge branch 'PHP-7.4'Stanislav Malyshev2019-12-161-1/+0
|\ | | | | | | | | * PHP-7.4: Test fixes
| * Test fixesStanislav Malyshev2019-12-161-1/+0
| |
* | Merge branch 'PHP-7.4'Stanislav Malyshev2019-12-162-2/+15
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | * PHP-7.4: Fix test Fix bug #78793 Fix build - no model field anymore Fixed bug #78910 Fix #78878: Buffer underflow in bc_shift_addsub Fix test Fix #78862: link() silently truncates after a null byte on Windows Fix #78863: DirectoryIterator class silently truncates after a null byte Fix #78943: mail() may release string with refcount==1 twice
| * Merge branch 'PHP-7.3' into PHP-7.4Stanislav Malyshev2019-12-162-2/+15
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-7.3: Fixed bug #78910 Fix #78878: Buffer underflow in bc_shift_addsub Fix test Fix #78862: link() silently truncates after a null byte on Windows Fix #78863: DirectoryIterator class silently truncates after a null byte Fix #78943: mail() may release string with refcount==1 twice
| | * Merge branch 'PHP-7.2' into PHP-7.3Stanislav Malyshev2019-12-162-2/+15
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-7.2: Fixed bug #78910 Fix #78878: Buffer underflow in bc_shift_addsub Fix test Fix #78862: link() silently truncates after a null byte on Windows Fix #78863: DirectoryIterator class silently truncates after a null byte
| | | * Fix #78878: Buffer underflow in bc_shift_addsubChristoph M. Becker2019-12-162-2/+15
| | | | | | | | | | | | | | | | | | | | We must not rely on `isdigit()` to detect digits, since we only support decimal ASCII digits in the following processing.
* | | | Add union return types for function stubsMáté Kocsis2019-11-112-3/+2
| | | |
* | | | Clean DONE tags from testsFabien Villepinte2019-11-079-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove most of the `===DONE===` tags and its variations. Keep `===DONE===` if the test output otherwise becomes empty. Closes GH-4872.
* | | | Elevate warnings to Error Exceptions in ext/bcmathChristoph M. Becker2019-10-286-17/+30
| | | | | | | | | | | | | | | | | | | | | | | | `bcdiv()` and `bcmod()` throw DivisionByZeroError if the divisor is 0, which matches the behavior of the `/` and `%` operators, and `bcsqrt()` throws ValueError for negative operands.
* | | | Remove mention of PHP major version in Copyright headersGabriel Caruso2019-09-252-4/+0
| | | | | | | | | | | | | | | | Closes GH-4732.
* | | | Add BCMath PHP stubsSimon Podlipsky2019-08-103-65/+74
| | | | | | | | | | | | | | | | Closes GH-4508.
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-06-211-0/+1
|\ \ \ \ | |/ / /
| * | | Fix leak in bcpowmodNikita Popov2019-06-211-0/+1
| | | |
* | | | Add return type for bcmath extension functionsGabriel Caruso2019-06-011-9/+9
|/ / / | | | | | | | | | Except for bcpowmod, as it returns string|false
* | | Warn about non well-formed arguments in bcmathvladyslavstartsev2019-05-146-10/+89
| | | | | | | | | | | | | | | Co-Authored-By: Nikita Popov <nikita.ppv@googlemail.com> Co-Authored-By: Christoph M. Becker <cmbecker69@gmx.de>
* | | Normalize comments in *nix build system m4 filesPeter Kokot2019-05-121-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Normalization include: - Use dnl for everything that can be ommitted when configure is built in favor of the shell comment character # which is visible in the output. - Line length normalized to 80 columns - Dots for most of the one line sentences - Macro definitions include similar pattern header comments now
* | | [ci skip] Rename libbcmath license file to LICENSEPeter Kokot2019-05-0725-33/+33
| | | | | | | | | | | | | | | | | | - More common filename accross the PHP repository - Additionally, this patch replaces some legacy form feed (FF or ^L) characters (for printers) to LF (\n) newline character.
* | | [ci skip] Fix typoPeter Kokot2019-04-201-1/+1
| | |
* | | Refactor docs files for bcmath libraryPeter Kokot2019-04-206-42/+45
| | |
* | | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-03-141-5/+12
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-03-141-5/+12
| |\ \ | | |/
| | * Fixed bug #77742Nikita Popov2019-03-141-5/+12
| | | | | | | | | | | | | | | | | | | | | By avoiding integer overflow in the implementation entirely. The multiplication was already explicitly checked for overflow, so also add a check for the addition and remove the overflow checks after the calculation.
| | * Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-1514-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines in all *.phpt sections. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
| | * Sync leading and final newlines in source code filesPeter Kokot2018-10-1425-29/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
| | * Trim trailing whitespace in source code filesPeter Kokot2018-10-135-14/+14
| | |
| | * Merge branch 'PHP-7.1' into PHP-7.2Anatol Belski2018-05-192-10/+5
| | |\ | | | | | | | | | | | | | | | | * PHP-7.1: Refix the tests once more
| | | * Refix the tests once moreAnatol Belski2018-05-192-10/+5
| | | | | | | | | | | | | | | | | | | | The behavior change seems to be in both runtime and system. The displaced warning output is of secondary interest anyway.
| | * | Merge branch 'PHP-7.1' into PHP-7.2Anatol Belski2018-05-194-2/+22
| | |\ \ | | | |/ | | | | | | | | | | | | * PHP-7.1: Fix remaining AppVeyor test failures due to the image update