ekmungai / eloquent-ifrs

Eloquent Double Entry Accounting with a focus on IFRS Compliant Reporting
MIT License
334 stars 68 forks source link

Support for php 7.4 and php 8.0 #84

Closed inmanturbo closed 3 years ago

inmanturbo commented 3 years ago

@ekmungai

I've updated the dev dependencies to include laravel/legacy-factories for testing on laravel 8, and nunomaduro/larastan to the most recent release: https://github.com/nunomaduro/larastan/releases/tag/v0.7.12

doctrine/dbal seems to be working fine ever since this patch

Tested and working with all versions. 7.4 and 8.0 output below:

eloquent-ifrs git:(master) ./vendor/bin/phpunit
PHPUnit 9.4.3 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.4.21
Configuration: /home/inman/eloquent-ifrs/phpunit.xml

...............................................................  63 / 193 ( 32%)
............................................................... 126 / 193 ( 65%)
............................................................... 189 / 193 ( 97%)
.
Ward, Lynch and Okuneva
Balance Sheet
For the Period: Jan 01 2021 to Dec 31 2021

Assets
    Non Current Asset        100
    Inventory        100
    Bank        232
                        ---------------
Total Assets                432

Liabilities
    Control        16
    Current Liability        100
    Payable        116
                        ---------------
Total Liabilities                232

Reconciliation
    Reconciliation        -70
                        ---------------
Total Reconciliation                -70
                        ---------------
Net Assets                130
                        ===============

Equity
    Equity        -70
    Net Profit        200
                        ---------------
Total Equity                130
                        ===============
.
Bode Group
Cash Flow Statement
For the Period: Jul 04 2021 to Aug 05 2021

Operations Cash Flow
    Net Profit        700
    Provisions        50
    Receivables        -530
    Payables        298
    Taxation        112
    Current Assets        -100
    Current Liabilities        100
                        ---------------
Total Operations Cash Flow    630

Investment Cash Flow
    Non Current Assets        -150
                        ---------------
Total Investment Cash Flow    -150

Financing Cash Flow
    Non Current Liabilities        100
    Equity        100
                        ---------------
Total Financing Cash Flow    200

Net Cash Flow
    Beginning Cash balance        100
    Net Cash Flow        680
                        ---------------
Ending Cash balance    780
                        ===============

                        ---------------
Cashbook balance    780
                        ===============
.
Lockman, Pfeffer and Mayert
Income Statement
For the Period: Jan 01 2021 to Dec 31 2021

Operating Revenues
    Operating Revenue        245

Operating Expenses
    Operating Expense        100
                        ---------------
Gross Profit                145

Non Operating Revenues
    Non Operating Revenue        205
                        ---------------
Total Revenue                350

Non Operating Expenses
    Direct Expense        70
    Overhead Expense        70
    Other Expense        20
                        ---------------
Total Non Operating Expenses    160
                        ---------------
Net Profit                190
                        ===============
.                                                            193 / 193 (100%)

Time: 00:37.001, Memory: 54.00 MB

OK (193 tests, 1062 assertions)
eloquent-ifrs git:(master) sudo update-alternatives --config php
There are 3 choices for the alternative php (providing /usr/bin/php).

  Selection    Path                  Priority   Status
------------------------------------------------------------
  0            /usr/bin/php.default   100       auto mode
  1            /usr/bin/php.default   100       manual mode
* 2            /usr/bin/php7.4        74        manual mode
  3            /usr/bin/php8.0        80        manual mode

Press <enter> to keep the current choice[*], or type selection number: 3
update-alternatives: using /usr/bin/php8.0 to provide /usr/bin/php (php) in manual mode
eloquent-ifrs git:(master) ./vendor/bin/phpunit
PHPUnit 9.4.3 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.0.8
Configuration: /home/inman/eloquent-ifrs/phpunit.xml

...............................................................  63 / 193 ( 32%)
............................................................... 126 / 193 ( 65%)
............................................................... 189 / 193 ( 97%)
.
Koelpin-Douglas
Balance Sheet
For the Period: Jan 01 2021 to Dec 31 2021

Assets
    Non Current Asset        100
    Inventory        100
    Bank        232
                        ---------------
Total Assets                432

Liabilities
    Control        16
    Current Liability        100
    Payable        116
                        ---------------
Total Liabilities                232

Reconciliation
    Reconciliation        -70
                        ---------------
Total Reconciliation                -70
                        ---------------
Net Assets                130
                        ===============

Equity
    Equity        -70
    Net Profit        200
                        ---------------
Total Equity                130
                        ===============
.
Harber PLC
Cash Flow Statement
For the Period: Jul 04 2021 to Aug 05 2021

Operations Cash Flow
    Net Profit        700
    Provisions        50
    Receivables        -530
    Payables        298
    Taxation        112
    Current Assets        -100
    Current Liabilities        100
                        ---------------
Total Operations Cash Flow    630

Investment Cash Flow
    Non Current Assets        -150
                        ---------------
Total Investment Cash Flow    -150

Financing Cash Flow
    Non Current Liabilities        100
    Equity        100
                        ---------------
Total Financing Cash Flow    200

Net Cash Flow
    Beginning Cash balance        100
    Net Cash Flow        680
                        ---------------
Ending Cash balance    780
                        ===============

                        ---------------
Cashbook balance    780
                        ===============
.
Nitzsche, Homenick and Hessel
Income Statement
For the Period: Jan 01 2021 to Dec 31 2021

Operating Revenues
    Operating Revenue        245

Operating Expenses
    Operating Expense        100
                        ---------------
Gross Profit                145

Non Operating Revenues
    Non Operating Revenue        205
                        ---------------
Total Revenue                350

Non Operating Expenses
    Direct Expense        70
    Overhead Expense        70
    Other Expense        20
                        ---------------
Total Non Operating Expenses    160
                        ---------------
Net Profit                190
                        ===============
.                                                            193 / 193 (100%)

Time: 00:36.749, Memory: 54.00 MB

OK (193 tests, 1062 assertions)

This closes #75

ekmungai commented 3 years ago

Hey @inmanturbo,

You're absolutely right. I was getting the error because I was using composer update instead of composer install