定制 initialstacker/dorch 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

initialstacker/dorch

最新稳定版本:1.0.1

Composer 安装命令:

composer require initialstacker/dorch

包简介

Laravel Doctrine ORM connector

README 文档

README

Laravel Doctrine ORM connector package enabling seamless integration of Doctrine ORM within Laravel applications.

Features

  • Easy setup of Doctrine EntityManager in Laravel service container
  • Support for custom Doctrine types (e.g., Ramsey UUID)
  • Configurable metadata directories and connection options
  • Redis cache integration for metadata and proxies
  • Development mode support for proxy generation
  • Clean Laravel service provider design

Installation

Require the package via Composer:

composer require initialstacker/dorch

Publish the configuration file:

php artisan vendor:publish --tag=doctrine

Configuration

Configure your database and cache settings in config/doctrine.php. Example drivers supported:

  • pdo_mysql (MySQL)
  • pdo_pgsql (PostgreSQL)
  • pdo_sqlite (SQLite)
  • pdo_sqlsrv (SQL Server)
  • oci8 (Oracle)

Set your connection according to preferred driver and database credentials.

Manual Service Provider Registration

Open your bootstrap/providers.php:

<?php

return [
    // Other service providers...
    Initialstacker\Dorch\DoctrineConnector::class,
];

This step is necessary because Laravel loads service providers listed in this array during application bootstrapping. Without adding your service provider class here, your package will not be connected to Laravel.

Usage

Once installed and configured, the Doctrine EntityManager can be resolved from Laravel's service container:

use Doctrine\ORM\EntityManagerInterface;

$entityManager = app(EntityManagerInterface::class);

// Use $entityManager to persist, find, and query entities

License

This package is open-sourced software licensed under the MIT License.

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-09-04