Skip to content

Commit

Permalink
Fix Currency (#18)
Browse files Browse the repository at this point in the history
* Enable assertion on tests

* Fix Currency

* Update CHANGELOG

* Update phpunit.xml.dist
  • Loading branch information
Slava authored Oct 8, 2021
1 parent 0cd2f0e commit a5bcfd6
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
php-version: ${{ matrix.php-version }}
extensions: ${{ env.PHP_EXTENSIONS }}
tools: composer:v1
ini-values: zend.assertions=1

- name: Get Composer Cache Directory
id: composer-cache
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ Security - in case of vulnerabilities.

## [Unreleased]

## 1.2.0 (2021-10-08)
## 1.2.1 (2021-10-08)

### Changed

+ Fix construction of `Currency`.

## 1.2.0 (2021-10-08) [YANKED]

### Changed

Expand Down
16 changes: 11 additions & 5 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.4/phpunit.xsd"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
cacheResultFile=".phpunit.cache/test-results"
executionOrder="depends,defects"
convertDeprecationsToExceptions="true"
colors="true"
failOnRisky="true"
failOnWarning="true"
beStrictAboutChangesToGlobalState="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutResourceUsageDuringSmallTests="true"
beStrictAboutCoversAnnotation="true"
beStrictAboutTodoAnnotatedTests="true"
backupGlobals="true"
verbose="true">
<testsuites>
Expand All @@ -16,11 +21,12 @@
</testsuite>
</testsuites>

<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<coverage cacheDirectory=".phpunit.cache/code-coverage"
processUncoveredFiles="true">
<include>
<directory suffix=".php">src</directory>
</whitelist>
</filter>
</include>
</coverage>

<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 0 additions & 2 deletions src/Currency.php
Original file line number Diff line number Diff line change
Expand Up @@ -1570,8 +1570,6 @@ public function __construct(string $currencyCode)
self::$currencies[$currencyCode]['default_fraction_digits'],
self::$currencies[$currencyCode]['sub_unit'],
self::$currencies[$currencyCode]['sign'],
self::$currencies[$currencyCode]['pretty_print_format'],
self::$currencies[$currencyCode]['negative_pretty_print_format'],
self::$currencies[$currencyCode]['deprecated'],
));

Expand Down

0 comments on commit a5bcfd6

Please sign in to comment.