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

Change in middlewareGroup function behaviour introduces a breaking change in v9.10.0 #42159

Closed
toyi opened this issue Apr 27, 2022 · 6 comments
Closed
Labels

Comments

@toyi
Copy link

toyi commented Apr 27, 2022

  • Laravel Version: 9.10.0
  • PHP Version: 8.1.3
  • Database Driver & Version: -

Description:

Since the v9.10.0, I encounter many issues on a large project. I can only say "many issues" for now, because it's "just" failling tests here and there that doesn't seem related to each other, even if everything works fine when I roll back to v9.9.0.

I'm still in the process of digging the problem and to figure out why and when it happens.

However, I've determined this commit 05365f8 (part of v9.10.0) is the cause of these problems. If I checkout on it, it still doesn't work, the moment I manually revert the changes in the middlewareGroup public function, it works. With this reverted change, v9.10.0 works fine too.

In the previous version, prior to 05365f8, the entire middleware group was replaced by a new set of middlewares. In the new version, after 05365f8, only the missing ones are added. At least it's what I understand for now.

Even if it's a small change, it's a breaking change that should be reverted.

What do you think?

Steps To Reproduce:

Not yet but the change in behaviour is clear enough to be discussed.

@kocoten1992
Copy link

can confirm this, revert 05365f8 fix my problem too (#42156)

@marvin-wtt
Copy link
Contributor

This commit was added with #42004

@suleymanozev
Copy link

I am also having the same problem. I was creating middleware group with empty array to tag routes. Framework cannot find middleware group when I run it with this pr(#42004)

@rodrigopedra
Copy link
Contributor

Behavior of the middlewareGroup method changed after PR #42004 as it no longer defines a middleware group when the group is an empty array.

I sent PR #42161 with a proposed fix.

@driesvints driesvints added the bug label Apr 28, 2022
@driesvints
Copy link
Member

Thanks all. We'll try to get this fixed asap.

@driesvints
Copy link
Member

We got this reverted and will cut a release shortly. Thanks all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants