Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

/.gitattributes export-ignore
/.gitignore export-ignore
/.releaserc.yaml export-ignore
/composer.lock export-ignore
/ecs.php export-ignore
/phpstan.neon export-ignore
/mago.toml export-ignore
/package-lock.json export-ignore
/package.json export-ignore
/phpunit.xml.dist export-ignore
/tests/ export-ignore
24 changes: 0 additions & 24 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

8 changes: 0 additions & 8 deletions .github/ISSUE_TEMPLATE/config.yml

This file was deleted.

47 changes: 29 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: CI

on:
workflow_dispatch:
push:
Expand All @@ -7,31 +8,41 @@ on:
pull_request:
permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
code-quality:
name: Code Quality
uses: craftcms/.github/.github/workflows/code-quality.yml@v3
with:
node_version: '18'
php_version: '8.3'
jobs: '["ecs"]'

static-analysis:
name: Static Analysis
ci:
name: PHP ${{ matrix.php }}
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
php: ['8.5']

steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4

- uses: shivammathur/setup-php@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
php-version: ${{ matrix.php }}
extensions: bcmath, curl, dom, intl, mbstring, pdo, zip
tools: composer:v2
coverage: none

- name: Resolve dependencies
run: composer update --with-all-dependencies --no-interaction --no-progress --prefer-dist --no-audit
- name: Validate Composer configuration
run: composer validate --strict

- name: Install dependencies
uses: ramsey/composer-install@v3

- name: Run linter
run: composer lint

- name: Run PHPStan
run: composer phpstan
- name: Run tests
run: composer test
9 changes: 4 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
vendor
.env
tests/_output
tests/.env
tests/_support/_generated
/vendor/
/node_modules/
/.env
/.phpunit.cache/
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
composer lint
18 changes: 2 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# Craft Cloud
# Craft Cloud Package

Craft Cloud runtime integration for Craft CMS 6.

This package is intentionally small while the Craft 6 integration is rebuilt. It currently provides:

- Bref Lambda handlers under the `craft\cloud\bref` namespace.
- A Laravel service provider that configures Craft Cloud queue and cache defaults when running in Cloud/Lambda.

## Runtime Configuration

When `CRAFT_CLOUD` or `AWS_LAMBDA_RUNTIME_API` is present, `craft\cloud\CloudServiceProvider` configures:

- `queue.default` as an SQS connection using `CRAFT_CLOUD_SQS_URL`.
- `cache.default` as a Laravel `failover` store.

The cache store uses the Cloud Redis/Valkey endpoint when `CRAFT_CLOUD_CACHE_SRV` or `CRAFT_CLOUD_REDIS_URL` is available, then falls back to Laravel’s database and array stores.
Run Craft CMS on Craft Cloud.
28 changes: 20 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"minimum-stability": "dev",
"name": "craftcms/cloud",
"description": "Craft Cloud runtime integration for Craft CMS.",
"description": "Run Craft CMS on Craft Cloud.",
"license": "proprietary",
"type": "library",
"require": {
Expand All @@ -10,27 +10,39 @@
"bref/extra-php-extensions": "^3",
"bref/laravel-bridge": "^3.0",
"craftcms/cms": "^6",
"aws/aws-sdk-php": "^3.342.6",
"symfony/process": "^7.4.5 || ^8.0.5"
},
"require-dev": {
"craftcms/ecs": "dev-main",
"craftcms/phpstan": "dev-main"
"carthage-software/mago": "^1.1.0",
"pestphp/pest": "^4.0"
},
"scripts": {
"cs:check": "ecs check --ansi",
"cs:fix": "ecs check --ansi --fix",
"phpstan": "phpstan --memory-limit=1G --debug"
"lint": "mago lint --minimum-fail-level=warning && mago format --check",
"fix": "mago lint --fix --format-after-fix && mago format",
"test": [
"Composer\\Config::disableProcessTimeout",
"./vendor/bin/pest --compact"
]
},
"autoload": {
"psr-4": {
"craft\\cloud\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"craft\\cloud\\tests\\": "tests/"
},
"files": [
"tests/Support/functions.php"
]
},
"prefer-stable": true,
"config": {
"allow-plugins": {
"craftcms/plugin-installer": true
"carthage-software/mago": true,
"craftcms/plugin-installer": false,
"pestphp/pest-plugin": true
}
},
"extra": {
Expand Down
Loading
Loading