valksor / php-dev
Development tools and utilities for PHP projects including build automation, file watching, and custom PHP-CS-Fixer rules
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/valksor/php-dev
Requires
- php: >=8.4
- ext-dom: *
- ext-inotify: *
- ext-mbstring: *
- ext-pcntl: *
- ext-posix: *
- ext-zip: *
- friendsofphp/php-cs-fixer: *
- symfony/config: *
- symfony/console: *
- symfony/dependency-injection: *
- symfony/finder: *
- symfony/process: *
- valksor/php-bundle: ^1.0
- valksor/php-functions-local: ^1.0
- valksor/php-functions-preg: ^1.0
- valksor/php-sse: ^1.0
Requires (Dev)
- roave/security-advisories: dev-latest
Conflicts
- doctrine/dbal: <4.0
- friendsofphp/php-cs-fixer: <3.81.0
- symfony/framework-bundle: <7.4.0
Replaces
- valksor/php-dev-build: dev-master
- valksor/php-dev-cs-fixer-custom-fixers: dev-master
This package is auto-updated.
Last update: 2025-11-02 03:01:28 UTC
README
A comprehensive PHP development toolkit that provides modern development tools, custom PHP-CS-Fixer fixers, build automation, and hot reloading capabilities for Symfony applications. This library enhances development workflow efficiency with integrated tooling for frontend builds, code quality, and real-time development features.
Features
- Build Tools: Hot reloading, asset compilation, import map management, and development workflow automation
- Custom PHP-CS-Fixer Fixers: Enhanced code quality enforcement with modern PHP 8.4+ best practices
- Hot Reloading: Automatic browser reload on file changes using inotify
- Asset Management: Integrated support for ESBuild, Tailwind CSS, and DaisyUI
- Binary Management: Unified binary download and version management for build tools
- Process Orchestration: Coordinated execution of multiple development services
- SSE Integration: Seamless integration with Server-Sent Events for live updates
Requirements
- PHP 8.4 or higher
- inotify extension (for file watching)
- PCNTL extension (for process management)
- POSIX extension
- friendsofphp/php-cs-fixer (3.81.0 or higher)
- symfony/framework-bundle (7.2.0 or higher)
- Valksor Bundle and related components
Installation
Install the package via Composer:
composer require valksor/php-dev
This meta-package automatically includes:
valksor/php-dev-build- Build tools and hot reloadingvalksor/php-dev-cs-fixer-custom-fixers- Custom PHP-CS-Fixer fixers
Basic Usage
Quick Setup
- Register the bundle in your Symfony application:
// config/bundles.php return [ // ... Valksor\Bundle\ValksorBundle::class => ['all' => true], // ... ];
- Enable the build tools and configure:
# config/packages/valksor.yaml valksor: build: enabled: true hot_reload: enabled: true watch_paths: - 'templates/' - 'src/' - 'assets/'
Start Development Environment
# Start all development tools (hot reload, asset compilation, etc.)
php bin/console valksor:watch
Configure PHP-CS-Fixer
// .php-cs-fixer.php use PhpCsFixer\Config; use ValksorDev\PhpCsFixerCustomFixers\Fixers; $config = new Config(); $config ->setRules([ '@PSR12' => true, 'ValksorPhpCsFixerCustomFixers/declare_after_opening_tag' => true, 'ValksorPhpCsFixerCustomFixers/promoted_constructor_property' => true, // Add more custom fixers as needed ]); // Register custom fixers $fixers = new Fixers(); foreach ($fixers as $fixer) { $config->registerCustomFixers([$fixer]); } return $config;
Documentation
- Build Tools Documentation - Complete guide for build tools, hot reloading, and asset management
- Custom Fixers Documentation - All available PHP-CS-Fixer custom fixers and their usage
- API Reference - Full API documentation and examples
- Configuration Guide - Detailed configuration options
Advanced Usage
Custom Configuration
valksor: build: enabled: true hot_reload: enabled: true watch_paths: - 'templates/' - 'src/Controller/' - 'assets/js/' exclude_patterns: - 'vendor/' - 'var/' debounce_ms: 100 sse_port: 8080 tailwind: enabled: true input: 'assets/css/app.css' output: 'public/build/app.css' minify: false binaries: download_dir: 'bin/build-tools/' esbuild_version: 'latest' tailwind_version: 'latest'
Development Workflow Integration
The toolkit integrates seamlessly with modern Symfony development workflows:
- Real-time Development: Automatic browser reload on template, CSS, JavaScript, and PHP changes
- Asset Compilation: Integrated Tailwind CSS compilation with DaisyUI components
- Import Maps: Automatic JavaScript import map generation and synchronization
- Code Quality: Enhanced PHP-CS-Fixer with modern PHP 8.4+ best practices
Contributing
Contributions are welcome! Please read our Contributing Guidelines for details on:
- Code style requirements (PSR-12)
- Testing requirements for PRs
- One feature per pull request
- Development setup instructions
To contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
Security
If you discover any security-related issues, please email us at security@valksor.dev instead of using the issue tracker.
For security policy and vulnerability reporting guidelines, please see our Security Policy.
Support
- Documentation: Full documentation
- Issues: GitHub Issues for bug reports and feature requests
- Discussions: GitHub Discussions for questions and community support
- Stack Overflow: Use tag
valksor-php-dev
Credits
- Original Author - Creator and maintainer
- All Contributors - Thank you to all who contributed
- Inspiration - Inspired by PHP-CS-Fixer ecosystem
- Valksor Project - Part of the larger Valksor PHP ecosystem
License
This package is licensed under the BSD-3-Clause License.