Skip to content

Conversation

@LordSimal
Copy link
Contributor

There is no need to call parent::initialize($config); in a baked Table class since we don't actually do anything in there.

@LordSimal LordSimal added this to the 3.x (CakePHP 5) milestone Dec 28, 2024
@dereuromark
Copy link
Member

But if we, like me, use a different base class after baking you suddenly need it.
I would be rather having it consistently call it and have it no-op by default than having to wry about adding it.

@LordSimal
Copy link
Contributor Author

LordSimal commented Dec 28, 2024

But if we, like me, use a different base class after baking you suddenly need it.
I would be rather having it consistently call it and have it no-op by default than having to wry about adding it.

If you introduce your own inheritance logic then I'd say its logical to add that parent call yourself, not rely on the Framework to do the thinking for you.

I think its just misleading that sometimes the parent call does something for our code (like Application::bootstrap) and sometimes it doesn't because "maybe you need it later"

@ADmad
Copy link
Member

ADmad commented Dec 28, 2024

I too would prefer keeping the parent call for consistency. We have it for the controller class too.

@LordSimal LordSimal closed this Dec 28, 2024
@LordSimal LordSimal deleted the 3.x-cleanup branch December 28, 2024 20:32
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.

4 participants