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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libraries/src/Helper/TagsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ public static function getTypes($arrayType = 'objectList', $selectTypes = null,
*
* @deprecated 5.3 will be removed in 7.0
*/
public function postStoreProcess(TableInterface $table, $newTags = [], $replace = true)
public function postStoreProcess(TableInterface $table, array $newTags = [], bool $replace = true): void
{
$this->postStore($table, $newTags, $replace);
Comment on lines +828 to 830
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.

}
Expand All @@ -843,7 +843,7 @@ public function postStoreProcess(TableInterface $table, $newTags = [], $replace
*
* @since __DEPLOY_VERSION__
*/
public function postStore(TableInterface $table, $newTags = [], $replace = true, $remove = false)
public function postStore(TableInterface $table, array $newTags = [], bool $replace = true, bool $remove = false): bool
{
if (!empty($table->newTags) && empty($newTags)) {
$newTags = $table->newTags;
Expand Down