Skip to content

Fix attribute execution control and finalize lifecycle#39

Merged
kettasoft merged 4 commits into
masterfrom
v2
Feb 28, 2026
Merged

Fix attribute execution control and finalize lifecycle#39
kettasoft merged 4 commits into
masterfrom
v2

Conversation

@kettasoft
Copy link
Copy Markdown
Owner

Fix attribute execution control and finalize lifecycle


Description

### Fixed

#### Attribute execution control

Control attributes were not able to stop filter method execution.
Attributes intended to interrupt execution (e.g. `Required`,
authorization or other control attributes) were executed but
did not prevent the filter method from running.

Control attributes can now properly halt execution when needed.

Example:

```php
#[Required]
public function status(Payload $payload)

will now correctly stop execution when the payload value is missing.


Finalization lifecycle

When returning a QueryBuilder via ShouldReturnQueryBuilder
(or $shouldReturnQueryBuilder), the finally() hook was not executed.

Before:

return $builder;

After:

return $this->finally($builder);

This ensures the finalization stage runs consistently regardless
of the return strategy.

@kettasoft kettasoft self-assigned this Feb 28, 2026
@kettasoft kettasoft added the bug Something isn't working label Feb 28, 2026
@kettasoft kettasoft merged commit fedc56f into master Feb 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant