Skip to content

Releases: webimpress/safe-writer

safe-writer 2.2.0

19 Apr 16:39
2.2.0
9d37cc8
Compare
Choose a tag to compare

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.

safe-writer 2.1.0

25 Aug 07:22
2.1.0
5cfafde
Compare
Choose a tag to compare

Added

  • #7 adds support for PHP 8.0.

Changed

  • Nothing.

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • Nothing.

safe-writer 2.0.1

21 Mar 15:50
2.0.1
d6e8799
Compare
Choose a tag to compare

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.

safe-writer 1.0.2

21 Mar 15:36
1.0.2
8edfb10
Compare
Choose a tag to compare

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.

safe-writer 2.0.0

27 Nov 20:08
2.0.0
d03bea3
Compare
Choose a tag to compare

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.

safe-writer 1.0.1

16 Nov 23:32
1.0.1
3a4645b
Compare
Choose a tag to compare

Added

  • Nothing.

Changed

  • Nothing.

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • #4 fixes exception message when temporary file cannot be created.

safe-writer 1.0.0

15 Nov 21:57
1.0.0
4b0eb7c
Compare
Choose a tag to compare

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.