Skip to content
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

[6.0] Added typehints for new functions from #40613 #44740

Open
wants to merge 1 commit into
base: 6.0-dev
Choose a base branch
from

Conversation

Bodge-IT
Copy link

Pull Request for Issue #40613.

Summary of Changes

Add type hints to new functions.

Testing Instructions

Install patch and check for typehint additions in postStoreProcess() and postStore() functions

Actual result BEFORE applying this Pull Request

new function with limited typehint(TableInterface)

Expected result AFTER applying this Pull Request

new function with all required typehints

Link to documentations

Please select:

@Bodge-IT Bodge-IT added this to the Joomla! 6.0.0 milestone Jan 17, 2025
@Bodge-IT Bodge-IT changed the title Added typehints for new functions from #40613 [6.0] Added typehints for new functions from #40613 Jan 17, 2025
Comment on lines +828 to 830
public function postStoreProcess(TableInterface $table, array $newTags = [], bool $replace = true): void
{
$this->postStore($table, $newTags, $replace);
Copy link
Member

Choose a reason for hiding this comment

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

Since this method already exists, we are not allowed to change the signature.

Suggested change
public function postStoreProcess(TableInterface $table, array $newTags = [], bool $replace = true): void
{
$this->postStore($table, $newTags, $replace);
public function postStoreProcess(TableInterface $table, $newTags = [], $replace = true): void
{
@trigger_error('7.0 Method postStoreProcess() is deprecated, use postStore() instead.', \E_USER_DEPRECATED);
$this->postStore($table, (array) $newTags, (bool) $replace);
}

Also please update the deprecation message with the replacement syntax.

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