Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Server Check

Server Check Laravel Package

craftcms/server-check

craftcms/server-check is a CLI utility to validate your server environment for running Craft CMS. It checks PHP version and extensions, required settings, and other dependencies, helping you quickly spot configuration issues before install or deployment.

Deep Wiki
Context7

Craft CMS server requirements checker.

Frequently asked questions about Server Check
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 is useful if your Laravel app interacts with Craft CMS plugins, shared hosting, or requires Craft-specific PHP extensions like `intl` or `gd`. It ensures compatibility beyond Laravel’s native checks.
How do I install craftcms/server-check in a Laravel project?
Run `composer require craftcms/server-check` in your project directory. For development-only checks, add it to the `require-dev` section of your `composer.json`. The package provides a CLI tool (`./vendor/bin/server-check`) and a PHP API for programmatic validation.
Will this package work with Laravel 10+ and PHP 8.1+?
Yes, the package supports PHP 8.1+ and is compatible with Laravel 10+. Since it has no direct Laravel dependencies, it integrates cleanly without version conflicts. Always verify your specific Laravel version’s PHP requirements against Craft CMS’s constraints.
Can I run server checks in a CI/CD pipeline like GitHub Actions?
Absolutely. The package outputs structured validation results (JSON/array), making it easy to integrate into CI/CD workflows. Add a step to run `./vendor/bin/server-check` or call the API programmatically, then fail the pipeline if requirements aren’t met.
What if my Laravel app doesn’t use Craft CMS—can I still use this for general PHP server checks?
While the package is tailored for Craft CMS, you can extend or override its validation rules to focus on Laravel-specific requirements (e.g., `bcmath`, `fileinfo`). However, for pure Laravel projects, Laravel’s built-in tools like `php artisan serve` or `php -m` may suffice.
How do I customize the validation rules to ignore Craft CMS-specific checks?
The package allows customization via its API. You can filter or override validation logic to exclude Craft CMS-specific checks (e.g., database tables, Craft plugins). For example, extend the `ServerCheck` class and modify the rules array before calling `validate()`.
Does this package add significant runtime overhead during deployment?
The overhead is minimal, as the package performs lightweight system and PHP configuration checks. For CI/CD, the impact is negligible. If performance is critical, consider running checks only in pre-deployment hooks rather than during runtime.
Are there alternatives to craftcms/server-check for Laravel server validation?
For Laravel-specific checks, tools like `php -m`, `laravel-debugbar`, or custom scripts may suffice. However, if you need Craft CMS compatibility (e.g., shared hosting, plugins), this package fills a niche by combining Craft CMS and Laravel validation in one tool.
How do I integrate this into a Laravel service provider or boot event?
Add the validation to your service provider’s `boot()` method or a Laravel event listener. For example, instantiate `ServerCheck`, call `validate()`, and throw an exception if requirements fail. This ensures checks run before critical operations like database migrations.
What should I do if the package flags false positives for my Laravel-only environment?
False positives typically occur due to Craft CMS-specific checks. Mitigate this by extending the package’s validation logic to ignore irrelevant rules. For instance, exclude checks for `craft` database tables or Craft-specific PHP extensions if your Laravel app doesn’t use them.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4
php-http/client-implementation
phpcr/phpcr-implementation
cucumber/gherkin-monorepo
haydenpierce/class-finder
psr/simple-cache-implementation
uri-template/tests