Skip to content

Commit

Permalink
Merge branch '1.x' into 1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
glennjacobs authored Nov 19, 2024
2 parents ba2c79f + d09621c commit 659f0ce
Show file tree
Hide file tree
Showing 642 changed files with 13,812 additions and 3,434 deletions.
46 changes: 0 additions & 46 deletions .github/workflows/admin_tests.yml

This file was deleted.

68 changes: 68 additions & 0 deletions .github/workflows/check-pr-maintainer-access.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Copied from https://raw.githubusercontent.com/filamentphp/filament/3.x/.github/workflows/check-pr-maintainer-access.yml
name: check-pr-maintainer-access

on:
pull_request_target:
types:
- opened

permissions:
pull-requests: write

jobs:
notify-when-maintainers-cannot-edit:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v3
with:
script: |
const query = `
query($number: Int!) {
repository(owner: "lunarphp", name: "lunar") {
pullRequest(number: $number) {
headRepositoryOwner {
login
}
maintainerCanModify
}
}
}
`
const pullNumber = context.issue.number
const variables = { number: pullNumber }
try {
console.log(`Check #${pullNumber} for maintainer edit access...`)
const result = await github.graphql(query, variables)
console.log(JSON.stringify(result, null, 2))
const pullRequest = result.repository.pullRequest
if (pullRequest.headRepositoryOwner.login === 'lunarphp') {
console.log('PR owned by lunarphp')
return
}
if (! pullRequest.maintainerCanModify) {
console.log('PR not owned by lunarphp and does not have maintainer edits enabled')
await github.issues.createComment({
issue_number: pullNumber,
owner: 'lunarphp',
repo: 'lunar',
body: 'Thanks for submitting a PR!\n\nIn order to review and merge PRs most efficiently, we require that all PRs grant maintainer edit access before we review them. If your fork belongs to a GitHub organization, please move the repository to your personal account and try again. If you\'re already using a personal fork, you can learn how to enable maintainer access [in the GitHub documentation](https://docs.github.com/en/github/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork).'
})
await github.issues.update({
issue_number: pullNumber,
owner: 'lunarphp',
repo: context.repo.repo,
state: 'closed'
})
}
} catch(error) {
console.log(error)
}
46 changes: 0 additions & 46 deletions .github/workflows/core_tests.yml

This file was deleted.

5 changes: 4 additions & 1 deletion .github/workflows/fix-code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.ACCESS_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.head_ref }}
- name: Set up PHP
uses: shivammathur/setup-php@v2
Expand All @@ -26,5 +26,8 @@ jobs:
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_user_name: "GitHub Action"
commit_user_email: "[email protected]"
commit_author: "Author <[email protected]>"
commit_message: >
chore: fix code style
46 changes: 0 additions & 46 deletions .github/workflows/stripe_tests.yml

This file was deleted.

46 changes: 0 additions & 46 deletions .github/workflows/table_rate_shipping_tests.yml

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Tests

on:
pull_request:

jobs:
run-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.3, 8.2]
laravel: [11.*, 10.*]
dependency-version: [prefer-stable]
testsuite: [core, admin, shipping, stripe]
include:
- laravel: 11.*
testbench: 9.*
- laravel: 10.*
testbench: 8.*
name: ${{ matrix.testsuite }} - PHP ${{ matrix.php }} - L${{ matrix.laravel }} ${{ matrix.dependency-version == 'prefer-lowest' && '↓' || '↑' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get Composer Cache Directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-p${{ matrix.php }}-l${{ matrix.laravel }}-${{ hashFiles('composer.json') }}
restore-keys: composer-p${{ matrix.php }}-l${{ matrix.laravel }}-
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, pdo, pdo_sqlite
coverage: none
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" --no-update
composer require "orchestra/testbench:${{ matrix.testbench }}" --dev --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist
- name: Execute tests
env:
APP_ENV: testing
DB_CONNECTION: testing
DB_DATABASE: ":memory:"
run: ./vendor/bin/pest --testsuite ${{ matrix.testsuite }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<p align="center"><a href="https://lunarphp.io/" target="_blank"><picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/lunarphp/art/main/lunar-logo-dark.svg"><img alt="Lunar" width="200" src="https://raw.githubusercontent.com/lunarphp/art/main/lunar-logo.svg"></picture></a></p>

> [!CAUTION]
> Version 1.x is currently in alpha release. We recommend this version for new projects, however, it is not feature-complete and therefore may not be deemed production-ready.
> Version 1.x is currently in beta release. We recommend this version for new projects, however, it is not feature-complete and therefore may not be deemed production-ready.

[Lunar](https://lunarphp.io) is a set of Laravel packages that bring functionality akin to Shopify and other e-commerce platforms to
Expand Down
25 changes: 13 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,17 @@
"spatie/laravel-blink": "^1.7",
"spatie/laravel-medialibrary": "^11.0.0",
"spatie/laravel-permission": "^6.4",
"stripe/stripe-php": "^7.114",
"spatie/php-structure-discoverer": "^2.0",
"stripe/stripe-php": "^14.4",
"technikermathe/blade-lucide-icons": "^v3.0"
},
"require-dev": {
"larastan/larastan": "^2.9",
"laravel/pint": "1.13.1",
"mockery/mockery": "^1.4.4",
"laravel/pint": "1.17.0",
"mockery/mockery": "^1.6.9",
"orchestra/testbench": "^8.0|^9.0",
"pestphp/pest": "^2.0",
"pestphp/pest-plugin-laravel": "^2.0",
"pestphp/pest": "^2.34.7",
"pestphp/pest-plugin-laravel": "^2.4",
"symplify/monorepo-builder": "^10.0"
},
"autoload": {
Expand Down Expand Up @@ -81,22 +82,22 @@
"extra": {
"lunar": {
"name": [
"Table Rate Shipping",
"Opayo Payments",
"Meilisearch",
"Opayo Payments",
"Paypal Payments",
"Stripe Payments"
"Stripe Payments",
"Table Rate Shipping"
]
},
"laravel": {
"providers": [
"Lunar\\Shipping\\ShippingServiceProvider",
"Lunar\\Stripe\\StripePaymentsServiceProvider",
"Lunar\\Paypal\\PaypalServiceProvider",
"Lunar\\Meilisearch\\MeilisearchServiceProvider",
"Lunar\\Admin\\LunarPanelProvider",
"Lunar\\Opayo\\OpayoServiceProvider",
"Lunar\\Shipping\\ShippingServiceProvider",
"Lunar\\LunarServiceProvider"
"Lunar\\Meilisearch\\MeilisearchServiceProvider",
"Lunar\\LunarServiceProvider",
"Lunar\\Admin\\LunarPanelProvider"
]
}
},
Expand Down
Loading

0 comments on commit 659f0ce

Please sign in to comment.