Newest addition to existing supporting_actor_group
family is handler.
It gives ability to skip building the entire DAO family except for the Repository/Handler
(including Interface and service definition). It does not include Map
namespace, so the idea
is to use it directly with Actors generated by buphalo
.
Here's an example of complementary buphalo
and prefab
configs.
Buffalo config DAO.buphalo.v1.fabrication.yml inside src/ComponentName
actors:
<PrimaryActorName>.php:
template: PrimaryActorName.php
<PrimaryActorName>.service.yml:
template: PrimaryActorName.service.yml
<PrimaryActorName>Interface.php:
template: PrimaryActorNameInterface.php
<PrimaryActorName>/AwareTrait.php:
template: PrimaryActorName/AwareTrait.php
<PrimaryActorName>/Factory.php:
template: PrimaryActorName/Factory.php
<PrimaryActorName>/Factory.service.yml:
template: PrimaryActorName/Factory.service.yml
<PrimaryActorName>/FactoryInterface.php:
template: PrimaryActorName/FactoryInterface.php
<PrimaryActorName>/Factory/AwareTrait.php:
template: PrimaryActorName/Factory/AwareTrait.php
<PrimaryActorName>/Builder.php:
template: PrimaryActorName/Builder.php
<PrimaryActorName>/Builder.service.yml:
template: PrimaryActorName/Builder.service.yml
<PrimaryActorName>/BuilderInterface.php:
template: PrimaryActorName/BuilderInterface.php
<PrimaryActorName>/Builder/AwareTrait.php:
template: PrimaryActorName/Builder/AwareTrait.php
<PrimaryActorName>/Builder/Factory.service.yml:
template: PrimaryActorName/Builder/Factory.service.yml
<PrimaryActorName>/Builder/Factory.php:
template: PrimaryActorName/Builder/Factory.php
<PrimaryActorName>/Builder/FactoryInterface.php:
template: PrimaryActorName/Builder/FactoryInterface.php
<PrimaryActorName>/Builder/Factory/AwareTrait.php:
template: PrimaryActorName/Builder/Factory/AwareTrait.php
<PrimaryActorName>/Repository.php:
template: PrimaryActorName/Repository.php
<PrimaryActorName>/Repository.service.yml:
template: PrimaryActorName/Repository.service.yml
<PrimaryActorName>/RepositoryInterface.php:
template: PrimaryActorName/RepositoryInterface.php
<PrimaryActorName>/Repository/AwareTrait.php:
template: PrimaryActorName/Repository/AwareTrait.php
Prefab global config http-buildable-directories.yml in project root
ComponentName/DAO:
buildable_directories:
- ComponentName
welcome_baskets:
- Doctrine\DBAL
- PDO
- Opcache
- NewRelic
- Zend\Expressive
- SearchCriteria
Prefab component config DAO.prefab.definition.yml in src/ComponentName
name: DAO
http_route: /ComponentName/DAO
http_verbs:
- post
supporting_actor_group: handler
Where DAO - your primary actor name, ComponentName - the name of the component.
Following commands need to be executed in correct order (prefab first, buphalo second):
./vendor/bin/prefab
./bin/buphalo
(assuming you have bin/buphalo file created)