Download the PHP package tourze/async-export-bundle without Composer
On this page you can find all versions of the php package tourze/async-export-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package async-export-bundle
Async Export Bundle
中文
A Symfony bundle for managing asynchronous data export tasks with DQL support, progress tracking, and user-based task management.
Features
- Asynchronous Processing: Handle large data exports without blocking the main application
- DQL Query Support: Use Doctrine Query Language for flexible and powerful data queries
- Progress Tracking: Real-time monitoring of export progress with total and processed counts
- User Management: Associate export tasks with authenticated users for security
- Flexible Configuration: JSON-based column configuration for customizable exports
- Error Handling: Comprehensive exception tracking and error reporting
- Memory Monitoring: Track memory usage to optimize performance
- Task Validation: Built-in validation and status management system
- Audit Trail: Full tracking with timestamps and user attribution
Installation
Requirements
- PHP 8.1 or higher
- Symfony 6.4 or higher
- Doctrine ORM 3.0 or higher
- Doctrine DBAL 4.0 or higher
Quick Start
Configuration
Bundle Registration
Add the bundle to your config/bundles.php:
Service Configuration
The bundle automatically configures services in services.yaml:
Entity Mapping
Ensure Doctrine is configured to scan the bundle entities:
Entity Structure
The AsyncExportTask entity provides comprehensive export task management:
Core Properties
user: Associated user (UserInterface)file: Export file path (string, max 1000 chars)entityClass: Target entity class name for EntityManager lookupdql: Doctrine Query Language string for data selectioncolumns: JSON array defining export column configuration
Tracking Properties
totalCount: Total number of records to exportprocessCount: Number of records already processedmemoryUsage: Memory consumption during processingvalid: Task validation status flag
Metadata Properties
remark: Human-readable task descriptionexception: Error message storage for failed tasksjson: Additional parameter storage
Inherited Traits
- SnowflakeKeyAware: Unique ID generation
- TimestampableAware: Created/updated timestamps
- BlameableAware: User tracking for audit trails
Repository Usage
Advanced Usage
Progress Tracking
Error Handling
Security
Access Control
The bundle integrates with Symfony's security component to ensure proper access control:
- All export tasks are associated with authenticated users
- Users can only access their own export tasks
- Task creation requires valid authentication
- File paths should be validated to prevent directory traversal
Data Protection
- Export files should be stored in secure locations
- Sensitive data in DQL queries should be properly escaped
- Regular cleanup of completed export files is recommended
- Memory usage tracking helps prevent resource exhaustion
Best Practices
- Always validate user input for DQL queries
- Implement proper file permission controls
- Use secure file naming conventions
- Monitor export task execution for anomalies
- Implement rate limiting for export task creation
Console Commands
The bundle provides the following console commands for managing export tasks:
async-export:process
Process a single export task by ID.
Usage:
Arguments:
task-id: The ID of the export task to process (required)
Options:
--force: Force process the task even if it's already been processed
Examples:
async-export:process-all
Process all pending export tasks in the queue.
Usage:
Options:
--limit=LIMIT: Maximum number of tasks to process (default: 10)--force: Force process tasks even if they've already been processed
Examples:
Note: These commands are typically run by background job processors or cron jobs to handle export tasks asynchronously.
Contributing
Please see CONTRIBUTING.md for details.
License
The MIT License (MIT). Please see License File for more information.
All versions of async-export-bundle with dependencies
doctrine/dbal Version ^4.0
doctrine/doctrine-bundle Version ^2.13
doctrine/orm Version ^3.0
doctrine/persistence Version ^4.1
easycorp/easyadmin-bundle Version ^4
knplabs/knp-menu Version ^3.7
phpoffice/phpspreadsheet Version ^3.9
psr/container Version ^1.1|^2.0
psr/log Version ^3|^2|^1
symfony/config Version ^7.3
symfony/console Version ^7.3
symfony/dependency-injection Version ^7.3
symfony/doctrine-bridge Version ^7.3
symfony/framework-bundle Version ^7.3
symfony/http-foundation Version ^7.3
symfony/http-kernel Version ^7.3
symfony/property-access Version ^7.3
symfony/routing Version ^7.3
symfony/security-core Version ^7.3
symfony/twig-bundle Version ^7.3
symfony/yaml Version ^7.3
tourze/bundle-dependency Version 1.*
tourze/doctrine-indexed-bundle Version 1.0.*
tourze/doctrine-snowflake-bundle Version 1.1.*
tourze/doctrine-timestamp-bundle Version 1.1.*
tourze/doctrine-track-bundle Version 1.1.*
tourze/doctrine-user-bundle Version 1.0.*
tourze/easy-admin-extra-bundle Version 1.0.*
tourze/easy-admin-menu-bundle Version 1.0.*
tourze/symfony-dependency-service-loader Version 1.0.*
tourze/symfony-routing-auto-loader-bundle Version 1.0.*