Skip to content

Commit 001f4df

Browse files
committed
Merge branch 'feature/upgrade-laravel-10' into 3.x
2 parents 7615b2e + 8dc5b22 commit 001f4df

File tree

4 files changed

+15
-12
lines changed

4 files changed

+15
-12
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
## Esensi Core Components Package
22

3-
> Version 1
3+
> Version 3
44
55
An [Esensi](https://github.com/esensi) package, coded by [SiteRocket Labs®](https://www.siterocket.com).
66

77
The `Esensi/Core` package is just one package that makes up [Esensi](https://github.com/esensi), a platform built on [Laravel](https://laravel.com). Esensi/Core is the foundational package for the other components package. This package provides core patterns and commonly extended base classes to all other packages of the Esensi platform. These components include an Laravel 8.x compatible HMVC pattern involving UI and API controller classes, an Eloquent model backed repository pattern, confirmed single and bulk actions and so much more. For more details on the inner workings and composition of the classes please consult the generously documented source code.
88

99
## Note
1010

11-
This code is specifically designed to be compatible with the [Laravel Framework](https://laravel.com) and may not be compatible as a stand-alone dependency or as part of another framework. The current release of `Esensi/Core` also has some reliance on closed source code. Contact [[email protected]](https://www.siterocket.com/contact) if you would like to get access to these other repositories.
11+
This code is specifically designed to be compatible with the [Laravel Framework ^10](https://laravel.com) and may not be compatible as a stand-alone dependency or as part of another framework. The current release of `Esensi/Core` also has some reliance on closed source code. Contact [[email protected]](https://www.siterocket.com/contact) if you would like to get access to these other repositories.
1212

1313
## Quick Start
1414

composer.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,15 @@
2323
],
2424
"license": "MIT",
2525
"require": {
26-
"php": "^7.3|^8.0",
26+
"php": "^8.1",
2727
"laravelcollective/html": "^6.3",
28-
"illuminate/support": "^8.0|^9.0"
28+
"illuminate/support": "^10.0",
29+
"esensi/loaders": "^v3.0.0"
2930
},
3031
"require-dev": {
31-
"fakerphp/faker": "^1.9.1",
32-
"mockery/mockery": "^1.4.4",
33-
"phpunit/phpunit": "^9.5.10",
32+
"fakerphp/faker": "^1.21",
33+
"mockery/mockery": "^1.5.1",
34+
"phpunit/phpunit": "^10.0.7",
3435
"phpspec/phpspec": "^7.2"
3536
},
3637
"autoload": {

src/Providers/RouteServiceProvider.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,12 @@ protected function bindPatterns()
8686
*/
8787
protected function mapControllers()
8888
{
89-
$path = $this->routesPath();
90-
foreach ($this->controllers as $ui => $namespace) {
91-
$this->groupRoutesByNamespace($namespace, $ui);
92-
}
89+
Route::middleware('web')
90+
->group(function () {
91+
foreach ($this->controllers as $ui => $namespace) {
92+
$this->groupRoutesByNamespace($namespace, $ui);
93+
}
94+
});
9395
}
9496

9597
/**

src/Traits/ActivateableRepositoryTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function deactivate($id)
7171
$object->activated_at = null;
7272

7373
// Validate the resource
74-
if ($object->isInvalid('deactivating') || !$object->save()) {
74+
if ($object->isInvalid('deactivating') || !$object->saveQuietly()) {
7575
$this->throwException($object->getErrors(), $this->error('deactivate'));
7676
}
7777

0 commit comments

Comments
 (0)