Skip to content

Commit

Permalink
Merge branch 'main' into services-name
Browse files Browse the repository at this point in the history
  • Loading branch information
norkunas authored Aug 8, 2023
2 parents 796ae08 + a15009f commit 760f1c0
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: daily
interval: "monthly"
time: "04:00"
open-pull-requests-limit: 10
labels:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
composer.lock
/vendor/
/var/
phpstan.neon

# Meilisearch
/data.ms/*
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ First of all, thank you for contributing to Meilisearch! The goal of this docume

1. **You're familiar with [GitHub](https://github.com) and the [Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) (PR) workflow.**
2. **You've read the Meilisearch [documentation](https://docs.meilisearch.com) and the [README](/README.md).**
3. **You know about the [Meilisearch community](https://docs.meilisearch.com/learn/what_is_meilisearch/contact.html). Please use this for help.**
3. **You know about the [Meilisearch community](https://www.meilisearch.com/docs/learn/what_is_meilisearch/contact.html). Please use this for help.**

## How to Contribute

Expand Down
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@

<h4 align="center">
<a href="https://github.com/meilisearch/meilisearch">Meilisearch</a> |
<a href="https://www.meilisearch.com/pricing?utm_campaign=oss&utm_source=integration&utm_medium=meilisearch-symfony">Meilisearch Cloud</a> |
<a href="https://docs.meilisearch.com">Documentation</a> |
<a href="https://discord.meilisearch.com">Discord</a> |
<a href="https://roadmap.meilisearch.com/tabs/1-under-consideration">Roadmap</a> |
<a href="https://www.meilisearch.com">Website</a> |
<a href="https://docs.meilisearch.com/faq">FAQ</a>
<a href="https://www.meilisearch.com/docs/faq">FAQ</a>
</h4>

<p align="center">
Expand All @@ -29,6 +30,7 @@
## Table of Contents <!-- omit in toc -->

- [📖 Documentation](#-documentation)
- [⚡ Supercharge your Meilisearch experience](#-supercharge-your-meilisearch-experience)
- [📝 Requirements](#-requirements)
- [🤖 Compatibility with Meilisearch](#-compatibility-with-meilisearch)
- [💡 Learn More](#-learn-more)
Expand All @@ -38,7 +40,11 @@

Check out the [Wiki](https://github.com/meilisearch/meilisearch-symfony/wiki) of this repository to get started! 🚀

Also, see our [Documentation](https://docs.meilisearch.com/learn/tutorials/getting_started.html) or our [API References](https://docs.meilisearch.com/reference/api/).
Also, see our [Documentation](https://www.meilisearch.com/docs/learn/tutorials/getting_started.html) or our [API References](https://www.meilisearch.com/docs/reference/api/).

## ⚡ Supercharge your Meilisearch experience

Say goodbye to server deployment and manual updates with [Meilisearch Cloud](https://www.meilisearch.com/pricing?utm_campaign=oss&utm_source=integration&utm_medium=meilisearch-symfony). No credit card required.

## 📝 Requirements

Expand All @@ -54,10 +60,10 @@ This package guarantees compatibility with [version v1.x of Meilisearch](https:/

The following sections may interest you:

- **Manipulate documents**: see the [API references](https://docs.meilisearch.com/reference/api/documents.html) or read more about [documents](https://docs.meilisearch.com/learn/core_concepts/documents.html).
- **Search**: see the [API references](https://docs.meilisearch.com/reference/api/search.html) or follow our guide on [search parameters](https://docs.meilisearch.com/reference/features/search_parameters.html).
- **Manage the indexes**: see the [API references](https://docs.meilisearch.com/reference/api/indexes.html) or read more about [indexes](https://docs.meilisearch.com/learn/core_concepts/indexes.html).
- **Configure the index settings**: see the [API references](https://docs.meilisearch.com/reference/api/settings.html) or follow our guide on [settings parameters](https://docs.meilisearch.com/reference/features/settings.html).
- **Manipulate documents**: see the [API references](https://www.meilisearch.com/docs/reference/api/documents) or read more about [documents](https://www.meilisearch.com/docs/learn/core_concepts/documents.html).
- **Search**: see the [API references](https://www.meilisearch.com/docs/reference/api/search) or follow our guide on [search parameters](https://www.meilisearch.com/docs/reference/api/search#search-parameters).
- **Manage the indexes**: see the [API references](https://www.meilisearch.com/docs/reference/api/indexes) or read more about [indexes](https://www.meilisearch.com/docs/learn/core_concepts/indexes.html).
- **Configure the index settings**: see the [API references](https://www.meilisearch.com/docs/reference/api/settings) or follow our guide on [settings parameters](https://www.meilisearch.com/docs/reference/api/settings#settings_parameters).

📖 Also, check out the [Wiki](https://github.com/meilisearch/meilisearch-symfony/wiki) of this repository!

Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"doctrine/doctrine-bundle": "^2.4",
"meilisearch/meilisearch-php": "^1.0.0",
"symfony/filesystem": "^4.4 || ^5.0 || ^6.0",
"symfony/polyfill-php80": "^1.27",
"symfony/property-access": "^4.4 || ^5.0 || ^6.0",
"symfony/serializer": "^4.4 || ^5.0 || ^6.0"
},
Expand Down Expand Up @@ -63,7 +64,7 @@
},
"scripts": {
"phpmd": "./vendor/bin/phpmd src text phpmd.xml",
"phpstan": "./vendor/bin/phpstan --memory-limit=1G --ansi",
"phpstan": "./vendor/bin/phpstan",
"test:unit": "SYMFONY_DEPRECATIONS_HELPER='ignoreFile=./tests/baseline-ignore' ./vendor/bin/simple-phpunit --colors=always --verbose",
"test:unit:coverage": "SYMFONY_DEPRECATIONS_HELPER='ignoreFile=./tests/baseline-ignore' XDEBUG_MODE=coverage ./vendor/bin/simple-phpunit --colors=always --coverage-html=tests/coverage",
"lint:check": "./vendor/bin/php-cs-fixer fix -v --using-cache=no --dry-run",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function getConfigTreeBuilder(): TreeBuilder
->defaultNull()
->end()
->arrayNode('settings')
->info('Configure indices settings, see: https://docs.meilisearch.com/guides/advanced_guides/settings.html')
->info('Configure indices settings, see: https://www.meilisearch.com/docs/reference/api/settings')
->arrayPrototype()
->variablePrototype()->end()
->end()
Expand Down
8 changes: 4 additions & 4 deletions tests/Integration/AggregatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Meilisearch\Bundle\Tests\Integration;

use Doctrine\Persistence\Proxy;
use Meilisearch\Bundle\Exception\EntityNotFoundInObjectID;
use Meilisearch\Bundle\Exception\InvalidEntityForAggregator;
use Meilisearch\Bundle\Tests\BaseKernelTestCase;
Expand Down Expand Up @@ -35,11 +36,10 @@ public function testConstructor(): void
public function testAggregatorProxyClass(): void
{
$this->createPost();
$this->entityManager->clear();

$postMetadata = $this->entityManager->getClassMetadata(Post::class);
$this->entityManager->getProxyFactory()->generateProxyClasses([$postMetadata]);

$proxy = $this->entityManager->getProxyFactory()->getProxy($postMetadata->getName(), ['id' => 1]);
$proxy = $this->entityManager->getReference(Post::class, 1);
$this->assertInstanceOf(Proxy::class, $proxy);
$contentAggregator = new ContentAggregator($proxy, ['objectId']);

/** @var Serializer $serializer */
Expand Down
4 changes: 3 additions & 1 deletion tests/Integration/DependencyInjectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

