PHPackages                             tourze/supplier-manage-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. tourze/supplier-manage-bundle

ActiveSymfony-bundle[Admin Panels](/categories/admin)

tourze/supplier-manage-bundle
=============================

通用供应商管理 Symfony Bundle - 实现供应商全生命周期管理

0.0.2(7mo ago)0151MITPHPPHP ^8.2CI passing

Since Nov 15Pushed 6mo agoCompare

[ Source](https://github.com/tourze/supplier-manage-bundle)[ Packagist](https://packagist.org/packages/tourze/supplier-manage-bundle)[ RSS](/packages/tourze-supplier-manage-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (39)Versions (3)Used By (1)

Supplier Management Symfony Bundle
==================================

[](#supplier-management-symfony-bundle)

[English](README.md) | [中文](README.zh-CN.md)

Universal Supplier Management Symfony Bundle
============================================

[](#universal-supplier-management-symfony-bundle)

A comprehensive supplier management Symfony Bundle that implements the full lifecycle management of suppliers from registration to performance evaluation.

📋 Features
----------

[](#-features)

### Core Features

[](#core-features)

- **Supplier Management**: Supplier information maintenance, status management, and classification
- **Contact Management**: CRUD operations for supplier contacts
- **Qualification Management**: Review and management of supplier qualifications and certifications
- **Contract Management**: Creation, approval, and tracking of supplier contracts
- **Performance Evaluation**: Quantitative evaluation and historical records of supplier performance
- **Workflow Integration**: Approval processes based on Symfony Workflow

### Technical Features

[](#technical-features)

- **EasyAdmin Integration**: Out-of-the-box admin backend
- **RESTful API**: Complete REST API support
- **Workflow Engine**: Process management based on Symfony Workflow
- **Data Validation**: Data validation using Symfony Validator
- **Index Optimization**: Automatic indexing of key fields for improved query performance
- **Timestamp Management**: Automatic management of creation and update times

🚀 Installation
--------------

[](#-installation)

Install using Composer:

```
composer require tourze/supplier-manage-bundle
```

⚙️ Configuration
----------------

[](#️-configuration)

### 1. Register Bundle

[](#1-register-bundle)

Register in `config/bundles.php`:

```
return [
    // ...
    Tourze\SupplierManageBundle\SupplierManageBundle::class => ['all' => true],
];
```

### 2. Database Configuration

[](#2-database-configuration)

Ensure Doctrine database connection is properly configured:

```
# config/packages/doctrine.yaml
doctrine:
    dbal:
        url: '%env(resolve:DATABASE_URL)%'
    orm:
        auto_generate_proxy_classes: true
        enable_lazy_ghost_objects: true
        report_fields_where_declared: true
        validate_xml_mapping: true
        naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
        auto_mapping: true
        mappings:
            SupplierManageBundle:
                type: attribute
                dir: '%kernel.project_dir%/packages/supplier-manage-bundle/src/Entity'
                prefix: 'Tourze\SupplierManageBundle\Entity'
                alias: SupplierManageBundle
```

### 3. Create Database Tables

[](#3-create-database-tables)

```
php bin/console doctrine:schema:create
# Or update existing schema
php bin/console doctrine:schema:update --force
```

📖 Usage
-------

[](#-usage)

### Basic Usage

[](#basic-usage)

#### Create Supplier

[](#create-supplier)

```
use Tourze\SupplierManageBundle\Service\SupplierService;
use Tourze\SupplierManageBundle\Enum\SupplierType;
use Tourze\SupplierManageBundle\Enum\CooperationModel;

class SupplierController
{
    public function __construct(
        private readonly SupplierService $supplierService
    ) {}

    public function createSupplier(): Supplier
    {
        return $this->supplierService->create([
            'name' => 'Example Supplier',
            'legalName' => 'Example Supplier Co., Ltd.',
            'legalAddress' => 'Beijing Chaoyang District xxx Street',
            'registrationNumber' => '91110000000000000X',
            'taxNumber' => '91110000000000000X',
            'supplierType' => SupplierType::GENERAL,
            'cooperationModel' => CooperationModel::LONG_TERM,
            'contactPerson' => 'John Doe',
            'contactPhone' => '13800138000',
            'contactEmail' => 'supplier@example.com',
            'bankName' => 'Bank of China',
            'bankAccount' => '6210000000000000000'
        ]);
    }
}
```

#### Query Suppliers

[](#query-suppliers)

```
use Tourze\SupplierManageBundle\Repository\SupplierRepository;

class SupplierController
{
    public function __construct(
        private readonly SupplierRepository $supplierRepository
    ) {}

    public function findSupplier(int $id): ?Supplier
    {
        return $this->supplierRepository->find($id);
    }

    public function searchSuppliers(string $keyword): array
    {
        return $this->supplierRepository->findByName($keyword);
    }
}
```

#### Manage Contacts

[](#manage-contacts)

```
use Tourze\SupplierManageBundle\Entity\SupplierContact;
use Tourze\SupplierManageBundle\Repository\SupplierContactRepository;

class ContactController
{
    public function createContact(Supplier $supplier): SupplierContact
    {
        $contact = new SupplierContact();
        $contact->setSupplier($supplier);
        $contact->setName('Jane Smith');
        $contact->setPosition('Sales Manager');
        $contact->setPhone('13900139000');
        $contact->setEmail('jane@supplier.com');
        $contact->setIsPrimary(true);

        return $contact;
    }
}
```

### Using EasyAdmin Backend

[](#using-easyadmin-backend)

This Bundle integrates with EasyAdmin to provide an out-of-the-box admin backend:

1. Ensure EasyAdmin Bundle is installed and configured
2. Visit `/admin` path to see the supplier management menu
3. Supports management of the following entities:
    - Supplier
    - SupplierContact
    - SupplierQualification
    - Contract
    - PerformanceEvaluation
    - EvaluationItem

### Workflow Integration

[](#workflow-integration)

Supplier status transitions based on Symfony Workflow component:

```
# config/packages/workflow.yaml
framework:
    workflows:
        supplier_status:
            type: 'state_machine'
            supports:
                - Tourze\SupplierManageBundle\Entity\Supplier
            places:
                - pending     # Pending review
                - approved    # Approved
                - rejected    # Rejected
                - suspended   # Suspended
                - archived    # Archived
            transitions:
                apply:
                    from: pending
                    to: approved
                reject:
                    from: pending
                    to: rejected
                suspend:
                    from: approved
                    to: suspended
                reactivate:
                    from: suspended
                    to: approved
                archive:
                    from: [approved, rejected, suspended]
                    to: archived
```

🏗️ Entity Models
----------------

[](#️-entity-models)

### Supplier

[](#supplier)

- Basic Information: Name, legal entity, registration number, tax number, etc.
- Business Information: Type, cooperation model, status, etc.
- Contact Information: Contact person, phone, email, bank account, etc.

### SupplierContact

[](#suppliercontact)

- Multiple contacts associated with suppliers
- Support for setting primary contact identifier
- Detailed information including position and contact methods

### SupplierQualification

[](#supplierqualification)

- Management of various supplier qualifications and certifications
- Support for qualification approval status tracking
- Record validity periods and reminder functionality

### Contract

[](#contract)

- Supplier contract information management
- Support for contract status tracking
- Record key information such as contract amount and duration

### PerformanceEvaluation

[](#performanceevaluation)

- Supplier performance evaluation records
- Support for custom evaluation templates
- Quantitative scoring and grade management

🔧 Configuration Options
-----------------------

[](#-configuration-options)

### Environment Variables

[](#environment-variables)

```
# .env
# Supplier management related configuration
SUPPLIER_DEFAULT_STATUS=pending
SUPPLIER_AUTO_APPROVE=false
SUPPLIER_EVALUATION_CYCLE=90  # days
```

### Advanced Configuration

[](#advanced-configuration)

```
# config/packages/supplier_manage.yaml
supplier_manage:
    # Default configuration
    default_status: 'pending'
    auto_approve: false

    # Evaluation configuration
    evaluation:
        default_cycle: 90  # Evaluation cycle (days)
        max_score: 100
        grade_levels:
            A: 90
            B: 80
            C: 70
            D: 0

    # Notification configuration
    notifications:
        email_enabled: true
        sms_enabled: false
```

🧪 Testing
---------

[](#-testing)

Run the test suite:

```
# Run all tests
php bin/phpunit packages/supplier-manage-bundle/tests/

# Run specific tests
php bin/phpunit packages/supplier-manage-bundle/tests/Service/SupplierServiceTest.php

# Generate test coverage report
php bin/phpunit --coverage-html coverage packages/supplier-manage-bundle/tests/
```

📚 API Documentation
-------------------

[](#-api-documentation)

### REST API Endpoints

[](#rest-api-endpoints)

MethodPathDescriptionGET`/api/suppliers`Get supplier listPOST`/api/suppliers`Create new supplierGET`/api/suppliers/{id}`Get supplier detailsPUT`/api/suppliers/{id}`Update supplier informationDELETE`/api/suppliers/{id}`Delete supplierGET`/api/suppliers/{id}/contacts`Get supplier contactsPOST`/api/suppliers/{id}/contacts`Add supplier contact### Request Example

[](#request-example)

```
// POST /api/suppliers
{
    "name": "Example Supplier",
    "legalName": "Example Supplier Co., Ltd.",
    "legalAddress": "Beijing Chaoyang District xxx Street",
    "registrationNumber": "91110000000000000X",
    "taxNumber": "91110000000000000X",
    "supplierType": "general",
    "cooperationModel": "long_term",
    "contactPerson": "John Doe",
    "contactPhone": "13800138000",
    "contactEmail": "supplier@example.com"
}
```

🔄 Changelog
-----------

[](#-changelog)

### v1.0.0

[](#v100)

- Initial release
- Implemented basic supplier management functionality
- Integrated EasyAdmin backend
- Added RESTful API support
- Added workflow integration

🤝 Contributing
--------------

[](#-contributing)

Issues and Pull Requests are welcome!

1. Fork this project
2. Create your feature branch: `git checkout -b feature/amazing-feature`
3. Commit your changes: `git commit -m 'Add amazing feature'`
4. Push to the branch: `git push origin feature/amazing-feature`
5. Submit a Pull Request

📄 License
---------

[](#-license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

🔗 Related Links
---------------

[](#-related-links)

- [Symfony Bundle Best Practices](https://symfony.com/doc/current/bundles/best_practices.html)
- [EasyAdmin Bundle Documentation](https://symfony.com/doc/current/bundles/EasyAdminBundle.html)
- [Symfony Workflow Component](https://symfony.com/doc/current/components/workflow.html)

🆘 Support
---------

[](#-support)

If you encounter problems or need help:

1. Check the [documentation directory](docs/) for detailed functionality
2. Submit an [Issue](https://github.com/tourze/supplier-manage-bundle/issues)
3. Contact the maintainers

---

**Note**: This is an enterprise-level supplier management solution. It is recommended to conduct thorough testing and configuration before using in production environments.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance65

Regular maintenance activity

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

229d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13899502?v=4)[tourze](/maintainers/tourze)[@tourze](https://github.com/tourze)

---

Top Contributors

[![tourze](https://avatars.githubusercontent.com/u/13899502?v=4)](https://github.com/tourze "tourze (1 commits)")

---

Tags

symfonybundleworkflowmanagementsupplier

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tourze-supplier-manage-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/tourze-supplier-manage-bundle/health.svg)](https://phpackages.com/packages/tourze-supplier-manage-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M386](/packages/easycorp-easyadmin-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M738](/packages/sylius-sylius)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)[contao/core-bundle

Contao Open Source CMS

1231.6M2.8k](/packages/contao-core-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
