Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

crynobone
Copy link
Member

fix #56895


if (is_null($messageGroup) && isset($job->group) && is_string($job->group)) {
$messageGroup = $job->group;
}
Copy link
Member Author

@crynobone crynobone Sep 4, 2025

Choose a reason for hiding this comment

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

This is just to prevent breaking changes on any existing queues. We can remove it for 13 release.

Copy link
Contributor

Choose a reason for hiding this comment

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

What if the job instance doesn't have the $messageGroup property but instead has a $group property that is not related to Amazon SQS? I believe the same issue we're trying to solve would still exist in that case.

Also, I don't think we need to worry about breaking changes here, since the original PR was only merged 5 days ago.

Copy link
Member Author

Choose a reason for hiding this comment

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

  1. It has to be a FIFO queue on SQS
  2. $group has to a string and not unique to be grouped by SQS

the chance of that is minimal to non existent.

Copy link
Contributor

Choose a reason for hiding this comment

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

So, we have jobs that have a $group and also a string or hash value. The name $group is too general and will most likely also be used in the app context. Strings can also occur here. In my opinion, a name should simply be chosen that does not conflict with job attributes from the app context. I don't think it's a breaking change to consistently rename it now. The bigger breaking change is the variable $group, which breaks existing applications. There shouldn't be that many people who use the new feature directly in production and would therefore be affected by a change from $group to another name.

Copy link
Contributor

Choose a reason for hiding this comment

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

Would using a property name like $_messageGroup solve the issue?

Copy link
Member Author

@crynobone crynobone Sep 4, 2025

Choose a reason for hiding this comment

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

@Brenneisen are you using SQS FIFO queue at the moment with $group property but doesn't intend to use Fair queue by setting onGroup()?

By default, SQS uses standard queue and not affected by this.

@crynobone crynobone marked this pull request as ready for review September 4, 2025 02:32
@taylorotwell taylorotwell merged commit 3dc3269 into 12.x Sep 4, 2025
64 checks passed
@taylorotwell taylorotwell deleted the 12/issue-56895 branch September 4, 2025 12:41
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.

ExampleJob and Queueable define the same property ($group)
5 participants