Download the PHP package imediafrance/ammit without Composer

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

Ammit

[PHP7]() [DDD]() [v1.0.0 beta]() [v2.0.0 never]() SemVer Build Status Code Quality Code Coverage Dependency Status

A light, stable and framework agnostic Command resolver library

Currently being Battle Tested (not yet 1.0.0 tagged)

  1. What the lib does
  2. How to use it ?
  3. What the lib does not ?
  4. Why ?
  5. How does it work ?
  6. Pragmatic ?
  7. Want to contribute ?
  8. Ammit ?

A Command is a simple well named DTO reflecting user intention.

Consequently it shall be immutable.

What the lib does ?


How to use it ?

composer require ammit-php/ammit

Example:

Implement a RegisterUserCommandResolver which will map a PSR-7 ServerRequestInterface into a RegisterUserCommand. Before creating RegisterUserCommand it will perform a UI validation.

RegisterUserController.php

RegisterUserCommandResolver.php

Use it with Symfony: http://symfony.com/doc/current/request/psr7.html

Use it with Laravel: TBA

Public API

Pure extending AbstractPureCommandResolver
Raw $_GET $_POST
$this->rawValueValidator $this->queryStringValueValidator $this->attributeValueValidator
Boolean ->mustBeBoolean(...)
String ->mustBeString(...)
Integer ->mustBeInteger(...)
Float ->mustBeFloat(...)
Array ->mustBeArray(...)
Date ->mustBeDate(...)
DateTime ->mustBeDateTime(...)
Pragmatic extending AbstractPragmaticCommandResolver
Raw $_GET $_POST
$this->rawValueValidator $this->queryStringValueValidator $this->attributeValueValidator
Same as AbstractPureCommandResolver
UUID ->mustBeUuid(...)
Length ->mustHaveLengthBetween(...)
Email ->mustBeEmailAddress(...)
Regex ->mustBeValidAgainstRegex(...)

What the lib does not ?

Why ?

We were using Symfony Form Component to map and validate HTTP Requests to our Commands.

But it was way too complex and hacky. And too tempting to put our Domain validation into FormType. Then to "forget" to put it back into our Domain.

Furthermore we wanted to anticipate Immutable class.

How does it work ?

It is using \Closure internally in order to be able to catch all \Exception. Otherwise it would display only 1 validation issue. And we want to see all validation issues at once like with Forms.

Pragmatic ?

You may have needs to put some Domain validation in your UI. Sometimes we need to do some Rapid Application Development when prototyping. And to take shortcuts knowing we will have to pay back our technical debt in a near future.

With Ammit you would use our AbstractPragmaticCommandhenResolver (Pragmatic) instead of our AbstractPureCommandResolver (Pure) helper. It will allow you to use more complex validation like uuid validation for example:

A validation is missing. You can still inject your own.

Want to contribute ?

Read UBIQUITOUS_LANGUAGE_DICTIONARY.md

Init docker container: docker-compose up -d

Composer install: docker-compose run --rm composer install

Use container: docker/bin/php -v (first do chmod +x docker/bin/php)

Add Unit Test then: docker/bin/php bin/atoum

Ammit ?

Ammit, an ancient egyptian goddess involved in heart weighting. She was devouring souls of human judged to be not pure enough to continue their voyage towards Osiris and immortality.


All versions of ammit with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
psr/http-message Version ^1.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 imediafrance/ammit contains the following files

Loading the files please wait ....