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

Upgrade/enso6 dr #437

Merged
merged 31 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
ac3eb60
upgrade dynamic methods
AbdullahiAbdulkabir Nov 23, 2023
3b1e55b
Apply fixes from StyleCI
StyleCIBot Nov 23, 2023
ce3fbc1
fix
AbdullahiAbdulkabir Jan 20, 2024
7800752
Update
AbdullahiAbdulkabir Jan 30, 2024
13d447a
Apply fixes from StyleCI
StyleCIBot Jan 30, 2024
07c907e
upgrade
AbdullahiAbdulkabir Feb 1, 2024
51e707c
update
AbdullahiAbdulkabir Feb 1, 2024
4d7fbbd
update
AbdullahiAbdulkabir Feb 5, 2024
f692631
update
AbdullahiAbdulkabir Feb 11, 2024
d62785d
doctrine update
AbdullahiAbdulkabir Feb 12, 2024
87d9cce
fix docker
AbdullahiAbdulkabir Feb 14, 2024
42c73f3
update workflow
AbdullahiAbdulkabir Feb 14, 2024
91203c6
update php version workflow
AbdullahiAbdulkabir Feb 14, 2024
5eab9f8
update php version workflow
AbdullahiAbdulkabir Feb 14, 2024
78c2fad
update
AbdullahiAbdulkabir Feb 15, 2024
be42f17
update factory
AbdullahiAbdulkabir Feb 15, 2024
7e568e8
update
AbdullahiAbdulkabir Feb 16, 2024
e042423
laravel 10 updates
vmcvlad Feb 26, 2024
3f406cb
updates
vmcvlad Feb 28, 2024
01a4a27
fix
vmcvlad Feb 28, 2024
db8c0ad
L10 updates
AbdullahiAbdulkabir Mar 5, 2024
c3123f7
Apply fixes from StyleCI
StyleCIBot Mar 5, 2024
3415368
updates
vmcvlad Mar 12, 2024
3dda1f2
attempt
vmcvlad Mar 12, 2024
1fdebc3
Update main.yml
vmcvlad Mar 28, 2024
85ddde5
Update main.yml
vmcvlad Mar 28, 2024
a0bf3e3
Update main.yml
vmcvlad Mar 28, 2024
3962fa2
Update main.yml
vmcvlad Mar 28, 2024
a700807
updates
vmcvlad Mar 29, 2024
a80232f
removes pretty print
vmcvlad Apr 2, 2024
d38272d
updates
vmcvlad Apr 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,23 @@

use Closure;
use LaravelEnso\Comments\Models\Comment;
use LaravelEnso\Companies\Models\Company;
use LaravelEnso\DynamicMethods\Contracts\Method;

class Comments implements Method
AbdullahiAbdulkabir marked this conversation as resolved.
Show resolved Hide resolved
{
public function bindTo(): array
{
return [Company::class];
}

public function name(): string
{
return 'comments';
}

public function closure(): Closure
{
return fn () => $this->morphMany(Comment::class, 'commentable');
return fn (Company $company) => $company->morphMany(Comment::class, 'commentable');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,24 @@
namespace App\DynamicRelations\Company;

use Closure;
use LaravelEnso\Companies\Models\Company;
use LaravelEnso\Discussions\Models\Discussion;
use LaravelEnso\DynamicMethods\Contracts\Method;

class Discussions implements Method
AbdullahiAbdulkabir marked this conversation as resolved.
Show resolved Hide resolved
{
public function bindTo(): array
{
return [Company::class];
}

public function name(): string
{
return 'discussions';
}

public function closure(): Closure
{
return fn () => $this->morphMany(Discussion::class, 'discussable');
return fn (Company $company) => $company->morphMany(Discussion::class, 'discussable');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,24 @@
namespace App\DynamicRelations\Company;

use Closure;
use LaravelEnso\Companies\Models\Company;
use LaravelEnso\Documents\Models\Document;
use LaravelEnso\DynamicMethods\Contracts\Method;

class Documents implements Method
AbdullahiAbdulkabir marked this conversation as resolved.
Show resolved Hide resolved
{
public function bindTo(): array
{
return [Company::class];
}

public function name(): string
{
return 'documents';
}

public function closure(): Closure
{
return fn () => $this->morphMany(Document::class, 'documentable');
return fn (Company $company) => $company->morphMany(Document::class, 'documentable');
}
}
6 changes: 0 additions & 6 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@

namespace App\Providers;

use App\DynamicRelations\Company\Comments;
use App\DynamicRelations\Company\Discussions;
use App\DynamicRelations\Company\Documents;
use App\Models\User;
use Illuminate\Support\ServiceProvider;
use LaravelEnso\Companies\Models\Company;
use LaravelEnso\DynamicMethods\Services\Methods;
use LaravelEnso\Users\Models\User as BaseUser;

class AppServiceProvider extends ServiceProvider
Expand All @@ -23,6 +18,5 @@ public function boot()

public function register()
{
Methods::bind(Company::class, [Comments::class, Discussions::class, Documents::class]);
}
}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"laravel-enso/calendar": "^3.0",
"laravel-enso/comments": "^4.0",
"laravel-enso/control-panel-api": "^3.0",
"laravel-enso/core": "^8.0",
"laravel-enso/core": "^9.0",
"laravel-enso/data-import": "^6.0",
"laravel-enso/discussions": "^4.0",
"laravel-enso/documents": "^5.0",
Expand Down Expand Up @@ -93,4 +93,4 @@
"php artisan enso:upgrade:status"
]
}
}
}
Loading