PackageTrack
Sign in Get early access

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 2026
2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 25
  1. 2.4.0 22 Jun 2026
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 2.3.1...2.4.0

    Open source →
    Release notes

    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

    Open source →
  2. 2.3.1 12 Jan 2026
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 2.3.0...2.3.1

    Open source →
    Release notes

    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

    Open source →
  3. 2.3.0 13 Jan 2025
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 2.2.1...2.3.0

    Open source →
    Release notes

    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 getName method 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

    Open source →
  4. 2.2.1 25 Dec 2023
    Release notes

    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

    Open source →
    Release notes

    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

    Open source →
  5. 2.2.0 25 Sep 2023
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 2.1.2...2.2.0

    Open source →
    Release notes

    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

    Open source →
  6. 2.1.2 28 Apr 2023
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 2.1.1...2.1.2

    Open source →
    Release notes

    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

    Open source →
  7. 2.1.1 23 Aug 2022
    Release notes

    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

    Full Changelog: 2.1.0...2.1.1

    Open source →
    Release notes

    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

    Open source →
  8. 2.1.0 11 Mar 2022
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 2.0.0...2.1.0

    Open source →
  9. 2.0.0 30 Mar 2021
    Release notes
    • require PHP 8+
    • drop PHP 7.x support
    • use PHP 8 syntax
    • use custom exception classes instead of InvalidArgumentException and Exception
    Open source →
    Release notes
    • require PHP 8+
    • drop PHP 7.x support
    • use PHP 8 syntax
    • use custom exception classes instead of InvalidArgumentException and Exception
    Open source →
  10. 1.3.0 09 Nov 2020
    Release notes
    • add support for PHP 8.0
    Open source →
    Release notes
    • support for PHP 8 (#44)
    Open source →
  11. 1.2.4 07 Sep 2020
    Release notes
    • force php garbage collection cycle (#40)
    Open source →
  12. 1.2.3 08 Jun 2020
    Release notes
    • fix deleting temporary directories with broken symlinks (#39)
    Open source →
  13. 1.2.2 15 Dec 2019
    Release notes
    • create dir with 0777 permissions and allow recursive in empty function (#38)
    Open source →
  14. 1.2.1 28 Aug 2019
    Release notes
    • delete directories using FilesystemIterator
    Open source →
  15. 1.2.0 16 Jul 2019
    Release notes
    • drop support for PHP 7.1 and below
    Open source →
  16. 1.1.5 16 Jul 2019
    Release notes
    • make sure unique directories are created under heavy load
    Open source →
  17. 1.1.4 12 Apr 2018
    Release notes
    • use return types instead of php-doc-tags
    Open source →
  18. 1.1.3 11 Sep 2017

    Nothing published for this version

  19. 1.1.2 02 Feb 2017
    Release notes
    • do not use periods when generating a name for the temporary directory
    Open source →
  20. 1.1.1 02 Feb 2017
    Release notes
    • do not use spaces when generating a name for the temporary directory
    Open source →
  21. 1.1.0 01 Feb 2017
    Release notes
    • added optional $location argument in TemporaryDirectory constructor
    Open source →
  22. 1.0.0 01 Feb 2017
    Release notes
    • initial release
    Open source →
  23. 0.0.3 01 Feb 2017
    Release notes
    • added chainable methods for creating a temporary directory
    Open source →
  24. 0.0.2 31 Jan 2017
    Release notes
    • removed create method, use constructor instead
    Open source →
  25. 0.0.1 31 Jan 2017
    Release notes
    • experimental release
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive