Download the PHP package studiometa/foehn without Composer
On this page you can find all versions of the php package studiometa/foehn. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download studiometa/foehn
More information about studiometa/foehn
Files in studiometa/foehn
Package foehn
Short Description 🍃 A modern WordPress framework powered by Tempest, featuring attribute-based auto-discovery for hooks, post types, blocks, and more.
License MIT
Homepage https://github.com/studiometa/foehn-framework
Informations about the package foehn
🍃 Føhn
A modern WordPress framework powered by Tempest Framework, featuring attribute-based auto-discovery for hooks, post types, blocks, and more.
Note This package is part of the Føhn Framework monorepo. Please report issues and submit pull requests in the main repository.
Requirements
- PHP 8.5+
- WordPress 6.4+
- Composer
Installation
Quick Start
Bootstrap Føhn in your theme's functions.php:
That's it! Føhn will automatically discover and register all your classes in the app/ directory.
Features
Hooks
Register WordPress actions and filters directly on your methods:
Post Types
Define custom post types as classes with automatic Timber classmap integration:
Taxonomies
ACF Blocks
Create ACF blocks with dependency injection:
Typed DTOs for Block Context
Instead of returning plain arrays from compose(), use typed DTOs for autocompletion and type safety:
Then use it in your block:
The DTO is automatically flattened to a snake_case array before reaching render() and Twig templates. Property names like imageUrl become image_url in the template context.
Built-in DTOs:
| DTO | Description | Factory |
|---|---|---|
LinkData |
Link/button fields | LinkData::fromAcf($acfLink) |
ImageData |
Image/attachment fields | ImageData::fromAttachmentId($id) |
SpacingData |
Spacing fields | SpacingData::fromAcf($fields, $prefix) |
All compose() methods on AcfBlockInterface, BlockInterface and BlockPatternInterface accept either array or Arrayable return types.
Native Gutenberg Blocks with Interactivity API
Context Providers
Inject data into specific templates:
Template Controllers
Handle template rendering with full control:
Block Patterns
Register block patterns with Twig templates:
REST API Routes
Shortcodes
CLI Commands
Føhn provides WP-CLI commands for scaffolding:
Dependency Injection
All discovered classes support constructor injection via Tempest's container:
Configuration
Føhn can be configured in your theme:
Documentation
For complete documentation, see the Føhn documentation.
License
MIT License. See LICENSE for details.
All versions of foehn with dependencies
studiometa/twig-toolkit Version ^2.1
tempest/container Version ^3.18
tempest/discovery Version ^3.18
tempest/generation Version ^3.18
tempest/support Version ^3.18
timber/timber Version ^2.5
vlucas/phpdotenv Version ^5.6