Skip to content

Commit

Permalink
Merge 3.x into 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI committed Jan 9, 2023
2 parents 1f6a0ce + 515e2cb commit d9af19b
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ jobs:
allowed-to-fail: false
symfony-require: 6.1.*
variant: symfony/symfony:"6.1.*"
- php-version: '8.1'
dependencies: highest
allowed-to-fail: false
symfony-require: 6.2.*
variant: symfony/symfony:"6.2.*"

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"phpunit/phpunit": "^9.5",
"psalm/plugin-phpunit": "^0.17",
"psalm/plugin-symfony": "^3.0",
"rector/rector": "^0.14",
"rector/rector": "^0.15",
"sonata-project/doctrine-orm-admin-bundle": "^4.0",
"symfony/browser-kit": "^4.4 || ^5.4 || ^6.0",
"symfony/css-selector": "^4.4 || ^5.4 || ^6.0",
Expand Down
11 changes: 10 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
# DO NOT EDIT THIS FILE!
#
# It's auto-generated by sonata-project/dev-kit package.

includes:
- vendor/phpstan/phpstan/conf/bleedingEdge.neon

parameters:
level: 8
doctrine:
objectManagerLoader: phpstan-object-manager.php
allowNullablePropertyForRequiredField: true
paths:
- src
- tests
scanFiles:
- vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php
treatPhpDocTypesAsCertain: false
checkGenericClassInNonGenericObjectType: true
checkInternalClassCaseSensitivity: true
Expand Down
7 changes: 3 additions & 4 deletions tests/Fixtures/Traits/ORM/ArticlePersonalTranslatable.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Gedmo\Translatable\Entity\MappedSuperclass\AbstractPersonalTranslation;

/**
* @Gedmo\TranslationEntity(class="Sonata\TranslationBundle\Tests\Fixtures\Traits\ORM\ArticlePersonalTranslation")
Expand All @@ -39,7 +38,7 @@ class ArticlePersonalTranslatable
public ?string $locale = null;

/**
* @var ArrayCollection<array-key, AbstractPersonalTranslation>
* @var Collection<array-key, ArticlePersonalTranslation>
*
* @ORM\OneToMany(
* targetEntity="Sonata\TranslationBundle\Tests\Fixtures\Traits\ORM\ArticlePersonalTranslation",
Expand Down Expand Up @@ -76,7 +75,7 @@ public function getTitle(): ?string
}

/**
* @phpstan-return Collection<array-key, AbstractPersonalTranslation>
* @phpstan-return Collection<array-key, ArticlePersonalTranslation>
*/
public function getTranslations(): Collection
{
Expand All @@ -94,7 +93,7 @@ public function getTranslation(string $field, string $locale): ?string
return null;
}

public function addTranslation(AbstractPersonalTranslation $translation): self
public function addTranslation(ArticlePersonalTranslation $translation): self
{
if (!$this->translations->contains($translation)) {
$translation->setObject($this);
Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/Traits/ORM/Knplabs/Article.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* @ORM\Table(name="article")
* @ORM\Entity
*/
final class Article extends TranslatableEntity
class Article extends TranslatableEntity
{
/**
* @ORM\Id
Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/Traits/ORM/Knplabs/ArticleTranslation.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* @ORM\Table(name="article_translation")
* @ORM\Entity
*/
final class ArticleTranslation extends AbstractArticleTranslation implements TranslationInterface
class ArticleTranslation extends AbstractArticleTranslation implements TranslationInterface
{
use TranslationTrait;

Expand Down
2 changes: 2 additions & 0 deletions tests/Traits/DoctrineOrmTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ abstract class DoctrineOrmTestCase extends TestCase
* EntityManager mock object together with
* annotation mapping driver and pdo_sqlite
* database in memory.
*
* @psalm-suppress DeprecatedMethod
*/
final protected function getMockSqliteEntityManager(?EventManager $evm = null, ?Configuration $config = null): EntityManager
{
Expand Down

0 comments on commit d9af19b

Please sign in to comment.