Download the PHP package teamgantt/dues without Composer

On this page you can find all versions of the php package teamgantt/dues. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dues

dues

Table of Contents

Goals

Dues is meant to provide a high level API for processing payments, particularly subscriptions.

It is designed to be processor agnostic, but currently only supports Braintree.

Installation

Dues isn't currently published to packagist. Until it is, it is recommended that dues be installed from the main branch using composer's vcs functionality.

Your composer.json should include the following:

See composer documentation for specifying a specific commit.

Usage

The high level API of dues is accessed by constructing a Dues instance with a gateway implementation.

All functionality supported by dues can be found on the Dues class.

Note: some of dues' public API is mixed in via a trait.

Events

Dues provides support for handling certain events via the the addListener method. This method expects an implementation of the EventListener interface.

A listener can be removed by calling removeEventListener with the same instance.

Events are useful for logging, analytics, and other integrations (such as dealing with taxes).

Development

Dues is developed against PHP version 8.1

A Dockerfile is provided for a consistent development environment.

The provided commands in bin/ assume a docker image named dues with a tag of dev. You can build this from the root of the repo:

It is recommended, though not necessary, to use direnv for development. If direnv is installed, the .envrc file will automatically be loaded when entering the project directory. This will allow developers to use the php and composer commands without having to install them locally. All composer commands will be run transparently through the docker container.

Executing from the docker container without direnv

You can use the scripts provided in bin/ directly

Testing

Dues aims for very high test coverage. Tests are written using PHPUnit.

The test suite is broken into unit tests and integration tests.

Individual mileage may vary when running integration tests locally, but the suite is designed to be run in a CI environment. CI tests run against a BrainTree sandbox environment configured by TeamGantt.

To run unit tests locally, run composer test:unit.

To run integration tests locally, run composer test:integration.

Integration and unit tests are not separated by any kind of file naming convention, but instead they are grouped together. An integration test should be annotated using a @group annotation.

Tests are organized by feature in the tests/Feature directory.

BrainTree tests

In order to ensure a consistent test environment, the Braintree tests are run against a sandbox environment. It is important that "duplicate transaction checking" is disabled. This will allow integrations to run tests with the same data multiple times without unexpected results.

Please see the Braintree documentation for more information on configuring duplicate transaction checking.

Conventions

Dues aims to be consistent in style and type correctness. Code conventions are enforced using PHP_CodeSniffer. The list of conventions can be found in the .php-cs-fixer.php file.

Static analysis is perfomed using phpstan. See phpstan.neon for configuration.

There are composer scripts provided for checking conventions and running static analysis.

Note: composer run fix will automatically fix any CodeSniffer issues that can be fixed automatically. This is not always possible, so it is recommended that composer run check be run before committing code.


All versions of dues with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
braintree/braintree_php Version ^6.7
spatie/enum Version ^3.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package teamgantt/dues contains the following files

Loading the files please wait ....