Skip to content

Commit 760f1c0

Browse files
authored
Merge branch 'main' into services-name
2 parents 796ae08 + a15009f commit 760f1c0

File tree

12 files changed

+46
-29
lines changed

12 files changed

+46
-29
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ updates:
44
- package-ecosystem: composer
55
directory: "/"
66
schedule:
7-
interval: daily
7+
interval: "monthly"
88
time: "04:00"
99
open-pull-requests-limit: 10
1010
labels:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
composer.lock
44
/vendor/
55
/var/
6+
phpstan.neon
67

78
# Meilisearch
89
/data.ms/*

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ First of all, thank you for contributing to Meilisearch! The goal of this docume
1616

1717
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.**
1818
2. **You've read the Meilisearch [documentation](https://docs.meilisearch.com) and the [README](/README.md).**
19-
3. **You know about the [Meilisearch community](https://docs.meilisearch.com/learn/what_is_meilisearch/contact.html). Please use this for help.**
19+
3. **You know about the [Meilisearch community](https://www.meilisearch.com/docs/learn/what_is_meilisearch/contact.html). Please use this for help.**
2020

2121
## How to Contribute
2222

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66

77
<h4 align="center">
88
<a href="https://github.com/meilisearch/meilisearch">Meilisearch</a> |
9+
<a href="https://www.meilisearch.com/pricing?utm_campaign=oss&utm_source=integration&utm_medium=meilisearch-symfony">Meilisearch Cloud</a> |
910
<a href="https://docs.meilisearch.com">Documentation</a> |
1011
<a href="https://discord.meilisearch.com">Discord</a> |
1112
<a href="https://roadmap.meilisearch.com/tabs/1-under-consideration">Roadmap</a> |
1213
<a href="https://www.meilisearch.com">Website</a> |
13-
<a href="https://docs.meilisearch.com/faq">FAQ</a>
14+
<a href="https://www.meilisearch.com/docs/faq">FAQ</a>
1415
</h4>
1516

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

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

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

41-
Also, see our [Documentation](https://docs.meilisearch.com/learn/tutorials/getting_started.html) or our [API References](https://docs.meilisearch.com/reference/api/).
43+
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/).
44+
45+
## ⚡ Supercharge your Meilisearch experience
46+
47+
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.
4248

4349
## 📝 Requirements
4450

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

5561
The following sections may interest you:
5662

57-
- **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).
58-
- **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).
59-
- **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).
60-
- **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).
63+
- **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).
64+
- **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).
65+
- **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).
66+
- **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).
6167

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

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"doctrine/doctrine-bundle": "^2.4",
2424
"meilisearch/meilisearch-php": "^1.0.0",
2525
"symfony/filesystem": "^4.4 || ^5.0 || ^6.0",
26+
"symfony/polyfill-php80": "^1.27",
2627
"symfony/property-access": "^4.4 || ^5.0 || ^6.0",
2728
"symfony/serializer": "^4.4 || ^5.0 || ^6.0"
2829
},
@@ -63,7 +64,7 @@
6364
},
6465
"scripts": {
6566
"phpmd": "./vendor/bin/phpmd src text phpmd.xml",
66-
"phpstan": "./vendor/bin/phpstan --memory-limit=1G --ansi",
67+
"phpstan": "./vendor/bin/phpstan",
6768
"test:unit": "SYMFONY_DEPRECATIONS_HELPER='ignoreFile=./tests/baseline-ignore' ./vendor/bin/simple-phpunit --colors=always --verbose",
6869
"test:unit:coverage": "SYMFONY_DEPRECATIONS_HELPER='ignoreFile=./tests/baseline-ignore' XDEBUG_MODE=coverage ./vendor/bin/simple-phpunit --colors=always --coverage-html=tests/coverage",
6970
"lint:check": "./vendor/bin/php-cs-fixer fix -v --using-cache=no --dry-run",
File renamed without changes.

src/DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function getConfigTreeBuilder(): TreeBuilder
6060
->defaultNull()
6161
->end()
6262
->arrayNode('settings')
63-
->info('Configure indices settings, see: https://docs.meilisearch.com/guides/advanced_guides/settings.html')
63+
->info('Configure indices settings, see: https://www.meilisearch.com/docs/reference/api/settings')
6464
->arrayPrototype()
6565
->variablePrototype()->end()
6666
->end()

tests/Integration/AggregatorTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Meilisearch\Bundle\Tests\Integration;
66

7+
use Doctrine\Persistence\Proxy;
78
use Meilisearch\Bundle\Exception\EntityNotFoundInObjectID;
89
use Meilisearch\Bundle\Exception\InvalidEntityForAggregator;
910
use Meilisearch\Bundle\Tests\BaseKernelTestCase;
@@ -35,11 +36,10 @@ public function testConstructor(): void
3536
public function testAggregatorProxyClass(): void
3637
{
3738
$this->createPost();
39+
$this->entityManager->clear();
3840

39-
$postMetadata = $this->entityManager->getClassMetadata(Post::class);
40-
$this->entityManager->getProxyFactory()->generateProxyClasses([$postMetadata]);
41-
42-
$proxy = $this->entityManager->getProxyFactory()->getProxy($postMetadata->getName(), ['id' => 1]);
41+
$proxy = $this->entityManager->getReference(Post::class, 1);
42+
$this->assertInstanceOf(Proxy::class, $proxy);
4343
$contentAggregator = new ContentAggregator($proxy, ['objectId']);
4444

4545
/** @var Serializer $serializer */

