Skip to content

Commit 954746b

Browse files
committed
Merge branch 'main' into fix-fluent-column-key
# Conflicts: # tests/Unit/CrudPanel/CrudPanelColumnsTest.php
2 parents 20f49c9 + c534a5f commit 954746b

38 files changed

+1203
-362
lines changed

.github/pull_request_template.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,11 @@
2525
### How can we test the before & after?
2626

2727
??
28+
29+
If the PR has changes in multiple repos please provide the command to checkout all branches, eg.:
30+
```bash
31+
git checkout "dev-branch-name" &&
32+
cd vendor/backpack/crud && git checkout crud-branch-name &&
33+
cd ../pro && git checkout pro-branch-name &&
34+
cd ../../..
35+
```

.github/workflows/coverage.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ jobs:
5050
status: ${{ steps.test-coverage.outputs.coverage-rounded-display }}
5151
path: ./test-coverage.svg
5252
color: ${{ steps.test-coverage.outputs.coverage > 90 && 'green' ||
53-
steps.test-coverage.outputs.coverage > 80 && 'yellow,green' ||
54-
steps.test-coverage.outputs.coverage > 70 && 'yellow' ||
55-
steps.test-coverage.outputs.coverage > 60 && 'orange,yellow' ||
53+
steps.test-coverage.outputs.coverage > 80 && 'yellow,green, green' ||
54+
steps.test-coverage.outputs.coverage > 70 && 'yellow, green' ||
55+
steps.test-coverage.outputs.coverage > 60 && 'yellow,yellow, green' ||
5656
steps.test-coverage.outputs.coverage > 50 && 'orange' ||
5757
steps.test-coverage.outputs.coverage > 40 && 'red,orange' ||
5858
steps.test-coverage.outputs.coverage > 30 && 'red,red,orange' ||

package-lock.json

Lines changed: 62 additions & 62 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
"lodash": "^4.17.21",
1717
"pace": "0.0.4",
1818
"resolve-url-loader": "^4.0.0",
19-
"sass": "^1.55.0",
19+
"sass": "^1.56.1",
2020
"sass-loader": "^9.0.3",
21-
"vue-template-compiler": "^2.7.8"
21+
"vue-template-compiler": "^2.7.14"
2222
},
2323
"dependencies": {
2424
"@coreui/coreui": "^2.1.16",
@@ -29,10 +29,10 @@
2929
"bootstrap-datepicker": "^1.9.0",
3030
"bootstrap-daterangepicker": "^3.1.0",
3131
"bootstrap-iconpicker": "^1.8.2",
32-
"ckeditor4": "^4.20.0",
32+
"ckeditor4": "^4.20.1",
3333
"cropperjs": "^1.5.12",
34-
"datatables.net": "^1.12.1",
35-
"datatables.net-bs4": "^1.12.1",
34+
"datatables.net": "^1.13.1",
35+
"datatables.net-bs4": "^1.13.1",
3636
"datatables.net-fixedheader": "^3.2.4",
3737
"datatables.net-fixedheader-bs4": "^3.2.4",
3838
"datatables.net-responsive": "^2.3.0",
@@ -60,7 +60,7 @@
6060
"source-sans-pro": "^3.6",
6161
"summernote": "^0.8.20",
6262
"sweetalert": "^2.1.2",
63-
"tinymce": "^5.10.2",
63+
"tinymce": "^5.10.7",
6464
"urijs": "^1.19.11"
6565
}
6666
}

phpunit.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<directory suffix=".php">./src/app/Models/Traits/</directory>
2424
<file>./src/app/Library/Widget.php</file>
2525
<file>./src/app/Http/Controllers/CrudController.php</file>
26+
<file>./src/ViewNamespaces.php</file>
2627
<exclude>
2728
<directory suffix=".php">./src/app/Models/Traits/SpatieTranslatable/</directory>
2829
</exclude>

src/BackpackServiceProvider.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ class BackpackServiceProvider extends ServiceProvider
3030

3131
// Indicates if loading of the provider is deferred.
3232
protected $defer = false;
33+
3334
// Where the route file lives, both inside the package and in the app (if overwritten).
3435
public $routeFilePath = '/routes/backpack/base.php';
36+
3537
// Where custom routes can be written, and will be registered by Backpack.
3638
public $customRoutesFilePath = '/routes/backpack/custom.php';
3739

@@ -40,7 +42,7 @@ class BackpackServiceProvider extends ServiceProvider
4042
*
4143
* @return void
4244
*/
43-
public function boot(\Illuminate\Routing\Router $router)
45+
public function boot(Router $router)
4446
{
4547
$this->loadViewsWithFallbacks();
4648
$this->loadTranslationsFrom(realpath(__DIR__.'/resources/lang'), 'backpack');
@@ -161,6 +163,11 @@ public function publishFiles()
161163
*/
162164
public function setupRoutes(Router $router)
163165
{
166+
if (app()->runningUnitTests()) {
167+
$this->loadRoutesFrom(__DIR__.'/routes/backpack/testing.php');
168+
169+
return;
170+
}
164171
// by default, use the routes file provided in vendor
165172
$routeFilePathInUse = __DIR__.$this->routeFilePath;
166173

@@ -259,8 +266,8 @@ public function loadConfigs()
259266
'backpack' => [
260267
'provider' => 'backpack',
261268
'table' => 'password_resets',
262-
'expire' => 60,
263-
'throttle' => config('backpack.base.password_recovery_throttle_notifications'),
269+
'expire' => config('backpack.base.password_recovery_token_expiration', 60),
270+
'throttle' => config('backpack.base.password_recovery_throttle_notifications'),
264271
],
265272
];
266273

src/app/Http/Controllers/CrudController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function __construct()
3333
// It's done inside a middleware closure in order to have
3434
// the complete request inside the CrudPanel object.
3535
$this->middleware(function ($request, $next) {
36-
$this->crud = app()->make('crud');
36+
$this->crud = app('crud');
3737

3838
$this->crud->setRequest($request);
3939

@@ -96,6 +96,7 @@ protected function setupDefaults()
9696
protected function setupConfigurationForCurrentOperation()
9797
{
9898
$operationName = $this->crud->getCurrentOperation();
99+
99100
$setupClassName = 'setup'.Str::studly($operationName).'Operation';
100101

101102
/*

0 commit comments

Comments
 (0)