8000 deprecate Form::_execute by LordSimal · Pull Request #18725 · cakephp/cakephp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

deprecate Form::_execute #18725

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 8, 2025
Merged

deprecate Form::_execute #18725

merged 1 commit into from
Jun 8, 2025

Conversation

LordSimal
Copy link
Contributor

Refs: #18707

@LordSimal LordSimal added this to the 5.3.0 milestone Jun 4, 2025
@LordSimal LordSimal marked this pull request as ready for review June 4, 2025 16:45
@LordSimal
Copy link
Contributor Author

The problem with this way of deprecating is, that every Form execution will trigger this deprecation now, no matter if its done by a overwritten class or not.

But I can't find any other BC way of doing this without adding reflection to the class (to know if the child class has an overwritten _execute or process method or not)

@LordSimal LordSimal force-pushed the 5.next-deprecate-form_execute branch from 137d4e3 to 96af950 Compare June 4, 2025 17:03
@LordSimal LordSimal force-pushed the 5.next-deprecate-form_execute branch 4 times, most recently from 71c01ef to 977654b Compare June 4, 2025 17:52
];

$this->assertFalse($form->execute($data));
$this->deprecated(function (): void {
Copy link
Member

Choose a reason for hiding this comment

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

There also needs to be a test using a class which doesn't override _execute() and overrides process().

@LordSimal LordSimal force-pushed the 5.next-deprecate-form_execute branch 2 times, most recently from e660250 to e40675b Compare June 5, 2025 07:53
@LordSimal LordSimal force-pushed the 5.next-deprecate-form_execute branch from e40675b to 9d1fe85 Compare June 5, 2025 07:57
@markstory markstory self-assigned this Jun 7, 2025
@markstory
Copy link
Member

I can give this a shot as it was my suggestion.

@LordSimal
Copy link
Contributor Author

What needs to be done here? I thought the current state is fine now

@markstory
Copy link
Member

What needs to be done here? I thought the current state is fine now

Nothing really. I thought you weren't happy with the results. I think using reflection for these scenarios is quite reasonable.

@markstory markstory merged commit 7b367f8 into 5.next Jun 8, 2025
12 of 13 checks passed
@markstory markstory deleted the 5.next-deprecate-form_execute branch June 8, 2025 02:56
markstory added a commit to cakephp/docs that referenced this pull request Jun 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0