Skip to content

Commit

Permalink
prepare Laravel 12.x
Browse files Browse the repository at this point in the history
  • Loading branch information
iamacarpet committed Feb 26, 2025
1 parent 7b4b244 commit 8d0d797
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 55 deletions.
52 changes: 5 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</div>
<br>

Google Serverless runtime support package for **Laravel 11.x**.
Google Serverless runtime support package for **Laravel 12.x**.

Supporting Cloud Run & App Engine (Standard Environment) with the `php83` runtime.

Expand Down Expand Up @@ -57,7 +57,7 @@ Based on original work for App Engine ([GaeSupportL5](https://github.com/shpasse

```js
"require": {
"affordablemobiles/g-serverless-support-laravel": "~11"
"affordablemobiles/g-serverless-support-laravel": "~12"
}
```

Expand Down Expand Up @@ -165,56 +165,14 @@ This does several things, such as:
* Turns OpenTelemetry tracing on for every request.
* Turns off sticky database connections per instance.

## Upgrading (from Laravel 9.x LTS)
## Upgrading (from Laravel 11.x LTS)

**1.** Update the package version in `composer.json`:

```json
"require": {
"affordablemobiles/g-serverless-support-laravel": "~11"
"affordablemobiles/g-serverless-support-laravel": "~12"
}
```

**2.** Follow the Laravel upgrade steps for all versions 9.x ... 11.x

**3.** Update any references in your code to our namespace:

`A1comms\GaeSupportLaravel`

has changed to:

`AffordableMobiles\GServerlessSupportLaravel`

**4.** Ensure `bootstrap/app.php` is extending our `Application` class:

Please see step 3 in the main installation guide as an example.

**5.** Change to the new provider configuration format in `config/app.php`:

Please see step 4 in the main installation guide as an example.

**6.** Update explicit/silent exception reporting:

Anywhere referencing the Error Reporting integration class directly:

`AffordableMobiles\GServerlessSupportLaravel\Integration\ErrorReporting::exceptionHandler($e);`

should be updated to report using Laravel's new method:

`report($e);`

**7.** Revert `config/logging.php` to the Laravel default.

**8.** Update environment variables:

Please see step 5 in the main installation guide & update your environment variables accordingly.

**9.** If you are using `php-gds` for Datastore, consider switching to [eloquent-datastore](https://github.com/affordablemobiles/eloquent-datastore).

Otherwise, you'll need to require it via composer yourself, as it is no longer required by this repository.

**10.** If using the `lcobucci/jwt` compatible DWDTokenSource, it has now been removed.

Migrate to the `google/auth` compatible [GCEDWDCredentials](src/AffordableMobiles/GServerlessSupportLaravel/Integration/Google/Credentials/GCEDWDCredentials.php).

**11.** Update your `app.yaml` file(s) to specify `runtime: php83`.
**2.** Follow the Laravel upgrade steps for all versions 11.x ... 12.x
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@
],
"require": {
"php": "^8.3",
"affordablemobiles/eloquent-datastore": "~11",
"affordablemobiles/eloquent-sqlcommenter": "~11",
"affordablemobiles/eloquent-datastore": "~12",
"affordablemobiles/eloquent-sqlcommenter": "~12",
"open-telemetry/sdk": "~1",
"affordablemobiles/open-telemetry-operations-php": "~1",
"guzzlehttp/guzzle": "^7.8.1",
"google/cloud": ">=0.239.0 <1.0.0",
"google/auth": ">=1.44.0",
"kelvinmo/simplejwt": "^0.8.2",
"laravel/framework": "~11"
"guzzlehttp/guzzle": "^7.8.2",
"google/cloud": ">=0.277.0 <1.0.0",
"google/auth": ">=1.46.0",
"kelvinmo/simplejwt": "^1.0.1",
"laravel/framework": "~12"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.6"
"friendsofphp/php-cs-fixer": "^3.70"
},
"suggest": {
"a1comms/php-gds": "Provides legacy Datastore support",
Expand Down

0 comments on commit 8d0d797

Please sign in to comment.