Download the PHP package ahmedanbar/devguard without Composer

On this page you can find all versions of the php package ahmedanbar/devguard. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package devguard

DevGuard

Latest version on Packagist CI status PHP version Downloads

A modular CLI toolkit for Laravel projects. Audits production-readiness, clean architecture, env consistency, and dependency CVEs — in under 2 seconds.

📖 Full documentation: github.com/AhmedAnbar/devguard/wiki — installation, every command, every rule, CI recipes, troubleshooting.


Features


Install

As a project dev dependency (recommended)

Globally

The OR-chain is required for 0.x packages — Composer's caret operator pins to the minor, not the major. (Why?)

Make sure ~/.composer/vendor/bin is on your PATH.

As a GitHub Action (CI-only — no Composer install needed)

Full setup, options, and Code Scanning integration: GitHub Actions in the wiki.

For other CI systems (GitLab CI, Bitbucket, Jenkins, CircleCI), see Other CI Systems.


Usage

GitHub Code Scanning (SARIF)

DevGuard findings then appear as inline annotations on PR diffs and in the repository's Security → Code scanning tab. Severities map: Status::Fail → error, Status::Warning → warning. Pass results aren't emitted. The partialFingerprints reuse the same signature scheme as the baseline file, so GitHub correctly tracks "same issue across runs" without re-flagging fixed items.

Adopting on a legacy codebase: baseline + ignores

Run once on a project that has 50 issues:

Now future devguard run invocations skip the baselined 50 and only surface what's new. To see everything anyway, pass --no-baseline. To regenerate after fixing a chunk, run devguard baseline again.

For one-off exceptions in code (no need to bake them into the baseline):

The annotation can sit on the same line or directly above the issue.

Auto-fix

Tool Fixable? What devguard fix <tool> does
deps ✅ yes composer update <pkg> --with-dependencies per advisory
env ✅ yes Append missing keys from .env.example, backup to .env.devguard.bak
deploy ❌ not yet Most issues need human judgement (which queue, which cache)
architecture ❌ no Refactoring is human work — no safe auto-fix

Default is interactive: every mutation prompts for y/N. --dry-run shows the plan without writing. --yes is for CI / when you trust the plan.

Exit codes

Code Meaning
0 All checks passed (warnings allowed)
1 At least one failed check
2 Tool error / unrecoverable failure

CI pipelines can fail the build on non-zero exit.


Tools

Deploy Readiness Score

Check Default impact What it looks for
env_file_exists 20 .env present at project root
debug_mode 15 APP_DEBUG is not true in production
cache_configured 10 CACHE_STORE is a production driver
queue_configured 10 QUEUE_CONNECTION isn't sync/null
rate_limit 10 throttle middleware present on routes
https_enforced 10 URL::forceScheme('https') or APP_URL
logging_configured 5 LOG_CHANNEL isn't single/null

Architecture Enforcer

Rule Severity Detection
folder_structure fail Required Laravel directories exist
fat_controller fail Controller > 300 lines
business_logic_in_controller fail/warn Cyclomatic complexity > 10 / 6
direct_db_in_controller fail DB::table/select/insert/... in actions
service_layer warn app/Services exists & non-empty
repository_layer warn app/Repositories exists & non-empty

JSON output


Configuration

Drop a devguard.php at your project root to override defaults. Only the keys you specify are merged on top of the built-ins.


Extending — add your own tool

  1. Create a class implementing DevGuard\Contracts\ToolInterface:

  2. Register it in bin/devguard (or your own entry script):

That's it — the menu, tools list, JSON renderer, and exit-code logic all pick it up automatically.


Development

Tests run against fixtures under tests/Fixtures/ — a deliberately broken Laravel app and a clean one. CI runs both PHP 8.2 and 8.3.


License

MIT


All versions of devguard with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
laravel/prompts Version ^0.1 || ^0.2 || ^0.3
nikic/php-parser Version ^5.0
symfony/console Version ^7.0
symfony/finder Version ^7.0
symfony/process Version ^7.0
vlucas/phpdotenv Version ^5.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ahmedanbar/devguard contains the following files

Loading the files please wait ...