Download the PHP package octacrafts/oc-qr without Composer

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

OC-QR

octacrafts/oc-qr — A framework-agnostic PHP library for generating scannable QR codes (ISO/IEC 18004).

Maintained by OctaCrafts.

Pure PHP core with no Laravel or Symfony dependency. Use it in any PHP 8.2+ project, or wrap it in a Laravel package for your ecosystem.

About OctaCrafts

OctaCrafts is a global IT systems and software engineering company that builds scalable digital ecosystems for businesses worldwide. From idea to launch, the team delivers enterprise-grade solutions focused on long-term growth, performance, and reliability.

What we do:

Beyond client projects, OctaCrafts maintains open-source PHP libraries under the oc/* package family on GitHub @octacrafts. Each ecosystem follows a core-plus-wrapper pattern: framework-agnostic cores for plain PHP and any PSR-compliant app, with dedicated integrations for popular frameworks.

octacrafts/oc-qr is the framework-agnostic core for ISO/IEC 18004 QR code generation. Framework-specific wrappers can build on this package for Laravel, Symfony, and other stacks.

Features

Requirements

Requirement Notes
PHP ^8.2
ext-gd Required for PNG output
ext-json Required

SVG output does not require GD.

Installation

Quick start

SVG

Return an HTTP response (e.g. Slim, Laravel route)

API reference (QrBuilder)

Method Description Default
QrBuilder::create(string $content) Build a QR from text or URL —
errorCorrection(ErrorCorrectionLevel $level) Error correction level M
size(int $pixels) Output image size in pixels 300
margin(int $modules) Quiet zone (white border) in modules; use 4 or more for reliable scanning 4
format(OutputFormat $format) OutputFormat::Png or OutputFormat::Svg PNG
generate() Returns RenderedOutput —

Error correction levels

Level Enum Typical use
L (~7%) ErrorCorrectionLevel::L Clean prints, max data capacity
M (~15%) ErrorCorrectionLevel::M Default — general URLs and text
Q (~25%) ErrorCorrectionLevel::Q Logos, slight damage
H (~30%) ErrorCorrectionLevel::H Smallest logo overlay, harsh environments

RenderedOutput

Advanced usage

For custom colors, forced QR version, or mask pattern, use QrEngine directly:

Version and mask are chosen automatically when omitted.

Architecture

Dependencies flow inward; the public entry point is QrBuilder (or QrEngine for full control).

Layer Responsibility
Core QrBuilder, QrEngine, generation pipeline
Encoder Numeric, alphanumeric, byte, kanji, ECI; mixed-mode segmentation
Correction Reed–Solomon, block split, codeword interleaving
Generator Matrix, finder/timing/alignment patterns, data placement
Masking Eight mask patterns, penalty rules, best-mask selection
Output PNG (ext-gd) and SVG renderers

Extension points live under Octacrafts\QrEngine\Contracts\ for custom encoders, renderers, or pipeline stages.

Laravel integration

This package does not ship Laravel bindings. For a Laravel app, create a thin wrapper package (service provider + facade) that depends on octacrafts/oc-qr and delegates to QrBuilder or QrEngine.

Development

Generate sample files locally:

Outputs are written to examples/output/ (gitignored).

License

MIT License. See LICENSE for details.


OctaCrafts — Scalable IT Systems & AI-Driven Digital Ecosystems

octacrafts.com · [email protected] · +1 (855) 424 4706


All versions of oc-qr with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-gd Version *
ext-json Version *
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 octacrafts/oc-qr contains the following files

Loading the files please wait ...