diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1a6b24ba5..029544185 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -74,8 +74,8 @@ jobs: image: dunglas/mercure env: SERVER_NAME: :1337 - MERCURE_PUBLISHER_JWT_KEY: '!ChangeMe!' - MERCURE_SUBSCRIBER_JWT_KEY: '!ChangeMe!' + MERCURE_PUBLISHER_JWT_KEY: '!ChangeMe!!ChangeMe!!ChangeMe!!ChangeMe!' + MERCURE_SUBSCRIBER_JWT_KEY: '!ChangeMe!!ChangeMe!!ChangeMe!!ChangeMe!' MERCURE_EXTRA_DIRECTIVES: | anonymous cors_origins * diff --git a/src/Resources/skeleton/crud/test/Test.EntityManager.tpl.php b/src/Resources/skeleton/crud/test/Test.EntityManager.tpl.php index 5d6ed55d3..99bb52b0e 100644 --- a/src/Resources/skeleton/crud/test/Test.EntityManager.tpl.php +++ b/src/Resources/skeleton/crud/test/Test.EntityManager.tpl.php @@ -15,7 +15,7 @@ class extends WebTestCase protected function setUp(): void { $this->client = static::createClient(); - $this->manager = (static::getContainer()->get('doctrine'))->getManager(); + $this->manager = static::getContainer()->get('doctrine')->getManager(); $this->repository = $this->manager->getRepository(::class); foreach ($this->repository->findAll() as $object) { diff --git a/src/Resources/skeleton/crud/test/Test.tpl.php b/src/Resources/skeleton/crud/test/Test.tpl.php index 7b7a6e8c9..200de4665 100644 --- a/src/Resources/skeleton/crud/test/Test.tpl.php +++ b/src/Resources/skeleton/crud/test/Test.tpl.php @@ -14,7 +14,7 @@ class extends WebTestCase protected function setUp(): void { $this->client = static::createClient(); - $this->repository = (static::getContainer()->get('doctrine'))->getRepository(::class); + $this->repository = static::getContainer()->get('doctrine')->getRepository(::class); foreach ($this->repository->findAll() as $object) { $this->repository->remove($object, true); diff --git a/src/Resources/skeleton/validator/Constraint.tpl.php b/src/Resources/skeleton/validator/Constraint.tpl.php index e713088a8..991ad9424 100644 --- a/src/Resources/skeleton/validator/Constraint.tpl.php +++ b/src/Resources/skeleton/validator/Constraint.tpl.php @@ -6,6 +6,7 @@ /** * @Annotation + * * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/tests/Maker/MakeEntityTest.php b/tests/Maker/MakeEntityTest.php index 6bd7ad943..ff549791e 100644 --- a/tests/Maker/MakeEntityTest.php +++ b/tests/Maker/MakeEntityTest.php @@ -559,6 +559,13 @@ public function getTestDetails(): \Generator 'http://127.0.0.1:1337/.well-known/mercure' ); + // JWT Secrets needs to be at least 256 bits in length + $runner->replaceInFile( + '.env', + 'MERCURE_JWT_SECRET="!ChangeMe!"', + 'MERCURE_JWT_SECRET="!ChangeMe!!ChangeMe!!ChangeMe!!ChangeMe!"' + ); + $runner->runMaker([ // entity class name 'User', diff --git a/tests/Util/fixtures/source/User_empty.php b/tests/Util/fixtures/source/User_empty.php index fe362adb5..0bd2d7a75 100644 --- a/tests/Util/fixtures/source/User_empty.php +++ b/tests/Util/fixtures/source/User_empty.php @@ -2,4 +2,6 @@ namespace App\Entity; -class User {} +class User +{ +}