manticoresoftware / buddy-plugin-show
The Buddy SHOW plugin
Installs: 2 309
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 5
Forks: 0
Open Issues: 0
Requires
- manticoresoftware/buddy-core: v0.1.0
Requires (Dev)
- phpstan/phpstan: ^1.8
- phpunit/phpunit: ^9.5
- slevomat/coding-standard: ^8.5
- squizlabs/php_codesniffer: ^3.7
This package is auto-updated.
Last update: 2024-02-16 07:15:25 UTC
README
This is an initial template of a plugin for Buddy that you can use to develop.
How to start
- Create a repository from this template.
- Open
composer.json
and edit it with your plugin name, dependencies, and everything else you need. - Run
composer install
to make it work. - You need to use our official
manticore-executor
; we strictly recommend using the Docker flow. - Edit
src/Payload.php
, add logic to parse the request, and prepare the payload structure for your command processing. - Edit
src/Handler.php
and implement processing logic and response that will be proxied by Manticore to the client.
How to use Docker of manticore-executor-dev
-
Clone Buddy somewhere to your host machine and go into it.
-
Run this command to create a Docker image named
manticore-buddy
:docker run --privileged --entrypoint bash -v $(pwd):/workdir -w /workdir --name manticore-buddy --network host -it image: ghcr.io/manticoresoftware/manticoresearch:test-kit-latest:latest
-
Now you can edit
/etc/manticore.conf
and configure the development version of Buddy:buddy_path = manticore-executor-dev /workdir/src/main.php --debug
-
Run
searchd --nodetach
to keep the daemon in the foreground and enjoy the development of your new plugin.
Notes
You can use pre-commit
to install code style and code analyze hooks by running pre-commit install
. Check our PHP code style and guide here.