PHPackages                             cisse/as400-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. [Database &amp; ORM](/categories/database)
4. /
5. cisse/as400-bundle

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

cisse/as400-bundle
==================

Symfony bundle for IBM AS400/DB2 database connections

v1.7.0(3mo ago)0227MITPHPPHP &gt;=8.2

Since Aug 8Pushed 3mo agoCompare

[ Source](https://github.com/moulayecisse/as400-bundle)[ Packagist](https://packagist.org/packages/cisse/as400-bundle)[ RSS](/packages/cisse-as400-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (8)Versions (19)Used By (0)

AS400 Bundle
============

[](#as400-bundle)

A Symfony bundle for IBM AS400/DB2 database connections with ORM-like functionality using PHP attributes.

Features
--------

[](#features)

- **AS400/DB2 Connection**: Native PDO-based connection to IBM AS400 systems
- **Attribute-based Entities**: Use PHP 8+ attributes to define entity mappings
- **Repository Pattern**: Generic repository with CRUD operations
- **Query Logging**: Built-in query logging and web profiler integration
- **Entity Generation**: Command to auto-generate entities from database tables
- **Data Hydration**: Automatic object hydration from database results

Installation
------------

[](#installation)

Add the bundle to your project:

```
composer require cisse/as400-bundle
```

Register the bundle in `config/bundles.php`:

```
return [
    // ...
    Cisse\Bundle\As400\As400Bundle::class => ['all' => true],
];
```

Configuration
-------------

[](#configuration)

Configure the bundle in `config/packages/as400.yaml`:

```
as400:
    connection:
        driver: "IBM i Access ODBC Driver"  # Your ODBC driver name
        system: "your-as400-system"         # AS400 system name/IP
        user: "your-username"               # AS400 username
        password: "your-password"           # AS400 password
        commit_mode: 0                      # Optional, default: 0
        extended_dynamic: 1                 # Optional, default: 1
        package_library: "QGPL"             # Optional, default: "QGPL"
        translate_hex: "1"                  # Optional, default: "1"
        database: ""                        # Optional
        default_libraries: "LIB1,LIB2"      # Optional, comma-separated

    generator:                              # Optional: Configure entity generation paths
        entity_dir: "src/Entity/As400"              # Default: src/Entity/As400
        repository_dir: "src/Repository/As400"      # Default: src/Repository/As400
        test_dir: "tests/Entity/As400"              # Default: tests/Entity/As400
        entity_namespace: "App\\Entity\\As400"      # Default: App\Entity\As400
        repository_namespace: "App\\Repository\\As400"  # Default: App\Repository\As400
        test_namespace: "App\\Tests\\Entity\\As400" # Default: App\Tests\Entity\As400
```

Usage
-----

[](#usage)

### Defining Entities

[](#defining-entities)

```
