Skip to content

Conversation

@Tofandel
Copy link
Contributor

@Tofandel Tofandel commented Jun 11, 2024

If the model does not have the publishing feature and column, then the published scope throws an error

It's called in TwillUtil::parseInternalLinks for example, indiscriminately of the model's features

@Tofandel Tofandel force-pushed the fix/published-scope branch 2 times, most recently from ef143b7 to c6ca5cc Compare June 11, 2024 17:56
@Tofandel Tofandel force-pushed the fix/published-scope branch from c6ca5cc to 3d3c283 Compare June 11, 2024 17:58
}

public function scopePublished($query): Builder
public function scopePublished(Builder $query): Builder
Copy link
Contributor Author

@Tofandel Tofandel Jun 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the scopes have Builder $query in the twill interfaces, I'm actually really surprised php isn't complaining that the signature isn't compatible

interface TwillModelContract
{
public function scopePublished(Builder $query): Builder;
public function scopeAccessible(Builder $query): Builder;
public function scopeOnlyTrashed(Builder $query): Builder;
public function scopeDraft(Builder $query): Builder;
public function getTranslatedAttributes(): array;
}

@ifox ifox merged commit 786a54b into area17:3.x Jun 13, 2024
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.

2 participants