awcodes/html-faker

This package is abandoned and no longer maintained. The author suggests using the https://github.com/awcodes/content-faker package instead.

A better html faker.

Maintainers

Package info

github.com/awcodes/html-faker

Homepage

pkg:composer/awcodes/html-faker

Transparency log

Statistics

Installs: 3 958

Dependents: 2

Suggesters: 0

Stars: 11

Open Issues: 0

v0.4.0 2025-06-10 18:02 UTC

This package is auto-updated.

Last update: 2026-07-13 17:35:25 UTC


README

Latest Version on Packagist Total Downloads

Warning

This package is deprecated and no longer maintained. Please use awcodes/content-faker instead.

Installation

You can install the package via composer:

composer require awcodes/html-faker

Usage

use Awcodes\HtmlFaker\HtmlFaker;

HtmlFaker::make()
    ->heading(int | string | null $level = 2)
    ->paragraphs(int $count = 1, bool $withRandomLinks = false)
    ->unorderedList(int $count = 1)
    ->orderedList(int $count = 1)
    ->image(int $width = 640, int $height = 480, string $text = null)
    ->link(string $text = null, string $url = null)
    ->video(?string $provider = 'youtube', ?int $width = 640, ?int $height = 480)
    ->details()
    ->code(string | null $className = 'hljs')
    ->blockquote()
    ->hr()
    ->br()
    ->table()
    ->generate(); // <-- this is required to generate the html

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.