Download the PHP package cisse/as400-bundle without Composer
On this page you can find all versions of the php package cisse/as400-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cisse/as400-bundle
More information about cisse/as400-bundle
Files in cisse/as400-bundle
Package as400-bundle
Short Description Symfony bundle for IBM AS400/DB2 database connections
License MIT
Informations about the package as400-bundle
AS400 Bundle
A Symfony bundle for IBM AS400/DB2 database connections with ORM-like functionality using PHP attributes.
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
Add the bundle to your project:
Register the bundle in config/bundles.php:
Configuration
Configure the bundle in config/packages/as400.yaml:
Usage
Defining Entities
Creating Repositories
Using the Repository
Generating Entities
Use the console command to generate entities from database tables:
The --with-test option generates a PHPUnit test file that verifies:
- Entity constants are correctly defined (DATABASE_NAME, TABLE_NAME, IDENTIFIER_NAME)
- Column constants match their expected values
- Properties can be set and retrieved
- All properties default to null
Generating Missing Tests/Repositories
Use this command to scan existing entities and generate missing tests and/or repositories:
The command will:
- Scan all entities in your configured
entity_dir - Check for corresponding test/repository files
- Generate missing files using reflection on existing entities
- Display a summary table of generated vs existing files
Direct Connection Usage
Web Profiler Integration
The bundle includes a data collector for the Symfony Web Profiler toolbar, showing:
- Executed AS400 queries
- Query parameters
- Execution times
Column Types
Available column types for attribute mapping:
Column::STRING_TYPEColumn::INTEGER_TYPEColumn::BOOLEAN_TYPEColumn::FLOAT_TYPEColumn::DATE_TYPEColumn::DATETIME_TYPEColumn::TIME_TYPE
Requirements
- PHP 8.2+
- Symfony 6.4+ or 7.x
- IBM i Access ODBC Driver
- PDO extension
License
MIT
All versions of as400-bundle with dependencies
ext-pdo Version *
symfony/framework-bundle Version ^6.4|^7.0
symfony/dependency-injection Version ^6.4|^7.0
symfony/config Version ^6.4|^7.0
symfony/console Version ^6.4|^7.0
symfony/web-profiler-bundle Version ^6.4|^7.0
psr/log Version ^1.0|^2.0|^3.0