- Can I use craftcms/server-check to validate server requirements for a Laravel app that integrates with Craft CMS?
- Yes, this package is designed to check server configurations specifically for Craft CMS, which can be useful if your Laravel app interacts with Craft CMS plugins, shared hosting, or requires Craft’s PHP extensions like `intl` or `gd`. Run it via Composer or CLI to catch issues before deployment.
- How do I install craftcms/server-check in a Laravel project?
- Add it via Composer: `composer require craftcms/server-check`. For local or CI checks, include it in `require-dev`. Run the CLI tool with `./vendor/bin/server-check` or use the PHP API programmatically via `ServerCheck::validate()`.
- Will this package work with Laravel 10+ and PHP 8.1+?
- Yes, the package supports PHP 8.1+ and is compatible with Laravel 10+. It has no direct Laravel dependencies, so it integrates cleanly without conflicts. Check the package’s latest release notes for minor version-specific notes.
- Can I integrate server-check into Laravel’s CI/CD pipeline (e.g., GitHub Actions)?
- Absolutely. Use the CLI output in scripts or parse the JSON/array results in your CI workflow. For example, add a step like `./vendor/bin/server-check --format=json | jq -e '.isValid' || exit 1` to fail builds on issues.
- Does this package replace Laravel’s built-in `php artisan serve` or `php -m` checks?
- No, it’s complementary. Laravel’s tools validate core PHP requirements, but this package adds Craft CMS-specific checks (e.g., `composer.json` constraints, Craft plugin dependencies). Use both for thorough validation if Craft CMS is part of your stack.
- How do I customize the validation rules to focus on Laravel-specific requirements?
- Extend the `ServerCheck` class or override validation logic to filter out Craft-specific checks. For example, exclude checks for `craft_db` tables or add Laravel-specific rules like `bcmath` or `fileinfo` extensions.
- Will running server-check add significant overhead to my Laravel deployment?
- No, the package is lightweight and designed for quick scans. CLI execution is fast, and API calls return structured results without blocking. For CI/CD, it runs in seconds—ideal for pre-deploy hooks.
- Are there alternatives to craftcms/server-check for Laravel projects?
- For pure Laravel, use `php -m` or Laravel’s `php artisan package:discover`. If you need Craft CMS checks, alternatives like manual `phpinfo()` parsing exist, but this package automates Craft-specific validations with clear output.
- How do I handle false positives/negatives when checking a Laravel-only server?
- Filter the output by focusing on Laravel-relevant checks (e.g., PHP extensions like `openssl` or `pdo_mysql`). Use the API to exclude Craft-specific validations, or extend the package to ignore irrelevant rules.
- Is craftcms/server-check actively maintained, and what’s its license?
- Yes, it’s MIT-licensed and actively maintained (last release in 2026). The package has no Laravel dependencies, so updates are risk-free. Check the GitHub repo for changelogs or contribute custom rules if needed.