Commit 8818c3f1 authored by Mathias Verraes's avatar Mathias Verraes
Browse files

Bring project more in line with Composer best practices

Include phpunit as a dev dependency.
Remove bootstrap.php in favor of Composer's autoload
parent 31cc5697
.project
.buildpath
.settings
.idea/
build/
phpunit.xml
_build/
vendor
.idea/
\ No newline at end of file
phpunit.xml
vendor/
bin/
\ No newline at end of file
......@@ -5,4 +5,5 @@ Money Changelog
2.0.0.dev
---------
- 2013-01-08 Use vendor/autoload.php instead of lib/bootstrap.php (or use PSR-0 autolaoding)
- 2012-12-10 Renamed Money::getUnits() to Money::getAmount()
\ No newline at end of file
Money
=====
[![Build Status](https://secure.travis-ci.org/mathiasverraes/money.png)](http://travis-ci.org/mathiasverraes/money)
PHP 5.3+ library to make working with money safer, easier, and fun!
In short: You probably shouldn't represent monetary values by a float. Wherever
In short: You probably shouldn't represent monetary values by a float. Wherever
you need to represent money, use this Money value object.
```php
......@@ -22,7 +24,6 @@ assert($part3->equals(Money::EUR(333)));
The documentation is available at http://money.readthedocs.org
[![Build Status](https://secure.travis-ci.org/mathiasverraes/money.png)](http://travis-ci.org/mathiasverraes/money)
Installation
------------
......
......@@ -10,13 +10,24 @@
"email": "mathias@verraes.net"
}
],
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"phpunit/phpunit": "3.7.*"
},
"autoload": {
"psr-0": {
"Money": "lib"
}
},
"config": {
"bin-dir": "bin"
},
"suggest": {
"pink-tie/money-bundle": "For Symfony integration."
},
"minimum-stability": "dev"
}
}
\ No newline at end of file
{
"hash": "0ffc46ff1f3b1c2eea5b1afec154f1da",
"packages": [
],
"packages-dev": [
{
"name": "phpunit/php-code-coverage",
"version": "dev-master",
"source": {
"type": "git",
"url": "git://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "d5949c4a80e7aace9927a83b4fa88bbc915e5e4d"
},
"dist": {
"type": "zip",
"url": "https://github.com/sebastianbergmann/php-code-coverage/archive/d5949c4a80e7aace9927a83b4fa88bbc915e5e4d.zip",
"reference": "d5949c4a80e7aace9927a83b4fa88bbc915e5e4d",
"shasum": ""
},
"require": {
"php": ">=5.4.7",
"phpunit/php-file-iterator": ">=1.3.0",
"phpunit/php-token-stream": ">=1.1.3",
"phpunit/php-text-template": ">=1.1.1",
"sebastian/version": ">=1.0.0"
},
"suggest": {
"ext-dom": "*",
"ext-xdebug": ">=2.2.1"
},
"time": "1357555557",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.3.x-dev"
}
},
"installation-source": "source",
"autoload": {
"classmap": [
"PHP/"
]
},
"include-path": [
""
],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.de",
"role": "lead"
}
],
"description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
"homepage": "https://github.com/sebastianbergmann/php-code-coverage",
"keywords": [
"testing",
"coverage",
"xunit"
]
},
{
"name": "phpunit/php-file-iterator",
"version": "dev-master",
"source": {
"type": "git",
"url": "git://github.com/sebastianbergmann/php-file-iterator.git",
"reference": "2deb24c65ea78e126daa8d45b2089ddc29ec1d26"
},
"dist": {
"type": "zip",
"url": "https://github.com/sebastianbergmann/php-file-iterator/archive/2deb24c65ea78e126daa8d45b2089ddc29ec1d26.zip",
"reference": "2deb24c65ea78e126daa8d45b2089ddc29ec1d26",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"time": "1357555625",
"type": "library",
"installation-source": "source",
"autoload": {
"classmap": [
"File/"
]
},
"include-path": [
""
],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.de",
"role": "lead"
}
],
"description": "FilterIterator implementation that filters files based on a list of suffixes.",
"homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
"keywords": [
"filesystem",
"iterator"
]
},
{
"name": "phpunit/php-text-template",
"version": "dev-master",
"source": {
"type": "git",
"url": "git://github.com/sebastianbergmann/php-text-template.git",
"reference": "1eeef106193d2f8c539728e566bb4793071a9e18"
},
"dist": {
"type": "zip",
"url": "https://github.com/sebastianbergmann/php-text-template/archive/1eeef106193d2f8c539728e566bb4793071a9e18.zip",
"reference": "1eeef106193d2f8c539728e566bb4793071a9e18",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"time": "1357556177",
"type": "library",
"installation-source": "source",
"autoload": {
"classmap": [
"Text/"
]
},
"include-path": [
""
],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.de",
"role": "lead"
}
],
"description": "Simple template engine.",
"homepage": "https://github.com/sebastianbergmann/php-text-template/",
"keywords": [
"template"
]
},
{
"name": "phpunit/php-timer",
"version": "dev-master",
"source": {
"type": "git",
"url": "git://github.com/sebastianbergmann/php-timer.git",
"reference": "6d28a5483f2b824a5bcc39c3761eb2cb9a0dd0a0"
},
"dist": {
"type": "zip",
"url": "https://github.com/sebastianbergmann/php-timer/archive/6d28a5483f2b824a5bcc39c3761eb2cb9a0dd0a0.zip",
"reference": "6d28a5483f2b824a5bcc39c3761eb2cb9a0dd0a0",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"time": "1357555948",
"type": "library",
"installation-source": "source",
"autoload": {
"classmap": [
"PHP/"
]
},
"include-path": [
""
],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.de",
"role": "lead"
}
],
"description": "Utility class for timing",
"homepage": "https://github.com/sebastianbergmann/php-timer/",
"keywords": [
"timer"
]
},
{
"name": "phpunit/php-token-stream",
"version": "dev-master",
"source": {
"type": "git",
"url": "git://github.com/sebastianbergmann/php-token-stream.git",
"reference": "c25dd88e1592e66dee2553c99ef244203d5a1b98"
},
"dist": {
"type": "zip",
"url": "https://github.com/sebastianbergmann/php-token-stream/archive/c25dd88e1592e66dee2553c99ef244203d5a1b98.zip",
"reference": "c25dd88e1592e66dee2553c99ef244203d5a1b98",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
"php": ">=5.3.3"
},
"time": "1357556195",
"type": "library",
"installation-source": "source",
"autoload": {
"classmap": [
"PHP/"
]
},
"include-path": [
""
],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.de",
"role": "lead"
}
],
"description": "Wrapper around PHP's tokenizer extension.",
"homepage": "https://github.com/sebastianbergmann/php-token-stream/",
"keywords": [
"tokenizer"
]
},
{
"name": "phpunit/phpunit",
"version": "3.7.x-dev",
"source": {
"type": "git",
"url": "git://github.com/sebastianbergmann/phpunit.git",
"reference": "192ac5266639fc6a7d14dda688ebdeeee5f650b9"
},
"dist": {
"type": "zip",
"url": "https://github.com/sebastianbergmann/phpunit/archive/192ac5266639fc6a7d14dda688ebdeeee5f650b9.zip",
"reference": "192ac5266639fc6a7d14dda688ebdeeee5f650b9",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"ext-dom": "*",
"ext-pcre": "*",
"ext-reflection": "*",
"ext-spl": "*",
"phpunit/php-file-iterator": ">=1.3.1",
"phpunit/php-text-template": ">=1.1.1",
"phpunit/php-code-coverage": ">=1.2.1",
"phpunit/php-timer": ">=1.0.2",
"symfony/yaml": ">=2.1.0",
"phpunit/phpunit-mock-objects": ">=1.2.0,<1.3.0"
},
"suggest": {
"ext-json": "*",
"ext-simplexml": "*",
"ext-tokenizer": "*",
"phpunit/php-invoker": ">=1.1.0"
},
"time": "1357630462",
"bin": [
"composer/bin/phpunit"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.7.x-dev"
}
},
"installation-source": "source",
"autoload": {
"classmap": [
"PHPUnit/"
]
},
"include-path": [
"",
"../../symfony/yaml/"
],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "The PHP Unit Testing framework.",
"homepage": "http://www.phpunit.de/",
"keywords": [
"testing",
"phpunit",
"xunit"
]
},
{
"name": "phpunit/phpunit-mock-objects",
"version": "1.2.x-dev",
"source": {
"type": "git",
"url": "git://github.com/sebastianbergmann/phpunit-mock-objects.git",
"reference": "f02c89e84630f2dcc2d52ce83af4fd35682e60aa"
},
"dist": {
"type": "zip",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects/archive/f02c89e84630f2dcc2d52ce83af4fd35682e60aa.zip",
"reference": "f02c89e84630f2dcc2d52ce83af4fd35682e60aa",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"phpunit/php-text-template": ">=1.1.1@stable"
},
"suggest": {
"ext-soap": "*"
},
"time": "1357555258",
"type": "library",
"installation-source": "source",
"autoload": {
"classmap": [
"PHPUnit/"
]
},
"include-path": [
""
],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.de",
"role": "lead"
}
],
"description": "Mock Object library for PHPUnit",
"homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
"keywords": [
"mock",
"xunit"
]
},
{
"name": "sebastian/version",
"version": "dev-master",
"source": {
"type": "git",
"url": "git://github.com/sebastianbergmann/version.git",
"reference": "1.0.0"
},
"dist": {
"type": "zip",
"url": "https://github.com/sebastianbergmann/version/archive/1.0.0.zip",
"reference": "1.0.0",
"shasum": ""
},
"time": "1357396052",
"type": "library",
"installation-source": "source",
"autoload": {
"classmap": [
"src/"
]
},
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version"
},
{
"name": "symfony/yaml",
"version": "dev-master",
"target-dir": "Symfony/Component/Yaml",
"source": {
"type": "git",
"url": "https://github.com/symfony/Yaml",
"reference": "edec5d74dff258a3af1734c9870f3e7d7700e6a0"
},
"dist": {
"type": "zip",
"url": "https://github.com/symfony/Yaml/archive/edec5d74dff258a3af1734c9870f3e7d7700e6a0.zip",
"reference": "edec5d74dff258a3af1734c9870f3e7d7700e6a0",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"time": "1357408360",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.2-dev"
}
},
"installation-source": "source",
"autoload": {
"psr-0": {
"Symfony\\Component\\Yaml\\": ""
}
},
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
}
],
"description": "Symfony Yaml Component",
"homepage": "http://symfony.com"
}
],
"aliases": [
],
"minimum-stability": "dev",
"stability-flags": [
]
}
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by PHP Project Wizard (PPW) 1.0.4 on Tue Mar 22 10:10:56 CET 2011 -->
<phpunit bootstrap="tests/bootstrap.php"
<phpunit bootstrap="vendor/autoload.php"
backupGlobals="false"
backupStaticAttributes="false"
strict="true"
......
<?php
/**
* This file is part of the Money library
*
* Copyright (c) 2011 Mathias Verraes
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$autoloadFile = __DIR__.'/../vendor/autoload.php';
if (!is_file($autoloadFile)) {
throw new RuntimeException('Could not find autoloader. Did you run "composer install --dev"?');
}
$loader = require_once $autoloadFile;
$loader->add('Money\Tests', __DIR__);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment