Download the PHP package phillarmonic/syncopate-bundle without Composer

On this page you can find all versions of the php package phillarmonic/syncopate-bundle. 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 syncopate-bundle

SyncopateBundle

A Symfony bundle for integrating with SyncopateDB, a flexible, lightweight data store with advanced query capabilities.

Compatibility between the bundle and SyncopateDB

Syncopate Bundle Versions SyncopateDB Server Versions State
1.x 0.x Active development
2.x (planned) 1.x (planned) Planned future version

Installation

Step 1: Install the Bundle

Step 2: Enable the Bundle

If you're using Symfony Flex, the bundle will be enabled automatically. Otherwise, add it to your config/bundles.php:

Step 3: Configure the Bundle

Create a configuration file at config/packages/phillarmonic_syncopate.yaml:

Usage

Defining Entities

Define your entities using PHP 8 attributes:

Entity Serialization with EntityTrait

The EntityTrait provides convenient methods to convert your entities to arrays with fine-grained control:

The toArray() method has three optional parameters:

This is particularly useful for API responses, where you might need to transform your internal data model to match external API conventions.

Entity Relationships

SyncopateBundle supports entity relationships with cascade operations:

Supported relationship types:

Cascade options:

Custom Repositories

SyncopateBundle supports entity-specific repositories that allow you to define custom query methods for each entity:

1. Create a Custom Repository Class

2. Specify the Repository Class in Your Entity

3. Use Your Custom Repository Methods

Repository Pattern

Use the repository pattern to interact with your entities:

Using the Query Builder

For more complex queries, use the query builder:

Optimized Count Operations

SyncopateBundle supports efficient count operations that leverage SyncopateDB's dedicated count API, which returns only the count without retrieving all data:

Count with Join Queries

The count API also supports join operations, allowing you to count entities based on related data:

When to use optimized count

The optimized count API is particularly useful for:

  1. Pagination: Calculate total pages without retrieving all entities
  2. Performance monitoring: Check the size of result sets before executing expensive queries
  3. UI elements: Display count badges or indicators with minimal database overhead
  4. Large datasets: Get counts from tables with millions of records efficiently
  5. Complex joins: Determine relationship counts without materializing all related entities

This approach significantly reduces memory usage and network traffic compared to retrieving all entities and counting them in PHP.

Join Queries

Use join queries to fetch related entities in a single request:

Direct Service Usage

You can also inject and use the SyncopateService directly:

Error Handling

SyncopateBundle provides comprehensive error handling with specific exception types and detailed error information from SyncopateDB.

Exception Types

The bundle includes specialized exception classes for different error scenarios:

  1. SyncopateApiException - Base exception for all SyncopateDB API errors
  2. SyncopateValidationException - Thrown when entity validation fails
  3. SyncopateIntegrityConstraintException - Thrown when unique constraints are violated

Error Categories

SyncopateDB errors are organized into categories, each with specific error codes:

Handling Specific Errors

Common Error Scenarios

Entity Not Found (SY200)

Unique Constraint Violation (SY209)

Validation Errors (SY203, SY206, SY207, SY208)

Command Line Tools

The bundle provides console commands for managing entities:

Debug Tools

The bundle includes the DebugHelper class for troubleshooting common issues:

License

This bundle is available under the MIT License.


All versions of syncopate-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
symfony/cache Version ^6.4|^7.0
symfony/config Version ^6.4|^7.0
symfony/console Version ^6.4|^7.0
symfony/dependency-injection Version ^6.4|^7.0
symfony/finder Version ^6.4|^7.0
symfony/framework-bundle Version ^6.4|^7.0
symfony/http-client Version ^6.4|^7.0
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 phillarmonic/syncopate-bundle contains the following files

Loading the files please wait ...