Skip to content

Log creation fails when no project Transaction lib exists #4

@davidvandemaele

Description

@davidvandemaele

When you create a transaction class that extends directly of the transaction package, log creation fails because it expects a project Transaction object as first parameter.
Creating an abstract Transaction lib bypasses the issue, but is useless.

PHP Fatal error: Uncaught TypeError: Argument 1 passed to Skeleton\Transaction\Log::create() must be an instance of Transaction, instance of Transaction_Test given, called in tigron/skeleton-transaction/lib/Skeleton/Transaction/Transaction.php on line 232 and defined in tigron/skeleton-transaction/lib/Skeleton/Transaction/Log.php:91

Stack trace:
\0 tigron/skeleton-transaction/lib/Skeleton/Transaction/Transaction.php(232): Skeleton\Transaction\Log::create()
\1 tigron/skeleton-transaction/lib/Skeleton/Transaction/Runner.php(44): Skeleton\Transaction\Transaction->mark_completed()
\2 tigron/skeleton-transaction/console/run.php(46): Skeleton\Transaction\Runner::run_transaction()
\3 symfony/console/Command/Command.php(298): Skeleton\Console\Command\Transa in tigron/skeleton-transaction/lib/Skeleton/Transaction/Log.php on line 91

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions