[GH-ISSUE #1076] Error when upgrading to 4.0.0 #628

Closed
opened 2026-02-26 02:33:45 +03:00 by kerem · 3 comments
Owner

Originally created by @zachron on GitHub (Sep 11, 2019).
Original GitHub issue: https://github.com/koel/koel/issues/1076

Currently upgrading from 3.7.2 -> 4.0.0

php version: PHP 7.3.8
git version: 2.21.0

2 things not sure if they are related or not

(1) followed the instructions for the upgrade. I do not think the submodule is being correctly checked out (when following the upgrade instructions), after the git checkout v4.0.0 the resources/assets directory is empty. if i run 'git submodule init' and 'git submodule update' manually then the resources/assets directory actually gets the submodule data. Doing a pull needs to be done on a branch, not a tag. i would think at least for right now a better upgrade instructions would be:

  1. git pull (without the --recurse-submodules cause that only works on a branch, and most people will probably be on the 3.7.2 tag)
  2. git checkout v4.0.0
  3. git submodule init
  4. git submodule update (both of these commands cause the recurse submodule switch is not working for me)
  5. php artisan koel:init

(2) maybe unrelated but if following the upgrade instructions exactly (or when using the modified upgrade instructions above), when i run 'php artisan koel:init', on the v4.0.0 tag, i get the error: 'In api.php line 48:Call to a member function only() on null'

Originally created by @zachron on GitHub (Sep 11, 2019). Original GitHub issue: https://github.com/koel/koel/issues/1076 Currently upgrading from 3.7.2 -> 4.0.0 php version: PHP 7.3.8 git version: 2.21.0 2 things not sure if they are related or not (1) followed the instructions for the upgrade. I do not think the submodule is being correctly checked out (when following the upgrade instructions), after the git checkout v4.0.0 the resources/assets directory is empty. if i run 'git submodule init' and 'git submodule update' manually then the resources/assets directory actually gets the submodule data. Doing a pull needs to be done on a branch, not a tag. i would think at least for right now a better upgrade instructions would be: 1. git pull (without the --recurse-submodules cause that only works on a branch, and most people will probably be on the 3.7.2 tag) 2. git checkout v4.0.0 3. git submodule init 4. git submodule update (both of these commands cause the recurse submodule switch is not working for me) 3. php artisan koel:init (2) maybe unrelated but if following the upgrade instructions exactly (or when using the modified upgrade instructions above), when i run 'php artisan koel:init', on the v4.0.0 tag, i get the error: 'In api.php line 48:Call to a member function only() on null'
kerem closed this issue 2026-02-26 02:33:45 +03:00
Author
Owner

@SpikeShape commented on GitHub (Sep 11, 2019):

'In api.php line 48:Call to a member function only() on null'

Thats exactly what I am getting when I try to switch from 3.7.2 to 4.0.0.
I followed the instructions and got this error.
I'm running PHP 7.3.9 and git 2.11.0.

<!-- gh-comment-id:530527297 --> @SpikeShape commented on GitHub (Sep 11, 2019): ``` 'In api.php line 48:Call to a member function only() on null' ``` Thats exactly what I am getting when I try to switch from 3.7.2 to 4.0.0. I followed the instructions and got this error. I'm running PHP 7.3.9 and git 2.11.0.
Author
Owner

@calvarado194 commented on GitHub (Sep 11, 2019):

I ran into the same issues, and they seem to be due to the init command requiring a Laravel update first.

Make sure to run a composer update or composer install after checkout and before running the init command.

<!-- gh-comment-id:530577735 --> @calvarado194 commented on GitHub (Sep 11, 2019): I ran into the same issues, and they seem to be due to the init command requiring a Laravel update first. Make sure to run a `composer update` or `composer install` after checkout and before running the init command.
Author
Owner

@phanan commented on GitHub (Sep 12, 2019):

@zachron

git pull (without the --recurse-submodules cause that only works on a branch, and most people will probably be on the 3.7.2 tag)

This is true. I'm so used to working on the master branch, sorry.

@calvarado194 That's a good point as well.

I'll update the guide, thanks everyone!

<!-- gh-comment-id:530695277 --> @phanan commented on GitHub (Sep 12, 2019): @zachron > git pull (without the --recurse-submodules cause that only works on a branch, and most people will probably be on the 3.7.2 tag) This is true. I'm so used to working on the `master` branch, sorry. @calvarado194 That's a good point as well. I'll update the guide, thanks everyone!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#628
No description provided.