├── .github └── workflows │ └── ci.yml ├── CHANGELOG.md ├── LICENSE ├── Makefile ├── README.md ├── composer.json └── src ├── DependencyInjection ├── Configuration.php └── MoneyExtension.php ├── MoneyBundle.php └── Resources └── config └── services.xml /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | pull_request: 8 | 9 | jobs: 10 | build-lowest-version: 11 | name: Build lowest version 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - name: Set up PHP 16 | uses: shivammathur/setup-php@1.5.8 17 | with: 18 | php-version: '7.2' 19 | coverage: xdebug 20 | extension-csv: mbstring 21 | 22 | - name: Checkout code 23 | uses: actions/checkout@v1 24 | 25 | - name: Install dependencies 26 | run: composer update --no-interaction --prefer-stable --prefer-lowest --prefer-dist 27 | 28 | - name: Run tests 29 | run: make test 30 | 31 | build: 32 | name: Build 33 | runs-on: ubuntu-latest 34 | strategy: 35 | max-parallel: 10 36 | matrix: 37 | php: ['7.2', '7.3', '7.4'] 38 | symfony_version: ['4.2.*', '4.3.*', '4.4.*', '5.0.*'] 39 | 40 | steps: 41 | - name: Set up PHP 42 | uses: shivammathur/setup-php@1.5.8 43 | with: 44 | php-version: ${{ matrix.php }} 45 | coverage: xdebug 46 | extension-csv: mbstring 47 | 48 | - name: Checkout code 49 | uses: actions/checkout@v1 50 | 51 | - name: Install dependencies 52 | run: | 53 | composer global require --no-progress --no-scripts --no-plugins symfony/flex 54 | composer update --no-interaction --prefer-dist 55 | env: 56 | SYMFONY_REQUIRE: ${{ matrix.symfony_version }} 57 | 58 | - name: Run tests 59 | run: make test 60 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to `moneyphp/money-bundle` will be documented in this file. 4 | 5 | Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles. 6 | 7 | ## v0.1.0 - 2020-05-09 8 | 9 | ### Added 10 | - A service definition of ISO currencies. 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 MoneyPHP Team 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | 2 | # Run unit tests 3 | test: 4 | ./vendor/bin/phpunit -c phpunit.xml.dist 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Money Bundle 2 | 3 | **Please note** that this package it is not considered stable yet. 4 | 5 | [![Latest Version](https://img.shields.io/github/release/moneyphp/MoneyBundle.svg?style=flat-square)](https://github.com/moneyphp/MoneyBundle/releases) 6 | [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) 7 | [![Build Status](https://img.shields.io/travis/moneyphp/MoneyBundle.svg?style=flat-square)](https://travis-ci.org/moneyphp/MoneyBundle) 8 | [![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/moneyphp/MoneyBundle.svg?style=flat-square)](https://scrutinizer-ci.com/g/moneyphp/MoneyBundle) 9 | [![Quality Score](https://img.shields.io/scrutinizer/g/moneyphp/MoneyBundle.svg?style=flat-square)](https://scrutinizer-ci.com/g/moneyphp/MoneyBundle) 10 | [![Total Downloads](https://img.shields.io/packagist/dt/moneyphp/money-bundle.svg?style=flat-square)](https://packagist.org/packages/moneyphp/money-bundle) 11 | 12 | **Symfony Bundle for the popular [Money](https://github.com/moneyphp/money) library.** 13 | 14 | 15 | ## Install 16 | 17 | Via Composer 18 | 19 | ``` bash 20 | $ composer require moneyphp/money-bundle 21 | ``` 22 | 23 | Enable the bundle in your kernel: 24 | 25 | ``` php 26 | =7.2", 10 | "symfony/framework-bundle": "^4.2 || ^5.0", 11 | "moneyphp/money": "^3.0" 12 | }, 13 | "require-dev": { 14 | "phpunit/phpunit": "^8.5" 15 | }, 16 | "autoload": { 17 | "psr-4": { 18 | "Money\\MoneyBundle\\": "src/" 19 | } 20 | }, 21 | "autoload-dev": { 22 | "psr-4": { 23 | "Tests\\Money\\MoneyBundle\\": "tests/" 24 | } 25 | }, 26 | "scripts": { 27 | "test": "vendor/bin/phpunit", 28 | "test-ci": "vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.xml" 29 | }, 30 | "extra": { 31 | "branch-alias": { 32 | "dev-master": "0.1-dev" 33 | } 34 | }, 35 | "prefer-stable": true, 36 | "minimum-stability": "dev" 37 | } 38 | -------------------------------------------------------------------------------- /src/DependencyInjection/Configuration.php: -------------------------------------------------------------------------------- 1 | root('moneyphp'); 24 | } else { 25 | $rootNode = $treeBuilder->getRootNode(); 26 | } 27 | 28 | return $treeBuilder; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/DependencyInjection/MoneyExtension.php: -------------------------------------------------------------------------------- 1 | load('services.xml'); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/MoneyBundle.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | --------------------------------------------------------------------------------