Download the PHP package lezhnev74/ddd-generator without Composer

On this page you can find all versions of the php package lezhnev74/ddd-generator. 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 ddd-generator

GitHub license Build Status Scrutinizer Code Quality Code Coverage

DDD Classes Generator for 3-layered Application

When you develop clean and decoupled app you have to deal with many interfaces and objects. Where you had one object in RAPID development flow, you have plenty of objects in DDD flow. To speed things up I use this tool to generate primitives related to ServiceBus pattern, CQRS pattern and Clean Architecture. If you interested - I blogged about ideas behind this generator.

Note: I use PSR-4 so any folder inheritance leads to namespace inheritance (and vice versa). And also type of slashes is irrelevant - \ and / will do the same.

Note: This tool is designed to be extensible. So while it contains packs to generate widely used primitives like commands, there can be easily added packs to generate http controllers (+tests) and views and anything else.

Note: No Windows support in mind.

In a nutshell

This is a handy tool to generate empty class files + test files from templates and put them in predictable places.

What it can generate

Each class is complimented with empty test so I can keep TDD-ing.

Installation

Via composer:

Usage

Command arguments:

More usage examples:

Config

You can set folders where new files will go to. You can configure each primitive - set its alias and set stubs to generate new files from.

Templates

Each primitive can have multiple templates (stubs). F.e. command has command and handler templates, query has request, response and handler templates. Event will only have event template and test. So configuration explicitly declares which files to generate and in which folder.

Template support few placeholders which reflects user input:

This how stub for a test file can look like inside:

How it works

Take for example the config file shown above and let's explain this command: bin/dddtool generate domain command Account\Commands\SignUp

The script will do this:

TODO


All versions of ddd-generator with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
beberlei/assert Version ^2.7||^3.0
symfony/console Version ^3.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 lezhnev74/ddd-generator contains the following files

Loading the files please wait ....