Skip to content

Commit 4c0e101

Browse files
authored
Merge pull request #3 from PostScripton/dev
Fixed ServiceProvider
2 parents 594a65e + 788e885 commit 4c0e101

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "postscripton/money",
33
"description": "A convenient way to convert numbers from DB or inputs into money strings for humans",
4-
"version": "1.0.1",
4+
"version": "1.0.2",
55
"type": "library",
66
"license": "MIT",
77
"authors": [
@@ -11,7 +11,7 @@
1111
}
1212
],
1313
"require": {
14-
"php": ">=7.1"
14+
"php": "^7.1"
1515
},
1616
"require-dev": {
1717
"orchestra/testbench": "^6.15"

src/ServiceProviders/MoneyServiceProvider.php renamed to src/MoneyServiceProvider.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<?php
22

3-
namespace PostScripton\Money\ServiceProviders;
3+
namespace PostScripton\Money;
44

55
use Illuminate\Support\ServiceProvider;
6-
use PostScripton\Money\Currency;
76
use PostScripton\Money\Exceptions\CurrencyDoesNotExistException;
8-
use PostScripton\Money\Money;
7+
use PostScripton\Money\Exceptions\ShouldPublishConfigFileException;
98

109
class MoneyServiceProvider extends ServiceProvider
1110
{
@@ -15,7 +14,7 @@ public function boot()
1514

1615
try {
1716
Money::set(' ', '.', 1, false, Currency::code('RUB'));
18-
} catch (CurrencyDoesNotExistException $e) {
17+
} catch (CurrencyDoesNotExistException | ShouldPublishConfigFileException $e) {
1918
dd($e->getMessage());
2019
}
2120
}

tests/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace PostScripton\Money\Tests;
44

5-
use PostScripton\Money\ServiceProviders\MoneyServiceProvider;
5+
use PostScripton\Money\MoneyServiceProvider;
66

77
class TestCase extends \Orchestra\Testbench\TestCase
88
{

0 commit comments

Comments
 (0)