GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — core/docs at main · api-platform/core

Expand file tree

/

docs

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

docs

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
adr
adr
 
 
config
config
 
 
guides
guides
 
 
public
public
 
 
src
src
 
 
.gitignore
.gitignore
 
 
.php-cs-fixer.dist.php
.php-cs-fixer.dist.php
 
 
AGENTS.md
AGENTS.md
 
 
README.md
README.md
 
 
composer.json
composer.json
 
 
pdg-autoload.php
pdg-autoload.php
 
 
pdg.config.yaml
pdg.config.yaml
 
 

README.md

Outline

API Platform documentation

Guides

A guide is a PHP executable file that will be transformed into documentation. It follows Diataxis How-To Guides practice which is a must read before writing a guide.

Read the "How To Guide" to understand how to write an API Platform guide.

Guides are transformed to Markdown using php-documentation-generator which is merely a version of docco in PHP adapted to output markdown.

WASM

Guides are executable in a browser environment and need to be preloaded using:

docker run -v $(pwd):/src -v $(pwd)/public/php-wasm:/public -w /public php-wasm python3 /emsdk/upstream/emscripten/tools/file_packager.py php-web.data --preload "/src" --js-output=php-web.data.js --no-node --exclude '*Tests*' '*features*' '*public*' '*/.*'

A build of php-wasm is needed in the public/php-wasm directory to try it out.

Local tests

First run composer update.

Then, get the pdg-phpunit binary that allows to run single-file test.

Use KERNEL_CLASS and PDG_AUTOLOAD to run a guide:

APP_DEBUG=0 \
PDG_AUTOLOAD='pdg-autoload.php' \
KERNEL_CLASS='\ApiPlatform\Playground\Kernel' pdg-phpunit guides/doctrine-search-filter.php
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.