PHPackages                             timelock/timelock - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. timelock/timelock

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

timelock/timelock
=================

A PHP package to find files unchanged since a specified date.

0.1.1(1y ago)07MITPHPPHP &gt;=8.2

Since Aug 24Pushed 1y ago1 watchersCompare

[ Source](https://github.com/yigitcukuren/timelock)[ Packagist](https://packagist.org/packages/timelock/timelock)[ RSS](/packages/timelock-timelock/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (6)Versions (3)Used By (0)

TimeLock
========

[](#timelock)

**TimeLock** is a command-line tool designed to help developers identify files in a Git repository that have remained unchanged since a specific date. It can be configured to exclude specific authors, paths, and file types using regex patterns.

Table of Contents
-----------------

[](#table-of-contents)

- [Features](#features)
- [Installation](#installation)
- [Usage](#usage)
- [Configuration](#configuration)
- [Examples](#examples)
    - [Example Output](#example-output)
- [Running Tests](#running-tests)
- [Contributing](#contributing)
- [License](#license)

Features
--------

[](#features)

- **File Detection**: Detects files in a Git repository that have not changed since a specified date.
- **Author Exclusion**: Exclude files from specific authors.
- **Path and Regex Exclusions**: Exclude files based on paths or regex patterns.
- **Output Formats**: Supports both table and JSON output formats.

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

[](#installation)

To install **TimeLock** via Composer, run the following command:

```
composer require timelock/timelock
```

After installation, the `timelock` binary will be available in the `vendor/bin` directory.

Usage
-----

[](#usage)

The `check` command is the main CLI tool provided by TimeLock. Below is an example of how to use it:

```
vendor/bin/timelock check --config=path/to/timelock.yml
```

### Command-Line Options

[](#command-line-options)

- `path` (optional): The directory path to check. Defaults to the current directory.
- `--config` (optional): The path to the configuration file. Defaults to `timelock.yml` in the current directory.
- `--output-format` (optional): The output format (`table` or `json`). Defaults to `table`.

Configuration
-------------

[](#configuration)

TimeLock is configured using a YAML file (`timelock.yml`). Below is an example configuration file:

```
since: '5 years ago'               # Files unchanged since this date will be flagged
excludeAuthors:                    # Authors to exclude from the check
  - 'John Doe'
  - 'Jane Smith'
exclude:                           # Paths to exclude from the check
  - 'vendor/'
  - 'tests/'
excludeRegex:                      # Regex patterns to exclude from the check
  - '/.*Controller\.php$/'
vcs: 'git'                         # Version control system to use (default is 'git')
```

### Configuration Options

[](#configuration-options)

- `since`: A date string or timestamp to check files against.
- `excludeAuthors`: A list of author names to exclude.
- `exclude`: A list of paths to exclude.
- `excludeRegex`: A list of regex patterns to exclude specific files.
- `vcs`: The version control system to use. Currently supports `git`.

Examples
--------

[](#examples)

### Basic Usage

[](#basic-usage)

Check for files unchanged in the current directory:

```
vendor/bin/timelock check --config=/path/to/your-config.yml
```

### JSON Output

[](#json-output)

Get the output in JSON format:

```
vendor/bin/timelock check --config=/path/to/your-config.yml --output-format=json
```

### Example Output

[](#example-output)

Here’s an example of what the output might look like when using the `table` format:

```
vendor/bin/timelock check --config=path/to/timelock.yml
```

Output:

```
+------------+-----------+---------------------+---------+
| File       | Author    | Last Modified       | Changes |
+------------+-----------+---------------------+---------+
| file1.txt  | John Doe  | 2017-06-01 12:00:00 | 1       |
+------------+-----------+---------------------+---------+
| file2.txt  | Jane Doe  | 2019-03-15 15:30:00 | 3       |
+------------+-----------+---------------------+---------+

Execution time: 0.42 seconds

```

In this example:

- `File`: The name of the file that has been unchanged since the specified date.
- `Author`: The author of the last commit to that file.
- `Last Modified`: The date and time when the file was last modified.
- `Changes`: The number of changes made to the file.

Running Tests
-------------

[](#running-tests)

To run the test suite, use PHPUnit. If you haven’t installed PHPUnit globally, you can use the local installation:

```
composer test
```

The tests are located in the `tests` directory and cover the core functionality of the TimeLock tool, including Git integration and configuration handling.

Contributing
------------

[](#contributing)

We welcome contributions! Here’s how you can get involved:

1. Fork the repository.
2. Create a new branch (`git checkout -b feature/your-feature`).
3. Make your changes.
4. Commit your changes (`git commit -m 'Add some feature'`).
5. Push to the branch (`git push origin feature/your-feature`).
6. Open a pull request.

Please make sure to write tests for your changes and ensure all existing tests pass.

License
-------

[](#license)

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 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 ~0 days

Total

2

Last Release

677d ago

### Community

Maintainers

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

---

Top Contributors

[![yigitcukuren](https://avatars.githubusercontent.com/u/42731194?v=4)](https://github.com/yigitcukuren "yigitcukuren (6 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/timelock-timelock/health.svg)

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

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k53](/packages/friendsoftypo3-content-blocks)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M418](/packages/drupal-core-recommended)[kimai/kimai

Kimai - Time Tracking

4.8k9.0k1](/packages/kimai-kimai)[phpactor/phpactor

PHP refactoring and intellisense tool for text editors

1.9k17.1k1](/packages/phpactor-phpactor)

PHPackages © 2026

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