Download the PHP package portable-content/portable-content-php without Composer
On this page you can find all versions of the php package portable-content/portable-content-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download portable-content/portable-content-php
More information about portable-content/portable-content-php
Files in portable-content/portable-content-php
Package portable-content-php
Short Description PHP implementation of portable content system - Mutable Architecture with AbstractBlock v0.4.0
License Apache-2.0
Homepage https://github.com/portable-content/portable-content-php
Informations about the package portable-content-php
Portable Content PHP
A robust PHP library for managing portable content with comprehensive validation, sanitization, and flexible storage backends.
โจ Key Features
- ๐๏ธ Mutable Domain Objects - Flexible ContentItem and MarkdownBlock entities with proper encapsulation
- ๐งฑ AbstractBlock Architecture - Extensible base class for all block types
- ๐ Type-Safe Validation - Comprehensive input validation and sanitization
- ๐พ Repository Pattern - Clean abstraction with capability discovery system
- ๐งช Comprehensive Testing - 315 tests with 1,669 assertions
- ๐ Complete Documentation - 7 detailed guides covering all aspects
- โก Production Ready - PHPStan Level 9, zero static analysis errors
- ๐งน Clean Architecture - Focused, maintainable codebase with extensible design
Requirements
- PHP 8.3 or higher
- Composer
- SQLite (included with PHP)
Installation
Database Setup
Initialize Database
Database Schema
The system uses SQLite with two main tables:
- content_items: Stores ContentItem metadata (id, type, title, summary, timestamps)
- markdown_blocks: Stores MarkdownBlock content (id, content_id, source, timestamp)
Foreign key constraints ensure data integrity between content and blocks.
Quick Start
Basic Usage
With Validation
Table of Contents
- Installation
- Database Setup
- Quick Start
- Documentation
- Development
- Project Structure
- Features
- Requirements
- License
Features
โ Immutable Domain Objects - Thread-safe, predictable content management โ Type-Safe API - Full PHP 8.3+ type hints and strict typing โ Input Validation - Comprehensive sanitization and validation pipeline โ Repository Pattern - Clean data access abstraction โ Transaction Safety - ACID-compliant database operations โ Extensible Blocks - Plugin system for different content types โ Production Ready - 315+ tests, PHPStan Level 9, CI/CD pipeline โ Developer Friendly - Comprehensive documentation and examples
Documentation
For complete documentation, see the docs/ directory:
- Getting Started Guide - Complete setup and basic usage
- API Reference - Detailed API documentation
- Validation System - Input validation and sanitization
- Repository Pattern - Data persistence and retrieval
- Architecture Overview - System design and components
- Examples - Common usage patterns and recipes
- Future Features - Planned features and roadmap
For AI/LLM Developers
- llms.txt - Essential guide for Large Language Models working with this library
Development
Project Structure
Development Status
Phase 1A: COMPLETE โ
This library represents the completed Phase 1A implementation with all goals achieved:
- โ Basic content entity storage (ContentItem, MarkdownBlock)
- โ SQLite database with proper schema and migrations
- โ Repository pattern for data access
- โ Comprehensive input validation and sanitization
- โ Extensive testing (315+ tests, 1,283+ assertions)
- โ Production-ready code quality (PHPStan Level 9, CS-Fixer)
Next Phase: GraphQL API
Phase 1B will add a GraphQL API layer on top of this solid foundation. See docs/future-features.md for the complete roadmap.
๐ฆ Installation
Or clone the repository:
Contributing
This library follows strict quality standards:
- PHP 8.3+ with strict typing
- PHPStan Level 9 static analysis
- PHP-CS-Fixer code style compliance
- Comprehensive testing with unit and integration tests
- Mutable entity design with proper encapsulation
- Clean architecture with clear separation of concerns
License
Apache 2.0 License
All versions of portable-content-php with dependencies
guzzlehttp/guzzle Version ^7.9
ramsey/uuid Version ^4.7
symfony/validator Version ^7.3