Skip to content

[6.x] Fix required validation passing on an emptied Bard field - #15935

Merged
duncanmcclean merged 1 commit into
6.xfrom
12008
Nov 16, 2026
Merged

duncanmcclean merged 1 commit into
6.xfrom
12008

Conversation

@duncanmcclean

Copy link
Copy Markdown
Member

This pull request fixes an issue where a required Bard field would pass validation after its content had been erased.

This was happening because an emptied Bard field submits a single empty paragraph ([{"type":"paragraph"}]) rather than null. Bard::preProcessValidatable() passed arrays straight through to the validator, so the required rule was satisfied, even though Bard::process() would then save the value as null.

This PR fixes it by having preProcessValidatable() return null whenever process() would save the value as null, after removing empty nodes according to the field's remove_empty_nodes config.

Amp thread: https://ampcode.com/threads/T-1c23de62-4bf3-4e79-85cc-9f0addfdb4b9

Fixes #12008

@duncanmcclean
duncanmcclean merged commit b999bd4 into 6.x Nov 16, 2026
65 checks passed
@duncanmcclean
duncanmcclean deleted the 12008 branch November 16, 2026 16:25
joshdaugherty added a commit to UAMS-Web/aether-form-settings that referenced this pull request Nov 29, 2026
…#135)

Closes #134.

The two Bard confirmation settings that carry a `required_if` rule are
now pinned against an emptied editor. `statamic/cms` 6.43.0 started
rejecting that save, the locked 6.42.0 accepts it, and nothing in the
suite noticed either side of the change.

## The bug

