Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ablaise/meteion-bundle
MeteionBundle is the Symfony integration of the Meteion library.
https://github.com/ablaise/meteion-bundle
endwalker ffxiv meteion php postgresql symfony symfony-bundle
Last synced: about 2 months ago
JSON representation
MeteionBundle is the Symfony integration of the Meteion library.
- Host: GitHub
- URL: https://github.com/ablaise/meteion-bundle
- Owner: ablaise
- License: mit
- Created: 2022-05-01T20:21:48.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-12T19:03:51.000Z (over 2 years ago)
- Last Synced: 2024-12-04T05:40:37.292Z (2 months ago)
- Topics: endwalker, ffxiv, meteion, php, postgresql, symfony, symfony-bundle
- Language: PHP
- Homepage:
- Size: 625 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
MeteionBundle
=============MeteionBundle is a Symfony integration of the [Meteion library](https://github.com/ablaise/meteion).
# Key features
* Auto-configuration
* Commands
* Services
* Entities# Installation
First, you need to enable the recipes (contrib) using the following command.
```
composer config extra.symfony.allow-contrib true
```Then add MeteionBundle using the following command.
```shell
composer require ablaise/meteion-bundle
```# Getting Started
## Environment Variable
You only need to fill in the environment variable `METEION_RAWEXD_PATH` which indicates the location of the `rawexd` directory extracted using [SaintCoinach](https://github.com/ablaise/meteion#getting-started).
```
###> ablaise/meteion-bundle ###
METEION_RAWEXD_PATH="/path/to/rawexd"
###< ablaise/meteion-bundle ###
```## Configuration
You can leave the default settings unless you need to specify a different dbal connection.
```yaml
# config/packages/meteion.yaml
meteion:
dbal_connection: 'default'
rawexd_path: '%env(string:METEION_RAWEXD_PATH)%'
```## Command
Once you have defined your `DATABASE_URL` connection, you can simply create the associated database and run Meteion using the following commands.
```bash
php bin/console doctrine:database:createphp bin/console meteion:run
```Remember to allocate enough resources to your server before running the `meteion:run` command.
## Meteion As A Service
The `MeteionManager` service allows you to use Meteion without additional configuration using dependency injection.
```php
public function meteion(MeteionManager $manager)
{
$manager->run();// ...
}
```## Ready to use Entities
Entities are available under the namespace `MeteionBundle\Entity`.
```php
use MeteionBundle\Entity\Quest;public function meteion(ManagerRegistry $doctrine)
{
$quest = $doctrine->getRepository(Quest::class)->findOneBy(['name' => 'Coming to Gridania']);// ...
}
```## Linking subfolders metadata
Entities with the `Metadata` suffix contained in the subfolders can be linked using the `referenceTable` field.
```php
use MeteionBundle\Entity\Quest;
use MeteionBundle\Entity\QuestMetadata;public function meteion(ManagerRegistry $doctrine)
{
$quest = $doctrine->getRepository(Quest::class)->findOneBy(['name' => 'Coming to Gridania']);
if (false !== $quest) {
$dialogs = $doctrine->getRepository(QuestMetadata::class)->findBy(['referenceTable' => $quest->getId()], ['pk' => 'ASC']);
}
// ...
}
```# What's next?
* New entity-related services
* Improved commands