Skip to content

Commit

Permalink
docs: add todo comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad-Alavi committed Jul 6, 2024
1 parent ad35527 commit 680efd8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Abstracts/Jobs/Job.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;

// TODO: BC
// remove "implements ShouldQueue"
// from here and add let the child classes decide if they want to use the queue or not
// Also maybe move trait to the child classes, so they can decide if they want to use it or not?
abstract class Job implements ShouldQueue
{
use Dispatchable;
Expand Down
5 changes: 5 additions & 0 deletions src/Abstracts/Providers/AuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

abstract class AuthServiceProvider extends LaravelAuthServiceProvider
{
// TODO: BC
// https://laravel.com/docs/10.x/upgrade#register-policies
// parent::boot() should be removed from
// App\Containers\AppSection\Authentication\Providers\AuthServiceProvider::boot()

/**
* The policy mappings for the application.
*
Expand Down
2 changes: 2 additions & 0 deletions src/Services/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ private function defaultResourceName(): string
}

if (!empty($this->data) && 'collection' === $this->determineDataType($this->data)) {
// TODO: there was a problem $this->data->first() but I cant remember. It had to do with the data being an array
// also check AbstractTransformer where we also do this check and use the first item. we also have the same problem there
$firstItem = $this->data->first();
if ($firstItem instanceof HasResourceKey) {
return $firstItem->getResourceKey();
Expand Down

0 comments on commit 680efd8

Please sign in to comment.