Download the PHP package yu-corder/php-rcs without Composer
On this page you can find all versions of the php package yu-corder/php-rcs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yu-corder/php-rcs
More information about yu-corder/php-rcs
Files in yu-corder/php-rcs
Package php-rcs
Short Description A pure PHP implementation of a Revision Control System (RCS) for file versioning.
License MIT
Informations about the package php-rcs
php-rcs
A pure PHP implementation of a Revision Control System (RCS) for file versioning.
php-rcs is a lightweight revision control library inspired by traditional RCS tools and modern version control concepts.
This project started as a learning exercise to better understand how revision control systems work internally, including:
- snapshot storage
- revision history management
- file versioning
- CLI tooling
- repository structure design
Although the project is still evolving, it is fully functional and intended to be usable for small personal projects and experimentation.
Features
- Check in file revisions
- Check out previous versions
- View revision history
- Simple JSON-based storage
- Lightweight PHP implementation
- CLI support
- PSR-4 autoloading support
Requirements
- PHP 8.2+
Security Notice
If you use php-rcs to manage sensitive files such as:
.env- API keys
- configuration files
- private credentials
make sure to add the .rcs/ directory to your .gitignore.
The .rcs directory stores full file snapshots, meaning sensitive file contents are saved directly inside JSON history files.
Example:
Without this, sensitive data may accidentally be committed to Git repositories.
Installation
Via Composer
CLI Usage
The package provides a CLI tool:
Check in a file
Example output:
Check out a specific version
Example output:
Show revision history
Example output:
PHP API Usage
Repository Structure
php-rcs automatically creates a .rcs directory next to the target file.
Example JSON Structure
Testing
Run PHPUnit tests:
Code Style
Run PHP-CS-Fixer:
Current Limitations
php-rcs currently uses full snapshot storage for simplicity.
The following features are not yet supported:
- diff-based storage
- concurrent write locking
- binary file handling
- branch/merge workflows
- object hash storage
- compression
- ignore rules
Roadmap
Planned future improvements:
- [ ] diff support
- [ ] latest version retrieval
- [ ] gzip compression
- [ ] binary file support
- [ ] metadata separation
- [ ] lock file support
- [ ]
.rcsignore - [ ] hash-based object storage
- [ ] improved atomic writes
Motivation
This project was created to explore how revision control systems work internally by implementing core concepts from scratch in pure PHP.
The goal is to keep the system simple, understandable, and extensible while learning practical software design patterns along the way.
Support
Author
- yu-corder
- https://yu-syumilog.com/
License
MIT License