declare(strict_types=1);

namespace Meilisearch\Bundle\Tests\Integration;

use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractExtensionTestCase;
use Meilisearch\Bundle\DependencyInjection\MeilisearchExtension;
use Meilisearch\Bundle\MeilisearchBundle;

class MeilisearchExtensionTest extends AbstractExtensionTestCase
class DependencyInjectionTest extends AbstractExtensionTestCase
{
protected function getContainerExtensions(): array
{
Expand Down
32 changes: 18 additions & 14 deletions tests/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,27 @@

namespace Meilisearch\Bundle\Tests;

use Doctrine\Bundle\DoctrineBundle\ConnectionFactory;
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
use Meilisearch\Bundle\MeilisearchBundle;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Kernel as HttpKernel;

/**
* Class Kernel.
*/
class Kernel extends HttpKernel
{
/**
* @return array<int, BundleInterface>
*/
public function registerBundles(): array
use MicroKernelTrait;

public function registerBundles(): iterable
{
return [
new FrameworkBundle(),
new DoctrineBundle(),
new MeilisearchBundle(),
];
yield new FrameworkBundle();
yield new DoctrineBundle();
yield new MeilisearchBundle();
}

public function registerContainerConfiguration(LoaderInterface $loader): void
protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void
{
if (PHP_VERSION_ID >= 80000) {
$loader->load(__DIR__.'/config/config.yaml');
Expand All @@ -37,5 +33,13 @@ public function registerContainerConfiguration(LoaderInterface $loader): void
}
$loader->load(__DIR__.'/../config/services.xml');
$loader->load(__DIR__.'/config/meilisearch.yaml');

if (defined(ConnectionFactory::class.'::DEFAULT_SCHEME_MAP')) {
$container->prependExtensionConfig('doctrine', [
'orm' => [
'report_fields_where_declared' => true,
],
]);
}
}
}
1 change: 1 addition & 0 deletions tests/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ doctrine:
orm:
auto_generate_proxy_classes: true
validate_xml_mapping: true
report_fields_where_declared: true
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
auto_mapping: true
mappings:
Expand Down
2 changes: 2 additions & 0 deletions tests/config/config_php7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ framework:
annotations: true
serializer:
enable_annotations: true
router:
utf8: true

doctrine:
dbal:
Expand Down

0 comments on commit 760f1c0

Please sign in to comment.