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
Update Laravel to version 9 #718
Conversation
f5b3548
to
e4085da
Compare
@@ -107,6 +107,9 @@ public function handle( DatabaseManager $manager ) | |||
$replacedCount = 0; | |||
$tableWithoutPrefix = str_replace($wikiDB->prefix . '_', '', $table, $replacedCount ); | |||
if ($replacedCount !== 1) { | |||
/** | |||
* @psalm-suppress InvalidCast |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really tried hard to understand these warnings but I could not make any sense of them so I suppressed them for now. If anyone has a hunch why they might show up, please lmk.
@@ -34,21 +34,21 @@ public function getBatches(Request $request): \Illuminate\Http\Response | |||
|
|||
public function markBatchesDone(Request $request): \Illuminate\Http\Response | |||
{ | |||
$batches = (array) $request->json()->get('batches'); | |||
$batches = (array) $request->json()->all('batches'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was wrong usage before and worked mostly by accident. Now, Symfony will throw an error on the wrong usage, so I was able to fix it.
|
I was mostly thinking if someone set it previously, they'd also use the old key, so we should keep it, but it seems noone ever sets it. In which case renaming makes sense I guess.
Good catch.
I think this is benefitial actually. We rarely use the Laravel Http client anyways, and in the cases we do, If we have anything the API calls and a single call takes longer than 30s, we might wanna know about it by it failing.
I read that comment in the docs as well and wasn't entirely sure what it meant tbh. Do you have an actionable change as an example that would be coming from this remark? |
I didn't understand this repo was an application skeleton. I thought it contained the framework itself and was puzzled as why I would need to read all commit messages ever. I'll have a look at the changeset if I can find anything that might be helpful for us. |
That makes sense, thanks. Also thanks for looking into the skeleton changes - I haven't done an laravel upgrade yet but now it looks pretty good to me! |
Ticket https://phabricator.wikimedia.org/T341796