Download the PHP package rafiquljakir/fynoverify without Composer

On this page you can find all versions of the php package rafiquljakir/fynoverify. 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 fynoverify

fynoVerify: Developer Documentation

Package: rafiquljakir/fynoverify · Namespace: Rafiquljakir\FynoVerify · Repository: https://github.com/Rafiqul-jakir/fynoverify · License: MIT

Status: early release (0.x). Commands, options and report fields may still change before 1.0. Declared support: PHP ^8.2, Laravel 11 and 12.


Contents

  1. What fynoVerify is
  2. Installation
  3. Quick start
  4. Core concepts
  5. Command reference
  6. Configuration reference
  7. Report schemas
  8. Exit codes and CI
  9. Output path policy
  10. Security and privacy
  11. Architecture
  12. Extending the package
  13. Testing the package
  14. Releasing
  15. Troubleshooting and FAQ
  16. Limitations and roadmap

1. What fynoVerify is

fynoVerify is a Laravel development and CI tool for API and authorization regression testing. It does three jobs:

  1. Inventory the routes your application registers (fyno:scan).
  2. Audit declared test evidence: check that each in-scope route is mapped to an existing test file or has a written exemption (fyno:coverage).
  3. Suggest tests for each in-scope route, based only on route metadata and your configuration (fyno:plan).

A fourth command, fyno:doctor, diagnoses installation and configuration problems.

What it does not do

It does not Why it matters
Run your tests A mapped test file may be weak, skipped or failing. Always run your real suite separately.
Read or judge test file contents Evidence files are only checked for existence and readability.
Measure line or branch coverage The metric is declared test-evidence coverage, not code coverage.
Declare a route secure or vulnerable It issues no security verdict. Plan items are suggested scenarios.
Make network calls, send telemetry, or call AI services None exist in this release.
Execute controllers, run migrations, or touch the database It is read-only.

2. Installation

Requirements: PHP 8.2+, Composer 2, Laravel 11 or 12.

Verify discovery

The service provider is auto-discovered through extra.laravel.providers. Confirm:

You should see fyno:scan, fyno:coverage, fyno:plan and fyno:doctor. Then run php artisan fyno:doctor.

Publish the config (optional)

This copies config/fynoVerify.php into your app. Without it the package works on defaults, and a partially published config is fine because omitted keys fall back to defaults.

Because the package is a require-dev dependency, the commands are absent after composer install --no-dev.

To work on the package itself, clone the repository and see section 13.


3. Quick start

Example mapping:

The IDs shown are examples. Use the IDs your own application reports. The packaged default config contains no fictional mappings.


4. Core concepts

4.1 Route IDs

Every command identifies a route the same way, and your config keys must match.

Route ID Example
Named Exact route name api.documents.show
Unnamed METHODS uri (methods joined by \|) GET\|HEAD api/ping
Unnamed, with a domain constraint METHODS uri @ domain POST api/x @ tenant.example.com

Notes:

4.2 URI normalization and patterns

URIs are normalized before matching: no leading or trailing slash, and the root route is /.

Patterns are globs. * matches any characters, including /. Everything else is literal and matching is case-sensitive.

