- How do I install liberu-genealogy/php-dna in a Laravel application?
- Install it with composer require liberu-genealogy/php-dna and confirm your runtime matches PHP 8.3 or 8.4 before scheduling work. In Laravel, let package discovery register any shipped service provider, then keep DNA parsing behind an application service rather than calling SNPs or CsvReader directly from controllers.
- Which PHP and Laravel versions does php-dna support?
- The package is described for PHP 8.3 and PHP 8.4, but the provided release notes do not state the supported Laravel matrix. Check the installed composer.json constraints and test against your oldest supported Laravel and PHP runtime before upgrading, especially across the v4 major bump.
- Can I use php-dna outside Laravel?
- Yes. It is a Composer library for PHP 8.3 and PHP 8.4 and can be used in plain PHP applications. Laravel integration depends on any service provider bindings the package ships; the DNA parsing classes themselves do not require the framework.
- What is the breaking change in php-dna v4.0.0?
- Version 4.0.0 removes triangulateKits rather than deprecating it. Any call site still using that method can install cleanly and then fail at runtime, so grep for it before upgrading. The release also includes fixes for duplicate method declarations and syntax errors in SNPs.php and CsvReader.php.
- How do I migrate a Laravel app from php-dna v3 to v4?
- Inventory all references to triangulateKits, SNPs, and CsvReader, including dynamic calls, queued jobs, and artisan commands. If triangulateKits is unused, upgrade on a branch and validate parsing paths; if it is used, stay pinned to v3.x until a replacement is chosen or vendor the parser fixes. Do not treat the visualization placeholder as a migration target.
- How do I parse raw DNA kit CSV files with php-dna?
- Use the package's CsvReader and SNPs surfaces for raw kit CSV ingestion and SNP handling, wrapped in your own service class. Add fixture tests for header variations, malformed rows, and large files because the assessment flags prior parse-level defects and weak CI gating upstream.
- What replaced triangulateKits for DNA kit triangulation in v4?
- The provided assessment says triangulateKits is deleted in v4 and does not identify a sanctioned replacement. Treat kit triangulation as an application-level gap until upstream answers whether a new package or implementation is expected. Do not assume the visualization placeholder fills that role.
- Is php-dna production-ready for a genealogy application?
- For v4 adoption the technical risk is medium-high, mainly because the breaking removal fails at runtime and the parser fixes suggest weak upstream CI gating. Staying on v3 is medium risk but may expose you to the SNPs.php and CsvReader.php defects. Pin versions, audit call sites, and require tests around DNA workflows before production use.
- How should I test a php-dna upgrade?
- Run php -l and static analysis over your integration, add fixture-based CSV and SNP parsing tests, and grep for triangulateKits plus dynamic method calls. Test on your oldest supported PHP runtime, not only the developer's local version, and verify composer.json constraints between v3 and v4. Keep DNA parsing behind a service layer so failures do not spread into controllers.
- Does php-dna include DNA visualization features?
- The assessment describes a visualization placeholder, which should be treated as a stub rather than a delivered capability. Do not plan stakeholder demos or features around it until upstream confirms whether it is public API, flag-gated, or returns a safe empty value. The package's confirmed focus is DNA kit import, SNP parsing, CSV handling, and related utilities.