Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: CakeDC/money
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.0.1
Choose a base ref
...
head repository: CakeDC/money
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.next-cake4
Choose a head ref
  • 20 commits
  • 24 files changed
  • 6 contributors

Commits on Jun 18, 2021

  1. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    johanlundberg Johan Lundberg
    Copy the full SHA
    73c7af9 View commit details

Commits on Jun 25, 2021

  1. test set

    arodu committed Jun 25, 2021
    Copy the full SHA
    030e331 View commit details

Commits on Jul 1, 2021

  1. money test suit, minor fixs

    arodu committed Jul 1, 2021
    Copy the full SHA
    c9f0329 View commit details

Commits on Jul 2, 2021

  1. add MoneyWidgetTest

    arodu committed Jul 2, 2021
    Copy the full SHA
    4da8611 View commit details
  2. update test set

    arodu committed Jul 2, 2021
    Copy the full SHA
    8506c22 View commit details

Commits on Feb 8, 2024

  1. fix: fix deprecations on phpunit

    arodu committed Feb 8, 2024
    Copy the full SHA
    e78198a View commit details
  2. update readme

    arodu committed Feb 8, 2024
    Copy the full SHA
    d8b17a0 View commit details
  3. feat: update php versions on gh actions

    arodu committed Feb 8, 2024
    Copy the full SHA
    c7fe0af View commit details
  4. update gb actions

    arodu committed Feb 8, 2024
    Copy the full SHA
    3e22b3c View commit details
  5. Merge pull request #1 from arodu/feature/tests

    Feature/tests
    ajibarra authored Feb 8, 2024
    Copy the full SHA
    00d01d2 View commit details

Commits on Feb 22, 2024

  1. fixed issue where __call method sometimes returned an \money\money ob…

    …ject
    AReveron committed Feb 22, 2024
    Copy the full SHA
    9ce4baf View commit details
  2. Merge pull request #3 from AReveron/feature/fix-call-method

    fixed issue where __call method sometimes returned an \money\money ob…
    steinkel authored Feb 22, 2024
    Copy the full SHA
    0fcee67 View commit details

Commits on Feb 23, 2024

  1. update changelog description

    AReveron committed Feb 23, 2024
    Copy the full SHA
    abb1a11 View commit details

Commits on Feb 29, 2024

  1. improved code completion for class \CakeDC\Money\Money

    arusinowski committed Feb 29, 2024
    Copy the full SHA
    e0d8680 View commit details

Commits on Mar 1, 2024

  1. Merge pull request #5 from CakeDC/feature/add-phpdocs

    ajibarra authored Mar 1, 2024
    Copy the full SHA
    6c415bf View commit details
  2. Copy the full SHA
    0ff1968 View commit details
  3. cc

    arusinowski committed Mar 1, 2024
    Copy the full SHA
    70d4bf7 View commit details
  4. Merge pull request #6 from CakeDC/feature/add-phpdocs

    Feature/add phpdocs
    ajibarra authored Mar 1, 2024
    Copy the full SHA
    6c239c4 View commit details

Commits on Oct 1, 2024

  1. improved code completion for class \CakeDC\Money\Money

    arusinowski committed Oct 1, 2024
    Copy the full SHA
    8b398ce View commit details

Commits on Oct 2, 2024

  1. Merge pull request #9 from CakeDC/feature/add-phpdocs2

    improved code completion for class \CakeDC\Money\Money
    arusinowski authored Oct 2, 2024
    Copy the full SHA
    3d1fa84 View commit details
26 changes: 26 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
; This file is for unifying the coding style for different editors and IDEs.
; More information at http://editorconfig.org

root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.bat]
end_of_line = crlf

[*.yml]
indent_size = 2

[*.xml]
indent_size = 2

[Makefile]
indent_style = tab

[*.neon]
indent_style = tab
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -7,11 +7,11 @@ on:

jobs:
testsuite:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
php-version: ['7.2', '7.3', '7.4', '8.0']
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3']
db-type: [sqlite, mysql, pgsql]
prefer-lowest: ['']

@@ -66,7 +66,7 @@ jobs:
if [[ ${{ matrix.db-type }} == 'mysql' ]]; then export DB_URL='mysql://root:root@127.0.0.1/cakephp'; fi
if [[ ${{ matrix.db-type }} == 'pgsql' ]]; then export DB_URL='postgres://postgres:postgres@127.0.0.1/postgres'; fi
if [[ ${{ matrix.php-version }} == '7.4' ]]; then
export CODECOVERAGE=1 && vendor/bin/phpunit --verbose --coverage-clover=coverage.xml
export CODECOVERAGE=1 && vendor/bin/phpunit --coverage-clover=coverage.xml
else
vendor/bin/phpunit
fi
@@ -77,7 +77,7 @@ jobs:

cs-stan:
name: Coding Standard & Static Analysis
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -6,3 +6,6 @@
/config/Migrations/schema-dump-default.lock
/vendor/
/.idea/
/.phpunit.cache
/.ddev/
/tools/
5 changes: 5 additions & 0 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="phpstan" version="1.10.32" installed="1.10.32" location="./tools/phpstan" copy="false"/>
<phar name="psalm" version="5.15.0" installed="5.15.0" location="./tools/psalm" copy="false"/>
</phive>
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.0.1] - 2024-02-23

### Fixed
- Fixed issue where `__call()` method sometimes returned an object with class `\Money\Money` instead of `\CakeDC\Money\Money`.

## [0.0.1] - 2021-06-18

* Initial version
* Initial version
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CakePHP Money Plugin
===================
# CakePHP Money Plugin

