Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Demo

on:
push:
branches: [master]
paths:
- demo.php
- demo_files/**
- dummy/**
- tools/build-demo.php
- CREDITS.md
- LICENSE
- .github/workflows/demo.yml
workflow_dispatch:

permissions:
contents: read

concurrency:
group: github-pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
pages: read
steps:
- uses: actions/checkout@v7.0.1
- uses: shivammathur/setup-php@2.40.0
with:
php-version: '8.5'
extensions: gd, dom
coverage: none
- uses: actions/configure-pages@v6.0.0
- run: php tools/build-demo.php
- uses: actions/upload-pages-artifact@v5.0.0
with:
path: build/demo

deploy:
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Publish demo
id: deployment
uses: actions/deploy-pages@v5.0.1
30 changes: 30 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Tests

on: [push, pull_request]

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.3', '8.4', '8.5']
testbench: ['^10.0', '^11.0']
name: PHP ${{ matrix.php }} / Testbench ${{ matrix.testbench }}
steps:
- uses: actions/checkout@v7.0.1
- uses: shivammathur/setup-php@2.40.0
with:
php-version: ${{ matrix.php }}
extensions: gd, mbstring, dom, xml, sqlite3, pdo_sqlite
tools: composer:v2
coverage: none
- run: composer require --dev 'orchestra/testbench:${{ matrix.testbench }}' --no-update --no-interaction
- run: composer update --prefer-dist --no-interaction --no-progress
- run: composer validate --strict
- run: composer lint
- run: composer test -- --display-all-issues
- run: composer audit --locked
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/vendor/
/composer.lock
/.phpunit.cache/
/build/
/dummy/cache/*
!/dummy/cache/IMPORTANT.md
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Changelog

## 2.0.0 — 2026-10-19

- Add generated lorem ipsum with exact or ranged word, sentence, and paragraph counts and an optional title-case modifier, without a new dependency.
- Modernize the demo with blueprint colors, a graph-paper header, local syntax highlighting, and image thumbnails.
- Include complete Composer, Laravel/Blade, and standalone PHP setup instructions in the demo, with high-density image examples.
- Add a static demo exporter and GitHub Pages workflow, including the selected images and required attribution files.
- Support PHP 8.3–8.5 and declare the GD extension requirement.
- Preserve the existing global functions, command strings, output behavior, and drop-in installation.
- Add Composer function autoloading and automatic Laravel service-provider discovery.
- Add Laravel asset/config publishing and Blade installation examples.
- Remove native session startup and application memory-limit changes.
- Cache directory scans and text pools per request, and crop/resize images in one GD pass.
- Write cached crops atomically; distinguish same-name images in different folders and invalidate crops when source timestamps/sizes change.
- Fix obsolete PHP syntax, short-tag-dependent bundled templates, and PHP 8.5 GD deprecations.
- Handle missing assets and prevent asset selection outside the configured root.
- Integrate query/path helpers and reset request-local state with Laravel's request lifecycle.
- Add PHP/Laravel compatibility tests and a GitHub Actions matrix.
8 changes: 8 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Dummy is provided under the Creative Commons Attribution-Share Alike 3.0
United States license, unchanged from the original project.

License text: https://creativecommons.org/licenses/by-sa/3.0/us/legalcode

The Composer identifier LicenseRef-CC-BY-SA-3.0-US refers to this license.
Bundled third-party images retain their individual licenses and attribution;
see CREDITS.md.
285 changes: 245 additions & 40 deletions README.md

Large diffs are not rendered by default.

57 changes: 48 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,53 @@
{
"name": "kerns/dummy",
"description": "A content generation toolkit for rapid prototyping and QA",
"license": "Creative Commons Attribution-Share Alike 3.0 United States",
"authors": [
{
"name": "David Kerns",
"email": "david@kerns.dk"
}
],
"minimum-stability": "dev",
"description": "A content generation toolkit for rapid web prototyping and QA",
"type": "library",
"homepage": "https://github.com/kerns/dummy",
"license": "LicenseRef-CC-BY-SA-3.0-US",
"keywords": ["prototyping", "placeholder", "lorem-ipsum", "images", "laravel", "testing"],
"authors": [{"name": "David Kerns", "email": "david@kerns.dk"}],
"support": {
"docs": "https://kerns.github.io/dummy/",
"issues": "https://github.com/kerns/dummy/issues",
"source": "https://github.com/kerns/dummy"
},
"require": {
"php": "^8.3",
"ext-gd": "*"
},
"require-dev": {
"orchestra/testbench": "^10.0 || ^11.0",
"phpunit/phpunit": "^12.5 || ^13.0"
},
"autoload": {
"files": ["dummy/dummy.php"],
"psr-4": {"Kerns\\Dummy\\": "src/"}
},
"autoload-dev": {
"psr-4": {"Kerns\\Dummy\\Tests\\": "tests/"}
},
"extra": {
"branch-alias": {"dev-master": "2.0.x-dev"},
"laravel": {"providers": ["Kerns\\Dummy\\DummyServiceProvider"]}
},
"scripts": {
"test": "@php -d short_open_tag=0 vendor/bin/phpunit",
"demo:build": "@php tools/build-demo.php",
"lint": [
"@php -l dummy/dummy.php",
"@php -l dummy/Runtime.php",
"@php -l dummy/Lorem.php",
"@php -l src/DummyServiceProvider.php",
"@php -l config/dummy.php",
"@php -l demo.php",
"@php -l tools/build-demo.php"
]
},
"config": {"sort-packages": true},
"archive": {
"exclude": [
"/vendor", "/.phpunit.cache", "/.github", "/tests", "/phpunit.xml", "/composer.lock", "/build",
"/dummy/cache/*", "!/dummy/cache/IMPORTANT.md"
]
}
}
8 changes: 8 additions & 0 deletions config/dummy.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

return [
// Publish assets with: php artisan vendor:publish --tag=dummy-assets
'url' => '/vendor/dummy',
'assets_path' => public_path('vendor/dummy/assets'),
'cache_path' => public_path('vendor/dummy/cache'),
];
Loading
Loading