Download the PHP package somnambulist/read-models-bundle without Composer

On this page you can find all versions of the php package somnambulist/read-models-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 read-models-bundle

Read-Models Bundle for Symfony

GitHub Actions Build Status Issues License PHP Version Current Version

Integrates read-models into Symfony via a bundle.

Installation

Install using composer, or checkout / pull the files from github.com.

An example config in config/packages/somnambulist.yaml could be:

There are 2 event subscribers that are auto-registered:

If messenger is not installed, the listener will be disabled automatically.

Connections

Each model type can have a custom connection by using the fully qualified class name as the key. When referencing the Doctrine connections, be sure to leave off the @ prefix if copying from elsewhere.

Note that if the default is not specified, then the currently configured Doctrine default will be auto-registered.

Adding Attribute Casters

Add attribute casters as services and tag them with: somnambulist.read_models.type_caster to have them automatically registered with the Managers attribute caster instance.

To use the attribute-model generic type casters, and them as services and configure as needed:

Or if you don't need configuration, or have your own; use a resource:

The attribute names should be the array key names that the values are expected to appear in from the data source. For example: if a Product model accesses a products table that has unit_value and unit_cur fields, this could be converted to a Money object by using the MoneyCaster:

Then the caster can be referenced in the casts as: 'price' => 'product_price' and the unit_value and unit_cur attributes will be removed in favour of the single "price" attribute that will be a Money value object. If the originals should be left in place, set $remove to false.

Additional casters can be added at any time; and existing casters may be overridden by re-using an existing type name however this is discouraged. Note that once a type is registered it cannot be removed.

Usage

See read-models for detailed docs on usage and attribute-models for more on the attribute caster.


All versions of read-models-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
somnambulist/read-models Version ^4.1
symfony/framework-bundle 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 somnambulist/read-models-bundle contains the following files

Loading the files please wait ...