PackageTrack
Sign in Get early access

webimpress/safe-writer

Tool to write files safely, to avoid race conditions

2.2.0 44M downloads/mo #713 most downloaded on Packagist webimpress/safe-writer

What this package is like to depend on

Last release 5 years ago

no release in 18 months

Ships fairly regularly

a new release about every 4 months

Nearly every release is documented

notes for 7 of 7 stable releases

Nothing withdrawn

no release was ever pulled

7 years old

7 releases · first in 2019

0 releases in the last 12 months

see the full history below

Release timeline

7 releases · Nov 2019 to Apr 2021
2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 7
  1. 2.2.0 19 Apr 2021
    Release notes

    Added

    • Nothing.

    Changed

    • #50 changes suppressing warnings in FileWriter::writeFile method. Custom error handler is used instead of @, so it is not possible to handle them outside anymore.

    Deprecated

    • Nothing.

    Removed

    • #51 removes support for PHP 7.2.

    Fixed

    • Nothing.
    Open source →
    Release notes

    Added

    • Nothing.

    Changed

    • #50 changes suppressing warnings in FileWriter::writeFile method. Custom error handler is used instead of @, so it is not possible to handle them outside anymore.

    Deprecated

    • Nothing.

    Removed

    • #51 removes support for PHP 7.2.

    Fixed

    • Nothing.
    Open source →
  2. 2.1.0 25 Aug 2020
    Release notes

    Added

    • #7 adds support for PHP 8.0.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • Nothing.
    Open source →
    Release notes

    Added

    • #7 adds support for PHP 8.0.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • Nothing.
    Open source →
  3. 2.0.1 21 Mar 2020
    Release notes

    Added

    • Nothing.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #6 fixes issue when target directory is not writeable - throws exception earlier and prevents fallback to system temp directory.
    Open source →
    Release notes

    Added

    • Nothing.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #6 fixes issue when target directory is not writeable - throws exception earlier and prevents fallback to system temp directory.
    Open source →
  4. 2.0.0 27 Nov 2019
    Release notes

    Added

    • #5 adds \Throwable extension for package-specific exception marker Webimpress\SafeWriter\Exception\ExceptionInterface.

    Changed

    • #5 changes all exception classes to be non-instantiable and all theirs public method to be internal.
      Library exceptions can only be caught in the user code, cannot be thrown.

    • #5 changes all method declarations to have type hints and return types.

    Deprecated

    • Nothing.

    Removed

    • #5 removes support for PHP versions prior to 7.2.

    Fixed

    • Nothing.
    Open source →
    Release notes

    Added

    • #5 adds \Throwable extension for package-specific exception marker Webimpress\SafeWriter\Exception\ExceptionInterface.

    Changed

    • #5 changes all exception classes to be non-instantiable and all theirs public method to be internal. Library exceptions can only be caught in the user code, cannot be thrown.

    • #5 changes all method declarations to have type hints and return types.

    Deprecated

    • Nothing.

    Removed

    • #5 removes support for PHP versions prior to 7.2.

    Fixed

    • Nothing.
    Open source →
  5. 1.0.2 21 Mar 2020
    Release notes

    Added

    • Nothing.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #6 fixes issue when target directory is not writeable - throws exception earlier and prevents fallback to system temp directory.
    Open source →
    Release notes

    Added

    • Nothing.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #6 fixes issue when target directory is not writeable - throws exception earlier and prevents fallback to system temp directory.
    Open source →
  6. 1.0.1 16 Nov 2019
    Release notes

    Added

    • Nothing.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #4 fixes exception message when temporary file cannot be created.
    Open source →
    Release notes

    Added

    • Nothing.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #4 fixes exception message when temporary file cannot be created.
    Open source →
  7. 1.0.0 15 Nov 2019
    Release notes

    Added

    • Adds function to safely writing files to avoid race conditions when
      the same file is written multiple times in a short time period,
      and errors on reading not fully written files. Example usage:

      use Webimpress\SafeWriter\FileWriter;
      
      $targetFile = __DIR__ . '/config-cache.php';
      $content = "<?php\nreturn " . var_export($data, true) . ';';
      
      FileWriter::writeFile($targetFile, $content, 0666);

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • Nothing.
    Open source →
    Release notes

    Added

    • Adds function to safely writing files to avoid race conditions when the same file is written multiple times in a short time period, and errors on reading not fully written files. Example usage:

      use Webimpress\SafeWriter\FileWriter;
      
      $targetFile = __DIR__ . '/config-cache.php';
      $content = "<?php\nreturn " . var_export($data, true) . ';';
      
      FileWriter::writeFile($targetFile, $content, 0666);
      

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • Nothing.
    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