Erison Silva
Erison Silva
> > > correction - I tried it with null and it works (probably due `$request->setPathInfo($pathInfo ?: '/');` in Sonata\PageBundle\Site\HostPathSiteSelector) . It should be corrected in documentation https://docs.sonata-project.org/projects/SonataPageBundle/en/3.x/reference/getting_started/ because there...
Yeah I checked now and in the project that I'm working it's `null`
Ok I'm struggling a bit to mock the final class like `SnapshotManager` What do you think to add it? https://tomasvotruba.com/blog/2019/03/28/how-to-mock-final-classes-in-phpunit/
> > Ok I'm struggling a bit to mock the final class like `SnapshotManager` > > What do you think to add it? https://tomasvotruba.com/blog/2019/03/28/how-to-mock-final-classes-in-phpunit/ > > You can use the...
> > > Ok I'm struggling a bit to mock the final class like `SnapshotManager` > > > What do you think to add it? https://tomasvotruba.com/blog/2019/03/28/how-to-mock-final-classes-in-phpunit/ > > > >...
```php // Mocks $objectManagerMock = $this->createMock(EntityManagerInterface::class); $objectManagerMock ->expects(static::once()) ->method('beginTransaction'); $objectManagerMock ->expects(static::once()) ->method('commit'); $registryMock = $this->createMock(ManagerRegistry::class); $registryMock->method('getManagerForClass')->willReturn($objectManagerMock); $snapshotPageProxyFactoryMock = $this->createMock(SnapshotPageProxyFactoryInterface::class); $snapshotManagerMock = new SnapshotManager(Snapshot::class, $registryMock, $snapshotPageProxyFactoryMock); ``` error: `TypeError : Return...
I'm closing this PR in favor of #1603
> Do you plan to try a PR ? Yep, if we agree I can provide a PR! the idea is: first coverage the class, to make sure that we...
> if really needed, i saw https://symfony.com/doc/4.4/components/serializer.html#built-in-normalizers especially [JsonSerializableNormalizer](https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/Serializer/Normalizer/JsonSerializableNormalizer.php) > > > This means that nested [JsonSerializable](https://secure.php.net/manual/en/class.jsonserializable.php) classes will also be normalized. > > it might help us to normalize...
> > > if really needed, i saw https://symfony.com/doc/4.4/components/serializer.html#built-in-normalizers especially [JsonSerializableNormalizer](https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/Serializer/Normalizer/JsonSerializableNormalizer.php) > > > > This means that nested [JsonSerializable](https://secure.php.net/manual/en/class.jsonserializable.php) classes will also be normalized. > > > > >...