bankiru/doctrine-api-client
Doctrine-style entity manager for remote RPC APIs. Map entities via YAML, register RPC clients, and use Doctrine Common interfaces (metadata, proxies, repositories) to fetch and manage remote resources as if they were Doctrine entities.
doctrine/orm) target Doctrine 3.x, introducing version skew risks.EntityMetadataFactory and Configuration to support Doctrine 3.x attributes. Example:
$configuration->setMetadataDriverImpl(new AttributeMetadataDriverImpl());
spl_object_hash changes, typed properties, or constructor property promotion.EntityManager and ClientRegistry to Laravel’s IoC.scaytrase\rpc-common limits flexibility if the API evolves.ManyToMany) or custom field types required? The package supports these but may need extensions.symfony/http-client or reactphp would be better.scaytrase\rpc-common.EntityManager and ClientRegistry:
$this->app->singleton(EntityManager::class, function ($app) {
$config = new Configuration();
// ... configure as per README
return EntityManager::create($config);
});
#[ORM\Entity(repositoryClass: MyRepository::class)]
class MyEntity { ... }
EntityMetadataFactory to support both YAML and attributes:
$factory = new AttributeMetadataFactory();
$factory->setLoadMetadataCallback([new YmlMetadataDriver(...), 'loadMetadata']);
$config->setMetadataFactory($factory);
// Example: RPC entity via Doctrine, local entity via Eloquent
$rpcUser = $entityManager->getRepository(RpcUser::class)->find(1);
$localUser = User::find(1); // Eloquent
class RpcService {
public function __construct(private EntityManager $em) {}
public function getUser(int $id) {
return $this->em->getRepository(RpcUser::class)->find($id);
}
}
Bankiru\Api\Rpc\RpcRequest and RpcResponse.spl_object_hash, typed properties.User) with basic CRUD.How can I help you explore Laravel packages today?