author
int64
658
755k
date
stringlengths
19
19
timezone
int64
-46,800
43.2k
hash
stringlengths
40
40
message
stringlengths
5
490
mods
list
language
stringclasses
20 values
license
stringclasses
3 values
repo
stringlengths
5
68
original_message
stringlengths
12
491
95,144
29.11.2021 11:31:57
-3,600
e3e52533fa5420ee030099c331b752239b48507c
Remove PHPSpec (because it's black magic)
[ { "change_type": "MODIFY", "old_path": "composer.json", "new_path": "composer.json", "diff": "\"php-http/httplug-bundle\": \"^1.19\",\n\"php-http/message\": \"^1.12\",\n\"php-translation/loco-adapter\": \"^0.11\",\n- \"phpspec/phpspec\": \"^6.3.1\",\n- \"phpspec/prophecy\": \"^1.14\",\n\"phpstan/phpstan\": \"^0.12\",\n\"phpstan/phpstan-doctrine\": \"^0.12\",\n\"phpstan/phpstan-symfony\": \"^0.12\",\n" }, { "change_type": "MODIFY", "old_path": "symfony.lock", "new_path": "symfony.lock", "diff": "\"phpdocumentor/type-resolver\": {\n\"version\": \"1.0.1\"\n},\n- \"phpspec/php-diff\": {\n- \"version\": \"v1.1.0\"\n- },\n- \"phpspec/phpspec\": {\n- \"version\": \"6.1.1\"\n- },\n\"phpspec/prophecy\": {\n\"version\": \"v1.10.2\"\n},\n" }, { "change_type": "DELETE", "old_path": "tests/spec/Bolt/Menu/BackendMenuBuilderSpec.php", "new_path": null, "diff": "-<?php\n-\n-declare(strict_types=1);\n-\n-namespace spec\\Bolt\\Menu;\n-\n-use Bolt\\Configuration\\Config;\n-use Bolt\\Configuration\\Content\\ContentType;\n-use Bolt\\Entity\\Content;\n-use Bolt\\Menu\\BackendMenuBuilder;\n-use Bolt\\Repository\\ContentRepository;\n-use Bolt\\Twig\\ContentExtension;\n-use Knp\\Menu\\FactoryInterface;\n-use Knp\\Menu\\ItemInterface;\n-use Pagerfanta\\Adapter\\ArrayAdapter;\n-use Pagerfanta\\Pagerfanta;\n-use PhpSpec\\ObjectBehavior;\n-use Prophecy\\Argument;\n-use Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface;\n-use Symfony\\Contracts\\Translation\\TranslatorInterface;\n-\n-/**\n- * @mixin BackendMenuBuilder\n- */\n-class BackendMenuBuilderSpec extends ObjectBehavior\n-{\n- public const TEST_TITLE = 'Test title';\n- public const TEST_SLUG = 'test-title';\n-\n- public function let(\n- FactoryInterface $menuFactory,\n- Config $config,\n- ContentRepository $contentRepository,\n- UrlGeneratorInterface $urlGenerator,\n- TranslatorInterface $translator,\n- ContentExtension $contentExtension\n- ): void {\n- $this->beConstructedWith(\n- $menuFactory,\n- $config,\n- $contentRepository,\n- $urlGenerator,\n- $translator,\n- $contentExtension\n- );\n- }\n-\n- public function it_builds_admin_menu(\n- ContentExtension $contentExtension,\n- Content $content,\n- ContentRepository $contentRepository,\n- Config $config,\n- ContentType $contentType,\n- FactoryInterface $menuFactory,\n- ItemInterface $item,\n- ItemInterface $subitem\n- ): void {\n- // Seriously, what kind of weird-ass Voodoo shit is this PHPSpec?\n- /*\n- $contentExtension->getTitle($content)\n- ->shouldBeCalled()\n- ->willReturn(self::TEST_TITLE);\n- $contentExtension->getLink($content)\n- ->shouldBeCalled()\n- ->willReturn('/'.self::TEST_SLUG);\n- $contentExtension->getEditLink($content)\n- ->shouldBeCalled()\n- ->willReturn('/bolt/edit-by-slug/'.self::TEST_SLUG);\n- */\n- $contentRepository->findLatest($contentType, 1, BackendMenuBuilder::MAX_LATEST_RECORDS)\n- ->shouldBeCalled()\n- ->willReturn(new Pagerfanta(new ArrayAdapter([])));\n-\n- $contentType->getSlug()->willReturn(self::TEST_SLUG);\n- $contentType->offsetGet(Argument::type('string'))->shouldBeCalled();\n- $config->get('contenttypes')->willReturn([$contentType]);\n-\n- $item->getChild(Argument::type('string'))->willReturn($subitem);\n- $item->addChild(Argument::type('string'), Argument::type('array'))\n- ->shouldBeCalled();\n- $item->getChildren()->willReturn([$subitem]);\n-\n- $subitem->addChild(Argument::type('string'), Argument::type('array'))\n- ->shouldBeCalled();\n- $subitem->hasChildren()->shouldBeCalled()->willReturn(false);\n- $subitem->getExtra(Argument::type('string'))->shouldBeCalled();\n- $subitem->getLabel()->shouldBeCalled();\n- $subitem->getUri()->shouldBeCalled();\n-\n- $menuFactory->createItem('root')->willReturn($item);\n-\n- $this->buildAdminMenu();\n- }\n-}\n" }, { "change_type": "DELETE", "old_path": "tests/spec/Bolt/Security/LoginFormAuthenticatorSpec.php", "new_path": null, "diff": "-<?php\n-\n-declare(strict_types=1);\n-\n-namespace spec\\Bolt\\Security;\n-\n-use Bolt\\Entity\\User;\n-use Bolt\\Repository\\UserRepository;\n-use Bolt\\Security\\LoginFormAuthenticator;\n-use Doctrine\\ORM\\EntityManager;\n-use PhpSpec\\ObjectBehavior;\n-use Prophecy\\Argument;\n-use Symfony\\Component\\HttpFoundation\\Request;\n-use Symfony\\Component\\PasswordHasher\\Hasher\\UserPasswordHasherInterface;\n-use Symfony\\Component\\Routing\\RouterInterface;\n-use Symfony\\Component\\Security\\Core\\Exception\\InvalidCsrfTokenException;\n-use Symfony\\Component\\Security\\Core\\User\\UserProviderInterface;\n-use Symfony\\Component\\Security\\Csrf\\CsrfToken;\n-use Symfony\\Component\\Security\\Csrf\\CsrfTokenManagerInterface;\n-\n-/**\n- * @mixin LoginFormAuthenticator\n- */\n-class LoginFormAuthenticatorSpec extends ObjectBehavior\n-{\n- public const TEST_TOKEN = [\n- 'csrf_token' => null,\n- 'username' => 'test',\n- ];\n-\n- public function let(UserRepository $userRepository, RouterInterface $router, CsrfTokenManagerInterface $csrfTokenManager, UserPasswordHasherInterface $passwordHasher, EntityManager $em): void\n- {\n- $this->beConstructedWith($userRepository, $router, $csrfTokenManager, $passwordHasher, $em);\n- }\n-\n- public function it_gets_login_url(RouterInterface $router, Request $request): void\n- {\n- $router->generate(Argument::type('string'))->shouldBeCalledOnce()->willReturn('test_route');\n- $res = $this->start($request);\n- $res->getTargetUrl()->shouldBe('test_route');\n- }\n-\n- public function it_gets_user(CsrfTokenManagerInterface $csrfTokenManager, UserProviderInterface $userProvider, UserRepository $userRepository, User $user): void\n- {\n- $userRepository->findOneByCredentials(self::TEST_TOKEN['username'])->shouldBeCalledOnce()->wilLReturn($user);\n- $csrfTokenManager->isTokenValid(Argument::type(CsrfToken::class))->willReturn(true);\n- $this->getUser(self::TEST_TOKEN, $userProvider)->shouldBeAnInstanceOf(User::class);\n- }\n-\n- public function it_throws_while_getting_user(CsrfTokenManagerInterface $csrfTokenManager, UserProviderInterface $userProvider): void\n- {\n- $csrfTokenManager->isTokenValid(Argument::any())->willReturn(false);\n-\n- $this->shouldThrow(InvalidCsrfTokenException::class)->during(\n- 'getUser',\n- [\n- self::TEST_TOKEN,\n- $userProvider,\n- ]\n- );\n- }\n-}\n" }, { "change_type": "DELETE", "old_path": "tests/spec/Bolt/Twig/ContentExtensionSpec.php", "new_path": null, "diff": "-<?php\n-\n-declare(strict_types=1);\n-\n-namespace spec\\Bolt\\Twig;\n-\n-use Bolt\\Configuration\\Content\\ContentType;\n-use Bolt\\Entity\\Content;\n-use Bolt\\Entity\\Field;\n-use Bolt\\Entity\\Field\\Excerptable;\n-use Bolt\\Entity\\Field\\ImageField;\n-use Bolt\\Entity\\Field\\TextField;\n-use Bolt\\Repository\\ContentRepository;\n-use Bolt\\Twig\\ContentExtension;\n-use Doctrine\\Common\\Collections\\ArrayCollection;\n-use PhpSpec\\ObjectBehavior;\n-use Prophecy\\Argument;\n-use Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface;\n-use Symfony\\Component\\Security\\Csrf\\CsrfTokenManagerInterface;\n-\n-/**\n- * @mixin ContentExtension\n- */\n-class ContentExtensionSpec extends ObjectBehavior\n-{\n- public const TEST_TITLE = 'test title';\n- public const TEST_IMAGE = [];\n- public const TEST_EXCERPT = 'test excerpt';\n- public const TEST_LINK = 'test/link';\n- public const TEST_FULL_LINK = 'http://localhost/test/link';\n- public const TEST_SLUG = 'test-slug';\n- public const TEST_CT_SLUG = 'ct-slug';\n- public const TEST_ID = 42;\n-\n- public function let(UrlGeneratorInterface $urlGenerator, ContentRepository $contentRepository, CsrfTokenManagerInterface $csrfTokenManager): void\n- {\n- $this->beConstructedWith($urlGenerator, $contentRepository, $csrfTokenManager);\n- }\n-\n- public function it_gets_title(Content $content, TextField $field, ContentType $definition): void\n- {\n- $definition->has('title_format')->shouldBeCalled()->willReturn(false);\n- $content->getDefinition()->willReturn($definition);\n- $field->__toString()->shouldBeCalled()->willReturn(self::TEST_TITLE);\n- $content->hasField('title')->shouldBeCalled()->willReturn(true);\n- $content->getField('title')->shouldBeCalled()->willReturn($field);\n-\n- $this->getTitle($content)->shouldBe(self::TEST_TITLE);\n- }\n-\n- public function it_gets_title_from_other_title_field(Content $content, TextField $field, ContentType $definition): void\n- {\n- $definition->has('title_format')->shouldBeCalled()->willReturn(false);\n- $content->getDefinition()->willReturn($definition);\n- $field->__toString()->shouldBeCalled()->willReturn(self::TEST_TITLE);\n- $content->hasField(Argument::type('string'))->willReturn(false);\n- $content->hasField('titel')->shouldBeCalled()->willReturn(true);\n- $content->getField('titel')->shouldBeCalled()->willReturn($field);\n-\n- $this->getTitle($content)->shouldBe(self::TEST_TITLE);\n- }\n-\n- public function it_gets_title_without_title_field(Content $content, TextField $field, ContentType $definition): void\n- {\n- $definition->has('title_format')->shouldBeCalled()->willReturn(true);\n- $definition->get('title_format')->shouldBeCalled()->willReturn(['other_text_field']);\n- $content->getDefinition()->willReturn($definition);\n- $field->__toString()->shouldBeCalled()->willReturn(self::TEST_TITLE);\n- $content->hasFieldDefined('other_text_field')->shouldBeCalled()->willReturn(true);\n- $content->hasField('other_text_field')->shouldBeCalled()->willReturn(true);\n- $content->getField('other_text_field')->shouldBeCalled()->willReturn($field);\n-\n- $this->getTitle($content)->shouldBe(self::TEST_TITLE);\n- }\n-\n- public function it_gets_image(Content $content, ImageField $field, Field $otherField): void\n- {\n- $content->getFields()->shouldBeCalled()->willReturn(new ArrayCollection([\n- $otherField->getWrappedObject(),\n- $field->getWrappedObject(),\n- ]));\n-\n- $this->getImage($content)->shouldBe($field);\n- }\n-\n- public function it_gets_image_path(Content $content, ImageField $field, Field $otherField): void\n- {\n- $field->getValue()->shouldBeCalled()->willReturn(self::TEST_IMAGE);\n- $content->getFields()->shouldBeCalled()->willReturn(new ArrayCollection([\n- $otherField->getWrappedObject(),\n- $field->getWrappedObject(),\n- ]));\n-\n- $this->getImage($content, true)->shouldBe(self::TEST_IMAGE);\n- }\n-\n- public function it_gets_excerpt(Content $content, Excerptable $field, TextField $titleField, Field $otherField, ContentType $definition): void\n- {\n- $definition->has('title_format')->shouldBeCalled()->willReturn(false);\n- $content->getDefinition()->willReturn($definition);\n- $content->hasField('title')->shouldBeCalled()->willReturn(true);\n- $content->getField('title')->shouldBeCalled()->willReturn($titleField);\n- $titleField->getName()->willReturn('title');\n- $titleField->__toString()->willReturn(self::TEST_TITLE);\n- $field->__toString()->shouldBeCalled()->willReturn(self::TEST_EXCERPT);\n- $field->getName()->willReturn('body');\n- $otherField->__toString()->shouldNotBeCalled();\n- $content->getFields()->shouldBeCalled()->willReturn(new ArrayCollection([\n- $otherField->getWrappedObject(),\n- $titleField->getWrappedObject(),\n- $field->getWrappedObject(),\n- ]));\n-\n- $this->getExcerpt($content)->shouldBe(self::TEST_TITLE . '. ' . self::TEST_EXCERPT);\n- }\n-\n- public function it_gets_excerpt_without_excerptable_field(Content $content, Field $otherField, ContentType $definition): void\n- {\n- $definition->has('title_format')->shouldBeCalled()->willReturn(false);\n- $content->getDefinition()->willReturn($definition);\n- $content->hasField(Argument::type('string'))->shouldBeCalled()->willReturn(false);\n- $content->getFields()->shouldBeCalled()->willReturn(new ArrayCollection([\n- $otherField->getWrappedObject(),\n- ]));\n-\n- $this->getExcerpt($content)->shouldBe('');\n- }\n-\n- public function it_gets_link(Content $content, UrlGeneratorInterface $urlGenerator): void\n- {\n- $urlGenerator->generate(\n- 'record',\n- [\n- 'slugOrId' => self::TEST_SLUG,\n- 'contentTypeSlug' => self::TEST_CT_SLUG,\n- ],\n- UrlGeneratorInterface::ABSOLUTE_PATH\n- )->shouldBeCalled()->willReturn(self::TEST_LINK);\n- $content->getId()->shouldBeCalled()->willReturn(self::TEST_ID);\n- $content->getSlug()->shouldBeCalled()->willReturn(self::TEST_SLUG);\n- $content->getContentTypeSingularSlug()->shouldBeCalled()->willReturn(self::TEST_CT_SLUG);\n-\n- $this->getLink($content)->shouldBe(self::TEST_LINK);\n- }\n-\n- public function it_gets_absolute_link(Content $content, UrlGeneratorInterface $urlGenerator): void\n- {\n- $urlGenerator->generate(\n- 'record',\n- [\n- 'slugOrId' => self::TEST_ID,\n- 'contentTypeSlug' => self::TEST_CT_SLUG,\n- ],\n- UrlGeneratorInterface::ABSOLUTE_URL\n- )->shouldBeCalled()->willReturn(self::TEST_FULL_LINK);\n- $content->getId()->shouldBeCalled()->willReturn(self::TEST_ID);\n- $content->getSlug()->shouldBeCalled()->willReturn(null);\n- $content->getContentTypeSingularSlug()->shouldBeCalled()->willReturn(self::TEST_CT_SLUG);\n-\n- $this->getLink($content, true)->shouldBe(self::TEST_FULL_LINK);\n- }\n-\n- public function it_doesnt_get_link_if_no_id(Content $content): void\n- {\n- $content->getId()->shouldBeCalled()->willReturn(null);\n- $this->getLink($content)->shouldBe(null);\n- }\n-\n- public function it_gets_edit_link(Content $content, UrlGeneratorInterface $urlGenerator): void\n- {\n- $urlGenerator->generate(\n- 'bolt_content_edit',\n- ['id' => self::TEST_ID],\n- UrlGeneratorInterface::ABSOLUTE_PATH\n- )->shouldBeCalled()->willReturn(self::TEST_LINK);\n- $content->getId()->shouldBeCalled()->willReturn(self::TEST_ID);\n-\n- $this->getEditLink($content)->shouldBe(self::TEST_LINK);\n- }\n-\n- public function it_gets_absolute_edit_link(Content $content, UrlGeneratorInterface $urlGenerator): void\n- {\n- $urlGenerator->generate(\n- 'bolt_content_edit',\n- ['id' => self::TEST_ID],\n- UrlGeneratorInterface::ABSOLUTE_URL\n- )->shouldBeCalled()->willReturn(self::TEST_FULL_LINK);\n- $content->getId()->shouldBeCalled()->willReturn(self::TEST_ID);\n-\n- $this->getEditLink($content, true)->shouldBe(self::TEST_FULL_LINK);\n- }\n-\n- public function it_doesnt_get_edit_link_if_no_id(Content $content): void\n- {\n- $content->getId()->shouldBeCalled()->willReturn(null);\n- $this->getEditLink($content)->shouldBe(null);\n- }\n-\n- public function it_gets_previous_content(Content $content, Content $previousContent, ContentRepository $contentRepository): void\n- {\n- $contentRepository->findAdjacentBy(\n- 'id',\n- 'previous',\n- self::TEST_ID,\n- self::TEST_CT_SLUG\n- )->shouldBeCalled()->willReturn($previousContent);\n- $content->getId()->shouldBeCalled()->willReturn(self::TEST_ID);\n- $content->getContentType()->shouldBeCalled()->willReturn(self::TEST_CT_SLUG);\n-\n- $this->getPreviousContent($content)->shouldBe($previousContent);\n- }\n-\n- public function it_gets_next_content(Content $content, Content $nextContent, ContentRepository $contentRepository): void\n- {\n- $contentRepository->findAdjacentBy(\n- 'id',\n- 'next',\n- self::TEST_ID,\n- null\n- )->shouldBeCalled()->willReturn($nextContent);\n- $content->getId()->shouldBeCalled()->willReturn(self::TEST_ID);\n-\n- $this->getNextContent($content, 'id', false)->shouldBe($nextContent);\n- }\n-}\n" }, { "change_type": "DELETE", "old_path": "tests/spec/Bolt/Twig/RelatedExtensionSpec.php", "new_path": null, "diff": "-<?php\n-\n-declare(strict_types=1);\n-\n-namespace spec\\Bolt\\Twig;\n-\n-use Bolt\\Configuration\\Config;\n-use Bolt\\Entity\\Content;\n-use Bolt\\Entity\\Relation;\n-use Bolt\\Repository\\ContentRepository;\n-use Bolt\\Repository\\RelationRepository;\n-use PhpSpec\\ObjectBehavior;\n-\n-class RelatedExtensionSpec extends ObjectBehavior\n-{\n- public const ORIGIN_ID = 1;\n- public const RELATED_ID = 2;\n- public const TEST_CT_SLUG = 'ct-slug';\n-\n- public function let(RelationRepository $relationRepository, ContentRepository $contentRepository, Config $config): void\n- {\n- $this->beConstructedWith($relationRepository, $contentRepository, $config);\n- }\n-\n- public function it_gets_all_related_content(Content $content, RelationRepository $relationRepository, Relation $relation, Content $related): void\n- {\n- $relationRepository->findRelations($content, null, null, true)\n- ->shouldBeCalledOnce()\n- ->willReturn([$relation, $relation]);\n-\n- $relation->getName()->shouldBeCalled()->willReturn(self::TEST_CT_SLUG);\n- $relation->getToContent()->shouldBeCalledTimes(2)->willReturn($related);\n- $relation->getFromContent()->shouldBeCalledTimes(2)->willReturn($content);\n- $content->getId()->willReturn(self::ORIGIN_ID);\n- $related->getId()->willReturn(self::RELATED_ID);\n-\n- $result = $this->getRelatedContentByType($content);\n- $result->shouldBeArray();\n- $result->shouldHaveCount(1);\n- $result[self::TEST_CT_SLUG]->shouldBeArray();\n- $result[self::TEST_CT_SLUG]->shouldHaveCount(2);\n- $result[self::TEST_CT_SLUG][0]->shouldBeAnInstanceOf(Content::class);\n- }\n-\n- public function it_gets_related_content(Content $content, RelationRepository $relationRepository, Relation $relation, Content $related): void\n- {\n- $relationRepository->findRelations($content, self::TEST_CT_SLUG, null, true)\n- ->shouldBeCalledOnce()\n- ->willReturn([$relation]);\n-\n- $relation->getToContent()->shouldBeCalledOnce()->willReturn($related);\n- $relation->getFromContent()->shouldBeCalledOnce()->willReturn($content);\n- $content->getId()->willReturn(self::ORIGIN_ID);\n- $related->getId()->willReturn(self::RELATED_ID);\n-\n- $result = $this->getRelatedContent($content, self::TEST_CT_SLUG);\n- $result->shouldBeArray();\n- $result[0]->shouldBeAnInstanceOf(Content::class);\n- }\n-\n- public function it_gets_related_content_unidirectional_with_limit(Content $content, RelationRepository $relationRepository, Relation $relation, Content $related): void\n- {\n- $relationRepository->findRelations($content, self::TEST_CT_SLUG, 3, true)\n- ->shouldBeCalledOnce()\n- ->willReturn([$relation, $relation, $relation]);\n-\n- $relation->getToContent()->shouldBeCalled()->willReturn($related);\n- $relation->getFromContent()->shouldBeCalled()->willReturn($content);\n- $content->getId()->willReturn(self::ORIGIN_ID);\n- $related->getId()->willReturn(self::RELATED_ID);\n-\n- $result = $this->getRelatedContent($content, null, self::TEST_CT_SLUG, false, 3, true);\n- $result->shouldBeArray();\n- $result->shouldHaveCount(3);\n- $result[0]->shouldBeAnInstanceOf(Content::class);\n- }\n-\n- public function it_gets_first_related_content(Content $content, RelationRepository $relationRepository, Relation $relation, Content $related): void\n- {\n- $relationRepository->findFirstRelation($content, self::TEST_CT_SLUG, true)\n- ->shouldBeCalledOnce()\n- ->willReturn($relation);\n-\n- $relation->getToContent()->shouldBeCalledOnce()->willReturn($related);\n- $relation->getFromContent()->shouldBeCalledOnce()->willReturn($content);\n- $content->getId()->willReturn(self::ORIGIN_ID);\n- $related->getId()->willReturn(self::RELATED_ID);\n-\n- $result = $this->getFirstRelatedContent($content, self::TEST_CT_SLUG);\n- $result->shouldBeAnInstanceOf(Content::class);\n- }\n-\n- public function it_couldnt_find_related_content(Content $content, RelationRepository $relationRepository): void\n- {\n- $relationRepository->findRelations($content, null, null, true)->willReturn([]);\n- $result = $this->getRelatedContent($content);\n- $result->shouldBeArray();\n- $result->shouldHaveCount(0);\n- }\n-\n- public function it_couldnt_find_first_related_content(Content $content, RelationRepository $relationRepository): void\n- {\n- $relationRepository->findFirstRelation($content, null, true)->willReturn(null);\n- $result = $this->getFirstRelatedContent($content);\n- $result->shouldBeNull();\n- }\n-}\n" } ]
PHP
MIT License
bolt/core
Remove PHPSpec (because it's black magic)
95,121
03.12.2021 14:31:15
-3,600
42fedf2154ce75c15925eb4371c320da2edb96a3
Date issues in Bolt 5 * Fix the format and fix typo * Fix Ivo's suggestion :D * Revert changes back The database doesnt store date field values as Zulu therefore this was not actually needed * Fix the format the date is saved in and update the query
[ { "change_type": "MODIFY", "old_path": "assets/js/app/editor/Components/Date.vue", "new_path": "assets/js/app/editor/Components/Date.vue", "diff": "@@ -105,7 +105,7 @@ export default {\nwrap: true,\naltFormat: 'F j, Y',\naltInput: true,\n- dateFormat: 'Z',\n+ dateFormat: 'Y-m-d h:i',\nenableTime: false,\n},\n};\n" }, { "change_type": "MODIFY", "old_path": "src/Storage/SelectQuery.php", "new_path": "src/Storage/SelectQuery.php", "diff": "@@ -330,7 +330,7 @@ class SelectQuery implements QueryInterface\n$fieldName = preg_replace('/(_[0-9]+)$/', '', $key);\n// Use strtotime on 'date' fields to allow selections like \"today\", \"in 3 weeks\" or \"this year\"\nif (in_array($fieldName, $dateFields, true) && (strtotime($param) !== false)) {\n- $param = Carbon::parse((string) strtotime($param))->toIso8601ZuluString('milisecond');\n+ $param = date('Y-m-d h:i', strtotime($param));\n}\nif (in_array($fieldName, $this->regularFields, true) && ! in_array($fieldName, $numberFields, true)) {\n" } ]
PHP
MIT License
bolt/core
Date issues in Bolt 5 (#2986) * Fix the format and fix typo * Fix Ivo's suggestion :D * Revert changes back The database doesnt store date field values as Zulu therefore this was not actually needed * Fix the format the date is saved in and update the query
95,144
10.12.2021 13:06:17
-3,600
dbb668c912dfa9f8bbf99ffbe9efad5aab41933b
Don't set "linked media", if we don't have a proper filename
[ { "change_type": "MODIFY", "old_path": "src/Entity/Field/ImageField.php", "new_path": "src/Entity/Field/ImageField.php", "diff": "@@ -85,6 +85,10 @@ class ImageField extends Field implements FieldInterface, MediaAwareInterface, C\npublic function setLinkedMedia(MediaRepository $mediaRepository): void\n{\n+ if (! $this->get('filename')) {\n+ return;\n+ }\n+\n$media = $mediaRepository->findOneByFullFilename($this->get('filename'));\nif ($media) {\n" } ]
PHP
MIT License
bolt/core
Don't set "linked media", if we don't have a proper filename (#3004)
95,144
10.12.2021 16:51:41
-3,600
1510a34fba91b67167444b3ec4f2d40c68a21f7f
Prep 5.1.0 b2
[ { "change_type": "MODIFY", "old_path": "assets/js/version.js", "new_path": "assets/js/version.js", "diff": "// generated by genversion\n-export const version = '5.0.99.1';\n+export const version = '5.0.99.2';\n" }, { "change_type": "MODIFY", "old_path": "package-lock.json", "new_path": "package-lock.json", "diff": "{\n\"name\": \"bolt\",\n- \"version\": \"5.0.99.1\",\n+ \"version\": \"5.0.99.2\",\n\"lockfileVersion\": 2,\n\"requires\": true,\n\"packages\": {\n\"\": {\n\"name\": \"bolt\",\n- \"version\": \"5.0.99.1\",\n+ \"version\": \"5.0.99.2\",\n\"license\": \"MIT\",\n\"dependencies\": {\n\"@vue/cli-service\": \"^4.5.13\",\n\"integrity\": \"sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==\"\n},\n\"node_modules/@types/lodash\": {\n- \"version\": \"4.14.177\",\n- \"resolved\": \"https://registry.npmjs.org/@types/lodash/-/lodash-4.14.177.tgz\",\n- \"integrity\": \"sha512-0fDwydE2clKe9MNfvXHBHF9WEahRuj+msTuQqOmAApNORFvhMYZKNGGJdCzuhheVjMps/ti0Ak/iJPACMaevvw==\"\n+ \"version\": \"4.14.178\",\n+ \"resolved\": \"https://registry.npmjs.org/@types/lodash/-/lodash-4.14.178.tgz\",\n+ \"integrity\": \"sha512-0d5Wd09ItQWH1qFbEyQ7oTQ3GZrMfth5JkbN3EvTKLXcHLRDSXeLnlvlOn0wvxVIwK5o2M8JzP/OWz7T3NRsbw==\"\n},\n\"node_modules/@types/mdast\": {\n\"version\": \"3.0.10\",\n}\n},\n\"node_modules/caniuse-lite\": {\n- \"version\": \"1.0.30001285\",\n- \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001285.tgz\",\n- \"integrity\": \"sha512-KAOkuUtcQ901MtmvxfKD+ODHH9YVDYnBt+TGYSz2KIfnq22CiArbUxXPN9067gNbgMlnNYRSwho8OPXZPALB9Q==\",\n+ \"version\": \"1.0.30001286\",\n+ \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001286.tgz\",\n+ \"integrity\": \"sha512-zaEMRH6xg8ESMi2eQ3R4eZ5qw/hJiVsO/HlLwniIwErij0JDr9P+8V4dtx1l+kLq6j3yy8l8W4fst1lBnat5wQ==\",\n\"funding\": {\n\"type\": \"opencollective\",\n\"url\": \"https://opencollective.com/browserslist\"\n}\n},\n\"node_modules/electron-to-chromium\": {\n- \"version\": \"1.4.13\",\n- \"resolved\": \"https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.13.tgz\",\n- \"integrity\": \"sha512-ih5tIhzEuf78pBY70FXLo+Pw73R5MPPPcXb4CGBMJaCQt/qo/IGIesKXmswpemVCKSE2Bulr5FslUv7gAWJoOw==\"\n+ \"version\": \"1.4.15\",\n+ \"resolved\": \"https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.15.tgz\",\n+ \"integrity\": \"sha512-WDw2IUL3k4QpbzInV3JZK+Zd1NjWJPDZ28oUSchWb/kf6AVj7/niaAlgcJlvojFa1d7pJSyQ/KSZsEtq5W7aGQ==\"\n},\n\"node_modules/elliptic\": {\n\"version\": \"6.5.4\",\n}\n},\n\"node_modules/follow-redirects\": {\n- \"version\": \"1.14.5\",\n- \"resolved\": \"https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.5.tgz\",\n- \"integrity\": \"sha512-wtphSXy7d4/OR+MvIFbCVBDzZ5520qV8XfPklSN5QtxuMUJZ+b0Wnst1e1lCDocfzuCkHqj8k0FpZqO+UIaKNA==\",\n+ \"version\": \"1.14.6\",\n+ \"resolved\": \"https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.6.tgz\",\n+ \"integrity\": \"sha512-fhUl5EwSJbbl8AR+uYL2KQDxLkdSjZGR36xy46AO7cOMTrCMON6Sa28FmAnC2tRTDbd/Uuzz3aJBv7EBN7JH8A==\",\n\"funding\": [\n{\n\"type\": \"individual\",\n}\n},\n\"node_modules/marked\": {\n- \"version\": \"4.0.6\",\n- \"resolved\": \"https://registry.npmjs.org/marked/-/marked-4.0.6.tgz\",\n- \"integrity\": \"sha512-+H0bTf8DM8zLuFBUm/2VklxaCrwlBFgoJzHJcMZCnZ9cPgsllHwKpL6TPLdDeA38yPluMuVKOL1hO5w6HmG5Mg==\",\n+ \"version\": \"4.0.7\",\n+ \"resolved\": \"https://registry.npmjs.org/marked/-/marked-4.0.7.tgz\",\n+ \"integrity\": \"sha512-mQrRvV2vRk7DHZsWsYJfAjmBo+lSYPhTJPThaaGpkEfmC+4oefeug2txZniQTieDS0CFpokfVhd7JuS5GtnHhA==\",\n\"bin\": {\n\"marked\": \"bin/marked.js\"\n},\n}\n},\n\"node_modules/minipass\": {\n- \"version\": \"3.1.5\",\n- \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-3.1.5.tgz\",\n- \"integrity\": \"sha512-+8NzxD82XQoNKNrl1d/FSi+X8wAEWR+sbYAfIvub4Nz0d22plFG72CEVVaufV8PNf4qSslFTD8VMOxNVhHCjTw==\",\n+ \"version\": \"3.1.6\",\n+ \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz\",\n+ \"integrity\": \"sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==\",\n\"dependencies\": {\n\"yallist\": \"^4.0.0\"\n},\n}\n},\n\"node_modules/postcss-selector-parser\": {\n- \"version\": \"6.0.6\",\n- \"resolved\": \"https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz\",\n- \"integrity\": \"sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg==\",\n+ \"version\": \"6.0.7\",\n+ \"resolved\": \"https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.7.tgz\",\n+ \"integrity\": \"sha512-U+b/Deoi4I/UmE6KOVPpnhS7I7AYdKbhGcat+qTQ27gycvaACvNEw11ba6RrkwVmDVRW7sigWgLj4/KbbJjeDA==\",\n\"dependencies\": {\n\"cssesc\": \"^3.0.0\",\n\"util-deprecate\": \"^1.0.2\"\n}\n},\n\"node_modules/rollup\": {\n- \"version\": \"2.60.2\",\n- \"resolved\": \"https://registry.npmjs.org/rollup/-/rollup-2.60.2.tgz\",\n- \"integrity\": \"sha512-1Bgjpq61sPjgoZzuiDSGvbI1tD91giZABgjCQBKM5aYLnzjq52GoDuWVwT/cm/MCxCMPU8gqQvkj8doQ5C8Oqw==\",\n+ \"version\": \"2.61.0\",\n+ \"resolved\": \"https://registry.npmjs.org/rollup/-/rollup-2.61.0.tgz\",\n+ \"integrity\": \"sha512-teQ+T1mUYbyvGyUavCodiyA9hD4DxwYZJwr/qehZGhs1Z49vsmzelMVYMxGU4ZhGRKxYPupHuz5yzm/wj7VpWA==\",\n\"dev\": true,\n\"bin\": {\n\"rollup\": \"dist/bin/rollup\"\n}\n},\n\"node_modules/terser-webpack-plugin/node_modules/jest-worker\": {\n- \"version\": \"27.4.2\",\n- \"resolved\": \"https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.2.tgz\",\n- \"integrity\": \"sha512-0QMy/zPovLfUPyHuOuuU4E+kGACXXE84nRnq6lBVI9GJg5DCBiA97SATi+ZP8CpiJwEQy1oCPjRBf8AnLjN+Ag==\",\n+ \"version\": \"27.4.4\",\n+ \"resolved\": \"https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.4.tgz\",\n+ \"integrity\": \"sha512-jfwxYJvfua1b1XkyuyPh01ATmgg4e5fPM/muLmhy9Qc6dmiwacQB0MLHaU6IjEsv/+nAixHGxTn8WllA27Pn0w==\",\n\"dependencies\": {\n\"@types/node\": \"*\",\n\"merge-stream\": \"^2.0.0\",\n\"integrity\": \"sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==\"\n},\n\"@types/lodash\": {\n- \"version\": \"4.14.177\",\n- \"resolved\": \"https://registry.npmjs.org/@types/lodash/-/lodash-4.14.177.tgz\",\n- \"integrity\": \"sha512-0fDwydE2clKe9MNfvXHBHF9WEahRuj+msTuQqOmAApNORFvhMYZKNGGJdCzuhheVjMps/ti0Ak/iJPACMaevvw==\"\n+ \"version\": \"4.14.178\",\n+ \"resolved\": \"https://registry.npmjs.org/@types/lodash/-/lodash-4.14.178.tgz\",\n+ \"integrity\": \"sha512-0d5Wd09ItQWH1qFbEyQ7oTQ3GZrMfth5JkbN3EvTKLXcHLRDSXeLnlvlOn0wvxVIwK5o2M8JzP/OWz7T3NRsbw==\"\n},\n\"@types/mdast\": {\n\"version\": \"3.0.10\",\n}\n},\n\"caniuse-lite\": {\n- \"version\": \"1.0.30001285\",\n- \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001285.tgz\",\n- \"integrity\": \"sha512-KAOkuUtcQ901MtmvxfKD+ODHH9YVDYnBt+TGYSz2KIfnq22CiArbUxXPN9067gNbgMlnNYRSwho8OPXZPALB9Q==\"\n+ \"version\": \"1.0.30001286\",\n+ \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001286.tgz\",\n+ \"integrity\": \"sha512-zaEMRH6xg8ESMi2eQ3R4eZ5qw/hJiVsO/HlLwniIwErij0JDr9P+8V4dtx1l+kLq6j3yy8l8W4fst1lBnat5wQ==\"\n},\n\"capture-exit\": {\n\"version\": \"2.0.0\",\n\"integrity\": \"sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==\"\n},\n\"electron-to-chromium\": {\n- \"version\": \"1.4.13\",\n- \"resolved\": \"https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.13.tgz\",\n- \"integrity\": \"sha512-ih5tIhzEuf78pBY70FXLo+Pw73R5MPPPcXb4CGBMJaCQt/qo/IGIesKXmswpemVCKSE2Bulr5FslUv7gAWJoOw==\"\n+ \"version\": \"1.4.15\",\n+ \"resolved\": \"https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.15.tgz\",\n+ \"integrity\": \"sha512-WDw2IUL3k4QpbzInV3JZK+Zd1NjWJPDZ28oUSchWb/kf6AVj7/niaAlgcJlvojFa1d7pJSyQ/KSZsEtq5W7aGQ==\"\n},\n\"elliptic\": {\n\"version\": \"6.5.4\",\n}\n},\n\"follow-redirects\": {\n- \"version\": \"1.14.5\",\n- \"resolved\": \"https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.5.tgz\",\n- \"integrity\": \"sha512-wtphSXy7d4/OR+MvIFbCVBDzZ5520qV8XfPklSN5QtxuMUJZ+b0Wnst1e1lCDocfzuCkHqj8k0FpZqO+UIaKNA==\"\n+ \"version\": \"1.14.6\",\n+ \"resolved\": \"https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.6.tgz\",\n+ \"integrity\": \"sha512-fhUl5EwSJbbl8AR+uYL2KQDxLkdSjZGR36xy46AO7cOMTrCMON6Sa28FmAnC2tRTDbd/Uuzz3aJBv7EBN7JH8A==\"\n},\n\"for-in\": {\n\"version\": \"1.0.2\",\n}\n},\n\"marked\": {\n- \"version\": \"4.0.6\",\n- \"resolved\": \"https://registry.npmjs.org/marked/-/marked-4.0.6.tgz\",\n- \"integrity\": \"sha512-+H0bTf8DM8zLuFBUm/2VklxaCrwlBFgoJzHJcMZCnZ9cPgsllHwKpL6TPLdDeA38yPluMuVKOL1hO5w6HmG5Mg==\"\n+ \"version\": \"4.0.7\",\n+ \"resolved\": \"https://registry.npmjs.org/marked/-/marked-4.0.7.tgz\",\n+ \"integrity\": \"sha512-mQrRvV2vRk7DHZsWsYJfAjmBo+lSYPhTJPThaaGpkEfmC+4oefeug2txZniQTieDS0CFpokfVhd7JuS5GtnHhA==\"\n},\n\"mathml-tag-names\": {\n\"version\": \"2.1.3\",\n}\n},\n\"minipass\": {\n- \"version\": \"3.1.5\",\n- \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-3.1.5.tgz\",\n- \"integrity\": \"sha512-+8NzxD82XQoNKNrl1d/FSi+X8wAEWR+sbYAfIvub4Nz0d22plFG72CEVVaufV8PNf4qSslFTD8VMOxNVhHCjTw==\",\n+ \"version\": \"3.1.6\",\n+ \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz\",\n+ \"integrity\": \"sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==\",\n\"requires\": {\n\"yallist\": \"^4.0.0\"\n},\n}\n},\n\"postcss-selector-parser\": {\n- \"version\": \"6.0.6\",\n- \"resolved\": \"https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz\",\n- \"integrity\": \"sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg==\",\n+ \"version\": \"6.0.7\",\n+ \"resolved\": \"https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.7.tgz\",\n+ \"integrity\": \"sha512-U+b/Deoi4I/UmE6KOVPpnhS7I7AYdKbhGcat+qTQ27gycvaACvNEw11ba6RrkwVmDVRW7sigWgLj4/KbbJjeDA==\",\n\"requires\": {\n\"cssesc\": \"^3.0.0\",\n\"util-deprecate\": \"^1.0.2\"\n}\n},\n\"rollup\": {\n- \"version\": \"2.60.2\",\n- \"resolved\": \"https://registry.npmjs.org/rollup/-/rollup-2.60.2.tgz\",\n- \"integrity\": \"sha512-1Bgjpq61sPjgoZzuiDSGvbI1tD91giZABgjCQBKM5aYLnzjq52GoDuWVwT/cm/MCxCMPU8gqQvkj8doQ5C8Oqw==\",\n+ \"version\": \"2.61.0\",\n+ \"resolved\": \"https://registry.npmjs.org/rollup/-/rollup-2.61.0.tgz\",\n+ \"integrity\": \"sha512-teQ+T1mUYbyvGyUavCodiyA9hD4DxwYZJwr/qehZGhs1Z49vsmzelMVYMxGU4ZhGRKxYPupHuz5yzm/wj7VpWA==\",\n\"dev\": true,\n\"requires\": {\n\"fsevents\": \"~2.3.2\"\n\"integrity\": \"sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==\"\n},\n\"jest-worker\": {\n- \"version\": \"27.4.2\",\n- \"resolved\": \"https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.2.tgz\",\n- \"integrity\": \"sha512-0QMy/zPovLfUPyHuOuuU4E+kGACXXE84nRnq6lBVI9GJg5DCBiA97SATi+ZP8CpiJwEQy1oCPjRBf8AnLjN+Ag==\",\n+ \"version\": \"27.4.4\",\n+ \"resolved\": \"https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.4.tgz\",\n+ \"integrity\": \"sha512-jfwxYJvfua1b1XkyuyPh01ATmgg4e5fPM/muLmhy9Qc6dmiwacQB0MLHaU6IjEsv/+nAixHGxTn8WllA27Pn0w==\",\n\"requires\": {\n\"@types/node\": \"*\",\n\"merge-stream\": \"^2.0.0\",\n" }, { "change_type": "MODIFY", "old_path": "package.json", "new_path": "package.json", "diff": "{\n\"name\": \"bolt\",\n- \"version\": \"5.0.99.1\",\n+ \"version\": \"5.0.99.2\",\n\"homepage\": \"https://boltcms.io\",\n\"author\": \"Bob den Otter <bob@twokings.nl> (https://boltcms.io)\",\n\"license\": \"MIT\",\n" } ]
PHP
MIT License
bolt/core
Prep 5.1.0 b2
95,144
12.12.2021 11:41:05
-3,600
657d98a83926e7deb6cd66ba6582c3dab85ef982
Splitting into two separate files
[ { "change_type": "RENAME", "old_path": "yaml-migrations/m_2021-12-10-security.yaml", "new_path": "yaml-migrations/m_2021-12-10-security_1.yaml", "diff": "@@ -10,12 +10,3 @@ add:\nmain:\ncustom_authenticators:\n- Bolt\\Security\\LoginFormAuthenticator\n-\n-remove:\n- security:\n- firewalls:\n- main:\n- anonymous: ~\n- guard: ~\n- logout:\n- handler: ~\n" }, { "change_type": "ADD", "old_path": null, "new_path": "yaml-migrations/m_2021-12-10-security_2.yaml", "diff": "+# See: https://github.com/bolt/core/pull/3007\n+\n+file: packages/security.yaml\n+since: 5.1.0\n+\n+remove:\n+ security:\n+ firewalls:\n+ main:\n+ anonymous: ~\n+ guard: ~\n+ logout:\n+ handler: ~\n" } ]
PHP
MIT License
bolt/core
Splitting into two separate files
95,144
12.12.2021 13:44:53
-3,600
35fc41b8dcf611c8f9dd9d334d24ac93c08a0ce5
Minor cleanup on services.yaml
[ { "change_type": "MODIFY", "old_path": "config/services.yaml", "new_path": "config/services.yaml", "diff": "@@ -88,7 +88,10 @@ services:\n- \"@knp_menu.factory\"\n- !tagged_iterator bolt.extension_backend_menu\ntags:\n- - { name: knp_menu.menu_builder, method: createAdminMenu, alias: admin_menu } # The alias is what is used to retrieve the menu\n+ -\n+ name: knp_menu.menu_builder\n+ method: createAdminMenu\n+ alias: admin_menu # The alias is what is used to retrieve the menu\nSymfony\\Bridge\\Twig\\Extension\\AssetExtension: '@twig.extension.assets'\n@@ -129,12 +132,18 @@ services:\n# Validation: specify Bolt\\Validator\\ContentValidator as validator\nBolt\\Validator\\ContentValidatorInterface: '@Bolt\\Validator\\ContentValidator'\n+ Bolt\\Utils\\Sanitiser:\n+ public: true\n+\nDoctrine\\ORM\\Query\\Expr: ~\nmonolog.processor.request:\nclass: Bolt\\Log\\RequestProcessor\ntags:\n- - { name: monolog.processor, method: processRecord, handler: db }\n+ -\n+ handler: db\n+ method: processRecord\n+ name: monolog.processor\nSymfony\\Component\\ErrorHandler\\ErrorRenderer\\ErrorRendererInterface: '@error_handler.error_renderer.html'\n@@ -159,4 +168,3 @@ services:\nBolt\\Api\\ContentDataPersister:\ndecorates: 'api_platform.doctrine.orm.data_persister'\n-\n" } ]
PHP
MIT License
bolt/core
Minor cleanup on services.yaml
95,147
21.12.2021 10:59:46
-3,600
b41035f4a59ec378ca6cc80ce220b56e6ad62e4c
Make `LoginFormAuthenticator` compatible with Symfony 5.3
[ { "change_type": "MODIFY", "old_path": "src/Security/LoginFormAuthenticator.php", "new_path": "src/Security/LoginFormAuthenticator.php", "diff": "@@ -16,6 +16,7 @@ use Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\Badge\\CsrfTokenBadge;\nuse Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\Badge\\UserBadge;\nuse Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\Credentials\\PasswordCredentials;\nuse Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\Passport;\n+use Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\PassportInterface;\nclass LoginFormAuthenticator extends AbstractAuthenticator implements AuthenticatorInterface\n{\n@@ -40,7 +41,7 @@ class LoginFormAuthenticator extends AbstractAuthenticator implements Authentica\nreturn $request->attributes->get('_route') === 'bolt_login' && $request->isMethod('POST');\n}\n- public function authenticate(Request $request)\n+ public function authenticate(Request $request): PassportInterface\n{\n/** @var array $login_form */\n$login_form = $request->request->get('login');\n" } ]
PHP
MIT License
bolt/core
Make `LoginFormAuthenticator` compatible with Symfony 5.3
95,144
05.01.2022 16:05:54
-3,600
e86afc003d5059d9ae700602068f982e201dc38a
Update doctrine_migrations.yaml
[ { "change_type": "MODIFY", "old_path": "config/packages/doctrine_migrations.yaml", "new_path": "config/packages/doctrine_migrations.yaml", "diff": "@@ -2,4 +2,4 @@ doctrine_migrations:\nmigrations_paths:\n# namespace is arbitrary but should be different from App\\Migrations\n# as migrations classes should NOT be autoloaded\n- 'DoctrineMigrations': '%kernel.project_dir%/migrations'\n+ 'Bolt\\DoctrineMigrations': '%kernel.project_dir%/migrations'\n" } ]
PHP
MIT License
bolt/core
Update doctrine_migrations.yaml
95,127
07.01.2022 22:27:53
-7,200
76f135276e01e5d5203b45aba2d850bc1b111f8d
Allow empty value for select form controls, based on user setting.
[ { "change_type": "MODIFY", "old_path": "assets/js/app/editor/Components/Select.vue", "new_path": "assets/js/app/editor/Components/Select.vue", "diff": "<multiselect\nref=\"vselect\"\nv-model=\"selected\"\n- :allow-empty=\"allowempty\"\n:limit=\"1000\"\n:multiple=\"multiple\"\n:options=\"options\"\n@@ -73,7 +72,6 @@ export default {\noptions: Array,\noptionslimit: Number,\nmultiple: Boolean,\n- allowempty: Boolean,\ntaggable: Boolean,\nreadonly: Boolean,\nclassname: String,\n" }, { "change_type": "MODIFY", "old_path": "src/Cache/RelatedOptionsUtilityCacher.php", "new_path": "src/Cache/RelatedOptionsUtilityCacher.php", "diff": "@@ -10,10 +10,10 @@ class RelatedOptionsUtilityCacher extends RelatedOptionsUtility implements Cachi\npublic const CACHE_CONFIG_KEY = 'related_options';\n- public function fetchRelatedOptions(string $contentTypeSlug, string $order, string $format, bool $required, int $maxAmount): array\n+ public function fetchRelatedOptions(string $contentTypeSlug, string $order, string $format, bool $required, ?bool $allowEmpty, int $maxAmount): array\n{\n$this->setCacheKey([$contentTypeSlug, $order, $format, (string) $required, $maxAmount]);\n- return $this->execute([parent::class, __FUNCTION__], [$contentTypeSlug, $order, $format, $required, $maxAmount]);\n+ return $this->execute([parent::class, __FUNCTION__], [$contentTypeSlug, $order, $format, $required, $allowEmpty, $maxAmount]);\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "src/Entity/Field.php", "new_path": "src/Entity/Field.php", "diff": "@@ -16,7 +16,7 @@ use Knp\\DoctrineBehaviors\\Contract\\Entity\\TranslatableInterface;\nuse Knp\\DoctrineBehaviors\\Model\\Translatable\\TranslatableTrait;\nuse Symfony\\Component\\Serializer\\Annotation\\Groups;\nuse Symfony\\Component\\Serializer\\Annotation\\SerializedName;\n-use Tightenco\\Collect\\Support\\Collection as LaravelCollection;\n+use Tightenco\\Collect\\Support\\Collection;\nuse Twig\\Environment;\nuse Twig\\Markup;\n@@ -155,7 +155,7 @@ class Field implements FieldInterface, TranslatableInterface\n}\n}\n- public function setDefinition($name, LaravelCollection $definition): void\n+ public function setDefinition($name, Collection $definition): void\n{\n$this->fieldTypeDefinition = FieldType::mock($name, $definition);\n}\n@@ -177,7 +177,7 @@ class Field implements FieldInterface, TranslatableInterface\n$default = $this->getDefaultValue();\nif ($this->isNew() && $default !== null) {\n- if (! $default instanceof LaravelCollection) {\n+ if (! $default instanceof Collection) {\nthrow new \\RuntimeException('Default value of field ' . $this->getName() . ' is ' . gettype($default) . ' but it should be an array.');\n}\n@@ -439,4 +439,40 @@ class Field implements FieldInterface, TranslatableInterface\n{\nself::$twig = $twig;\n}\n+\n+ public function allowEmpty(): bool\n+ {\n+ return self::definitionAllowsEmpty($this->getDefinition());\n+ }\n+\n+ public static function definitionAllowsEmpty(Collection $definition): bool\n+ {\n+ return self::settingsAllowEmpty(\n+ $definition->get('allow_empty', null),\n+ $definition->get('required', null)\n+ );\n+ }\n+\n+ /**\n+ * True if settings allow empty value.\n+ *\n+ * Settings priority:\n+ * - allow_empty\n+ * - required\n+ *\n+ * Defaults to true.\n+ */\n+ public static function settingsAllowEmpty(?bool $allowEmpty, ?bool $required): bool\n+ {\n+ if (!is_null($allowEmpty)) {\n+ return boolval($allowEmpty);\n+ }\n+\n+ if (!is_null($required)) {\n+ return !boolval($required);\n+ }\n+\n+ return true;\n+ }\n+\n}\n" }, { "change_type": "MODIFY", "old_path": "src/Entity/Field/SelectField.php", "new_path": "src/Entity/Field/SelectField.php", "diff": "@@ -44,7 +44,7 @@ class SelectField extends Field implements FieldInterface, RawPersistable, \\Iter\n{\n$value = parent::getValue();\n- if (empty($value) && $this->getDefinition()->get('required')) {\n+ if (empty($value) && !$this->allowEmpty()) {\n$value = $this->getDefinition()->get('values');\n// Pick the first key from Collection, or the full value as string, like `entries/id,title`\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/ContentExtension.php", "new_path": "src/Twig/ContentExtension.php", "diff": "@@ -507,7 +507,7 @@ class ContentExtension extends AbstractExtension\n// We need to add this as a 'dummy' option for when the user is allowed\n// not to pick an option. This is needed, because otherwise the `select`\n// would default to the first option.\n- if ($taxonomy['required'] === false) {\n+ if (Field::definitionAllowsEmpty($taxonomy)) {\n$options[] = [\n'key' => '',\n'value' => '',\n@@ -549,7 +549,7 @@ class ContentExtension extends AbstractExtension\n$orders = $orders[$taxonomy['slug']] ?? [];\n}\n- if (empty($values) && $taxonomy['required']) {\n+ if (empty($values) && !Field::definitionAllowsEmpty($taxonomy)) {\n$values[] = key($taxonomy['options']);\n$orders = array_fill(0, count($values), 0);\n}\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/FieldExtension.php", "new_path": "src/Twig/FieldExtension.php", "diff": "@@ -169,7 +169,7 @@ class FieldExtension extends AbstractExtension\n$options = [];\n- if ($definition->get('required') === false) {\n+ if ($field->allowEmpty()) {\n$options = [[\n'key' => '',\n'value' => '(choose a template)',\n@@ -227,7 +227,7 @@ class FieldExtension extends AbstractExtension\n// We need to add this as a 'dummy' option for when the user is allowed\n// not to pick an option. This is needed, because otherwise the `select`\n// would default to the one.\n- if (! $field->getDefinition()->get('required', true)) {\n+ if ($field->allowEmpty()) {\n$options[] = [\n'key' => '',\n'value' => '',\n@@ -259,7 +259,7 @@ class FieldExtension extends AbstractExtension\n// We need to add this as a 'dummy' option for when the user is allowed\n// not to pick an option. This is needed, because otherwise the `select`\n// would default to the one.\n- if (! $field->getDefinition()->get('required', true)) {\n+ if ($field->allowEmpty()) {\n$options[] = [\n'key' => '',\n'value' => '',\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/RelatedExtension.php", "new_path": "src/Twig/RelatedExtension.php", "diff": "@@ -138,7 +138,7 @@ class RelatedExtension extends AbstractExtension\nreturn null;\n}\n- public function getRelatedOptions(string $contentTypeSlug, ?string $order = null, string $format = '', ?bool $required = false): Collection\n+ public function getRelatedOptions(string $contentTypeSlug, ?string $order = null, string $format = '', ?bool $required = false, ?bool $allowEmpty = false): Collection\n{\n$maxAmount = $this->config->get('maximum_listing_select', 1000);\n@@ -148,7 +148,7 @@ class RelatedExtension extends AbstractExtension\n$order = $contentType->get('order');\n}\n- $options = $this->optionsUtility->fetchRelatedOptions($contentTypeSlug, $order, $format, $required, $maxAmount);\n+ $options = $this->optionsUtility->fetchRelatedOptions($contentTypeSlug, $order, $format, $required, $allowEmpty, $maxAmount);\nreturn new Collection($options);\n}\n" }, { "change_type": "MODIFY", "old_path": "src/Utils/RelatedOptionsUtility.php", "new_path": "src/Utils/RelatedOptionsUtility.php", "diff": "namespace Bolt\\Utils;\nuse Bolt\\Entity\\Content;\n+use Bolt\\Entity\\Field;\nuse Bolt\\Storage\\Query;\n/**\n@@ -27,7 +28,7 @@ class RelatedOptionsUtility\n/**\n* Decorated by `Bolt\\Cache\\RelatedOptionsUtilityCacher`\n*/\n- public function fetchRelatedOptions(string $contentTypeSlug, string $order, string $format, bool $required, int $maxAmount): array\n+ public function fetchRelatedOptions(string $contentTypeSlug, string $order, string $format, bool $required, ?bool $allowEmpty, int $maxAmount): array\n{\n$pager = $this->query->getContent($contentTypeSlug, ['order' => $order])\n->setMaxPerPage($maxAmount)\n@@ -40,7 +41,7 @@ class RelatedOptionsUtility\n// We need to add this as a 'dummy' option for when the user is allowed\n// not to pick an option. This is needed, because otherwise the `select`\n// would default to the first one.\n- if ($required === false) {\n+ if (Field::settingsAllowEmpty($allowEmpty, $required)) {\n$options[] = [\n'key' => '',\n'value' => '',\n" }, { "change_type": "MODIFY", "old_path": "templates/_partials/fields/select.html.twig", "new_path": "templates/_partials/fields/select.html.twig", "diff": ":autocomplete=\"{{ autocomplete }}\"\n:readonly=\"{{ readonly|json_encode }}\"\n:errormessage='{{ errormessage|json_encode }}'\n- :allowempty=\"{{ required ? 'false' : 'true' }}\"\n></editor-select>\n{% endblock %}\n" }, { "change_type": "MODIFY", "old_path": "templates/content/_relationships.html.twig", "new_path": "templates/content/_relationships.html.twig", "diff": "{% for contentType, relation in record.definition.relations %}\n- {% set options = related_options(contentType, relation.order|default(), relation.format|default(), relation.required) %}\n+ {% set options = related_options(contentType, relation.order|default(), relation.format|default(), relation.required, relation.allow_empty) %}\n+\n{% set value = record|related_values(contentType) %}\n<div class=\"form-group is-normal\">\n:options=\"{{ options }}\"\n:multiple=\"{{ relation.multiple ? 'true' : 'false' }}\"\n:taggable=false\n- :allowempty=\"{{ relation.required ? 'false' : 'true' }}\"\n:searchable=true\n></editor-select>\n</div>\n" }, { "change_type": "MODIFY", "old_path": "templates/content/_taxonomies.html.twig", "new_path": "templates/content/_taxonomies.html.twig", "diff": ":options=\"{{ options }}\"\n:multiple=\"{{ definition.multiple ? 'true' : 'false' }}\"\n:taggable=\"{{ (definition.behaves_like == 'tags') ? 'true' : 'false' }}\"\n- :allowempty=\"{{ definition.required ? 'false' : 'true' }}\"\n></editor-select>\n{% if definition.has_sortorder %}\n</div>\n" } ]
PHP
MIT License
bolt/core
Allow empty value for select form controls, based on user setting.
95,144
09.01.2022 10:07:26
-3,600
e015fa5f71bbe2fa985a251cb19d2120f8c271c8
Fixing logo alt
[ { "change_type": "MODIFY", "old_path": "README.md", "new_path": "README.md", "diff": "<h1 align=\"center\">\n<br>\n- <a href=\"https://boltcms.io/\"><img src=\"https://boltcms.io/theme/boltcms-2021/img/logo.svg\" alt=\"newsinproduct\" width=\"350\">\n+ <a href=\"https://boltcms.io/\"><img src=\"https://boltcms.io/theme/boltcms-2021/img/logo.svg\" alt=\"Bolt logo\" width=\"350\">\n<br>\n</a>\n</h1>\n" } ]
PHP
MIT License
bolt/core
Fixing logo alt
95,144
09.01.2022 10:32:37
-3,600
0fbbdcf15b7b86f6a1c23b3e52cc283037982229
Typehint QuestionHelper
[ { "change_type": "MODIFY", "old_path": "src/Command/WelcomeCommand.php", "new_path": "src/Command/WelcomeCommand.php", "diff": "@@ -5,6 +5,7 @@ declare(strict_types=1);\nnamespace Bolt\\Command;\nuse Symfony\\Component\\Console\\Command\\Command;\n+use Symfony\\Component\\Console\\Helper\\QuestionHelper;\nuse Symfony\\Component\\Console\\Input\\ArrayInput;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\n@@ -49,6 +50,7 @@ HELP\n$io->note('If you wish to continue with SQLite, you can answer \\'Y\\' to the next question. If you\\'d like to use MySQL or PostgreSQL, answer \\'n\\', configure `.env.local`, and then continue the setup.');\n+ /** @var QuestionHelper $helper */\n$helper = $this->getHelper('question');\n$question = new ConfirmationQuestion('Do you want to continue the setup now? (Y/n)', true);\n" } ]
PHP
MIT License
bolt/core
Typehint QuestionHelper
95,182
12.01.2022 12:43:36
-3,600
6532e4930d1570ce7cfcefb6f4ad89d1cba43fca
Fix wrong subtask called in makefile for docker
[ { "change_type": "MODIFY", "old_path": "Makefile", "new_path": "Makefile", "diff": "@@ -88,7 +88,7 @@ db-reset-without-images: ## to delete database and load fixtures, but no images\ndocker-install: ## to install project with docker\nmake docker-start\nmake docker-install-deps\n- make docker-db-create\n+ make docker-db-reset\ndocker-install-deps: ## to install all assets with docker\ndocker-compose exec -T php sh -c \"$(COMPOSER) install\"\n" } ]
PHP
MIT License
bolt/core
Fix wrong subtask called in makefile for docker
95,168
13.01.2022 17:37:52
-3,600
cb2ffcbfb7da5b02d549ab274c287a6ac82a297e
Make a label for the heading Current sessions
[ { "change_type": "MODIFY", "old_path": "templates/users/listing.html.twig", "new_path": "templates/users/listing.html.twig", "diff": "{% endif %}\n</p>\n- <h3>Current sessions</h3>\n+ <h3>{{ 'listing.current_sessions_header'|trans }}</h3>\n<table class=\"table\">\n<thead>\n<tr>\n" } ]
PHP
MIT License
bolt/core
Make a label for the heading Current sessions
95,168
13.01.2022 17:39:05
-3,600
5ee3aabd5a0978f9ef7892ebbbcd6d52cf985224
Add dutch translations for the /bolt/users overview page
[ { "change_type": "MODIFY", "old_path": "translations/messages.en.xlf", "new_path": "translations/messages.en.xlf", "diff": "<target>Remember me? (%duration% days)</target>\n</segment>\n</unit>\n+ <unit id=\"eJG2.4P\" name=\"listing.current_sessions_header\">\n+ <segment>\n+ <source>listing.current_sessions_header</source>\n+ <target>Current sessions</target>\n+ </segment>\n+ </unit>\n</file>\n</xliff>\n" }, { "change_type": "MODIFY", "old_path": "translations/messages.nl.xlf", "new_path": "translations/messages.nl.xlf", "diff": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n-<xliff xmlns=\"urn:oasis:names:tc:xliff:document:2.0\" version=\"2.0\" srcLang=\"nl\" trgLang=\"nl\">\n+<xliff xmlns=\"urn:oasis:names:tc:xliff:document:2.0\" version=\"2.0\" srcLang=\"en\" trgLang=\"nl\">\n<file id=\"messages.nl\">\n<unit id=\"tbB2gib\" name=\"not_available\">\n<notes>\n<target>Copyright</target>\n</segment>\n</unit>\n- <unit id=\"IaF1MjB\" name=\"label.remembermeduration\">\n+ <unit id=\"2hoKa1k\" name=\"label.remembermeduration\">\n<notes>\n<note>templates/security/login.twig:80</note>\n</notes>\n<unit id=\"Iy4HXCU\" name=\"controller.user.title\">\n<segment>\n<source>controller.user.title</source>\n- <target><![CDATA[Users & Permissions]]></target>\n+ <target><![CDATA[Gebruikers & permissies]]></target>\n</segment>\n</unit>\n<unit id=\"HBwIQ9b\" name=\"controller.user.subtitle\">\n<segment>\n<source>controller.user.subtitle</source>\n- <target>To edit users and their permissions</target>\n+ <target><![CDATA[Gebruikers & permissies bewerken]]></target>\n</segment>\n</unit>\n<unit id=\"0Gyf5xr\" name=\"controller.database.check_title\">\n<target>je wachtwoord</target>\n</segment>\n</unit>\n+ <unit id=\"z8r0TY6\" name=\"action.edit_permissions\">\n+ <segment>\n+ <source>action.edit_permissions</source>\n+ <target>Bewerk permissies</target>\n+ </segment>\n+ </unit>\n+ <unit id=\"eJG2.4P\" name=\"listing.current_sessions_header\">\n+ <segment>\n+ <source>listing.current_sessions_header</source>\n+ <target>Huidige sessies</target>\n+ </segment>\n+ </unit>\n</file>\n</xliff>\n" }, { "change_type": "MODIFY", "old_path": "translations/security.nl.xlf", "new_path": "translations/security.nl.xlf", "diff": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n-<xliff xmlns=\"urn:oasis:names:tc:xliff:document:2.0\" version=\"2.0\" srcLang=\"nl\" trgLang=\"nl\">\n+<xliff xmlns=\"urn:oasis:names:tc:xliff:document:2.0\" version=\"2.0\" srcLang=\"en\" trgLang=\"nl\">\n<file id=\"security.nl\">\n<unit id=\"baI_ZxO\" name=\"An authentication exception occurred.\">\n<segment>\n" }, { "change_type": "MODIFY", "old_path": "translations/validators.nl.xlf", "new_path": "translations/validators.nl.xlf", "diff": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n-<xliff xmlns=\"urn:oasis:names:tc:xliff:document:2.0\" version=\"2.0\" srcLang=\"nl\" trgLang=\"nl\">\n+<xliff xmlns=\"urn:oasis:names:tc:xliff:document:2.0\" version=\"2.0\" srcLang=\"en\" trgLang=\"nl\">\n<file id=\"validators.nl\">\n<unit id=\"zh5oKD9\" name=\"This value should be false.\">\n<segment>\n" } ]
PHP
MIT License
bolt/core
Add dutch translations for the /bolt/users overview page
95,194
14.01.2022 15:23:12
-3,600
5f3544dba0d92a3a293f748d4300c17ad469c743
Add filter & sort
[ { "change_type": "MODIFY", "old_path": "src/Configuration/Parser/GeneralParser.php", "new_path": "src/Configuration/Parser/GeneralParser.php", "diff": "@@ -119,6 +119,7 @@ class GeneralParser extends BaseParser\n'extensions_allowed' => ['png', 'jpeg', 'jpg', 'gif'],\n'default_avatar' => '',\n],\n+ 'user_show_sort&filter' => false\n];\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/Backend/UserController.php", "new_path": "src/Controller/Backend/UserController.php", "diff": "@@ -35,7 +35,17 @@ class UserController extends TwigAwareController implements BackendZoneInterface\n*/\npublic function users(Query $query): Response\n{\n- $users = new ArrayAdapter($this->users->findBy([], ['username' => 'ASC'], 1000));\n+ $order = 'username';\n+ if ($this->request->get('sortBy')) {\n+ $order = $this->getFromRequest('sortBy');\n+ }\n+\n+ $like = '';\n+ if ($this->request->get('filter')) {\n+ $like = '%' . $this->getFromRequest('filter') . '%';\n+ }\n+\n+ $users = new ArrayAdapter($this->users->findUsers($like, $order));\n$currentPage = (int) $this->getFromRequest('page', '1');\n$users = new Pagerfanta($users);\n$users->setMaxPerPage(self::PAGESIZE)\n@@ -45,6 +55,8 @@ class UserController extends TwigAwareController implements BackendZoneInterface\n'title' => 'controller.user.title',\n'subtitle' => 'controller.user.subtitle',\n'users' => $users,\n+ 'sortBy' => $this->getFromRequest('sortBy'),\n+ 'filterValue' => $this->getFromRequest('filter'),\n];\nreturn $this->render('@bolt/users/listing.html.twig', $twigVars);\n" }, { "change_type": "MODIFY", "old_path": "src/Repository/UserRepository.php", "new_path": "src/Repository/UserRepository.php", "diff": "@@ -6,10 +6,14 @@ namespace Bolt\\Repository;\nuse Bolt\\Entity\\User;\nuse Doctrine\\Bundle\\DoctrineBundle\\Repository\\ServiceEntityRepository;\n+use Doctrine\\ORM\\Query\\Expr;\nuse Doctrine\\Persistence\\ManagerRegistry;\nclass UserRepository extends ServiceEntityRepository\n{\n+ /** @var string[] */\n+ private $userColumns = ['id', 'displayName', 'username', 'roles', 'email', 'lastIp'];\n+\npublic function __construct(ManagerRegistry $registry)\n{\nparent::__construct($registry, User::class);\n@@ -46,6 +50,25 @@ class UserRepository extends ServiceEntityRepository\nreturn $user instanceof User ? $user : null;\n}\n+ public function findUsers(string $like, string $orderBy = null)\n+ {\n+ $alias = 'user';\n+ $qb = $this->createQueryBuilder($alias);\n+\n+ if ($like) {\n+ foreach ($this->userColumns as $col) {\n+ $qb\n+ ->orWhere(\n+ $qb->expr()->like(sprintf('%s.%s', $alias, $col), sprintf(':%s', $col))\n+ )\n+ ->setParameter($col, $like);\n+ }\n+ }\n+ $qb->orderBy($this->createSortBy($orderBy, $alias));\n+\n+ return $qb->getQuery()->getResult();\n+ }\n+\npublic function getFirstAdminUser(): ?User\n{\n$qb = $this->createQueryBuilder('user');\n@@ -71,4 +94,16 @@ class UserRepository extends ServiceEntityRepository\nreturn $user;\n}\n+\n+ private function createSortBy($order, $alias): Expr\\OrderBy\n+ {\n+ if (mb_strpos($order, '-') === 0) {\n+ $direction = 'DESC';\n+ $order = sprintf('%s.%s', $alias, mb_substr($order, 1));\n+ } else {\n+ $direction = 'ASC';\n+ $order = sprintf('%s.%s', $alias, $order);\n+ }\n+ return new Expr\\OrderBy($order, $direction);\n+ }\n}\n" }, { "change_type": "MODIFY", "old_path": "templates/users/listing.html.twig", "new_path": "templates/users/listing.html.twig", "diff": "{# The 'aside' section is the right sidebar of the page. If omitted, 'main' will take up the full width. #}\n{% block aside %}\n{{ widgets('users_aside_top') }}\n+\n+ {% if config.get('general/user_show_sort&filter') %}\n+ {% set filterOptions = {\n+ 'id': \"id\",\n+ 'displayName': \"displayName\",\n+ 'username': \"username\",\n+ 'roles': \"roles\",\n+ 'lastseenAt': \"lastseenAt\",\n+ 'lastIp': \"lastIp\"\n+ } %}\n+\n+ <div class=\"card mb-3\">\n+ <div class=\"card-header\">\n+ {{ macro.icon('star') }} {{ title|trans }}\n+ </div>\n+ <div class=\"card-body\">\n+ <p>\n+ {% if is_granted('user:add') %}\n+ <a class=\"btn btn-secondary\" href=\"{{ path('bolt_user_add') }}\" data-patience=\"virtue\">\n+ {{ macro.icon('user-plus') }} {{ __('action.add_user') }}\n+ </a>\n+ <a\n+ class=\"btn btn-tertiary\"\n+ href=\"{{ path('bolt_file_edit', {'location': 'config', 'file': '/bolt/permissions.yaml'}) }}\"\n+ data-patience=\"virtue\"\n+ >\n+ {{ macro.icon('user-cog') }} {{ __('action.edit_permissions') }}\n+ </a>\n+ {% endif %}\n+ </p>\n+ <form>\n+ <div class=\"form-group\">\n+ <p>\n+ <strong>{{ 'listing.title_sortby'|trans }}</strong>:\n+ <select class=\"form-control\" name=\"sortBy\" title=\"{{ 'listing.title_sortby'|trans }}\">\n+ <option value=\"\" {% if sortBy is empty %}selected{% endif %}>\n+ {{ 'listing.option_select_sortby'|trans }}\n+ </option>\n+ {% for key, filterOption in filterOptions %}\n+ <option value=\"{{ key }}\" {% if sortBy == key %}selected{% endif %}>\n+ {{ filterOption }}\n+ </option>\n+ <option value=\"-{{ key }}\" {% if sortBy == '-' ~ key %}selected{% endif %}>\n+ -{{ filterOption }}\n+ </option>\n+ {% endfor %}\n+ </select>\n+ </p>\n+\n+ <p>\n+ <strong>{{ 'listing.title_filterby'|trans }}</strong>:\n+ <input\n+ class=\"form-control\"\n+ type=\"text\"\n+ name=\"filter\"\n+ id=\"content-filter\"\n+ value=\"{{ filterValue }}\"\n+ placeholder=\"{{ 'listing.placeholder_filter'|trans }}\"\n+ title=\"{{ 'listing.placeholder_filter'|trans }}\"\n+ />\n+ </p>\n+ </div>\n+\n+ {{ macro.button('listing.button_filter', 'filter', 'secondary mb-0', {'type': 'submit'}) }}\n+\n+ {% if sortBy is not empty or filterValue is not empty %}\n+ {{ macro.buttonlink('listing.button_clear', path('bolt_users'), 'times', 'tertiary mb-0') }}\n+ {% endif %}\n+ </form>\n+ </div>\n+ </div>\n+ {% endif %}\n{% endblock %}\n" } ]
PHP
MIT License
bolt/core
Add filter & sort
95,160
15.01.2022 21:49:56
-7,200
00c2fb7643e6a68eef9f60e80ea2200a91c73195
Bugfix Fix maximum_listing_select in config.yaml for Relation
[ { "change_type": "MODIFY", "old_path": "src/Twig/RelatedExtension.php", "new_path": "src/Twig/RelatedExtension.php", "diff": "@@ -140,7 +140,7 @@ class RelatedExtension extends AbstractExtension\npublic function getRelatedOptions(string $contentTypeSlug, ?string $order = null, string $format = '', ?bool $required = false): Collection\n{\n- $maxAmount = $this->config->get('maximum_listing_select', 1000);\n+ $maxAmount = $this->config->get('general/maximum_listing_select', 1000);\n$contentType = $this->config->getContentType($contentTypeSlug);\n" } ]
PHP
MIT License
bolt/core
Bugfix Fix maximum_listing_select in config.yaml for Relation
95,160
21.01.2022 13:59:35
-7,200
e12029dc5513bb5fe028a1d3d9280e3aeda62235
Bugfix Fix autocomplete for Relation because it looks like searchable not used in vue
[ { "change_type": "MODIFY", "old_path": "templates/content/_relationships.html.twig", "new_path": "templates/content/_relationships.html.twig", "diff": ":options=\"{{ options }}\"\n:multiple=\"{{ relation.multiple ? 'true' : 'false' }}\"\n:taggable=false\n- :searchable=true\n+ :autocomplete=true\n></editor-select>\n</div>\n" } ]
PHP
MIT License
bolt/core
Bugfix Fix autocomplete for Relation because it looks like searchable not used in vue
95,144
21.01.2022 14:46:57
-3,600
53a418990e8e96fe20724ea9527e20b6ae89b0f1
Set default `values` in FieldType
[ { "change_type": "MODIFY", "old_path": "src/Configuration/Content/FieldType.php", "new_path": "src/Configuration/Content/FieldType.php", "diff": "@@ -49,11 +49,11 @@ class FieldType extends Collection\n'pattern' => false,\n'hidden' => false,\n'default_locale' => 'en',\n- // 10 rows by default\n'height' => '10',\n'icon' => '',\n'maxlength' => '',\n'autocomplete' => true,\n+ 'values' => [],\n]);\n}\n" } ]
PHP
MIT License
bolt/core
Set default `values` in FieldType
95,144
25.01.2022 15:05:34
-3,600
1cdd48681433aafdb9f7346b601dfe9fd8b9cb49
Remove ignore of false positive in PHPStan
[ { "change_type": "MODIFY", "old_path": "phpstan.neon", "new_path": "phpstan.neon", "diff": "@@ -36,11 +36,6 @@ parameters:\nmessage: \"#Offset '.*' ([a-z ]*)on array#\"\npath: %currentWorkingDirectory%/src/Log/LogHandler.php\n- # False positive: `id` on Entities\n- -\n- message: '#Property Bolt\\\\Entity\\\\(.*)::\\$id is never written, only read#'\n- path: %currentWorkingDirectory%/src/Entity/*\n-\nincludes:\n- vendor/phpstan/phpstan-symfony/extension.neon\n- vendor/phpstan/phpstan-doctrine/extension.neon\n" } ]
PHP
MIT License
bolt/core
Remove ignore of false positive in PHPStan
95,144
26.01.2022 17:11:08
-3,600
cfc2b2086057a1887a77acb65d6c6e8c354ca871
Show "404" image for missing thumbnails
[ { "change_type": "ADD", "old_path": "assets/static/images/404-image.png", "new_path": "assets/static/images/404-image.png", "diff": "Binary files /dev/null and b/assets/static/images/404-image.png differ\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/ImageController.php", "new_path": "src/Controller/ImageController.php", "diff": "@@ -41,7 +41,7 @@ class ImageController\npublic function thumbnail(string $paramString, string $filename)\n{\nif (! $this->isImage($filename)) {\n- throw new NotFoundHttpException('Thumbnail not found');\n+ return $this->sendErrorImage();\n}\n$this->parseParameters($paramString);\n@@ -115,10 +115,13 @@ class ImageController\nprivate function buildResponse(string $filename): Response\n{\n+\n$filepath = $this->getPath(null, false, $filename);\nif (! (new Filesystem())->exists($filepath)) {\n- throw new NotFoundHttpException(sprintf(\"The file '%s' does not exist.\", $filepath));\n+ // $notice = sprintf(\"The file '%s' does not exist.\", $filepath);\n+\n+ return $this->sendErrorImage();\n}\n// In case we're trying to \"thumbnail\" an svg, just return the whole thing.\n@@ -205,4 +208,13 @@ class ImageController\nreturn $fit;\n}\n}\n+\n+ public function sendErrorImage(): Response\n+ {\n+ $image404Path = dirname(dirname(__DIR__)) . '/assets/static/images/404-image.png';\n+ $response = new Response(file_get_contents($image404Path));\n+ $response->headers->set('Content-Type', 'image/png');\n+\n+ return $response;\n+ }\n}\n" } ]
PHP
MIT License
bolt/core
Show "404" image for missing thumbnails
95,144
28.01.2022 15:00:15
-3,600
027ea1274217f625721cdf4bd14b844ed403a3c5
Tweaking Cypress defaultCommandTimeout
[ { "change_type": "MODIFY", "old_path": "tests/cypress/cypress-ci.json", "new_path": "tests/cypress/cypress-ci.json", "diff": "\"video\": false,\n\"supportFile\": \"tests/cypress/support/index.js\",\n\"baseUrl\": \"http://127.0.0.1:8088\",\n- \"projectId\": \"54gs3j\"\n+ \"projectId\": \"54gs3j\",\n+ \"defaultCommandTimeout\": 8000\n}\n" } ]
PHP
MIT License
bolt/core
Tweaking Cypress defaultCommandTimeout
95,122
02.02.2022 12:11:30
0
3ed866191e6ce7c2d985399f54529c2f7792d47a
Update AuthSubscriber.php Prevent error on logout when user is not logged in
[ { "change_type": "MODIFY", "old_path": "src/Event/Subscriber/AuthSubscriber.php", "new_path": "src/Event/Subscriber/AuthSubscriber.php", "diff": "@@ -53,6 +53,8 @@ class AuthSubscriber implements EventSubscriberInterface\npublic function onLogout(LogoutEvent $event): void\n{\n+ if (is_null($event->getToken())) return;\n+\n/** @var User $user */\n$user = $event->getToken()->getUser();\n" } ]
PHP
MIT License
bolt/core
Update AuthSubscriber.php Prevent error on logout when user is not logged in
95,122
02.02.2022 12:16:40
0
fb85799e6f5193ebce0dae30ae3f02497de942d7
Update AuthSubscriber.php Additionaly prevent error when logging in already logged user (different browser)
[ { "change_type": "MODIFY", "old_path": "src/Event/Subscriber/AuthSubscriber.php", "new_path": "src/Event/Subscriber/AuthSubscriber.php", "diff": "@@ -35,6 +35,10 @@ class AuthSubscriber implements EventSubscriberInterface\n$user = $event->getAuthenticationToken()->getUser();\n$request = $this->requestStack->getCurrentRequest();\n+ $existingUserAuthToken = $this->em->getRepository(UserAuthToken::class)->findOneBy(['user' => $user]);\n+ $this->em->remove($existingUserAuthToken);\n+ $this->em->flush();\n+\n$user->setLastseenAt(new \\DateTime());\n$user->setLastIp($request->getClientIp());\n/** @var Parser $uaParser */\n@@ -53,7 +57,9 @@ class AuthSubscriber implements EventSubscriberInterface\npublic function onLogout(LogoutEvent $event): void\n{\n- if (is_null($event->getToken())) return;\n+ if (is_null($event->getToken())) {\n+ return;\n+ }\n/** @var User $user */\n$user = $event->getToken()->getUser();\n" } ]
PHP
MIT License
bolt/core
Update AuthSubscriber.php Additionaly prevent error when logging in already logged user (different browser)
95,122
02.02.2022 12:38:17
0
7f694b9a5c14ff6f148cd8cfaef4945c9845b168
Update AuthSubscriber.php not necessary database upgrade was necessary
[ { "change_type": "MODIFY", "old_path": "src/Event/Subscriber/AuthSubscriber.php", "new_path": "src/Event/Subscriber/AuthSubscriber.php", "diff": "namespace Bolt\\Event\\Subscriber;\nuse Bolt\\Entity\\User;\n-use Bolt\\Entity\\UserAuthToken;\nuse Bolt\\Log\\LoggerTrait;\nuse Bolt\\Repository\\UserAuthTokenRepository;\nuse Doctrine\\ORM\\EntityManagerInterface;\n@@ -35,11 +34,6 @@ class AuthSubscriber implements EventSubscriberInterface\n/** @var User $user */\n$user = $event->getAuthenticationToken()->getUser();\n$request = $this->requestStack->getCurrentRequest();\n-\n- $existingUserAuthToken = $this->em->getRepository(UserAuthToken::class)->findOneBy(['user' => $user]);\n- $this->em->remove($existingUserAuthToken);\n- $this->em->flush();\n-\n$user->setLastseenAt(new \\DateTime());\n$user->setLastIp($request->getClientIp());\n/** @var Parser $uaParser */\n" } ]
PHP
MIT License
bolt/core
Update AuthSubscriber.php not necessary database upgrade was necessary
95,115
05.02.2022 21:36:27
-3,600
70ceb0d29750e8b93faab85d8f70d8995c2eb6c8
Make it possible for GlobalVoter.php to vote on non-bolt users.
[ { "change_type": "MODIFY", "old_path": "src/Security/GlobalVoter.php", "new_path": "src/Security/GlobalVoter.php", "diff": "@@ -45,12 +45,8 @@ class GlobalVoter extends Voter\n{\n$user = $token->getUser();\n- if (! $user instanceof User) {\n- // the user must be logged in; if not, deny access\n- return false;\n- }\n-\n- if ($user->getStatus() !== UserStatus::ENABLED) {\n+ // Deny if the user is a Bolt\\Entity\\User and not enabled\n+ if ($user instanceof User && $user->getStatus() !== UserStatus::ENABLED) {\nreturn false;\n}\n" } ]
PHP
MIT License
bolt/core
Make it possible for GlobalVoter.php to vote on non-bolt users.
95,191
07.02.2022 17:13:49
-3,600
b609de45185ecb430a7411860b0760fcf9160dcb
Update chief_editor_permissions.spec.js
[ { "change_type": "MODIFY", "old_path": "tests/cypress/integration/chief_editor_permissions.spec.js", "new_path": "tests/cypress/integration/chief_editor_permissions.spec.js", "diff": "/// <reference types=\"cypress\" />\n-describe('As a chief editor I should be able to clear cache', () => {\n- it('checks if a chief editor is able to clear cache', () => {\n+describe('Check permissions of a chief_editor', () => {\n+ it('checks all permissions of a chief editor', () => {\ncy.login('jane_chief', 'jane%1');\ncy.url().should('contain', '/bolt/');\ncy.get('ul[class=\"admin__sidebar--menu\"]').find('li').eq(10).trigger('mouseover');\ncy.get('a[href=\"/bolt/menu/maintenance\"]').click();\ncy.url().should('contain', '/bolt/menu/maintenance');\n- cy.get('.menupage').find('ul').find('li').its('length').should('eq', 7);\n+ cy.get('.menupage').find('ul').find('li').its('length').should('eq', 2);\ncy.get('.menupage').find('ul').find('li').eq(1).click();\ncy.url().should('contain', '/bolt/about');\n" } ]
PHP
MIT License
bolt/core
Update chief_editor_permissions.spec.js
95,191
07.02.2022 17:20:24
-3,600
625349fc4ecd3e3e9b731a9c6fe4c96ed9802071
This ones funny :smile:
[ { "change_type": "MODIFY", "old_path": "tests/cypress/integration/display_taxonomies.spec.js", "new_path": "tests/cypress/integration/display_taxonomies.spec.js", "diff": "@@ -12,7 +12,7 @@ describe('As a user I want to see taxonomies in records and listings', () => {\ncy.login();\ncy.visit('/entry/this-is-a-record-in-the-entries-contenttype');\ncy.get('.title').should('have.length', 1);\n- cy.findByText('love').click();\n+ cy.findByText('movies').click();\ncy.visit('/categories/movies');\ncy.get('article').its('length').should('be.gte', 3);\n})\n" } ]
PHP
MIT License
bolt/core
This ones funny :smile:
95,191
08.02.2022 09:42:19
-3,600
09002417e74da3f0d3b25a821c9576135b4eeaac
Update edit_record_1_field.spec.js
[ { "change_type": "MODIFY", "old_path": "tests/cypress/integration/edit_record_1_field.spec.js", "new_path": "tests/cypress/integration/edit_record_1_field.spec.js", "diff": "@@ -41,9 +41,9 @@ describe('As an Admin I want to be able to make use of the embed, infobox and im\ncy.visit('/bolt/edit/40');\ncy.get('a[id=\"media-tab\"]').click();\n- cy.get(\"label[for=field-image]\").should('contain', 'Image');\n- cy.get('input[name=\"fields[image][filename]\"]').should('not.be.empty');\n- cy.get('input[name=\"fields[image][alt]\"]').should('not.be.empty');\n+ cy.get('label[for=field-image]').should('contain', 'Image');\n+ cy.get('.form-control').eq(10).should('not.equal', '');\n+ cy.get('.form-control').eq(11).should('not.equal', '');\ncy.get('button[class=\"btn btn-sm btn-hidden-danger\"]').should('contain', 'Remove').eq(0).click();\ncy.get('input[name=\"fields[image][filename]\"]').should('be.empty');\n" } ]
PHP
MIT License
bolt/core
Update edit_record_1_field.spec.js
95,191
08.02.2022 09:57:03
-3,600
afa23ed9cf14d3888cac0df320aa08e4891265a2
Update chief_editor_permissions.spec.js Temporary cache disable
[ { "change_type": "MODIFY", "old_path": "tests/cypress/integration/chief_editor_permissions.spec.js", "new_path": "tests/cypress/integration/chief_editor_permissions.spec.js", "diff": "describe('Check permissions of a chief_editor', () => {\nit('checks all permissions of a chief editor', () => {\ncy.login('jane_chief', 'jane%1');\n+\n+ // TODO Wait for cache fix\n+ cy.visit('/bolt/clearcache');\n+ cy.wait(1000);\n+ cy.visit('/bolt');\n+\n+\ncy.url().should('contain', '/bolt/');\ncy.get('ul[class=\"admin__sidebar--menu\"]').find('li').eq(10).trigger('mouseover');\n" } ]
PHP
MIT License
bolt/core
Update chief_editor_permissions.spec.js Temporary cache disable
95,191
08.02.2022 10:30:10
-3,600
cef535e35136f59acc8619334fc939132087c585
Update display_taxonomies.spec.js I want to see what the taxos are
[ { "change_type": "MODIFY", "old_path": "tests/cypress/integration/display_taxonomies.spec.js", "new_path": "tests/cypress/integration/display_taxonomies.spec.js", "diff": "@@ -12,6 +12,7 @@ describe('As a user I want to see taxonomies in records and listings', () => {\ncy.login();\ncy.visit('/entry/this-is-a-record-in-the-entries-contenttype');\ncy.get('.title').should('have.length', 1);\n+ cy.scrollIntoView();\ncy.findByText('movies').click();\ncy.visit('/categories/movies');\ncy.get('article').its('length').should('be.gte', 3);\n" } ]
PHP
MIT License
bolt/core
Update display_taxonomies.spec.js I want to see what the taxos are
95,191
08.02.2022 10:58:08
-3,600
d3084f3ff33043e98186be1382a564addce9016b
Update create_delete_user.spec.js This deselects the current locale which removes the english one and causes an error
[ { "change_type": "MODIFY", "old_path": "tests/cypress/integration/create_delete_user.spec.js", "new_path": "tests/cypress/integration/create_delete_user.spec.js", "diff": "@@ -16,10 +16,6 @@ describe('Create/delete user', () => {\ncy.get('input[name=\"user[plainPassword]\"]').type('test%1');\ncy.get('input[name=\"user[email]\"]').type('test_user@example.org');\n- cy.get('#multiselect-user_locale > div > div.multiselect__select').scrollIntoView();\n- cy.get('#multiselect-user_locale > div > div.multiselect__select').click();\n- cy.get('#multiselect-user_locale > div > div.multiselect__content-wrapper > ul > li:nth-child(1)').scrollIntoView();\n- cy.get('#multiselect-user_locale > div > div.multiselect__content-wrapper > ul > li:nth-child(1)').click();\ncy.get('#multiselect-user_roles > div > div.multiselect__select').scrollIntoView();\ncy.get('#multiselect-user_roles > div > div.multiselect__select').click();\ncy.get('#multiselect-user_roles > div > div.multiselect__content-wrapper > ul > li:nth-child(1) > span').scrollIntoView();\n" } ]
PHP
MIT License
bolt/core
Update create_delete_user.spec.js This deselects the current locale which removes the english one and causes an error
95,191
08.02.2022 11:16:48
-3,600
f7f146c933184d3ff83a5088ab19aa09b43c3ad8
Updated editor_permissions.spec.js Disabling backend menu cache for the test
[ { "change_type": "MODIFY", "old_path": "config/bolt/config.yaml", "new_path": "config/bolt/config.yaml", "diff": "@@ -15,7 +15,7 @@ caching:\nselectoptions: 1800\ncontent_array: 1800\nfrontend_menu: 3600\n- backend_menu: 1800\n+ backend_menu: ~\n# The theme to use.\n#\n" }, { "change_type": "MODIFY", "old_path": "tests/cypress/integration/editor_permissions.spec.js", "new_path": "tests/cypress/integration/editor_permissions.spec.js", "diff": "/// <reference types=\"cypress\" />\ndescribe('Check all editors privileges', () => {\n-\n- // TODO Another cache clear\n- before( () => {\n- cy.login();\n- cy.visit('/bolt/clearcache');\n- cy.wait(1000);\n- cy.visit('/bolt/logout');\n- });\n-\nit('checks if an editor can access Configuration', () => {\ncy.login('john_editor', 'john%1');\ncy.url().should('contain', '/bolt/');\n" } ]
PHP
MIT License
bolt/core
Updated editor_permissions.spec.js Disabling backend menu cache for the test
95,191
08.02.2022 12:05:10
-3,600
f702f8b1cbee682567c6dc61e76f46bf48fe1847
Update view_users_tables.spec.js
[ { "change_type": "MODIFY", "old_path": "tests/cypress/integration/view_users_tables.spec.js", "new_path": "tests/cypress/integration/view_users_tables.spec.js", "diff": "describe('View users and permissions', () => {\nit('checks that an admin can view users and permission', () => {\ncy.login();\n+\n+ //Clear cache\n+ cy.visit('/bolt/clearcache');\n+ cy.visit('/bolt');\n+\ncy.get('a[href=\"/bolt/menu/configuration\"]').click();\ncy.wait(1000);\n" } ]
PHP
MIT License
bolt/core
Update view_users_tables.spec.js
95,191
08.02.2022 12:40:39
-3,600
ee9ee337c9f329da982a4f62c07e6b1874356eaa
Update display_record.spec.js
[ { "change_type": "MODIFY", "old_path": "tests/cypress/integration/display_record.spec.js", "new_path": "tests/cypress/integration/display_record.spec.js", "diff": "@@ -5,20 +5,20 @@ describe('As a user I want to display a single record', () => {\ncy.visit('/entry/this-is-a-record-in-the-entries-contenttype');\ncy.get('.title').should('have.length', 1);\ncy.get('.edit-link').should('not.exist');\n- })\n+ });\nit('checks if an admin can edit a record', () => {\ncy.login();\ncy.visit('/entry/this-is-a-record-in-the-entries-contenttype');\ncy.get('.title').should('have.length', 1);\ncy.get('.edit-link').should('contain', 'Edit');\n- })\n+ });\nit('checks if you can see the difference between records with a Title and a Heading', () => {\ncy.visit('/page/2');\ncy.get('.heading').should('have.length', 1);\ncy.get('.title').should('not.exist');\n- })\n+ });\nit('checks for correct canonical URL', () => {\ncy.visit('/page/this-is-a-page');\n@@ -32,5 +32,5 @@ describe('As a user I want to display a single record', () => {\ncy.visit('/nl/page/2');\ncy.get(\"link[rel='canonical']\").should('have.attr', 'href', Cypress.config().baseUrl + '/nl/page/this-is-a-page');\n- })\n+ });\n});\n" } ]
PHP
MIT License
bolt/core
Update display_record.spec.js
95,191
08.02.2022 14:41:09
-3,600
d5036dcd9f22e44c141c0d8bcf0b95c995e615df
Update display_taxonomies.spec.js Gotta keep making changes or Cypress wont test -_-
[ { "change_type": "MODIFY", "old_path": "tests/cypress/integration/display_taxonomies.spec.js", "new_path": "tests/cypress/integration/display_taxonomies.spec.js", "diff": "@@ -16,5 +16,5 @@ describe('As a user I want to see taxonomies in records and listings', () => {\ncy.findByText('love').click();\ncy.visit('/categories/movies');\ncy.get('article').its('length').should('be.gte', 3);\n- })\n+ });\n});\n" } ]
PHP
MIT License
bolt/core
Update display_taxonomies.spec.js Gotta keep making changes or Cypress wont test -_-
95,144
09.02.2022 10:21:05
-3,600
558e721f2a46c5aac39e23c497fa4020327184a0
Update src/Configuration/Parser/BaseParser.php
[ { "change_type": "MODIFY", "old_path": "src/Configuration/Parser/BaseParser.php", "new_path": "src/Configuration/Parser/BaseParser.php", "diff": "@@ -77,7 +77,7 @@ abstract class BaseParser\n{\n$projectConfigDir = $_ENV['BOLT_CONFIG_FOLDER'] ?? 'bolt';\n- if (empty($value) && getenv('BOLT_CONFIG_FOLDER')) {\n+ if (empty($projectConfigDir) && getenv('BOLT_CONFIG_FOLDER')) {\n$projectConfigDir = getenv('BOLT_CONFIG_FOLDER');\n}\n" } ]
PHP
MIT License
bolt/core
Update src/Configuration/Parser/BaseParser.php
95,191
09.02.2022 10:27:21
-3,600
263a4360af66baad0f4623a618cff0967c463dc6
Add username to the cache key This will prevent that a editor will see the same menu as an admin after an admin logged out.
[ { "change_type": "MODIFY", "old_path": "src/Menu/BackendMenu.php", "new_path": "src/Menu/BackendMenu.php", "diff": "@@ -5,6 +5,7 @@ declare(strict_types=1);\nnamespace Bolt\\Menu;\nuse Bolt\\Configuration\\Config;\n+use Bolt\\Entity\\User;\nuse Symfony\\Component\\HttpFoundation\\RequestStack;\nuse Symfony\\Component\\Stopwatch\\Stopwatch;\nuse Symfony\\Contracts\\Cache\\CacheInterface;\n@@ -28,13 +29,24 @@ final class BackendMenu implements BackendMenuBuilderInterface\n/** @var Config */\nprivate $config;\n- public function __construct(BackendMenuBuilder $menuBuilder, TagAwareCacheInterface $cache, RequestStack $requestStack, Stopwatch $stopwatch, Config $config)\n+ /** @var User */\n+ private $user;\n+\n+ public function __construct(\n+ BackendMenuBuilder $menuBuilder,\n+ TagAwareCacheInterface $cache,\n+ RequestStack $requestStack,\n+ Stopwatch $stopwatch,\n+ Config $config,\n+ User $user\n+ )\n{\n$this->cache = $cache;\n$this->menuBuilder = $menuBuilder;\n$this->requestStack = $requestStack;\n$this->stopwatch = $stopwatch;\n$this->config = $config;\n+ $this->user = $user;\n}\npublic function buildAdminMenu(): array\n@@ -42,7 +54,8 @@ final class BackendMenu implements BackendMenuBuilderInterface\n$this->stopwatch->start('bolt.backendMenu');\n$locale = $this->requestStack->getCurrentRequest()->getLocale();\n- $cacheKey = 'bolt.backendMenu_' . $locale;\n+ $username = $this->user->getUsername();\n+ $cacheKey = 'bolt.backendMenu_' . $locale . '_' . $username;\n$menu = $this->cache->get($cacheKey, function (ItemInterface $item) {\n$item->expiresAfter($this->config->get('general/caching/backend_menu'));\n" } ]
PHP
MIT License
bolt/core
Add username to the cache key This will prevent that a editor will see the same menu as an admin after an admin logged out.
95,115
09.02.2022 14:09:54
-3,600
48fe9d68a1560741b461f763f2b6d2cba4147e52
update doc to match actual use
[ { "change_type": "MODIFY", "old_path": "config/bolt/permissions.yaml", "new_path": "config/bolt/permissions.yaml", "diff": "assignable_roles: [ROLE_DEVELOPER, ROLE_ADMIN, ROLE_CHIEF_EDITOR, ROLE_EDITOR, ROLE_USER, ROLE_WEBSERVICE]\n# These permissions are the 'global' permissions; these are not tied\n-# to any content types, but rather apply to global, non-content activity in\n-# Bolt's backend. Most of these permissions map directly to backend routes;\n+# to any content types. Most of them apply to global, non-content activity\n+# in Bolt's backend but there are exceptions like the api:* permissions\n+# used to manage access to the api-platform based requests.\n+# Most of these permissions map directly to backend routes;\n# keep in mind, however, that routes do not always correspond to URL paths 1:1.\n# The default set defined here is appropriate for most sites, so most likely,\n# you will not have to change it.\n" } ]
PHP
MIT License
bolt/core
update doc to match actual use
95,160
10.02.2022 12:13:00
-7,200
81ad7392073254f595e8e3bdc24876eb68267eb1
add some changes suggested in PR
[ { "change_type": "MODIFY", "old_path": ".env", "new_path": ".env", "diff": "APP_ENV=dev\nAPP_SECRET=!ChangeMe!\nTRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16\n-BOLT_CONFIG_FOLDER=bolt\n+BOLT_CONFIG_FOLDER='config/bolt'\n#TRUSTED_HOSTS='^(localhost|nginx)$'\n###< symfony/framework-bundle ###\n" }, { "change_type": "MODIFY", "old_path": "src/Configuration/Parser/BaseParser.php", "new_path": "src/Configuration/Parser/BaseParser.php", "diff": "@@ -26,7 +26,7 @@ abstract class BaseParser\npublic function __construct(string $projectDir, string $initialFilename)\n{\n- $this->fileLocator = new FileLocator([$projectDir . $this->getProjectConfigDir()]);\n+ $this->fileLocator = new FileLocator([$projectDir . '/' . $this->getProjectConfigDir()]);\n$this->pathResolver = new PathResolver(dirname(dirname(dirname(__DIR__))));\n$this->initialFilename = $initialFilename;\n}\n@@ -81,9 +81,7 @@ abstract class BaseParser\n$projectConfigDir = getenv('BOLT_CONFIG_FOLDER');\n}\n- $projectConfigDir = $projectConfigDir ?? 'bolt';\n-\n- return '/config/' . $projectConfigDir;\n+ return $projectConfigDir ?? 'config/bolt';\n}\npublic function getFilenameLocalOverrides()\n" } ]
PHP
MIT License
bolt/core
add some changes suggested in PR
95,144
16.02.2022 15:31:47
-3,600
7ab10082e01564f67a22eeff9fc007054da563f3
Refactoring deprecations in Symfony 5 -> 6
[ { "change_type": "MODIFY", "old_path": "config/packages/api_platform.yaml", "new_path": "config/packages/api_platform.yaml", "diff": "@@ -10,7 +10,7 @@ api_platform:\njson: ['application/json']\njsonapi: ['application/vnd.api+json']\nhtml: ['text/html']\n- collection:\n+ defaults:\npagination:\nclient_items_per_page: true\nitems_per_page_parameter_name: 'pageSize'\n" }, { "change_type": "MODIFY", "old_path": "config/packages/framework.yaml", "new_path": "config/packages/framework.yaml", "diff": "@@ -11,6 +11,7 @@ framework:\n# With this config, PHP's native session handling is used\nhandler_id: ~\ncookie_lifetime: 1209600 #expires in 14 days\n+ storage_factory_id: session.storage.factory.native\n# When using the HTTP Cache, ESI allows to render page fragments separately\n# and with different cache configurations for each fragment\n# https://symfony.com/doc/current/book/http_cache.html#edge-side-includes\n" }, { "change_type": "MODIFY", "old_path": "config/packages/security.yaml", "new_path": "config/packages/security.yaml", "diff": "@@ -9,7 +9,8 @@ security:\nROLE_WEBSERVICE: []\nenable_authenticator_manager: true\n- encoders:\n+\n+ password_hashers:\nBolt\\Entity\\User: auto\nproviders:\n" }, { "change_type": "MODIFY", "old_path": "config/packages/test/framework.yaml", "new_path": "config/packages/test/framework.yaml", "diff": "framework:\ntest: ~\nsession:\n- storage_id: session.storage.mock_file\n+ storage_factory_id: session.storage.mock_file\n" }, { "change_type": "MODIFY", "old_path": "config/packages/test/security.yaml", "new_path": "config/packages/test/security.yaml", "diff": "# this configuration simplifies testing URLs protected by the security mechanism\n# See https://symfony.com/doc/current/cookbook/testing/http_authentication.html\nsecurity:\n- encoders:\n+ password_hashers:\n# to make tests slightly faster, encryption is set to 'plaintext'\nBolt\\Entity\\User: plaintext\n" }, { "change_type": "MODIFY", "old_path": "config/services.yaml", "new_path": "config/services.yaml", "diff": "@@ -168,3 +168,5 @@ services:\nBolt\\Api\\ContentDataPersister:\ndecorates: 'api_platform.doctrine.orm.data_persister'\n+\n+ Symfony\\Component\\DependencyInjection\\ContainerInterface: '@service_container'\n" }, { "change_type": "MODIFY", "old_path": "package-lock.json", "new_path": "package-lock.json", "diff": "}\n},\n\"node_modules/@ampproject/remapping\": {\n- \"version\": \"2.1.0\",\n- \"resolved\": \"https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.0.tgz\",\n- \"integrity\": \"sha512-d5RysTlJ7hmw5Tw4UxgxcY3lkMe92n8sXCcuLPAyIAHK6j8DefDwtGnVVDgOnv+RnEosulDJ9NPKQL27bDId0g==\",\n+ \"version\": \"2.1.2\",\n+ \"resolved\": \"https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz\",\n+ \"integrity\": \"sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg==\",\n\"dependencies\": {\n\"@jridgewell/trace-mapping\": \"^0.3.0\"\n},\n}\n},\n\"node_modules/@babel/core\": {\n- \"version\": \"7.17.2\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/core/-/core-7.17.2.tgz\",\n- \"integrity\": \"sha512-R3VH5G42VSDolRHyUO4V2cfag8WHcZyxdq5Z/m8Xyb92lW/Erm/6kM+XtRFGf3Mulre3mveni2NHfEUws8wSvw==\",\n+ \"version\": \"7.17.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/core/-/core-7.17.4.tgz\",\n+ \"integrity\": \"sha512-R9x5r4t4+hBqZTmioSnkrW+I6NmbojwjGT8p4G2Gw1thWbXIHGDnmGdLdFw0/7ljucdIrNRp7Npgb4CyBYzzJg==\",\n\"dependencies\": {\n- \"@ampproject/remapping\": \"^2.0.0\",\n+ \"@ampproject/remapping\": \"^2.1.0\",\n\"@babel/code-frame\": \"^7.16.7\",\n- \"@babel/generator\": \"^7.17.0\",\n+ \"@babel/generator\": \"^7.17.3\",\n\"@babel/helper-compilation-targets\": \"^7.16.7\",\n\"@babel/helper-module-transforms\": \"^7.16.7\",\n\"@babel/helpers\": \"^7.17.2\",\n- \"@babel/parser\": \"^7.17.0\",\n+ \"@babel/parser\": \"^7.17.3\",\n\"@babel/template\": \"^7.16.7\",\n- \"@babel/traverse\": \"^7.17.0\",\n+ \"@babel/traverse\": \"^7.17.3\",\n\"@babel/types\": \"^7.17.0\",\n\"convert-source-map\": \"^1.7.0\",\n\"debug\": \"^4.1.0\",\n}\n},\n\"node_modules/@babel/generator\": {\n- \"version\": \"7.17.0\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.17.0.tgz\",\n- \"integrity\": \"sha512-I3Omiv6FGOC29dtlZhkfXO6pgkmukJSlT26QjVvS1DGZe/NzSVCPG41X0tS21oZkJYlovfj9qDWgKP+Cn4bXxw==\",\n+ \"version\": \"7.17.3\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.17.3.tgz\",\n+ \"integrity\": \"sha512-+R6Dctil/MgUsZsZAkYgK+ADNSZzJRRy0TvY65T71z/CR854xHQ1EweBYXdfT+HNeN7w0cSJJEzgxZMv40pxsg==\",\n\"dependencies\": {\n\"@babel/types\": \"^7.17.0\",\n\"jsesc\": \"^2.5.1\",\n}\n},\n\"node_modules/@babel/parser\": {\n- \"version\": \"7.17.0\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.17.0.tgz\",\n- \"integrity\": \"sha512-VKXSCQx5D8S04ej+Dqsr1CzYvvWgf20jIw2D+YhQCrIlr2UZGaDds23Y0xg75/skOxpLCRpUZvk/1EAVkGoDOw==\",\n+ \"version\": \"7.17.3\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.17.3.tgz\",\n+ \"integrity\": \"sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA==\",\n\"bin\": {\n\"parser\": \"bin/babel-parser.js\"\n},\n}\n},\n\"node_modules/@babel/plugin-proposal-object-rest-spread\": {\n- \"version\": \"7.16.7\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.16.7.tgz\",\n- \"integrity\": \"sha512-3O0Y4+dw94HA86qSg9IHfyPktgR7q3gpNVAeiKQd+8jBKFaU5NQS1Yatgo4wY+UFNuLjvxcSmzcsHqrhgTyBUA==\",\n+ \"version\": \"7.17.3\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.17.3.tgz\",\n+ \"integrity\": \"sha512-yuL5iQA/TbZn+RGAfxQXfi7CNLmKi1f8zInn4IgobuCWcAb7i+zj4TYzQ9l8cEzVyJ89PDGuqxK1xZpUDISesw==\",\n\"dev\": true,\n\"dependencies\": {\n- \"@babel/compat-data\": \"^7.16.4\",\n+ \"@babel/compat-data\": \"^7.17.0\",\n\"@babel/helper-compilation-targets\": \"^7.16.7\",\n\"@babel/helper-plugin-utils\": \"^7.16.7\",\n\"@babel/plugin-syntax-object-rest-spread\": \"^7.8.3\",\n}\n},\n\"node_modules/@babel/plugin-transform-destructuring\": {\n- \"version\": \"7.16.7\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.16.7.tgz\",\n- \"integrity\": \"sha512-VqAwhTHBnu5xBVDCvrvqJbtLUa++qZaWC0Fgr2mqokBlulZARGyIvZDoqbPlPaKImQ9dKAcCzbv+ul//uqu70A==\",\n+ \"version\": \"7.17.3\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.17.3.tgz\",\n+ \"integrity\": \"sha512-dDFzegDYKlPqa72xIlbmSkly5MluLoaC1JswABGktyt6NTXSBcUuse/kWE/wvKFWJHPETpi158qJZFS3JmykJg==\",\n\"dev\": true,\n\"dependencies\": {\n\"@babel/helper-plugin-utils\": \"^7.16.7\"\n}\n},\n\"node_modules/@babel/traverse\": {\n- \"version\": \"7.17.0\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.0.tgz\",\n- \"integrity\": \"sha512-fpFIXvqD6kC7c7PUNnZ0Z8cQXlarCLtCUpt2S1Dx7PjoRtCFffvOkHHSom+m5HIxMZn5bIBVb71lhabcmjEsqg==\",\n+ \"version\": \"7.17.3\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz\",\n+ \"integrity\": \"sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==\",\n\"dependencies\": {\n\"@babel/code-frame\": \"^7.16.7\",\n- \"@babel/generator\": \"^7.17.0\",\n+ \"@babel/generator\": \"^7.17.3\",\n\"@babel/helper-environment-visitor\": \"^7.16.7\",\n\"@babel/helper-function-name\": \"^7.16.7\",\n\"@babel/helper-hoist-variables\": \"^7.16.7\",\n\"@babel/helper-split-export-declaration\": \"^7.16.7\",\n- \"@babel/parser\": \"^7.17.0\",\n+ \"@babel/parser\": \"^7.17.3\",\n\"@babel/types\": \"^7.17.0\",\n\"debug\": \"^4.1.0\",\n\"globals\": \"^11.1.0\"\n}\n},\n\"node_modules/@jridgewell/resolve-uri\": {\n- \"version\": \"3.0.4\",\n- \"resolved\": \"https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.4.tgz\",\n- \"integrity\": \"sha512-cz8HFjOFfUBtvN+NXYSFMHYRdxZMaEl0XypVrhzxBgadKIXhIkRd8aMeHhmF56Sl7SuS8OnUpQ73/k9LE4VnLg==\",\n+ \"version\": \"3.0.5\",\n+ \"resolved\": \"https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz\",\n+ \"integrity\": \"sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==\",\n\"engines\": {\n\"node\": \">=6.0.0\"\n}\n},\n\"node_modules/@jridgewell/sourcemap-codec\": {\n- \"version\": \"1.4.10\",\n- \"resolved\": \"https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.10.tgz\",\n- \"integrity\": \"sha512-Ht8wIW5v165atIX1p+JvKR5ONzUyF4Ac8DZIQ5kZs9zrb6M8SJNXpx1zn04rn65VjBMygRoMXcyYwNK0fT7bEg==\"\n+ \"version\": \"1.4.11\",\n+ \"resolved\": \"https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz\",\n+ \"integrity\": \"sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==\"\n},\n\"node_modules/@jridgewell/trace-mapping\": {\n\"version\": \"0.3.4\",\n}\n},\n\"node_modules/@types/estree\": {\n- \"version\": \"0.0.50\",\n- \"resolved\": \"https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz\",\n- \"integrity\": \"sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==\"\n+ \"version\": \"0.0.51\",\n+ \"resolved\": \"https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz\",\n+ \"integrity\": \"sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==\"\n},\n\"node_modules/@types/express\": {\n\"version\": \"4.17.13\",\n\"integrity\": \"sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==\"\n},\n\"node_modules/@types/node\": {\n- \"version\": \"17.0.16\",\n- \"resolved\": \"https://registry.npmjs.org/@types/node/-/node-17.0.16.tgz\",\n- \"integrity\": \"sha512-ydLaGVfQOQ6hI1xK2A5nVh8bl0OGoIfYMxPWHqqYe9bTkWCfqiVvZoh2I/QF2sNSkZzZyROBoTefIEI+PB6iIA==\"\n+ \"version\": \"17.0.18\",\n+ \"resolved\": \"https://registry.npmjs.org/@types/node/-/node-17.0.18.tgz\",\n+ \"integrity\": \"sha512-eKj4f/BsN/qcculZiRSujogjvp5O/k4lOW5m35NopjZM/QwLOR075a8pJW5hD+Rtdm2DaCVPENS6KtSQnUD6BA==\"\n},\n\"node_modules/@types/normalize-package-data\": {\n\"version\": \"2.4.1\",\n}\n},\n\"node_modules/caniuse-lite\": {\n- \"version\": \"1.0.30001310\",\n- \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001310.tgz\",\n- \"integrity\": \"sha512-cb9xTV8k9HTIUA3GnPUJCk0meUnrHL5gy5QePfDjxHyNBcnzPzrHFv5GqfP7ue5b1ZyzZL0RJboD6hQlPXjhjg==\",\n+ \"version\": \"1.0.30001312\",\n+ \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001312.tgz\",\n+ \"integrity\": \"sha512-Wiz1Psk2MEK0pX3rUzWaunLTZzqS2JYZFzNKqAiJGiuxIjRPLgV6+VDPOg6lQOUxmDwhTlh198JsTTi8Hzw6aQ==\",\n\"funding\": {\n\"type\": \"opencollective\",\n\"url\": \"https://opencollective.com/browserslist\"\n}\n},\n\"node_modules/cypress/node_modules/@types/node\": {\n- \"version\": \"14.18.10\",\n- \"resolved\": \"https://registry.npmjs.org/@types/node/-/node-14.18.10.tgz\",\n- \"integrity\": \"sha512-6iihJ/Pp5fsFJ/aEDGyvT4pHGmCpq7ToQ/yf4bl5SbVAvwpspYJ+v3jO7n8UyjhQVHTy+KNszOozDdv+O6sovQ==\",\n+ \"version\": \"14.18.12\",\n+ \"resolved\": \"https://registry.npmjs.org/@types/node/-/node-14.18.12.tgz\",\n+ \"integrity\": \"sha512-q4jlIR71hUpWTnGhXWcakgkZeHa3CCjcQcnuzU8M891BAWA2jHiziiWEPEkdS5pFsz7H9HJiy8BrK7tBRNrY7A==\",\n\"dev\": true\n},\n\"node_modules/cypress/node_modules/ansi-styles\": {\n}\n},\n\"node_modules/electron-to-chromium\": {\n- \"version\": \"1.4.67\",\n- \"resolved\": \"https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.67.tgz\",\n- \"integrity\": \"sha512-A6a2jEPLueEDfb7kvh7/E94RKKnIb01qL+4I7RFxtajmo+G9F5Ei7HgY5PRbQ4RDrh6DGDW66P0hD5XI2nRAcg==\"\n+ \"version\": \"1.4.71\",\n+ \"resolved\": \"https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.71.tgz\",\n+ \"integrity\": \"sha512-Hk61vXXKRb2cd3znPE9F+2pLWdIOmP7GjiTj45y6L3W/lO+hSnUSUhq+6lEaERWBdZOHbk2s3YV5c9xVl3boVw==\"\n},\n\"node_modules/elliptic\": {\n\"version\": \"6.5.4\",\n}\n},\n\"node_modules/error-stack-parser\": {\n- \"version\": \"2.0.6\",\n- \"resolved\": \"https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.0.6.tgz\",\n- \"integrity\": \"sha512-d51brTeqC+BHlwF0BhPtcYgF5nlzf9ZZ0ZIUQNZpc9ZB9qw5IJ2diTrBY9jlCJkTLITYPjmiX6OWCwH+fuyNgQ==\",\n+ \"version\": \"2.0.7\",\n+ \"resolved\": \"https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.0.7.tgz\",\n+ \"integrity\": \"sha512-chLOW0ZGRf4s8raLrDxa5sdkvPec5YdvwbFnqJme4rk0rFajP8mPtrDL1+I+CwrQDCjswDA5sREX7jYQDQs9vA==\",\n\"dependencies\": {\n\"stackframe\": \"^1.1.1\"\n}\n}\n},\n\"node_modules/listr2/node_modules/rxjs\": {\n- \"version\": \"7.5.3\",\n- \"resolved\": \"https://registry.npmjs.org/rxjs/-/rxjs-7.5.3.tgz\",\n- \"integrity\": \"sha512-6162iC/N7L7K8q3UvdOMWix1ju+esADGrDaPrTu5XJmCv69YNdYoUaop/iatN8GHK+YHOdszPP+qygA0yi04zQ==\",\n+ \"version\": \"7.5.4\",\n+ \"resolved\": \"https://registry.npmjs.org/rxjs/-/rxjs-7.5.4.tgz\",\n+ \"integrity\": \"sha512-h5M3Hk78r6wAheJF0a5YahB1yRQKCsZ4MsGdZ5O9ETbVtjPcScGfrMmoOq7EBsCRzd4BDkvDJ7ogP8Sz5tTFiQ==\",\n\"dev\": true,\n\"dependencies\": {\n\"tslib\": \"^2.1.0\"\n\"integrity\": \"sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=\"\n},\n\"node_modules/minimatch\": {\n- \"version\": \"3.0.5\",\n- \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz\",\n- \"integrity\": \"sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw==\",\n+ \"version\": \"3.1.2\",\n+ \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz\",\n+ \"integrity\": \"sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==\",\n\"dependencies\": {\n\"brace-expansion\": \"^1.1.7\"\n},\n\"optional\": true\n},\n\"node_modules/nanoid\": {\n- \"version\": \"3.2.0\",\n- \"resolved\": \"https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz\",\n- \"integrity\": \"sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==\",\n+ \"version\": \"3.3.0\",\n+ \"resolved\": \"https://registry.npmjs.org/nanoid/-/nanoid-3.3.0.tgz\",\n+ \"integrity\": \"sha512-JzxqqT5u/x+/KOFSd7JP15DOo9nOoHpx6DYatqIHUW2+flybkm+mdcraotSQR5WcnZr+qhGVh8Ted0KdfSMxlg==\",\n\"bin\": {\n\"nanoid\": \"bin/nanoid.cjs\"\n},\n}\n},\n\"node_modules/postcss-preset-env\": {\n- \"version\": \"6.7.0\",\n- \"resolved\": \"https://registry.npmjs.org/postcss-preset-env/-/postcss-preset-env-6.7.0.tgz\",\n- \"integrity\": \"sha512-eU4/K5xzSFwUFJ8hTdTQzo2RBLbDVt83QZrAvI07TULOkmyQlnYlpwep+2yIK+K+0KlZO4BvFcleOCCcUtwchg==\",\n+ \"version\": \"6.7.1\",\n+ \"resolved\": \"https://registry.npmjs.org/postcss-preset-env/-/postcss-preset-env-6.7.1.tgz\",\n+ \"integrity\": \"sha512-rlRkgX9t0v2On33n7TK8pnkcYOATGQSv48J2RS8GsXhqtg+xk6AummHP88Y5mJo0TLJelBjePvSjScTNkj3+qw==\",\n\"dev\": true,\n\"dependencies\": {\n\"autoprefixer\": \"^9.6.1\",\n}\n},\n\"node_modules/rollup\": {\n- \"version\": \"2.67.1\",\n- \"resolved\": \"https://registry.npmjs.org/rollup/-/rollup-2.67.1.tgz\",\n- \"integrity\": \"sha512-1Sbcs4OuW+aD+hhqpIRl+RqooIpF6uQcfzU/QSI7vGkwADY6cM4iLsBGRM2CGLXDTDN5y/yShohFmnKegSPWzg==\",\n+ \"version\": \"2.67.2\",\n+ \"resolved\": \"https://registry.npmjs.org/rollup/-/rollup-2.67.2.tgz\",\n+ \"integrity\": \"sha512-hoEiBWwZtf1QdK3jZIq59L0FJj4Fiv4RplCO4pvCRC86qsoFurWB4hKQIjoRf3WvJmk5UZ9b0y5ton+62fC7Tw==\",\n\"dev\": true,\n\"bin\": {\n\"rollup\": \"dist/bin/rollup\"\n}\n},\n\"node_modules/stackframe\": {\n- \"version\": \"1.2.0\",\n- \"resolved\": \"https://registry.npmjs.org/stackframe/-/stackframe-1.2.0.tgz\",\n- \"integrity\": \"sha512-GrdeshiRmS1YLMYgzF16olf2jJ/IzxXY9lhKOskuVziubpTYcYqyOwYeJKzQkwy7uN0fYSsbsC4RQaXf9LCrYA==\"\n+ \"version\": \"1.2.1\",\n+ \"resolved\": \"https://registry.npmjs.org/stackframe/-/stackframe-1.2.1.tgz\",\n+ \"integrity\": \"sha512-h88QkzREN/hy8eRdyNhhsO7RSJ5oyTqxxmmn0dzBIMUclZsjpfmrsg81vp8mjjAs2vAZ72nyWxRUwSwmh0e4xg==\"\n},\n\"node_modules/static-extend\": {\n\"version\": \"0.1.2\",\n}\n},\n\"node_modules/url-parse\": {\n- \"version\": \"1.5.4\",\n- \"resolved\": \"https://registry.npmjs.org/url-parse/-/url-parse-1.5.4.tgz\",\n- \"integrity\": \"sha512-ITeAByWWoqutFClc/lRZnFplgXgEZr3WJ6XngMM/N9DMIm4K8zXPCZ1Jdu0rERwO84w1WC5wkle2ubwTA4NTBg==\",\n+ \"version\": \"1.5.6\",\n+ \"resolved\": \"https://registry.npmjs.org/url-parse/-/url-parse-1.5.6.tgz\",\n+ \"integrity\": \"sha512-xj3QdUJ1DttD1LeSfvJlU1eiF1RvBSBfUu8GplFGdUzSO28y5yUtEl7wb//PI4Af6qh0o/K8545vUmucRrfWsw==\",\n\"dependencies\": {\n\"querystringify\": \"^2.1.1\",\n\"requires-port\": \"^1.0.0\"\n\"dev\": true\n},\n\"node_modules/webpack\": {\n- \"version\": \"5.68.0\",\n- \"resolved\": \"https://registry.npmjs.org/webpack/-/webpack-5.68.0.tgz\",\n- \"integrity\": \"sha512-zUcqaUO0772UuuW2bzaES2Zjlm/y3kRBQDVFVCge+s2Y8mwuUTdperGaAv65/NtRL/1zanpSJOq/MD8u61vo6g==\",\n+ \"version\": \"5.69.0\",\n+ \"resolved\": \"https://registry.npmjs.org/webpack/-/webpack-5.69.0.tgz\",\n+ \"integrity\": \"sha512-E5Fqu89Gu8fR6vejRqu26h8ld/k6/dCVbeGUcuZjc+goQHDfCPU9rER71JmdtBYGmci7Ec2aFEATQ2IVXKy2wg==\",\n\"dependencies\": {\n- \"@types/eslint-scope\": \"^3.7.0\",\n- \"@types/estree\": \"^0.0.50\",\n+ \"@types/eslint-scope\": \"^3.7.3\",\n+ \"@types/estree\": \"^0.0.51\",\n\"@webassemblyjs/ast\": \"1.11.1\",\n\"@webassemblyjs/wasm-edit\": \"1.11.1\",\n\"@webassemblyjs/wasm-parser\": \"1.11.1\",\n\"acorn-import-assertions\": \"^1.7.6\",\n\"browserslist\": \"^4.14.5\",\n\"chrome-trace-event\": \"^1.0.2\",\n- \"enhanced-resolve\": \"^5.8.3\",\n+ \"enhanced-resolve\": \"^5.9.0\",\n\"es-module-lexer\": \"^0.9.0\",\n\"eslint-scope\": \"5.1.1\",\n\"events\": \"^3.2.0\",\n}\n},\n\"node_modules/workbox-build/node_modules/@apideck/better-ajv-errors\": {\n- \"version\": \"0.3.2\",\n- \"resolved\": \"https://registry.npmjs.org/@apideck/better-ajv-errors/-/better-ajv-errors-0.3.2.tgz\",\n- \"integrity\": \"sha512-JdEazx7qiVqTBzzBl5rolRwl5cmhihjfIcpqRzIZjtT6b18liVmDn/VlWpqW4C/qP2hrFFMLRV1wlex8ZVBPTg==\",\n+ \"version\": \"0.3.3\",\n+ \"resolved\": \"https://registry.npmjs.org/@apideck/better-ajv-errors/-/better-ajv-errors-0.3.3.tgz\",\n+ \"integrity\": \"sha512-9o+HO2MbJhJHjDYZaDxJmSDckvDpiuItEsrIShV0DXeCshXWRHhqYyU/PKHMkuClOmFnZhRd6wzv4vpDu/dRKg==\",\n\"dev\": true,\n\"dependencies\": {\n\"json-schema\": \"^0.4.0\",\n},\n\"dependencies\": {\n\"@ampproject/remapping\": {\n- \"version\": \"2.1.0\",\n- \"resolved\": \"https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.0.tgz\",\n- \"integrity\": \"sha512-d5RysTlJ7hmw5Tw4UxgxcY3lkMe92n8sXCcuLPAyIAHK6j8DefDwtGnVVDgOnv+RnEosulDJ9NPKQL27bDId0g==\",\n+ \"version\": \"2.1.2\",\n+ \"resolved\": \"https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz\",\n+ \"integrity\": \"sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg==\",\n\"requires\": {\n\"@jridgewell/trace-mapping\": \"^0.3.0\"\n}\n\"integrity\": \"sha512-392byTlpGWXMv4FbyWw3sAZ/FrW/DrwqLGXpy0mbyNe9Taqv1mg9yON5/o0cnr8XYCkFTZbC1eV+c+LAROgrng==\"\n},\n\"@babel/core\": {\n- \"version\": \"7.17.2\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/core/-/core-7.17.2.tgz\",\n- \"integrity\": \"sha512-R3VH5G42VSDolRHyUO4V2cfag8WHcZyxdq5Z/m8Xyb92lW/Erm/6kM+XtRFGf3Mulre3mveni2NHfEUws8wSvw==\",\n+ \"version\": \"7.17.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/core/-/core-7.17.4.tgz\",\n+ \"integrity\": \"sha512-R9x5r4t4+hBqZTmioSnkrW+I6NmbojwjGT8p4G2Gw1thWbXIHGDnmGdLdFw0/7ljucdIrNRp7Npgb4CyBYzzJg==\",\n\"requires\": {\n- \"@ampproject/remapping\": \"^2.0.0\",\n+ \"@ampproject/remapping\": \"^2.1.0\",\n\"@babel/code-frame\": \"^7.16.7\",\n- \"@babel/generator\": \"^7.17.0\",\n+ \"@babel/generator\": \"^7.17.3\",\n\"@babel/helper-compilation-targets\": \"^7.16.7\",\n\"@babel/helper-module-transforms\": \"^7.16.7\",\n\"@babel/helpers\": \"^7.17.2\",\n- \"@babel/parser\": \"^7.17.0\",\n+ \"@babel/parser\": \"^7.17.3\",\n\"@babel/template\": \"^7.16.7\",\n- \"@babel/traverse\": \"^7.17.0\",\n+ \"@babel/traverse\": \"^7.17.3\",\n\"@babel/types\": \"^7.17.0\",\n\"convert-source-map\": \"^1.7.0\",\n\"debug\": \"^4.1.0\",\n}\n},\n\"@babel/generator\": {\n- \"version\": \"7.17.0\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.17.0.tgz\",\n- \"integrity\": \"sha512-I3Omiv6FGOC29dtlZhkfXO6pgkmukJSlT26QjVvS1DGZe/NzSVCPG41X0tS21oZkJYlovfj9qDWgKP+Cn4bXxw==\",\n+ \"version\": \"7.17.3\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.17.3.tgz\",\n+ \"integrity\": \"sha512-+R6Dctil/MgUsZsZAkYgK+ADNSZzJRRy0TvY65T71z/CR854xHQ1EweBYXdfT+HNeN7w0cSJJEzgxZMv40pxsg==\",\n\"requires\": {\n\"@babel/types\": \"^7.17.0\",\n\"jsesc\": \"^2.5.1\",\n}\n},\n\"@babel/parser\": {\n- \"version\": \"7.17.0\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.17.0.tgz\",\n- \"integrity\": \"sha512-VKXSCQx5D8S04ej+Dqsr1CzYvvWgf20jIw2D+YhQCrIlr2UZGaDds23Y0xg75/skOxpLCRpUZvk/1EAVkGoDOw==\"\n+ \"version\": \"7.17.3\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.17.3.tgz\",\n+ \"integrity\": \"sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA==\"\n},\n\"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression\": {\n\"version\": \"7.16.7\",\n}\n},\n\"@babel/plugin-proposal-object-rest-spread\": {\n- \"version\": \"7.16.7\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.16.7.tgz\",\n- \"integrity\": \"sha512-3O0Y4+dw94HA86qSg9IHfyPktgR7q3gpNVAeiKQd+8jBKFaU5NQS1Yatgo4wY+UFNuLjvxcSmzcsHqrhgTyBUA==\",\n+ \"version\": \"7.17.3\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.17.3.tgz\",\n+ \"integrity\": \"sha512-yuL5iQA/TbZn+RGAfxQXfi7CNLmKi1f8zInn4IgobuCWcAb7i+zj4TYzQ9l8cEzVyJ89PDGuqxK1xZpUDISesw==\",\n\"dev\": true,\n\"requires\": {\n- \"@babel/compat-data\": \"^7.16.4\",\n+ \"@babel/compat-data\": \"^7.17.0\",\n\"@babel/helper-compilation-targets\": \"^7.16.7\",\n\"@babel/helper-plugin-utils\": \"^7.16.7\",\n\"@babel/plugin-syntax-object-rest-spread\": \"^7.8.3\",\n}\n},\n\"@babel/plugin-transform-destructuring\": {\n- \"version\": \"7.16.7\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.16.7.tgz\",\n- \"integrity\": \"sha512-VqAwhTHBnu5xBVDCvrvqJbtLUa++qZaWC0Fgr2mqokBlulZARGyIvZDoqbPlPaKImQ9dKAcCzbv+ul//uqu70A==\",\n+ \"version\": \"7.17.3\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.17.3.tgz\",\n+ \"integrity\": \"sha512-dDFzegDYKlPqa72xIlbmSkly5MluLoaC1JswABGktyt6NTXSBcUuse/kWE/wvKFWJHPETpi158qJZFS3JmykJg==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/helper-plugin-utils\": \"^7.16.7\"\n}\n},\n\"@babel/traverse\": {\n- \"version\": \"7.17.0\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.0.tgz\",\n- \"integrity\": \"sha512-fpFIXvqD6kC7c7PUNnZ0Z8cQXlarCLtCUpt2S1Dx7PjoRtCFffvOkHHSom+m5HIxMZn5bIBVb71lhabcmjEsqg==\",\n+ \"version\": \"7.17.3\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz\",\n+ \"integrity\": \"sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==\",\n\"requires\": {\n\"@babel/code-frame\": \"^7.16.7\",\n- \"@babel/generator\": \"^7.17.0\",\n+ \"@babel/generator\": \"^7.17.3\",\n\"@babel/helper-environment-visitor\": \"^7.16.7\",\n\"@babel/helper-function-name\": \"^7.16.7\",\n\"@babel/helper-hoist-variables\": \"^7.16.7\",\n\"@babel/helper-split-export-declaration\": \"^7.16.7\",\n- \"@babel/parser\": \"^7.17.0\",\n+ \"@babel/parser\": \"^7.17.3\",\n\"@babel/types\": \"^7.17.0\",\n\"debug\": \"^4.1.0\",\n\"globals\": \"^11.1.0\"\n}\n},\n\"@jridgewell/resolve-uri\": {\n- \"version\": \"3.0.4\",\n- \"resolved\": \"https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.4.tgz\",\n- \"integrity\": \"sha512-cz8HFjOFfUBtvN+NXYSFMHYRdxZMaEl0XypVrhzxBgadKIXhIkRd8aMeHhmF56Sl7SuS8OnUpQ73/k9LE4VnLg==\"\n+ \"version\": \"3.0.5\",\n+ \"resolved\": \"https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz\",\n+ \"integrity\": \"sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==\"\n},\n\"@jridgewell/sourcemap-codec\": {\n- \"version\": \"1.4.10\",\n- \"resolved\": \"https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.10.tgz\",\n- \"integrity\": \"sha512-Ht8wIW5v165atIX1p+JvKR5ONzUyF4Ac8DZIQ5kZs9zrb6M8SJNXpx1zn04rn65VjBMygRoMXcyYwNK0fT7bEg==\"\n+ \"version\": \"1.4.11\",\n+ \"resolved\": \"https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz\",\n+ \"integrity\": \"sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==\"\n},\n\"@jridgewell/trace-mapping\": {\n\"version\": \"0.3.4\",\n}\n},\n\"@types/estree\": {\n- \"version\": \"0.0.50\",\n- \"resolved\": \"https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz\",\n- \"integrity\": \"sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==\"\n+ \"version\": \"0.0.51\",\n+ \"resolved\": \"https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz\",\n+ \"integrity\": \"sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==\"\n},\n\"@types/express\": {\n\"version\": \"4.17.13\",\n\"integrity\": \"sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==\"\n},\n\"@types/node\": {\n- \"version\": \"17.0.16\",\n- \"resolved\": \"https://registry.npmjs.org/@types/node/-/node-17.0.16.tgz\",\n- \"integrity\": \"sha512-ydLaGVfQOQ6hI1xK2A5nVh8bl0OGoIfYMxPWHqqYe9bTkWCfqiVvZoh2I/QF2sNSkZzZyROBoTefIEI+PB6iIA==\"\n+ \"version\": \"17.0.18\",\n+ \"resolved\": \"https://registry.npmjs.org/@types/node/-/node-17.0.18.tgz\",\n+ \"integrity\": \"sha512-eKj4f/BsN/qcculZiRSujogjvp5O/k4lOW5m35NopjZM/QwLOR075a8pJW5hD+Rtdm2DaCVPENS6KtSQnUD6BA==\"\n},\n\"@types/normalize-package-data\": {\n\"version\": \"2.4.1\",\n}\n},\n\"caniuse-lite\": {\n- \"version\": \"1.0.30001310\",\n- \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001310.tgz\",\n- \"integrity\": \"sha512-cb9xTV8k9HTIUA3GnPUJCk0meUnrHL5gy5QePfDjxHyNBcnzPzrHFv5GqfP7ue5b1ZyzZL0RJboD6hQlPXjhjg==\"\n+ \"version\": \"1.0.30001312\",\n+ \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001312.tgz\",\n+ \"integrity\": \"sha512-Wiz1Psk2MEK0pX3rUzWaunLTZzqS2JYZFzNKqAiJGiuxIjRPLgV6+VDPOg6lQOUxmDwhTlh198JsTTi8Hzw6aQ==\"\n},\n\"capture-exit\": {\n\"version\": \"2.0.0\",\n},\n\"dependencies\": {\n\"@types/node\": {\n- \"version\": \"14.18.10\",\n- \"resolved\": \"https://registry.npmjs.org/@types/node/-/node-14.18.10.tgz\",\n- \"integrity\": \"sha512-6iihJ/Pp5fsFJ/aEDGyvT4pHGmCpq7ToQ/yf4bl5SbVAvwpspYJ+v3jO7n8UyjhQVHTy+KNszOozDdv+O6sovQ==\",\n+ \"version\": \"14.18.12\",\n+ \"resolved\": \"https://registry.npmjs.org/@types/node/-/node-14.18.12.tgz\",\n+ \"integrity\": \"sha512-q4jlIR71hUpWTnGhXWcakgkZeHa3CCjcQcnuzU8M891BAWA2jHiziiWEPEkdS5pFsz7H9HJiy8BrK7tBRNrY7A==\",\n\"dev\": true\n},\n\"ansi-styles\": {\n\"integrity\": \"sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==\"\n},\n\"electron-to-chromium\": {\n- \"version\": \"1.4.67\",\n- \"resolved\": \"https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.67.tgz\",\n- \"integrity\": \"sha512-A6a2jEPLueEDfb7kvh7/E94RKKnIb01qL+4I7RFxtajmo+G9F5Ei7HgY5PRbQ4RDrh6DGDW66P0hD5XI2nRAcg==\"\n+ \"version\": \"1.4.71\",\n+ \"resolved\": \"https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.71.tgz\",\n+ \"integrity\": \"sha512-Hk61vXXKRb2cd3znPE9F+2pLWdIOmP7GjiTj45y6L3W/lO+hSnUSUhq+6lEaERWBdZOHbk2s3YV5c9xVl3boVw==\"\n},\n\"elliptic\": {\n\"version\": \"6.5.4\",\n}\n},\n\"error-stack-parser\": {\n- \"version\": \"2.0.6\",\n- \"resolved\": \"https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.0.6.tgz\",\n- \"integrity\": \"sha512-d51brTeqC+BHlwF0BhPtcYgF5nlzf9ZZ0ZIUQNZpc9ZB9qw5IJ2diTrBY9jlCJkTLITYPjmiX6OWCwH+fuyNgQ==\",\n+ \"version\": \"2.0.7\",\n+ \"resolved\": \"https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.0.7.tgz\",\n+ \"integrity\": \"sha512-chLOW0ZGRf4s8raLrDxa5sdkvPec5YdvwbFnqJme4rk0rFajP8mPtrDL1+I+CwrQDCjswDA5sREX7jYQDQs9vA==\",\n\"requires\": {\n\"stackframe\": \"^1.1.1\"\n}\n}\n},\n\"rxjs\": {\n- \"version\": \"7.5.3\",\n- \"resolved\": \"https://registry.npmjs.org/rxjs/-/rxjs-7.5.3.tgz\",\n- \"integrity\": \"sha512-6162iC/N7L7K8q3UvdOMWix1ju+esADGrDaPrTu5XJmCv69YNdYoUaop/iatN8GHK+YHOdszPP+qygA0yi04zQ==\",\n+ \"version\": \"7.5.4\",\n+ \"resolved\": \"https://registry.npmjs.org/rxjs/-/rxjs-7.5.4.tgz\",\n+ \"integrity\": \"sha512-h5M3Hk78r6wAheJF0a5YahB1yRQKCsZ4MsGdZ5O9ETbVtjPcScGfrMmoOq7EBsCRzd4BDkvDJ7ogP8Sz5tTFiQ==\",\n\"dev\": true,\n\"requires\": {\n\"tslib\": \"^2.1.0\"\n\"integrity\": \"sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=\"\n},\n\"minimatch\": {\n- \"version\": \"3.0.5\",\n- \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz\",\n- \"integrity\": \"sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw==\",\n+ \"version\": \"3.1.2\",\n+ \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz\",\n+ \"integrity\": \"sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==\",\n\"requires\": {\n\"brace-expansion\": \"^1.1.7\"\n}\n\"optional\": true\n},\n\"nanoid\": {\n- \"version\": \"3.2.0\",\n- \"resolved\": \"https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz\",\n- \"integrity\": \"sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==\"\n+ \"version\": \"3.3.0\",\n+ \"resolved\": \"https://registry.npmjs.org/nanoid/-/nanoid-3.3.0.tgz\",\n+ \"integrity\": \"sha512-JzxqqT5u/x+/KOFSd7JP15DOo9nOoHpx6DYatqIHUW2+flybkm+mdcraotSQR5WcnZr+qhGVh8Ted0KdfSMxlg==\"\n},\n\"nanomatch\": {\n\"version\": \"1.2.13\",\n}\n},\n\"postcss-preset-env\": {\n- \"version\": \"6.7.0\",\n- \"resolved\": \"https://registry.npmjs.org/postcss-preset-env/-/postcss-preset-env-6.7.0.tgz\",\n- \"integrity\": \"sha512-eU4/K5xzSFwUFJ8hTdTQzo2RBLbDVt83QZrAvI07TULOkmyQlnYlpwep+2yIK+K+0KlZO4BvFcleOCCcUtwchg==\",\n+ \"version\": \"6.7.1\",\n+ \"resolved\": \"https://registry.npmjs.org/postcss-preset-env/-/postcss-preset-env-6.7.1.tgz\",\n+ \"integrity\": \"sha512-rlRkgX9t0v2On33n7TK8pnkcYOATGQSv48J2RS8GsXhqtg+xk6AummHP88Y5mJo0TLJelBjePvSjScTNkj3+qw==\",\n\"dev\": true,\n\"requires\": {\n\"autoprefixer\": \"^9.6.1\",\n}\n},\n\"rollup\": {\n- \"version\": \"2.67.1\",\n- \"resolved\": \"https://registry.npmjs.org/rollup/-/rollup-2.67.1.tgz\",\n- \"integrity\": \"sha512-1Sbcs4OuW+aD+hhqpIRl+RqooIpF6uQcfzU/QSI7vGkwADY6cM4iLsBGRM2CGLXDTDN5y/yShohFmnKegSPWzg==\",\n+ \"version\": \"2.67.2\",\n+ \"resolved\": \"https://registry.npmjs.org/rollup/-/rollup-2.67.2.tgz\",\n+ \"integrity\": \"sha512-hoEiBWwZtf1QdK3jZIq59L0FJj4Fiv4RplCO4pvCRC86qsoFurWB4hKQIjoRf3WvJmk5UZ9b0y5ton+62fC7Tw==\",\n\"dev\": true,\n\"requires\": {\n\"fsevents\": \"~2.3.2\"\n}\n},\n\"stackframe\": {\n- \"version\": \"1.2.0\",\n- \"resolved\": \"https://registry.npmjs.org/stackframe/-/stackframe-1.2.0.tgz\",\n- \"integrity\": \"sha512-GrdeshiRmS1YLMYgzF16olf2jJ/IzxXY9lhKOskuVziubpTYcYqyOwYeJKzQkwy7uN0fYSsbsC4RQaXf9LCrYA==\"\n+ \"version\": \"1.2.1\",\n+ \"resolved\": \"https://registry.npmjs.org/stackframe/-/stackframe-1.2.1.tgz\",\n+ \"integrity\": \"sha512-h88QkzREN/hy8eRdyNhhsO7RSJ5oyTqxxmmn0dzBIMUclZsjpfmrsg81vp8mjjAs2vAZ72nyWxRUwSwmh0e4xg==\"\n},\n\"static-extend\": {\n\"version\": \"0.1.2\",\n}\n},\n\"url-parse\": {\n- \"version\": \"1.5.4\",\n- \"resolved\": \"https://registry.npmjs.org/url-parse/-/url-parse-1.5.4.tgz\",\n- \"integrity\": \"sha512-ITeAByWWoqutFClc/lRZnFplgXgEZr3WJ6XngMM/N9DMIm4K8zXPCZ1Jdu0rERwO84w1WC5wkle2ubwTA4NTBg==\",\n+ \"version\": \"1.5.6\",\n+ \"resolved\": \"https://registry.npmjs.org/url-parse/-/url-parse-1.5.6.tgz\",\n+ \"integrity\": \"sha512-xj3QdUJ1DttD1LeSfvJlU1eiF1RvBSBfUu8GplFGdUzSO28y5yUtEl7wb//PI4Af6qh0o/K8545vUmucRrfWsw==\",\n\"requires\": {\n\"querystringify\": \"^2.1.1\",\n\"requires-port\": \"^1.0.0\"\n\"dev\": true\n},\n\"webpack\": {\n- \"version\": \"5.68.0\",\n- \"resolved\": \"https://registry.npmjs.org/webpack/-/webpack-5.68.0.tgz\",\n- \"integrity\": \"sha512-zUcqaUO0772UuuW2bzaES2Zjlm/y3kRBQDVFVCge+s2Y8mwuUTdperGaAv65/NtRL/1zanpSJOq/MD8u61vo6g==\",\n+ \"version\": \"5.69.0\",\n+ \"resolved\": \"https://registry.npmjs.org/webpack/-/webpack-5.69.0.tgz\",\n+ \"integrity\": \"sha512-E5Fqu89Gu8fR6vejRqu26h8ld/k6/dCVbeGUcuZjc+goQHDfCPU9rER71JmdtBYGmci7Ec2aFEATQ2IVXKy2wg==\",\n\"requires\": {\n- \"@types/eslint-scope\": \"^3.7.0\",\n- \"@types/estree\": \"^0.0.50\",\n+ \"@types/eslint-scope\": \"^3.7.3\",\n+ \"@types/estree\": \"^0.0.51\",\n\"@webassemblyjs/ast\": \"1.11.1\",\n\"@webassemblyjs/wasm-edit\": \"1.11.1\",\n\"@webassemblyjs/wasm-parser\": \"1.11.1\",\n\"acorn-import-assertions\": \"^1.7.6\",\n\"browserslist\": \"^4.14.5\",\n\"chrome-trace-event\": \"^1.0.2\",\n- \"enhanced-resolve\": \"^5.8.3\",\n+ \"enhanced-resolve\": \"^5.9.0\",\n\"es-module-lexer\": \"^0.9.0\",\n\"eslint-scope\": \"5.1.1\",\n\"events\": \"^3.2.0\",\n},\n\"dependencies\": {\n\"@apideck/better-ajv-errors\": {\n- \"version\": \"0.3.2\",\n- \"resolved\": \"https://registry.npmjs.org/@apideck/better-ajv-errors/-/better-ajv-errors-0.3.2.tgz\",\n- \"integrity\": \"sha512-JdEazx7qiVqTBzzBl5rolRwl5cmhihjfIcpqRzIZjtT6b18liVmDn/VlWpqW4C/qP2hrFFMLRV1wlex8ZVBPTg==\",\n+ \"version\": \"0.3.3\",\n+ \"resolved\": \"https://registry.npmjs.org/@apideck/better-ajv-errors/-/better-ajv-errors-0.3.3.tgz\",\n+ \"integrity\": \"sha512-9o+HO2MbJhJHjDYZaDxJmSDckvDpiuItEsrIShV0DXeCshXWRHhqYyU/PKHMkuClOmFnZhRd6wzv4vpDu/dRKg==\",\n\"dev\": true,\n\"requires\": {\n\"json-schema\": \"^0.4.0\",\n" }, { "change_type": "ADD", "old_path": null, "new_path": "yaml-migrations/m_2022-02-16-api_platform.yaml", "diff": "+# See: https://github.com/bolt/core/pull/3023\n+\n+file: api_platform.yaml\n+since: 5.1.4\n+\n+add:\n+ api_platform:\n+ defaults:\n+ pagination:\n+ client_items_per_page: true\n+ items_per_page_parameter_name: 'pageSize'\n" }, { "change_type": "ADD", "old_path": null, "new_path": "yaml-migrations/m_2022-02-16-api_platform_2.yaml", "diff": "+# See: https://github.com/bolt/core/pull/3023\n+\n+file: api_platform.yaml\n+since: 5.1.4\n+\n+remove:\n+ api_platform:\n+ collection:\n+ pagination:\n+ client_items_per_page: ~\n+ items_per_page_parameter_name: ~\n" }, { "change_type": "ADD", "old_path": null, "new_path": "yaml-migrations/m_2022-02-16-framework.yaml", "diff": "+# See: https://github.com/bolt/core/pull/3023\n+\n+file: framework.yaml\n+since: 5.1.4\n+\n+add:\n+ framework:\n+ session:\n+ storage_factory_id: session.storage.factory.native\n\\ No newline at end of file\n" }, { "change_type": "ADD", "old_path": null, "new_path": "yaml-migrations/m_2022-02-16-security_1.yaml", "diff": "+# See: https://github.com/bolt/core/pull/3023\n+\n+file: security.yaml\n+since: 5.1.4\n+\n+add:\n+ security:\n+ password_hashers:\n+ Bolt\\Entity\\User: auto\n\\ No newline at end of file\n" }, { "change_type": "ADD", "old_path": null, "new_path": "yaml-migrations/m_2022-02-16-security_2.yaml", "diff": "+# See: https://github.com/bolt/core/pull/3023\n+\n+file: security.yaml\n+since: 5.1.4\n+\n+remove:\n+ encoders:\n+ password_hashers:\n+ Bolt\\Entity\\User: auto\n\\ No newline at end of file\n" }, { "change_type": "ADD", "old_path": null, "new_path": "yaml-migrations/m_2022-02-16-services.yaml", "diff": "+# See: https://github.com/bolt/core/pull/3023\n+\n+file: services.yaml\n+since: 5.1.4\n+\n+add:\n+ services:\n+ Symfony\\Component\\DependencyInjection\\ContainerInterface: '@service_container'\n" } ]
PHP
MIT License
bolt/core
Refactoring deprecations in Symfony 5 -> 6
95,144
17.02.2022 16:26:47
-3,600
9e24e1c40ae37ecb8ea80d028cad87c97a75f8db
Fix custom homepage setting: allow singular ContentType slugs
[ { "change_type": "MODIFY", "old_path": "src/Controller/Frontend/HomepageController.php", "new_path": "src/Controller/Frontend/HomepageController.php", "diff": "@@ -29,7 +29,7 @@ class HomepageController extends TwigAwareController implements FrontendZoneInte\n}\n$homepageTokens = explode('/', $homepage);\n- $contentType = $this->config->get('contenttypes/' . $homepageTokens[0]);\n+ $contentType = $this->config->getContentType($homepageTokens[0]);\nif (! $contentType) {\n$message = sprintf('Homepage is set to `%s`, but that ContentType is not defined', $homepage);\n" } ]
PHP
MIT License
bolt/core
Fix custom homepage setting: allow singular ContentType slugs
95,115
20.02.2022 14:43:42
-3,600
c7c33e50392f6dabacf8c54990dec7a793f12e87
added seconds to dateFormat to fix issue with date-compare between database original and edited version
[ { "change_type": "MODIFY", "old_path": "assets/js/app/editor/Components/Date.vue", "new_path": "assets/js/app/editor/Components/Date.vue", "diff": "@@ -105,7 +105,7 @@ export default {\nwrap: true,\naltFormat: 'F j, Y',\naltInput: true,\n- dateFormat: 'Y-m-d H:i',\n+ dateFormat: 'Y-m-d H:i:S',\nenableTime: false,\n},\n};\n" } ]
PHP
MIT License
bolt/core
added seconds to dateFormat to fix issue with date-compare between database original and edited version
95,191
25.02.2022 11:25:19
-3,600
b7cdac6ad8bc92bc240ae14f3fe44462cd545e6c
Update cypress tests so it retries on failure For more info see:
[ { "change_type": "MODIFY", "old_path": "tests/cypress/cypress-ci.json", "new_path": "tests/cypress/cypress-ci.json", "diff": "\"supportFile\": \"tests/cypress/support/index.js\",\n\"baseUrl\": \"http://127.0.0.1:8088\",\n\"projectId\": \"54gs3j\",\n- \"defaultCommandTimeout\": 8000\n+ \"defaultCommandTimeout\": 8000,\n+ \"retries\": 3\n}\n" }, { "change_type": "MODIFY", "old_path": "tests/cypress/cypress-dev.json", "new_path": "tests/cypress/cypress-dev.json", "diff": "\"supportFile\": \"tests/cypress/support/index.js\",\n\"baseUrl\": \"https://127.0.0.1:8001\",\n\"viewportWidth\": 1920,\n- \"viewportHeight\": 1080\n+ \"viewportHeight\": 1080,\n+ \"retries\": 3\n}\n" } ]
PHP
MIT License
bolt/core
Update cypress tests so it retries on failure For more info see: https://docs.cypress.io/guides/guides/test-retries#Global-Configuration
95,191
25.02.2022 11:41:21
-3,600
3bc24c223fe4b09a44ccc8f45480fc554922fcfd
Only need 2 retries
[ { "change_type": "MODIFY", "old_path": "tests/cypress/cypress-ci.json", "new_path": "tests/cypress/cypress-ci.json", "diff": "\"baseUrl\": \"http://127.0.0.1:8088\",\n\"projectId\": \"54gs3j\",\n\"defaultCommandTimeout\": 8000,\n- \"retries\": 3\n+ \"retries\": 2\n}\n" }, { "change_type": "MODIFY", "old_path": "tests/cypress/cypress-dev.json", "new_path": "tests/cypress/cypress-dev.json", "diff": "\"baseUrl\": \"https://127.0.0.1:8001\",\n\"viewportWidth\": 1920,\n\"viewportHeight\": 1080,\n- \"retries\": 3\n+ \"retries\": 2\n}\n" } ]
PHP
MIT License
bolt/core
Only need 2 retries
95,115
25.02.2022 21:23:30
-3,600
ca14fdd6c7eb3e8aebce9b3db5c6661b197084f3
update tests to include seconds for date/datetime field
[ { "change_type": "MODIFY", "old_path": "tests/cypress/integration/edit_record_1_field.spec.js", "new_path": "tests/cypress/integration/edit_record_1_field.spec.js", "diff": "@@ -96,7 +96,7 @@ describe('As an Admin I want to be able to make use of the date & datetime field\ncy.get('.flatpickr-calendar.open input.cur-year').type('2019');\ncy.get('.flatpickr-calendar.open span[aria-label=\"March 15, 2019\"]').click();\n- cy.get('input[name=\"fields[date]\"]').should('have.value', '2019-03-15 00:00');\n+ cy.get('input[name=\"fields[date]\"]').should('have.value', '2019-03-15 00:00:00');\n})\nit('checks if an admin can use the datetime field with an AM time (with AM/PM selector)', () => {\n@@ -119,7 +119,7 @@ describe('As an Admin I want to be able to make use of the date & datetime field\n});\ncy.get('.flatpickr-calendar.open span[aria-label=\"May 10, 2020\"]').click();\n- cy.get('input[name=\"fields[datetime]\"]').should('have.value', '2020-05-10 11:30');\n+ cy.get('input[name=\"fields[datetime]\"]').should('have.value', '2020-05-10 11:30:00');\n})\nit('checks if an admin can use the datetime field with a PM time (with AM/PM selector)', () => {\n@@ -142,7 +142,7 @@ describe('As an Admin I want to be able to make use of the date & datetime field\n});\ncy.get('.flatpickr-calendar.open span[aria-label=\"July 20, 2020\"]').click();\n- cy.get('input[name=\"fields[datetime]\"]').should('have.value', '2020-07-20 22:30');\n+ cy.get('input[name=\"fields[datetime]\"]').should('have.value', '2020-07-20 22:30:00');\n})\nit('checks if an admin can use the datetime field with an AM time (without AM/PM selector)', () => {\n@@ -159,7 +159,7 @@ describe('As an Admin I want to be able to make use of the date & datetime field\ncy.get('.flatpickr-calendar.open input.flatpickr-minute').type('15');\ncy.get('.flatpickr-calendar.open span[aria-label=\"janvier 28, 2020\"]').click();\n- cy.get('input[name=\"fields[datetime]\"]').should('have.value', '2020-01-28 10:15');\n+ cy.get('input[name=\"fields[datetime]\"]').should('have.value', '2020-01-28 10:15:00');\n})\nit('checks if an admin can use the datetime field with a PM time (without AM/PM selector)', () => {\n@@ -176,6 +176,6 @@ describe('As an Admin I want to be able to make use of the date & datetime field\ncy.get('.flatpickr-calendar.open input.flatpickr-minute').type('30');\ncy.get('.flatpickr-calendar.open span[aria-label=\"juillet 20, 2020\"]').click();\n- cy.get('input[name=\"fields[datetime]\"]').should('have.value', '2020-07-20 22:30');\n+ cy.get('input[name=\"fields[datetime]\"]').should('have.value', '2020-07-20 22:30:00');\n})\n});\n" } ]
PHP
MIT License
bolt/core
update tests to include seconds for date/datetime field
95,117
02.03.2022 11:49:03
-3,600
b5741d4c4615233aec9d8d4abc0dd95105b516f7
fix wrong copy paste in comments
[ { "change_type": "MODIFY", "old_path": "config/bolt/config.yaml", "new_path": "config/bolt/config.yaml", "diff": "@@ -99,7 +99,7 @@ forbidden: [ blocks/403-forbidden, 'helpers/page_403.html.twig' ]\n# handled, and you'll have a bad time debugging it!\ninternal_server_error: [ 'helpers/page_500.html.twig' ]\n-# The default template and amount of records to use for listing-pages on the\n+# The default template for record-pages on the\n# site.\n#\n# Can be overridden for each content type and for each record, if it has a\n" } ]
PHP
MIT License
bolt/core
fix wrong copy paste in comments
95,200
03.03.2022 16:03:17
-3,600
4d7b2f1cfad77a1c702582287a5e2bb368041490
Add map to htaccess Web inspectors return a 403 error because css source maps were not allowed access Add map filetype solves this.
[ { "change_type": "MODIFY", "old_path": "public/.htaccess", "new_path": "public/.htaccess", "diff": "@@ -49,7 +49,7 @@ DirectoryIndex index.php\nRewriteRule ^index\\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]\n# Deny access to any files in the theme folder, except for the listed extensions.\n- RewriteRule theme\\/.+\\.(?!(html?|css|js|jpe?g|png|gif|svg|pdf|avif|webp|mp3|mp?4a?v?|woff2?|txt|ico|zip|tgz|otf|ttf|eot|woff|woff2)$)[^\\.]+?$ - [F]\n+ RewriteRule theme\\/.+\\.(?!(html?|css|map|js|jpe?g|png|gif|svg|pdf|avif|webp|mp3|mp?4a?v?|woff2?|txt|ico|zip|tgz|otf|ttf|eot|woff|woff2)$)[^\\.]+?$ - [F]\n# If the requested filename exists, simply serve it.\n# We only want to let Apache serve files and not directories.\n" } ]
PHP
MIT License
bolt/core
Add map to htaccess Web inspectors return a 403 error because css source maps were not allowed access Add map filetype solves this.
95,144
03.03.2022 16:56:26
-3,600
9967bff022b32a3cbfeddd3d2efe3af626350c41
Tiny fix, as per PHPStan
[ { "change_type": "MODIFY", "old_path": "src/Form/LoginType.php", "new_path": "src/Form/LoginType.php", "diff": "@@ -68,7 +68,7 @@ class LoginType extends AbstractType\n$builder->add('remember_me', CheckboxType::class, [\n'label' => 'label.remembermeduration',\n'label_translation_parameters' => [\n- '%duration%' => 0 + sprintf('%0.1f', $this->rememberLifetime / 3600 / 24),\n+ '%duration%' => (int) sprintf('%0.1f', $this->rememberLifetime / 3600 / 24),\n],\n'required' => false,\n'attr' => [\n" } ]
PHP
MIT License
bolt/core
Tiny fix, as per PHPStan
95,144
04.03.2022 12:52:01
-3,600
b100943a3f752d2468b71494459ca6f77a5c68f3
Set `api:get:` to `PUBLIC_ACCESS` for public access to the read-endpoint of the API
[ { "change_type": "MODIFY", "old_path": "config/bolt/permissions.yaml", "new_path": "config/bolt/permissions.yaml", "diff": "@@ -48,7 +48,7 @@ global:\nlist_files:config: [ ROLE_ADMIN ] # should probably not be used?\nlist_files:files: [ ROLE_EDITOR ] # get list of files (images?) available for use as site-content\nlist_files:themes: [ ROLE_ADMIN ] # should probably not be used?\n- api:get: [ ROLE_WEBSERVICE ] # allow read access to Bolt's RESTful and GraphQL API\n+ api:get: [ PUBLIC_ACCESS ] # allow read access to Bolt's RESTful and GraphQL API\napi:post: [ ROLE_WEBSERVICE ] # allow write access to Bolt's RESTful and GraphQL API\napi:delete: [ ROLE_WEBSERVICE ] # allow delete access to Bolt's RESTful and GraphQL API\n" } ]
PHP
MIT License
bolt/core
Set `api:get:` to `PUBLIC_ACCESS` for public access to the read-endpoint of the API
95,123
11.03.2022 12:34:04
-3,600
32ca88e58750c7f6fdb878ecf26b7d1c63293c36
Fix : Select field with empty value
[ { "change_type": "MODIFY", "old_path": "src/Entity/Field.php", "new_path": "src/Entity/Field.php", "diff": "@@ -464,12 +464,12 @@ class Field implements FieldInterface, TranslatableInterface\n*/\npublic static function settingsAllowEmpty(?bool $allowEmpty, ?bool $required): bool\n{\n- if (!is_null($allowEmpty)) {\n- return boolval($allowEmpty);\n+ if (null !== $allowEmpty) {\n+ return $allowEmpty;\n}\n- if (!is_null($required)) {\n- return !boolval($required);\n+ if (null !== $required) {\n+ return !$required;\n}\nreturn true;\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/FieldExtension.php", "new_path": "src/Twig/FieldExtension.php", "diff": "@@ -267,9 +267,7 @@ class FieldExtension extends AbstractExtension\n];\n}\n- if (! empty($field->getDefinition()->get('limit'))) {\n- $maxAmount = $field->getDefinition()->get('limit');\n- } else {\n+ if (empty($maxAmount = $field->getDefinition()->get('limit'))) {\n$maxAmount = $this->config->get('general/maximum_listing_select', 200);\n}\n@@ -280,7 +278,7 @@ class FieldExtension extends AbstractExtension\n'order' => $order,\n];\n- $options = $this->selectOptionsHelper($contentTypeSlug, $params, $field, $format);\n+ $options = array_merge($options, $this->selectOptionsHelper($contentTypeSlug, $params, $field, $format));\nreturn new Collection($options);\n}\n" } ]
PHP
MIT License
bolt/core
Fix #3106 : Select field with empty value
95,144
13.03.2022 14:40:04
-3,600
dea12e65d3d0abb017d30dd4c8eeaf5ec33d30b0
Fix YAML migrations
[ { "change_type": "MODIFY", "old_path": "config/services.yaml", "new_path": "config/services.yaml", "diff": "@@ -93,8 +93,6 @@ services:\nmethod: createAdminMenu\nalias: admin_menu # The alias is what is used to retrieve the menu\n- Symfony\\Bridge\\Twig\\Extension\\AssetExtension: '@twig.extension.assets'\n-\nBolt\\Cache\\RelatedOptionsUtilityCacher:\ndecorates: Bolt\\Utils\\RelatedOptionsUtility\n@@ -145,6 +143,10 @@ services:\nmethod: processRecord\nname: monolog.processor\n+ Symfony\\Bridge\\Twig\\Extension\\AssetExtension: '@twig.extension.assets'\n+\n+ Symfony\\Component\\DependencyInjection\\ContainerInterface: '@service_container'\n+\nSymfony\\Component\\ErrorHandler\\ErrorRenderer\\ErrorRendererInterface: '@error_handler.error_renderer.html'\nSquirrel\\TwigPhpSyntax\\PhpSyntaxExtension: ~\n@@ -169,4 +171,3 @@ services:\nBolt\\Api\\ContentDataPersister:\ndecorates: 'api_platform.doctrine.orm.data_persister'\n- Symfony\\Component\\DependencyInjection\\ContainerInterface: '@service_container'\n" }, { "change_type": "MODIFY", "old_path": "yaml-migrations/m_2022-02-16-api_platform.yaml", "new_path": "yaml-migrations/m_2022-02-16-api_platform.yaml", "diff": "# See: https://github.com/bolt/core/pull/3023\n-file: api_platform.yaml\n+file: packages/api_platform.yaml\nsince: 5.1.4\nadd:\n" }, { "change_type": "MODIFY", "old_path": "yaml-migrations/m_2022-02-16-api_platform_2.yaml", "new_path": "yaml-migrations/m_2022-02-16-api_platform_2.yaml", "diff": "# See: https://github.com/bolt/core/pull/3023\n-file: api_platform.yaml\n+file: packages/api_platform.yaml\nsince: 5.1.4\nremove:\n" }, { "change_type": "MODIFY", "old_path": "yaml-migrations/m_2022-02-16-framework.yaml", "new_path": "yaml-migrations/m_2022-02-16-framework.yaml", "diff": "# See: https://github.com/bolt/core/pull/3023\n-file: framework.yaml\n+file: packages/framework.yaml\nsince: 5.1.4\nadd:\n" }, { "change_type": "MODIFY", "old_path": "yaml-migrations/m_2022-02-16-security_1.yaml", "new_path": "yaml-migrations/m_2022-02-16-security_1.yaml", "diff": "# See: https://github.com/bolt/core/pull/3023\n-file: security.yaml\n+file: packages/security.yaml\nsince: 5.1.4\nadd:\n" }, { "change_type": "MODIFY", "old_path": "yaml-migrations/m_2022-02-16-security_2.yaml", "new_path": "yaml-migrations/m_2022-02-16-security_2.yaml", "diff": "# See: https://github.com/bolt/core/pull/3023\n-file: security.yaml\n+file: packages/security.yaml\nsince: 5.1.4\nremove:\n" } ]
PHP
MIT License
bolt/core
Fix YAML migrations
95,144
13.03.2022 15:22:06
-3,600
c11b6105613c3ae9b48c38247daeaf13a78c2ef6
Update m_2022-02-16-security_2.yaml
[ { "change_type": "MODIFY", "old_path": "yaml-migrations/m_2022-02-16-security_2.yaml", "new_path": "yaml-migrations/m_2022-02-16-security_2.yaml", "diff": "@@ -6,4 +6,4 @@ since: 5.1.4\nremove:\nencoders:\npassword_hashers:\n- Bolt\\Entity\\User: auto\n\\ No newline at end of file\n+ Bolt\\Entity\\User: ~\n\\ No newline at end of file\n" } ]
PHP
MIT License
bolt/core
Update m_2022-02-16-security_2.yaml
95,144
14.03.2022 15:06:37
-3,600
80fcc62479838a847c68087a0478500ab51d0412
Bugfix: verify setting correct tags for caching works correctly
[ { "change_type": "MODIFY", "old_path": "src/Cache/CachingTrait.php", "new_path": "src/Cache/CachingTrait.php", "diff": "@@ -53,6 +53,10 @@ trait CachingTrait\npublic function setCacheTags(array $tags): void\n{\n+ foreach ($tags as $key => $tag) {\n+ $tags[$key] = preg_replace('~[^\\pL\\d,]+~u', '-', $tag);\n+ }\n+\n$this->cacheTags = $tags;\n}\n" } ]
PHP
MIT License
bolt/core
Bugfix: verify setting correct tags for caching works correctly
95,144
14.03.2022 15:18:44
-3,600
deca3ef819d05e8e2537afeefc5d552c9795ac39
Better regexing
[ { "change_type": "MODIFY", "old_path": "src/Cache/CachingTrait.php", "new_path": "src/Cache/CachingTrait.php", "diff": "@@ -54,7 +54,7 @@ trait CachingTrait\npublic function setCacheTags(array $tags): void\n{\nforeach ($tags as $key => $tag) {\n- $tags[$key] = preg_replace('~[^\\pL\\d,]+~u', '-', $tag);\n+ $tags[$key] = preg_replace('/[^\\pL\\d,]+/u', '', $tag);\n}\n$this->cacheTags = $tags;\n" }, { "change_type": "MODIFY", "old_path": "src/Cache/SelectOptionsCacher.php", "new_path": "src/Cache/SelectOptionsCacher.php", "diff": "@@ -14,8 +14,22 @@ class SelectOptionsCacher extends FieldExtension implements CachingInterface\npublic function selectOptionsHelper(string $contentTypeSlug, array $params, Field $field, string $format): array\n{\n$this->setCacheKey([$contentTypeSlug, $format] + $params);\n- $this->setCacheTags([$contentTypeSlug]);\n+ $this->setCacheTags($this->getTags($contentTypeSlug));\nreturn $this->execute([parent::class, __FUNCTION__], [$contentTypeSlug, $params, $field, $format]);\n}\n+\n+ /**\n+ * Make sure something like `(pages,entries)` becomes an array like ['pages', 'entries']\n+ */\n+ private function getTags(string $contentTypeSlug): array\n+ {\n+ $tags = explode(',', $contentTypeSlug);\n+\n+ $tags = array_map(function($t) {\n+ return preg_replace('/[^\\pL\\d,]+/u', '', $t);\n+ }, $tags);\n+\n+ return $tags;\n+ }\n}\n" } ]
PHP
MIT License
bolt/core
Better regexing
95,191
15.03.2022 14:04:19
-3,600
7ab2374834b6075e51131a845b51e336808b4c8d
Update float field so it uses step='any' This way you don't have a fixed amount of numbers after the comma
[ { "change_type": "MODIFY", "old_path": "assets/js/app/editor/Components/Number.vue", "new_path": "assets/js/app/editor/Components/Number.vue", "diff": "@@ -26,7 +26,7 @@ export default {\nid: String,\nvalue: String,\nname: String,\n- step: Number,\n+ step: Number | String,\ntype: String,\ndisabled: Boolean,\nrequired: Boolean,\n" }, { "change_type": "MODIFY", "old_path": "templates/_partials/fields/number.html.twig", "new_path": "templates/_partials/fields/number.html.twig", "diff": "{% elseif not step|default %}\n{# default step values #}\n{% if mode == 'float' %}\n- {% set step = 0.5 %}\n+ {% set step = \"'any'\" %}\n{% elseif mode == 'integer' %}\n{% set step = 1 %}\n{% else %}\n" } ]
PHP
MIT License
bolt/core
Update float field so it uses step='any' This way you don't have a fixed amount of numbers after the comma
95,127
25.02.2022 18:14:59
-7,200
fd0aadc0d39457ccf6aef0773a9c90ce657f0740
Add helper to render a themed twig template.
[ { "change_type": "MODIFY", "old_path": "src/Controller/TwigAwareController.php", "new_path": "src/Controller/TwigAwareController.php", "diff": "@@ -87,26 +87,7 @@ class TwigAwareController extends AbstractController\n$parameters['theme'] = $this->config->get('theme');\n}\n- $this->setThemePackage();\n- $this->setTwigLoader();\n-\n- // Resolve string|array of templates into the first one that is found.\n- if (is_array($template)) {\n- $templates = (new Collection($template))\n- ->map(function ($element): ?string {\n- if ($element instanceof TemplateselectField) {\n- return $element->__toString();\n- }\n-\n- return $element;\n- })\n- ->filter()\n- ->toArray();\n- $template = $this->twig->resolveTemplate($templates);\n- }\n-\n- // Render the template\n- $content = $this->twig->render($template, $parameters);\n+ $content = $this->renderTemplate($template, $parameters);\n// Make sure we have a Response\nif ($response === null) {\n@@ -224,6 +205,32 @@ class TwigAwareController extends AbstractController\n$this->packages->addPackage('files', $filesPackage);\n}\n+ /**\n+ * Renders a template, with theme support.\n+ */\n+ public function renderTemplate($template, array $parameters = []): string\n+ {\n+ $this->setThemePackage();\n+ $this->setTwigLoader();\n+\n+ // Resolve string|array of templates into the first one that is found.\n+ if (is_array($template)) {\n+ $templates = (new Collection($template))\n+ ->map(function ($element): ?string {\n+ if ($element instanceof TemplateselectField) {\n+ return $element->__toString();\n+ }\n+\n+ return $element;\n+ })\n+ ->filter()\n+ ->toArray();\n+ $template = $this->twig->resolveTemplate($templates);\n+ }\n+\n+ return $this->twig->render($template, $parameters);\n+ }\n+\npublic function createPager(Query $query, string $contentType, int $pageSize, string $order)\n{\n$params = [\n" } ]
PHP
MIT License
bolt/core
Add helper to render a themed twig template. (cherry picked from commit 248d1741730ecb3844799c24bdd88287618d6593)
95,127
25.02.2022 09:00:19
-7,200
ddfd49c14b93578f3e0f1faa4c53fe5b5f2a168d
Move reset email build to separate method.
[ { "change_type": "MODIFY", "old_path": "src/Controller/Backend/ResetPasswordController.php", "new_path": "src/Controller/Backend/ResetPasswordController.php", "diff": "@@ -15,6 +15,7 @@ use Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\Response;\nuse Symfony\\Component\\Mailer\\MailerInterface;\nuse Symfony\\Component\\Mime\\Address;\n+use Symfony\\Component\\Mime\\Email;\nuse Symfony\\Component\\PasswordHasher\\Hasher\\UserPasswordHasherInterface;\nuse Symfony\\Component\\Routing\\Annotation\\Route;\nuse Symfony\\Contracts\\Translation\\TranslatorInterface;\n@@ -146,7 +147,7 @@ class ResetPasswordController extends AbstractController\n]);\n}\n- private function processSendingPasswordResetEmail(string $emailFormData, MailerInterface $mailer): RedirectResponse\n+ protected function processSendingPasswordResetEmail(string $emailFormData, MailerInterface $mailer): RedirectResponse\n{\n$user = $this->getDoctrine()->getRepository(User::class)->findOneBy([\n'email' => $emailFormData,\n@@ -180,7 +181,16 @@ class ResetPasswordController extends AbstractController\nreturn $this->redirectToRoute('bolt_check_email');\n}\n- $email = (new TemplatedEmail())\n+ $email = $this->buildResetEmail($config, $user, $resetToken);\n+\n+ $mailer->send($email);\n+\n+ return $this->redirectToRoute('bolt_check_email');\n+ }\n+\n+ protected function buildResetEmail($config, $user, $resetToken): Email\n+ {\n+ return (new TemplatedEmail())\n->from(new Address($config['mail_from'], $config['mail_name']))\n->to($user->getEmail())\n->subject($config['mail_subject'])\n@@ -189,9 +199,5 @@ class ResetPasswordController extends AbstractController\n'resetToken' => $resetToken,\n'tokenLifetime' => $this->resetPasswordHelper->getTokenLifetime(),\n]);\n-\n- $mailer->send($email);\n-\n- return $this->redirectToRoute('bolt_check_email');\n}\n}\n" } ]
PHP
MIT License
bolt/core
Move reset email build to separate method.
95,127
28.02.2022 12:30:30
-7,200
eb3f40eef8d261d2859a2f5fedc0f88a237f9c02
Use existing translation.
[ { "change_type": "MODIFY", "old_path": "src/Controller/Backend/ResetPasswordController.php", "new_path": "src/Controller/Backend/ResetPasswordController.php", "diff": "@@ -109,7 +109,7 @@ class ResetPasswordController extends AbstractController\n$user = $this->resetPasswordHelper->validateTokenAndFetchUser($token);\n} catch (ResetPasswordExceptionInterface $e) {\n$this->addFlash('reset_password_error', sprintf(\n- 'There was a problem validating your reset request - %s',\n+ $this->translator->trans('reset_password.problem_with_request'),\n$e->getReason()\n));\n" } ]
PHP
MIT License
bolt/core
Use existing translation.
95,127
28.02.2022 22:55:11
-7,200
b329e9247f4b90f3bfbe8efd9d1a9314ec031688
Allow overriding security templates.
[ { "change_type": "MODIFY", "old_path": "src/Controller/Backend/AuthenticationController.php", "new_path": "src/Controller/Backend/AuthenticationController.php", "diff": "@@ -35,7 +35,9 @@ class AuthenticationController extends TwigAwareController implements BackendZon\n// last authentication error (if any)\n$error = $authenticationUtils->getLastAuthenticationError();\n- return $this->render('@bolt/security/login.html.twig', [\n+ $templates = $this->templateChooser->forLogin();\n+\n+ return $this->render($templates, [\n'error' => $error,\n'loginForm' => $form->createView(),\n]);\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/Backend/ResetPasswordController.php", "new_path": "src/Controller/Backend/ResetPasswordController.php", "diff": "@@ -5,11 +5,11 @@ declare(strict_types=1);\nnamespace Bolt\\Controller\\Backend;\nuse Bolt\\Configuration\\Config;\n+use Bolt\\Controller\\TwigAwareController;\nuse Bolt\\Entity\\User;\nuse Bolt\\Form\\ChangePasswordFormType;\nuse Bolt\\Form\\ResetPasswordRequestFormType;\nuse Symfony\\Bridge\\Twig\\Mime\\TemplatedEmail;\n-use Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController;\nuse Symfony\\Component\\HttpFoundation\\RedirectResponse;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\Response;\n@@ -26,16 +26,13 @@ use SymfonyCasts\\Bundle\\ResetPassword\\ResetPasswordHelperInterface;\n/**\n* @Route(\"/reset-password\")\n*/\n-class ResetPasswordController extends AbstractController\n+class ResetPasswordController extends TwigAwareController\n{\nuse ResetPasswordControllerTrait;\n/** @var ResetPasswordHelperInterface */\nprivate $resetPasswordHelper;\n- /** @var Config */\n- private $config;\n-\n/** @var TranslatorInterface */\nprivate $translator;\n@@ -63,7 +60,9 @@ class ResetPasswordController extends AbstractController\n);\n}\n- return $this->render('reset_password/request.html.twig', [\n+ $templates = $this->templateChooser->forResetPasswordRequest();\n+\n+ return $this->render($templates, [\n'requestForm' => $form->createView(),\n]);\n}\n@@ -80,7 +79,9 @@ class ResetPasswordController extends AbstractController\nreturn $this->redirectToRoute('bolt_forgot_password_request');\n}\n- return $this->render('reset_password/check_email.html.twig', [\n+ $templates = $this->templateChooser->forResetPasswordCheckEmail();\n+\n+ return $this->render($templates, [\n'tokenLifetime' => $this->resetPasswordHelper->getTokenLifetime(),\n]);\n}\n@@ -142,7 +143,9 @@ class ResetPasswordController extends AbstractController\nreturn $this->redirectToRoute('bolt_login');\n}\n- return $this->render('reset_password/reset.html.twig', [\n+ $templates = $this->templateChooser->forResetPasswordReset();\n+\n+ return $this->render($templates, [\n'resetForm' => $form->createView(),\n]);\n}\n" }, { "change_type": "MODIFY", "old_path": "src/TemplateChooser.php", "new_path": "src/TemplateChooser.php", "diff": "@@ -164,4 +164,68 @@ class TemplateChooser\nreturn $templates->unique()->filter()->toArray();\n}\n+\n+ public function forLogin(): array\n+ {\n+ $templates = new Collection();\n+\n+ // First candidate: Theme-specific config.\n+ $templates->push($this->config->get('theme/login_template'));\n+\n+ // Second candidate: global config.\n+ $templates->push($this->config->get('general/login_template'));\n+\n+ // Third candidate: default value.\n+ $templates->push('@bolt/security/login.html.twig');\n+\n+ return $templates->unique()->filter()->toArray();\n+ }\n+\n+ public function forResetPasswordCheckEmail(): array\n+ {\n+ $templates = new Collection();\n+\n+ // First candidate: Theme-specific config.\n+ $templates->push($this->config->get('theme/reset_password/check_email_template'));\n+\n+ // Second candidate: global config.\n+ $templates->push($this->config->get('general/reset_password/check_email_template'));\n+\n+ // Third candidate: default value.\n+ $templates->push('@bolt/reset_password/check_email.html.twig');\n+\n+ return $templates->unique()->filter()->toArray();\n+ }\n+\n+ public function forResetPasswordRequest(): array\n+ {\n+ $templates = new Collection();\n+\n+ // First candidate: Theme-specific config.\n+ $templates->push($this->config->get('theme/reset_password/request_template'));\n+\n+ // Second candidate: global config.\n+ $templates->push($this->config->get('general/reset_password/request_template'));\n+\n+ // Third candidate: default value.\n+ $templates->push('@bolt/reset_password/request.html.twig');\n+\n+ return $templates->unique()->filter()->toArray();\n+ }\n+\n+ public function forResetPasswordReset(): array\n+ {\n+ $templates = new Collection();\n+\n+ // First candidate: Theme-specific config.\n+ $templates->push($this->config->get('theme/reset_password/reset_template'));\n+\n+ // Second candidate: global config.\n+ $templates->push($this->config->get('general/reset_password/reset_template'));\n+\n+ // Third candidate: default value.\n+ $templates->push('@bolt/reset_password/reset.html.twig');\n+\n+ return $templates->unique()->filter()->toArray();\n+ }\n}\n" } ]
PHP
MIT License
bolt/core
Allow overriding security templates.
95,127
03.03.2022 11:04:49
-7,200
16362bc84d513ac2dbcc6c7680b249a35b0e5475
Throw exception if content type doesn't contain field.
[ { "change_type": "MODIFY", "old_path": "src/Controller/Backend/ContentEditController.php", "new_path": "src/Controller/Backend/ContentEditController.php", "diff": "@@ -476,6 +476,10 @@ class ContentEditController extends TwigAwareController implements BackendZoneIn\n$definition = empty($fieldDefinition) ? $content->getDefinition()->get('fields')->get($fieldName) : $fieldDefinition;\n+ if (empty($definition)) {\n+ throw new \\Exception(\"Content type `{$content->getContentType()}` doesn't have field `{$fieldName}`.\");\n+ }\n+\nif ($content->hasField($fieldName)) {\n$field = $content->getField($fieldName);\n}\n" } ]
PHP
MIT License
bolt/core
Throw exception if content type doesn't contain field.
95,127
03.03.2022 17:42:02
-7,200
418ed5700fbaa20b88b5ccfb917a6877fa5fbe01
Translate login required message.
[ { "change_type": "MODIFY", "old_path": "src/Security/AuthenticationEntryPointRedirector.php", "new_path": "src/Security/AuthenticationEntryPointRedirector.php", "diff": "@@ -7,20 +7,24 @@ use Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface;\nuse Symfony\\Component\\Security\\Core\\Exception\\AuthenticationException;\nuse Symfony\\Component\\Security\\Http\\EntryPoint\\AuthenticationEntryPointInterface;\n+use Symfony\\Contracts\\Translation\\TranslatorInterface;\nclass AuthenticationEntryPointRedirector implements AuthenticationEntryPointInterface\n{\n+ private $translator;\n+\nprivate $urlGenerator;\n- public function __construct(UrlGeneratorInterface $urlGenerator)\n+ public function __construct(TranslatorInterface $translator, UrlGeneratorInterface $urlGenerator)\n{\n+ $this->translator = $translator;\n$this->urlGenerator = $urlGenerator;\n}\npublic function start(Request $request, AuthenticationException $authException = null)\n{\n// add a custom flash message and redirect to the login page\n- $request->getSession()->getFlashBag()->add('warning', 'You have to login in order to access this page.');\n+ $request->getSession()->getFlashBag()->add('warning', $this->translator->trans('You have to login in order to access this page.', [], 'security'));\nreturn new RedirectResponse($this->urlGenerator->generate('bolt_login'));\n}\n" }, { "change_type": "MODIFY", "old_path": "translations/messages.en.xlf", "new_path": "translations/messages.en.xlf", "diff": "<target>Upload Options</target>\n</segment>\n</unit>\n- <unit id=\"NF.vvAN\" name=\"You have to login in order to access this page.\">\n- <segment>\n- <source>You have to login in order to access this page.</source>\n- <target>You have to login in order to access this page.</target>\n- </segment>\n- </unit>\n<unit id=\"hKmDb7q\" name=\"Share secure preview link\">\n<segment>\n<source>Share secure preview link</source>\n" }, { "change_type": "MODIFY", "old_path": "translations/security.en.xlf", "new_path": "translations/security.en.xlf", "diff": "<target>User is disabled.</target>\n</segment>\n</unit>\n+ <unit id=\"NF.vvAN\" name=\"You have to login in order to access this page.\">\n+ <segment>\n+ <source>You have to login in order to access this page.</source>\n+ <target>You have to login in order to access this page.</target>\n+ </segment>\n+ </unit>\n</file>\n</xliff>\n" } ]
PHP
MIT License
bolt/core
Translate login required message.
95,127
04.03.2022 05:51:06
-7,200
c9021030cbcc5c41eb425abd4e16262e1731b4aa
Use correct URL paths in Admin toolbar.
[ { "change_type": "MODIFY", "old_path": "assets/js/app/toolbar/Components/Toolbar.vue", "new_path": "assets/js/app/toolbar/Components/Toolbar.vue", "diff": "</div>\n<div v-if=\"isImpersonator\" class=\"toolbar-impersonation\">\n- <a :href=\"backendPrefix + '?_switch_user=_exit'\" class=\"btn btn-warning\">\n+ <a :href=\"urlPaths['bolt_dashboard'] + '?_switch_user=_exit'\" class=\"btn btn-warning\">\n<i class=\"fas fa-sign-out-alt fa-fw\"></i>\n{{ labels['action.stop_impersonating'] }}\n</a>\n<a href=\"/\" target=\"_blank\"> <i class=\"fas fa-sign-out-alt\"></i>{{ labels['action.view_site'] }} </a>\n</div>\n- <form :action=\"backendPrefix\" class=\"toolbar-item toolbar-item__filter input-group\">\n+ <form :action=\"urlPaths['bolt_dashboard']\" class=\"toolbar-item toolbar-item__filter input-group\">\n<label for=\"global-search\" class=\"sr-only\">{{ labels['general.label.search'] }}</label>\n<input\nid=\"global-search\"\n<div class=\"profile__dropdown dropdown-menu dropdown-menu-right\">\n<ul>\n<li>\n- <a :href=\"backendPrefix + 'profile-edit'\">\n+ <a :href=\"urlPaths['bolt_profile_edit']\">\n<i class=\"fas fa-user-edit fa-fw\"></i>\n{{ labels['action.edit_profile'] }}\n</a>\n</li>\n<li>\n- <a :href=\"backendPrefix + 'logout'\">\n+ <a :href=\"urlPaths['bolt_logout']\">\n<i class=\"fas fa-sign-out-alt fa-fw\"></i>\n{{ labels['action.logout'] }}\n</a>\n@@ -95,6 +95,7 @@ export default {\nsiteName: String,\nmenu: Array,\nlabels: Object,\n+ urlPaths: Object,\nbackendPrefix: String,\nisImpersonator: Boolean,\nfilterValue: String,\n" }, { "change_type": "MODIFY", "old_path": "templates/_base/layout.html.twig", "new_path": "templates/_base/layout.html.twig", "diff": "'general.label.search': 'general.label.search'|trans,\n}|json_encode %}\n+ {% set url_paths = {\n+ 'bolt_dashboard': path('bolt_dashboard'),\n+ 'bolt_logout': path('bolt_logout'),\n+ 'bolt_profile_edit': path('bolt_profile_edit'),\n+ }|json_encode %}\n+\n<admin-toolbar\nsite-name=\"{{ config.get('general/sitename') }}\"\n:menu=\"{{ admin_menu_json }}\"\n:labels=\"{{ labels }}\"\n+ :url-paths=\"{{ url_paths }}\"\nbackend-prefix=\"{{ path('bolt_dashboard') }}\"\n:avatar=\"{{ user_avatar|json_encode }}\"\n:is-impersonator=\"{{ is_granted('IS_IMPERSONATOR')|json_encode }}\"\n" } ]
PHP
MIT License
bolt/core
Use correct URL paths in Admin toolbar.
95,127
04.03.2022 06:50:09
-7,200
a6644f09e4a3e0745da9d4df054f53170ee46855
After determining field value, restore original current locale.
[ { "change_type": "MODIFY", "old_path": "src/Entity/Field.php", "new_path": "src/Entity/Field.php", "diff": "@@ -199,12 +199,15 @@ class Field implements FieldInterface, TranslatableInterface\n$result = [];\n+ $currentLocale = $this->getCurrentLocale();\nforeach ($this->getTranslations() as $translation) {\n$locale = $translation->getLocale();\n$this->setCurrentLocale($locale);\n$value = $this->getParsedValue();\n$result[$locale] = $value;\n}\n+ // restore current locale\n+ $this->setCurrentLocale($currentLocale);\nreturn $result;\n}\n" } ]
PHP
MIT License
bolt/core
After determining field value, restore original current locale.
95,127
10.03.2022 22:22:19
-7,200
2a46b5b59ad6deb833f7507dcffed13ced1fd818
ResetPasswordRequestFormType: Specify label and placeholder.
[ { "change_type": "MODIFY", "old_path": "src/Form/ResetPasswordRequestFormType.php", "new_path": "src/Form/ResetPasswordRequestFormType.php", "diff": "@@ -25,11 +25,15 @@ class ResetPasswordRequestFormType extends AbstractType\n{\n$builder\n->add('email', EmailType::class, [\n+ 'label' => 'label.email',\n'constraints' => [\nnew NotBlank([\n'message' => $this->translator->trans('form.empty_email'),\n]),\n],\n+ 'attr' => [\n+ 'placeholder' => $this->translator->trans('placeholder.email'),\n+ ],\n])\n;\n}\n" }, { "change_type": "MODIFY", "old_path": "translations/messages.en.xlf", "new_path": "translations/messages.en.xlf", "diff": "<target>Order</target>\n</segment>\n</unit>\n+ <unit id=\"0\" name=\"placeholder.email\">\n+ <segment>\n+ <source>placeholder.email</source>\n+ <target>your email</target>\n+ </segment>\n+ </unit>\n</file>\n</xliff>\n" } ]
PHP
MIT License
bolt/core
ResetPasswordRequestFormType: Specify label and placeholder.
95,127
10.03.2022 22:22:46
-7,200
c9701cfb3704d9f3bba4f94454297b55e5f0281d
Put reset password templates under existing reset_password_settings group.
[ { "change_type": "MODIFY", "old_path": "src/TemplateChooser.php", "new_path": "src/TemplateChooser.php", "diff": "@@ -186,10 +186,10 @@ class TemplateChooser\n$templates = new Collection();\n// First candidate: Theme-specific config.\n- $templates->push($this->config->get('theme/reset_password/check_email_template'));\n+ $templates->push($this->config->get('theme/reset_password_settings/check_email_template'));\n// Second candidate: global config.\n- $templates->push($this->config->get('general/reset_password/check_email_template'));\n+ $templates->push($this->config->get('general/reset_password_settings/check_email_template'));\n// Third candidate: default value.\n$templates->push('@bolt/reset_password/check_email.html.twig');\n@@ -202,10 +202,10 @@ class TemplateChooser\n$templates = new Collection();\n// First candidate: Theme-specific config.\n- $templates->push($this->config->get('theme/reset_password/request_template'));\n+ $templates->push($this->config->get('theme/reset_password_settings/request_template'));\n// Second candidate: global config.\n- $templates->push($this->config->get('general/reset_password/request_template'));\n+ $templates->push($this->config->get('general/reset_password_settings/request_template'));\n// Third candidate: default value.\n$templates->push('@bolt/reset_password/request.html.twig');\n@@ -218,10 +218,10 @@ class TemplateChooser\n$templates = new Collection();\n// First candidate: Theme-specific config.\n- $templates->push($this->config->get('theme/reset_password/reset_template'));\n+ $templates->push($this->config->get('theme/reset_password_settings/reset_template'));\n// Second candidate: global config.\n- $templates->push($this->config->get('general/reset_password/reset_template'));\n+ $templates->push($this->config->get('general/reset_password_settings/reset_template'));\n// Third candidate: default value.\n$templates->push('@bolt/reset_password/reset.html.twig');\n" } ]
PHP
MIT License
bolt/core
Put reset password templates under existing reset_password_settings group.
95,127
14.03.2022 09:40:58
-7,200
c14e01f251fdba0055992db4bfec7304fab0ffdc
Translate reset password errors.
[ { "change_type": "MODIFY", "old_path": "src/Controller/Backend/ResetPasswordController.php", "new_path": "src/Controller/Backend/ResetPasswordController.php", "diff": "@@ -111,7 +111,7 @@ class ResetPasswordController extends TwigAwareController\n} catch (ResetPasswordExceptionInterface $e) {\n$this->addFlash('reset_password_error', sprintf(\n$this->translator->trans('reset_password.problem_with_request'),\n- $e->getReason()\n+ $this->translator->trans($e->getReason())\n));\nreturn $this->redirectToRoute('bolt_forgot_password_request');\n@@ -177,7 +177,7 @@ class ResetPasswordController extends TwigAwareController\nif ($config['show_already_requested_password_notice']) {\n$this->addFlash('reset_password_error', sprintf(\n$this->translator->trans('reset_password.problem_with_request'),\n- $e->getReason()\n+ $this->translator->trans($e->getReason())\n));\n}\n" } ]
PHP
MIT License
bolt/core
Translate reset password errors.
95,127
19.03.2022 11:53:27
-7,200
eed64ddbc4a7faca65212c9878c3dbf4cfdf42b9
Use requestStack to access current request when needed.
[ { "change_type": "MODIFY", "old_path": "src/Canonical.php", "new_path": "src/Canonical.php", "diff": "@@ -24,7 +24,7 @@ class Canonical\nprivate $urlGenerator;\n/** @var Request */\n- private $request;\n+ private $request = null;\n/** @var string */\nprivate $scheme = null;\n@@ -44,27 +44,39 @@ class Canonical\n/** @var RouterInterface */\nprivate $router;\n+ /** @var RequestStack */\n+ private $requestStack;\n+\npublic function __construct(Config $config, UrlGeneratorInterface $urlGenerator, RequestStack $requestStack, RouterInterface $router, string $defaultLocale)\n{\n$this->config = $config;\n$this->urlGenerator = $urlGenerator;\n- $this->request = $requestStack->getCurrentRequest() ?? Request::createFromGlobals();\n$this->defaultLocale = $defaultLocale;\n$this->router = $router;\n+ $this->requestStack = $requestStack;\n+ }\n+ public function getRequest(): Request\n+ {\n+ // always try to use current request\n+ if ($this->request === null) {\n+ $this->request = $this->requestStack->getCurrentRequest() ?? Request::createFromGlobals();\n$this->init();\n}\n+ return $this->request;\n+ }\n+\npublic function init(): void\n{\n// Ensure in request cycle (even for override).\n- if ($this->request === null || $this->request->getHost() === '') {\n+ if ($this->getRequest() === null || $this->getRequest()->getHost() === '') {\nreturn;\n}\n- $requestUrl = parse_url($this->request->getSchemeAndHttpHost());\n+ $requestUrl = parse_url($this->getRequest()->getSchemeAndHttpHost());\n- $configCanonical = (string) $this->config->get('general/canonical', $this->request->getSchemeAndHttpHost());\n+ $configCanonical = (string) $this->config->get('general/canonical', $this->getRequest()->getSchemeAndHttpHost());\nif (mb_strpos($configCanonical, 'http') !== 0) {\n$configCanonical = $requestUrl['scheme'] . '://' . $configCanonical;\n@@ -83,7 +95,7 @@ class Canonical\npublic function get(?string $route = null, array $params = [], bool $absolute = true): ?string\n{\n// Ensure request has been matched\n- if (! $this->request->attributes->get('_route')) {\n+ if (! $this->getRequest()->attributes->get('_route')) {\nreturn null;\n}\n@@ -153,8 +165,8 @@ class Canonical\npublic function getPath(): string\n{\nif ($this->path === null) {\n- $route = $this->request->attributes->get('_route');\n- $params = $this->request->attributes->get('_route_params');\n+ $route = $this->getRequest()->attributes->get('_route');\n+ $params = $this->getRequest()->attributes->get('_route_params');\n$this->path = $this->generateLink($route, $params, false);\n}\n@@ -164,10 +176,10 @@ class Canonical\npublic function setPath(?string $route = null, array $params = []): void\n{\n- if (! $route && ! $this->request->attributes->has('_route')) {\n+ if (! $route && ! $this->getRequest()->attributes->has('_route')) {\nreturn;\n} elseif (! $route) {\n- $route = $this->request->attributes->get('_route');\n+ $route = $this->getRequest()->attributes->get('_route');\n}\n$this->path = $this->generateLink($route, $params, false);\n@@ -207,7 +219,7 @@ class Canonical\n);\n} catch (InvalidParameterException | MissingMandatoryParametersException | RouteNotFoundException | \\TypeError $e) {\n// Just use the current URL /shrug\n- return $canonical ? $this->request->getUri() : $this->request->getPathInfo();\n+ return $canonical ? $this->getRequest()->getUri() : $this->getRequest()->getPathInfo();\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "src/Menu/FrontendMenu.php", "new_path": "src/Menu/FrontendMenu.php", "diff": "@@ -21,29 +21,29 @@ final class FrontendMenu implements FrontendMenuBuilderInterface\n/** @var FrontendMenuBuilder */\nprivate $menuBuilder;\n- /** @var Request */\n- private $request;\n-\n/** @var Stopwatch */\nprivate $stopwatch;\n/** @var Config */\nprivate $config;\n+ /** @var RequestStack */\n+ private $requestStack;\n+\npublic function __construct(FrontendMenuBuilder $menuBuilder, TagAwareCacheInterface $cache, RequestStack $requestStack, Stopwatch $stopwatch, Config $config)\n{\n$this->cache = $cache;\n$this->menuBuilder = $menuBuilder;\n- $this->request = $requestStack->getCurrentRequest();\n$this->stopwatch = $stopwatch;\n$this->config = $config;\n+ $this->requestStack = $requestStack;\n}\npublic function buildMenu(Environment $twig, ?string $name = null): array\n{\n$this->stopwatch->start('bolt.frontendMenu');\n- $key = 'bolt.frontendMenu_' . ($name ?: 'main') . '_' . $this->request->getLocale();\n+ $key = 'bolt.frontendMenu_' . ($name ?: 'main') . '_' . $this->requestStack->getCurrentRequest()->getLocale();\n$menu = $this->cache->get($key, function (ItemInterface $item) use ($name, $twig) {\n$item->expiresAfter($this->config->get('general/caching/frontend_menu'));\n" } ]
PHP
MIT License
bolt/core
Use requestStack to access current request when needed.
95,127
19.03.2022 13:08:17
-7,200
188f126538c1f2b8787dffa70ece8881d1e30663
Must listen to kernel event for guaranteed proper setup.
[ { "change_type": "ADD", "old_path": null, "new_path": "src/Event/Subscriber/CanonicalSubscriber.php", "diff": "+<?php\n+\n+namespace Bolt\\Event\\Subscriber;\n+\n+use Bolt\\Canonical;\n+use Symfony\\Component\\EventDispatcher\\EventSubscriberInterface;\n+use Symfony\\Component\\HttpKernel\\Event\\RequestEvent;\n+use Symfony\\Component\\HttpKernel\\KernelEvents;\n+\n+class CanonicalSubscriber implements EventSubscriberInterface\n+{\n+ private $canonical;\n+\n+ public function __construct(Canonical $canonical)\n+ {\n+ $this->canonical = $canonical;\n+ }\n+\n+ public function onKernelRequest(RequestEvent $event)\n+ {\n+ // ensure initialization with real request\n+ $this->canonical->getRequest();\n+ }\n+\n+ public static function getSubscribedEvents(): array\n+ {\n+ return [\n+ KernelEvents::REQUEST => [\n+ ['onKernelRequest', 0],\n+ ],\n+ ];\n+ }\n+}\n" } ]
PHP
MIT License
bolt/core
Must listen to kernel event for guaranteed proper setup.
95,127
20.03.2022 11:52:39
-7,200
7fe24b03cb9c8ff2ce20006e3849db59828067bd
Ditch init(). Use request setter for clarity.
[ { "change_type": "MODIFY", "old_path": "src/Canonical.php", "new_path": "src/Canonical.php", "diff": "@@ -58,23 +58,29 @@ class Canonical\npublic function getRequest(): Request\n{\n- // always try to use current request\nif ($this->request === null) {\n- $this->request = $this->requestStack->getCurrentRequest() ?? Request::createFromGlobals();\n- $this->init();\n+ // Use default value.\n+ $this->setRequest();\n}\nreturn $this->request;\n}\n- public function init(): void\n+ public function setRequest(?Request $request = null): void\n{\n- // Ensure in request cycle (even for override).\n- if ($this->getRequest() === null || $this->getRequest()->getHost() === '') {\n+ // Default to current request (if any).\n+ if ($request === null) {\n+ $request = $this->requestStack->getCurrentRequest() ?? Request::createFromGlobals();\n+ }\n+\n+ $this->request = $request;\n+\n+ // Nothing to do if request is empty.\n+ if ($this->request === null || $this->request->getHost() === '') {\nreturn;\n}\n- $requestUrl = parse_url($this->getRequest()->getSchemeAndHttpHost());\n+ $requestUrl = parse_url($this->request->getSchemeAndHttpHost());\n$configCanonical = (string) $this->config->get('general/canonical', $this->getRequest()->getSchemeAndHttpHost());\n" } ]
PHP
MIT License
bolt/core
Ditch init(). Use request setter for clarity.
95,156
21.03.2022 14:17:06
0
a86b9ae3e1fe7a19aed254dfef8096e962b737a3
use routing to create the link to the content type overview for items on the dashboard
[ { "change_type": "MODIFY", "old_path": "assets/js/version.js", "new_path": "assets/js/version.js", "diff": "// generated by genversion\n-export const version = '5.1.3';\n+export const version = '5.1.4';\n" }, { "change_type": "MODIFY", "old_path": "package-lock.json", "new_path": "package-lock.json", "diff": "{\n\"name\": \"bolt\",\n- \"version\": \"5.1.3\",\n+ \"version\": \"5.1.4\",\n\"lockfileVersion\": 2,\n\"requires\": true,\n\"packages\": {\n\"\": {\n\"name\": \"bolt\",\n- \"version\": \"5.1.3\",\n+ \"version\": \"5.1.4\",\n\"license\": \"MIT\",\n\"dependencies\": {\n\"@vue/cli-service\": \"^4.5.13\",\n" }, { "change_type": "MODIFY", "old_path": "src/Entity/ContentExtrasTrait.php", "new_path": "src/Entity/ContentExtrasTrait.php", "diff": "@@ -43,6 +43,7 @@ trait ContentExtrasTrait\n'name' => $this->getDefinition()->get('name'),\n'singular_name' => $this->getDefinition()->get('singular_name'),\n'feature' => $this->contentExtension->getSpecialFeature($content),\n+ 'contentTypeOverviewLink' => $this->contentExtension->getContentTypeOverviewLink($content),\n]);\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/ContentExtension.php", "new_path": "src/Twig/ContentExtension.php", "diff": "@@ -393,6 +393,15 @@ class ContentExtension extends AbstractExtension\nreturn null;\n}\n+ public function getContentTypeOverviewLink(?Content $content): ?string\n+ {\n+ if (! $content instanceof Content || $content->getId() === null || ! $this->security->getUser() || ! $this->security->isGranted(ContentVoter::CONTENT_VIEW, $content)) {\n+ return null;\n+ }\n+\n+ return $this->generateLink('bolt_content_overview', ['contentType' => $content->getContentType()]);\n+ }\n+\npublic function getEditLink(?Content $content): ?string\n{\nif (! $content instanceof Content || $content->getId() === null || ! $this->security->getUser() || ! $this->security->isGranted(ContentVoter::CONTENT_EDIT, $content)) {\n" } ]
PHP
MIT License
bolt/core
#3128 use routing to create the link to the content type overview for items on the dashboard
95,115
23.03.2022 22:30:37
-3,600
593eb0acfc2171810f25f98f6d692e4390f7452c
handle 'double wrapped' database connections, this fix is needed when runing tests using dama/doctrine-test-bundle db-rollback support
[ { "change_type": "MODIFY", "old_path": "src/Doctrine/Version.php", "new_path": "src/Doctrine/Version.php", "diff": "@@ -26,11 +26,29 @@ class Version\n$this->tablePrefix = Str::ensureEndsWith($tablePrefix, '_');\n}\n+ /**\n+ * @throws \\Exception\n+ */\npublic function getPlatform(): array\n{\n- /** @var PDOConnection $wrapped */\n$wrapped = $this->connection->getWrappedConnection();\n+ // if the wrapped connection has itself a wrapped connection, use that one, etc.\n+ // This is the case in phpunit tests that use the dama/doctrine-test-bundle functionality\n+ while (true) {\n+ if (method_exists($wrapped, 'getWrappedConnection')) {\n+ $nextLevel = $wrapped->getWrappedConnection();\n+ if ($nextLevel) {\n+ $wrapped = $nextLevel;\n+ } else {\n+ break;\n+ }\n+ } else {\n+ break;\n+ }\n+ }\n+\n+ if ($wrapped instanceof \\PDO) {\n[$client_version] = explode(' - ', $wrapped->getAttribute(\\PDO::ATTR_CLIENT_VERSION));\ntry {\n@@ -47,6 +65,9 @@ class Version\n];\n}\n+ throw new \\Exception(\"Wrapped connection is not an instanceof \\PDO\");\n+ }\n+\npublic function tableContentExists(): bool\n{\ntry {\n" } ]
PHP
MIT License
bolt/core
handle 'double wrapped' database connections, this fix is needed when runing tests using dama/doctrine-test-bundle db-rollback support
95,144
24.03.2022 09:12:46
-3,600
08e6ecc80af30ca6ce5c73be4b57b1d6b1a38ab0
Remove unused method Fixes thanks
[ { "change_type": "MODIFY", "old_path": "src/Repository/FieldRepository.php", "new_path": "src/Repository/FieldRepository.php", "diff": "@@ -123,18 +123,6 @@ class FieldRepository extends ServiceEntityRepository\nreturn $field;\n}\n- public function findParents(Field $field)\n- {\n- $qb = $this->getQueryBuilder();\n-\n- return $qb\n- ->andWhere('field.parent = :parentId')\n- ->setParameter('parentId', $field->getId())\n- ->orderBy('field.sortorder', 'ASC')\n- ->getQuery()\n- ->getResult();\n- }\n-\npublic static function getFieldClassname(string $type): ?string\n{\n// The classname we want\n" } ]
PHP
MIT License
bolt/core
Remove unused method Fixes #3140, thanks @simongroenewolt
95,115
24.03.2022 23:59:43
-3,600
86ed2971de51160b2d8005237c57e9cc24ff8d9a
move postLoad code from FieldFillListener.php to ContentFillListener.php
[ { "change_type": "MODIFY", "old_path": "config/bolt/contenttypes.yaml", "new_path": "config/bolt/contenttypes.yaml", "diff": "@@ -439,18 +439,6 @@ tests:\nlisting_records: 10\n# This contenttype is here to use for (automated) tests.\n-simpletests:\n- name: simpletests\n- singular_name: Simple Test\n- title_format: \"{id}: {title}\"\n- fields:\n- title:\n- type: text\n- default: \"Title of a test contenttype\"\n- slug:\n- type: slug\n-\n-\ncomplexnestedtype:\nname: complexnestedtype\nsingular_name: complexnestedtype\n" }, { "change_type": "MODIFY", "old_path": "config/services.yaml", "new_path": "config/services.yaml", "diff": "@@ -64,7 +64,6 @@ services:\nBolt\\Event\\Listener\\FieldFillListener:\ntags:\n- - { name: doctrine.event_listener, event: postLoad }\n- { name: doctrine.event_listener, event: preUpdate }\nBolt\\Event\\Listener\\FieldDiscriminatorListener:\n" }, { "change_type": "MODIFY", "old_path": "src/Event/Listener/ContentFillListener.php", "new_path": "src/Event/Listener/ContentFillListener.php", "diff": "@@ -5,8 +5,11 @@ declare(strict_types=1);\nnamespace Bolt\\Event\\Listener;\nuse Bolt\\Configuration\\Config;\n+use Bolt\\Configuration\\Content\\FieldType;\nuse Bolt\\Entity\\Content;\nuse Bolt\\Entity\\Field;\n+use Bolt\\Entity\\Field\\CollectionField;\n+use Bolt\\Entity\\Field\\SetField;\nuse Bolt\\Entity\\User;\nuse Bolt\\Enum\\Statuses;\nuse Bolt\\Repository\\FieldRepository;\n@@ -28,12 +31,16 @@ class ContentFillListener\n/** @var FieldRepository */\nprivate $fieldRepository;\n- public function __construct(Config $config, ContentExtension $contentExtension, UserRepository $users, FieldRepository $fieldRepository)\n+ /** @var string */\n+ private $defaultLocale;\n+\n+ public function __construct(Config $config, ContentExtension $contentExtension, UserRepository $users, FieldRepository $fieldRepository, string $defaultLocale)\n{\n$this->config = $config;\n$this->contentExtension = $contentExtension;\n$this->users = $users;\n$this->fieldRepository = $fieldRepository;\n+ $this->defaultLocale = $defaultLocale;\n}\npublic function preUpdate(LifeCycleEventArgs $args): void\n@@ -68,6 +75,20 @@ class ContentFillListener\nif ($entity instanceof Content) {\n$this->fillContent($entity);\n+\n+ foreach ($entity->getRawFields() as $rawField) {\n+ if ($rawField instanceof Field) {\n+ $this->fillField($rawField);\n+ }\n+\n+ if ($rawField instanceof CollectionField) {\n+ $this->fillCollection($rawField);\n+ }\n+\n+ if ($rawField instanceof SetField) {\n+ $this->fillSet($rawField);\n+ }\n+ }\n}\n}\n@@ -156,4 +177,47 @@ class ContentFillListener\nreturn $slug . $separator . '1';\n}\n+\n+ public function fillField(Field $field): void\n+ {\n+ // Fill in the definition of the field\n+ $parents = $this->getParents($field);\n+ $contentDefinition = $field->getContent()->getDefinition();\n+ $field->setDefinition($field->getName(), FieldType::factory($field->getName(), $contentDefinition, $parents));\n+ $field->setDefaultLocale($this->defaultLocale);\n+\n+ $field->setUseDefaultLocale($this->config->get('general/localization')->get('fallback_when_missing'));\n+ }\n+\n+ private function getParents(Field $field): array\n+ {\n+ $parents = [];\n+\n+ if ($field->hasParent()) {\n+ $parents = $this->getParents($field->getParent());\n+ $parents[] = $field->getParent()->getName();\n+ }\n+\n+ return $parents;\n+ }\n+\n+ public function fillSet(SetField $entity): void\n+ {\n+ $fields = $this->fieldRepository->findAllByParent($entity);\n+ $entity->setValue($fields);\n+ }\n+\n+ public function fillCollection(CollectionField $entity): void\n+ {\n+ $fields = $this->intersectFieldsAndDefinition($this->fieldRepository->findAllByParent($entity), $entity->getDefinition());\n+ $entity->setValue($fields);\n+ }\n+\n+ private function intersectFieldsAndDefinition(array $fields, FieldType $definition): array\n+ {\n+ return\n+ collect($fields)->filter(function (Field $field) use ($definition) {\n+ return $definition->get('fields') && $definition->get('fields')->has($field->getName());\n+ })->values()->toArray();\n+ }\n}\n" }, { "change_type": "MODIFY", "old_path": "src/Event/Listener/FieldFillListener.php", "new_path": "src/Event/Listener/FieldFillListener.php", "diff": "@@ -4,44 +4,22 @@ declare(strict_types=1);\nnamespace Bolt\\Event\\Listener;\n-use Bolt\\Configuration\\Config;\n-use Bolt\\Configuration\\Content\\FieldType;\n-use Bolt\\Entity\\Content;\nuse Bolt\\Entity\\Field;\n-use Bolt\\Entity\\Field\\CollectionField;\nuse Bolt\\Entity\\Field\\RawPersistable;\n-use Bolt\\Entity\\Field\\SetField;\nuse Bolt\\Entity\\FieldInterface;\nuse Bolt\\Entity\\FieldTranslation;\n-use Bolt\\Repository\\FieldRepository;\nuse Bolt\\Utils\\Sanitiser;\nuse Doctrine\\ORM\\Event\\LifecycleEventArgs;\nuse Twig\\Markup;\nclass FieldFillListener\n{\n- /** @var FieldRepository */\n- private $fields;\n-\n- /** @var ContentFillListener */\n- private $cfl;\n-\n/** @var Sanitiser */\nprivate $sanitiser;\n- /** @var string */\n- private $defaultLocale;\n-\n- /** @var Config */\n- private $config;\n-\n- public function __construct(FieldRepository $fields, ContentFillListener $cfl, Sanitiser $sanitiser, string $defaultLocale, Config $config)\n+ public function __construct(Sanitiser $sanitiser)\n{\n- $this->fields = $fields;\n- $this->cfl = $cfl;\n$this->sanitiser = $sanitiser;\n- $this->defaultLocale = $defaultLocale;\n- $this->config = $config;\n}\npublic function preUpdate(LifecycleEventArgs $args): void\n@@ -89,106 +67,4 @@ class FieldFillListener\n{\nreturn preg_replace('/([{}])[\\x{200B}-\\x{200D}\\x{FEFF}]([{}])/u', '$1$2', $string);\n}\n-\n- public function postLoad(LifecycleEventArgs $args): void\n- {\n- $entity = $args->getEntity();\n-\n-// Disable indivitual 'filling' of fields\n-//\n-// if ($entity instanceof Field) {\n-// $this->fillField($entity);\n-// }\n-//\n-// if ($entity instanceof CollectionField) {\n-// $this->fillCollection($entity);\n-// }\n-//\n-// if ($entity instanceof SetField) {\n-// $this->fillSet($entity);\n-// }\n-\n-// instead only fill once, when content entity has been loaded\n-// note this functionality probably should be moved to the ContentFillListener, then the\n-// FieldFillListener can simply be removed. (However, note that the config-checker package will complain!)\n- if ($entity instanceof Content) {\n- foreach ($entity->getRawFields() as $rawField) {\n- if ($rawField instanceof Field) {\n- $this->fillField($rawField);\n- }\n-\n- if ($rawField instanceof CollectionField) {\n- $this->fillCollection($rawField);\n- }\n-\n- if ($rawField instanceof SetField) {\n- $this->fillSet($rawField);\n- }\n- }\n- }\n-\n-//\n-// Comment the 3 ifs above, and uncomment code below to fix initialization of selects\n-//\n-\n-// if ($entity instanceof Content) {\n-// foreach ($entity->getRawFields() as $rawField) {\n-// if ($rawField instanceof Field) {\n-// $this->fillField($rawField);\n-// }\n-//\n-// if ($rawField instanceof CollectionField) {\n-// $this->fillCollection($rawField);\n-// }\n-//\n-// if ($rawField instanceof SetField) {\n-// $this->fillSet($rawField);\n-// }\n-// }\n-// }\n- }\n-\n- public function fillField(Field $field): void\n- {\n- // Fill in the definition of the field\n- $parents = $this->getParents($field);\n- $this->cfl->fillContent($field->getContent());\n- $contentDefinition = $field->getContent()->getDefinition();\n- $field->setDefinition($field->getName(), FieldType::factory($field->getName(), $contentDefinition, $parents));\n- $field->setDefaultLocale($this->defaultLocale);\n-\n- $field->setUseDefaultLocale($this->config->get('general/localization')->get('fallback_when_missing'));\n- }\n-\n- private function getParents(Field $field): array\n- {\n- $parents = [];\n-\n- if ($field->hasParent()) {\n- $parents = $this->getParents($field->getParent());\n- $parents[] = $field->getParent()->getName();\n- }\n-\n- return $parents;\n- }\n-\n- public function fillSet(SetField $entity): void\n- {\n- $fields = $this->fields->findAllByParent($entity);\n- $entity->setValue($fields);\n- }\n-\n- public function fillCollection(CollectionField $entity): void\n- {\n- $fields = $this->intersectFieldsAndDefinition($this->fields->findAllByParent($entity), $entity->getDefinition());\n- $entity->setValue($fields);\n- }\n-\n- private function intersectFieldsAndDefinition(array $fields, FieldType $definition): array\n- {\n- return\n- collect($fields)->filter(function (Field $field) use ($definition) {\n- return $definition->get('fields') && $definition->get('fields')->has($field->getName());\n- })->values()->toArray();\n- }\n}\n" }, { "change_type": "MODIFY", "old_path": "tests/php/Configuration/Parser/ContentTypesParserTest.php", "new_path": "tests/php/Configuration/Parser/ContentTypesParserTest.php", "diff": "@@ -70,7 +70,7 @@ class ContentTypesParserTest extends ParserTestBase\n$contentTypesParser = new ContentTypesParser($this->getProjectDir(), $generalParser->parse(), self::DEFAULT_LOCALE, self::ALLOWED_LOCALES);\n$config = $contentTypesParser->parse();\n- $this->assertCount(7, $config);\n+ $this->assertCount(8, $config);\n$this->assertArrayHasKey('homepage', $config);\n$this->assertCount(self::AMOUNT_OF_ATTRIBUTES_IN_CONTENT_TYPE, $config['homepage']);\n" } ]
PHP
MIT License
bolt/core
move postLoad code from FieldFillListener.php to ContentFillListener.php
95,115
25.03.2022 00:02:32
-3,600
22fa5f3d8e9421cc067c14d0de0cdf25684bf13d
trigger test (I hope)
[ { "change_type": "MODIFY", "old_path": "src/Event/Listener/ContentFillListener.php", "new_path": "src/Event/Listener/ContentFillListener.php", "diff": "@@ -34,7 +34,8 @@ class ContentFillListener\n/** @var string */\nprivate $defaultLocale;\n- public function __construct(Config $config, ContentExtension $contentExtension, UserRepository $users, FieldRepository $fieldRepository, string $defaultLocale)\n+ public function __construct(Config $config, ContentExtension $contentExtension,\n+ UserRepository $users, FieldRepository $fieldRepository, string $defaultLocale)\n{\n$this->config = $config;\n$this->contentExtension = $contentExtension;\n" } ]
PHP
MIT License
bolt/core
trigger test (I hope)
95,122
25.03.2022 10:08:19
-3,600
b0287f7ceca7864e258b2911da37807648b09a24
Multiple EntityManagers prefixes Update TablePrefix.php Update TablePrefixTrait.php
[ { "change_type": "MODIFY", "old_path": "src/Doctrine/TablePrefix.php", "new_path": "src/Doctrine/TablePrefix.php", "diff": "@@ -19,7 +19,8 @@ class TablePrefix\npublic function loadClassMetadata(LoadClassMetadataEventArgs $eventArgs): void\n{\n- if ($tablePrefix = $this->getTablePrefix()) {\n+ $entityManager = $eventArgs->getEntityManager();\n+ if ($tablePrefix = $this->getTablePrefix($entityManager)) {\n$classMetadata = $eventArgs->getClassMetadata();\nif (! $classMetadata->isInheritanceTypeSingleTable()\n" }, { "change_type": "MODIFY", "old_path": "src/Doctrine/TablePrefixTrait.php", "new_path": "src/Doctrine/TablePrefixTrait.php", "diff": "@@ -24,7 +24,7 @@ trait TablePrefixTrait\nprotected function setTablePrefix(ObjectManager $manager, string $prefix)\n{\n$key = spl_object_hash($manager);\n- $this->tablePrefixes[$key] = Str::ensureEndsWith($prefix, '_');\n+ $this->tablePrefixes[$key] = empty($prefix) ? '' : Str::ensureEndsWith($prefix, '_');\nreturn $this;\n}\n@@ -46,14 +46,10 @@ trait TablePrefixTrait\nreturn $this;\n}\n- /**\n- * Since we introduced `symfony/proxy-manager-bridge`, the keys in the tableprefix\n- * no longer match what the manager tells us it should be. For example, the\n- * given key was `0000000005ee10ad0000000043b453e3`, but in our reference\n- * table we had `0000000005ee10e90000000043b453e3`. We just return the first one, now\n- */\n- protected function getTablePrefix(): string\n+ protected function getTablePrefix(ObjectManager $manager): string\n{\n- return current($this->tablePrefixes);\n+ $key = spl_object_hash($manager);\n+\n+ return $this->tablePrefixes[$key] ?? '';\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "src/Doctrine/Version.php", "new_path": "src/Doctrine/Version.php", "diff": "@@ -23,6 +23,7 @@ class Version\npublic function __construct(Connection $connection, string $tablePrefix = 'bolt')\n{\n$this->connection = $connection;\n+ $tablePrefix = is_array($tablePrefix) ? $tablePrefix['default'] : $tablePrefix;\n$this->tablePrefix = Str::ensureEndsWith($tablePrefix, '_');\n}\n" } ]
PHP
MIT License
bolt/core
Multiple EntityManagers prefixes Update TablePrefix.php Update TablePrefixTrait.php
95,144
25.03.2022 17:16:51
-3,600
a38c926853719a0cb239c159808ea50f0f9ffca6
Adding cache decorator for Formatter
[ { "change_type": "MODIFY", "old_path": "config/bolt/config.yaml", "new_path": "config/bolt/config.yaml", "diff": "@@ -9,13 +9,23 @@ secret: '%env(APP_SECRET)%'\n# Set the caching configuration for various areas of Bolt.\n# The expires_after is counted in seconds.\n+#caching:\n+# related_options: 60\n+# canonical: 60\n+# formatter: 60\n+# selectoptions: 60\n+# content_array: 60\n+# frontend_menu: 60\n+# backend_menu: 60\n+\ncaching:\n- related_options: 1800\n- canonical: 10\n- selectoptions: 1800\n- content_array: 1800\n- frontend_menu: 3600\n- backend_menu: 1800\n+ related_options: ~\n+ canonical: ~\n+ formatter: ~\n+ selectoptions: ~\n+ content_array: ~\n+ frontend_menu: ~\n+ backend_menu: ~\n# The theme to use.\n#\n" }, { "change_type": "MODIFY", "old_path": "config/services.yaml", "new_path": "config/services.yaml", "diff": "@@ -105,6 +105,9 @@ services:\nBolt\\Cache\\ContentToArrayCacher:\ndecorates: Bolt\\Twig\\JsonExtension\n+ Bolt\\Cache\\GetFormatCacher:\n+ decorates: Bolt\\Utils\\ContentHelper\n+\nBolt\\Menu\\BackendMenuBuilderInterface: '@Bolt\\Menu\\BackendMenu'\nBolt\\Menu\\FrontendMenuBuilder: ~\n" }, { "change_type": "ADD", "old_path": null, "new_path": "src/Cache/GetFormatCacher.php", "diff": "+<?php\n+\n+namespace Bolt\\Cache;\n+\n+use Bolt\\Entity\\Content;\n+use Bolt\\Utils\\ContentHelper;\n+\n+class GetFormatCacher extends ContentHelper implements CachingInterface\n+{\n+ use CachingTrait;\n+\n+ public const CACHE_CONFIG_KEY = 'formatter';\n+\n+ public function get(Content $record, string $format = '', ?string $locale = null): string\n+ {\n+ $this->setCacheKey([$record->getId(), $format, $locale]);\n+\n+ return $this->execute([parent::class, __FUNCTION__], [$record, $format, $locale]);\n+ }\n+}\n" }, { "change_type": "MODIFY", "old_path": "src/Utils/ContentHelper.php", "new_path": "src/Utils/ContentHelper.php", "diff": "@@ -194,13 +194,15 @@ class ContentHelper\nreturn '(recursion)';\n}\n- if (array_key_exists($match[1], $record->getExtras())) {\n+ $extras = $record->getExtras();\n+\n+ if (array_key_exists($match[1], $extras)) {\n// If it's the icon, return an html element\nif ($match[1] === 'icon') {\n- return sprintf(\"<i class='fas %s'></i>\", $record->getExtras()[$match[1]]);\n+ return sprintf(\"<i class='fas %s'></i>\", $extras[$match[1]]);\n}\n- return $record->getExtras()[$match[1]];\n+ return $extras[$match[1]];\n}\nreturn '(unknown)';\n" } ]
PHP
MIT License
bolt/core
Adding cache decorator for Formatter
95,144
25.03.2022 17:17:55
-3,600
432fe45fcab17e0979bd4df10584c40fcf90eb29
Create m_2022-03-25-services.yaml
[ { "change_type": "ADD", "old_path": null, "new_path": "yaml-migrations/m_2022-03-25-services.yaml", "diff": "+# Adding the new services for Bolt 5.1.6\n+# See: https://github.com/bolt/core/pull/3143\n+file: services.yaml\n+since: 5.1.6\n+\n+add:\n+ services:\n+ Bolt\\Cache\\GetFormatCacher:\n+ decorates: Bolt\\Utils\\ContentHelper\n" } ]
PHP
MIT License
bolt/core
Create m_2022-03-25-services.yaml
95,115
25.03.2022 22:52:34
-3,600
dcff2b9620a75bef374b4ca10919c5f8e87d5543
try to work around entrypoints.json requirement during phpunit by disabeling strict_mode
[ { "change_type": "ADD", "old_path": null, "new_path": "config/packages/test/webpack_encore.yaml", "diff": "+webpack_encore:\n+# Disable strict mode for phpunit to enable ContentEditControllerTest to run without\n+# having to invoke webpack first to create public/assets/entrypoints.json\n+ strict_mode: false\n" } ]
PHP
MIT License
bolt/core
try to work around entrypoints.json requirement during phpunit by disabeling strict_mode
95,144
28.03.2022 17:23:18
-7,200
ccc5e7164f225198b6955952296520cec81f475d
Ensure correct links in menu, when changing `backend_url` in `services.yaml`
[ { "change_type": "MODIFY", "old_path": "config/services.yaml", "new_path": "config/services.yaml", "diff": "@@ -29,6 +29,7 @@ services:\n$projectDir: '%kernel.project_dir%'\n$publicFolder: '%bolt.public_folder%'\n$tablePrefix: '%bolt.table_prefix%'\n+ $backendUrl: '%bolt.backend_url%'\n$rememberLifetime: '%bolt.remember_lifetime%'\n_instanceof:\n" }, { "change_type": "MODIFY", "old_path": "src/Menu/BackendMenu.php", "new_path": "src/Menu/BackendMenu.php", "diff": "@@ -39,7 +39,8 @@ final class BackendMenu implements BackendMenuBuilderInterface\nRequestStack $requestStack,\nStopwatch $stopwatch,\nConfig $config,\n- Security $security\n+ Security $security,\n+ string $backendUrl = 'bolt'\n) {\n$this->cache = $cache;\n$this->menuBuilder = $menuBuilder;\n@@ -47,6 +48,7 @@ final class BackendMenu implements BackendMenuBuilderInterface\n$this->stopwatch = $stopwatch;\n$this->config = $config;\n$this->security = $security;\n+ $this->backendUrl = preg_replace('/[^\\pL\\d,]+/u', '', $backendUrl);\n}\npublic function buildAdminMenu(): array\n@@ -64,7 +66,7 @@ final class BackendMenu implements BackendMenuBuilderInterface\n$username = '';\n}\n- $cacheKey = 'bolt.backendMenu_' . $locale . '_' . $username;\n+ $cacheKey = 'bolt.backendMenu_' . $locale . '_' . $this->backendUrl . '_' . $username;\n$menu = $this->cache->get($cacheKey, function (ItemInterface $item) {\n$item->expiresAfter($this->config->get('general/caching/backend_menu'));\n" } ]
PHP
MIT License
bolt/core
Ensure correct links in menu, when changing `backend_url` in `services.yaml`
95,144
29.03.2022 11:25:49
-7,200
4aab4e20e1c45ddde6a372b12b13a6bf97ac507e
Add `cite` to `allowed_tags`
[ { "change_type": "MODIFY", "old_path": "config/bolt/config.yaml", "new_path": "config/bolt/config.yaml", "diff": "@@ -196,7 +196,7 @@ filepermissions:\n# the allowed tags. For example, if you set `images: true`, the `<img>` tag\n# will be allowed, regardless of it being in the `allowed_tags` setting.\nhtmlcleaner:\n- allowed_tags: [ div, span, p, br, hr, s, u, strong, em, i, b, li, ul, ol, mark, blockquote, pre, code, tt, h1, h2, h3, h4, h5, h6, dd, dl, dt, table, tbody, thead, tfoot, th, td, tr, a, img, address, abbr, iframe, caption, sub, sup, figure, figcaption, article, section, small ]\n+ allowed_tags: [ div, span, p, br, hr, s, u, strong, em, i, b, li, ul, ol, mark, blockquote, cite, pre, code, tt, h1, h2, h3, h4, h5, h6, dd, dl, dt, table, tbody, thead, tfoot, th, td, tr, a, img, address, abbr, iframe, caption, sub, sup, figure, figcaption, article, section, small ]\nallowed_attributes: [ id, class, style, name, value, href, src, alt, title, width, height, frameborder, allowfullscreen, scrolling, target, colspan, rowspan, rel, download, hreflang ]\nallowed_frame_targets: [ _blank, _self, _parent, _top ]\n" } ]
PHP
MIT License
bolt/core
Add `cite` to `allowed_tags`
95,191
29.03.2022 15:26:19
-7,200
8a0568779315e9bc0d5aef1e03713717d7472098
Update User Edit Form so it has a unique ID This might help the Ajax Saving PR
[ { "change_type": "MODIFY", "old_path": "templates/users/_form.html.twig", "new_path": "templates/users/_form.html.twig", "diff": "{% import '@bolt/_macro/_macro.html.twig' as macro %}\n{# DONT TOUCH THAT ID! #}\n-{{ form_start(userForm, {'attr': {'id': 'editcontent'}}) }}\n+{{ form_start(userForm, {'attr': {'id': 'edituser'}}) }}\n{# ===== USERNAME ===== #}\n'options' : localeOptions,\n'required': userForm.locale.vars.required,\n'multiple': userForm.locale.vars.multiple ? 'true' : 'false',\n+ 'form': 'edituser',\n} %}\n{% if form_errors(userForm.locale) is not empty %}\n<div class=\"field-error\">{{ form_errors(userForm.locale) }}</div>\n'options' : roleOptions,\n'required': userForm.roles.vars.required,\n'multiple': userForm.roles.vars.multiple ? 'true' : 'false',\n+ 'form': 'edituser',\n} %}\n{% if form_errors(userForm.roles) is not empty %}\n<div class=\"field-error\">{{ form_errors(userForm.roles) }}</div>\n'value': userForm.status.vars.value,\n'options': statusOptions,\n'required': userForm.status.vars.required ? 'true' : 'false',\n+ 'form': 'edituser',\n} %}\n{% if form_errors(userForm.status) is not empty %}\n<div class=\"field-error\">{{ form_errors(userForm.status) }}</div>\n#}\n{# DONT TOUCH THAT ID! #}\n- {{ macro.button('action.save', 'fa-save', 'primary', {'type': 'submit', 'form': 'editcontent', 'name': 'save'}) }}\n+ {{ macro.button('action.save', 'fa-save', 'primary', {'type': 'submit', 'form': 'edituser', 'name': 'save'}) }}\n{{ form_end(userForm) }}\n" }, { "change_type": "MODIFY", "old_path": "templates/users/edit.html.twig", "new_path": "templates/users/edit.html.twig", "diff": "<form class=\"ui form\">\n<div class=\"card mb-3\">\n<div class=\"card-body\">\n- {{ macro.button('action.save', 'fa-save', 'primary', {'type': 'submit', 'form': 'editcontent'}) }}\n+ {{ macro.button('action.save', 'fa-save', 'primary', {'type': 'submit', 'form': 'edituser'}) }}\n</div>\n</div>\n</form>\n" }, { "change_type": "MODIFY", "old_path": "templates/users/profile.html.twig", "new_path": "templates/users/profile.html.twig", "diff": "{% block main %}\n<div>\n- <form method=\"post\" id=\"editcontent\" >\n+ <form method=\"post\" id=\"edituser\" >\n<input type=\"hidden\" name=\"_csrf_token\" value=\"{{ csrf_token('profileedit') }}\">\n{% include '@bolt/_partials/fields/text.html.twig' with {\n<theme-select></theme-select>\n#}\n- {{ macro.button('action.save', 'fa-save', 'primary', {'type': 'submit', 'form': 'editcontent', 'name': 'save'}) }}\n+ {{ macro.button('action.save', 'fa-save', 'primary', {'type': 'submit', 'form': 'edituser', 'name': 'save'}) }}\n</form>\n<form class=\"ui form\">\n<div class=\"card mb-3\">\n<div class=\"card-body\">\n- {{ macro.button('action.save', 'fa-save', 'primary', {'type': 'submit', 'form': 'editcontent'}) }}\n+ {{ macro.button('action.save', 'fa-save', 'primary', {'type': 'submit', 'form': 'edituser'}) }}\n</div>\n</div>\n</form>\n" } ]
PHP
MIT License
bolt/core
Update User Edit Form so it has a unique ID This might help the Ajax Saving PR
95,191
29.03.2022 15:47:23
-7,200
e3e583d3ec0d451e5435966ed9fafab858d9b2b9
Update Cypress tests to look for new ID
[ { "change_type": "MODIFY", "old_path": "tests/cypress/integration/create_delete_user.spec.js", "new_path": "tests/cypress/integration/create_delete_user.spec.js", "diff": "@@ -25,8 +25,8 @@ describe('Create/delete user', () => {\ncy.get('#multiselect-user_roles > div > div.multiselect__content-wrapper > ul > li:nth-child(1) > span').scrollIntoView();\ncy.get('#multiselect-user_roles > div > div.multiselect__content-wrapper > ul > li:nth-child(1) > span').click();\n- cy.get('#editcontent > button').scrollIntoView();\n- cy.get('form[id=\"editcontent\"]').submit();\n+ cy.get('#edituser > button').scrollIntoView();\n+ cy.get('form[id=\"edituser\"]').submit();\ncy.visit('/bolt/users');\ncy.get('table').eq(0).find('tbody').find('tr').its('length').should('eq', 7);\n" }, { "change_type": "MODIFY", "old_path": "tests/cypress/integration/edit_users.spec.js", "new_path": "tests/cypress/integration/edit_users.spec.js", "diff": "@@ -16,9 +16,9 @@ describe('Edit user successfully, Edit users incorrectly', () => {\ncy.get('input[name=\"user[displayName]\"]').type('Tom Doe CHANGED');\ncy.get('input[name=\"user[email]\"]').clear();\ncy.get('input[name=\"user[email]\"]').type('tom_admin_changed@example.org');\n- cy.get('#editcontent > button').scrollIntoView();\n+ cy.get('#edituser > button').scrollIntoView();\ncy.wait(1000);\n- cy.get('#editcontent > button').click();\n+ cy.get('#edituser > button').click();\ncy.url().should('contain', 'bolt/users');\ncy.get('table:nth-child(1) > tbody > tr:nth-child(6)').children('td').eq(1).should('contain', 'Tom Doe CHANGED');\n@@ -32,8 +32,8 @@ describe('Edit user successfully, Edit users incorrectly', () => {\ncy.get('#user_displayName').clear();\ncy.get('#user_displayName').type('Administrator');\n- cy.get('#editcontent > button').scrollIntoView();\n- cy.get('#editcontent > button').click();\n+ cy.get('#edituser > button').scrollIntoView();\n+ cy.get('#edituser > button').click();\ncy.wait(500);\n@@ -52,8 +52,8 @@ describe('Edit user successfully, Edit users incorrectly', () => {\ncy.get('input[name=\"user[email]\"]').clear();\ncy.get('input[name=\"user[email]\"]').type('smth@nth');\n- cy.get('#editcontent > button').scrollIntoView();\n- cy.get('#editcontent > button').click();\n+ cy.get('#edituser > button').scrollIntoView();\n+ cy.get('#edituser > button').click();\ncy.url().should('contain', '/bolt/user-edit/2');\ncy.get('.field-error').eq(0).children('.help-block').children('.list-unstyled').children('li').should('contain', 'Invalid display name');\n@@ -80,8 +80,8 @@ describe('Edit user successfully, Edit users incorrectly', () => {\ncy.get('#user_displayName').clear();\ncy.get('#user_displayName').type('a');\n- cy.get('#editcontent > button').scrollIntoView();\n- cy.get('#editcontent > button').click();\n+ cy.get('#edituser > button').scrollIntoView();\n+ cy.get('#edituser > button').click();\ncy.get('.field-error').eq(0).children('.help-block').children('.list-unstyled').children('li').should('contain', 'Invalid display name');\ncy.visit('/bolt/logout')\n" } ]
PHP
MIT License
bolt/core
Update Cypress tests to look for new ID
95,191
29.03.2022 14:26:46
-7,200
5b2238c195ab83fedeef1edbf4e79921e081a3d5
Update create_delete_user.spec.js Cypress fix
[ { "change_type": "MODIFY", "old_path": "tests/cypress/integration/create_delete_user.spec.js", "new_path": "tests/cypress/integration/create_delete_user.spec.js", "diff": "@@ -25,8 +25,8 @@ describe('Create/delete user', () => {\ncy.get('#multiselect-user_roles > div > div.multiselect__content-wrapper > ul > li:nth-child(1) > span').scrollIntoView();\ncy.get('#multiselect-user_roles > div > div.multiselect__content-wrapper > ul > li:nth-child(1) > span').click();\n- cy.get('#editcontent > button').scrollIntoView();\n- cy.get('form[id=\"editcontent\"]').submit();\n+ cy.get('#edituser > button').scrollIntoView();\n+ cy.get('form[id=\"edituser\"]').submit();\ncy.visit('/bolt/users');\ncy.get('table').eq(0).find('tbody').find('tr').its('length').should('eq', 7);\n" } ]
PHP
MIT License
bolt/core
Update create_delete_user.spec.js Cypress fix
95,144
30.03.2022 19:15:32
-7,200
b2f0f11341657af6da5a984026d2cc7749c256d1
Refactor Composer scripts to work with Composer 2.3.0
[ { "change_type": "MODIFY", "old_path": "bin/composer-script/CorePostInstallScript.php", "new_path": "bin/composer-script/CorePostInstallScript.php", "diff": "@@ -21,9 +21,9 @@ class CorePostInstallScript extends Script\nparent::init('Running composer \"post-install-cmd\" scripts, for `bolt/core` installation');\n- self::run('php bin/console extensions:configure --with-config --ansi');\n- self::run('php bin/console cache:clear --no-warmup');\n- self::run('php bin/console assets:install --symlink --relative public');\n- self::run('php bin/console bolt:info --ansi');\n+ self::runConsole(['extensions:configure', '--with-config', '--ansi']);\n+ self::runConsole(['cache:clear', '--no-warmup']);\n+ self::runConsole(['assets:install', '--symlink', '--relative', 'public']);\n+ self::runConsole(['bolt:info', '--ansi']);\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "bin/composer-script/CorePostUpdateScript.php", "new_path": "bin/composer-script/CorePostUpdateScript.php", "diff": "@@ -21,12 +21,12 @@ class CorePostUpdateScript extends Script\nparent::init('Running composer \"post-update-cmd\" scripts, for `bolt/core` installation');\n- self::run('php bin/console extensions:configure --with-config --ansi');\n- self::run('php bin/console cache:clear --no-warmup');\n- self::run('php bin/console assets:install --symlink --relative public');\n- self::run('php bin/console doctrine:migrations:migrate --no-interaction');\n+ self::runConsole(['extensions:configure', '--with-config', '--ansi']);\n+ self::runConsole(['cache:clear', '--no-warmup']);\n+ self::runConsole(['assets:install', '--symlink', '--relative', 'public']);\n+ self::runConsole(['doctrine:migrations:migrate', '--no-interaction']);\n- $res = self::run('php bin/console doctrine:migrations:up-to-date');\n+ $res = self::runConsole(['doctrine:migrations:up-to-date']);\nif ($res) {\n$migrate = 'Database is out-of-date. To update the database, run `php bin/console doctrine:migrations:migrate`.';\n@@ -35,6 +35,6 @@ class CorePostUpdateScript extends Script\n$symfonyStyle->warning($migrate);\n}\n- self::run('php bin/console bolt:info --ansi');\n+ self::runConsole(['bolt:info', '--ansi']);\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "bin/composer-script/CreateProjectScript.php", "new_path": "bin/composer-script/CreateProjectScript.php", "diff": "@@ -17,10 +17,10 @@ class CreateProjectScript extends Script\nchdir(parent::getProjectFolder($event));\n- self::run('php bin/console bolt:reset-secret');\n- self::run('php bin/console bolt:copy-themes --ansi');\n+ self::runConsole(['bolt:reset-secret']);\n+ self::runConsole(['bolt:copy-themes', '--ansi']);\nif (self::isTtySupported()) {\n- self::run('php bin/console bolt:welcome --ansi');\n+ self::runConsole(['bolt:welcome', '--ansi']);\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "bin/composer-script/PostInstallScript.php", "new_path": "bin/composer-script/PostInstallScript.php", "diff": "@@ -10,14 +10,14 @@ class PostInstallScript extends Script\n{\nparent::init('Running composer \"post-install-cmd\" scripts');\n- self::run('php bin/console cache:clear --no-warmup --ansi');\n- self::run('php bin/console assets:install --symlink --relative public --ansi');\n- self::run('php bin/console bolt:copy-assets --ansi');\n- self::run('php bin/console extensions:configure --with-config --ansi');\n+ self::runConsole(['cache:clear', '--no-warmup', '--ansi']);\n+ self::runConsole(['assets:install', '--symlink', '--relative', 'public', '--ansi']);\n+ self::runConsole(['bolt:copy-assets', '--ansi']);\n+ self::runConsole(['extensions:configure', '--with-config', '--ansi']);\n// Only run, if the tables are initialised already, _and_ Doctrine thinks we need to\n- $migrationError = ! self::run('php bin/console bolt:info --tablesInitialised') &&\n- self::run('php bin/console doctrine:migrations:up-to-date --ansi');\n+ $migrationError = ! self::runConsole(['bolt:info', '--tablesInitialised']) &&\n+ self::runConsole(['doctrine:migrations:up-to-date', '--ansi']);\nif ($migrationError) {\nself::$console->warning('Please run `php bin/console doctrine:migrations:migrate` to execute the database migrations.');\n" }, { "change_type": "MODIFY", "old_path": "bin/composer-script/PostUpdateScript.php", "new_path": "bin/composer-script/PostUpdateScript.php", "diff": "@@ -10,21 +10,21 @@ class PostUpdateScript extends Script\n{\nparent::init('Running composer \"post-update-cmd\" scripts');\n- self::run('php vendor/bolt/core/bin/fix-bundles.php');\n- self::run('php vendor/bobdenotter/yaml-migrations/bin/yaml-migrate process -c vendor/bolt/core/yaml-migrations/config.yaml -v');\n- self::run('php bin/console cache:clear --no-warmup --ansi');\n- self::run('php bin/console assets:install --symlink --relative public --ansi');\n- self::run('php bin/console bolt:copy-assets --ansi');\n- self::run('php bin/console extensions:configure --with-config --ansi');\n+ self::runPHP(['vendor/bolt/core/bin/fix-bundles.php']);\n+ self::runPHP(['vendor/bobdenotter/yaml-migrations/bin/yaml-migrate', 'process', '-c', 'vendor/bolt/core/yaml-migrations/config.yaml', '-v']);\n+ self::runConsole(['cache:clear', '--no-warmup', '--ansi']);\n+ self::runConsole(['assets:install', '--symlink', '--relative', 'public', '--ansi']);\n+ self::runConsole(['bolt:copy-assets', '--ansi']);\n+ self::runConsole(['extensions:configure', '--with-config', '--ansi']);\n// Only run, if the tables are initialised already, _and_ Doctrine thinks we need to\n- $migrationError = ! self::run('php bin/console bolt:info --tablesInitialised') &&\n- self::run('php bin/console doctrine:migrations:up-to-date --ansi');\n+ $migrationError = ! self::runConsole(['bolt:info', '--tablesInitialised']) &&\n+ self::runConsole(['doctrine:migrations:up-to-date', '--ansi']);\nif ($migrationError) {\nself::$console->warning('Please run `php bin/console doctrine:migrations:migrate` to execute the database migrations.');\n}\n- self::run('php bin/console bolt:info --ansi');\n+ self::runConsole(['bolt:info', '--ansi']);\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "bin/composer-script/PrePackageUninstallScript.php", "new_path": "bin/composer-script/PrePackageUninstallScript.php", "diff": "@@ -10,6 +10,6 @@ class PrePackageUninstallScript extends Script\n{\nparent::init('Running composer \"pre-package-uninstall\" scripts');\n- self::run('php bin/console extensions:configure --remove-services --ansi');\n+ self::runConsole(['extensions:configure', '--remove-services', '--ansi']);\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "bin/composer-script/Script.php", "new_path": "bin/composer-script/Script.php", "diff": "@@ -32,6 +32,7 @@ class Script\n/**\n* Execute a command in the CLI, as a separate process.\n+ * @deprecated since Bolt 5.1.6\n*/\npublic static function run(string $command): int\n{\n@@ -53,6 +54,26 @@ class Script\nreturn $process->run();\n}\n+ /**\n+ * Execute a `bin/console` command in the CLI, as a separate process.\n+ */\n+ public static function runConsole(array $command): int\n+ {\n+ return self::runPHP(array_merge(['bin/console'], $command));\n+ }\n+\n+ /**\n+ * Execute a PHP script in the CLI, as a separate process.\n+ */\n+ public static function runPHP(array $command): int\n+ {\n+ $process = new Process($command);\n+\n+ $process->setTty(self::isTtySupported());\n+\n+ return $process->run();\n+ }\n+\n/**\n* Create SymfonyStyle object. Taken from Symplify (which we might not\n* have at our disposal inside a 'project' installation)\n" } ]
PHP
MIT License
bolt/core
Refactor Composer scripts to work with Composer 2.3.0
95,144
31.03.2022 11:25:15
-7,200
b038812ed82b1525513786c63a1d798008de1769
Tweaking default config a little bit
[ { "change_type": "MODIFY", "old_path": "config/bolt/config.yaml", "new_path": "config/bolt/config.yaml", "diff": "@@ -45,7 +45,8 @@ date_format: 'F j, Y H:i'\n# You can set a preference to omit background images on the login screen.\nomit_backgrounds: true\n-# If you're a party-pooper and dislike the `generator` meta tag, set to `true`\n+# If you're a party-pooper who wants to hide the `generator` meta tag and\n+# `x-powered-by` header, set these to true\nomit_meta_generator_tag: false\nheaders:\n@@ -109,8 +110,7 @@ forbidden: [ blocks/403-forbidden, 'helpers/page_403.html.twig' ]\n# handled, and you'll have a bad time debugging it!\ninternal_server_error: [ 'helpers/page_500.html.twig' ]\n-# The default template for record-pages on the\n-# site.\n+# The default template for record-pages on the site.\n#\n# Can be overridden for each content type and for each record, if it has a\n# templateselect field.\n@@ -249,5 +249,5 @@ reset_password_settings:\nmail_subject: \"Your password reset request\"\nmail_template: \"reset_password/email.html.twig\"\n-# Adds sorting and filtering users in backend\n+# Adds sorting and filtering of users in backend\nuser_show_sort&filter: true\n" }, { "change_type": "MODIFY", "old_path": "config/bolt/permissions.yaml", "new_path": "config/bolt/permissions.yaml", "diff": "@@ -39,7 +39,7 @@ global:\nmaintenance-mode: [ ROLE_EDITOR ] # view the frontend when in maintenance mode\nsystemlog: [ ROLE_ADMIN ]\napi_admin: [ ROLE_ADMIN ] # WARNING: this only shows/hides api in the bolt admin, it doesn't protect the /api route(s)\n- bulk_operations: [ ROLE_EDITOR ]\n+ bulk_operations: [ ROLE_CHIEF_EDITOR ]\nkitchensink: [ ROLE_ADMIN ]\nupload: [ ROLE_EDITOR ] # TODO PERMISSIONS upload media/files ? Or should this be handled by managefiles:files\nextensionmenus: [ IS_AUTHENTICATED_REMEMBERED ] # allows you to see menu items added by extensions\n" } ]
PHP
MIT License
bolt/core
Tweaking default config a little bit
95,144
31.03.2022 13:18:36
-7,200
64ad2495ebc91728e719114c8c42815864c7221b
Prepare release 5.1.7
[ { "change_type": "MODIFY", "old_path": "assets/js/version.js", "new_path": "assets/js/version.js", "diff": "// generated by genversion\n-export const version = '5.1.6';\n+export const version = '5.1.7';\n" }, { "change_type": "MODIFY", "old_path": "package-lock.json", "new_path": "package-lock.json", "diff": "{\n\"name\": \"bolt\",\n- \"version\": \"5.1.6\",\n+ \"version\": \"5.1.7\",\n\"lockfileVersion\": 2,\n\"requires\": true,\n\"packages\": {\n\"\": {\n\"name\": \"bolt\",\n- \"version\": \"5.1.6\",\n+ \"version\": \"5.1.7\",\n\"license\": \"MIT\",\n\"dependencies\": {\n\"@vue/cli-service\": \"^4.5.13\",\n" }, { "change_type": "MODIFY", "old_path": "package.json", "new_path": "package.json", "diff": "{\n\"name\": \"bolt\",\n- \"version\": \"5.1.6\",\n+ \"version\": \"5.1.7\",\n\"homepage\": \"https://boltcms.io\",\n\"author\": \"Bob den Otter <bob@twokings.nl> (https://boltcms.io)\",\n\"license\": \"MIT\",\n" } ]
PHP
MIT License
bolt/core
Prepare release 5.1.7
95,141
06.04.2022 14:15:36
-7,200
f5b9f8bb616f8173ebdd403b5bc3c87f4931395c
clean(file-system): remove '.history' directory
[ { "change_type": "DELETE", "old_path": "assets/js/app/editor/Components/.history/Collection_20220406134859.vue", "new_path": null, "diff": "-<template>\n- <div :id=\"name\" ref=\"collectionContainer\" class=\"collection-container\">\n- <div class=\"expand-buttons\">\n- <label>{{ labels.field_label }}:</label>\n-\n- <div class=\"btn-group\" role=\"group\">\n- <button class=\"btn btn-secondary btn-sm collection-expand-all\">\n- <i class=\"fas fa-fw fa-expand-alt\"></i>\n- {{ labels.expand_all }}\n- </button>\n- <button class=\"btn btn-secondary btn-sm collection-collapse-all\">\n- <i class=\"fas fa-fw fa-compress-alt\"></i>\n- {{ labels.collapse_all }}\n- </button>\n- </div>\n- </div>\n-\n- <div\n- v-for=\"element in elements\"\n- :key=\"element.hash\"\n- class=\"collection-item\"\n- :class=\"{ collapsed: variant !== 'expanded' }\"\n- >\n- <div class=\"d-block summary\">\n- <div class=\"card-header d-flex align-items-center\">\n- <!-- Initial title. This is replaced by dynamic title in JS below. -->\n- <i class=\"card-marker-caret fa fa-caret-right\"></i>\n- <span class=\"badge badge-secondary inline\" :title=\"element.label\">\n- <i :class=\"[element.icon, 'fas']\"></i>\n- </span>\n- <div class=\"collection-item-title\" :data-label=\"element.label\">\n- {{ element.label }}\n- </div>\n- <!-- Navigation buttons -->\n- <div :is=\"compile(element.buttons)\"></div>\n- </div>\n- </div>\n- <div class=\"card details\">\n- <!-- The actual field -->\n- <div :is=\"compile(element.content)\" class=\"card-body\"></div>\n- </div>\n- </div>\n-\n- <div class=\"row\">\n- <div class=\"col-12\">\n- <p v-if=\"templates.length > 1\" class=\"mt-4 mb-1\">{{ labels.add_collection_item }}:</p>\n- <div v-if=\"templates.length > 1\" class=\"dropdown\">\n- <button\n- :id=\"name + '-dropdownMenuButton'\"\n- :disabled=\"!allowMore\"\n- class=\"btn btn-secondary dropdown-toggle\"\n- type=\"button\"\n- data-toggle=\"dropdown\"\n- aria-haspopup=\"true\"\n- aria-expanded=\"false\"\n- >\n- <i class=\"fas fa-fw fa-plus\"></i> {{ labels.select }}\n- </button>\n- <div class=\"dropdown-menu\" :aria-labelledby=\"name + '-dropdownMenuButton'\">\n- <a\n- v-for=\"template in templates\"\n- :key=\"template.label\"\n- class=\"dropdown-item\"\n- :data-template=\"template.label\"\n- @click=\"addCollectionItem($event)\"\n- >\n- <i :class=\"[template.icon, 'fas fa-fw']\" />\n- {{ template.label }}\n- </a>\n- </div>\n- </div>\n- <button\n- v-else\n- type=\"button\"\n- class=\"btn btn-secondary btn-small\"\n- :data-template=\"templates[0].label\"\n- @click=\"addCollectionItem($event)\"\n- >\n- <i :class=\"[templates[0].icon, 'fas fa-fw']\" />\n- {{ labels.add_collection_item }}\n- </button>\n- </div>\n- </div>\n- </div>\n-</template>\n-\n-<script>\n-import Vue from 'vue';\n-import $ from 'jquery';\n-var uniqid = require('locutus/php/misc/uniqid');\n-export default {\n- name: 'EditorCollection',\n- props: {\n- name: {\n- type: String,\n- required: true,\n- },\n- templates: {\n- type: Array,\n- required: true,\n- },\n- existingFields: {\n- type: Array,\n- },\n- labels: {\n- type: Object,\n- required: true,\n- },\n- limit: {\n- type: Number,\n- required: true,\n- },\n- variant: {\n- type: String,\n- required: true,\n- },\n- },\n- data() {\n- let templateSelectOptions = [];\n- return {\n- elements: this.existingFields,\n- counter: this.existingFields.length,\n- templateSelectName: 'templateSelect' + this.id,\n- templateSelectOptions: templateSelectOptions,\n- selector: {\n- collectionContainer: '#' + this.name,\n- item: ' .collection-item',\n- remove: ' .action-remove-collection-item',\n- moveUp: ' .action-move-up-collection-item',\n- moveDown: ' .action-move-down-collection-item',\n- expandAll: ' .collection-expand-all',\n- collapseAll: ' .collection-collapse-all',\n- editor: ' #editor',\n- },\n- };\n- },\n- computed: {\n- initialSelectValue() {\n- return this.templateSelectOptions[0].key;\n- },\n- allowMore: function() {\n- return this.counter < this.limit;\n- },\n- },\n- mounted() {\n- this.setAllButtonsStates(window.$(this.$refs.collectionContainer));\n- let vueThis = this;\n- /**\n- * Event listeners on collection items buttons\n- * This is a jQuery event listener, because Vue cannot handle an event emitted by a non-vue element.\n- * The collection items are not Vue elements in order to initialise them correctly within their twig template.\n- */\n- window\n- .$(document)\n- .on('click', vueThis.selector.collectionContainer + ' .collection-item .summary', function(e) {\n- e.preventDefault();\n- let thisCollectionItem = vueThis.getCollectionItemFromPressedButton(this);\n- thisCollectionItem.toggleClass('collapsed');\n- });\n- window.$(document).on('click', vueThis.selector.collectionContainer + vueThis.selector.remove, function(e) {\n- e.preventDefault();\n- e.stopPropagation();\n- let collectionContainer = window.$(this).closest(vueThis.selector.collectionContainer);\n- vueThis.getCollectionItemFromPressedButton(this).remove();\n- vueThis.setAllButtonsStates(collectionContainer);\n- vueThis.counter--;\n- });\n- window.$(document).on('click', vueThis.selector.collectionContainer + vueThis.selector.moveUp, function(e) {\n- e.preventDefault();\n- e.stopPropagation();\n- let thisCollectionItem = vueThis.getCollectionItemFromPressedButton(this);\n- let prevCollectionitem = vueThis.getPreviousCollectionItem(thisCollectionItem);\n- window.$(thisCollectionItem).after(prevCollectionitem);\n- vueThis.setButtonsState(thisCollectionItem);\n- vueThis.setButtonsState(prevCollectionitem);\n- });\n- window.$(document).on('click', vueThis.selector.collectionContainer + vueThis.selector.moveDown, function(e) {\n- e.preventDefault();\n- e.stopPropagation();\n- let thisCollectionItem = vueThis.getCollectionItemFromPressedButton(this);\n- let nextCollectionItem = vueThis.getNextCollectionItem(thisCollectionItem);\n- window.$(thisCollectionItem).before(nextCollectionItem);\n- vueThis.setButtonsState(thisCollectionItem);\n- vueThis.setButtonsState(nextCollectionItem);\n- });\n- window.$(document).on('click', vueThis.selector.collectionContainer + vueThis.selector.expandAll, function(e) {\n- e.preventDefault();\n- const collection = $(e.target).closest(vueThis.selector.collectionContainer);\n- collection.find('.collection-item').removeClass('collapsed');\n- });\n- window\n- .$(document)\n- .on('click', vueThis.selector.collectionContainer + vueThis.selector.collapseAll, function(e) {\n- e.preventDefault();\n- const collection = $(e.target).closest(vueThis.selector.collectionContainer);\n- collection.find('.collection-item').addClass('collapsed');\n- });\n- /**\n- * Update the title dynamically.\n- */\n- $(document).ready(function() {\n- $.each(window.$(vueThis.selector.collectionContainer + vueThis.selector.item), function() {\n- updateTitle(this);\n- });\n- window.$(vueThis.selector.collectionContainer).on('keyup change', vueThis.selector.item, function() {\n- updateTitle(this);\n- });\n- });\n- /**\n- * Pass a .collection-item element to update the title\n- * with the value of the first text-based field.\n- */\n- function updateTitle(item) {\n- const label = $(item)\n- .find('.collection-item-title')\n- .first();\n- const input = $(item)\n- .find('textarea,input[type=\"text\"]')\n- .first();\n- // We use this 'innerText' trick to ensure the title is plain text.\n- var title = document.createElement('span');\n- title.innerHTML = $(input).val() ? $(input).val() : label.attr('data-label');\n- label.html(title.innerText);\n- }\n- /**\n- * Open newly inserted collection items.\n- */\n- // $(document).on('DOMNodeInserted', function(e) {\n- // if ($(e.target).hasClass('collection-item')) {\n- // $(e.target)\n- // .find('details')\n- // .first()\n- // .attr('open', '');\n- // }\n- // });\n- },\n- updated() {\n- this.setAllButtonsStates(window.$(this.$refs.collectionContainer));\n- },\n- methods: {\n- compile(element) {\n- return Vue.compile(element);\n- },\n- setAllButtonsStates(collectionContainer) {\n- let vueThis = this;\n- collectionContainer.children(vueThis.selector.item).each(function() {\n- vueThis.setButtonsState(window.$(this));\n- });\n- },\n- setButtonsState(item) {\n- //by default, enable\n- item.find(this.selector.moveUp)\n- .first()\n- .removeAttr('disabled');\n- item.find(this.selector.moveDown)\n- .first()\n- .removeAttr('disabled');\n- if (!this.getPreviousCollectionItem(item)) {\n- // first in collection\n- item.find(this.selector.moveUp)\n- .first()\n- .attr('disabled', 'disabled');\n- }\n- if (!this.getNextCollectionItem(item)) {\n- // last in collection\n- item.find(this.selector.moveDown)\n- .first()\n- .attr('disabled', 'disabled');\n- }\n- },\n- getPreviousCollectionItem(item) {\n- return item.prev('.collection-item').length === 0 ? false : item.prev('.collection-item');\n- },\n- getNextCollectionItem(item) {\n- return item.next('.collection-item').length === 0 ? false : item.next('.collection-item');\n- },\n- getCollectionItemFromPressedButton(button) {\n- return window\n- .$(button)\n- .closest('.collection-item')\n- .last();\n- },\n- addCollectionItem(event) {\n- // duplicate template without reference\n- let template = $.extend(true, {}, this.getSelectedTemplate(event));\n- const realhash = uniqid();\n- template.content = template.content.replace(new RegExp(template.hash, 'g'), realhash);\n- template.hash = realhash;\n- this.elements.push(template);\n- this.counter++;\n- },\n- getSelectedTemplate(event) {\n- const target = $(event.target).attr('data-template')\n- ? $(event.target)\n- : $(event.target).closest('[data-template]');\n- let selectValue = target.attr('data-template');\n- return this.templates.find(template => template.label === selectValue);\n- },\n- },\n-};\n-</script>\n" }, { "change_type": "DELETE", "old_path": "assets/js/app/editor/Components/.history/Collection_20220406135413.vue", "new_path": null, "diff": "-<template>\n- <div :id=\"name\" ref=\"collectionContainer\" class=\"collection-container\">\n- <div class=\"expand-buttons\">\n- <label>{{ labels.field_label }}:</label>\n-\n- <div class=\"btn-group\" role=\"group\">\n- <button class=\"btn btn-secondary btn-sm collection-expand-all\">\n- <i class=\"fas fa-fw fa-expand-alt\"></i>\n- {{ labels.expand_all }}\n- </button>\n- <button class=\"btn btn-secondary btn-sm collection-collapse-all\">\n- <i class=\"fas fa-fw fa-compress-alt\"></i>\n- {{ labels.collapse_all }}\n- </button>\n- </div>\n- </div>\n-\n- <div\n- v-for=\"element in elements\"\n- :key=\"element.hash\"\n- class=\"collection-item\"\n- :class=\"{ collapsed: variant !== 'expanded' }\"\n- >\n- <div class=\"d-block summary\">\n- <div class=\"card-header d-flex align-items-center\">\n- <!-- Initial title. This is replaced by dynamic title in JS below. -->\n- <i class=\"card-marker-caret fa fa-caret-right\"></i>\n- <span class=\"badge badge-secondary inline\" :title=\"element.label\">\n- <i :class=\"[element.icon, 'fas']\"></i>\n- </span>\n- <div class=\"collection-item-title\" :data-label=\"element.label\">\n- {{ element.label }}\n- </div>\n- <!-- Navigation buttons -->\n- <div :is=\"compile(element.buttons)\"></div>\n- </div>\n- </div>\n- <div class=\"card details\">\n- <!-- The actual field -->\n- <div :is=\"compile(element.content)\" class=\"card-body\"></div>\n- </div>\n- </div>\n-\n- <div class=\"row\">\n- <div class=\"col-12\">\n- <p v-if=\"templates.length > 1\" class=\"mt-4 mb-1\">{{ labels.add_collection_item }}:</p>\n- <div v-if=\"templates.length > 1\" class=\"dropdown\">\n- <button\n- :id=\"name + '-dropdownMenuButton'\"\n- :disabled=\"!allowMore\"\n- class=\"btn btn-secondary dropdown-toggle\"\n- type=\"button\"\n- data-toggle=\"dropdown\"\n- aria-haspopup=\"true\"\n- aria-expanded=\"false\"\n- >\n- <i class=\"fas fa-fw fa-plus\"></i> {{ labels.select }}\n- </button>\n- <div class=\"dropdown-menu\" :aria-labelledby=\"name + '-dropdownMenuButton'\">\n- <a\n- v-for=\"template in templates\"\n- :key=\"template.label\"\n- class=\"dropdown-item\"\n- :data-template=\"template.label\"\n- @click=\"addCollectionItem($event)\"\n- >\n- <i :class=\"[template.icon, 'fas fa-fw']\" />\n- {{ template.label }}\n- </a>\n- </div>\n- </div>\n- <button\n- v-else\n- type=\"button\"\n- :disabled: !t.allowMore\n- class=\"btn btn-secondary btn-small\"\n- :data-template=\"templates[0].label\"\n- @click=\"addCollectionItem($event)\"\n- >\n- <i :class=\"[templates[0].icon, 'fas fa-fw']\" />\n- {{ labels.add_collection_item }}\n- </button>\n- </div>\n- </div>\n- </div>\n-</template>\n-\n-<script>\n-import Vue from 'vue';\n-import $ from 'jquery';\n-var uniqid = require('locutus/php/misc/uniqid');\n-export default {\n- name: 'EditorCollection',\n- props: {\n- name: {\n- type: String,\n- required: true,\n- },\n- templates: {\n- type: Array,\n- required: true,\n- },\n- existingFields: {\n- type: Array,\n- },\n- labels: {\n- type: Object,\n- required: true,\n- },\n- limit: {\n- type: Number,\n- required: true,\n- },\n- variant: {\n- type: String,\n- required: true,\n- },\n- },\n- data() {\n- let templateSelectOptions = [];\n- return {\n- elements: this.existingFields,\n- counter: this.existingFields.length,\n- templateSelectName: 'templateSelect' + this.id,\n- templateSelectOptions: templateSelectOptions,\n- selector: {\n- collectionContainer: '#' + this.name,\n- item: ' .collection-item',\n- remove: ' .action-remove-collection-item',\n- moveUp: ' .action-move-up-collection-item',\n- moveDown: ' .action-move-down-collection-item',\n- expandAll: ' .collection-expand-all',\n- collapseAll: ' .collection-collapse-all',\n- editor: ' #editor',\n- },\n- };\n- },\n- computed: {\n- initialSelectValue() {\n- return this.templateSelectOptions[0].key;\n- },\n- allowMore: function() {\n- return this.counter < this.limit;\n- },\n- },\n- mounted() {\n- this.setAllButtonsStates(window.$(this.$refs.collectionContainer));\n- let vueThis = this;\n- /**\n- * Event listeners on collection items buttons\n- * This is a jQuery event listener, because Vue cannot handle an event emitted by a non-vue element.\n- * The collection items are not Vue elements in order to initialise them correctly within their twig template.\n- */\n- window\n- .$(document)\n- .on('click', vueThis.selector.collectionContainer + ' .collection-item .summary', function(e) {\n- e.preventDefault();\n- let thisCollectionItem = vueThis.getCollectionItemFromPressedButton(this);\n- thisCollectionItem.toggleClass('collapsed');\n- });\n- window.$(document).on('click', vueThis.selector.collectionContainer + vueThis.selector.remove, function(e) {\n- e.preventDefault();\n- e.stopPropagation();\n- let collectionContainer = window.$(this).closest(vueThis.selector.collectionContainer);\n- vueThis.getCollectionItemFromPressedButton(this).remove();\n- vueThis.setAllButtonsStates(collectionContainer);\n- vueThis.counter--;\n- });\n- window.$(document).on('click', vueThis.selector.collectionContainer + vueThis.selector.moveUp, function(e) {\n- e.preventDefault();\n- e.stopPropagation();\n- let thisCollectionItem = vueThis.getCollectionItemFromPressedButton(this);\n- let prevCollectionitem = vueThis.getPreviousCollectionItem(thisCollectionItem);\n- window.$(thisCollectionItem).after(prevCollectionitem);\n- vueThis.setButtonsState(thisCollectionItem);\n- vueThis.setButtonsState(prevCollectionitem);\n- });\n- window.$(document).on('click', vueThis.selector.collectionContainer + vueThis.selector.moveDown, function(e) {\n- e.preventDefault();\n- e.stopPropagation();\n- let thisCollectionItem = vueThis.getCollectionItemFromPressedButton(this);\n- let nextCollectionItem = vueThis.getNextCollectionItem(thisCollectionItem);\n- window.$(thisCollectionItem).before(nextCollectionItem);\n- vueThis.setButtonsState(thisCollectionItem);\n- vueThis.setButtonsState(nextCollectionItem);\n- });\n- window.$(document).on('click', vueThis.selector.collectionContainer + vueThis.selector.expandAll, function(e) {\n- e.preventDefault();\n- const collection = $(e.target).closest(vueThis.selector.collectionContainer);\n- collection.find('.collection-item').removeClass('collapsed');\n- });\n- window\n- .$(document)\n- .on('click', vueThis.selector.collectionContainer + vueThis.selector.collapseAll, function(e) {\n- e.preventDefault();\n- const collection = $(e.target).closest(vueThis.selector.collectionContainer);\n- collection.find('.collection-item').addClass('collapsed');\n- });\n- /**\n- * Update the title dynamically.\n- */\n- $(document).ready(function() {\n- $.each(window.$(vueThis.selector.collectionContainer + vueThis.selector.item), function() {\n- updateTitle(this);\n- });\n- window.$(vueThis.selector.collectionContainer).on('keyup change', vueThis.selector.item, function() {\n- updateTitle(this);\n- });\n- });\n- /**\n- * Pass a .collection-item element to update the title\n- * with the value of the first text-based field.\n- */\n- function updateTitle(item) {\n- const label = $(item)\n- .find('.collection-item-title')\n- .first();\n- const input = $(item)\n- .find('textarea,input[type=\"text\"]')\n- .first();\n- // We use this 'innerText' trick to ensure the title is plain text.\n- var title = document.createElement('span');\n- title.innerHTML = $(input).val() ? $(input).val() : label.attr('data-label');\n- label.html(title.innerText);\n- }\n- /**\n- * Open newly inserted collection items.\n- */\n- // $(document).on('DOMNodeInserted', function(e) {\n- // if ($(e.target).hasClass('collection-item')) {\n- // $(e.target)\n- // .find('details')\n- // .first()\n- // .attr('open', '');\n- // }\n- // });\n- },\n- updated() {\n- this.setAllButtonsStates(window.$(this.$refs.collectionContainer));\n- },\n- methods: {\n- compile(element) {\n- return Vue.compile(element);\n- },\n- setAllButtonsStates(collectionContainer) {\n- let vueThis = this;\n- collectionContainer.children(vueThis.selector.item).each(function() {\n- vueThis.setButtonsState(window.$(this));\n- });\n- },\n- setButtonsState(item) {\n- //by default, enable\n- item.find(this.selector.moveUp)\n- .first()\n- .removeAttr('disabled');\n- item.find(this.selector.moveDown)\n- .first()\n- .removeAttr('disabled');\n- if (!this.getPreviousCollectionItem(item)) {\n- // first in collection\n- item.find(this.selector.moveUp)\n- .first()\n- .attr('disabled', 'disabled');\n- }\n- if (!this.getNextCollectionItem(item)) {\n- // last in collection\n- item.find(this.selector.moveDown)\n- .first()\n- .attr('disabled', 'disabled');\n- }\n- },\n- getPreviousCollectionItem(item) {\n- return item.prev('.collection-item').length === 0 ? false : item.prev('.collection-item');\n- },\n- getNextCollectionItem(item) {\n- return item.next('.collection-item').length === 0 ? false : item.next('.collection-item');\n- },\n- getCollectionItemFromPressedButton(button) {\n- return window\n- .$(button)\n- .closest('.collection-item')\n- .last();\n- },\n- addCollectionItem(event) {\n- // duplicate template without reference\n- let template = $.extend(true, {}, this.getSelectedTemplate(event));\n- const realhash = uniqid();\n- template.content = template.content.replace(new RegExp(template.hash, 'g'), realhash);\n- template.hash = realhash;\n- this.elements.push(template);\n- this.counter++;\n- },\n- getSelectedTemplate(event) {\n- const target = $(event.target).attr('data-template')\n- ? $(event.target)\n- : $(event.target).closest('[data-template]');\n- let selectValue = target.attr('data-template');\n- return this.templates.find(template => template.label === selectValue);\n- },\n- },\n-};\n-</script>\n" }, { "change_type": "DELETE", "old_path": "assets/js/app/editor/Components/.history/Collection_20220406140338.vue", "new_path": null, "diff": "-<template>\n- <div :id=\"name\" ref=\"collectionContainer\" class=\"collection-container\">\n- <div class=\"expand-buttons\">\n- <label>{{ labels.field_label }}:</label>\n-\n- <div class=\"btn-group\" role=\"group\">\n- <button class=\"btn btn-secondary btn-sm collection-expand-all\">\n- <i class=\"fas fa-fw fa-expand-alt\"></i>\n- {{ labels.expand_all }}\n- </button>\n- <button class=\"btn btn-secondary btn-sm collection-collapse-all\">\n- <i class=\"fas fa-fw fa-compress-alt\"></i>\n- {{ labels.collapse_all }}\n- </button>\n- </div>\n- </div>\n-\n- <div\n- v-for=\"element in elements\"\n- :key=\"element.hash\"\n- class=\"collection-item\"\n- :class=\"{ collapsed: variant !== 'expanded' }\"\n- >\n- <div class=\"d-block summary\">\n- <div class=\"card-header d-flex align-items-center\">\n- <!-- Initial title. This is replaced by dynamic title in JS below. -->\n- <i class=\"card-marker-caret fa fa-caret-right\"></i>\n- <span class=\"badge badge-secondary inline\" :title=\"element.label\">\n- <i :class=\"[element.icon, 'fas']\"></i>\n- </span>\n- <div class=\"collection-item-title\" :data-label=\"element.label\">\n- {{ element.label }}\n- </div>\n- <!-- Navigation buttons -->\n- <div :is=\"compile(element.buttons)\"></div>\n- </div>\n- </div>\n- <div class=\"card details\">\n- <!-- The actual field -->\n- <div :is=\"compile(element.content)\" class=\"card-body\"></div>\n- </div>\n- </div>\n-\n- <div class=\"row\">\n- <div class=\"col-12\">\n- <p v-if=\"templates.length > 1\" class=\"mt-4 mb-1\">{{ labels.add_collection_item }}:</p>\n- <div v-if=\"templates.length > 1\" class=\"dropdown\">\n- <button\n- :id=\"name + '-dropdownMenuButton'\"\n- :disabled=\"!allowMore\"\n- class=\"btn btn-secondary dropdown-toggle\"\n- type=\"button\"\n- data-toggle=\"dropdown\"\n- aria-haspopup=\"true\"\n- aria-expanded=\"false\"\n- >\n- <i class=\"fas fa-fw fa-plus\"></i> {{ labels.select }}\n- </button>\n- <div class=\"dropdown-menu\" :aria-labelledby=\"name + '-dropdownMenuButton'\">\n- <a\n- v-for=\"template in templates\"\n- :key=\"template.label\"\n- class=\"dropdown-item\"\n- :data-template=\"template.label\"\n- @click=\"addCollectionItem($event)\"\n- >\n- <i :class=\"[template.icon, 'fas fa-fw']\" />\n- {{ template.label }}\n- </a>\n- </div>\n- </div>\n- <button\n- v-else\n- type=\"button\"\n- :disabled=\"!allowMore\"\n- class=\"btn btn-secondary btn-small\"\n- :data-template=\"templates[0].label\"\n- @click=\"addCollectionItem($event)\"\n- >\n- <i :class=\"[templates[0].icon, 'fas fa-fw']\" />\n- {{ labels.add_collection_item }}\n- </button>\n- </div>\n- </div>\n- </div>\n-</template>\n-\n-<script>\n-import Vue from 'vue';\n-import $ from 'jquery';\n-var uniqid = require('locutus/php/misc/uniqid');\n-export default {\n- name: 'EditorCollection',\n- props: {\n- name: {\n- type: String,\n- required: true,\n- },\n- templates: {\n- type: Array,\n- required: true,\n- },\n- existingFields: {\n- type: Array,\n- },\n- labels: {\n- type: Object,\n- required: true,\n- },\n- limit: {\n- type: Number,\n- required: true,\n- },\n- variant: {\n- type: String,\n- required: true,\n- },\n- },\n- data() {\n- let templateSelectOptions = [];\n- return {\n- elements: this.existingFields,\n- counter: this.existingFields.length,\n- templateSelectName: 'templateSelect' + this.id,\n- templateSelectOptions: templateSelectOptions,\n- selector: {\n- collectionContainer: '#' + this.name,\n- item: ' .collection-item',\n- remove: ' .action-remove-collection-item',\n- moveUp: ' .action-move-up-collection-item',\n- moveDown: ' .action-move-down-collection-item',\n- expandAll: ' .collection-expand-all',\n- collapseAll: ' .collection-collapse-all',\n- editor: ' #editor',\n- },\n- };\n- },\n- computed: {\n- initialSelectValue() {\n- return this.templateSelectOptions[0].key;\n- },\n- allowMore: function() {\n- return this.counter < this.limit;\n- },\n- },\n- mounted() {\n- this.setAllButtonsStates(window.$(this.$refs.collectionContainer));\n- let vueThis = this;\n- /**\n- * Event listeners on collection items buttons\n- * This is a jQuery event listener, because Vue cannot handle an event emitted by a non-vue element.\n- * The collection items are not Vue elements in order to initialise them correctly within their twig template.\n- */\n- window\n- .$(document)\n- .on('click', vueThis.selector.collectionContainer + ' .collection-item .summary', function(e) {\n- e.preventDefault();\n- let thisCollectionItem = vueThis.getCollectionItemFromPressedButton(this);\n- thisCollectionItem.toggleClass('collapsed');\n- });\n- window.$(document).on('click', vueThis.selector.collectionContainer + vueThis.selector.remove, function(e) {\n- e.preventDefault();\n- e.stopPropagation();\n- let collectionContainer = window.$(this).closest(vueThis.selector.collectionContainer);\n- vueThis.getCollectionItemFromPressedButton(this).remove();\n- vueThis.setAllButtonsStates(collectionContainer);\n- vueThis.counter--;\n- });\n- window.$(document).on('click', vueThis.selector.collectionContainer + vueThis.selector.moveUp, function(e) {\n- e.preventDefault();\n- e.stopPropagation();\n- let thisCollectionItem = vueThis.getCollectionItemFromPressedButton(this);\n- let prevCollectionitem = vueThis.getPreviousCollectionItem(thisCollectionItem);\n- window.$(thisCollectionItem).after(prevCollectionitem);\n- vueThis.setButtonsState(thisCollectionItem);\n- vueThis.setButtonsState(prevCollectionitem);\n- });\n- window.$(document).on('click', vueThis.selector.collectionContainer + vueThis.selector.moveDown, function(e) {\n- e.preventDefault();\n- e.stopPropagation();\n- let thisCollectionItem = vueThis.getCollectionItemFromPressedButton(this);\n- let nextCollectionItem = vueThis.getNextCollectionItem(thisCollectionItem);\n- window.$(thisCollectionItem).before(nextCollectionItem);\n- vueThis.setButtonsState(thisCollectionItem);\n- vueThis.setButtonsState(nextCollectionItem);\n- });\n- window.$(document).on('click', vueThis.selector.collectionContainer + vueThis.selector.expandAll, function(e) {\n- e.preventDefault();\n- const collection = $(e.target).closest(vueThis.selector.collectionContainer);\n- collection.find('.collection-item').removeClass('collapsed');\n- });\n- window\n- .$(document)\n- .on('click', vueThis.selector.collectionContainer + vueThis.selector.collapseAll, function(e) {\n- e.preventDefault();\n- const collection = $(e.target).closest(vueThis.selector.collectionContainer);\n- collection.find('.collection-item').addClass('collapsed');\n- });\n- /**\n- * Update the title dynamically.\n- */\n- $(document).ready(function() {\n- $.each(window.$(vueThis.selector.collectionContainer + vueThis.selector.item), function() {\n- updateTitle(this);\n- });\n- window.$(vueThis.selector.collectionContainer).on('keyup change', vueThis.selector.item, function() {\n- updateTitle(this);\n- });\n- });\n- /**\n- * Pass a .collection-item element to update the title\n- * with the value of the first text-based field.\n- */\n- function updateTitle(item) {\n- const label = $(item)\n- .find('.collection-item-title')\n- .first();\n- const input = $(item)\n- .find('textarea,input[type=\"text\"]')\n- .first();\n- // We use this 'innerText' trick to ensure the title is plain text.\n- var title = document.createElement('span');\n- title.innerHTML = $(input).val() ? $(input).val() : label.attr('data-label');\n- label.html(title.innerText);\n- }\n- /**\n- * Open newly inserted collection items.\n- */\n- // $(document).on('DOMNodeInserted', function(e) {\n- // if ($(e.target).hasClass('collection-item')) {\n- // $(e.target)\n- // .find('details')\n- // .first()\n- // .attr('open', '');\n- // }\n- // });\n- },\n- updated() {\n- this.setAllButtonsStates(window.$(this.$refs.collectionContainer));\n- },\n- methods: {\n- compile(element) {\n- return Vue.compile(element);\n- },\n- setAllButtonsStates(collectionContainer) {\n- let vueThis = this;\n- collectionContainer.children(vueThis.selector.item).each(function() {\n- vueThis.setButtonsState(window.$(this));\n- });\n- },\n- setButtonsState(item) {\n- //by default, enable\n- item.find(this.selector.moveUp)\n- .first()\n- .removeAttr('disabled');\n- item.find(this.selector.moveDown)\n- .first()\n- .removeAttr('disabled');\n- if (!this.getPreviousCollectionItem(item)) {\n- // first in collection\n- item.find(this.selector.moveUp)\n- .first()\n- .attr('disabled', 'disabled');\n- }\n- if (!this.getNextCollectionItem(item)) {\n- // last in collection\n- item.find(this.selector.moveDown)\n- .first()\n- .attr('disabled', 'disabled');\n- }\n- },\n- getPreviousCollectionItem(item) {\n- return item.prev('.collection-item').length === 0 ? false : item.prev('.collection-item');\n- },\n- getNextCollectionItem(item) {\n- return item.next('.collection-item').length === 0 ? false : item.next('.collection-item');\n- },\n- getCollectionItemFromPressedButton(button) {\n- return window\n- .$(button)\n- .closest('.collection-item')\n- .last();\n- },\n- addCollectionItem(event) {\n- // duplicate template without reference\n- let template = $.extend(true, {}, this.getSelectedTemplate(event));\n- const realhash = uniqid();\n- template.content = template.content.replace(new RegExp(template.hash, 'g'), realhash);\n- template.hash = realhash;\n- this.elements.push(template);\n- this.counter++;\n- },\n- getSelectedTemplate(event) {\n- const target = $(event.target).attr('data-template')\n- ? $(event.target)\n- : $(event.target).closest('[data-template]');\n- let selectValue = target.attr('data-template');\n- return this.templates.find(template => template.label === selectValue);\n- },\n- },\n-};\n-</script>\n" } ]
PHP
MIT License
bolt/core
clean(file-system): remove '.history' directory
95,141
08.04.2022 14:53:16
-7,200
1085fdf969585b11e34f50ff075a8f6203847ae6
fix(backend-menu): parent menu items use wrong icon
[ { "change_type": "MODIFY", "old_path": "src/Menu/BackendMenuBuilder.php", "new_path": "src/Menu/BackendMenuBuilder.php", "diff": "@@ -364,12 +364,13 @@ final class BackendMenuBuilder implements BackendMenuBuilderInterface\n}\n$label = $contentType->get('show_in_menu') ?: $t->trans('caption.other_content');\n- $icon = $icon ?? $contentType->get('icon_many');\nif (! $menu->getChild($label)) {\n// Add the top level item\n+ $icon = $contentType->get('icon_many');\n$slug = $slugify->slugify($label);\n+\n$menu->addChild($label, [\n'uri' => $this->urlGenerator->generate('bolt_menupage', ['slug' => $slug]),\n'extras' => [\n" } ]
PHP
MIT License
bolt/core
fix(backend-menu): parent menu items use wrong icon
95,144
10.04.2022 12:33:02
-7,200
39673005800216bca7630e03a865c425266f8bb1
Feature: Add caching for the file listings
[ { "change_type": "MODIFY", "old_path": "config/bolt/config.yaml", "new_path": "config/bolt/config.yaml", "diff": "@@ -10,13 +10,14 @@ secret: '%env(APP_SECRET)%'\n# Set the caching configuration for various areas of Bolt.\n# The expires_after is counted in seconds.\n#caching:\n-# related_options: 60\n-# canonical: 60\n-# formatter: 60\n-# selectoptions: 60\n-# content_array: 60\n-# frontend_menu: 60\n-# backend_menu: 60\n+# related_options: 3600\n+# canonical: 1800\n+# formatter: 180\n+# selectoptions: 3600\n+# content_array: 180\n+# frontend_menu: 3600\n+# backend_menu: 3600\n+# files_index: 3600\ncaching:\nrelated_options: ~\n@@ -26,6 +27,7 @@ caching:\ncontent_array: ~\nfrontend_menu: ~\nbackend_menu: ~\n+ files_index: ~\n# The theme to use.\n#\n" }, { "change_type": "MODIFY", "old_path": "config/services.yaml", "new_path": "config/services.yaml", "diff": "@@ -109,6 +109,9 @@ services:\nBolt\\Cache\\GetFormatCacher:\ndecorates: Bolt\\Utils\\ContentHelper\n+ Bolt\\Cache\\FilesIndexCacher:\n+ decorates: Bolt\\Utils\\FilesIndex\n+\nBolt\\Menu\\BackendMenuBuilderInterface: '@Bolt\\Menu\\BackendMenu'\nBolt\\Menu\\FrontendMenuBuilder: ~\n" }, { "change_type": "ADD", "old_path": null, "new_path": "src/Cache/FilesIndexCacher.php", "diff": "+<?php\n+\n+namespace Bolt\\Cache;\n+\n+use Bolt\\Utils\\FilesIndex;\n+use Tightenco\\Collect\\Support\\Collection;\n+\n+class FilesIndexCacher extends FilesIndex implements CachingInterface\n+{\n+ use CachingTrait;\n+\n+ public const CACHE_CONFIG_KEY = 'files_index';\n+\n+ public function get(string $path, string $type, string $basePath): Collection\n+ {\n+ $this->setCacheTags(['fileslisting']);\n+ $this->setCacheKey([$path, $type]);\n+\n+ return $this->execute([parent::class, __FUNCTION__], [$path, $type, $basePath]);\n+ }\n+}\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/Backend/Async/FileListingController.php", "new_path": "src/Controller/Backend/Async/FileListingController.php", "diff": "@@ -5,15 +5,14 @@ declare(strict_types=1);\nnamespace Bolt\\Controller\\Backend\\Async;\nuse Bolt\\Configuration\\Config;\n+use Bolt\\Utils\\FilesIndex;\nuse Bolt\\Utils\\PathCanonicalize;\n-use Symfony\\Component\\Finder\\Finder;\nuse Symfony\\Component\\HttpFoundation\\JsonResponse;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\RequestStack;\nuse Symfony\\Component\\HttpFoundation\\Response;\nuse Symfony\\Component\\Routing\\Annotation\\Route;\nuse Symfony\\Component\\Security\\Core\\Security;\n-use Tightenco\\Collect\\Support\\Collection;\nuse Webmozart\\PathUtil\\Path;\nclass FileListingController implements AsyncZoneInterface\n@@ -30,12 +29,16 @@ class FileListingController implements AsyncZoneInterface\n/** @var string */\nprivate $publicPath;\n- public function __construct(Config $config, RequestStack $requestStack, Security $security, string $projectDir, string $publicFolder)\n+ /** @var FilesIndex */\n+ private $filesIndex;\n+\n+ public function __construct(Config $config, RequestStack $requestStack, Security $security, string $projectDir, string $publicFolder, FilesIndex $filesIndex)\n{\n$this->config = $config;\n$this->request = $requestStack->getCurrentRequest();\n$this->security = $security;\n$this->publicPath = $projectDir . DIRECTORY_SEPARATOR . $publicFolder;\n+ $this->filesIndex = $filesIndex;\n}\n/**\n@@ -45,53 +48,23 @@ class FileListingController implements AsyncZoneInterface\n{\n$locationName = $this->request->query->get('location', 'files');\n$type = $this->request->query->get('type', '');\n+ $locationTopLevel = explode('/', Path::canonicalize($locationName))[0];\n- if (! $this->security->isGranted('list_files:' . $locationName)) {\n+ if (! $this->security->isGranted('list_files:' . $locationTopLevel)) {\nreturn new JsonResponse('permission denied', Response::HTTP_UNAUTHORIZED);\n}\n// @todo: config->getPath does not return the correct relative URL.\n// Hence, we use the Path::makeRelative. Fix this once config generates the correct relative path.\n$relativeLocation = Path::makeRelative($this->config->getPath($locationName, false), $this->publicPath);\n+ $relativeTopLocation = Path::makeRelative($this->config->getPath($locationTopLevel, false), $this->publicPath);\n// Do not allow any path outside of the public directory.\n$path = PathCanonicalize::canonicalize($this->publicPath, $relativeLocation);\n+ $basePath = PathCanonicalize::canonicalize($this->publicPath, $relativeTopLocation);\n- $files = $this->getFilesIndex($path, $type);\n+ $files = $this->filesIndex->get($path, $type, $basePath);\nreturn new JsonResponse($files);\n}\n-\n- private function getFilesIndex(string $path, string $type): Collection\n- {\n- if ($type === 'images') {\n- $glob = sprintf('*.{%s}', $this->config->getMediaTypes()->implode(','));\n- } else {\n- $glob = null;\n- }\n-\n- $files = [];\n-\n- foreach ($this->findFiles($path, $glob) as $file) {\n- $files[] = [\n- 'group' => Path::canonicalize($file->getRelativePath()),\n- 'value' => Path::canonicalize($file->getRelativePathname()),\n- 'text' => $file->getFilename(),\n- ];\n- }\n-\n- return new Collection($files);\n- }\n-\n- private function findFiles(string $path, ?string $glob = null): Finder\n- {\n- $finder = new Finder();\n- $finder->in($path)->depth('< 5')->sortByType()->files();\n-\n- if ($glob) {\n- $finder->name($glob);\n- }\n-\n- return $finder;\n- }\n}\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/Backend/Async/UploadController.php", "new_path": "src/Controller/Backend/Async/UploadController.php", "diff": "@@ -25,6 +25,7 @@ use Symfony\\Component\\HttpFoundation\\RequestStack;\nuse Symfony\\Component\\HttpFoundation\\Response;\nuse Symfony\\Component\\Routing\\Annotation\\Route;\nuse Symfony\\Component\\Security\\Core\\Exception\\InvalidCsrfTokenException;\n+use Symfony\\Contracts\\Cache\\TagAwareCacheInterface;\nuse Throwable;\nuse Webmozart\\PathUtil\\Path;\n@@ -53,7 +54,16 @@ class UploadController extends AbstractController implements AsyncZoneInterface\n/** @var Filesystem */\nprivate $filesystem;\n- public function __construct(MediaFactory $mediaFactory, EntityManagerInterface $em, Config $config, TextExtension $textExtension, RequestStack $requestStack, Filesystem $filesystem)\n+ /** @var TagAwareCacheInterface */\n+ private $cache;\n+\n+ public function __construct(MediaFactory $mediaFactory,\n+ EntityManagerInterface $em,\n+ Config $config,\n+ TextExtension $textExtension,\n+ RequestStack $requestStack,\n+ Filesystem $filesystem,\n+ TagAwareCacheInterface $cache)\n{\n$this->mediaFactory = $mediaFactory;\n$this->em = $em;\n@@ -61,6 +71,7 @@ class UploadController extends AbstractController implements AsyncZoneInterface\n$this->textExtension = $textExtension;\n$this->request = $requestStack->getCurrentRequest();\n$this->filesystem = $filesystem;\n+ $this->cache = $cache;\n}\n/**\n@@ -160,6 +171,9 @@ class UploadController extends AbstractController implements AsyncZoneInterface\nreturn $this->sanitiseFilename($name);\n});\n+ // Clear the 'files_index' cache.\n+ $this->cache->invalidateTags(['fileslisting']);\n+\ntry {\n/** @var UploadedFile|File|ResultInterface|Collection $result */\n$result = $uploadHandler->process($request->files->all());\n" }, { "change_type": "ADD", "old_path": null, "new_path": "src/Utils/FilesIndex.php", "diff": "+<?php\n+\n+namespace Bolt\\Utils;\n+\n+use Bolt\\Configuration\\Config;\n+use Symfony\\Component\\Finder\\Finder;\n+use Tightenco\\Collect\\Support\\Collection;\n+use Webmozart\\PathUtil\\Path;\n+\n+class FilesIndex\n+{\n+ /** @var Config */\n+ private $config;\n+\n+ public function __construct(Config $config)\n+ {\n+ $this->config = $config;\n+ }\n+\n+ public function get(string $path, string $type, string $basePath): Collection\n+ {\n+ if ($type === 'images') {\n+ $glob = sprintf('*.{%s}', $this->config->getMediaTypes()->implode(','));\n+ } else {\n+ $glob = null;\n+ }\n+\n+ $files = [];\n+\n+ foreach (self::findFiles($path, $glob) as $file) {\n+ $files[] = [\n+ 'group' => basename($basePath),\n+ 'value' => Path::makeRelative($file->getRealPath(), $basePath),\n+ 'text' => $file->getFilename(),\n+ ];\n+ }\n+\n+ return new Collection($files);\n+ }\n+\n+ private function findFiles(string $path, string $glob): Finder\n+ {\n+ $finder = new Finder();\n+ $finder->in($path)->depth('< 5')->sortByType()->files();\n+\n+ if ($glob) {\n+ $finder->name($glob);\n+ }\n+\n+ return $finder;\n+ }\n+}\n\\ No newline at end of file\n" }, { "change_type": "ADD", "old_path": null, "new_path": "yaml-migrations/m_2022-04-10-services.yaml", "diff": "+# Adding the new services for Bolt 5.1.8\n+# See: https://github.com/bolt/core/pull/3174\n+\n+file: services.yaml\n+since: 5.1.8\n+\n+add:\n+ services:\n+ Bolt\\Cache\\FilesIndexCacher:\n+ decorates: Bolt\\Utils\\FilesIndex\n" } ]
PHP
MIT License
bolt/core
Feature: Add caching for the file listings
95,115
10.04.2022 16:09:46
-7,200
a84c3873a3ec5d2d445e28c18171d3a9258eefd6
fix record_listing.spec.js by taking into account the newly added content-type
[ { "change_type": "MODIFY", "old_path": "tests/cypress/integration/record_listing.spec.js", "new_path": "tests/cypress/integration/record_listing.spec.js", "diff": "@@ -92,14 +92,14 @@ describe('As an Admin I want to use record listing', () => {\ncy.get('.admin__sidebar--menu').should('contain', 'Configuration');\n- cy.get('#bolt--sidebar ul > li:nth-child(11) > a').trigger('mouseover');\n- cy.get('#bolt--sidebar ul > li:nth-child(11) li:nth-child(1)').find('span').should('contain', 'View Configuration');\n- cy.get('#bolt--sidebar ul li:nth-child(11) ul > li:nth-child(2) > a').find('span').should('contain', 'Users & Permissions');\n- cy.get('#bolt--sidebar ul li:nth-child(11) ul > li:nth-child(3) > a').find('span').should('contain', 'Main Configuration');\n- cy.get('#bolt--sidebar ul li:nth-child(11) ul > li:nth-child(4) > a').find('span').should('contain', 'Content Types');\n- cy.get('#bolt--sidebar ul li:nth-child(11) ul > li:nth-child(5) > a').find('span').should('contain', 'Taxonomies');\n- cy.get('#bolt--sidebar ul li:nth-child(11) ul > li:nth-child(6) > a').find('span').should('contain', 'Menu set up');\n- cy.get('#bolt--sidebar ul li:nth-child(11) ul > li:nth-child(7) > a').find('span').should('contain', 'Routing configuration');\n- cy.get('#bolt--sidebar ul li:nth-child(11) ul > li:nth-child(8) > a').find('span').should('contain', 'All configuration files');\n+ cy.get('#bolt--sidebar ul > li:nth-child(12) > a').trigger('mouseover');\n+ cy.get('#bolt--sidebar ul > li:nth-child(12) li:nth-child(1)').find('span').should('contain', 'View Configuration');\n+ cy.get('#bolt--sidebar ul li:nth-child(12) ul > li:nth-child(2) > a').find('span').should('contain', 'Users & Permissions');\n+ cy.get('#bolt--sidebar ul li:nth-child(12) ul > li:nth-child(3) > a').find('span').should('contain', 'Main Configuration');\n+ cy.get('#bolt--sidebar ul li:nth-child(12) ul > li:nth-child(4) > a').find('span').should('contain', 'Content Types');\n+ cy.get('#bolt--sidebar ul li:nth-child(12) ul > li:nth-child(5) > a').find('span').should('contain', 'Taxonomies');\n+ cy.get('#bolt--sidebar ul li:nth-child(12) ul > li:nth-child(6) > a').find('span').should('contain', 'Menu set up');\n+ cy.get('#bolt--sidebar ul li:nth-child(12) ul > li:nth-child(7) > a').find('span').should('contain', 'Routing configuration');\n+ cy.get('#bolt--sidebar ul li:nth-child(12) ul > li:nth-child(8) > a').find('span').should('contain', 'All configuration files');\n})\n});\n" } ]
PHP
MIT License
bolt/core
fix record_listing.spec.js by taking into account the newly added content-type
95,156
12.04.2022 04:32:49
-3,600
6def7db8b4c2af111e9d5b992a54fc3d7ff3fbb8
FOr replace JSON_VALUE with JSON_UNQUOTE (compatible with earlier versions of MySQL)
[ { "change_type": "MODIFY", "old_path": "config/packages/doctrine.yaml", "new_path": "config/packages/doctrine.yaml", "diff": "@@ -32,9 +32,9 @@ doctrine:\ndql:\nstring_functions:\nJSON_EXTRACT: Bolt\\Doctrine\\Functions\\JsonExtract\n- JSON_VALUE: Bolt\\Doctrine\\Functions\\JsonValue\nJSON_GET_TEXT: Scienta\\DoctrineJsonFunctions\\Query\\AST\\Functions\\Postgresql\\JsonGetText\nJSON_SEARCH: Scienta\\DoctrineJsonFunctions\\Query\\AST\\Functions\\Mysql\\JsonSearch\n+ JSON_UNQUOTE: Bolt\\Doctrine\\Functions\\JsonUnquote\nCAST: Bolt\\Doctrine\\Query\\Cast\nnumeric_functions:\nRAND: Bolt\\Doctrine\\Functions\\Rand\n" }, { "change_type": "RENAME", "old_path": "src/Doctrine/Functions/JsonValue.php", "new_path": "src/Doctrine/Functions/JsonUnquote.php", "diff": "@@ -8,19 +8,19 @@ use Doctrine\\ORM\\Query\\SqlWalker;\nuse Scienta\\DoctrineJsonFunctions\\Query\\AST\\Functions\\AbstractJsonFunctionNode;\n/**\n- * \"JSON_VALUE\" \"(\" StringPrimary \",\" StringPrimary {\",\" StringPrimary }* \")\"\n+ * \"JSON_UNQUOTE\" \"(\" StringPrimary \")\"\n*\n- * See: \"JSON_VALUE: Bolt\\Doctrine\\Functions\\JsonValue\" in `config/packages/doctrine.yaml`\n+ * See: \"JSON_UNQUOTE: Bolt\\Doctrine\\Functions\\JsonUnquote\" in `config/packages/doctrine.yaml`\n*/\n-class JsonValue extends AbstractJsonFunctionNode\n+class JsonUnquote extends AbstractJsonFunctionNode\n{\n- public const FUNCTION_NAME = 'JSON_VALUE';\n+ public const FUNCTION_NAME = 'JSON_UNQUOTE';\n/** @var string[] */\n- protected $requiredArgumentTypes = [self::STRING_PRIMARY_ARG, self::STRING_PRIMARY_ARG];\n+ protected $requiredArgumentTypes = [self::STRING_PRIMARY_ARG];\n/** @var string[] */\n- protected $optionalArgumentTypes = [self::STRING_PRIMARY_ARG];\n+ protected $optionalArgumentTypes = [];\n/** @var bool */\nprotected $allowOptionalArgumentRepeat = true;\n" }, { "change_type": "MODIFY", "old_path": "src/Doctrine/JsonHelper.php", "new_path": "src/Doctrine/JsonHelper.php", "diff": "@@ -33,7 +33,7 @@ class JsonHelper\n$resultWhere = 'JSON_GET_TEXT(' . $where . ', 0)';\n} elseif ($version->getPlatform()['driver_name'] === 'mysql') {\n// MySQL\n- $resultWhere = 'JSON_VALUE(' . $where . \", '$[0]')\";\n+ $resultWhere = 'JSON_UNQUOTE(JSON_EXTRACT(' . $where . \", '$[0]'))\";\n} else {\n// SQLite\n$resultWhere = 'JSON_EXTRACT(' . $where . \", '$[0]')\";\n" }, { "change_type": "ADD", "old_path": null, "new_path": "yaml-migrations/m_2022-04-12-doctrine.yaml", "diff": "+# Adding JSON_UNQUOTE, see https://github.com/bolt/core/pull/3135\n+\n+file: packages/doctrine.yaml\n+since: 5.1.8\n+\n+add:\n+ doctrine:\n+ orm:\n+ dql:\n+ string_functions:\n+ JSON_UNQUOTE: Bolt\\Doctrine\\Functions\\JsonUnquote\n" } ]
PHP
MIT License
bolt/core
FOr #2088, replace JSON_VALUE with JSON_UNQUOTE (compatible with earlier versions of MySQL)
95,191
12.04.2022 11:40:43
-7,200
2e23f15ab29597ae6a50ea7bcedc9eaca8fc78e6
Lets see if we can add videos to cypress evidence
[ { "change_type": "MODIFY", "old_path": ".github/workflows/cypress_tests.yaml", "new_path": ".github/workflows/cypress_tests.yaml", "diff": "@@ -66,5 +66,5 @@ jobs:\n- uses: actions/upload-artifact@v1\nif: failure()\nwith:\n- name: cypress-screenshots\n- path: tests/cypress/screenshots\n+ name: cypress-evidence\n+ path: tests/cypress/evidence\n" }, { "change_type": "MODIFY", "old_path": "tests/cypress/cypress-ci.json", "new_path": "tests/cypress/cypress-ci.json", "diff": "{\n\"integrationFolder\": \"tests/cypress/integration\",\n\"pluginsFile\": \"tests/cypress/plugins/index.js\",\n- \"screenshotsFolder\": \"tests/cypress/screenshots\",\n- \"video\": false,\n+ \"screenshotsFolder\": \"tests/cypress/evidence/screenshots\",\n+ \"videosFolder\": \"tests/cypress/evidence/videos\",\n\"supportFile\": \"tests/cypress/support/index.js\",\n\"baseUrl\": \"http://127.0.0.1:8088\",\n\"projectId\": \"54gs3j\",\n" }, { "change_type": "MODIFY", "old_path": "tests/cypress/cypress-dev.json", "new_path": "tests/cypress/cypress-dev.json", "diff": "{\n\"integrationFolder\": \"tests/cypress/integration\",\n\"pluginsFile\": \"tests/cypress/plugins/index.js\",\n- \"screenshotsFolder\": \"tests/cypress/screenshots\",\n- \"videosFolder\": \"tests/cypress/videos\",\n+ \"screenshotsFolder\": \"tests/cypress/evidence/screenshots\",\n+ \"videosFolder\": \"tests/cypress/evidence/videos\",\n\"supportFile\": \"tests/cypress/support/index.js\",\n\"baseUrl\": \"https://127.0.0.1:8001\",\n\"viewportWidth\": 1920,\n" } ]
PHP
MIT License
bolt/core
Lets see if we can add videos to cypress evidence
95,191
12.04.2022 12:06:01
-7,200
5740fffc4bbd1af9ff4b1c6032928d2a8ebf966c
Update widgets.spec.js Make cypress fail so we can actually see the evidence
[ { "change_type": "MODIFY", "old_path": "tests/cypress/integration/widgets.spec.js", "new_path": "tests/cypress/integration/widgets.spec.js", "diff": "@@ -4,6 +4,7 @@ describe('As an admin I want to see the News Widget', () => {\nit('checks if News widget exists', () => {\ncy.login();\ncy.visit('/bolt/');\n- cy.get('#widget-news-widget').should('contain', 'Latest Bolt News');\n+ // Temp I need cypress to fail\n+ cy.get('#widget-news-widget').should('contain', 'Latest Bolt News TEST');\n})\n});\n" } ]
PHP
MIT License
bolt/core
Update widgets.spec.js Make cypress fail so we can actually see the evidence
95,191
12.04.2022 12:33:38
-7,200
fa924e91afbe9705aaea947f92acb16eee5fb260
Update widgets.spec.js It works
[ { "change_type": "MODIFY", "old_path": "tests/cypress/integration/widgets.spec.js", "new_path": "tests/cypress/integration/widgets.spec.js", "diff": "@@ -4,7 +4,6 @@ describe('As an admin I want to see the News Widget', () => {\nit('checks if News widget exists', () => {\ncy.login();\ncy.visit('/bolt/');\n- // Temp I need cypress to fail\n- cy.get('#widget-news-widget').should('contain', 'Latest Bolt News TEST');\n+ cy.get('#widget-news-widget').should('contain', 'Latest Bolt News');\n})\n});\n" } ]
PHP
MIT License
bolt/core
Update widgets.spec.js It works
95,115
14.04.2022 00:09:59
-7,200
8e65732d12b24b18d2cfe6c3439d4e4b5c129a98
improved locating "Uploaded files" link + text in it in the test, to make it less brittle
[ { "change_type": "MODIFY", "old_path": "tests/cypress/integration/editor_permissions.spec.js", "new_path": "tests/cypress/integration/editor_permissions.spec.js", "diff": "@@ -46,7 +46,8 @@ describe('Check all editors privileges', () => {\ncy.login('john_editor', 'john%1');\ncy.url().should('contain', '/bolt/');\n// cy.get('ul[class=\"admin__sidebar--menu\"]').find('li').eq(11).trigger('mouseover');\n- cy.get('body').find('span').eq(58).should('contain', \"Uploaded files\");\n+ // cy.get('body').find('span').eq(58).should('contain', \"Uploaded files\");\n+ cy.get('a[href=\"/bolt/menu/filemanagement\"]').contains('Uploaded files');\ncy.get('a[href=\"/bolt/menu/filemanagement\"]').click();\ncy.url().should('contain', '/bolt/menu/filemanagement');\n" } ]
PHP
MIT License
bolt/core
improved locating "Uploaded files" link + text in it in the test, to make it less brittle
95,115
14.04.2022 00:13:45
-7,200
9d6e542041167f9d02eabc5036ff297fc229c1a6
added way to use 'preset' system to specify parts of the taxonomy as well as 'normal' fields, to make sure the test doesn't depend on (seeded)randomness.
[ { "change_type": "MODIFY", "old_path": "src/DataFixtures/ContentFixtures.php", "new_path": "src/DataFixtures/ContentFixtures.php", "diff": "@@ -131,17 +131,29 @@ class ContentFixtures extends BaseFixture implements DependentFixtureInterface,\nforeach ($contentType['taxonomy'] as $taxonomySlug) {\nif ($taxonomySlug === 'categories') {\n+ if (isset($preset['taxonomy:categories'])) {\n+ // preset categories\n+ foreach ($preset['taxonomy:categories'] as $taxonomyCategoryLabel) {\n+ $taxonomy = $this->getReference('taxonomy_categories_' . $taxonomyCategoryLabel);\n+ $content->addTaxonomy($taxonomy);\n+ }\n+ // add no additional random categories\n+ $taxonomyAmount = 0;\n+ } else {\n$taxonomyAmount = 2;\n+ }\n} elseif ($taxonomySlug === 'tags') {\n$taxonomyAmount = 4;\n} else {\n$taxonomyAmount = 1;\n}\n+ if ($taxonomyAmount > 0) {\nforeach ($this->getRandomTaxonomies($taxonomySlug, $taxonomyAmount) as $taxonomy) {\n$content->addTaxonomy($taxonomy);\n}\n}\n+ }\n$refKey = sprintf('content_%s_%s', $contentType['slug'], $content->getSlug());\n$this->setReference($refKey, $content);\n@@ -399,6 +411,7 @@ class ContentFixtures extends BaseFixture implements DependentFixtureInterface,\n$records['entries'][] = [\n'title' => 'This is a record in the \"Entries\" ContentType',\n'slug' => 'This is a record in the \"Entries\" ContentType',\n+ 'taxonomy:categories' => ['love', 'books'],\n];\n$records['blocks'][] = [\n'title' => 'About This Site',\n" } ]
PHP
MIT License
bolt/core
added way to use 'preset' system to specify parts of the taxonomy as well as 'normal' fields, to make sure the test doesn't depend on (seeded)randomness.
95,121
25.04.2022 14:10:08
-7,200
33779dc8a9e20c809bcc1e4a5793465da96d364e
Update Cypress readme This update is to give a more clear explanation of what cypress evidence is and where to find it.
[ { "change_type": "MODIFY", "old_path": "tests/cypress/README.md", "new_path": "tests/cypress/README.md", "diff": "@@ -14,15 +14,22 @@ Usage\nTo start a server on this port you can use this command inside your project folder:\n```\n- php -S localhost:8088\n+ php -S localhost:8000\n```\n- To run all tests use:\n+ ### To run all tests use:\n```\nnpm run cypress:dev\n```\n+ This one will run all the tests that are located in tests/cypress/integration.\n+ Once this is finished it will show a table on the command line which looks like this:\n- To run a specific test use:\n+ ![Screenshot 2022-04-25 at 13 49 42](https://user-images.githubusercontent.com/40595903/165083309-004f8c80-0d15-4400-9107-876d4c07e615.png)\n+\n+ This shows all the tests that have been run and gives an overview of which failed and which succeeded. At the bottom you have a summary of how many tests failed.\n+\n+\n+ ### To run a specific test use:\n```\nnpm run cypress:dev -- --spec \"./tests/cypress/integration/your_test.spec.js\"\n```\n@@ -31,6 +38,35 @@ Usage\nYou can add additional options to the run command by typing `--` and the option you want after it. A list of all options is available [here](https://docs.cypress.io/guides/guides/command-line#Commands).\n+Evidence\n+---\n+ Once you've run any of these commands you can take a look at some 'evidence' cypress makes when running the tests.\n+ These are videos and screenshots of what it did during the test. These videos can be really informing about what failed and why.\n+\n+ #### Here you have an example of an screenshot of a failed test:\n+\n+ ![As an Admin I am able to use the files section -- checks if an admin can cancel deleting files in the Files section (failed)](https://user-images.githubusercontent.com/40595903/165084073-c2becad6-b2db-4c48-bfce-e5f14e18ce05.png)\n+\n+ #### And here is an example of an video of a test:\n+\n+ https://user-images.githubusercontent.com/40595903/165084182-b749f781-266f-46b7-a821-1e145991bbc2.mp4\n+\n+ #### All of these images and videos are available in `tests/cypress/evidence`.\n+\n+ The tests that are run via **GitHub** also provide these videos and screenshots but you can find them by going to the test tab on a pull request:\n+\n+ <img width=\"1431\" alt=\"Screenshot 2022-04-25 at 13 58 10\" src=\"https://user-images.githubusercontent.com/40595903/165084804-c350f108-9682-4eeb-af22-9ace48d92a68.png\">\n+\n+ After going there you need to click on \"> Cypress tests\":\n+\n+ <img width=\"1439\" alt=\"Screenshot 2022-04-25 at 14 00 16\" src=\"https://user-images.githubusercontent.com/40595903/165085204-a86cd0ef-82ac-4895-9d23-9beef208d3b0.png\">\n+\n+ And then (this only shows up when the test has failed) scroll down to Artifacts and download `cypress-evidence`:\n+\n+ <img width=\"1055\" alt=\"Screenshot 2022-04-25 at 14 03 36\" src=\"https://user-images.githubusercontent.com/40595903/165085478-fd176fc1-fb68-481c-90fe-2490ad660331.png\">\n+\n+\n+\nWriting / editing tests\n---\n### Writing\n" } ]
PHP
MIT License
bolt/core
Update Cypress readme This update is to give a more clear explanation of what cypress evidence is and where to find it.
95,168
01.03.2022 17:39:29
-3,600
c19ccd2258af7576f18af40fed5c0654e332bcac
Upgrade to Bootstrap 5 and update PostCSS
[ { "change_type": "MODIFY", "old_path": "package.json", "new_path": "package.json", "diff": "\"axios\": \"^0.21.1\",\n\"baguettebox.js\": \"^1.11.1\",\n\"bootbox\": \"^5.5.2\",\n- \"bootstrap\": \"^4.5.3\",\n+ \"bootstrap\": \"^5.1.3\",\n\"browserslist\": \"^4.16.7\",\n\"caniuse-lite\": \"^1.0.30001249\",\n\"codemirror\": \"^5.62.2\",\n\"jest-serializer-vue\": \"^2.0.2\",\n\"pa11y-ci\": \"^2.4.0\",\n\"postcss-loader\": \"^4.3.0\",\n- \"postcss-preset-env\": \"^6.7.0\",\n+ \"postcss-preset-env\": \"^7.4.1\",\n\"prettier\": \"^1.19.1\",\n\"regenerator-runtime\": \"^0.13.9\",\n\"sass\": \"^1.37.5\",\n" } ]
PHP
MIT License
bolt/core
Upgrade to Bootstrap 5 and update PostCSS
95,168
01.03.2022 17:42:00
-3,600
87e23259a57fe3cd989c71009d5e60f7c0fd9813
Function hover() is deprecated, use :hover pseudo class instead
[ { "change_type": "MODIFY", "old_path": "assets/scss/init/_mixins.scss", "new_path": "assets/scss/init/_mixins.scss", "diff": "background-color: var(--#{$color});\nborder-color: var(--#{$color});\n// hover\n- @include hover {\n+ &:hover {\nbackground-color: var(--#{$color}-600);\nborder-color: var(--#{$color}-600);\n}\nborder-color: var(--#{$color});\n// hover\n- @include hover {\n+ &:hover {\nbackground-color: var(--#{$color}-600);\nborder-color: var(--#{$color}-600);\n}\n" } ]
PHP
MIT License
bolt/core
Function hover() is deprecated, use :hover pseudo class instead
95,168
01.03.2022 17:45:37
-3,600
9784c2023c08e0e765296f32dea1d08843d2e1ba
Add colors variable and use those instead of custom CSS variables Some Bootstrap mixins do not accept $color variables as custom CSS variables. The hex value of the color needs to be passed instead
[ { "change_type": "MODIFY", "old_path": "assets/scss/init/_variables.scss", "new_path": "assets/scss/init/_variables.scss", "diff": "//** Init | Variables\n+// Colors variables\n+$background: #fbfaf9;\n+$primary: #255687;\n-$body-bg: var(--background);\n+$body-bg: $background;\n$letter-spacing: 0;\n@@ -42,7 +45,7 @@ $btn-disabled-opacity: 0.75;\n// Form controls\n$border-radius: 0.15rem;\n-$component-active-bg: var(--primary);\n+$component-active-bg: $primary;\n$input-focus-border-color: var(--primary-400);\n$custom-control-indicator-active-bg: var(--primary-400);\n$custom-range-thumb-active-bg: var(--primary-400);\n@@ -103,7 +106,7 @@ $grid-breakpoints: (\n// This number determines of a button has white or black text (a11y)\n// 150: about equal to 3.0 color contrast ( WCAG2 for bold and texts above 18pts).\n// 117: for 4.5 color contrast (WCAG2 for normal text) (see ~bootstrap/_functions.scss for use in function)\n-$yiq-contrasted-threshold: 150;\n+$min-contrast-ratio: 150;\n// Variables overriding Bootstrap\n$toast-background-color: #fbfaf9;\n" } ]
PHP
MIT License
bolt/core
Add colors variable and use those instead of custom CSS variables Some Bootstrap mixins do not accept $color variables as custom CSS variables. The hex value of the color needs to be passed instead