Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
26 changes: 22 additions & 4 deletions .lando.dist.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,30 @@
#file: noinspection ComposeUnknownKeys,YAMLSchemaValidation
name: eclipse-catalogue
name: eclipse-catalogue-plugin
recipe: laravel
config:
webroot: workbench/public
php: '8.3'
via: nginx
database: mariadb:10.11
services:
appserver:
type: php:custom
xdebug: "debug,develop,coverage"
via: cli
environment:
TZ: "Europe/Ljubljana"
APP_BASE_PATH: "/app/workbench"
TESTBENCH_WORKING_PATH: "/app"
overrides:
image: slimdeluxe/php:8.2-v1.3
image: slimdeluxe/php:8.3-v1.3
platform: linux/amd64
run:
- composer install --no-interaction --prefer-dist
- composer run setup --no-interaction
- composer run build --no-interaction
appserver_nginx:
scanner:
path: /admin/login
retry: 5
tooling:
php:
service: appserver
Expand All @@ -23,4 +41,4 @@ tooling:
testbench:
service: appserver
description: Run testbench CLI
cmd: "vendor/bin/testbench"
cmd: "vendor/bin/testbench"
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,26 @@ Should you want to contribute, please see the development guidelines in the [Dat
````
4. You can now develop and run tests. Happy coding 😉

💡 To manually test the plugin in the browser, see our [recommendation](https://github.com/DataLinx/eclipsephp-core/blob/main/docs/Documentation.md#-plugin-development), which is also [how Filament suggests package development](https://filamentphp.com/docs/3.x/support/contributing#developing-with-a-local-copy-of-filament).
#### Workbench + Lando (browser testing)

This package ships with a minimal Testbench Workbench so you can run the Filament UI without a separate app:

1. Clone the repository
2. Start the container
```shell
lando start
```

3. Open the admin panel at `https://eclipse-catalogue-plugin.lndo.site/admin`

**No login required** - you'll be automatically signed in as a test user with full permissions.

Notes:
- The container serves `workbench/public` as the webroot.
- Use `lando test` for `package:test` and `lando testbench` for other Testbench commands.
- No Telescope, websockets or health checks are enabled to keep the setup minimal.

💡 To manually test the plugin in the browser, see our [recommendation](https://github.com/DataLinx/eclipsephp-core/blob/main/docs/Documentation.md#-plugin-development), which is also [how Filament suggests package development](https://filamentphp.com/docs/3.x/support/contributing#developing-with-a-local-copy-of-filament).
However, the plugin should be universal and not dependent on our app setup or core package.

### Changelog
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,11 @@
"@php vendor/bin/testbench serve --ansi"
],
"setup": [
"@php -r \"if (!file_exists('workbench/.env')) { copy('workbench/.env.example', 'workbench/.env'); echo '.env file created from .env.example\\n'; }\"",
"@php vendor/bin/testbench key:generate --ansi",
"npm install",
"@php vendor/bin/testbench vendor:publish --provider='Spatie\\Permission\\PermissionServiceProvider'",
"@php vendor/bin/testbench vendor:publish --tag='filament-shield-config'",
"@php vendor/bin/testbench vendor:publish --provider='Laravel\\Scout\\ScoutServiceProvider'",
"@php vendor/bin/testbench filament:assets",
"@php vendor/bin/testbench package:sync-skeleton"
]
},
Expand Down
5 changes: 2 additions & 3 deletions env/php-8.3/.lando.dist.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#file: noinspection ComposeUnknownKeys
name: eclipsephp-catalogue-plugin-8.3
name: eclipse-catalogue-8.3
services:
appserver:
type: php:custom
Expand Down Expand Up @@ -28,4 +27,4 @@ tooling:
testbench:
service: appserver
description: Run testbench CLI
cmd: "vendor/bin/testbench"
cmd: "vendor/bin/testbench"
2 changes: 1 addition & 1 deletion env/php-8.3/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@
"Workbench\\Database\\Seeders\\": "workbench/database/seeders/"
}
}
}
}
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<server name="BCRYPT_ROUNDS" value="4"/>
<server name="CACHE_STORE" value="array"/>
<server name="DB_CONNECTION" value="sqlite"/>
<server name="DB_DATABASE" value=":memory:"/>
<server name="DB_DATABASE" value="workbench/database/database.sqlite"/>
<server name="MAIL_MAILER" value="array"/>
<server name="QUEUE_CONNECTION" value="sync"/>
<server name="SESSION_DRIVER" value="array"/>
Expand Down
22 changes: 13 additions & 9 deletions testbench.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
laravel: '@testbench'

env:
- DB_CONNECTION=sqlite
- DB_DATABASE=/app/workbench/database/database.sqlite
- APP_KEY=base64:ZQvPGC7uVADkjOgtGIIuCI8u3/Pzu+VaRObIbHsgjCc=
- APP_ENV=local
- APP_DEBUG=true
- SESSION_DRIVER=database
- CACHE_STORE=database
- QUEUE_CONNECTION=sync

providers:
- Workbench\App\Providers\WorkbenchServiceProvider

migrations:
- workbench/database/migrations

seeders:
- Workbench\Database\Seeders\DatabaseSeeder
- database/migrations

workbench:
start: '/'
Expand All @@ -16,7 +24,7 @@ workbench:
discovers:
web: true
api: false
commands: false
commands: true
components: false
views: false
build:
Expand All @@ -25,8 +33,4 @@ workbench:
- db-wipe
- migrate-fresh
assets:
- laravel-assets
sync:
- from: storage
to: workbench/storage
reverse: true
- laravel-assets
16 changes: 9 additions & 7 deletions workbench/.env.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=AckfSECXIvnK5r28GVIWUAxmbBSjTsmF
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
APP_URL=https://eclipse-catalogue-plugin.lndo.site

APP_LOCALE=en
APP_FALLBACK_LOCALE=en
Expand All @@ -21,23 +21,25 @@ LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=sqlite
DB_DATABASE=/app/workbench/database/database.sqlite
# DB_HOST=127.0.0.1
# DB_PORT=3306
# DB_DATABASE=laravel
# DB_USERNAME=root
# DB_PASSWORD=

SESSION_DRIVER=cookie
SESSION_DRIVER=database
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null
SESSION_SECURE_COOKIE=false
SESSION_HTTP_ONLY=true
SESSION_SAME_SITE=lax

BROADCAST_CONNECTION=log
FILESYSTEM_DISK=local
QUEUE_CONNECTION=database
QUEUE_CONNECTION=sync

CACHE_STORE=database
CACHE_STORE=array
# CACHE_PREFIX=

MEMCACHED_HOST=127.0.0.1
Expand Down
23 changes: 22 additions & 1 deletion workbench/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
.env
.env.dusk
storage
storage/app/*
!storage/app/.gitkeep
!storage/app/public/
storage/app/public/*
!storage/app/public/.gitkeep
storage/framework/sessions/*
!storage/framework/sessions/.gitkeep
storage/framework/testing/*
!storage/framework/testing/.gitkeep
storage/framework/views/*
!storage/framework/views/.gitkeep
storage/logs/*
!storage/logs/.gitkeep
stubs/
resources/views/vendor/
lang/
vendor
public/build
public/hot
/public/css
/public/js
/public/fonts
Loading
Loading