Download the PHP package youmad/endurance-activity-postgresql without Composer

On this page you can find all versions of the php package youmad/endurance-activity-postgresql. 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 endurance-activity-postgresql

Endurance Activity PostgreSQL

Doctrine DBAL adapters and migrations for Endurance Activity storage. Supports aggregate persistence, staged streaming imports and activity, lap and track reads. Tested with PostgreSQL 18.

Installation

Requires PHP ^8.5 and ext-pdo_pgsql.

Database setup

Register and execute the migrations in migrations/ through your application's Doctrine Migrations configuration.

For Symfony with DoctrineMigrationsBundle:

The schema stores the Activity aggregate, import lifecycle and generations, with generation-owned observations, laps, sessions, details and devices. Read imported child data through the active_activity_import_* views, which expose only the activated generation.

Aggregate persistence

$connection is a Doctrine DBAL connection and $activity is an Activity aggregate. Repository saves use optimistic locking. Discard an aggregate involved in a rolled-back transaction and reload it before retrying.

Streaming imports

Use the same DoctrineDbalActivityTransaction for the aggregate repository and DoctrineDbalActivityImportGenerationRepository. Create an ActivityImportGenerationCoordinator with the generation repository and that transaction. Pass the coordinator and aggregate repository to ImportActivityStream.

Create a DoctrineDbalStagedWriteExecutor from that transaction and use it for the staged writers under Import. Observation and device-status batch writers can be wrapped by the Activity package's batching adapters. Configure the item handlers and ImportActivityStream in the consuming application.

Staging batches commit independently and must run outside an outer transaction. Activation persists the aggregate and exposes the completed generation in one transaction. Failed generations stay invisible and are retained until retry or cleanup; the application defines their retention policy.

Import processing claims, heartbeats and source-file cleanup claims are also provided. Completion, failure and release require the claim that owns the current processing attempt.

Reading activities

Adapters under Read implement the Activity read ports. Track pages preserve all scalar readings, units, origins and sources in payload order. Convenience fields such as heartRate are null when a measurement type is ambiguous. Source-specific measurement metadata remains stored in the JSON payload and is not exposed by the scalar track projection.

Development

From a source checkout:

By default, integration tests use Docker to start a disposable PostgreSQL 18 database. To use a dedicated existing test database, set ENDURANCE_ACTIVITY_POSTGRESQL_TEST_DATABASE_MODE=external and ENDURANCE_ACTIVITY_POSTGRESQL_TEST_DATABASE_HOST. Optional connection settings use the same prefix: PORT, NAME, USER, PASSWORD and PASSWORD_FILE; see bin/test-integration for defaults. The runner applies migrations, and the suite truncates application tables between tests.

License

MPL-2.0.


All versions of endurance-activity-postgresql with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
ext-pdo_pgsql Version *
doctrine/dbal Version ^4.4
youmad/endurance-activity Version ^0.1.2
youmad/endurance-foundation Version ^0.1.1
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 youmad/endurance-activity-postgresql contains the following files

Loading the files please wait ...