Skip to content

Latest commit

 

History

History
61 lines (39 loc) · 1.63 KB

File metadata and controls

61 lines (39 loc) · 1.63 KB

Morfx PHP

Composer distribution wrapper for the native Morfx AST transformation binary.

This package is not a PHP rewrite of Morfx. It exposes vendor/bin/morfx for PHP projects, downloads the matching native release asset on first use, verifies it against SHA256SUMS, and forwards arguments to the Go binary.

Install

Packagist publication target:

composer require --dev oxhq/morfx
vendor/bin/morfx --version

Until the package is published on Packagist, install from the GitHub repository or a local path repository in your test project.

The current wrapper targets Morfx native v0.4.0.

Wrapper Commands

vendor/bin/morfx wrapper:install
vendor/bin/morfx wrapper:doctor
vendor/bin/morfx wrapper:version
vendor/bin/morfx wrapper:help

All other arguments are forwarded to the native Morfx binary:

vendor/bin/morfx --version
vendor/bin/morfx --help

Environment Overrides

Use an existing binary in locked-down or offline environments:

MORFX_BINARY=/path/to/morfx vendor/bin/morfx --version

Disable automatic downloads:

MORFX_SKIP_DOWNLOAD=1 vendor/bin/morfx --version

When MORFX_SKIP_DOWNLOAD=1 is set, the wrapper requires either MORFX_BINARY or an already cached native binary.

Scope

This package exists only to make Morfx easy to install from PHP projects. Laravel-specific Artisan commands and framework presets should live in a separate package after the Composer wrapper is proven.

Contributing

See CONTRIBUTING.md for the development workflow and SECURITY.md for vulnerability reporting.