Download the PHP package webravolab/layers without Composer
On this page you can find all versions of the php package webravolab/layers. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package layers
WebravoLab Layers
Laravel hexagonal architecture - Domain Driven Design abstraction layers
Includes:
- Generic queue handler using either RabbitMQ or Database
- Command bus (using generic queue handler)
- Generic Command to be extended from your commands
- Command bus dispatcher and remote command dispatcher
- Event sink (using generic queue handler)
- Generic Event to be extended from your events
- Event bus dispatcher and remote event dispatcher
- StackDriver logging (extending Monolog)
- Null logger (for testing)
- Eloquent persistence layer
- Generic configuration helper with override through database settings table
- Cdn image service (using webravolab/cdn package)
- File system service
- Abstract entity to be extended by your entities
- Abstract Value Objects and some simple implementations (url, guid, filename)
Installation
To perform tests omit the to install the development dependencies.
The package is compatible with Laravel >= 5, not using (at the moment) any real version dependency.
Configuration
RabbitMQ Queue Handler
To use RabbitMQService you must have a running RabbitMQ server and copy the following file:
copy to laravel /config directory and customize configuration to access your RabbitMQ instance.
Database Queue Handler
DBQueueService is a DB based 100% replacement of RabbitMQ. It needs 3 tables to work:
You can find the Laravel migrations to build these tables under . Just replace the DB connection from testbench to whatever is your database name.
Testing
PhpUnit test suite is available. It creates a memory based SqLite database instance to create the required tables and perform tests. It uses the package to simulate a full Laravel environment.
To test CdnService with Google Cloud Storage you must copy your service account json file to /tests folder (google-credentials.json).
Usage
To understand the generic Queue Handler behaviour plese refer to the included tests for usage examples.
To understand the queue strategies please refer to RabbitMQ documentation.
Notes
Stackdriver logging implementations require google/cloud-logging library and its dependencies.
It also needs a service account json key loaded in the project root directory. Refer to Google Cloud authentication docs for the details.
Config helper
Webravo\Infrastructure\Library\Configuration is a helper to access environment and config variables in a standard way, allowing variables override through a database table called settings.
You can find the Laravel migration to build the setting table under .
To enable settings override you must set the environment variable SETTINGS_DB_CONNECTION with the name of your DB connection where the settings table is located.
All versions of layers with dependencies
webravolab/cdn Version dev-master
webpatser/laravel-uuid Version ^3.0
psr/log Version 1.1
google/apiclient Version ^2.2
google/cloud-logging Version ^1.14
php-amqplib/php-amqplib Version >=2.6.1
google/cloud-datastore Version dev-master