8000 [5.next] Macroable Trait by arshidkv12 · Pull Request #18889 · cakephp/cakephp · GitHub
[go: up one dir, main page]

Skip to content

Conversation

arshidkv12
Copy link
Contributor

@dereuromark dereuromark changed the base branch from 5.x to 5.next September 6, 2025 07:40

if (!is_callable($macro)) {
throw new BadMethodCallException(sprintf(
'Macro for method %s is not callable.',
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
'Macro for method %s is not callable.',
'Macro for method `%s()` is not callable.',

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok

@arshidkv12 arshidkv12 force-pushed the macroable5_next branch 2 times, most recently from afa00cb to 611ab71 Compare September 6, 2025 10:56
{
return 'privateStaticValue';
}
};
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we also call clearMacros() here as it looks like we may leak global state in tests here.

use BadMethodCallException;
use Closure;

trait MacroableInstanceTrait
Copy link
Member

Choose a reason for hiding this comment

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

It would be good to have test coverage on this trait as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok

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.

3 participants

0