spatie/temporary-directory
Easily create, use and destroy temporary directories
2.4.0
111M downloads/mo
#248 most downloaded on Packagist
spatie/temporary-directory
What this package is like to depend on
Last release 2 months ago
22 Jun 2026
Ships fairly regularly
a new release about every 5 months
Nearly every release is documented
notes for 24 of 25 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
25 releases · first in 2017
2 releases in the last 12 months
see the full history below
Release timeline
25 releases · Jan 2017 to Jun 2026Releases
latest 25-
2.4.022 Jun 2026Release notes
Open source →What's Changed
- Bump dependabot/fetch-metadata from 2.4.0 to 2.5.0 by @dependabot[bot] in #99
- Bump dependabot/fetch-metadata from 2.5.0 to 3.0.0 by @dependabot[bot] in #100
- Bump dependabot/fetch-metadata from 3.0.0 to 3.1.0 by @dependabot[bot] in #101
- Return static instead of self by @QuentinGab in #102
New Contributors
- @QuentinGab made their first contribution in #102
Full Changelog: 2.3.1...2.4.0
Release notes
Open source →What's Changed
- Bump dependabot/fetch-metadata from 2.4.0 to 2.5.0 by @dependabot[bot] in https://github.com/spatie/temporary-directory/pull/99
- Bump dependabot/fetch-metadata from 2.5.0 to 3.0.0 by @dependabot[bot] in https://github.com/spatie/temporary-directory/pull/100
- Bump dependabot/fetch-metadata from 3.0.0 to 3.1.0 by @dependabot[bot] in https://github.com/spatie/temporary-directory/pull/101
- Return static instead of self by @QuentinGab in https://github.com/spatie/temporary-directory/pull/102
New Contributors
- @QuentinGab made their first contribution in https://github.com/spatie/temporary-directory/pull/102
Full Changelog: https://github.com/spatie/temporary-directory/compare/2.3.1...2.4.0
-
2.3.112 Jan 2026Release notes
Open source →What's Changed
- Bump dependabot/fetch-metadata from 2.2.0 to 2.3.0 by @dependabot[bot] in #89
- Bump dependabot/fetch-metadata from 2.3.0 to 2.4.0 by @dependabot[bot] in #90
- Update issue template by @AlexVanderbist in #93
- ci: add tests for PHP 8.5 by @Chris53897 in #95
- feat: add configurable folder permissions by @matteotrubini in #98
- Bump actions/cache from 4 to 5 by @dependabot[bot] in #97
- Bump actions/checkout from 4 to 6 by @dependabot[bot] in #96
- Bump stefanzweifel/git-auto-commit-action from 5 to 7 by @dependabot[bot] in #94
New Contributors
- @AlexVanderbist made their first contribution in #93
- @Chris53897 made their first contribution in #95
- @matteotrubini made their first contribution in #98
Full Changelog: 2.3.0...2.3.1
Release notes
Open source →What's Changed
- Bump dependabot/fetch-metadata from 2.2.0 to 2.3.0 by @dependabot[bot] in https://github.com/spatie/temporary-directory/pull/89
- Bump dependabot/fetch-metadata from 2.3.0 to 2.4.0 by @dependabot[bot] in https://github.com/spatie/temporary-directory/pull/90
- Update issue template by @AlexVanderbist in https://github.com/spatie/temporary-directory/pull/93
- ci: add tests for PHP 8.5 by @Chris53897 in https://github.com/spatie/temporary-directory/pull/95
- feat: add configurable folder permissions by @matteotrubini in https://github.com/spatie/temporary-directory/pull/98
- Bump actions/cache from 4 to 5 by @dependabot[bot] in https://github.com/spatie/temporary-directory/pull/97
- Bump actions/checkout from 4 to 6 by @dependabot[bot] in https://github.com/spatie/temporary-directory/pull/96
- Bump stefanzweifel/git-auto-commit-action from 5 to 7 by @dependabot[bot] in https://github.com/spatie/temporary-directory/pull/94
New Contributors
- @AlexVanderbist made their first contribution in https://github.com/spatie/temporary-directory/pull/93
- @Chris53897 made their first contribution in https://github.com/spatie/temporary-directory/pull/95
- @matteotrubini made their first contribution in https://github.com/spatie/temporary-directory/pull/98
Full Changelog: https://github.com/spatie/temporary-directory/compare/2.3.0...2.3.1
-
2.3.013 Jan 2025Release notes
Open source →What's Changed
- Bump actions/cache from 3 to 4 by @dependabot in #82
- Bump dependabot/fetch-metadata from 1.6.0 to 2.1.0 by @dependabot in #84
- Bump dependabot/fetch-metadata from 2.1.0 to 2.2.0 by @dependabot in #86
- PHP 8.3, 8.4 tests by @erikn69 in #87
- Add
getNamemethod by @willrowe in #88
New Contributors
Full Changelog: 2.2.1...2.3.0
Release notes
Open source →What's Changed
- Bump actions/cache from 3 to 4 by @dependabot in https://github.com/spatie/temporary-directory/pull/82
- Bump dependabot/fetch-metadata from 1.6.0 to 2.1.0 by @dependabot in https://github.com/spatie/temporary-directory/pull/84
- Bump dependabot/fetch-metadata from 2.1.0 to 2.2.0 by @dependabot in https://github.com/spatie/temporary-directory/pull/86
- PHP 8.3, 8.4 tests by @erikn69 in https://github.com/spatie/temporary-directory/pull/87
- Add
getNamemethod by @willrowe in https://github.com/spatie/temporary-directory/pull/88
New Contributors
- @willrowe made their first contribution in https://github.com/spatie/temporary-directory/pull/88
Full Changelog: https://github.com/spatie/temporary-directory/compare/2.2.1...2.3.0
-
2.2.125 Dec 2023Release notes
Open source →What's Changed
- DeleteWhenDestroyed documentation by @cosmastech in #74
- Document make method by @openjck in #76
- Bump stefanzweifel/git-auto-commit-action from 4 to 5 by @dependabot in #77
- [2.x] Fix directories not being deleted in strict mode by @RVxLab in #81
New Contributors
Full Changelog: 2.2.0...2.2.1
Release notes
Open source →What's Changed
- DeleteWhenDestroyed documentation by @cosmastech in https://github.com/spatie/temporary-directory/pull/74
- Document make method by @openjck in https://github.com/spatie/temporary-directory/pull/76
- Bump stefanzweifel/git-auto-commit-action from 4 to 5 by @dependabot in https://github.com/spatie/temporary-directory/pull/77
- [2.x] Fix directories not being deleted in strict mode by @RVxLab in https://github.com/spatie/temporary-directory/pull/81
New Contributors
- @openjck made their first contribution in https://github.com/spatie/temporary-directory/pull/76
- @RVxLab made their first contribution in https://github.com/spatie/temporary-directory/pull/81
Full Changelog: https://github.com/spatie/temporary-directory/compare/2.2.0...2.2.1
-
2.2.025 Sep 2023Release notes
Open source →What's Changed
- Bump dependabot/fetch-metadata from 1.4.0 to 1.5.1 by @dependabot in #67
- Bump dependabot/fetch-metadata from 1.5.1 to 1.6.0 by @dependabot in #68
- Bump actions/checkout from 3 to 4 by @dependabot in #69
- Remove unused variable in catch block by @peter279k in #71
- Setting to delete when an object is destroyed by @cosmastech in #70
New Contributors
- @cosmastech made their first contribution in #70
Full Changelog: 2.1.2...2.2.0
Release notes
Open source →What's Changed
- Bump dependabot/fetch-metadata from 1.4.0 to 1.5.1 by @dependabot in https://github.com/spatie/temporary-directory/pull/67
- Bump dependabot/fetch-metadata from 1.5.1 to 1.6.0 by @dependabot in https://github.com/spatie/temporary-directory/pull/68
- Bump actions/checkout from 3 to 4 by @dependabot in https://github.com/spatie/temporary-directory/pull/69
- Remove unused variable in catch block by @peter279k in https://github.com/spatie/temporary-directory/pull/71
- Setting to delete when an object is destroyed by @cosmastech in https://github.com/spatie/temporary-directory/pull/70
New Contributors
- @cosmastech made their first contribution in https://github.com/spatie/temporary-directory/pull/70
Full Changelog: https://github.com/spatie/temporary-directory/compare/2.1.2...2.2.0
-
2.1.228 Apr 2023Release notes
Open source →What's Changed
- Add dependabot automation by @patinthehat in #58
- Bump actions/checkout from 2 to 3 by @dependabot in #59
- Bump actions/cache from 1 to 3 by @dependabot in #60
- Add PHP 8.2 Support by @patinthehat in #61
- Update Dependabot Automation by @patinthehat in #62
- Normalize composer.json by @patinthehat in #63
- Bump dependabot/fetch-metadata from 1.3.5 to 1.3.6 by @dependabot in #64
- Bump dependabot/fetch-metadata from 1.3.6 to 1.4.0 by @dependabot in #65
- Added try catch by @metaversedataman in #66
New Contributors
- @dependabot made their first contribution in #59
- @metaversedataman made their first contribution in #66
Full Changelog: 2.1.1...2.1.2
Release notes
Open source →What's Changed
- Add dependabot automation by @patinthehat in https://github.com/spatie/temporary-directory/pull/58
- Bump actions/checkout from 2 to 3 by @dependabot in https://github.com/spatie/temporary-directory/pull/59
- Bump actions/cache from 1 to 3 by @dependabot in https://github.com/spatie/temporary-directory/pull/60
- Add PHP 8.2 Support by @patinthehat in https://github.com/spatie/temporary-directory/pull/61
- Update Dependabot Automation by @patinthehat in https://github.com/spatie/temporary-directory/pull/62
- Normalize composer.json by @patinthehat in https://github.com/spatie/temporary-directory/pull/63
- Bump dependabot/fetch-metadata from 1.3.5 to 1.3.6 by @dependabot in https://github.com/spatie/temporary-directory/pull/64
- Bump dependabot/fetch-metadata from 1.3.6 to 1.4.0 by @dependabot in https://github.com/spatie/temporary-directory/pull/65
- Added try catch by @metaversedataman in https://github.com/spatie/temporary-directory/pull/66
New Contributors
- @dependabot made their first contribution in https://github.com/spatie/temporary-directory/pull/59
- @metaversedataman made their first contribution in https://github.com/spatie/temporary-directory/pull/66
Full Changelog: https://github.com/spatie/temporary-directory/compare/2.1.1...2.1.2
-
2.1.123 Aug 2022Release notes
Open source →What's Changed
- Update .gitattributes by @erikn69 in #55
- Update .gitattributes by @angeljqv in #56
- Add a function to check if the temporary directory exist without catching PathAlreadyExists exception by @Admiral-Enigma in #57
New Contributors
- @erikn69 made their first contribution in #55
- @angeljqv made their first contribution in #56
- @Admiral-Enigma made their first contribution in #57
Full Changelog: 2.1.0...2.1.1
Release notes
Open source →What's Changed
- Update .gitattributes by @erikn69 in https://github.com/spatie/temporary-directory/pull/55
- Update .gitattributes by @angeljqv in https://github.com/spatie/temporary-directory/pull/56
- Add a function to check if the temporary directory exist without catching PathAlreadyExists exception by @Admiral-Enigma in https://github.com/spatie/temporary-directory/pull/57
New Contributors
- @erikn69 made their first contribution in https://github.com/spatie/temporary-directory/pull/55
- @angeljqv made their first contribution in https://github.com/spatie/temporary-directory/pull/56
- @Admiral-Enigma made their first contribution in https://github.com/spatie/temporary-directory/pull/57
Full Changelog: https://github.com/spatie/temporary-directory/compare/2.1.0...2.1.1
-
2.1.011 Mar 2022Release notes
Open source →What's Changed
- PHP 8.1 Support by @Nielsvanpach in #52
- Update .gitattributes by @PaolaRuby in #53
- feature: add TemporaryDirectory::make() method by @ryangjchandler in #54
New Contributors
- @PaolaRuby made their first contribution in #53
- @ryangjchandler made their first contribution in #54
Full Changelog: 2.0.0...2.1.0
-
2.0.030 Mar 2021Release notes
Open source →- require PHP 8+
- drop PHP 7.x support
- use PHP 8 syntax
- use custom exception classes instead of
InvalidArgumentExceptionandException
Release notes
Open source →- require PHP 8+
- drop PHP 7.x support
- use PHP 8 syntax
- use custom exception classes instead of
InvalidArgumentExceptionandException
-
1.3.009 Nov 2020 -
1.2.407 Sep 2020 -
1.2.308 Jun 2020 -
1.2.215 Dec 2019Release notes
Open source →- create dir with 0777 permissions and allow recursive in empty function (#38)
-
1.2.128 Aug 2019 -
1.2.016 Jul 2019 -
1.1.516 Jul 2019 -
1.1.412 Apr 2018 -
1.1.311 Sep 2017Nothing published for this version
-
1.1.202 Feb 2017 -
1.1.102 Feb 2017 -
1.1.001 Feb 2017 -
1.0.001 Feb 2017 -
0.0.301 Feb 2017 -
0.0.231 Jan 2017 -
0.0.131 Jan 2017