Download the PHP package incoming/incoming without Composer

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

Incoming

Build Status Code Coverage Quality Score Latest Stable Version

Incoming is a PHP library designed to simplify and abstract the transformation of loose, complex input data into consistent, strongly-typed data structures.

Born out of inspiration from using Fractal, Incoming can be seen as a spiritual inversion. When working with data models of any kind (database, remote service, etc), it can be a huge pain to take raw input data and turn it into anything usable. Even worse is when something changes and you have to duplicate code or try and keep backwards compatibility. Incoming is here to make all this easier while enabling you to create more concern-separated, reusable, and testable code.

"Wait, what? Why not just use 'x' or 'y'?" Don't worry, I've got you covered.

Features

Still curious? Check out the examples.

Installation

  1. Get Composer
  2. Add "incoming/incoming" to your dependencies: composer require incoming/incoming
  3. Include the Composer autoloader <?php require 'vendor/autoload.php';

Examples

The easiest example to relate to in the PHP world? "Form" or HTTP request data:

Sure, that's a pretty contrived example. But what kind of power can we gain when we compose some pieces together?

Let's try and filter our input first.

Missing type hints? PHP's type-system's restrictions can be circumvented!:

Immutable objects or objects with required data in the constructor? No problem!

Wait, what? Why not just use "x" or "y"?

Still not sold on the idea even with the provided examples? You may be thinking...

Yea, sure, you could easily just build a model from a raw data array or just pass an array of attributes to a "fill" method and hope that everything goes well, but there's a few issues with doing that: What happens when you refactor a model or an underlying database table? Do you all of a sudden break backwards compatibility in an HTTP API's parameters just because your table might have changed? What about if you want to prevent certain parameters from being changed in a conditional manner? Do you just create a massive chunk of if statements in a factory method of the model itself?

The idea with using Incoming is to separate concerns, create reusable and composable units, and really enrich an application's ability to create complex entities while providing a convenient API that rids of some of PHP's "gotchas".

After all, "magical" solutions like mass attribute assignment have had their pitfalls before. ;)

License

Incoming is proud to be MIT licensed.


All versions of incoming with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.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 incoming/incoming contains the following files

Loading the files please wait ....