Engineering teams building commercial Perfex CRM extensions face a painful split: target the Laravel-based Next 1.0 branch with small market adoption, or stay stuck on legacy CodeIgniter 3 hooks in Classic. Dual-mode CodeIgniter 4 modules powered by IgniteCore eliminate this trap by letting you write PSR-4 services, typed controllers, and modern APIs on Perfex Classic today while maintaining zero-friction fallback for standard CI3 hosting environments.
For strategic migration context, review our Perfex CRM Next 1.0 vs Classic architecture analysis before committing sprint capacity.
| Engineering Dimension | Perfex Next 1.0 (Laravel) | CI4 Dual-Mode (IgniteCore on Classic) |
|---|---|---|
| Production Install Base | Early adopters and greenfield pilots | Existing Classic production sites globally |
| Autoloading and Typing | Native PSR-4 and Laravel container | PSR-4 namespaces and PHP 8.2+ strict types via CI4 |
| Legacy Hook Compatibility | Requires full rewrite of CI3 hooks | Preserves CI3 hooks while routing heavy endpoints to CI4 |
| Fallback Safety | Laravel runtime mandatory | Automatic graceful degradation to CI3 controller paths |
| Vendor Isolation | Global Composer dependency tree | Scoped Composer autoloader per module boundary |
1. Evaluate Runtime Boundaries Before Choosing a Stack
Perfex Next 1.0 introduces Service Providers, Blade templates, and Eloquent models, which forces complete rewrites for any vendor with an existing Classic catalog. In contrast, IgniteCore embeds CodeIgniter 4 side-by-side inside Classic so your core domain logic stays framework-agnostic and testable with PHPUnit. You can validate real endpoint speeds in our Data Builder and IgniteCore API case study.
- Audit active client installations to quantify Classic vs Next 1.0 revenue share before allocating engineering months.
- Separate pure business services into PSR-4 repositories that work identically under CI4 or future Laravel adapters.
- Keep database schemas compatible with standard Perfex table prefixes (
tbl) to avoid destructive migrations.
2. Structure Dual-Mode Modules for Maximum Portability
A dual-mode module boots through Classic’s standard modules/{slug}/{slug}.php entry file, registers admin menus via hooks(), and delegates complex UI, REST APIs, and background queues to its ci4/ directory whenever IgniteCore is active. Follow the IgniteCore SDK dual-mode build guide to wire shared auth guards cleanly.
- Declare a
manifest.jsoncapability block specifying minimum PHP, IgniteCore version, and fallback route handlers. - Route high-frequency AJAX and webhook endpoints through CI4
Routes.phpto bypass heavy CI3 core initialization. - Inject shared Perfex staff permissions and CSRF tokens through the IgniteCore bridge middleware on every request.
Common Pitfalls and Quick Fixes
- Composer autoload collisions with Next 1.0 or third-party Classic plugins: Prefix internal vendor namespaces or isolate dependencies inside
ci4/vendorrather than editing rootapplication/vendor. - Broken admin sidebar links when IgniteCore is disabled: Always register a lightweight CI3 fallback controller that displays an inline IgniteCore activation prompt instead of a 404 page.
- Session mismatch between CI3 cookies and CI4 APIs: Configure the IgniteCore session bridge driver to read Classic’s encrypted
ci_sessionstable or native PHP session handler consistently.
Frequently Asked Questions
Can I port a CodeIgniter 4 dual-mode module to Perfex Next 1.0 later?
Yes. Because dual-mode modules isolate domain services, DTOs, and validation inside clean PSR-4 classes instead of CI3 superglobals, porting to Laravel Next 1.0 later requires only writing thin Laravel Service Providers, Eloquent adapters, and route wrappers around your existing tested business logic.
Does running IgniteCore on Classic require modifying Perfex core files?
No. IgniteCore operates as a modular runtime layer using standard Perfex module hooks and clean .htaccess front-controller rules. Your application/ and system/ core directories remain completely untouched, so official Perfex Classic security patches and version upgrades apply safely without manual code merges.
What PHP version is recommended for dual-mode CI4 development?
PHP 8.2 or 8.3 is recommended for both CI4 dual-mode modules and Perfex Next 1.0 packages. Using PHP 8.2 enables readonly classes, typed properties, and modern Composer packages while maintaining full runtime compatibility with updated Perfex Classic 3.x production installations.
What happens if a client installs a dual-mode module without IgniteCore?
When IgniteCore is absent, the dual-mode entry file detects the missing bridge, keeps standard CI3 hooks operational, and renders either a clean fallback controller view or a guided one-click IgniteCore setup notice instead of crashing staff dashboards with fatal PHP namespace errors.

Leave a Reply