`confirmation_message` (type `message`) and
`confirmation_redirect_message` (redirect delay on) are Bard fields
under `required_if`. Emptying the editor submits `[['type' =>
'paragraph']]`. Before 6.43.0, `Bard::preProcessValidatable()` returned
that array untouched, so it counted as present and a blank message
saved. Since 6.43.0 (statamic/cms#15935) it reads as empty and the rule
fires.

The existing cases in `ConfirmationConditionalRulesTest.php` submit a
missing value or a document holding text, so both behaviors passed the
whole suite.

## Approach

- Four cases (two settings, each in the default group and in an
additional confirmation) submit the emptied document and expect
rejection at the setting's full path, then submit the same save with
text and expect it to pass.
- They skip below `statamic/cms` 6.43.0, where the save is accepted,
using the installed version from `Composer\InstalledVersions`, and run
on 6.43.0 and later.
- `tests/skip-baseline.json` raises both bands from 7 to 11 and says
why. The guard fails only above the baseline, so the baseline can stay
as it is when the lock moves.

## Files

- **edit**
[`tests/Integration/CpForms/ConfirmationConditionalRulesTest.php`](https://github.com/UAMS-Web/aether-form-settings/blob/134-pin-emptied-bard-required/tests/Integration/CpForms/ConfirmationConditionalRulesTest.php):
the version predicate, a typed save helper, the dataset and the test.
- **edit**
[`tests/skip-baseline.json`](https://github.com/UAMS-Web/aether-form-settings/blob/134-pin-emptied-bard-required/tests/skip-baseline.json):
both bands 7 to 11.

## Verification

Measured on Windows 11, PHP 8.4; macOS not run. `composer.json` and
`composer.lock` are unchanged; the 6.43.1 runs used the lock from #131
in the working copy only.

- Locked 6.42.0: `composer test` 1293 passed and 12 skipped, which is
the 11 recorded skips plus one symlink test that skips on this machine
only.
- `statamic/cms` 6.43.1 installed: the file passes, 28 tests. With
`Bard.php` from the v6.42.0 tag copied over the installed file, the four
new cases fail and the other 24 still pass. Restoring the file (sha256
compared) returns all 28 to green.
- `composer test:pint`, `test:refactor`, `stan`, `test:mutate-ignore`
and `test:parallel-safe` pass on the final file.

Not measured: the Control Panel's rendering of an emptied Bard field.

## Out of scope

- Any change to the confirmation rules, which are correct as written.
- The Dependabot bump itself (#131).

## Test plan

- [x] Four new cases pass on `statamic/cms` 6.43.1 and fail when
6.42.0's `Bard.php` is installed.
- [x] The suite on the locked 6.42.0 skips exactly the recorded cases
plus the four new ones.
- [x] Pint, Rector, PHPStan, `test:mutate-ignore` and
`test:parallel-safe` pass.
- [x] `composer ci` green on the remote checks (`CI`, `Attribution
footer`, `Closing keywords`), head `091b665`.

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
joshdaugherty added a commit to UAMS-Web/aether-incomplete-entries that referenced this pull request Nov 30, 2026
…ry with 3 updates (#96)

Bumps the composer-minor-and-patch group with 3 updates in the /
directory: [statamic/cms](https://github.com/statamic/cms),
[rector/rector](https://github.com/rectorphp/rector) and
[uams-web/patches-pest-plugin-mutate](https://github.com/UAMS-Web/patches-pest-plugin-mutate).

Updates `statamic/cms` from 6.42.0 to 6.44.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/statamic/cms/releases">statamic/cms's
releases</a>.</em></p>
<blockquote>
<h2>v6.44.0</h2>
<h2>What's new</h2>
<ul>
<li>Forms 2 <a
href="https://redirect.github.com/statamic/cms/issues/15039">#15039</a>
by <a
href="https://github.com/jasonvarga"><code>@​jasonvarga</code></a></li>
</ul>
<h2>What's fixed</h2>
<ul>
<li>Conflict with eloquent-driver versions without Forms 2 support <a
href="https://redirect.github.com/statamic/cms/issues/16021">#16021</a>
by <a
href="https://github.com/jasonvarga"><code>@​jasonvarga</code></a></li>
</ul>
<h2>v6.43.2</h2>
<h2>What's fixed</h2>
<ul>
<li>Match the asset table's file name focus outline to entry titles <a
href="https://redirect.github.com/statamic/cms/issues/16011">#16011</a>
by <a
href="https://github.com/jaygeorge"><code>@​jaygeorge</code></a></li>
<li>Improve CP TrimStrings performance with large Bard content <a
href="https://redirect.github.com/statamic/cms/issues/16012">#16012</a>
by <a
href="https://github.com/jasonvarga"><code>@​jasonvarga</code></a></li>
<li>Fix URL parsing for paths containing colons followed by digits <a
href="https://redirect.github.com/statamic/cms/issues/15997">#15997</a>
by <a href="https://github.com/daun"><code>@​daun</code></a></li>
<li>Wait for the csrf request before the nocache request <a
href="https://redirect.github.com/statamic/cms/issues/15994">#15994</a>
by <a
href="https://github.com/theluckystrike"><code>@​theluckystrike</code></a></li>
<li>Wipe the static cache store before deleting files on flush <a
href="https://redirect.github.com/statamic/cms/issues/15991">#15991</a>
by <a
href="https://github.com/edalzell"><code>@​edalzell</code></a></li>
<li>Stop tree rows with children growing taller than the others <a
href="https://redirect.github.com/statamic/cms/issues/16014">#16014</a>
by <a
href="https://github.com/jaygeorge"><code>@​jaygeorge</code></a></li>
<li>Clear nocache data before the file driver deletes files on flush <a
href="https://redirect.github.com/statamic/cms/issues/15993">#15993</a>
by <a
href="https://github.com/edalzell"><code>@​edalzell</code></a></li>
<li>Skip nocache regions missing from the store in the nocache route <a
href="https://redirect.github.com/statamic/cms/issues/15992">#15992</a>
by <a
href="https://github.com/edalzell"><code>@​edalzell</code></a></li>
<li>Keep the asset listing cached on remote disks when the watcher is
enabled <a
href="https://redirect.github.com/statamic/cms/issues/15980">#15980</a>
by <a
href="https://github.com/edalzell"><code>@​edalzell</code></a></li>
<li>Only fill old input into the form that was submitted <a
href="https://redirect.github.com/statamic/cms/issues/16013">#16013</a>
by <a href="https://github.com/daun"><code>@​daun</code></a></li>
</ul>
<h2>v6.43.1</h2>
<h2>What's fixed</h2>
<ul>
<li>Fall back to default Glide cache permissions when not configured <a
href="https://redirect.github.com/statamic/cms/issues/15987">#15987</a>
by <a
href="https://github.com/davideprevosto"><code>@​davideprevosto</code></a></li>
</ul>
<h2>v6.43.0</h2>
<h2>What's new</h2>
<ul>
<li>Add a substring parameter to the mark modifier <a
href="https://redirect.github.com/statamic/cms/issues/15955">#15955</a>
by <a
href="https://github.com/edalzell"><code>@​edalzell</code></a></li>
<li>Make Glide cache permissions configurable <a
href="https://redirect.github.com/statamic/cms/issues/15920">#15920</a>
by <a
href="https://github.com/duncanmcclean"><code>@​duncanmcclean</code></a></li>
<li>Add option to copy data when replacing an asset <a
href="https://redirect.github.com/statamic/cms/issues/15865">#15865</a>
by <a
href="https://github.com/ryanmitchell"><code>@​ryanmitchell</code></a></li>
</ul>
<h2>What's fixed</h2>
<ul>
<li>Rebuild a collection's entries when its sites change <a
href="https://redirect.github.com/statamic/cms/issues/15906">#15906</a>
by <a
href="https://github.com/edalzell"><code>@​edalzell</code></a></li>
<li>Fix drag handle shifting when a second Grid row or Replicator set is
added <a
href="https://redirect.github.com/statamic/cms/issues/15913">#15913</a>
by <a href="https://github.com/mynetx"><code>@​mynetx</code></a></li>
<li>Fix Vue warning: v-tooltip on ToggleItem in markdown toolbar <a
href="https://redirect.github.com/statamic/cms/issues/15916">#15916</a>
by <a
href="https://github.com/ionutrusenL"><code>@​ionutrusenL</code></a></li>
<li>Fix CSRF token mismatch on statically cached pages when using
Precognition <a
href="https://redirect.github.com/statamic/cms/issues/15939">#15939</a>
by <a
href="https://github.com/duncanmcclean"><code>@​duncanmcclean</code></a></li>
<li>Fix switching sites when creating a term <a
href="https://redirect.github.com/statamic/cms/issues/15938">#15938</a>
by <a
href="https://github.com/duncanmcclean"><code>@​duncanmcclean</code></a></li>
<li>Fix reordering a descending collection flipping its order <a
href="https://redirect.github.com/statamic/cms/issues/15937">#15937</a>
by <a
href="https://github.com/duncanmcclean"><code>@​duncanmcclean</code></a></li>
<li>Fix contains field conditions against numeric entry IDs <a
href="https://redirect.github.com/statamic/cms/issues/15936">#15936</a>
by <a
href="https://github.com/duncanmcclean"><code>@​duncanmcclean</code></a></li>
<li>Fix required validation passing on an emptied Bard field <a
href="https://redirect.github.com/statamic/cms/issues/15935">#15935</a>
by <a
href="https://github.com/duncanmcclean"><code>@​duncanmcclean</code></a></li>
<li>Fix site filter not updating after switching sites <a
href="https://redirect.github.com/statamic/cms/issues/15931">#15931</a>
by <a
href="https://github.com/duncanmcclean"><code>@​duncanmcclean</code></a></li>
<li>Fix filtering by date range fields <a
href="https://redirect.github.com/statamic/cms/issues/15924">#15924</a>
by <a
href="https://github.com/duncanmcclean"><code>@​duncanmcclean</code></a></li>
<li>Fix refresh loop when running Vite dev server <a
href="https://redirect.github.com/statamic/cms/issues/15923">#15923</a>
by <a
href="https://github.com/duncanmcclean"><code>@​duncanmcclean</code></a></li>
<li>Prevent editing terms that haven't been created yet <a
href="https://redirect.github.com/statamic/cms/issues/15922">#15922</a>
by <a
href="https://github.com/duncanmcclean"><code>@​duncanmcclean</code></a></li>
<li>Fix Glide tag with absolute asset URLs <a
href="https://redirect.github.com/statamic/cms/issues/15918">#15918</a>
by <a
href="https://github.com/duncanmcclean"><code>@​duncanmcclean</code></a></li>
<li>Fix half measure static cache serving pages missing from the URL
index <a
href="https://redirect.github.com/statamic/cms/issues/15914">#15914</a>
by <a
href="https://github.com/duncanmcclean"><code>@​duncanmcclean</code></a></li>
<li>Fix middle ellipsis for unknown font families <a
href="https://redirect.github.com/statamic/cms/issues/15904">#15904</a>
by <a href="https://github.com/daun"><code>@​daun</code></a></li>
<li>Fix saving untouched navigation defaults <a
href="https://redirect.github.com/statamic/cms/issues/15926">#15926</a>
by <a
href="https://github.com/duncanmcclean"><code>@​duncanmcclean</code></a></li>
<li>Fix fieldtype meta not refreshing after publishing entries and
running actions <a
href="https://redirect.github.com/statamic/cms/issues/15921">#15921</a>
by <a
href="https://github.com/duncanmcclean"><code>@​duncanmcclean</code></a></li>
<li>Throw an exception when an uploaded file can't be written to the
disk <a
href="https://redirect.github.com/statamic/cms/issues/15919">#15919</a>
by <a
href="https://github.com/duncanmcclean"><code>@​duncanmcclean</code></a></li>
<li>Keep view shared data dynamic within nocache tags <a
href="https://redirect.github.com/statamic/cms/issues/15928">#15928</a>
by <a
href="https://github.com/duncanmcclean"><code>@​duncanmcclean</code></a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/statamic/cms/blob/6.x/CHANGELOG.md">statamic/cms's
changelog</a>.</em></p>
<blockquote>
<h2>6.44.0 (2026-11-24)</h2>
<h3>What's new</h3>
<ul>
<li>Forms 2 <a
href="https://redirect.github.com/statamic/cms/issues/15039">#15039</a>
by <a
href="https://github.com/jasonvarga"><code>@​jasonvarga</code></a></li>
</ul>
<h3>What's fixed</h3>
<ul>
<li>Conflict with eloquent-driver versions without Forms 2 support <a
href="https://redirect.github.com/statamic/cms/issues/16021">#16021</a>
by <a
href="https://github.com/jasonvarga"><code>@​jasonvarga</code></a></li>
</ul>
<h2>6.43.2 (2026-11-23)</h2>
<h3>What's fixed</h3>
<ul>
<li>Match the asset table's file name focus outline to entry titles <a
href="https://redirect.github.com/statamic/cms/issues/16011">#16011</a>
by <a
href="https://github.com/jaygeorge"><code>@​jaygeorge</code></a></li>
<li>Improve CP TrimStrings performance with large Bard content <a
href="https://redirect.github.com/statamic/cms/issues/16012">#16012</a>
by <a
href="https://github.com/jasonvarga"><code>@​jasonvarga</code></a></li>
<li>Fix URL parsing for paths containing colons followed by digits <a
href="https://redirect.github.com/statamic/cms/issues/15997">#15997</a>
by <a href="https://github.com/daun"><code>@​daun</code></a></li>
<li>Wait for the csrf request before the nocache request <a
href="https://redirect.github.com/statamic/cms/issues/15994">#15994</a>
by <a
href="https://github.com/theluckystrike"><code>@​theluckystrike</code></a></li>
<li>Wipe the static cache store before deleting files on flush <a
href="https://redirect.github.com/statamic/cms/issues/15991">#15991</a>
by <a
href="https://github.com/edalzell"><code>@​edalzell</code></a></li>
<li>Stop tree rows with children growing taller than the others <a
href="https://redirect.github.com/statamic/cms/issues/16014">#16014</a>
by <a
href="https://github.com/jaygeorge"><code>@​jaygeorge</code></a></li>
<li>Clear nocache data before the file driver deletes files on flush <a
href="https://redirect.github.com/statamic/cms/issues/15993">#15993</a>
by <a
href="https://github.com/edalzell"><code>@​edalzell</code></a></li>
<li>Skip nocache regions missing from the store in the nocache route <a
href="https://redirect.github.com/statamic/cms/issues/15992">#15992</a>
by <a
href="https://github.com/edalzell"><code>@​edalzell</code></a></li>
<li>Keep the asset listing cached on remote disks when the watcher is
enabled <a
href="https://redirect.github.com/statamic/cms/issues/15980">#15980</a>
by <a
href="https://github.com/edalzell"><code>@​edalzell</code></a></li>
<li>Only fill old input into the form that was submitted <a
href="https://redirect.github.com/statamic/cms/issues/16013">#16013</a>
by <a href="https://github.com/daun"><code>@​daun</code></a></li>
</ul>
<h2>6.43.1 (2026-11-21)</h2>
<h3>What's fixed</h3>
<ul>
<li>Fall back to default Glide cache permissions when not configured <a
href="https://redirect.github.com/statamic/cms/issues/15987">#15987</a>
by <a
href="https://github.com/davideprevosto"><code>@​davideprevosto</code></a></li>
</ul>
<h2>6.43.0 (2026-11-20)</h2>
<h3>What's new</h3>
<ul>
<li>Add a substring parameter to the mark modifier <a
href="https://redirect.github.com/statamic/cms/issues/15955">#15955</a>
by <a
href="https://github.com/edalzell"><code>@​edalzell</code></a></li>
<li>Make Glide cache permissions configurable <a
href="https://redirect.github.com/statamic/cms/issues/15920">#15920</a>
by <a
href="https://github.com/duncanmcclean"><code>@​duncanmcclean</code></a></li>
<li>Add option to copy data when replacing an asset <a
href="https://redirect.github.com/statamic/cms/issues/15865">#15865</a>
by <a
href="https://github.com/ryanmitchell"><code>@​ryanmitchell</code></a></li>
</ul>
<h3>What's fixed</h3>
<ul>
<li>Rebuild a collection's entries when its sites change <a
href="https://redirect.github.com/statamic/cms/issues/15906">#15906</a>
by <a
href="https://github.com/edalzell"><code>@​edalzell</code></a></li>
<li>Fix drag handle shifting when a second Grid row or Replicator set is
added <a
href="https://redirect.github.com/statamic/cms/issues/15913">#15913</a>
by <a href="https://github.com/mynetx"><code>@​mynetx</code></a></li>
<li>Fix Vue warning: v-tooltip on ToggleItem in markdown toolbar <a
href="https://redirect.github.com/statamic/cms/issues/15916">#15916</a>
by <a
href="https://github.com/ionutrusenL"><code>@​ionutrusenL</code></a></li>
<li>Fix CSRF token mismatch on statically cached pages when using
Precognition <a
href="https://redirect.github.com/statamic/cms/issues/15939">#15939</a>
by <a
href="https://github.com/duncanmcclean"><code>@​duncanmcclean</code></a></li>
<li>Fix switching sites when creating a term <a
href="https://redirect.github.com/statamic/cms/issues/15938">#15938</a>
by <a
href="https://github.com/duncanmcclean"><code>@​duncanmcclean</code></a></li>
<li>Fix reordering a descending collection flipping its order <a
href="https://redirect.github.com/statamic/cms/issues/15937">#15937</a>
by <a
href="https://github.com/duncanmcclean"><code>@​duncanmcclean</code></a></li>
<li>Fix contains field conditions against numeric entry IDs <a
href="https://redirect.github.com/statamic/cms/issues/15936">#15936</a>
by <a
href="https://github.com/duncanmcclean"><code>@​duncanmcclean</code></a></li>
<li>Fix required validation passing on an emptied Bard field <a
href="https://redirect.github.com/statamic/cms/issues/15935">#15935</a>
by <a
href="https://github.com/duncanmcclean"><code>@​duncanmcclean</code></a></li>
<li>Fix site filter not updating after switching sites <a
href="https://redirect.github.com/statamic/cms/issues/15931">#15931</a>
by <a
href="https://github.com/duncanmcclean"><code>@​duncanmcclean</code></a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/statamic/cms/commit/dad88809575288c18cba8f18b2925c7130e45571"><code>dad8880</code></a>
Build assets for v6.44.0</li>
<li><a
href="https://github.com/statamic/cms/commit/6344d20c1b54a86905f6663bdd1dfb0bf6dfb55e"><code>6344d20</code></a>
[6.x] 6.44.0 (<a
href="https://redirect.github.com/statamic/cms/issues/16023">#16023</a>)</li>
<li><a
href="https://github.com/statamic/cms/commit/3abea11985620b95bed961a08b7225c1fda512ea"><code>3abea11</code></a>
[6.x] Conflict with eloquent-driver versions older than 5.14 (<a
href="https://redirect.github.com/statamic/cms/issues/16021">#16021</a>)</li>
<li><a
href="https://github.com/statamic/cms/commit/72fafa1ba4c947b92c79c85287a5be8134434ffa"><code>72fafa1</code></a>
[6.x] Forms 2 (<a
href="https://redirect.github.com/statamic/cms/issues/15039">#15039</a>)</li>
<li><a
href="https://github.com/statamic/cms/commit/565d68ec623c437113fbd044d44191a0753f9c6a"><code>565d68e</code></a>
[6.x] 6.43.2 (<a
href="https://redirect.github.com/statamic/cms/issues/16017">#16017</a>)</li>
<li><a
href="https://github.com/statamic/cms/commit/ea086f17041ddfca21bf77d1a37fe29618509d26"><code>ea086f1</code></a>
[6.x] Only fill old input into the form that was submitted (<a
href="https://redirect.github.com/statamic/cms/issues/16013">#16013</a>)</li>
<li><a
href="https://github.com/statamic/cms/commit/7ce7a007bac91fe7b6f56046c4a65461b5134160"><code>7ce7a00</code></a>
[6.x] Keep the asset listing cached on remote disks when the watcher is
enabl...</li>
<li><a
href="https://github.com/statamic/cms/commit/a83ffea5fab69af79d052a36f31c6f80c6942505"><code>a83ffea</code></a>
[6.x] Skip nocache regions missing from the store in the nocache route
(<a
href="https://redirect.github.com/statamic/cms/issues/15992">#15992</a>)</li>
<li><a
href="https://github.com/statamic/cms/commit/4bc2524a41c7aaa7d6ab6a43fff8dcb5988b9eec"><code>4bc2524</code></a>
[6.x] Clear nocache data before the file driver deletes files on flush
(<a
href="https://redirect.github.com/statamic/cms/issues/15993">#15993</a>)</li>
<li><a
href="https://github.com/statamic/cms/commit/24b9a170eb16c59785690aeb7369100f1505fdf6"><code>24b9a17</code></a>
[6.x] Stop tree rows with children growing taller than the others (<a
href="https://redirect.github.com/statamic/cms/issues/16014">#16014</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/statamic/cms/compare/v6.42.0...v6.44.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `rector/rector` from 2.8.5 to 2.9.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rectorphp/rector/releases">rector/rector's
releases</a>.</em></p>
<blockquote>
<h2>Released Rector 2.9.2</h2>
<h2>Bugfixes 🐛</h2>
<ul>
<li>
<p>[CodeQuality] Remove
<code>NarrowPreviousExceptionCodeArgRector</code>, as it changes
<code>getCode()</code> of new exception to <code>0</code> (<a
href="https://redirect.github.com/rectorphp/rector-src/pull/9062">#9062</a>),
reported in <a
href="https://redirect.github.com/rectorphp/rector-src/issues/9061">#9061</a></p>
<p>PHP does not inherit the code from the previous exception, so
<code>new X('msg', previous: $e)</code> returns <code>0</code> from
<code>getCode()</code>, not <code>$e-&gt;getCode()</code>. The rule was
part of the <code>named-args</code> set and code quality level in 2.9.0.
If you registered it manually, remove it from your config.</p>
</li>
<li>
<p>[CodeQuality] Restore adding code with named <code>previous:</code>
argument in <code>ThrowWithPreviousExceptionRector</code> (<a
href="https://redirect.github.com/rectorphp/rector-src/pull/9063">#9063</a>)</p>
</li>
</ul>
<h2>Released Rector 2.9.0</h2>
<h2>Leaner rule set and safer rules 🧹</h2>
<p>This release <strong>removes ~100 rules deprecated in past
releases</strong>. They already threw on use, were part of no set and
were rarely used. If your <code>rector.php</code> still registers one of
them, remove it from the config. The goal stays the same: a smaller set
of valuable, reliable rules for everyday upgrades.</p>
<p>The rest of the release is about <strong>safer changes</strong> -
more than 30 rules now skip or keep code where the change could alter
behavior: side effects, evaluation order, loose comparisons,
fall-through cases, nullable types and more.</p>
<!-- raw HTML omitted -->
<h2>New Features 🥳</h2>
<ul>
<li>[CodeQuality] Add <code>NarrowPreviousExceptionCodeArgRector</code>,
part of code-quality and named-args sets (<a
href="https://redirect.github.com/rectorphp/rector-src/pull/9052">#9052</a>)</li>
</ul>
<pre lang="diff"><code> try {
     $someCode = 1;
 } catch (Throwable $throwable) {
- throw new \RuntimeException('ups', $throwable-&gt;getCode(),
$throwable);
+    throw new \RuntimeException('ups', previous: $throwable);
 }
</code></pre>
<ul>
<li>[Php84] Handle property fetch, static access, array access and
invocation on <code>NewMethodCallWithoutParenthesesRector</code> (<a
href="https://redirect.github.com/rectorphp/rector-src/pull/9009">#9009</a>,
<a
href="https://redirect.github.com/rectorphp/rector-src/pull/9010">#9010</a>)
Thanks <a
href="https://github.com/alexndlm"><code>@​alexndlm</code></a></li>
</ul>
<pre lang="diff"><code>-$message = (new
Regex('some-pattern'))-&gt;message;
-$constant = (new Request())::METHOD_GET;
-$value = (new ArrayObject($items))['key'];
-$result = (new Invokable())();
+$message = new Regex('some-pattern')-&gt;message;
+$constant = new Request()::METHOD_GET;
+$value = new ArrayObject($items)['key'];
+$result = new Invokable()();
</code></pre>
<ul>
<li>[Php71] Convert partial <code>list()</code> destruct in
<code>ListToArrayDestructRector</code> (<a
href="https://redirect.github.com/rectorphp/rector-src/pull/9028">#9028</a>)</li>
</ul>
<pre lang="diff"><code>-list(, $instanceId) = explode(':',
$rate-&gt;id);
+[, $instanceId] = explode(':', $rate-&gt;id);
</code></pre>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/rectorphp/rector/commit/8a06053cae42915224f9357566162ccb1076001a"><code>8a06053</code></a>
Rector 2.9.2</li>
<li><a
href="https://github.com/rectorphp/rector/commit/7fd002ed51d55d2c96f07cfc80d9d1a28eaf599c"><code>7fd002e</code></a>
Rector 2.9.1</li>
<li><a
href="https://github.com/rectorphp/rector/commit/9e513d00bbcd9aa5aa4f4affb8d7f2644d8742b6"><code>9e513d0</code></a>
Updated Rector to commit e8210558743a0d5fc3e2fc32c385b78833765822</li>
<li><a
href="https://github.com/rectorphp/rector/commit/49290aed53b2a5aa48a5856c4093a3c721b038ec"><code>49290ae</code></a>
Rector 2.9.0</li>
<li><a
href="https://github.com/rectorphp/rector/commit/c3017828ab75a7585501df0041f8d5e54e2b9a94"><code>c301782</code></a>
Updated Rector to commit 48448b9cfcdd6b6641b5a660beab18282c2dfd55</li>
<li><a
href="https://github.com/rectorphp/rector/commit/1e06ac6b707133661538cf135c85d0f1f2fbc91b"><code>1e06ac6</code></a>
Updated Rector to commit c7ad80904c67bc4be9a49e0218b3a14d0b1b3e9c</li>
<li><a
href="https://github.com/rectorphp/rector/commit/1a497c001ef08649b30cd610b31e435d5c155efb"><code>1a497c0</code></a>
Updated Rector to commit 63962116b4d810a19224b2897202f89e58cbad9c</li>
<li><a
href="https://github.com/rectorphp/rector/commit/2b369e06de7b616d0f7a831c070cb9b4132f436f"><code>2b369e0</code></a>
Updated Rector to commit b05ab6eda9b9c080ce9160de596bca9db7b8710a</li>
<li><a
href="https://github.com/rectorphp/rector/commit/234853dc3d0f3989f098d5e0d3616087e9de2ea2"><code>234853d</code></a>
Updated Rector to commit da60d909ff48c8a756e09b01014d54ca1aba9378</li>
<li><a
href="https://github.com/rectorphp/rector/commit/0c594caeacd3a0e53ecc5574ed4ec1a9fccdc315"><code>0c594ca</code></a>
Updated Rector to commit 1ae371f9c0a1a05fa1d5a1548252a48cfc50791d</li>
<li>Additional commits viewable in <a
href="https://github.com/rectorphp/rector/compare/2.8.5...2.9.2">compare
view</a></li>
</ul>
</details>
<br />

Updates `uams-web/patches-pest-plugin-mutate` from 1.5.0 to 1.5.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/UAMS-Web/patches-pest-plugin-mutate/releases">uams-web/patches-pest-plugin-mutate's
releases</a>.</em></p>
<blockquote>
<h2>v1.5.1 — Score a silent Windows stack-overflow exit as a kill</h2>
<p>Scores a silent Windows stack-overflow child exit as a kill, so a
mutant that recurses without end no longer aborts the run. Still pinned
to <code>pestphp/pest-plugin-mutate</code> <code>5.0.2</code>.</p>
<p>Version: a patch, because a patch's content changes under the same
pin (versioning table). A consumer whose Dependabot bump fails
<code>composer install</code> with &quot;Hash mismatch&quot; runs
<code>composer patches-relock</code> and commits the
<code>patches.lock.json</code> change, as with v1.4.1.</p>
<h2>What's fixed</h2>
<ul>
<li>Score a silent Windows stack-overflow child exit as a kill <a
href="https://redirect.github.com/UAMS-Web/patches-pest-plugin-mutate/pull/59">#59</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/UAMS-Web/patches-pest-plugin-mutate/commit/e465f6391af5c20dc864d1cd0b1a9f7bd1d3315d"><code>e465f63</code></a>
Score a silent Windows stack-overflow child exit as a kill (<a
href="https://redirect.github.com/UAMS-Web/patches-pest-plugin-mutate/issues/59">#59</a>)</li>
<li>See full diff in <a
href="https://github.com/UAMS-Web/patches-pest-plugin-mutate/compare/v1.5.0...v1.5.1">compare
view</a></li>
</ul>
</details>
<br />


## Patch set changes

- `uams-web/patches-pest-plugin-mutate` moved from `v1.5.0` to `v1.5.1`,
which changed `pest-plugin-mutate-isolated-processes.patch`.
`patches.lock.json` recorded the old hash, so every `composer install`
failed with `Hash mismatch for patch downloaded from
vendor/uams-web/patches-pest-plugin-mutate/patches/pest-plugin-mutate-isolated-processes.patch`
(got `12c7b125e6631b3887696c1de09d6cae74b2ffb512fd961f2a5c13cd942aab60`,
expected
`8bc0b3925662aaa307fd857b987d43d2c99be9194db674f99d4a771fa1017360`).
Re-rolled: `composer patches-relock` records the new hash and set
`_hash`; `composer.lock` is unchanged by it (patches come from
`patches.json`).
- Every other registered patch still applies and is still needed; none
was retired. After `composer reinstall pestphp/pest-plugin-mutate` and
`composer install`, `ensure-patches-applied.php` printed `Patches: all
18 checked patch(es) are applied in vendor/`.

## Behavior this bump touches

Read: `statamic/cms` changelog for `v6.43.0` through `v6.44.0` (tags
`v6.43.0`, `v6.43.1`, `v6.43.2`, `v6.44.0`). `rector/rector` and the
`patches-*` package are exercised by the gate jobs themselves. The other
moved packages are transitive (`laravel/framework`, `league/*`,
`symfony/*` and similar) and are not called from `src/`.

| Change (link, tag read) | Call site | Pinned by | Not pinned |
| --- | --- | --- | --- |
| Fix required validation passing on an emptied Bard field
([statamic/cms#15935](statamic/cms#15935),
`v6.43.0`) | `src/Services/EntryValidation/EntryValidator.php` runs the
blueprint's rules through `Statamic\Fields\Validator` |
`IncompletePublishedEntriesValidationTest` "leaves a Bard field with
sets to the ordinary field path" (sets only) | A required Bard field
that is emptied; filed as #98 |
| Fix `contains` field conditions against numeric entry IDs
([statamic/cms#15936](statamic/cms#15936),
`v6.43.0`) | None: `EntryValidator` evaluates `contains` and
`contains_any` itself | not applicable | not applicable |

The remaining entries in those four tags (Forms 2, Glide, static cache,
nocache, asset and Control Panel UI changes) name no class or method
imported from `src/`. The imports are
`Statamic\Fields\{Blueprint,Fields,Field,Validator}`,
`Statamic\Entries\Entry`, `Statamic\Events\EntrySaved`,
`Statamic\Facades\{Entry,User}`, `Statamic\Widgets\Widget`,
`Statamic\Providers\AddonServiceProvider`, `Statamic\Sites\Site`,
`Statamic\Stache\Query\EntryQueryBuilder`,
`Statamic\Exceptions\BlueprintNotFoundException` and
`Statamic\Auth\User`.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Josh <15675878+joshdaugherty@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
joshdaugherty added a commit to UAMS-Web/aether-incomplete-entries that referenced this pull request Nov 30, 2026
Closes #98.

Adds a test that pins how the audit treats a required Bard field.
`statamic/cms` v6.43.0 changed that rule
([#15935](statamic/cms#15935), "Fix required
validation passing on an emptied Bard field"), and no test covered it
when the dependency bump in #96 moved the add-on from `v6.42.0` to
`v6.44.0`.

## Approach

- One test in
[`tests/Integration/IncompletePublishedEntriesValidationTest.php`](https://github.com/UAMS-Web/aether-incomplete-entries/blob/98-pin-required-bard/tests/Integration/IncompletePublishedEntriesValidationTest.php):
a blueprint with a required Bard field, an entry whose Bard value is an
empty paragraph (reported under `body`), and an entry whose value holds
text (no error).
- The test skips itself on a `statamic/cms` older than v6.43.0. The
declared floor is `^6.35`, and the lowest-version compatibility job
installs a release where an emptied required Bard field still passes, so
the assertion holds only where the fix exists.
- No source change.

## Out of scope

- Changing how `EntryValidator` evaluates rules.
- Raising the `statamic/cms` floor.

## Test plan

- [x] The new test passes against `statamic/cms` `v6.44.0` (1 passed, 4
assertions).
- [x] The test fails with the `required` rule removed from the blueprint
field (1 failed: `Failed asserting that two arrays are identical`) and
passes again with it restored.
- [x] The lowest-version compatibility job, which failed on the first
push without the version guard, passes with it.
- [x] `composer test:pint` passes; the Rector dry run reports no change.
- [x] CI is green on the pull request (`CI`, `Attribution footer` and
`Closing keywords` passed on `022c3bf`).

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validation on Bard field not working

2 participants