From 491367b1380417f6da99755a3ab614b441c06dbf Mon Sep 17 00:00:00 2001 From: Gaspare Sganga Date: Sun, 10 Nov 2019 07:58:16 +0100 Subject: [PATCH] v3.1.1 --- CHANGELOG.md | 9 ++++++++- VERSION | 2 +- src/Shapefile/Geometry/Geometry.php | 2 +- src/Shapefile/Geometry/GeometryCollection.php | 2 +- src/Shapefile/Geometry/Linestring.php | 2 +- src/Shapefile/Geometry/MultiLinestring.php | 2 +- src/Shapefile/Geometry/MultiPoint.php | 2 +- src/Shapefile/Geometry/MultiPolygon.php | 2 +- src/Shapefile/Geometry/Point.php | 2 +- src/Shapefile/Geometry/Polygon.php | 2 +- src/Shapefile/Shapefile.php | 2 +- src/Shapefile/ShapefileAutoloader.php | 2 +- src/Shapefile/ShapefileException.php | 2 +- src/Shapefile/ShapefileReader.php | 2 +- src/Shapefile/ShapefileWriter.php | 2 +- 15 files changed, 22 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a233f9..22df799 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this project adheres to [Semantic Versioning](https://semver.org/). +## v3.1.1 - 2019-11-10 +### Fixed +- Truncate *PRJ* and *CPG* files before writing them to prevent content to be appended when `Shapefile::OPTION_EXISTING_FILES_MODE` is set to `Shapefile::MODE_APPEND` +- Increased maximum number of fields in *DBF* files to 255 + + + ## v3.1.0 - 2019-10-30 ### Added - Writing buffer in `ShapefileWriter`. It allows up to a 50% reduction in writing time @@ -30,7 +37,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/). - Decoupling field names sanitization and `Shapefile::OPTION_DBF_FORCE_ALL_CAPS` option - `Shapefile::ERR_GEOM_MISSING_FIELD` exception was erroneously raised when a field had an explicit `null` value and `Shapefile::OPTION_ENFORCE_GEOMETRY_DATA_STRUCTURE` was enabled - Suppress PHP warnings in `fread()` and `fwrite()` calls: a `ShapefileException` is thrown anyways -- Bug causing a corrupted DBF file when a `Shapefile::ERR_GEOM_MISSING_FIELD` is raised +- Bug causing a corrupted *DBF* file when a `Shapefile::ERR_GEOM_MISSING_FIELD` is raised - Bug causing wrong record number to be written in SHP record headers (count starts from `1`, not from `0`) - Corner case bug affecting `ShapefileWriter` destructor when no record has been written yet diff --git a/VERSION b/VERSION index a0cd9f0..50e47c8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.1.0 \ No newline at end of file +3.1.1 \ No newline at end of file diff --git a/src/Shapefile/Geometry/Geometry.php b/src/Shapefile/Geometry/Geometry.php index 218ec7e..7d9dbd8 100644 --- a/src/Shapefile/Geometry/Geometry.php +++ b/src/Shapefile/Geometry/Geometry.php @@ -4,7 +4,7 @@ * * @package Shapefile * @author Gaspare Sganga - * @version 3.1.0 + * @version 3.1.1 * @license MIT * @link https://gasparesganga.com/labs/php-shapefile/ */ diff --git a/src/Shapefile/Geometry/GeometryCollection.php b/src/Shapefile/Geometry/GeometryCollection.php index d44e506..8c9ad41 100644 --- a/src/Shapefile/Geometry/GeometryCollection.php +++ b/src/Shapefile/Geometry/GeometryCollection.php @@ -4,7 +4,7 @@ * * @package Shapefile * @author Gaspare Sganga - * @version 3.1.0 + * @version 3.1.1 * @license MIT * @link https://gasparesganga.com/labs/php-shapefile/ */ diff --git a/src/Shapefile/Geometry/Linestring.php b/src/Shapefile/Geometry/Linestring.php index e9b7cd5..c906855 100644 --- a/src/Shapefile/Geometry/Linestring.php +++ b/src/Shapefile/Geometry/Linestring.php @@ -4,7 +4,7 @@ * * @package Shapefile * @author Gaspare Sganga - * @version 3.1.0 + * @version 3.1.1 * @license MIT * @link https://gasparesganga.com/labs/php-shapefile/ */ diff --git a/src/Shapefile/Geometry/MultiLinestring.php b/src/Shapefile/Geometry/MultiLinestring.php index a14c9c0..e2bfbca 100644 --- a/src/Shapefile/Geometry/MultiLinestring.php +++ b/src/Shapefile/Geometry/MultiLinestring.php @@ -4,7 +4,7 @@ * * @package Shapefile * @author Gaspare Sganga - * @version 3.1.0 + * @version 3.1.1 * @license MIT * @link https://gasparesganga.com/labs/php-shapefile/ */ diff --git a/src/Shapefile/Geometry/MultiPoint.php b/src/Shapefile/Geometry/MultiPoint.php index 2fcb6d8..992c02c 100644 --- a/src/Shapefile/Geometry/MultiPoint.php +++ b/src/Shapefile/Geometry/MultiPoint.php @@ -4,7 +4,7 @@ * * @package Shapefile * @author Gaspare Sganga - * @version 3.1.0 + * @version 3.1.1 * @license MIT * @link https://gasparesganga.com/labs/php-shapefile/ */ diff --git a/src/Shapefile/Geometry/MultiPolygon.php b/src/Shapefile/Geometry/MultiPolygon.php index 0d1d4e8..74126f8 100644 --- a/src/Shapefile/Geometry/MultiPolygon.php +++ b/src/Shapefile/Geometry/MultiPolygon.php @@ -4,7 +4,7 @@ * * @package Shapefile * @author Gaspare Sganga - * @version 3.1.0 + * @version 3.1.1 * @license MIT * @link https://gasparesganga.com/labs/php-shapefile/ */ diff --git a/src/Shapefile/Geometry/Point.php b/src/Shapefile/Geometry/Point.php index 91e150d..6a6f957 100644 --- a/src/Shapefile/Geometry/Point.php +++ b/src/Shapefile/Geometry/Point.php @@ -4,7 +4,7 @@ * * @package Shapefile * @author Gaspare Sganga - * @version 3.1.0 + * @version 3.1.1 * @license MIT * @link https://gasparesganga.com/labs/php-shapefile/ */ diff --git a/src/Shapefile/Geometry/Polygon.php b/src/Shapefile/Geometry/Polygon.php index cfb23ca..dc241e7 100644 --- a/src/Shapefile/Geometry/Polygon.php +++ b/src/Shapefile/Geometry/Polygon.php @@ -4,7 +4,7 @@ * * @package Shapefile * @author Gaspare Sganga - * @version 3.1.0 + * @version 3.1.1 * @license MIT * @link https://gasparesganga.com/labs/php-shapefile/ */ diff --git a/src/Shapefile/Shapefile.php b/src/Shapefile/Shapefile.php index d10bd51..5cc3407 100644 --- a/src/Shapefile/Shapefile.php +++ b/src/Shapefile/Shapefile.php @@ -4,7 +4,7 @@ * * @package Shapefile * @author Gaspare Sganga - * @version 3.1.0 + * @version 3.1.1 * @license MIT * @link https://gasparesganga.com/labs/php-shapefile/ */ diff --git a/src/Shapefile/ShapefileAutoloader.php b/src/Shapefile/ShapefileAutoloader.php index 6df50ee..7c6a5c9 100644 --- a/src/Shapefile/ShapefileAutoloader.php +++ b/src/Shapefile/ShapefileAutoloader.php @@ -4,7 +4,7 @@ * * @package Shapefile * @author Gaspare Sganga - * @version 3.1.0 + * @version 3.1.1 * @license MIT * @link https://gasparesganga.com/labs/php-shapefile/ */ diff --git a/src/Shapefile/ShapefileException.php b/src/Shapefile/ShapefileException.php index 66ad12a..9e83a1a 100644 --- a/src/Shapefile/ShapefileException.php +++ b/src/Shapefile/ShapefileException.php @@ -4,7 +4,7 @@ * * @package Shapefile * @author Gaspare Sganga - * @version 3.1.0 + * @version 3.1.1 * @license MIT * @link https://gasparesganga.com/labs/php-shapefile/ */ diff --git a/src/Shapefile/ShapefileReader.php b/src/Shapefile/ShapefileReader.php index e1dce89..896206f 100644 --- a/src/Shapefile/ShapefileReader.php +++ b/src/Shapefile/ShapefileReader.php @@ -4,7 +4,7 @@ * * @package Shapefile * @author Gaspare Sganga - * @version 3.1.0 + * @version 3.1.1 * @license MIT * @link https://gasparesganga.com/labs/php-shapefile/ */ diff --git a/src/Shapefile/ShapefileWriter.php b/src/Shapefile/ShapefileWriter.php index fce3016..f427688 100644 --- a/src/Shapefile/ShapefileWriter.php +++ b/src/Shapefile/ShapefileWriter.php @@ -4,7 +4,7 @@ * * @package Shapefile * @author Gaspare Sganga - * @version 3.1.0 + * @version 3.1.1 * @license MIT * @link https://gasparesganga.com/labs/php-shapefile/ */