Download the PHP package markup-carve/carve-php without Composer

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

carve-php

CI Coverage Latest Stable Version Total Downloads PHPStan PHP Version

PHP parser and renderer for Carve, a lightweight markup language for readable source and structured documents.

Implements Carve spec 0.1 (see Versioning & Changelog).

Installation

composer require markup-carve/carve-php

Usage

use MarkupCarve\Carve\CarveConverter;

$converter = new CarveConverter();
$html = $converter->convert('# Hello /Carve/');

The HTML, Markdown, Djot and BBCode importers return a versioned migration-fidelity report from each converter's convertWithFidelityReport() method. One preserved / normalized / degraded / dropped vocabulary spans all four, with format-specific diagnostic codes underneath. The report envelope and the --check-loss gate are in docs/cli.md; HTML also has a detailed import report, in docs/html-import.md.

Besides HTML the converter renders Markdown, plain text and ANSI. The Markdown writer's options are in docs/markdown-output.md, and every node can carry its source line - docs/source-lines.md.

A document can pull in other files with {{ chapter.crv }}. It is opt-in and off by default - the core parser performs no file I/O - and the resolver you supply is the security boundary: docs/includes.md.

Source-aware tools can prepare stale-safe structured formatting changes through CarveConverter::toCarvePatch(); see the source-preserving patch guide.

CLI

vendor/bin/carve README.crv > README.html   # render (HTML by default)
vendor/bin/carve --markdown README.crv      # or --plain, --ansi, --json
vendor/bin/carve lint README.crv            # report problems, change nothing
vendor/bin/carve migrate --from html p.html # convert into Carve

Every subcommand and flag is in docs/cli.md.

Sandbox

Try this implementation live in the Carve sandbox - explore syntax and extensions, inspect output, and share snippets via pastebin-style links. It also powers the wp-carve WordPress plugin.

ProseMirror / Tiptap

The AST converts to a ProseMirror document and back, so a Tiptap editor in the browser and PHP rendering on the server share one source of truth with no Node runtime. See docs/prosemirror.md.

Untrusted input

Rendering attacker-controlled Carve needs the safe path, which escapes raw HTML instead of emitting it and bounds nesting depth. The threat model, the defaults and the full checklist are in docs/security.md.

Linting

carve lint reports constructs that parse but render differently from what the author intended. The rules and options are in docs/lint.md.

Documentation

Development

Local setup, the test suites, the style and static-analysis gates, and the rules for a spec-affecting change are in CONTRIBUTING.md.


All versions of carve-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
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 markup-carve/carve-php contains the following files

Loading the files please wait ...