- Issue the following commands from the command line in your Yii application directory:
chmod +x psyii
mkdir extensions/yiishell
wget -O extensions/yiishell/psysh psysh.org/psysh
chmod +x extensions/yiishell/psysh
- Copy the file
init.php
below topsysh/init.php
and update any paths to work with your application configuration - Copy the file
config.php
below topsysh/config.php
. Change or add to the config array with the options you'd like to use (available options) - Now you can start PsySH with the command
./psyii psysh/init.php --config psysh/config.php
# A VirtualBox bug forces vagrant to serve | |
# corrupt files via Apache or nginx | |
# The solution to that would be to turn off | |
# the SendFile option in apache or nginx | |
# | |
# If you use apache as your main web server | |
# add this directive in your httpd.conf (or apache.conf) | |
# configuration file name may vary in various systems | |
# | |
EnableSendfile off |
- Issue the following commands from the command line in your Yii application directory:
chmod +x shell
mkdir extensions/yiishell
wget -O extensions/yiishell/psysh psysh.org/psysh
chmod +x extensions/yiishell/psysh
- Copy the file
init.php
below toextensions/yiishell/init.php
and update any paths to work with your application configuration - Copy the file
config.php
below toextensions/yiishell/config.php
. Change or add to the config array with the options you'd like to use (available options) - Now you can start PsySH with the command
extensions/yiishell/psysh extensions/yiishell/init.php --config extensions/yiishell/config.php
- Broadway - Infrastructure and testing helpers for creating CQRS and event sourced applications
- EventCentric.Core - Event Sourcing and CQRS in PHP
- LiteCQRS - Small convention based CQRS library for PHP
- predaddy - Common DDD classes including an annotation driven message bus and tools for CQRS and Event Sourcing
- ProophEventSourcing - Provides basic functionality for event-sourced aggregates
- ProophEventStore - PHP 5.4+ EventStore Implementation
- ProophServiceBus - PHP Enterprise Service Bus Implementation supporting CQRS and DDD
#!/bin/bash | |
# @author: Seb Dangerfield | |
# http://www.sebdangerfield.me.uk/?p=513 | |
# Created: 11/08/2011 | |
# Modified: 07/01/2012 | |
# Modified: 27/11/2012 | |
# @author Zhdanov Vladislav | |
# https://github.com/nks | |
# Modified 16/09/2016 |
Basic RESTful API with Symfony 2 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle
The API we are creating in this gist will follow these rules :
- The API only returns JSON responses
- All API routes require authentication
- Authentication is handled via OAuth2 with
password
Grant Type only (no need for Authorization pages and such). - API versioning is managed via a subdomain (e.g.
v1.api.example.com
)
The API will be written in PHP with the Symfony 2 framework. The following SF2 bundles are used :
<?php | |
/** | |
* User: bekco (Behçet Mutlu) | |
* Date: 17/11/16 | |
* Time: 17:52 | |
*/ | |
namespace Acme\Oauth2Bundle\Oauth\Extension; |
RAML
- http://raml.org/
- https://github.com/raml-org
- schema definition in yaml
- uses json schema for request/response bodies
- schema parsers for Java and JS
- v 0.8, 1.0 is coming soon
- many third party tools (api designer, client/server generators, etc)
Swagger
This document describes 4 different solutions to work APIs that consist of multiple blueprint files. Every of this solution work with all Apiary.io features but editing. To edit a blueprint you have to do it outside of Apiary as Apiary editor does not support working with multiple files. In other words if you are using one of the solutions below avoid editing the blueprint in Apiary.
Hercule is a CLI tool written in Node.js – available as an NPM package. It uses markdown referencing and linking syntax to transclude other files into a blueprint file. This solution is universal and would work with any Markdown files not just API Blueprint.
The major benefit – unlike any other solutions here – is also that the references are rendered as HTML links in any Markdown editor so the result is HTML that can be browsed!
<?php | |
namespace AppBundle\Command; | |
use Sylius\Component\Core\Model\ChannelPricingInterface; | |
use Sylius\Component\Core\Model\ProductInterface; | |
use Sylius\Component\Core\Model\ProductVariantInterface; | |
use Sylius\Component\Product\Model\ProductAssociationInterface; | |
use Sylius\Component\Product\Model\ProductAssociationTypeInterface; | |
use Sylius\Component\Taxonomy\Model\TaxonInterface; |