php-laravel-11¶
Move Laravel apps to Laravel 11 and PHP 8.2.
Uses: php.set_php, php.set_require
Start a campaign from it, then point it at your organization:
Campaign¶
# yaml-language-server: $schema=https://raw.githubusercontent.com/rossedman/gh-fleet/main/internal/campaign/campaign.schema.json
apiVersion: fleet.gh/v1
name: laravel-11
description: Move Laravel apps to Laravel 11 and PHP 8.2
targets:
orgs: [acme]
include:
languages: [PHP]
search: "laravel/framework filename:composer.json"
change:
steps:
# Sets laravel/framework to ^11.0 and require.php to ^8.2 in every
# composer.json that lists them, then updates the lockfile for laravel only.
- name: php-laravel-11
starlark: ./change.star
timeout: 1m
# Resolves the new constraint without installing or running scripts.
- name: lock
run: |
if [ "$FLEET_VAR_CHANGED" = true ] && [ -f composer.lock ]; then composer update laravel/framework --with-all-dependencies --no-install --no-scripts; fi
timeout: 10m
env:
LARAVEL: "^11.0"
PHP: "^8.2"
pr:
title: "build(deps): laravel 11"
body: |
Moves {{ .Repo.Name }} to Laravel 11, which needs PHP 8.2. Follow the
upgrade guide and run the test suite before merging.
Opened by the `{{ .Campaign.Name }}` campaign with [gh fleet](https://github.com/rossedman/gh-fleet).
labels: [fleet, dependencies]
Test cases¶
gh fleet test runs the change on each case's before/ files and checks the result against after/. See Testing a campaign.