Download the PHP package deozza/philarmony-core-bundle without Composer

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

Philarmony

[php]() [mysql]() symfony Build Status Stable [License: MIT]()

Table of contents

About

Philarmony is a bundle made to help you create a modular REST API. From database to controllers and forms, without forgetting authorization and data validation, manage your API easily in minutes.

V.3.0 - What's new ?

Better performances, this is what can resume Philarmony V3. The core has been rewritten with

Installation

You can install using composer, assuming it is already installed globally :

composer require deozza/philarmony-core-bundle

Configuration

In order yo use Philarmony in your project, you need to configure it. First, create a philarmony.yaml file with the following structure :

This will be used to locate the database schema files. By default they are created and stored in /var/Philarmony/.

Then, to use the embedded services, as the controllers and the repositories, of Philarmony, you need to enable them in your /config/services.yaml and in your config/routes/annotations.yaml :

Finally, in order to use filters inside your query, add the following functions inside the doctrine.yaml configuration file :

Example of usage

For this example, our API example will manage vacation rentals. Users are able to create rental offers, book vacations and communicate through an internal message service.

Therefore, the database would be constituted with 4 different entity kinds :

These entities are defined by default inside the entity.yaml configuration file, and their properties inside the property.yaml file.

Here is an example of a cUrl request with its body (in JSON) to create a new rental offer :

As you can see, the kind of entity you post is specified in the url. This will allow Philarmony to adapt the comportment of the API following the logic you implemented in the yaml configuration files and via your business logic. Here is the JSON response you would expect from the previous request:

Say that an offer can have multiple descriptions and you want to add another one, simply send a request like the following :

Here will be the expected response :

Responses

Response code Raised by Details
200 The request is successful More
201 The post request is successful More
204 The request is successful and the response has an empty body More
400 Form error assertion More
403 User is not allowed to perform this request More
404 The resource requested was not found More
405 The method used is not allowed on the route requested More
409 The request is successful but the data submitted is not valid More

When you perform a request to Philarmony, it will always send a response containing a serialized JSON and one of the HTTP code listed above.

How it works

Database schema

Your database schema is fully designed by 3 yaml files.

Entity

An Entity is what could be view as a MySQL table, a main container of data. By default, it is defined by an owner (the User who created the entity), a kind, the date it was create and its properties.

Property

The property is what could be view as a MySQL column, the container of a specific data. By default, it is defined by a type, a unique paremeter and a required parameter.

Enumeration

The enumeration is a list of possible values handled by of property.

Validation state

Validation state is used in order to assert an entity is in good conditions to be used. Each state defines specific methods usable by specific users.

Authorization

To assure the right user is manipulating a resource, authorization is handled by the validation state. It determines which users are allowed to send the different requests.

Constraints

In order to pass from one state to the next, the entity and its data must be valid according to constraints.

Conflict rules

A conflict rules is a custom and advanced constraint that need to be developed and cannot be added to a configuration file.

Tests

A demo app has been developped and is visible here. Through the tests of this app, we ensure that every feature of Philarmony is tested and we garanty the stability of the bundle.

Road map


All versions of philarmony-core-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1.3
ext-ctype Version *
ext-iconv Version *
alcaeus/mongo-php-adapter Version ^1.1
deozza/philarmony-utils Version ^3.0
deozza/response-maker-bundle Version ^1.0
doctrine/mongodb-odm-bundle Version ^3.5
jms/serializer-bundle Version ^3.2
nelmio/cors-bundle Version ^1.5
ramsey/uuid-doctrine Version ^1.5
scienta/doctrine-json-functions Version ^4.0
symfony/dotenv Version 4.2.* || 4.3.*
symfony/flex Version ^1.1
symfony/form Version 4.2.* || 4.3.*
symfony/orm-pack Version ^1.0
symfony/translation Version 4.2.* || 4.3.*
symfony/validator Version 4.2.* || 4.3.*
symfony/yaml Version 4.2.* || 4.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 deozza/philarmony-core-bundle contains the following files

Loading the files please wait ....