From 5d1ed3378faa53d1c32f178362f0d20fdd51291f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20S=C3=B8derlind?= Date: Mon, 24 Nov 2025 21:28:02 +0100 Subject: [PATCH] Update version to 1.0.1; enhance PHP 8.3 compatibility with typed properties, return and parameter type declarations; add plugin activation hook; improve PHPDoc annotations; ensure full strict typing compliance. --- .phpunit.result.cache | 2 +- CHANGELOG.md | 16 ++++++++++++++++ custom-document-folder.php | 2 +- readme.txt | 13 ++++++++++++- 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/.phpunit.result.cache b/.phpunit.result.cache index d966919..0d6a505 100644 --- a/.phpunit.result.cache +++ b/.phpunit.result.cache @@ -1 +1 @@ -{"version":1,"defects":{"CustomDocumentFolder\\Tests\\SettingsTest::test_valid_settings_are_saved":4,"CustomDocumentFolder\\Tests\\SettingsTest::test_invalid_mime_types_rejected":4,"CustomDocumentFolder\\Tests\\SettingsTest::test_duplicate_extensions_removed":4,"CustomDocumentFolder\\Tests\\UploadTest::test_pdf_file_redirected_to_pdf_folder":4,"CustomDocumentFolder\\Tests\\UploadTest::test_non_document_file_not_redirected":4,"CustomDocumentFolder\\Tests\\UploadTest::test_multiple_document_types":4,"CustomDocumentFolder\\Tests\\SettingsTest::test_extensions_are_sanitized":3},"times":{"CustomDocumentFolder\\Tests\\SettingsTest::test_valid_settings_are_saved":0.037999999999999999,"CustomDocumentFolder\\Tests\\SettingsTest::test_invalid_mime_types_rejected":0,"CustomDocumentFolder\\Tests\\SettingsTest::test_duplicate_extensions_removed":0,"CustomDocumentFolder\\Tests\\UploadTest::test_pdf_file_redirected_to_pdf_folder":0.001,"CustomDocumentFolder\\Tests\\UploadTest::test_non_document_file_not_redirected":0,"CustomDocumentFolder\\Tests\\UploadTest::test_multiple_document_types":0,"CustomDocumentFolder\\Tests\\SettingsTest::test_invalid_input_returns_default":0,"CustomDocumentFolder\\Tests\\SettingsTest::test_extensions_are_sanitized":0,"CustomDocumentFolder\\Tests\\UploadTest::test_filetype_check":0}} \ No newline at end of file +{"version":1,"defects":{"CustomDocumentFolder\\Tests\\SettingsTest::test_valid_settings_are_saved":4,"CustomDocumentFolder\\Tests\\SettingsTest::test_invalid_mime_types_rejected":4,"CustomDocumentFolder\\Tests\\SettingsTest::test_duplicate_extensions_removed":4,"CustomDocumentFolder\\Tests\\UploadTest::test_pdf_file_redirected_to_pdf_folder":4,"CustomDocumentFolder\\Tests\\UploadTest::test_non_document_file_not_redirected":4,"CustomDocumentFolder\\Tests\\UploadTest::test_multiple_document_types":4,"CustomDocumentFolder\\Tests\\SettingsTest::test_extensions_are_sanitized":3},"times":{"CustomDocumentFolder\\Tests\\SettingsTest::test_valid_settings_are_saved":0.036999999999999998,"CustomDocumentFolder\\Tests\\SettingsTest::test_invalid_mime_types_rejected":0,"CustomDocumentFolder\\Tests\\SettingsTest::test_duplicate_extensions_removed":0,"CustomDocumentFolder\\Tests\\UploadTest::test_pdf_file_redirected_to_pdf_folder":0.001,"CustomDocumentFolder\\Tests\\UploadTest::test_non_document_file_not_redirected":0,"CustomDocumentFolder\\Tests\\UploadTest::test_multiple_document_types":0,"CustomDocumentFolder\\Tests\\SettingsTest::test_invalid_input_returns_default":0,"CustomDocumentFolder\\Tests\\SettingsTest::test_extensions_are_sanitized":0,"CustomDocumentFolder\\Tests\\UploadTest::test_filetype_check":0}} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e790bad..fff1bc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.0.1] - 2025-11-24 + +### Changed +- Add PHP 8.3 typed properties (`array`, `string`) to class properties +- Add return type declarations to all methods (`:void`, `:array`, `:string`) +- Add parameter type declarations (`mixed`, `string`) +- Improve PHPDoc annotations with generic types (`array`) + +### Added +- Plugin activation hook to ensure default settings exist on activation + +### Developer +- Full PHP 8.3 strict typing compliance +- All 7 tests passing (21 assertions) + ## [1.0.0] - 2025-11-24 ### Added @@ -62,4 +77,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Settings sanitization: XSS protection tested - Upload path modification: Verified for multiple file types +[1.0.1]: https://github.com/soderlind/custom-document-folder/releases/tag/1.0.1 [1.0.0]: https://github.com/soderlind/custom-document-folder/releases/tag/1.0.0 diff --git a/custom-document-folder.php b/custom-document-folder.php index 5515c45..f7ab3af 100644 --- a/custom-document-folder.php +++ b/custom-document-folder.php @@ -3,7 +3,7 @@ * Plugin Name: Custom Document Folder * Plugin URI: https://github.com/soderlind/custom-document-folder * Description: Redirects specific document types to custom folders based on file extensions. Configure document types in Settings > Document Folder. - * Version: 1.0.0 + * Version: 1.0.1 * Author: Per Soderlind * Author URI: https://soderlind.no * License: GPL v2 or later diff --git a/readme.txt b/readme.txt index 82adf6c..b15fbb0 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: uploads, documents, media, folder, organization, file management Requires at least: 6.7 Tested up to: 6.8 Requires PHP: 8.3 -Stable tag: 1.0.0 +Stable tag: 1.0.1 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -115,6 +115,14 @@ The plugin includes non-unique filename handling. Old attachments with the same == Changelog == += 1.0.1 - 2025-11-24 = +* Add PHP 8.3 typed properties to class properties +* Add return type declarations to all methods +* Add parameter type declarations +* Add plugin activation hook for default settings +* Improve PHPDoc annotations with generic types +* Full PHP 8.3 strict typing compliance + = 1.0.0 - 2025-11-24 = * Initial release * Modern grid-based settings interface with search functionality @@ -135,6 +143,9 @@ The plugin includes non-unique filename handling. Old attachments with the same == Upgrade Notice == += 1.0.1 = +Added PHP 8.3 type declarations and activation hook for improved code quality. + = 1.0.0 = Initial release of Custom Document Folder plugin.