<p>
<a href="LICENSE" target="_blank">
<img alt="Software License" src="https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square">
@@ -22,45 +22,45 @@ It covers the following features:
* Store Money objects onto database (as strings)
* Marshal money objects into CakePHP entities.

Requirements
------------
## Requirements

* CakePHP 4.0.0+
* PHP 7.2+

Versions and branches
---------------------
## Versions and branches

| CakePHP | CakeDC Money Plugin | Notes |
| :-------------: | :------------------------: | :---- |
| ^4.5 | [1.x](https://github.com/cakedc/money/tree/1.next-cake4) | stable |
| ^4.0 | [0.0.1](https://github.com/cakedc/money/tree/0.0.1) | deprecated |

## Installation

| CakePHP | CakeDC Money Plugin | Tag | Notes |
| :-------------: | :------------------------: | :--: | :---- |
| ^4.0 | [0.1](https://github.com/cakedc/money/tree/1.next-cake4) | 0.0.1 | stable |
You can install this plugin into your CakePHP application using [composer](http://getcomposer.org).

The recommended way to install composer packages is:

Documentation
-------------
```
composer require cakedc/cakephp-money
```

## Documentation

For documentation, as well as tutorials, see the [Docs](Docs/Home.md) directory of this repository.

Support
-------
## Support

For bugs and feature requests, please use the [issues](https://github.com/CakeDC/money/issues) section of this repository.

Commercial support is also available, [contact us](https://www.cakedc.com/contact) for more information.

Contributing
------------
## Contributing

This repository follows the [CakeDC Plugin Standard](https://www.cakedc.com/plugin-standard).
If you'd like to contribute new features, enhancements or bug fixes to the plugin, please read our [Contribution Guidelines](https://www.cakedc.com/contribution-guidelines) for detailed instructions.

License
-------
## License

Copyright 2021 Cake Development Corporation (CakeDC). All rights reserved.

Licensed under the [MIT](http://www.opensource.org/licenses/mit-license.php) License. Redistributions of the source code included in this repository must retain the copyright notice found in each file.

## To Do

* Add Unit Tests
33 changes: 21 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
@@ -9,7 +9,9 @@
"moneyphp/money": "^3.3"
},
"require-dev": {
"phpunit/phpunit": "^8.5 || ^9.3"
"phpunit/phpunit": "^8.5 || ^9.3",
"cakephp/cakephp-codesniffer": "^4.5",
"ext-pdo": "*"
},
"autoload": {
"psr-4": {
@@ -24,19 +26,26 @@
},
"scripts": {
"check": [
"@test",
"@cs-check"
"@cs-check",
"@test"
],
"analyse": [
"@stan",
"cs-check": "phpcs --colors --parallel=16 -p src/ tests/",
"cs-fix": "phpcbf --colors --parallel=16 -p src/ tests/",
"phpstan": "tools/phpstan analyse",
"psalm": "tools/psalm --show-info=false",
"stan": [
"@phpstan",
"@psalm"
],
"cs-check": "phpcs -n -p --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests",
"cs-fix": "phpcbf --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests",
"test": "phpunit --stderr",
"stan": "phpstan analyse src/",
"psalm": "php vendor/psalm/phar/psalm.phar --show-info=false src/ ",
"stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:0.12.88 psalm/phar:~4.7.0 && mv composer.backup composer.json",
"coverage-test": "phpunit --stderr --coverage-clover=clover.xml"
"phpstan-tests": "tools/phpstan analyze -c tests/phpstan.neon",
"phpstan-baseline": "tools/phpstan --generate-baseline",
"psalm-baseline": "tools/psalm --set-baseline=psalm-baseline.xml",
"stan-setup": "phive install",
"test": "phpunit"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": false
}
}
}
6 changes: 6 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<ruleset name="CakeDC/Money">
<config name="installed_paths" value="../../cakephp/cakephp-codesniffer" />

<rule ref="CakePHP" />
</ruleset>
2 changes: 2 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
parameters:
ignoreErrors:
10 changes: 10 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
includes:
- phpstan-baseline.neon
parameters:
level: 8
checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false
bootstrapFiles:
- tests/bootstrap.php
paths:
- src/
53 changes: 20 additions & 33 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,35 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
colors="true"
processIsolation="false"
stopOnFailure="false"
bootstrap="tests/bootstrap.php"
>
<php>
<ini name="memory_limit" value="-1"/>
<ini name="apc.enable_cli" value="1"/>
</php>

<!-- Add any additional test suites you want to run here -->
<testsuites>
<testsuite name="CakeDC/Money">
<directory>tests/TestCase/</directory>
</testsuite>
</testsuites>

<!-- Setup a listener for fixtures -->
<listeners>
<listener class="Cake\TestSuite\Fixture\FixtureInjector">
<arguments>
<object class="Cake\TestSuite\Fixture\FixtureManager"/>
</arguments>
</listener>
</listeners>

<filter>
<whitelist>
<directory suffix=".php">src/</directory>
</whitelist>
</filter>

<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" processIsolation="false" stopOnFailure="false" bootstrap="tests/bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage>
<include>
<directory suffix=".php">src/</directory>
</include>
</coverage>
<php>
<ini name="memory_limit" value="-1"/>
<ini name="apc.enable_cli" value="1"/>
</php>
<!-- Add any additional test suites you want to run here -->
<testsuites>
<testsuite name="CakeDC/Money">
<directory>tests/TestCase/</directory>
</testsuite>
</testsuites>
<!-- Setup a listener for fixtures -->
<extensions>
<extension class="\Cake\TestSuite\Fixture\PHPUnitExtension"/>
</extensions>
</phpunit>
Loading