Download the PHP package frontastic/common without Composer

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

Common Libraries

Copyright (C) Frontastic GmbH - All Rights Reserved

These is a library which contains common domain concepts and functionality for Frontastic.

Documentation about Frontastic can be found at https://docs.frontastic.cloud/ while the API Documentation can be found inside this repository.

API Design Concepts

TL;DR

Domain Model

One of the core concepts we believe in in API Design is Injectables vs Newables as described in the Qafoo blog. This is why we have objects modelling the data which usually have no methods at all and objects which implement the service interactions. We call them Data Objects (Newables) and Services (Injectables) in this document.

Data Objects

The Domain Objects model the Data Structures. The only methods which are allowed on Data Objects are methods which nobody would ever implement in a different way. Since the APIs are the base for many different customer projects those methods basically will not exist. A popular example are mail validations in Domain Objects, while the mail validation regular expressions already differ you could even think of using external services to validate the validity of a mail address, which then obviously should not happen in Data Objects.

Our Data Objects are modeled as classes with public properties extending a base DataObject ensuring PHP throws exceptions when accessing non existent properties. We do this to simplify creation and usage – we do not consider getters and setters a must even you could implement additional type checks there. In the near future PHP might even add support for typed properties which would even solve this problem.

While we generally consider immutability of Data Objects a plus, and we should usually not modify them ourselves, our Data Objects are mutable by intention. This enables modification by customers: For examples we allow customers to map out additional properties and allow them to define, for example, additional attributes inside a variant (see Decorators).

For those customers who are allowed to modify PHP code we allow them to extend the existing Data Objects to create objects with additional properties. So no class should be final.

All parameters and return values of methods (except for constructors) should be Data Objects, while we seldomly use scalar values, while this is discouraged. Services must not be parameters (except for the constructor or setter injection) nor return values.

Services

Services implement the actual functionality, like implementing our API interfaces for a certain endpoint. Services are always created by our factories (by configuration) or by the Symfony Dependency Injection Container. Services can also be overwritten by customers, but this should be the last resort to implement a certain functionality. We want to provide sensible extension points (like the decorators) to implement all functionailty.

Beside the general implementation for the API (like ProductApi\Commercetools) there may be any number of helper services (like the mapper, the client, …).

Code Structure

There are mainly two types of bundles:

Besides that there are some additional bundles and infrastructure code like the generic Http-Client-Implementation which allows us to implement, monitor and configure HTTP requests in a generic way.

Decorators

The decorator structure is implemented in Catwalk but still is relevant to these APIs: We allow people to hook into every API call using before* and after* decorators for all API methods. This allows people to modify queries to the API and also the return values of the API. This is the main extension point for all APIs. On top of this there might be API specific configuration handled by the API factory.

Dangerous-Inner-*

Many Domain Objects have a dangerousInner* property (for example dangerousInnerProduct) which is a direct reference to the unmodified return value from the respective API. This allows users of our APIs to access additional data which our own mappers do not map out to our own Domain Objects.

We understand that we do not cover all potential use cases of the mapped APIs and this allows people to access the original data inside their decorators. The dengerousInner* properties are usually stripped out by the Backend For Frontend, though, to not leak confidential data and to reduce data size. Also many API SDKs which might be used by certain implementations use "Domain Objects" which are not possible to serialize sensibly.


All versions of common with dependencies

PHP Build Version
Package Version
Requires ext-json Version *
ackintosh/ganesha Version ^1.2
algolia/algoliasearch-client-php Version ^3.0
beberlei/assert Version ^3.2
behat/transliterator Version ^1.3
cache/filesystem-adapter Version ^1.0
cloudinary/cloudinary_php Version ^1.8
composer/package-versions-deprecated Version @stable
contentful/contentful Version ^6.0|^7.0
domnikl/statsd Version ^2.6
guzzlehttp/guzzle Version ^6.3||^7
guzzlehttp/promises Version ^1.0
justinrainbow/json-schema Version @stable
frontastic/data-object Version @stable
league/oauth2-client Version ^2.3
myclabs/deep-copy Version ^1.0
ramsey/uuid Version ^3.9||^4
seld/jsonlint Version @stable
swiftmailer/swiftmailer Version ^6.2
symfony/config Version ^4.4||^5.4
symfony/dependency-injection Version ^4.4||^5.4
symfony/event-dispatcher Version ^4.4||^5.4
symfony/expression-language Version ^4.4||^5.4
symfony/finder Version ^4.4||^5.4
symfony/http-kernel Version ^4.4||^5.4
symfony/symfony Version ^4.4||^5.4
symfony/yaml Version ^4.4||^5.4
woohoolabs/yang Version ^2.3
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 frontastic/common contains the following files

Loading the files please wait ....