From 57639a5482e2adf0eff6d9fb05e210cca7fbb361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20de=20la=20Pen=CC=83a?=
Date: Wed, 21 Oct 2026 16:56:03 +0100 Subject: [PATCH 1/2] feat: hide sensitive columns from find and replace --- .phpstan/constants.php | 12 +++++++ src/FindReplace/Exclusion/Package.php | 21 +++++++++++++ tests/FindReplace/Exclusion/PackageTest.php | 35 +++++++++++++++++++++ tests/bootstrap.php | 12 +++++++ 4 files changed, 80 insertions(+) create mode 100644 src/FindReplace/Exclusion/Package.php create mode 100644 tests/FindReplace/Exclusion/PackageTest.php diff --git a/.phpstan/constants.php b/.phpstan/constants.php index e90363f..d0d9409 100644 --- a/.phpstan/constants.php +++ b/.phpstan/constants.php @@ -1,3 +1,15 @@ hidden() + ); + } + + public function testReadOnly(): void + { + self::assertSame( + [ + NAILS_DB_PREFIX . 'release_notes.sha', + NAILS_DB_PREFIX . 'release_notes.tag', + ], + (new Package())->readOnly() + ); + } +} diff --git a/tests/bootstrap.php b/tests/bootstrap.php index fd349ea..c93553f 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,3 +1,15 @@ Date: Wed, 21 Oct 2026 17:04:36 +0100 Subject: [PATCH 2/2] fix: require find-replace so exclusion tests can autoload --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 5d70646..e25067f 100644 --- a/composer.json +++ b/composer.json @@ -26,6 +26,7 @@ "league/commonmark": "^2.7" }, "require-dev": { + "nails/module-find-replace": "dev-develop", "phpunit/phpunit": "^12.0", "phpstan/phpstan": "^2.0" },