Download the PHP package ernestdefoe/sonic without Composer

On this page you can find all versions of the php package ernestdefoe/sonic. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sonic

Sonic Search for Flarum

The problem

Flarum's built-in search leans on your database's fulltext index, which gets slow and blunt as a forum grows. The usual fixes (Elasticsearch, OpenSearch, Meilisearch, Typesense) are good but heavy: hundreds of megabytes of RAM before they index a single post. On a small VPS or shared box that is more than the forum itself uses.

What this does

A free, drop-in Flarum 2 search driver backed by Sonic, a tiny search backend written in Rust. An idle Sonic uses a few megabytes of RAM.

Installation

Then enable Sonic Search in the admin panel.

Running Sonic

Sonic needs no config file; environment variables are enough. This keeps the port private to the machine and caps memory at 128 MB (it idles at a few MB):

If Flarum itself runs in Docker, put Sonic on the same Docker network instead of publishing a port, and use the container name (sonic) as the host. Sonic is also packaged as a single binary; see its README.

Setting up

  1. Admin → Sonic Search. Enter the host, port and password, then Save.
  2. Check connection. It reports how many items each index holds.
  3. Rebuild index (or php flarum sonic:index) to index your existing content.
  4. Turn on the searches Sonic should answer and save.

Several forums can share one Sonic: each forum uses its own bucket (set one, or it defaults to your forum's host name), and a rebuild only empties that bucket.

On a busy forum, run a real queue worker so indexing and rebuilds happen in the background rather than during a visitor's request.

Good to know

Updating

Support

Licence

MIT © Ernest Defoe


All versions of sonic with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
flarum/core Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ernestdefoe/sonic contains the following files

Loading the files please wait ...