Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes to bugs I came across while I had been working on #1522.
User::name()
on the user model anymore, but assumes, thatname
is an attribute and callsUser::$name
. Hence, we need the accessor functionUser::getNameAttribute()
to please Laravel.2019_10_03_214750_frame_refresh_in_sec
does not use DB methods only, but depends on particular productive code which breaks when this productive code changes.Appeal
We should really stop to use production code in our migrations. That is a bad thing to do. The migrations will exist "forever" in some sense and even very old migrations must still be runnable in the future. If they use production code and make certain assumptions about that, this means we can never change that code without breaking those migrations. And nobody feels like fixing ancient migrations.
This particular issue took me two hours to debug in the step debugger. I encountered really weird and seemingly unrelated error messages like
ConfigurationMissingException: No such key map_provider
for a lot of seemingly random configuration settings. I then noticed, that I only had about 60 configuration items in my test DB instead of the usual 90. "Something" was deleting about 30 configuration items. Then I found out that it happened during the Unit Tests when the migration was tested and finally I found the wrongdoer in that particular migration.