tests/Integration/DependencyInjectionTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
declare(strict_types=1);
44

5+
namespace Meilisearch\Bundle\Tests\Integration;
6+
57
use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractExtensionTestCase;
68
use Meilisearch\Bundle\DependencyInjection\MeilisearchExtension;
79
use Meilisearch\Bundle\MeilisearchBundle;
810

9-
class MeilisearchExtensionTest extends AbstractExtensionTestCase
11+
class DependencyInjectionTest extends AbstractExtensionTestCase
1012
{
1113
protected function getContainerExtensions(): array
1214
{

tests/Kernel.php

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,27 @@
44

55
namespace Meilisearch\Bundle\Tests;
66

7+
use Doctrine\Bundle\DoctrineBundle\ConnectionFactory;
78
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
89
use Meilisearch\Bundle\MeilisearchBundle;
910
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
11+
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
1012
use Symfony\Component\Config\Loader\LoaderInterface;
11-
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
13+
use Symfony\Component\DependencyInjection\ContainerBuilder;
1214
use Symfony\Component\HttpKernel\Kernel as HttpKernel;
1315

14-
/**
15-
* Class Kernel.
16-
*/
1716
class Kernel extends HttpKernel
1817
{
19-
/**
20-
* @return array<int, BundleInterface>
21-
*/
22-
public function registerBundles(): array
18+
use MicroKernelTrait;
19+
20+
public function registerBundles(): iterable
2321
{
24-
return [
25-
new FrameworkBundle(),
26-
new DoctrineBundle(),
27-
new MeilisearchBundle(),
28-
];
22+
yield new FrameworkBundle();
23+
yield new DoctrineBundle();
24+
yield new MeilisearchBundle();
2925
}
3026

31-
public function registerContainerConfiguration(LoaderInterface $loader): void
27+
protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void
3228
{
3329
if (PHP_VERSION_ID >= 80000) {
3430
$loader->load(__DIR__.'/config/config.yaml');
@@ -37,5 +33,13 @@ public function registerContainerConfiguration(LoaderInterface $loader): void
3733
}
3834
$loader->load(__DIR__.'/../config/services.xml');
3935
$loader->load(__DIR__.'/config/meilisearch.yaml');
36+
37+
if (defined(ConnectionFactory::class.'::DEFAULT_SCHEME_MAP')) {
38+
$container->prependExtensionConfig('doctrine', [
39+
'orm' => [
40+
'report_fields_where_declared' => true,
41+
],
42+
]);
43+
}
4044
}
4145
}

tests/config/config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ doctrine:
1313
orm:
1414
auto_generate_proxy_classes: true
1515
validate_xml_mapping: true
16+
report_fields_where_declared: true
1617
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
1718
auto_mapping: true
1819
mappings:

tests/config/config_php7.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ framework:
55
annotations: true
66
serializer:
77
enable_annotations: true
8+
router:
9+
utf8: true
810

911
doctrine:
1012
dbal:

0 commit comments

Comments
 (0)