Download the PHP package elarion/elarionstack without Composer
On this page you can find all versions of the php package elarion/elarionstack. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download elarion/elarionstack
More information about elarion/elarionstack
Files in elarion/elarionstack
Package elarionstack
Short Description Modern PHP framework for building expressive and maintainable APIs with support for REST, JSON:API, and GraphQL
License MIT
Homepage https://github.com/elarion/elarionstack
Informations about the package elarionstack
🌟 Overview
ElarionStack is a modern, Laravel-inspired PHP framework designed specifically for building expressive and maintainable APIs. It combines the elegance of Laravel with the performance of PHP 8.5, offering a complete toolkit for REST, JSON:API, and GraphQL development.
Now available on Packagist! Install in seconds:
Why ElarionStack?
- 🚀 Performance-First: Built on PHP 8.5 with strict typing and modern optimizations
- 🎯 PSR-Compliant: Follows PSR-7, PSR-11, PSR-15, PSR-17 standards for maximum compatibility
- 🎨 Expressive Syntax: Write clean, readable code with fluent interfaces and modern PHP features
- 🔧 Batteries Included: Complete API toolkit with routing, validation, ORM, resources, and more
- 📐 SOLID Architecture: Clean, testable, and maintainable codebase following best practices
- ✅ Fully Tested: 201 tests with 355 assertions ensuring reliability
- 📦 Easy Install: Available on Packagist for instant setup
✨ Features
🏗️ Core Architecture
Dependency Injection Container
Features:
- ✅ PSR-11 Container Interface
- ✅ Automatic dependency injection & auto-wiring
- ✅ Service providers for modular bootstrapping
- ✅ Singleton & factory bindings
- ✅ Contextual binding with
makeWith()
Service Providers
🌐 HTTP & Routing
Modern Router
Features:
- ✅ FastRoute integration for performance
- ✅ Named routes with URL generation
- ✅ Route groups with prefixes & middleware
- ✅ Parameter constraints with regex
- ✅ RESTful resource routing
PSR-7 HTTP Messages
Standards:
- ✅ PSR-7 HTTP Message Interfaces
- ✅ PSR-17 HTTP Factories
- ✅ Immutable messages
- ✅ Stream handling for large files
PSR-15 Middleware Pipeline
💾 Database Layer
Connection Manager
Features:
- ✅ Multi-driver support (MySQL, PostgreSQL, SQLite)
- ✅ Lazy connection loading
- ✅ Connection pooling
- ✅ Automatic prepared statements
Query Builder
Active Record ORM
🎨 API Resources & Transformers
JSON Resources
JSON:API Support (v1.1 Compliant)
JSON:API Features:
- ✅ Spec v1.1 compliant
- ✅ Resource objects with type, id, attributes, relationships
- ✅ Compound documents with included resources
- ✅ Pagination with links (first, last, prev, next)
- ✅ Error responses following spec
- ✅ Content-Type:
application/vnd.api+json
✅ Validation System
Built-in Rules:
required,email,url,datestring,integer,numeric,boolean,arraymin:n,max:n(supports strings, numbers, arrays)
Custom Rules:
📦 Collections
📚 OpenAPI / Swagger Documentation
Access Documentation:
- Swagger UI:
http://localhost:8000/api/documentation - ReDoc UI:
http://localhost:8000/api/redoc - JSON:
http://localhost:8000/api/documentation.json - YAML:
http://localhost:8000/api/documentation.yaml
🛠️ Helper Functions
⚙️ Configuration System
📦 Installation
Requirements
- PHP 8.4+ or PHP 8.5+ with extensions:
- PDO (pdo_mysql, pdo_pgsql, or pdo_sqlite)
- mbstring
- json
- Composer 2.x
- Docker (optional, for containerized development)
Method 1: Via Composer (Recommended)
Create a new project using Composer:
Or install as a dependency in an existing project:
Method 2: From Source (Development)
Clone the repository for development or contribution:
Method 3: Docker Setup
Run ElarionStack in a containerized environment:
Post-Installation
After installation, your project structure will look like:
Configure your .env file with your database credentials and other settings:
Verify installation by running tests:
🎯 Getting Started with ElarionStack
Now that you've installed ElarionStack from Packagist, let's build your first API in 5 minutes!
Your First API Endpoint
1. Create a simple route in routes/api.php:
2. Test it:
Response:
Build a Complete CRUD API
Let's create a simple Blog Post API with full CRUD operations:
1. Define routes (routes/api.php):
2. Create the controller (app/Http/Controllers/PostController.php):
3. Test your API:
What's Next?
Now that you have a working API, explore these features:
- Database & ORM - Connect to MySQL/PostgreSQL and use the Active Record ORM
- API Resources - Transform your data with elegant Resource classes
- JSON:API - Build JSON:API v1.1 compliant APIs
- Validation - Learn about all validation rules and custom validators
- OpenAPI - Auto-generate interactive API documentation
- Middleware - Add authentication, CORS, rate limiting
🚀 Quick Start
Step 0: Install ElarionStack
Your API is now running at http://localhost:8000! 🎉
Step 1: Create Your First Route
Test it:
Step 2: Create a Controller
3. Create a Model
4. Create an API Resource
5. Configure Database
📖 Documentation
Comprehensive documentation is available in the docs/ directory:
- Container & Dependency Injection - DI container and service providers
- HTTP & Routing - Routing, PSR-7 messages, PSR-17 factories
- Middleware Pipeline - PSR-15 middleware system
- Database - Connection manager and configuration
- Query Builder - Fluent database queries
- ORM Models - Active Record pattern
- API Resources - Data transformation and presentation
- JSON:API - JSON:API v1.1 implementation
- Validation - Validation system and custom rules
- Collections - Working with collections
- OpenAPI - API documentation generation
- Configuration - Configuration management
🧪 Testing
ElarionStack includes a comprehensive test suite with 201 tests and 355 assertions.
Test Structure:
🎯 Examples
Building a RESTful API
JSON:API Implementation
Complex Query Builder Usage
🏗️ Project Structure
Your Application Structure (after composer create-project)
When you create a new project with composer create-project elarion/elarionstack my-api, you get:
Framework Repository Structure (for contributors)
If you're contributing to ElarionStack itself (via git clone):
Note: When using ElarionStack via Composer, you work in the app/ directory for your code. The framework itself lives in vendor/elarion/elarionstack/ and should not be modified directly.
🤝 Contributing
We welcome contributions! Please follow these guidelines:
Development Setup
Coding Standards
- PSR-12 code style
- PSR-4 autoloading
- Strict typing: All files must declare
strict_types=1 - Type hints: Required for all parameters and return types
- PHPStan Level 8: All code must pass static analysis
- Tests: New features require tests (aim for 80%+ coverage)
Workflow
- Create a feature branch:
git checkout -b feature/my-feature - Write your code following standards
- Add tests for new functionality
- Run quality checks:
composer quality - Commit with clear messages:
feat: add new validation rule - Push and create a Pull Request
Commit Convention
Follow Conventional Commits:
feat:New featurefix:Bug fixdocs:Documentation changesrefactor:Code refactoringtest:Test additions/changesperf:Performance improvementschore:Maintenance tasks
📊 Quality Metrics
🗺️ Roadmap
Completed Features (15/15) ✅
- [x] Container & Dependency Injection (PSR-11)
- [x] Service Providers
- [x] Configuration System
- [x] HTTP Router with FastRoute
- [x] PSR-7 HTTP Messages
- [x] PSR-17 HTTP Factories
- [x] PSR-15 Middleware Pipeline
- [x] Database Connection Manager
- [x] Fluent Query Builder
- [x] Active Record ORM
- [x] API Resources & Transformers
- [x] JSON:API v1.1 Support
- [x] Validation System
- [x] Collection Class
- [x] OpenAPI/Swagger Documentation
Future Enhancements
-
[ ] Authentication & Authorization
- JWT authentication
- API token management
- Role-based access control (RBAC)
- OAuth2 integration
-
[ ] Database Advanced Features
- Database migrations
- Database seeders
- Eloquent-style relationships
- Query scopes and mutators
-
[ ] Caching Layer
- PSR-6 & PSR-16 cache interfaces
- Redis support
- Memcached support
- File-based caching
-
[ ] Queue System
- Background job processing
- Redis queue driver
- Database queue driver
- Failed job handling
-
[ ] Event System
- Event dispatcher (PSR-14)
- Event listeners
- Event subscribers
-
[ ] GraphQL Support
- GraphQL server integration
- Schema builder
- Query resolvers
- Mutations
-
[ ] CLI Tools
- Artisan-like command system
- Code generators (models, controllers, resources)
- Database migrations CLI
- Development server
- [ ] Testing Utilities
- HTTP testing helpers
- Database factories
- Mock helpers
- Integration test utilities
📄 License
ElarionStack is open-sourced software licensed under the MIT License.
🙏 Acknowledgments
ElarionStack is inspired by the excellent work of:
- Laravel - For API design philosophy and elegant syntax
- Symfony - For robust component architecture
- PHP-FIG - For PSR standards
📞 Support & Community
- Documentation: docs/
- Issues: GitHub Issues
- Discussions: GitHub Discussions
All versions of elarionstack with dependencies
psr/http-message Version ^2.0
psr/http-factory Version ^1.1
psr/http-server-handler Version ^1.0
psr/http-server-middleware Version ^1.0
psr/container Version ^2.0
psr/log Version ^3.0
nikic/fast-route Version ^1.3
symfony/var-dumper Version ^7.2