pluswerk/grumphp-xliff-task
GrumPHP task to lint XLF/XLIFF translation files. Configure ignore patterns and XML validation options (load_from_net, x_include, DTD and schema validation) and run on commits via GrumPHP (triggered_by: xlf).
Purpose Alignment: The package remains a GrumPHP extension for XLIFF validation, maintaining perfect alignment with Laravel/PHP projects requiring localization QA. The backport of PR #112 to the 10.x branch (v10.2.8) does not introduce architectural changes, preserving its modular, plug-and-play nature for GrumPHP workflows. Still ideal for projects using XLIFF for translations (e.g., Spatie Translation Manager, Crowdin exports) and enforcing consistency pre-merge.
Modularity: No Laravel-specific modifications are required. The task remains fully decoupled from Laravel’s service container or routing, extending validation to .xlf/.xliff files without integration friction.
Localization Workflows: Continues to complement Laravel’s existing tooling (e.g., PHPStan, Pest) without disrupting architecture. The backport ensures stability for projects relying on the 10.x branch.
grumphp.yml setup:
tasks:
xlifflint:
ignore_patterns: ["storage/", "tests/"]
triggered_by: ["xlf", "xliff"]
GrumPHP Versioning:
grumphp/grumphp:^1.3) in composer.json. No change from prior assessment.XLIFF Linter Reliance:
xlifflint tool may lack pre-installation in CI (e.g., GitHub Actions).Path Handling:
__DIR__ vs. getcwd() issues (fixed in v10.2.7) persist for dynamic paths (e.g., Laravel Forge).getcwd() behavior in CI. Unchanged.Performance:
New Risk (Backport PR #112):
GrumPHP Adoption:
CI/CD Impact:
Customization Needs:
dtd_validation/scheme_validation. Unchanged.License Compliance:
Maintenance:
Assessment:
composer show grumphp/grumphp). Unchanged.Proof of Concept (PoC):
composer require --dev pluswerk/grumphp-xliff-task:^10.2.8
./vendor/bin/grumphp run --verbose
CI/CD Integration:
- run: ./vendor/bin/grumphp run
Fallback Plan:
xml extension (enabled by default in Laravel). Unchanged.getcwd() (fixed in v10.2.7). Test with:
vendor/ from ignore_patterns:
ignore_patterns: ["vendor/", "node_modules/"]
Unchanged.dtd_validation). Unchanged.
dtd_validation/scheme_validation separately to avoid false positives.Package Updates:
composer.json:
"pluswerk/grumphp-xliff-task": "^10.2.8",
"grumphp/grumphp": "^1.3"
Dependency Management:
xlifflint is updated in CI. Unchanged.Troubleshooting:
getcwd() in CI.ignore_patterns or validate XLIFF files manually. Unchanged.Ramp-Up:
How can I help you explore Laravel packages today?