Edmonds Commerce - Symfony Custom Bundles
Overview
Bespoke bundle development and third-party Symfony integration. Build reusable components that extend your Symfony applications.
What We Build
Custom Symfony bundles for extending framework functionality. From database utilities and API tools to admin interfaces and domain logic packages, we build bundles that solve specific problems and can be reused across projects.
Bundle Types
Database & Persistence Bundles
Extend Doctrine functionality or provide specialised database tools.
Examples:
- Audit logging bundles
- Soft delete functionality
- Multi-tenancy support
- Query builder helpers
- Event sourcing bundles
- Temporal data support
API Bundles
Specialised tools for API development and integration.
Examples:
- Custom API resources
- GraphQL utilities
- API versioning helpers
- Response formatting
- Rate limiting
- Request validation
Admin & UI Bundles
Dashboard and admin interface components.
Examples:
- EasyAdmin extensions
- Custom form widgets
- Dashboard components
- Reporting tools
- Data visualization
- Admin automation
Authentication & Security Bundles
Authentication, authorization, and security tools.
Examples:
- Custom authentication providers
- Authorization strategies
- Two-factor authentication
- API key management
- Permission systems
- Security policies
Event & Message Bundles
Event-driven and message-based architecture tools.
Examples:
- Event dispatcher extensions
- Message queue integrations
- Command bus implementations
- Event sourcing support
- Saga pattern helpers
Testing Bundles
Tools for testing Symfony applications.
Examples:
- Test fixtures and builders
- Custom assertions
- Database testing helpers
- API testing utilities
- Performance testing tools
- Data generation
Bundle Structure
Service Providers
Register bundle services with Symfony's service container.
class MyCustomBundle extends Bundle {
public function build(ContainerBuilder $container) {
parent::build($container);
// Register services
}
}
Configuration
Allow bundle users to configure behavior.
class Configuration implements ConfigurationInterface {
// Define configuration options
}
Services
Provide functionality through registered services.
services:
App\MyService:
arguments:
- '@app.repository'
Commands
Extend Symfony console with custom commands.
class CustomCommand extends Command {
public static function getDefaultName(): ?string {
return 'app:custom-command';
}
}
Event Listeners
Hook into Symfony events.
#[AsEventListener(event: KernelEvents::REQUEST)]
class MyListener {
public function __invoke(RequestEvent $event) { }
}
Bundle Development Process
1. Planning & Design
Define bundle scope, API, and use cases.
- Identify the problem being solved
- Define bundle public API
- Plan configuration options
- Design service architecture
2. Development
Build the bundle with production-quality code.
- Implement core functionality
- Create service definitions
- Add configuration options
- Build commands and listeners
3. Documentation
Write clear, comprehensive documentation.
- Installation instructions
- Configuration reference
- Usage examples
- API documentation
4. Testing
Comprehensive test coverage.
- Unit tests for functionality
- Integration tests with Symfony
- Functional tests for commands
- Performance tests if applicable
5. Publishing
Make the bundle available to others.
- Open-source on GitHub
- Publish to Packagist
- Create private bundles for internal use
Bundle Best Practices
Well-Tested: Minimum 80% code coverage with unit and integration tests.
Well-Documented: Clear documentation with examples and troubleshooting.
Configuration-Driven: Allow users to configure behavior without code changes.
Convention over Configuration: Sensible defaults that work for most users.
Type-Safe: Full PHP type hints and return types.
Compatible: Support multiple Symfony versions when possible.
Dependency-Aware: Declare dependencies clearly. Use optional dependencies appropriately.
Technology Stack
- Symfony 5+ compatible
- PHP 8.0+ for modern syntax
- Composer for distribution
- PHPUnit/Pest for testing
- Packagist for public distribution
Common Bundle Patterns
Doctrine Extensions: Extend Doctrine ORM with custom functionality.
API Platform Extensions: Custom API Platform resources and filters.
EasyAdmin Customization: Custom EasyAdmin form fields and display options.
Event-Driven: Provide events that other bundles can listen to.
Service Container: Register services that other bundles depend on.
Configuration Binding: Bind configuration to service arguments.
Publishing & Distribution
Open-Source Bundles: Share with the Symfony community through Packagist.
Private Bundles: Use private Packagist or GitLab/GitHub package registry.
Monorepo Bundles: Manage multiple bundles in a single repository.
Versioning & Maintenance
Semantic Versioning: Use for clear version communication.
Stability: Major versions for breaking changes. Minor for features. Patches for fixes.
Compatibility: Document Symfony version requirements clearly.
Updates: Keep documentation current with bundle updates.
Target Audiences
Development Teams: Standardise on bundles for consistent patterns across projects.
Agencies: Build reusable bundles for faster client project delivery.
Open-Source Contributors: Publish bundles to the Symfony community.
Product Teams: Package domain logic in bundles for use across applications.
Bundle Ecosystem
Symfony has a rich ecosystem of community bundles:
- EasyAdmin: Admin panel bundle
- Security Bundle: Enhanced security features
- Messenger: Message queuing
- Mailer: Email handling
- Cache: Advanced caching
Custom bundles extend and integrate with this ecosystem.
Related Services
Symfony Development: Custom Symfony applications using your bundles.
API Platform: API Platform extensions and customisations.
Testing: Testing strategies for bundle development.
Contact
Based in the UK, serving global development teams. Discuss your bundle needs, reusable components, or extension requirements.