Fix element booting, holder writes, db path names and invalid route expressions - #672
Merged
daftspunk merged 5 commits intoSep 26, 2026
Conversation
…d route expressions ElementBase never called Extendable::__construct, so extend() callbacks and $implement were ignored on construction but applied on unserialize. ElementHolder::get served a value cached by an earlier read after offsetSet had replaced it. DbDatasource::pathToFileName removed every occurrence of the directory name instead of the leading one. Router and Rule accepted a URL when a parameter expression threw instead of rejecting it.
samuelpatro
marked this pull request as ready for review
August 30, 2026 11:29
Extensions now see the configured element, matching unserialized elements. Unset holder entries stay touched as before. Tests go through public APIs and cover each fix.
Member
Author
|
@daftspunk rechecked this against current develop and changed a few things:
Ready for another pass. |
Methods added by behaviors or extend() callbacks were swallowed by the fluent config setter, so booting them had no visible effect.
Member
|
Thanks! |
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.
Four unrelated correctness bugs. Each has a test that fails on
develop.ElementBase::__construct()never calledparent::__construct(), so::extend()callbacks and$implementbehaviors were skipped for constructed elements but applied to unserialized ones. Extensions now boot after the config is applied, as they do in__wakeup(). Methods they add are now called instead of being stored as config by the fluent setter.ElementHolder::get()kept returning the first value it read, so a later$holder['key'] = 'new'was never seen. It now reads the config each time and still records touched elements.DbDatasource::pathToFileName()usedstr_replace(), which removed every occurrence of the directory name:pages/pages/about.htmbecameabout.htmandpages/blog/pages.htmbecameblog/.htm. It now strips only the leading directory.:id|[unclosed, matched any value. TheErrorExceptionLaravel raises for thepreg_matchwarning was swallowed and the segment counted as valid.RouterandRulenow treat it as a non-match.