Skip to content

Commit d0efe8d

Browse files
committed
refactor: plugin setup
1 parent aad2180 commit d0efe8d

File tree

13 files changed

+70
-62
lines changed

13 files changed

+70
-62
lines changed

.github/workflows/release-please.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ jobs:
1616
- uses: google-github-actions/release-please-action@v3
1717
with:
1818
release-type: php
19-
package-name: eclipsephp-plugin-template
19+
package-name: eclipsephp-catalogue-plugin

.lando.dist.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
name: eclipsephp-plugin-template
1+
#file: noinspection ComposeUnknownKeys
2+
name: eclipse-catalogue
23
services:
34
appserver:
45
type: php:custom
56
xdebug: "debug,develop,coverage"
67
via: cli
78
overrides:
8-
image: slimdeluxe/php:8.2-v1.0
9+
image: slimdeluxe/php:8.2-v1.1
910
tooling:
1011
php:
1112
service: appserver

CHANGELOG.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1 @@
11
# Changelog
2-
3-
## 1.0.0 (2025-03-21)
4-
5-
6-
### Features
7-
8-
* add division method with test ([6acebfb](https://github.com/DataLinx/eclipsephp-plugin-template/commit/6acebfb8e784e2a6a2f43bf0d318ee3555455ff6))
9-
* add Math source file with tests ([bdca326](https://github.com/DataLinx/eclipsephp-plugin-template/commit/bdca3261e55aa6893684eba4517c138a795e8ecb))
10-
* add placeholder files ([2dda560](https://github.com/DataLinx/eclipsephp-plugin-template/commit/2dda5603cb60df1973f1d91130814965b76801b1))
11-
* add service provider and plugin class ([b3343ee](https://github.com/DataLinx/eclipsephp-plugin-template/commit/b3343eebb6b57d66199efa07f5085e0339a5519c))

README.md

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
1-
# Eclipse Filament plugin template
1+
# Eclipse Filament Catalogue plugin
22

3-
![Packagist PHP Version Support](https://img.shields.io/packagist/php-v/eclipsephp/plugin-template)
4-
![Packagist Version](https://img.shields.io/packagist/v/eclipsephp/plugin-template)
5-
![Packagist Downloads](https://img.shields.io/packagist/dt/eclipsephp/plugin-template)
6-
[![Tests](https://github.com/DataLinx/eclipsephp-plugin-template/actions/workflows/test-runner.yml/badge.svg)](https://github.com/DataLinx/eclipsephp-plugin-template/actions/workflows/test-runner.yml)
7-
[![codecov](https://codecov.io/gh/DataLinx/eclipsephp-plugin-template/graph/badge.svg?token=1HKSY5O6IW)](https://codecov.io/gh/DataLinx/eclipsephp-plugin-template)
3+
![Packagist PHP Version Support](https://img.shields.io/packagist/php-v/eclipsephp/catalogue-plugin)
4+
![Packagist Version](https://img.shields.io/packagist/v/eclipsephp/catalogue-plugin)
5+
![Packagist Downloads](https://img.shields.io/packagist/dt/eclipsephp/catalogue-plugin)
6+
[![Tests](https://github.com/DataLinx/eclipsephp-catalogue-plugin/actions/workflows/test-runner.yml/badge.svg)](https://github.com/DataLinx/eclipsephp-catalogue-plugin/actions/workflows/test-runner.yml)
7+
[![codecov](https://codecov.io/gh/DataLinx/eclipsephp-catalogue-plugin/graph/badge.svg?token=1HKSY5O6IW)](https://codecov.io/gh/DataLinx/eclipsephp-catalogue-plugin)
88
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org)
9-
![Packagist License](https://img.shields.io/packagist/l/eclipsephp/plugin-template)
9+
![Packagist License](https://img.shields.io/packagist/l/eclipsephp/catalogue-plugin)
1010

1111
## About
12-
This package serves as a Filament plugin template for plugins developed by DataLinx for [Eclipse](https://github.com/DataLinx/eclipsephp-app), our web app based on Filament. It is also a reference of how such a package should be configured.
13-
14-
The template is opinionated — it's based on our tech stack, which includes JetBrains PhpStorm.
15-
16-
This template works on and expands our [PHP package template](https://github.com/DataLinx/php-package-template).
12+
Filament plugin for product catalogue data.
13+
14+
🟧 Products (WIP)
15+
🟧 Categories (WIP)
16+
🟧 Price lists (WIP)
17+
🟧 Tax classes (WIP)
18+
🟧 Statuses (WIP)
19+
⏳ Types and properties (planned)
20+
⏳ Product groups (planned)
21+
⏳ Promo/landing pages (planned)
22+
⏳ Tariff codes (planned)
23+
⏳ Other resources coming when needed ([suggest a feature](https://github.com/DataLinx/eclipsephp-catalogue-plugin/discussions) and/or [hire us](https://www.datalinx.si))
1724

1825
## Requirements
1926
- PHP >= 8.2 (due to Pest 3 requirement)
@@ -23,11 +30,10 @@ This template works on and expands our [PHP package template](https://github.com
2330
See [composer.json](composer.json) for details.
2431

2532
## Getting started
26-
* Download it with composer:
33+
Download it with composer:
2734
```shell
28-
composer require eclipsephp/plugin-template
35+
composer require eclipsephp/catalogue-plugin
2936
````
30-
* _Provide a simple example how to use the package._
3137

3238
## Contributing
3339

@@ -38,21 +44,28 @@ Should you want to contribute, please see the development guidelines in the [Dat
3844

3945
### Development
4046

47+
1. All development is subject to our [PHP package development guidelines](https://github.com/DataLinx/php-package-template/blob/bc39ae340e7818614ae2aaa607e97088318dd754/docs/Documentation.md).
48+
2. Our [Filament app development docs](https://github.com/DataLinx/eclipsephp-core/blob/cae7143c8f745f142bba2bb4cf1483cf09401509/docs/Documentation.md) will also be helpful.
49+
3. Any PRs will generally need to adhere to these before being merged.
50+
4151
#### Requirements
4252
* Linux, Mac or Windows with WSL
4353
* [Lando](https://lando.dev/) (optional, but easier to start with)
4454

4555
#### Get started
4656
1. Clone the git repo
4757
2. Start the Lando container
48-
```shell
49-
lando start
50-
````
58+
```shell
59+
lando start
60+
````
5161
3. Install dependencies (this also runs the setup composer script)
52-
```shell
53-
lando composer install
54-
````
55-
4. Happy coding 😉
62+
```shell
63+
lando composer install
64+
````
65+
4. You can now develop and run tests. Happy coding 😉
66+
67+
💡 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).
68+
However, the plugin should be universal and not dependent on our app setup or core package.
5669

5770
### Changelog
5871
All notable changes to this project are automatically documented in the [CHANGELOG.md](CHANGELOG.md) file using the release workflow, based on the [release-please](https://github.com/googleapis/release-please) GitHub action.

composer.json

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
{
2-
"name": "eclipsephp/plugin-template",
3-
"description": "Eclipse template for Filament plugins",
2+
"name": "eclipsephp/catalogue-plugin",
3+
"description": "Filament plugin for product catalogue",
44
"keywords": [
55
"eclipse",
66
"filament",
7-
"laravel"
7+
"laravel",
8+
"catalogue",
9+
"plugin",
10+
"product"
811
],
9-
"homepage": "https://github.com/DataLinx/eclipsephp-plugin-template",
12+
"homepage": "https://github.com/DataLinx/eclipsephp-catalogue-plugin",
1013
"type": "library",
1114
"license": "MIT",
1215
"authors": [
@@ -26,9 +29,9 @@
2629
"prefer-stable": true,
2730
"autoload": {
2831
"psr-4": {
29-
"Eclipse\\PluginTemplate\\": "src/",
30-
"Eclipse\\PluginTemplate\\Factories\\": "database/factories/",
31-
"Eclipse\\PluginTemplate\\Seeders\\": "database/seeders/"
32+
"Eclipse\\Catalogue\\": "src/",
33+
"Eclipse\\Catalogue\\Factories\\": "database/factories/",
34+
"Eclipse\\Catalogue\\Seeders\\": "database/seeders/"
3235
}
3336
},
3437
"autoload-dev": {
@@ -78,7 +81,7 @@
7881
"extra": {
7982
"laravel": {
8083
"providers": [
81-
"Eclipse\\PluginTemplate\\PluginTemplateServiceProvider"
84+
"Eclipse\\Catalogue\\CatalogueServiceProvider"
8285
]
8386
}
8487
}
File renamed without changes.

env/php-8.3/.lando.dist.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
name: eclipsephp-plugin-template-8.3
1+
#file: noinspection ComposeUnknownKeys
2+
name: eclipsephp-catalogue-plugin-8.3
23
services:
34
appserver:
45
type: php:custom

env/php-8.3/composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "eclipsephp/plugin-template",
2+
"name": "eclipsephp/catalogue-plugin",
33
"require": {
44
"wikimedia/composer-merge-plugin": "dev-master"
55
},
@@ -12,7 +12,7 @@
1212
},
1313
"laravel": {
1414
"providers": [
15-
"Eclipse\\PluginTemplate\\PluginTemplateServiceProvider"
15+
"Eclipse\\Catalogue\\CatalogueServiceProvider"
1616
]
1717
}
1818
},
@@ -25,9 +25,9 @@
2525
},
2626
"autoload": {
2727
"psr-4": {
28-
"Eclipse\\PluginTemplate\\": "src/",
29-
"Eclipse\\PluginTemplate\\Factories\\": "database/factories/",
30-
"Eclipse\\PluginTemplate\\Seeders\\": "database/seeders/"
28+
"Eclipse\\Catalogue\\": "src/",
29+
"Eclipse\\Catalogue\\Factories\\": "database/factories/",
30+
"Eclipse\\Catalogue\\Seeders\\": "database/seeders/"
3131
}
3232
},
3333
"autoload-dev": {

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/PluginTemplate.php renamed to src/CataloguePlugin.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<?php
22

3-
namespace Eclipse\PluginTemplate;
3+
namespace Eclipse\Catalogue;
44

55
use Filament\Contracts\Plugin;
66
use Filament\Panel;
77

8-
class PluginTemplate implements Plugin
8+
class CataloguePlugin implements Plugin
99
{
1010
public function getId(): string
1111
{
12-
return 'plugin-template';
12+
return 'eclipse-catalogue';
1313
}
1414

1515
public function register(Panel $panel): void

0 commit comments

Comments
 (0)