Pattern Matches Does not match
api/* api/users, api/users/{user} web/users, API/users
api/v1.0/* api/v1.0/x api/v1x0/x (dots are literal)
/ the root route everything else
* every route, including / none

A leading slash in a pattern is normalized away (/api/* equals api/*). Patterns must be non-empty strings with no control characters.

4.3 Scope

For fyno:coverage and fyno:plan, a route is in scope when it matches at least one include_uri_patterns entry and no exclude_uri_patterns entry. Include runs first, then exclude removes routes from that set.

Routes outside the scope are not audited, but coverage reports list their IDs under scope.not_in_scope_route_ids, so the effective scope is always visible.

4.4 Coverage statuses

Status Meaning
covered Mapped to a file that exists, is readable, is a regular file, and resolves inside the project root.
ignored Has an entry in ignored_routes with a non-blank reason.
uncovered Neither a mapping nor an exemption exists.
missing-evidence A mapping exists but the file is missing, unreadable, not a regular file, absolute, contains .., or resolves outside the project.
configuration-error Blank path, blank reason, declared as both covered and ignored, or the route ID is ambiguous (shared by several routes).

Evaluation order for each in-scope route: ambiguous ID, then declaration problem, then covered, then ignored, then uncovered.

Stale declarations are IDs in covered_routes or ignored_routes that match no registered route. They are reported separately from route statuses (stale_declarations). A declaration for a route that exists but is outside the scope is not stale; it produces a warning and has no effect.

4.5 Declared test-evidence coverage

covered means "you pointed this route at a file that exists". It does not mean the file contains relevant assertions, that tests pass, that the route is secure, or that branches are covered. Every coverage report carries this disclaimer.


5. Command reference

All commands return a Laravel exit code (see section 8). Machine-readable output (json, markdown) written to stdout is never mixed with decorations. Error and diagnostic messages go to stderr.

5.1 fyno:scan

Read-only route inventory.

Option Default Description
--format table Output format. Anything else exits 2.
--filter none Glob on the normalized URI. An invalid pattern exits 2.
--output none Write a report file instead of printing. Requires json or markdown; combining it with table exits 2.
--force off Allow replacing an existing --output file.

Examples:

Route record fields

Field Type Description
id string Route ID (see 4.1).
name string or null Route name.
methods string[] Sorted, unique, upper-case verbs.
domain string or null Domain constraint.
uri string Normalized URI. Optional parameters keep their ? (fvt/opt/{id?}).
action string Laravel's action label, such as App\Http\Controllers\X@show or Closure.
middleware string[] Labels declared on the route, de-duplicated, in Laravel's order. Middleware group names such as api are not expanded. Closures appear as Closure.
parameters string[] Parameter names without ?.
where_constraints object Parameter name to constraint pattern, sorted by name. Serialized as {} when empty.

Behavior:

5.2 fyno:coverage

Audits declared test evidence for in-scope routes.

Flow:

  1. Validate configuration. Structural errors produce a report with configuration_errors and exit 2.
  2. Inspect routes and partition them into in-scope and not-in-scope.
  3. Classify each in-scope route, check stale declarations, and compute failure reasons.
  4. Render. A report is always produced, even for a failed audit, and --output still writes it.

The audit fails with exit 1 when any of these hold:

Evidence files are only checked for existence, readability and being a regular file inside the project root. They are never opened for their contents and never executed.

5.3 fyno:plan

Generates reviewable test suggestions for in-scope routes.

Invalid configuration prints each error to stderr and exits 2.

Each scenario is always status: "suggested", heuristic: true, requires_human_review: true, and lists what your team must supply (requires_from_team). Nothing is ever labelled passed, failed or vulnerable. Every plan carries: "These are metadata-based test suggestions, not executed tests or a security verdict."

Signals derived from a route:

Signal Definition
Authentication signal A middleware label matching auth, auth.basic, can, role, permission, abilities or ability (optionally followed by :...), or a label containing Authenticate or Authorize, or the URI matching plan.protected_uri_patterns.
Privilege signal A label matching can, role, permission, abilities, ability, or containing Authorize; or an admin URI segment.
Throttle signal A label starting with throttle or containing ThrottleRequests.
Write route Methods include POST, PUT, PATCH or DELETE.
Has parameters The route has at least one parameter.

Scenario catalog (output order is by priority, then this order):

Category Suggested when Priority
guest-access Authentication signal present high
access-intent No authentication signal visible. This is not evidence the route is public. medium
authorization Authentication signal present high with a privilege signal, otherwise medium
ownership Route has parameters high for write routes, otherwise medium
validation Write route medium
not-found Route has parameters medium
state-change Write route high for PUT/PATCH/DELETE, otherwise medium
http-method Write route low
rate-limit Throttle signal present medium
mass-assignment PUT or PATCH (a hypothesis) medium
api-contract URI is api or starts with api/ low

Suggestions are de-duplicated per category|title, filtered by plan.enabled_suggestions, ordered, and capped at plan.max_scenarios_per_route. plan.max_routes limits the number of routes; omitted routes are reported in summary.routes_omitted and warnings.

5.4 fyno:doctor

Read-only diagnostics.

Check Passes when Otherwise
PHP version PHP is 8.2 or newer fail
Laravel version Major version is 11 or 12 warning
Project base path base_path() is a directory fail
Configuration Config loads and validates fail (errors) or warning (unknown keys)
Route registration At least one route can be inspected warning if none
Evidence paths Declared paths are project-relative with no .. fail; warning if none declared yet or the config is invalid
Test runner files phpunit.xml, phpunit.xml.dist, tests/Pest.php or tests/ found (heuristic) warning

Each check has a status (pass, warning, fail), a message, and an optional recommendation. The command exits 1 only if a check fails. An exception inside a check becomes a failing check rather than a crash. It never prints environment values, credentials or connection strings, and it never modifies files. Evidence existence is checked by fyno:coverage, not by doctor.


6. Configuration reference

File: config/fynoVerify.php. Config key: fynoVerify. Publish tag: fynoVerify-config. Every key is optional and validated at runtime; messages name the exact key.

coverage

Key Type Default Behavior
include_uri_patterns list of strings ['api/*'] Routes matching any pattern are in scope. An empty list is an error, so scope never silently widens or empties.
exclude_uri_patterns list of strings [] Removes routes from scope after inclusion.
covered_routes map of route ID to path [] Project-relative path to an existing test file.
ignored_routes map of route ID to reason [] Reason must be non-blank.
fail_on_stale_declarations bool true Exit 1 when a declared ID matches no route.
fail_on_empty_scope bool true Exit 1 when no routes are in scope.

plan

Key Type Default Behavior
enabled_suggestions list of category names all eleven Unknown names are an error.
protected_uri_patterns list of strings [] Treated like an authentication signal.
max_scenarios_per_route integer, 1 or more 8 Keeps the highest-priority suggestions.
max_routes integer 1 or more, or null null Caps routes in a plan.

Validation levels

Problem Result
Wrong type, invalid pattern, list where a map is expected, empty include list, unknown plan category, bad integer Error. fyno:coverage exits 2 and still emits a report with configuration_errors. fyno:plan exits 2. fyno:doctor reports a failing check.
Blank evidence path, blank exemption reason, route declared as both covered and ignored Route-level configuration-error with exit 1.
Unknown key Warning only.

Pitfalls

Evidence path rules


7. Report schemas

JSON reports use UTF-8, unescaped slashes and a trailing newline. Canonical output has no timestamps, so identical inputs give identical output and diffs are meaningful.

schema_version is "1.0". Adding optional fields keeps the version. Renaming, removing or retyping fields bumps it.

Common fields: tool (fynoVerify), schema_version, report_type (scan, coverage, plan, doctor), disclaimer (all except doctor), warnings (scan, coverage, plan).

7.1 Scan

filter is null when no filter was given.

7.2 Coverage

7.3 Plan

7.4 Doctor

7.5 Markdown output

Scan, coverage and plan can be rendered as Markdown. All route metadata is escaped: \ | * _ [ ]are backslash-escaped,< > &` become HTML entities, and control characters (including newlines and ANSI escapes) collapse to spaces. A hostile route name cannot add table rows, inject links or emit raw HTML.

7.6 Parsing example


8. Exit codes and CI

Code Constant Meaning
0 EXIT_OK Success, or the audit passed.
1 EXIT_CHECK_FAILED fyno:coverage policy failure, or fyno:doctor has a failing check.
2 EXIT_INVALID Invalid arguments or configuration, or an unsafe or unwritable --output.
3 EXIT_INTERNAL Unexpected internal error. Never reported as success.

With --format=json and no --output, stdout contains only the JSON document, so pipelines can parse it safely. Errors go to stderr. Passing -v adds a stack trace for internal errors.

GitHub Actions

Run the audit and your tests as separate steps. A passing audit never implies tests ran.

if: always() uploads the report even when the audit fails. Gate merges on the exit code: 1 means fix declarations, 2 means fix configuration.


9. Output path policy

--output is the only way fynoVerify writes a file. Rules enforced by ReportWriter:

Rule Detail
Project-relative only Absolute paths (/x, \x, C:\x) and .. segments are rejected.
Extension matches format .json for JSON; .md or .markdown for Markdown.
Protected top-level directories vendor, node_modules, .git, .github, app, config, routes, database, src, tests, bootstrap.
Protected file names (anywhere) composer.json, composer.lock, package.json, package-lock.json, readme.md, changelog.md, license.md.
No symlinks The target is never a symlink, and the nearest existing parent must resolve inside the project root.
No silent overwrite An existing file is replaced only with --force.
Directories Missing parent directories are created (mode 0755). A file in the way is an error.

Every violation exits 2 with a message naming the problem. A good default location is storage/app/fynoverify/<name>.json. The protected-directory list is a safeguard, not a security boundary.


10. Security and privacy

Report suspected vulnerabilities privately through GitHub's Security tab ("Report a vulnerability") rather than a public issue.


11. Architecture

11.1 Layout

11.2 Data flow

Reports are plain arrays built in services. Commands only parse options, call services, render and map results to exit codes.

11.3 Design principles

11.4 Key classes

Class Responsibility
RouteInspector::all() Builds sorted RouteRecords. Uses gatherMiddleware() (declared labels), parameterNames(), $route->wheres, getActionName().
ConfigurationValidator::validate(mixed) Returns a ValidationResult with settings (always usable, defaults for invalid keys), errors and warnings.
CoverageAuditor::audit(routes, settings, basePath) Returns the coverage report array. CoverageAuditor::configurationFailure() builds the exit-2 report.
TestPlanBuilder::build() / scenariosFor() Builds the plan, or the scenario list for one route.
EvidencePathResolver::check() / validateSyntax() Full filesystem check, or static syntax check only. Returns an error string or null.
ReportWriter::write() Applies the output path policy and writes the file, or throws ReportWriteException.
BaseCommand::emitDocument() Prints raw content, or delegates to ReportWriter. Returns an exit code on failure or null on success.

12. Extending the package

12.1 Add a plan scenario category

  1. Add the category name to TestPlanBuilder::CATEGORIES. The validator reads this constant, so plan.enabled_suggestions accepts it automatically.
  2. In TestPlanBuilder::scenariosFor(), add a candidate via $this->scenario(category, title, rationale, priority, priorityRule, basis, requires). Base it only on route metadata or explicit config.
  3. Add the category to the default enabled_suggestions list in config/fynoVerify.php.
  4. Add unit tests in TestPlanBuilderTest (when it appears, when it does not, its priority) and update the tables in this file.

Rules to keep: never use verdict language ("vulnerable", "passed", "failed"); always set heuristic and requires_human_review; say what the team must supply.

12.2 Add a config key

  1. Add a default in config/fynoVerify.php with a comment.
  2. Add the key to COVERAGE_KEYS or PLAN_KEYS in ConfigurationValidator (so it is not flagged unknown), validate it with the existing helpers, and add a property to Settings.
  3. Pass it where needed and test both valid and invalid values.

12.3 Add an output format

Add a renderer method to ReportRenderer, allow the format in the commands' formatOption([...]) list, and extend the extension rules in ReportWriter::write(). Escape every route-derived string through Text.

12.4 Add a command

Create a class extending BaseCommand with a $signature (fyno:...), a handle() that wraps its body in $this->guard(...), use failWith() for user-correctable errors, and register it in FynoVerifyServiceProvider::boot(). Keep logic in services.

12.5 Future test helpers

The source is organized so a Testing namespace can be added without touching the CLI. Any helper must take the principal, factory, request and expected status explicitly, must not assume an App\Models\User or a role system, and must never produce tests that pass trivially.


13. Testing the package

Layout

Test infrastructure

tests/TestCase.php creates a throwaway project root under the system temp directory for each test and calls $this->app->setBasePath(), so evidence checks and report writes never touch real files. It also sets include_uri_patterns to ['fvt/*'], and the feature tests register their routes under that prefix to stay clear of routes the Testbench skeleton registers.

Helper Purpose
run_($command, $options) Runs Artisan::call; returns [exitCode, output].
runJson($command, $options) As above with --format=json; returns the decoded report.
touchFile($relative) Creates an evidence file in the temp project.
snapshot() Lists files with mtime and size, to prove commands are read-only.
registerRoutes() (feature base) Registers varied routes: named, unnamed, optional parameter with constraint, multi-method, domain and root.

Under Testbench, stderr and stdout share one buffer, so error text appears in Artisan::output(). In real use they are separate streams.

What the suite covers

Known gaps

There is no Windows path test and no end-to-end test that installs the package into a fresh Laravel application. The CI workflow (.github/workflows/tests.yml) runs a PHP 8.2 to 8.4 and Laravel 11 to 12 matrix.


14. Releasing

  1. Run all checks locally (section 13) and make sure CI is green.
  2. Update CHANGELOG.md (only features that exist and are tested).
  3. Do not add a version field to composer.json; Packagist reads Git tags.
  4. Tag and push: git tag -a v0.1.0 -m "v0.1.0" && git push origin v0.1.0.
  5. Packagist picks up the tag automatically through the GitHub webhook. If the webhook is not enabled, open the package page and click Update.

Follow semantic versioning. Changing the report schema_version, command signatures, exit codes, config keys, the route ID scheme, the vendor name or the namespace is a breaking change.


15. Troubleshooting and FAQ

*The `fyno:commands are not listed.** Runcomposer dump-autoload, confirm the package is inrequire-dev, and that you did not install with--no-dev`.

fyno:coverage exits 2. The configuration is invalid. The message names the key, for example coverage.include_uri_patterns: expected a list of strings, got string. fyno:doctor shows the same errors.

A route shows missing-evidence. Read the route's message: the file does not exist, the path is absolute or contains .., or it resolves outside the project. Use a path relative to the project root.

Everything is reported as a stale declaration. Route IDs changed. Re-run fyno:scan and copy the current IDs. Unnamed route IDs change with their method or URI.

Empty scope failure. Your include patterns match nothing. Compare them with the uri column of fyno:scan. URIs have no leading slash, and matching is case-sensitive.

Two routes share an ID. Add a unique ->name() to each. Until then both are configuration-error.

Output file refused. Choose a path such as storage/app/fynoverify/report.json with the right extension, and add --force to replace an existing file.

Does a covered route mean it is tested? No. It means a file you named exists. Run your test suite to learn whether tests pass.

Why does fyno:plan suggest tests for routes that have auth middleware? A middleware label is not proof of correct behavior. The suggestions ask you to verify guest, authorization and ownership behavior explicitly.

Why is a route with no visible middleware not flagged as public? Global and custom middleware are invisible to route metadata, so it gets an access-intent suggestion ("confirm the intended policy") instead of a claim.

Can I commit the JSON reports? You can, but treat them as internal documentation because they describe your API surface.

Which Laravel versions are supported? Laravel 11 and 12 on PHP 8.2 or newer, as declared in composer.json and exercised by the CI matrix.


16. Limitations and roadmap

Current limitations

Not implemented (ideas only)

None of these exist in the current code.


All versions of fynoverify with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/console Version ^11.0|^12.0
illuminate/routing Version ^11.0|^12.0
illuminate/support Version ^11.0|^12.0
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 rafiquljakir/fynoverify contains the following files

Loading the files please wait ...