Skip to content

Commit a5bcfd6

Browse files
author
Slava
authored
Fix Currency (#18)
* Enable assertion on tests * Fix Currency * Update CHANGELOG * Update phpunit.xml.dist
1 parent 0cd2f0e commit a5bcfd6

File tree

4 files changed

+19
-8
lines changed

4 files changed

+19
-8
lines changed

.github/workflows/workflow.yml

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
php-version: ${{ matrix.php-version }}
2828
extensions: ${{ env.PHP_EXTENSIONS }}
2929
tools: composer:v1
30+
ini-values: zend.assertions=1
3031

3132
- name: Get Composer Cache Directory
3233
id: composer-cache

CHANGELOG.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ Security - in case of vulnerabilities.
1616

1717
## [Unreleased]
1818

19-
## 1.2.0 (2021-10-08)
19+
## 1.2.1 (2021-10-08)
20+
21+
### Changed
22+
23+
+ Fix construction of `Currency`.
24+
25+
## 1.2.0 (2021-10-08) [YANKED]
2026

2127
### Changed
2228

phpunit.xml.dist

+11-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.4/phpunit.xsd"
3+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
44
bootstrap="vendor/autoload.php"
5+
cacheResultFile=".phpunit.cache/test-results"
6+
executionOrder="depends,defects"
7+
convertDeprecationsToExceptions="true"
58
colors="true"
69
failOnRisky="true"
710
failOnWarning="true"
811
beStrictAboutChangesToGlobalState="true"
912
beStrictAboutOutputDuringTests="true"
1013
beStrictAboutResourceUsageDuringSmallTests="true"
14+
beStrictAboutCoversAnnotation="true"
15+
beStrictAboutTodoAnnotatedTests="true"
1116
backupGlobals="true"
1217
verbose="true">
1318
<testsuites>
@@ -16,11 +21,12 @@
1621
</testsuite>
1722
</testsuites>
1823

19-
<filter>
20-
<whitelist processUncoveredFilesFromWhitelist="true">
24+
<coverage cacheDirectory=".phpunit.cache/code-coverage"
25+
processUncoveredFiles="true">
26+
<include>
2127
<directory suffix=".php">src</directory>
22-
</whitelist>
23-
</filter>
28+
</include>
29+
</coverage>
2430

2531
<php>
2632
<ini name="error_reporting" value="-1" />

src/Currency.php

-2
Original file line numberDiff line numberDiff line change
@@ -1570,8 +1570,6 @@ public function __construct(string $currencyCode)
15701570
self::$currencies[$currencyCode]['default_fraction_digits'],
15711571
self::$currencies[$currencyCode]['sub_unit'],
15721572
self::$currencies[$currencyCode]['sign'],
1573-
self::$currencies[$currencyCode]['pretty_print_format'],
1574-
self::$currencies[$currencyCode]['negative_pretty_print_format'],
15751573
self::$currencies[$currencyCode]['deprecated'],
15761574
));
15771575

0 commit comments

Comments
 (0)