Repository navigation
rfc: native typed-settings and DeviceRepository conversions for the #8436 ADR - #8615
Open
somethingwithproof wants to merge 3 commits into
Open
somethingwithproof wants to merge 3 commits into
somethingwithproof wants to merge 3 commits into
Conversation
somethingwithproof
marked this pull request as ready for review
November 6, 2026 10:27
somethingwithproof
requested review from
TheWitness and
cigamit
and removed request for
a team
November 6, 2026 10:27
somethingwithproof
force-pushed
the
rfc/form-validator-layer
branch
2 times, most recently
from
November 12, 2026 07:51
5fd68d6 to
05ddb76
Compare
This was referenced Nov 12, 2026
Closed
github-actions
Bot
force-pushed
the
rfc/form-validator-layer
branch
3 times, most recently
from
November 16, 2026 20:48
e30944f to
83cd5c9
Compare
somethingwithproof
force-pushed
the
rfc/form-validator-layer
branch
2 times, most recently
from
November 18, 2026 13:20
8ef561a to
a7f643a
Compare
Member
Author
|
I've cut this PR to the conversions that match the corrected ADR in #8436 (7b2cf37). ADR 0004 proposes replacing Validator, Console and Process with native code, and ADR 0003 asks new code not to add Validator uses. So I removed the form-validation layer, the |
github-actions
Bot
force-pushed
the
rfc/form-validator-layer
branch
from
November 19, 2026 20:50
a7f643a to
6d7eb99
Compare
somethingwithproof
force-pushed
the
rfc/form-validator-layer
branch
from
November 25, 2026 08:02
c51715e to
6b111d5
Compare
github-actions
Bot
force-pushed
the
rfc/form-validator-layer
branch
from
November 25, 2026 20:48
6b111d5 to
fc06d72
Compare
Add cacti_setting_int(), cacti_setting_bool(), cacti_setting_string() and cacti_setting_enum() in lib/config_api.php. Each builds on read_config_option(), so caching, remote-poller behaviour and the $force re-read are unchanged, and a missing or invalid value returns the caller's typed default instead of a silent zero. Spikekill reads its defaults through them. The fallbacks match the registered setting defaults, and an empty or non-numeric stored value now yields that default instead of a TypeError on the typed property. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
…able Cacti\Repository\DeviceRepository binds every value and allowlists every column name before it reaches SQL. An update of a missing device fails rather than inserting, and a null criterion matches IS NULL. update_host_status() reads its device through find(). The query is the same, but a device deleted during the poll now returns early instead of being processed from an empty row. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
…anged-line gate Run ConfigApiTest and DeviceRepositoryTest under a clover coverage configuration and the DeviceRepositoryContracts probe in the PR change tests. The gate now reads clover reports and no longer counts a declare(strict_types) directive as an executable statement. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
github-actions
Bot
force-pushed
the
rfc/form-validator-layer
branch
from
November 26, 2026 08:50
fc06d72 to
30654b4
Compare
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Reference conversions in the native direction of ADR 0003/0004 (#8436). They add no new Symfony uses.
lib/config_api.php: typed setting accessors (cacti_setting_int/bool/string/enum) built onread_config_option(). Caching, remote-poller behaviour and the$forcere-read are unchanged. Spikekill reads its defaults through them, with fallbacks that match the registered defaults.Cacti\Repository\DeviceRepository: parameterized access to thehosttable, with bound values and allowlisted column names.update_host_status()reads its device throughfind(). A device deleted during a poll now returns early instead of being processed from an empty row.DeviceRepositoryContractsprobe.The Symfony Validator form layer, the Console command and the Process helper that were in earlier revisions are removed. ADR 0004 proposes replacing those components with native code, so new uses of them would run against it.
Supersedes #8620, #8625.