Skip to content

An online playground for trying out the Mago PHP linter & formatter in your browser—no install required.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

carthage-software/mago-playground

Repository files navigation

Mago Playground

This repository contains a simple React web app that demonstrates Mago’s PHP linter and formatter in the browser. It allows you to play with Mago’s capabilities without having to install anything locally.

About Mago

Mago is a toolchain for formatting, linting, and analyzing PHP code. The goal is to provide a robust, modern approach to PHP language analysis.

Features

  • Browser-based: Instantly run Mago’s linter, and formatter from a web page.
  • Live Examples: Switch between preloaded code samples or paste your own snippet for quick tests.
  • Configurable Linter: Enable or disable specific plugins and rules at runtime.

Getting Started

  1. Clone the repo:

    git clone https://github.com/carthage-software/mago-playground.git
    cd mago-playground
  2. Install dependencies:

     npm install
  3. Start the development server:

    npm start

How It Works

  • WASM Integration: The project uses the compiled WebAssembly build of Mago for all PHP analysis.
  • React Frontend: A simple React UI allows you to switch versions, manage linter rules, and preview the formatted code.

Deployment

The project is hosted on GitHub Pages and is automatically deployed on every push to the main branch.

License

Mago Playground is licensed under either of

  • MIT License (MIT) - see LICENSE-MIT file for details
  • Apache License, Version 2.0 (Apache-2.0) - see LICENSE-APACHE file for details

at your option.

About

An online playground for trying out the Mago PHP linter & formatter in your browser—no install required.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published