PHPackages                             bakgul/file-history - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. bakgul/file-history

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

bakgul/file-history
===================

This is a helper package, and it can't be used independently. Its purpose is to log the changes of files when they are created/deleted/updated through the commands shipped with the packages, which are part of Packagified Laravel. So this package can't track the changes made manually.

v4.0.2(3y ago)11748MITPHPPHP ^8.1

Since May 17Pushed 3y ago1 watchersCompare

[ Source](https://github.com/bulentAkgul/file-history)[ Packagist](https://packagist.org/packages/bakgul/file-history)[ RSS](/packages/bakgul-file-history/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (11)Used By (8)

File History
============

[](#file-history)

This is a helper package, to keep/undo/redo file history when files are created/deleted/updated via console commands of my other packages.

That being said, I don't see any reason not be able to use it outside console independantely. But I've never tried it.

Installation
------------

[](#installation)

```
sail composer require bakgul/file-history --dev

```

Optionally, you can publish package's config file

```
sail artisan vendor:publish --tag=file-history

```

Commands
--------

[](#commands)

This package contains 3 console commands. They are quite self-explanatory and don't expect any arguments or options.

```
sail artisan file-history:delete

```

```
sail artisan file-history:redo

```

```
sail artisan file-history:undo

```

Usage
-----

[](#usage)

First, you should use `HasHistory` trait on command file and call `$this->logFile();` in `handle()` method. This will generate a history file to use during current command's lifecycle.

Then you should execute the following code before you create/update/delete a file/folder:

```
use Bakgul\FileHistory\FileHistory;

FileHistory::set(
    path: 'path to file',
    isDir: true/false,
    isCreated: true/false
);
```

License
-------

[](#license)

This is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~31 days

Recently: every ~1 days

Total

10

Last Release

1175d ago

Major Versions

v1.1.2 → v2.0.02023-01-01

v2.0.1 → v3.0.02023-02-16

v3.0.1 → v4.0.02023-02-17

PHP version history (2 changes)v1.1.0PHP ^8.0.2

v4.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/dc3c26b9029d2705ffcd2baebee543db52c24b1fb5cb29c5557436de853d42c1?d=identicon)[bulentAkgul](/maintainers/bulentAkgul)

---

Top Contributors

[![bulentAkgul](https://avatars.githubusercontent.com/u/12589023?v=4)](https://github.com/bulentAkgul "bulentAkgul (29 commits)")

### Embed Badge

![Health badge](/badges/bakgul-file-history/health.svg)

```
[![Health](https://phpackages.com/badges/bakgul-file-history/health.svg)](https://phpackages.com/packages/bakgul-file-history)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
