PHPackages                             derhasi/tempdirectory - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. derhasi/tempdirectory

ActiveLibrary[Testing &amp; Quality](/categories/testing)

derhasi/tempdirectory
=====================

Provides a representation of a temp directory that will destroy itself.

0.1.5(9y ago)22.6k[1 issues](https://github.com/derhasi/tempdirectory/issues)5GPL-2.0+PHP

Since Dec 29Pushed 8y ago1 watchersCompare

[ Source](https://github.com/derhasi/tempdirectory)[ Packagist](https://packagist.org/packages/derhasi/tempdirectory)[ Docs](https://github.com/derhasi/tempdirectory)[ RSS](/packages/derhasi-tempdirectory/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (7)Used By (5)

tempdirectory
=============

[](#tempdirectory)

[![Travis CI Build status for master](https://camo.githubusercontent.com/a624f827f6531774b40b4d72f42b95ff9e5f64b3972f5fac9eaa39d0a5f3c181/68747470733a2f2f7472617669732d63692e6f72672f646572686173692f74656d706469726563746f72792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/derhasi/tempdirectory)

Provides a temporary directory object, that will kill remove the whole directory on destruction or shutdown.

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

[](#installation)

Simpyl require with composer: `composer require --dev derhasi/tempdirectory`.

Usage
-----

[](#usage)

Example from [composer-preserver-paths](https://github.com/derhasi/composer-preserve-paths/tree/master/tests):

```
$workingDirectory = new TempDirectory('path-preserver-test-working');
// Create directory to test.
$folder1 = $this->workingDirectory->getPath('folder1');
mkdir($folder1);
$file1 = $this->workingDirectory->getPath('file1.txt');
file_put_contents($file1, 'Test content');
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity57

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

Recently: every ~191 days

Total

6

Last Release

3389d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5613deedd974152f066c46795af9d5dd85cb84bd0c05ebb921287479c82b0c0f?d=identicon)[derhasi](/maintainers/derhasi)

---

Top Contributors

[![derhasi](https://avatars.githubusercontent.com/u/118502?v=4)](https://github.com/derhasi "derhasi (27 commits)")

---

Tags

phpunitfilesystemtesttemporary

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[ta-tikoma/phpunit-architecture-test

Methods for testing application architecture

10745.9M13](/packages/ta-tikoma-phpunit-architecture-test)[kenjis/ci-phpunit-test

An easier way to use PHPUnit with CodeIgniter 3.x

5861.2M3](/packages/kenjis-ci-phpunit-test)[php-mock/php-mock-phpunit

Mock built-in PHP functions (e.g. time()) with PHPUnit. This package relies on PHP's namespace fallback policy. No further extension is needed.

1718.2M399](/packages/php-mock-php-mock-phpunit)[ergebnis/phpunit-slow-test-detector

Provides facilities for detecting slow tests in phpunit/phpunit.

1468.1M72](/packages/ergebnis-phpunit-slow-test-detector)[zenstruck/assert

Standalone, lightweight, framework agnostic, test assertion library.

8114.9M8](/packages/zenstruck-assert)[gecko-packages/gecko-php-unit

Additional PHPUnit asserts and constraints.

1373.9M4](/packages/gecko-packages-gecko-php-unit)

PHPackages © 2026

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