Skip to content

Commit b2b046c

Browse files
Merge pull request #40 from stackkit/master-next
4.x
2 parents 5e53e2b + 4c9de8f commit b2b046c

File tree

6 files changed

+879
-634
lines changed

6 files changed

+879
-634
lines changed

.github/workflows/code-style.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Code style
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.php'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
php-code-styling:
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 5
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
with:
20+
ref: ${{ github.head_ref }}
21+
22+
- name: Check code style
23+
uses: aglipanci/laravel-pint-action@v2
24+
25+
- name: Commit changes
26+
uses: stefanzweifel/git-auto-commit-action@v5
27+
with:
28+
commit_message: Apply code style rules

.github/workflows/run-tests.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,9 @@ jobs:
6666
- { laravel: '11.*', php: '8.4', 'testbench': '9.*', collision: '8.*'}
6767
- { laravel: '11.*', php: '8.3', 'testbench': '9.*', collision: '8.*'}
6868
- { laravel: '11.*', php: '8.2', 'testbench': '9.*', collision: '8.*'}
69-
- { laravel: '10.*', php: '8.4', 'testbench': '8.*', collision: '7.*'}
70-
- { laravel: '10.*', php: '8.3', 'testbench': '8.*', collision: '7.*'}
71-
- { laravel: '10.*', php: '8.2', 'testbench': '8.*', collision: '7.*'}
72-
- { laravel: '10.*', php: '8.1', 'testbench': '8.*', collision: '7.*'}
69+
- { laravel: '12.*', php: '8.4', 'testbench': '10.*', collision: '8.*'}
70+
- { laravel: '12.*', php: '8.3', 'testbench': '10.*', collision: '8.*'}
71+
- { laravel: '12.*', php: '8.2', 'testbench': '10.*', collision: '8.*'}
7372

7473
name: PHP ${{ matrix.payload.php }} - Laravel ${{ matrix.payload.laravel }}
7574

README.md

+1-60
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ The package will pick up on the scheduled settings and ping OhDear after the com
5050

5151
# Requirements
5252

53-
This package requires Laravel 10 or 11.
53+
This package requires Laravel 11 or 12.
5454

5555
# Installation
5656

@@ -128,9 +128,6 @@ public function boot()
128128

129129
To circumvent this, please add the following to `bootstrap/app.php`
130130

131-
<details>
132-
<summary>Laravel 11</summary>
133-
134131
```php
135132
<?php
136133

@@ -156,42 +153,11 @@ return Application::configure(basePath: dirname(__DIR__))
156153
})->create();
157154

158155
```
159-
</details>
160-
161-
<details>
162-
<summary>Laravel 10</summary>
163-
164-
```php
165-
<?php
166-
167-
/*
168-
|--------------------------------------------------------------------------
169-
| Create The Application
170-
|--------------------------------------------------------------------------
171-
|
172-
| The first thing we will do is create a new Laravel application instance
173-
| which serves as the "glue" for all the components of Laravel, and is
174-
| the IoC container for the system binding all of the various parts.
175-
|
176-
*/
177-
178-
$app = new Illuminate\Foundation\Application(
179-
$_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
180-
);
181-
182-
+ if (($_SERVER['REQUEST_URI'] ?? '') === '/cloud-scheduler-job') {
183-
+ $_ENV['APP_RUNNING_IN_CONSOLE'] = true;
184-
+ }
185-
```
186-
</details>
187156

188157
6 - Optional: whitelist route for maintenance mode
189158

190159
If you want to allow jobs to keep running if the application is down (`php artisan down`), update the following:
191160

192-
<details>
193-
<summary>Laravel 11</summary>
194-
195161
```php
196162
return Application::configure(basePath: dirname(__DIR__))
197163
->withRouting(
@@ -212,31 +178,6 @@ return Application::configure(basePath: dirname(__DIR__))
212178

213179

214180
```
215-
</details>
216-
<details>
217-
<summary>Laravel 10</summary>
218-
219-
```php
220-
<?php
221-
222-
namespace App\Http\Middleware;
223-
224-
use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance as Middleware;
225-
226-
class PreventRequestsDuringMaintenance extends Middleware
227-
{
228-
/**
229-
* The URIs that should be reachable while maintenance mode is enabled.
230-
*
231-
* @var array
232-
*/
233-
protected $except = [
234-
+ '/cloud-scheduler-job',
235-
];
236-
}
237-
238-
```
239-
</details>
240181

241182
# Cloud Scheduler Example
242183

composer.json

+6-8
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,15 @@
99
],
1010
"require": {
1111
"ext-json": "*",
12-
"google/cloud-scheduler": "^1.6",
13-
"phpseclib/phpseclib": "^3.0",
12+
"google/cloud-scheduler": "^2.0",
1413
"google/auth": "^v1.29.1",
15-
"laravel/framework": "^10.0|^11.0",
16-
"php": "^8.1",
17-
"symfony/cache": "^6.4"
14+
"laravel/framework": "^11.0|^12.0",
15+
"symfony/cache": "^7.2",
16+
"phpseclib/phpseclib": "^3.0"
1817
},
1918
"require-dev": {
20-
"mockery/mockery": "^1.5",
21-
"orchestra/testbench": "^8.0|^9.0",
22-
"nunomaduro/collision": "^7.0|^8.0",
19+
"orchestra/testbench": "^9.0|^10.0",
20+
"nunomaduro/collision": "^8.0",
2321
"laravel/pint": "^1.14"
2422
},
2523
"autoload": {

0 commit comments

Comments
 (0)