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 |
05.01.2020 08:05:40
| -3,600 |
da98c5a1e89920afea6e9e2f40a7fabae1f3a338
|
Some cleanup for logfiles
|
[
{
"change_type": "MODIFY",
"old_path": "config/packages/dev/monolog.yaml",
"new_path": "config/packages/dev/monolog.yaml",
"diff": "monolog:\n- channels: ['db']\nhandlers:\nmain:\ntype: stream\n@@ -18,7 +17,3 @@ monolog:\ntype: console\nprocess_psr_3_messages: false\nchannels: ['!event', '!doctrine', '!console']\n- db:\n- channels: ['db']\n- type: service\n- id: Bolt\\Log\\LogHandler\n\\ No newline at end of file\n"
},
{
"change_type": "RENAME",
"old_path": "config/packages/test/monolog.yaml",
"new_path": "config/packages/monolog.yaml",
"diff": ""
},
{
"change_type": "MODIFY",
"old_path": "config/packages/prod/monolog.yaml",
"new_path": "config/packages/prod/monolog.yaml",
"diff": "monolog:\n- channels: ['db']\nhandlers:\nmain:\ntype: fingers_crossed\n@@ -14,7 +13,3 @@ monolog:\ntype: console\nprocess_psr_3_messages: false\nchannels: ['!event', '!doctrine']\n- db:\n- channels: ['db']\n- type: service\n- id: Bolt\\Log\\LogHandler\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Frontend/HomepageController.php",
"new_path": "src/Controller/Frontend/HomepageController.php",
"diff": "@@ -45,8 +45,6 @@ class HomepageController extends TwigAwareController implements FrontendZone\n$templates = $this->templateChooser->forHomepage();\n- $this->logger->notice('Huius, Lyco, oratione locuples, rebus ipsis ielunior. Quid autem habent admirationis, cum prope accesseris?!', ['foo' => 'bar']);\n-\nreturn $this->renderTemplate($templates, ['record' => $record]);\n}\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Some cleanup for logfiles
|
95,144 |
05.01.2020 08:29:01
| -3,600 |
9906e4403a3f17af6d1df8548f44c839dabc4c28
|
Updating a bunch of deprecations: ObjectManager => EntityManagerInterface
|
[
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/Async/UploadController.php",
"new_path": "src/Controller/Backend/Async/UploadController.php",
"diff": "@@ -8,7 +8,7 @@ use Bolt\\Configuration\\Config;\nuse Bolt\\Controller\\CsrfTrait;\nuse Bolt\\Factory\\MediaFactory;\nuse Cocur\\Slugify\\Slugify;\n-use Doctrine\\Common\\Persistence\\ObjectManager;\n+use Doctrine\\ORM\\EntityManagerInterface;\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Security;\nuse Sirius\\Upload\\Handler;\nuse Sirius\\Upload\\Result\\File;\n@@ -30,13 +30,13 @@ class UploadController implements AsyncZone\n/** @var MediaFactory */\nprivate $mediaFactory;\n- /** @var ObjectManager */\n+ /** @var EntityManagerInterface */\nprivate $em;\n/** @var Config */\nprivate $config;\n- public function __construct(MediaFactory $mediaFactory, ObjectManager $em, Config $config, CsrfTokenManagerInterface $csrfTokenManager)\n+ public function __construct(MediaFactory $mediaFactory, EntityManagerInterface $em, Config $config, CsrfTokenManagerInterface $csrfTokenManager)\n{\n$this->mediaFactory = $mediaFactory;\n$this->em = $em;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/ContentEditController.php",
"new_path": "src/Controller/Backend/ContentEditController.php",
"diff": "@@ -21,7 +21,7 @@ use Bolt\\Repository\\RelationRepository;\nuse Bolt\\Repository\\TaxonomyRepository;\nuse Bolt\\TemplateChooser;\nuse Carbon\\Carbon;\n-use Doctrine\\Common\\Persistence\\ObjectManager;\n+use Doctrine\\ORM\\EntityManagerInterface;\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Security;\nuse Symfony\\Component\\HttpFoundation\\RedirectResponse;\nuse Symfony\\Component\\HttpFoundation\\Request;\n@@ -50,7 +50,7 @@ class ContentEditController extends TwigAwareController implements BackendZone\n/** @var MediaRepository */\nprivate $mediaRepository;\n- /** @var ObjectManager */\n+ /** @var EntityManagerInterface */\nprivate $em;\n/** @var UrlGeneratorInterface */\n@@ -67,7 +67,7 @@ class ContentEditController extends TwigAwareController implements BackendZone\nRelationRepository $relationRepository,\nContentRepository $contentRepository,\nMediaRepository $mediaRepository,\n- ObjectManager $em,\n+ EntityManagerInterface $em,\nUrlGeneratorInterface $urlGenerator,\nContentFillListener $contentFillListener,\nTemplateChooser $templateChooser,\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/MediaController.php",
"new_path": "src/Controller/Backend/MediaController.php",
"diff": "@@ -7,7 +7,7 @@ namespace Bolt\\Controller\\Backend;\nuse Bolt\\Configuration\\FileLocations;\nuse Bolt\\Controller\\TwigAwareController;\nuse Bolt\\Factory\\MediaFactory;\n-use Doctrine\\Common\\Persistence\\ObjectManager;\n+use Doctrine\\ORM\\EntityManagerInterface;\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Security;\nuse Symfony\\Component\\Finder\\Finder;\nuse Symfony\\Component\\HttpFoundation\\Response;\n@@ -19,7 +19,7 @@ use Webmozart\\PathUtil\\Path;\n*/\nclass MediaController extends TwigAwareController implements BackendZone\n{\n- /** @var ObjectManager */\n+ /** @var EntityManagerInterface */\nprivate $em;\n/** @var FileLocations */\n@@ -28,7 +28,7 @@ class MediaController extends TwigAwareController implements BackendZone\n/** @var MediaFactory */\nprivate $mediaFactory;\n- public function __construct(ObjectManager $em, FileLocations $fileLocations, MediaFactory $mediaFactory)\n+ public function __construct(EntityManagerInterface $em, FileLocations $fileLocations, MediaFactory $mediaFactory)\n{\n$this->em = $em;\n$this->fileLocations = $fileLocations;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/MediaEditController.php",
"new_path": "src/Controller/Backend/MediaEditController.php",
"diff": "@@ -9,7 +9,7 @@ use Bolt\\Controller\\CsrfTrait;\nuse Bolt\\Controller\\TwigAwareController;\nuse Bolt\\Entity\\Media;\nuse Bolt\\Factory\\MediaFactory;\n-use Doctrine\\Common\\Persistence\\ObjectManager;\n+use Doctrine\\ORM\\EntityManagerInterface;\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Security;\nuse Symfony\\Component\\Finder\\SplFileInfo;\nuse Symfony\\Component\\HttpFoundation\\RedirectResponse;\n@@ -27,7 +27,7 @@ class MediaEditController extends TwigAwareController implements BackendZone\n{\nuse CsrfTrait;\n- /** @var ObjectManager */\n+ /** @var EntityManagerInterface */\nprivate $em;\n/** @var UrlGeneratorInterface */\n@@ -40,7 +40,7 @@ class MediaEditController extends TwigAwareController implements BackendZone\nprivate $mediaFactory;\npublic function __construct(\n- ObjectManager $em,\n+ EntityManagerInterface $em,\nUrlGeneratorInterface $urlGenerator,\nFileLocations $fileLocations,\nMediaFactory $mediaFactory,\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/ProfileController.php",
"new_path": "src/Controller/Backend/ProfileController.php",
"diff": "@@ -9,7 +9,7 @@ use Bolt\\Common\\Str;\nuse Bolt\\Controller\\CsrfTrait;\nuse Bolt\\Controller\\TwigAwareController;\nuse Bolt\\Entity\\User;\n-use Doctrine\\Common\\Persistence\\ObjectManager;\n+use Doctrine\\ORM\\EntityManagerInterface;\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Security;\nuse Symfony\\Component\\HttpFoundation\\RedirectResponse;\nuse Symfony\\Component\\HttpFoundation\\Request;\n@@ -29,7 +29,7 @@ class ProfileController extends TwigAwareController implements BackendZone\n/** @var UrlGeneratorInterface */\nprivate $urlGenerator;\n- /** @var ObjectManager */\n+ /** @var EntityManagerInterface */\nprivate $em;\n/** @var UserPasswordEncoderInterface */\n@@ -37,7 +37,7 @@ class ProfileController extends TwigAwareController implements BackendZone\npublic function __construct(\nUrlGeneratorInterface $urlGenerator,\n- ObjectManager $em,\n+ EntityManagerInterface $em,\nUserPasswordEncoderInterface $passwordEncoder,\nCsrfTokenManagerInterface $csrfTokenManager\n) {\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/UserEditController.php",
"new_path": "src/Controller/Backend/UserEditController.php",
"diff": "@@ -9,7 +9,7 @@ use Bolt\\Common\\Str;\nuse Bolt\\Controller\\CsrfTrait;\nuse Bolt\\Controller\\TwigAwareController;\nuse Bolt\\Entity\\User;\n-use Doctrine\\Common\\Persistence\\ObjectManager;\n+use Doctrine\\ORM\\EntityManagerInterface;\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Security;\nuse Symfony\\Component\\HttpFoundation\\RedirectResponse;\nuse Symfony\\Component\\HttpFoundation\\Request;\n@@ -29,7 +29,7 @@ class UserEditController extends TwigAwareController implements BackendZone\n/** @var UrlGeneratorInterface */\nprivate $urlGenerator;\n- /** @var ObjectManager */\n+ /** @var EntityManagerInterface */\nprivate $em;\n/** @var UserPasswordEncoderInterface */\n@@ -37,7 +37,7 @@ class UserEditController extends TwigAwareController implements BackendZone\npublic function __construct(\nUrlGeneratorInterface $urlGenerator,\n- ObjectManager $em,\n+ EntityManagerInterface $em,\nUserPasswordEncoderInterface $passwordEncoder,\nCsrfTokenManagerInterface $csrfTokenManager\n) {\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Event/Subscriber/ExtensionSubscriber.php",
"new_path": "src/Event/Subscriber/ExtensionSubscriber.php",
"diff": "@@ -5,7 +5,7 @@ declare(strict_types=1);\nnamespace Bolt\\Event\\Subscriber;\nuse Bolt\\Extension\\ExtensionRegistry;\n-use Doctrine\\Common\\Persistence\\ObjectManager;\n+use Doctrine\\ORM\\EntityManagerInterface;\nuse Symfony\\Component\\Console\\ConsoleEvents;\nuse Symfony\\Component\\Console\\Event\\ConsoleCommandEvent;\nuse Symfony\\Component\\DependencyInjection\\ContainerInterface;\n@@ -23,7 +23,7 @@ class ExtensionSubscriber implements EventSubscriberInterface\n/** @var array */\nprivate $objects = [];\n- public function __construct(ContainerInterface $container, ExtensionRegistry $extensionRegistry, ObjectManager $objectManager)\n+ public function __construct(ContainerInterface $container, ExtensionRegistry $extensionRegistry, EntityManagerInterface $objectManager)\n{\n$this->extensionRegistry = $extensionRegistry;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Extension/ServicesTrait.php",
"new_path": "src/Extension/ServicesTrait.php",
"diff": "@@ -6,7 +6,7 @@ namespace Bolt\\Extension;\nuse Bolt\\Configuration\\Config;\nuse Bolt\\Widgets;\n-use Doctrine\\Common\\Persistence\\ObjectManager;\n+use Doctrine\\ORM\\EntityManagerInterface;\nuse Psr\\Container\\ContainerInterface;\nuse Symfony\\Component\\HttpFoundation\\Session\\Session;\nuse Symfony\\Component\\Stopwatch\\Stopwatch;\n@@ -15,8 +15,8 @@ use Twig\\Environment;\ntrait ServicesTrait\n{\n- /** @var ObjectManager */\n- protected $objectManager;\n+ /** @var EntityManagerInterface */\n+ protected $entityManager;\n/** @var ContainerInterface */\nprotected $container;\n@@ -29,7 +29,7 @@ trait ServicesTrait\n*/\npublic function injectObjects(array $objects): void\n{\n- $this->objectManager = $objects['manager'];\n+ $this->entityManager = $objects['manager'];\n$this->container = $objects['container'];\n}\n@@ -95,7 +95,7 @@ trait ServicesTrait\npublic function getObjectManager(): ObjectManager\n{\n- return $this->objectManager;\n+ return $this->entityManager;\n}\npublic function getStopwatch(): Stopwatch\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Security/LoginFormAuthenticator.php",
"new_path": "src/Security/LoginFormAuthenticator.php",
"diff": "@@ -7,7 +7,7 @@ namespace Bolt\\Security;\nuse Bolt\\Entity\\User;\nuse Bolt\\Entity\\UserAuthToken;\nuse Bolt\\Repository\\UserRepository;\n-use Doctrine\\Common\\Persistence\\ObjectManager;\n+use Doctrine\\ORM\\EntityManagerInterface;\nuse Psr\\Log\\LoggerInterface;\nuse Symfony\\Component\\HttpFoundation\\RedirectResponse;\nuse Symfony\\Component\\HttpFoundation\\Request;\n@@ -37,7 +37,7 @@ class LoginFormAuthenticator extends AbstractFormLoginAuthenticator\n/** @var UserPasswordEncoderInterface */\nprivate $passwordEncoder;\n- /** @var ObjectManager */\n+ /** @var EntityManagerInterface */\nprivate $em;\n/** @var LoggerInterface */\n@@ -48,7 +48,7 @@ class LoginFormAuthenticator extends AbstractFormLoginAuthenticator\nRouterInterface $router,\nCsrfTokenManagerInterface $csrfTokenManager,\nUserPasswordEncoderInterface $passwordEncoder,\n- ObjectManager $em,\n+ EntityManagerInterface $em,\nLoggerInterface $dbLogger\n) {\n$this->userRepository = $userRepository;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Security/LogoutListener.php",
"new_path": "src/Security/LogoutListener.php",
"diff": "@@ -5,7 +5,7 @@ declare(strict_types=1);\nnamespace Bolt\\Security;\nuse Bolt\\Entity\\User;\n-use Doctrine\\Common\\Persistence\\ObjectManager;\n+use Doctrine\\ORM\\EntityManagerInterface;\nuse Psr\\Log\\LoggerInterface;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\Response;\n@@ -19,7 +19,7 @@ class LogoutListener implements LogoutHandlerInterface\n/** @var LoggerInterface */\nprivate $logger;\n- public function __construct(ObjectManager $em, LoggerInterface $dbLogger)\n+ public function __construct(EntityManagerInterface $em, LoggerInterface $dbLogger)\n{\n$this->em = $em;\n$this->logger = $dbLogger;\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/php/Security/LoginFormAuthenticatorTest.php",
"new_path": "tests/php/Security/LoginFormAuthenticatorTest.php",
"diff": "@@ -8,7 +8,7 @@ use Bolt\\Entity\\User;\nuse Bolt\\Log\\LogHandler;\nuse Bolt\\Repository\\UserRepository;\nuse Bolt\\Security\\LoginFormAuthenticator;\n-use Doctrine\\Common\\Persistence\\ObjectManager;\n+use Doctrine\\ORM\\EntityManagerInterface;\nuse PHPUnit\\Framework\\TestCase;\nuse Psr\\Log\\LoggerInterface;\nuse Symfony\\Component\\HttpFoundation\\Request;\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Updating a bunch of deprecations: ObjectManager => EntityManagerInterface
|
95,144 |
05.01.2020 08:36:52
| -3,600 |
0b0592398e451a2f5aff45048b792720fc660f78
|
RegistryInterface -> ManagerRegistry
|
[
{
"change_type": "MODIFY",
"old_path": "src/Repository/ContentRepository.php",
"new_path": "src/Repository/ContentRepository.php",
"diff": "@@ -13,7 +13,7 @@ use Doctrine\\ORM\\Query;\nuse Doctrine\\ORM\\QueryBuilder;\nuse Pagerfanta\\Adapter\\DoctrineORMAdapter;\nuse Pagerfanta\\Pagerfanta;\n-use Symfony\\Bridge\\Doctrine\\RegistryInterface;\n+use Doctrine\\Persistence\\ManagerRegistry;\nuse Tightenco\\Collect\\Support\\Collection;\n/**\n@@ -26,7 +26,7 @@ class ContentRepository extends ServiceEntityRepository\n{\nprivate $contentColumns = ['id', 'author', 'contentType', 'status', 'createdAt', 'modifiedAt', 'publishedAt', 'depublishedAt'];\n- public function __construct(RegistryInterface $registry)\n+ public function __construct(ManagerRegistry $registry)\n{\nparent::__construct($registry, Content::class);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Repository/FieldRepository.php",
"new_path": "src/Repository/FieldRepository.php",
"diff": "@@ -8,7 +8,7 @@ use Bolt\\Doctrine\\JsonHelper;\nuse Bolt\\Entity\\Field;\nuse Doctrine\\Bundle\\DoctrineBundle\\Repository\\ServiceEntityRepository;\nuse Doctrine\\ORM\\QueryBuilder;\n-use Symfony\\Bridge\\Doctrine\\RegistryInterface;\n+use Doctrine\\Persistence\\ManagerRegistry;\n/**\n* @method Field|null find($id, $lockMode = null, $lockVersion = null)\n@@ -18,7 +18,7 @@ use Symfony\\Bridge\\Doctrine\\RegistryInterface;\n*/\nclass FieldRepository extends ServiceEntityRepository\n{\n- public function __construct(RegistryInterface $registry)\n+ public function __construct(ManagerRegistry $registry)\n{\nparent::__construct($registry, Field::class);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Repository/LogRepository.php",
"new_path": "src/Repository/LogRepository.php",
"diff": "@@ -6,7 +6,7 @@ namespace Bolt\\Repository;\nuse Bolt\\Entity\\Log;\nuse Doctrine\\Bundle\\DoctrineBundle\\Repository\\ServiceEntityRepository;\n-use Doctrine\\Common\\Persistence\\ManagerRegistry;\n+use Doctrine\\Persistence\\ManagerRegistry;\nuse Doctrine\\ORM\\Query;\nuse Doctrine\\ORM\\QueryBuilder;\nuse Pagerfanta\\Adapter\\DoctrineORMAdapter;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Repository/MediaRepository.php",
"new_path": "src/Repository/MediaRepository.php",
"diff": "@@ -6,7 +6,7 @@ namespace Bolt\\Repository;\nuse Bolt\\Entity\\Media;\nuse Doctrine\\Bundle\\DoctrineBundle\\Repository\\ServiceEntityRepository;\n-use Symfony\\Bridge\\Doctrine\\RegistryInterface;\n+use Doctrine\\Persistence\\ManagerRegistry;\nuse Webmozart\\PathUtil\\Path;\n/**\n@@ -17,7 +17,7 @@ use Webmozart\\PathUtil\\Path;\n*/\nclass MediaRepository extends ServiceEntityRepository\n{\n- public function __construct(RegistryInterface $registry)\n+ public function __construct(ManagerRegistry $registry)\n{\nparent::__construct($registry, Media::class);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Repository/RelationRepository.php",
"new_path": "src/Repository/RelationRepository.php",
"diff": "@@ -10,7 +10,7 @@ use Bolt\\Enum\\Statuses;\nuse Doctrine\\ORM\\EntityManager;\nuse Doctrine\\ORM\\QueryBuilder;\nuse Gedmo\\Sortable\\Entity\\Repository\\SortableRepository;\n-use Symfony\\Bridge\\Doctrine\\RegistryInterface;\n+use Doctrine\\Persistence\\ManagerRegistry;\n/**\n* @method Relation|null find($id, $lockMode = null, $lockVersion = null)\n@@ -20,7 +20,7 @@ use Symfony\\Bridge\\Doctrine\\RegistryInterface;\n*/\nclass RelationRepository extends SortableRepository\n{\n- public function __construct(RegistryInterface $registry)\n+ public function __construct(ManagerRegistry $registry)\n{\n$manager = $registry->getManagerForClass(Relation::class);\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Repository/TaxonomyRepository.php",
"new_path": "src/Repository/TaxonomyRepository.php",
"diff": "@@ -6,7 +6,7 @@ namespace Bolt\\Repository;\nuse Bolt\\Entity\\Taxonomy;\nuse Doctrine\\Bundle\\DoctrineBundle\\Repository\\ServiceEntityRepository;\n-use Symfony\\Bridge\\Doctrine\\RegistryInterface;\n+use Doctrine\\Persistence\\ManagerRegistry;\n/**\n* @method Taxonomy|null find($id, $lockMode = null, $lockVersion = null)\n@@ -16,7 +16,7 @@ use Symfony\\Bridge\\Doctrine\\RegistryInterface;\n*/\nclass TaxonomyRepository extends ServiceEntityRepository\n{\n- public function __construct(RegistryInterface $registry)\n+ public function __construct(ManagerRegistry $registry)\n{\nparent::__construct($registry, Taxonomy::class);\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
RegistryInterface -> ManagerRegistry
|
95,144 |
05.01.2020 09:00:42
| -3,600 |
6e1f48d83298de0eadbcafad6d7d12b1e9cc2d38
|
Two more deprecations
|
[
{
"change_type": "MODIFY",
"old_path": "src/Repository/UserAuthTokenRepository.php",
"new_path": "src/Repository/UserAuthTokenRepository.php",
"diff": "@@ -6,7 +6,7 @@ namespace Bolt\\Repository;\nuse Bolt\\Entity\\UserAuthToken;\nuse Doctrine\\Bundle\\DoctrineBundle\\Repository\\ServiceEntityRepository;\n-use Doctrine\\Common\\Persistence\\ManagerRegistry;\n+use Doctrine\\Persistence\\ManagerRegistry;\n/**\n* @method UserAuthToken|null find($id, $lockMode = null, $lockVersion = null)\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Repository/UserRepository.php",
"new_path": "src/Repository/UserRepository.php",
"diff": "@@ -6,7 +6,7 @@ namespace Bolt\\Repository;\nuse Bolt\\Entity\\User;\nuse Doctrine\\Bundle\\DoctrineBundle\\Repository\\ServiceEntityRepository;\n-use Doctrine\\Common\\Persistence\\ManagerRegistry;\n+use Doctrine\\Persistence\\ManagerRegistry;\nclass UserRepository extends ServiceEntityRepository\n{\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Two more deprecations
|
95,144 |
05.01.2020 11:02:49
| -3,600 |
a355c6d595dc23e92e46a34924d5870ee7eaa029
|
Allow for logging in extensions
|
[
{
"change_type": "MODIFY",
"old_path": "src/Extension/ServicesTrait.php",
"new_path": "src/Extension/ServicesTrait.php",
"diff": "@@ -8,6 +8,7 @@ use Bolt\\Configuration\\Config;\nuse Bolt\\Widgets;\nuse Doctrine\\Common\\Persistence\\ObjectManager;\nuse Psr\\Container\\ContainerInterface;\n+use Psr\\Log\\LoggerInterface;\nuse Symfony\\Component\\HttpFoundation\\Session\\Session;\nuse Symfony\\Component\\Stopwatch\\Stopwatch;\nuse Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface;\n@@ -103,6 +104,11 @@ trait ServicesTrait\nreturn $this->getService('debug.stopwatch');\n}\n+ public function getLogger(): LoggerInterface\n+ {\n+ return $this->getService('monolog.logger.db');\n+ }\n+\npublic function getContainer(): ContainerInterface\n{\nreturn $this->container;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Log/RequestProcessor.php",
"new_path": "src/Log/RequestProcessor.php",
"diff": "@@ -30,21 +30,23 @@ class RequestProcessor\npublic function processRecord(array $record): array\n{\n- $req = $this->request->getCurrentRequest();\n+ $request = $this->request->getCurrentRequest();\n/** @var User $user */\n$user = $this->security->getUser();\n$trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 7);\n+ if (! empty($request)) {\n$record['extra'] = [\n- 'client_ip' => $req->getClientIp(),\n- 'client_port' => $req->getPort(),\n- 'uri' => $req->getUri(),\n- 'query_string' => $req->getQueryString(),\n- 'method' => $req->getMethod(),\n- 'request' => $req->request->all(),\n+ 'client_ip' => $request->getClientIp(),\n+ 'client_port' => $request->getPort(),\n+ 'uri' => $request->getUri(),\n+ 'query_string' => $request->getQueryString(),\n+ 'method' => $request->getMethod(),\n+ 'request' => $request->request->all(),\n];\n+ }\nif (! empty($user)) {\n$record['user'] = [\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Allow for logging in extensions
|
95,144 |
05.01.2020 11:06:09
| -3,600 |
503a0628ce693ed460e3a112db4dfbee773186e9
|
Use "FilesystemLoader" so widgets can set the loader in `APP_DEBUG=0` env settings
|
[
{
"change_type": "MODIFY",
"old_path": "src/Widget/BaseWidget.php",
"new_path": "src/Widget/BaseWidget.php",
"diff": "@@ -7,8 +7,8 @@ namespace Bolt\\Widget;\nuse Bolt\\Extension\\ExtensionInterface;\nuse Bolt\\Widget\\Exception\\WidgetException;\nuse Cocur\\Slugify\\Slugify;\n-use Symfony\\Bundle\\TwigBundle\\Loader\\NativeFilesystemLoader;\nuse Twig\\Error\\LoaderError;\n+use Twig\\Loader\\FilesystemLoader;\n/**\n* BaseWidget can be used as easy starter pack or as a base for your own widgets.\n@@ -183,10 +183,10 @@ abstract class BaseWidget implements WidgetInterface\nprivate function addTwigLoader(): void\n{\n- /** @var NativeFilesystemLoader $twigLoaders */\n+ /** @var FilesystemLoader $twigLoaders */\n$twigLoaders = $this->getTwig()->getLoader();\n- if ($twigLoaders instanceof NativeFilesystemLoader) {\n+ if ($twigLoaders instanceof FilesystemLoader) {\n$twigLoaders->addPath($this->getTemplateFolder(), $this->getSlug());\n}\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Use "FilesystemLoader" so widgets can set the loader in `APP_DEBUG=0` env settings
|
95,144 |
07.12.2019 12:07:15
| -3,600 |
4aaef469a4863ce8a65c5d1b4f58e239107dab5a
|
Updates for PHPStan
|
[
{
"change_type": "MODIFY",
"old_path": "src/Collection/DeepCollection.php",
"new_path": "src/Collection/DeepCollection.php",
"diff": "@@ -14,7 +14,7 @@ class DeepCollection extends Collection\npublic static function deepMake($items): self\n{\nif ($items instanceof self) {\n- return $items;\n+ return parent::make($items);\n}\n$items = parent::make($items)->map(function ($value) {\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/ImageController.php",
"new_path": "src/Controller/ImageController.php",
"diff": "@@ -46,7 +46,6 @@ class ImageController\n$filename = sprintf('%s/%s', $request->query->get('path'), $filename);\n}\n- /** @var StreamedResponse $response */\nreturn $server->getImageResponse($filename, $request->query->all());\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Doctrine/JsonHelper.php",
"new_path": "src/Doctrine/JsonHelper.php",
"diff": "@@ -26,7 +26,8 @@ class JsonHelper\nreturn false;\n}\n- if ($platform instanceof MySQL57Platform || $platform instanceof MySQL80Platform || $platform instanceof MariaDb1027Platform) {\n+ // MySQL80Platform is implicitly included with MySQL57Platform\n+ if ($platform instanceof MySQL57Platform || $platform instanceof MariaDb1027Platform) {\nreturn true;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Widgets.php",
"new_path": "src/Widgets.php",
"diff": "@@ -78,6 +78,8 @@ class Widgets\nif ($widget) {\nreturn (string) $this->invokeWidget($widget, $params);\n}\n+\n+ return '';\n}\npublic function renderWidgetsForTarget(string $target, array $params = []): string\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Updates for PHPStan
|
95,144 |
14.12.2019 07:50:37
| -3,600 |
805a39cf8db4920031fc50a63c28306bbe22a5c3
|
Tweaking PHPStan
|
[
{
"change_type": "MODIFY",
"old_path": "src/Collection/DeepCollection.php",
"new_path": "src/Collection/DeepCollection.php",
"diff": "@@ -8,13 +8,10 @@ use Tightenco\\Collect\\Support\\Collection;\nclass DeepCollection extends Collection\n{\n- /**\n- * @return static\n- */\npublic static function deepMake($items): self\n{\nif ($items instanceof self) {\n- return parent::make($items);\n+ return $items;\n}\n$items = parent::make($items)->map(function ($value) {\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/ImageController.php",
"new_path": "src/Controller/ImageController.php",
"diff": "@@ -9,7 +9,6 @@ use League\\Glide\\Responses\\SymfonyResponseFactory;\nuse League\\Glide\\ServerFactory;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\Response;\n-use Symfony\\Component\\HttpFoundation\\StreamedResponse;\nuse Symfony\\Component\\Routing\\Annotation\\Route;\nclass ImageController\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Tweaking PHPStan
|
95,144 |
07.01.2020 06:31:11
| -3,600 |
f1df0999056cfdfb3ffebdb8c8798476d0b7d691
|
Add false positives to phpstan.neon, minor tweaks
|
[
{
"change_type": "MODIFY",
"old_path": "phpstan.neon",
"new_path": "phpstan.neon",
"diff": "@@ -4,6 +4,21 @@ parameters:\nsymfony:\ncontainer_xml_path: '%rootDir%/../../../var/cache/dev/srcBolt_KernelDevDebugContainer.xml'\n+ ignoreErrors:\n+ # false positive: `Parameter #1 $value of class Twig\\Node\\Expression\\ConstantExpression constructor expects array, string given.`\n+ # class `ConstantExpression()` casts to array itself.\n+ # @todo Check if this is still valid after update to Twig 3\n+ -\n+ message: '#value of class Twig\\\\Node\\\\Expression\\\\ConstantExpression constructor expects#'\n+ path: %currentWorkingDirectory%/src/*\n+\n+ # false positive: `Unreachable statement - code above always terminates.`\n+ # @todo Check if this is still needed after https://github.com/phpstan/phpstan/issues/2651 is fixed\n+ -\n+ message: '#Unreachable statement - code above always terminates#'\n+ path: %currentWorkingDirectory%/src/*\n+\n+\nincludes:\n- vendor/phpstan/phpstan-symfony/extension.neon\n- vendor/phpstan/phpstan-doctrine/extension.neon\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Configuration/Parser/ContentTypesParser.php",
"new_path": "src/Configuration/Parser/ContentTypesParser.php",
"diff": "@@ -173,6 +173,7 @@ class ContentTypesParser extends BaseParser\n$contentType['groups'][] = 'Relations';\n}\n+ /** @var ContentType */\nreturn ContentType::deepMake($contentType);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/LogViewerController.php",
"new_path": "src/Controller/Backend/LogViewerController.php",
"diff": "@@ -5,6 +5,7 @@ declare(strict_types=1);\nnamespace Bolt\\Controller\\Backend;\nuse Bolt\\Controller\\TwigAwareController;\n+use Bolt\\Entity\\Log;\nuse Bolt\\Repository\\LogRepository;\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Security;\nuse Symfony\\Component\\HttpFoundation\\Request;\n"
},
{
"change_type": "MODIFY",
"old_path": "symfony.lock",
"new_path": "symfony.lock",
"diff": "\"nesbot/carbon\": {\n\"version\": \"1.34.0\"\n},\n+ \"nette/application\": {\n+ \"version\": \"v3.0.3\"\n+ },\n+ \"nette/component-model\": {\n+ \"version\": \"v3.0.0\"\n+ },\n\"nette/finder\": {\n\"version\": \"v2.4.2\"\n},\n+ \"nette/http\": {\n+ \"version\": \"v3.0.3\"\n+ },\n\"nette/robot-loader\": {\n\"version\": \"v3.1.0\"\n},\n+ \"nette/routing\": {\n+ \"version\": \"v3.0.0\"\n+ },\n\"nette/utils\": {\n\"version\": \"v2.5.3\"\n},\n\"symfony/yaml\": {\n\"version\": \"v3.4.0-beta2\"\n},\n+ \"symplify/auto-bind-parameter\": {\n+ \"version\": \"v7.2.0\"\n+ },\n+ \"symplify/autowire-array-parameter\": {\n+ \"version\": \"v7.2.0\"\n+ },\n\"symplify/coding-standard\": {\n\"version\": \"v5.2.3\"\n},\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Add false positives to phpstan.neon, minor tweaks
|
95,144 |
08.01.2020 14:58:34
| -3,600 |
7df0253ad3087507b9445a261e550a5af5a57f43
|
Don't break on malformed content
|
[
{
"change_type": "MODIFY",
"old_path": "src/Entity/Field/CollectionField.php",
"new_path": "src/Entity/Field/CollectionField.php",
"diff": "@@ -25,7 +25,7 @@ class CollectionField extends Field implements FieldInterface\npublic function getValue(): array\n{\n- $fieldDefinitions = $this->getDefinition()->get('fields');\n+ $fieldDefinitions = $this->getDefinition()->get('fields', []);\n$result = [];\n$thisFieldValues = $this->getCollectionFieldValues();\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Entity/Field/MarkdownField.php",
"new_path": "src/Entity/Field/MarkdownField.php",
"diff": "@@ -24,7 +24,7 @@ class MarkdownField extends Field implements Excerptable, FieldInterface\n$markdown = new Markdown();\n$value = $this->getValue();\n- return $markdown->parse(reset($value));\n+ return $markdown->parse((string) reset($value));\n}\npublic function getParsedValue(): string\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/ImageExtension.php",
"new_path": "src/Twig/ImageExtension.php",
"diff": "@@ -189,7 +189,7 @@ class ImageExtension extends AbstractExtension\n$alt = $image;\n}\n- return htmlentities($alt, ENT_QUOTES);\n+ return htmlentities((string) $alt, ENT_QUOTES);\n}\nprivate function getImageFromContent(Content $content): ?ImageField\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Don't break on malformed content
|
95,144 |
08.01.2020 15:38:30
| -3,600 |
c04a3739c2a33ffe7cb512895e8c23b64de2cc7e
|
Fix Templateselect showing up as JSON
|
[
{
"change_type": "MODIFY",
"old_path": "src/Entity/Field/TemplateselectField.php",
"new_path": "src/Entity/Field/TemplateselectField.php",
"diff": "@@ -4,6 +4,7 @@ declare(strict_types=1);\nnamespace Bolt\\Entity\\Field;\n+use Bolt\\Common\\Json;\nuse Bolt\\Entity\\Field;\nuse Bolt\\Entity\\FieldInterface;\nuse Doctrine\\ORM\\Mapping as ORM;\n@@ -17,4 +18,13 @@ class TemplateselectField extends Field implements FieldInterface\n{\nreturn 'templateselect';\n}\n+\n+ public function setValue($value): Field\n+ {\n+ if (Json::test($value)) {\n+ $value = Json::json_decode($value);\n+ }\n+\n+ return parent::setValue($value);\n+ }\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Fix Templateselect showing up as JSON
|
95,144 |
10.01.2020 17:54:08
| -3,600 |
5ed838b29f9354817f1025d787cab5921d4005b6
|
Refactor Taxonomy Factory, to prevent duplicates
|
[
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/ContentEditController.php",
"new_path": "src/Controller/Backend/ContentEditController.php",
"diff": "@@ -11,7 +11,6 @@ use Bolt\\Controller\\TwigAwareController;\nuse Bolt\\Entity\\Content;\nuse Bolt\\Entity\\Field;\nuse Bolt\\Entity\\Relation;\n-use Bolt\\Entity\\Taxonomy;\nuse Bolt\\Entity\\User;\nuse Bolt\\Enum\\Statuses;\nuse Bolt\\Event\\Listener\\ContentFillListener;\n@@ -464,7 +463,7 @@ class ContentEditController extends TwigAwareController implements BackendZone\n]);\nif ($taxonomy === null) {\n- $taxonomy = Taxonomy::factory($key, $slug);\n+ $taxonomy = $this->taxonomyRepository->factory($key, $slug);\n}\n$content->addTaxonomy($taxonomy);\n"
},
{
"change_type": "MODIFY",
"old_path": "src/DataFixtures/TaxonomyFixtures.php",
"new_path": "src/DataFixtures/TaxonomyFixtures.php",
"diff": "@@ -7,7 +7,7 @@ namespace Bolt\\DataFixtures;\nuse Bolt\\Collection\\DeepCollection;\nuse Bolt\\Common\\Str;\nuse Bolt\\Configuration\\Config;\n-use Bolt\\Entity\\Taxonomy;\n+use Bolt\\Repository\\TaxonomyRepository;\nuse Doctrine\\Bundle\\FixturesBundle\\FixtureGroupInterface;\nuse Doctrine\\Common\\Persistence\\ObjectManager;\n@@ -16,9 +16,13 @@ class TaxonomyFixtures extends BaseFixture implements FixtureGroupInterface\n/** @var Config */\nprivate $config;\n- public function __construct(Config $config)\n+ /** @var TaxonomyRepository */\n+ private $taxonomyRepository;\n+\n+ public function __construct(Config $config, TaxonomyRepository $taxonomyRepository)\n{\n$this->config = $config;\n+ $this->taxonomyRepository = $taxonomyRepository;\n}\npublic function load(ObjectManager $manager): void\n@@ -45,7 +49,7 @@ class TaxonomyFixtures extends BaseFixture implements FixtureGroupInterface\n$options = $taxonomyDefinition->isKeyEmpty('options') ? $this->getDefaultOptions() : $taxonomyDefinition['options'];\nforeach ($options as $key => $value) {\n- $taxonomy = Taxonomy::factory(\n+ $taxonomy = $this->taxonomyRepository->factory(\n$taxonomyDefinition['slug'],\n$key,\n$value,\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Entity/Taxonomy.php",
"new_path": "src/Entity/Taxonomy.php",
"diff": "@@ -62,21 +62,6 @@ class Taxonomy\n$this->content = new ArrayCollection();\n}\n- /**\n- * @return Taxonomy\n- */\n- public static function factory(string $type, string $slug, ?string $name = null, int $sortorder = 0): self\n- {\n- $taxonomy = new self();\n-\n- $taxonomy->setType($type);\n- $taxonomy->setSlug($slug);\n- $taxonomy->setName($name ?: $slug);\n- $taxonomy->setSortorder($sortorder);\n-\n- return $taxonomy;\n- }\n-\npublic function getId(): ?int\n{\nreturn $this->id;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Repository/TaxonomyRepository.php",
"new_path": "src/Repository/TaxonomyRepository.php",
"diff": "@@ -21,6 +21,27 @@ class TaxonomyRepository extends ServiceEntityRepository\nparent::__construct($registry, Taxonomy::class);\n}\n+ public function factory(string $type, string $slug, ?string $name = null, int $sortorder = 0): Taxonomy\n+ {\n+ $taxonomy = $this->findOneBy([\n+ 'type' => $type,\n+ 'slug' => $slug,\n+ ]);\n+\n+ if ($taxonomy) {\n+ return $taxonomy;\n+ }\n+\n+ $taxonomy = new Taxonomy();\n+\n+ $taxonomy->setType($type);\n+ $taxonomy->setSlug($slug);\n+ $taxonomy->setName($name ?: ucfirst($slug));\n+ $taxonomy->setSortorder($sortorder);\n+\n+ return $taxonomy;\n+ }\n+\n// /**\n// * @return Taxonomy[] Returns an array of Taxonomy objects\n// */\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Refactor Taxonomy Factory, to prevent duplicates
|
95,144 |
10.01.2020 18:59:42
| -3,600 |
b56f16292f0ee330cd0dae63461dc425ca86413b
|
Move to UserRepository::factory
|
[
{
"change_type": "MODIFY",
"old_path": "src/Command/AddUserCommand.php",
"new_path": "src/Command/AddUserCommand.php",
"diff": "@@ -187,10 +187,7 @@ class AddUserCommand extends Command\n$this->validateUserData($username, $plainPassword, $email, $displayName);\n// create the user and encode its password\n- $user = new User();\n- $user->setDisplayName($displayName);\n- $user->setUsername($username);\n- $user->setEmail($email);\n+ $user = UserRepository::factory($displayName, $username, $email);\n$user->setRoles([$isAdmin ? 'ROLE_ADMIN' : 'ROLE_USER']);\n$user->setLocale('en');\n$user->setBackendTheme('default');\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/UserEditController.php",
"new_path": "src/Controller/Backend/UserEditController.php",
"diff": "@@ -9,6 +9,7 @@ use Bolt\\Common\\Str;\nuse Bolt\\Controller\\CsrfTrait;\nuse Bolt\\Controller\\TwigAwareController;\nuse Bolt\\Entity\\User;\n+use Bolt\\Repository\\UserRepository;\nuse Doctrine\\ORM\\EntityManagerInterface;\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Security;\nuse Symfony\\Component\\HttpFoundation\\RedirectResponse;\n@@ -55,7 +56,7 @@ class UserEditController extends TwigAwareController implements BackendZone\n$roles = $this->getParameter('security.role_hierarchy.roles');\nif (! $user instanceof User) {\n- $user = User::factory();\n+ $user = UserRepository::factory();\n$suggestedPassword = Str::generatePassword();\n} else {\n$suggestedPassword = '';\n@@ -123,7 +124,7 @@ class UserEditController extends TwigAwareController implements BackendZone\n$this->validateCsrf($request, 'useredit');\nif (! $user instanceof User) {\n- $user = User::factory();\n+ $user = UserRepository::factory();\n}\n$displayName = $user->getDisplayName();\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Entity/User.php",
"new_path": "src/Entity/User.php",
"diff": "@@ -105,20 +105,6 @@ class User implements UserInterface, \\Serializable\n{\n}\n- /**\n- * @return User\n- */\n- public static function factory(string $displayName = '', string $username = '', string $email = ''): self\n- {\n- $user = new self();\n-\n- $user->setDisplayName($displayName);\n- $user->setUsername($username);\n- $user->setEmail($email);\n-\n- return $user;\n- }\n-\npublic function getId(): int\n{\nreturn $this->id;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Repository/UserRepository.php",
"new_path": "src/Repository/UserRepository.php",
"diff": "@@ -43,4 +43,15 @@ class UserRepository extends ServiceEntityRepository\n$user = $qb->getQuery()->getOneOrNullResult();\nreturn $user instanceof User ? $user : null;\n}\n+\n+ public static function factory(string $displayName = '', string $username = '', string $email = ''): User\n+ {\n+ $user = new User();\n+\n+ $user->setDisplayName($displayName);\n+ $user->setUsername($username);\n+ $user->setEmail($email);\n+\n+ return $user;\n+ }\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Move to UserRepository::factory
|
95,144 |
10.01.2020 21:25:34
| -3,600 |
32c39e697d20bb9e7b2102434a060629575ca6c7
|
Suppress {{ dump }} and {% dump %} when in PROD mode
|
[
{
"change_type": "MODIFY",
"old_path": "src/Twig/DumpExtension.php",
"new_path": "src/Twig/DumpExtension.php",
"diff": "@@ -4,6 +4,7 @@ declare(strict_types=1);\nnamespace Bolt\\Twig;\n+use Bolt\\Twig\\TokenParser\\DumpTokenParser;\nuse Twig\\Extension\\AbstractExtension;\nuse Twig\\TwigFunction;\n@@ -16,13 +17,37 @@ use Twig\\TwigFunction;\n*/\nclass DumpExtension extends AbstractExtension\n{\n+ protected $env;\n+\n+ public function __construct(?string $env = null)\n+ {\n+ $this->env = $env;\n+ }\n+\npublic function getFunctions(): array\n{\n+ // In DEV and TEST, we let Symfony\\Bundle\\DebugBundle handle this\n+ if (in_array($this->env, ['dev', 'test'], true)) {\n+ return [];\n+ }\n+\nreturn [\nnew TwigFunction('dump', [$this, 'dump']),\n];\n}\n+ public function getTokenParsers(): array\n+ {\n+ // In DEV and TEST, we let Symfony\\Bundle\\DebugBundle handle this\n+ if (in_array($this->env, ['dev', 'test'], true)) {\n+ return [];\n+ }\n+\n+ return [\n+ new DumpTokenParser(),\n+ ];\n+ }\n+\npublic function dump(): void\n{\n}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "src/Twig/TokenParser/DumpTokenParser.php",
"diff": "+<?php\n+\n+declare(strict_types=1);\n+\n+namespace Bolt\\Twig\\TokenParser;\n+\n+use Twig\\Node\\Node;\n+use Twig\\Node\\TextNode;\n+use Twig\\Token;\n+use Twig\\TokenParser\\AbstractTokenParser;\n+\n+/**\n+ * Twig {% dump %} token parser.\n+ */\n+class DumpTokenParser extends AbstractTokenParser\n+{\n+ public function parse(Token $token): Node\n+ {\n+ $lineno = $token->getLine();\n+\n+ if (! $this->parser->getStream()->test(Token::BLOCK_END_TYPE)) {\n+ $this->parser->getExpressionParser()->parseMultitargetExpression();\n+ }\n+ $this->parser->getStream()->expect(Token::BLOCK_END_TYPE);\n+\n+ return new TextNode('', $lineno);\n+ }\n+\n+ /**\n+ * {@inheritdoc}\n+ */\n+ public function getTag(): string\n+ {\n+ return 'dump';\n+ }\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/TokenParser/SetcontentTokenParser.php",
"new_path": "src/Twig/TokenParser/SetcontentTokenParser.php",
"diff": "@@ -7,11 +7,12 @@ namespace Bolt\\Twig\\TokenParser;\nuse Bolt\\Twig\\Node\\SetcontentNode;\nuse Twig\\Node\\Expression\\ArrayExpression;\nuse Twig\\Node\\Expression\\ConstantExpression;\n+use Twig\\Node\\Node;\nuse Twig\\Token;\nuse Twig\\TokenParser\\AbstractTokenParser;\n/**\n- * Twig {{ setcontent }} token parser.\n+ * Twig {% setcontent %} token parser.\n*\n* @author Bob den Otter <bob@twokings.nl>\n* @author Xiao-Hu Tai <xiao@twokings.nl>\n@@ -28,7 +29,7 @@ class SetcontentTokenParser extends AbstractTokenParser\n/**\n* {@inheritdoc}\n*/\n- public function parse(Token $token)\n+ public function parse(Token $token): Node\n{\n$lineno = $token->getLine();\n@@ -106,7 +107,7 @@ class SetcontentTokenParser extends AbstractTokenParser\n/**\n* {@inheritdoc}\n*/\n- public function getTag()\n+ public function getTag(): string\n{\nreturn 'setcontent';\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Suppress {{ dump }} and {% dump %} when in PROD mode
|
95,144 |
11.01.2020 05:53:58
| -3,600 |
98a51ef9b94094ed18d888586719a71e6af3aff7
|
Cleaning up User listing page
|
[
{
"change_type": "MODIFY",
"old_path": "templates/_macro/_macro.html.twig",
"new_path": "templates/_macro/_macro.html.twig",
"diff": "{% set class = class|replace({'btn-': ''}) %}\n{% set attr = attr %}\n- <a href=\"{{ link }}\" class=\"btn btn-{{ class }} mb-3 text-nowrap\"\n+ <a href=\"{{ link }}\" class=\"btn btn-{{ class|split(' ')|join(' btn-') }} mb-3 text-nowrap\"\n{% for key,value in attr %} {{ key }}=\"{{value}}\"{% endfor %}>\n<i class=\"fas fa-fw fa-{{ icon }} mr-1\"></i>\n{{- label -}}\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/users/listing.html.twig",
"new_path": "templates/users/listing.html.twig",
"diff": "<tr>\n<th scope=\"col\">#</th>\n<th scope=\"col\" class=\"text-nowrap\">{{ 'listing.title_display_name'|trans }}</th>\n- <th scope=\"col\" class=\"text-nowrap\">{{ 'listing.title_username'|trans }}</th>\n- <th scope=\"col\" class=\"text-nowrap\">{{ 'listing.title_email'|trans }}</th>\n+ <th scope=\"col\" class=\"text-nowrap\">{{ 'listing.title_username'|trans }} / {{ 'listing.title_email'|trans }}</th>\n<th scope=\"col\" class=\"text-nowrap\">{{ 'listing.title_roles'|trans }}</th>\n<th scope=\"col\" class=\"text-nowrap\">{{ 'listing.title_last_seen'|trans }}</th>\n<th scope=\"col\" class=\"text-nowrap\">{{ 'listing.title_last_ip'|trans }}</th>\n{% for iteratedUser in users %}\n<tr>\n<th scope=\"row\">{{ iteratedUser.id }}</th>\n- <td>{{ iteratedUser.displayName }}</td>\n- <td>{{ iteratedUser.username }}</td>\n- <td>{{ iteratedUser.email }}</td>\n- <td><code>{{ iteratedUser.roles|join('</code>, <code>') }}</code></td>\n- <td class=\"datetime-relative\">{{ iteratedUser.lastseenAt|date(\"c\")|default('-') }}</td>\n- <td>{{ iteratedUser.lastIp|default('12.34.56.78') }}</td>\n<td>\n- {{ macro.buttonlink('action.edit', path('bolt_user_edit', {'id': iteratedUser.id}), 'edit', 'secondary') }}\n+ {{ iteratedUser.displayName }}\n+ {% if iteratedUser.disabled %}<span class=\"badge badge-danger\">{{ __('listing.disabled') }}</span>{% endif %}\n+ </td>\n+ <td>{{ iteratedUser.username }} / {{ iteratedUser.email }}</td>\n+ <td><code>{{ iteratedUser.roles|join('</code>, <code>')|raw }}</code></td>\n+ {% if iteratedUser.lastseenAt %}\n+ <td class=\"datetime-relative\">{{ iteratedUser.lastseenAt|date(\"c\") }}</td>\n+ {% else %}\n+ <td>-</td>\n+ {% endif %}\n+ <td>{% if iteratedUser.lastIp %}<code>{{ iteratedUser.lastIp }}</code>{% else %}-{% endif %}</td>\n+ <td>\n+ {{ macro.buttonlink('action.edit', path('bolt_user_edit', {'id': iteratedUser.id}), 'edit', 'secondary sm') }}\n{% if user.id != iteratedUser.id %}\n{% if iteratedUser.disabled %}\n- {{ macro.buttonlink('action.enable', path('bolt_user_disable', {'id': iteratedUser.id}), 'thumbs-up', 'secondary') }}\n+ {{ macro.buttonlink('action.enable', path('bolt_user_disable', {'id': iteratedUser.id}), 'thumbs-up', 'secondary sm') }}\n{% else %}\n- {{ macro.buttonlink('action.disable', path('bolt_user_disable', {'id': iteratedUser.id}), 'ban', 'secondary') }}\n+ {{ macro.buttonlink('action.disable', path('bolt_user_disable', {'id': iteratedUser.id}), 'ban', 'secondary sm') }}\n{% endif %}\n- {{ macro.buttonlink('action.delete', path('bolt_user_delete', {'id': iteratedUser.id}), 'trash', 'danger') }}\n+ {{ macro.buttonlink('action.delete', path('bolt_user_delete', {'id': iteratedUser.id}), 'trash', 'danger sm') }}\n{% endif %}\n</td>\n</tr>\n<td class=\"text-nowrap\">{{ iteratedUser.username }}</td>\n<td class=\"text-nowrap datetime-relative\">{{ iteratedUser.lastseenAt|date(\"c\") }}</td>\n<td class=\"datetime-relative\">{{ authtoken.validity|date(\"c\") }}</td>\n- <td class=\"text-nowrap\">{{ iteratedUser.lastIp|default('12.34.56.78') }}</td>\n+ <td class=\"text-nowrap\"><code>{{ iteratedUser.lastIp|default('-') }}</code></td>\n<td>{{ authtoken.useragent|default('-') }}</td>\n</tr>\n{% endif %}\n"
},
{
"change_type": "MODIFY",
"old_path": "translations/messages.en.xlf",
"new_path": "translations/messages.en.xlf",
"diff": "<target>User</target>\n</segment>\n</unit>\n+ <unit id=\"3MuwWwe\" name=\"listing.disabled\">\n+ <segment>\n+ <source>listing.disabled</source>\n+ <target>Disabled</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": "<target>Voeg nieuw bestand toe</target>\n</segment>\n</unit>\n+ <unit id=\"2MtT_h0\" name=\"caption.logviewer\">\n+ <segment>\n+ <source>caption.logviewer</source>\n+ <target>Logs bekijken</target>\n+ </segment>\n+ </unit>\n+ <unit id=\"ovKkXwU\" name=\"action.edit\">\n+ <segment>\n+ <source>action.edit</source>\n+ <target>Bewerk</target>\n+ </segment>\n+ </unit>\n+ <unit id=\"ryXZRAu\" name=\"action.disable\">\n+ <segment>\n+ <source>action.disable</source>\n+ <target>Uitschakelen</target>\n+ </segment>\n+ </unit>\n+ <unit id=\"3MuwWwe\" name=\"listing.disabled\">\n+ <segment>\n+ <source>listing.disabled</source>\n+ <target>Uitgeschakeld</target>\n+ </segment>\n+ </unit>\n+ <unit id=\"hTKWQ6g\" name=\"action.delete\">\n+ <segment>\n+ <source>action.delete</source>\n+ <target>Verwijder</target>\n+ </segment>\n+ </unit>\n+ <unit id=\"ezqx.4H\" name=\"action.enable\">\n+ <segment>\n+ <source>action.enable</source>\n+ <target>Inschakelen</target>\n+ </segment>\n+ </unit>\n+ <unit id=\"3zlZmRK\" name=\"action.add_user\">\n+ <segment>\n+ <source>action.add_user</source>\n+ <target>Toevoegen</target>\n+ </segment>\n+ </unit>\n+ <unit id=\"x9qAwrz\" name=\"listing.title_browser\">\n+ <segment>\n+ <source>listing.title_browser</source>\n+ <target>Browser / platform</target>\n+ </segment>\n+ </unit>\n+ <unit id=\"mmUDcto\" name=\"listing.title_ip_address\">\n+ <segment>\n+ <source>listing.title_ip_address</source>\n+ <target>IP-adres</target>\n+ </segment>\n+ </unit>\n+ <unit id=\"Npkio79\" name=\"listing.title_session_expires\">\n+ <segment>\n+ <source>listing.title_session_expires</source>\n+ <target>Sessie verloopt</target>\n+ </segment>\n+ </unit>\n</file>\n</xliff>\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Cleaning up User listing page
|
95,144 |
11.01.2020 07:23:18
| -3,600 |
4990b26ed7483722fe455ca268ef3a0234b33f9d
|
Make sure we don't sort on non-existing field or timestamp
|
[
{
"change_type": "MODIFY",
"old_path": "config/services.yaml",
"new_path": "config/services.yaml",
"diff": "@@ -83,6 +83,9 @@ services:\nmethod: addScope\narguments: [ 'frontend', '@Bolt\\Storage\\FrontendQueryScope' ]\n+ Bolt\\Twig\\DumpExtension:\n+ arguments: [\"%kernel.environment%\"]\n+\nDoctrine\\ORM\\Query\\Expr: ~\nmonolog.processor.request:\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Configuration/Parser/ContentTypesParser.php",
"new_path": "src/Configuration/Parser/ContentTypesParser.php",
"diff": "@@ -95,9 +95,6 @@ class ContentTypesParser extends BaseParser\nif (! isset($contentType['show_in_menu'])) {\n$contentType['show_in_menu'] = true;\n}\n- if (! isset($contentType['sort'])) {\n- $contentType['sort'] = 'id';\n- }\nif (! isset($contentType['default_status'])) {\n$contentType['default_status'] = Statuses::PUBLISHED;\n}\n@@ -150,6 +147,8 @@ class ContentTypesParser extends BaseParser\n$contentType['fields'] = $fields;\n$contentType['groups'] = $groups;\n+ $contentType['sort'] = $this->determineSort($contentType);\n+\n// Make sure taxonomy is an array.\nif (isset($contentType['taxonomy'])) {\n$contentType['taxonomy'] = (array) $contentType['taxonomy'];\n@@ -279,4 +278,34 @@ class ContentTypesParser extends BaseParser\nreturn $repeater;\n}\n+\n+ private function determineSort(array $contentType): string\n+ {\n+ $sort = $contentType['sort'] ?? 'id';\n+\n+ $replacements = [\n+ 'created' => 'createdAt',\n+ 'createdat' => 'createdAt',\n+ 'datechanged' => 'modifiedAt',\n+ 'datecreated' => 'createdAt',\n+ 'datepublish' => 'publishedAt',\n+ 'modified' => 'modifiedAt',\n+ 'modifiedat' => 'modifiedAt',\n+ 'published' => 'publishedAt',\n+ 'publishedat' => 'publishedAt',\n+ 'Atat' => 'At',\n+ 'AtAt' => 'At',\n+ ];\n+\n+ $sort = str_replace(array_keys($replacements), array_values($replacements), $sort);\n+\n+ $sortname = trim($sort, '-');\n+\n+ if (! in_array($sortname, array_keys($contentType['fields']), true) &&\n+ ! in_array($sortname, ['createdAt', 'modifiedAt', 'publishedAt'], true)) {\n+ $sort = 'id';\n+ }\n+\n+ return $sort;\n+ }\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/DumpExtension.php",
"new_path": "src/Twig/DumpExtension.php",
"diff": "@@ -21,7 +21,7 @@ class DumpExtension extends AbstractExtension\npublic function __construct(?string $env = null)\n{\n- $this->env = $env;\n+ $this->env = $env ?? 'dev';\n}\npublic function getFunctions(): array\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Make sure we don't sort on non-existing field or timestamp
|
95,144 |
11.01.2020 08:24:35
| -3,600 |
c80d7c04fa20dd237ba2256c21bf765a9de59fb3
|
Ensure default status is a valid one
|
[
{
"change_type": "MODIFY",
"old_path": "src/Configuration/Parser/ContentTypesParser.php",
"new_path": "src/Configuration/Parser/ContentTypesParser.php",
"diff": "@@ -95,7 +95,7 @@ class ContentTypesParser extends BaseParser\nif (! isset($contentType['show_in_menu'])) {\n$contentType['show_in_menu'] = true;\n}\n- if (! isset($contentType['default_status'])) {\n+ if (! isset($contentType['default_status']) || ! in_array($contentType['default_status'], Statuses::all(), true)) {\n$contentType['default_status'] = Statuses::PUBLISHED;\n}\nif (! isset($contentType['viewless'])) {\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Ensure default status is a valid one
|
95,144 |
11.01.2020 16:41:07
| -3,600 |
d2e78672c8cce51c1dfd20fd0705f4481458216d
|
add toArray methods for serializing content
|
[
{
"change_type": "MODIFY",
"old_path": "src/Entity/Content.php",
"new_path": "src/Entity/Content.php",
"diff": "@@ -486,6 +486,11 @@ class Content\nreturn $options;\n}\n+ public function hasTaxonomyDefined(string $taxonomyName): bool\n+ {\n+ return $this->contentTypeDefinition->get('taxonomy')->contains($taxonomyName);\n+ }\n+\n/**\n* @return Collection|Taxonomy[]\n*/\n@@ -587,4 +592,26 @@ class Content\nreturn $field->getName() === $fieldName && ! $field->hasParent();\n});\n}\n+\n+ public function toArray(): array\n+ {\n+ $result = get_object_vars($this);\n+\n+ if ($this->author !== null) {\n+ $result['author'] = [\n+ 'id' => $this->author->getId(),\n+ 'username' => $this->author->getUsername(),\n+ ];\n+ }\n+\n+ $result['fields'] = $this->getFieldValues();\n+\n+ $result['taxonomies'] = $this->getTaxonomyValues();\n+ $result['relations'] = [];\n+\n+ unset($result['contentTypeDefinition']);\n+ unset($result['contentExtension']);\n+\n+ return $result;\n+ }\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Entity/User.php",
"new_path": "src/Entity/User.php",
"diff": "@@ -299,4 +299,9 @@ class User implements UserInterface, \\Serializable\nreturn $this;\n}\n+\n+ public function toArray(): array\n+ {\n+ return get_object_vars($this);\n+ }\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
add toArray methods for serializing content
|
95,144 |
12.01.2020 08:10:28
| -3,600 |
b124affd13642d94ff822bd7806c2116cdb14cd1
|
[chore] Cleanup bundles.php
|
[
{
"change_type": "MODIFY",
"old_path": "config/bundles.php",
"new_path": "config/bundles.php",
"diff": "@@ -8,6 +8,7 @@ return [\nDoctrine\\Bundle\\FixturesBundle\\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true, 'local' => true],\nHttp\\HttplugBundle\\HttplugBundle::class => ['dev' => true, 'local' => true],\nKnp\\Bundle\\MenuBundle\\KnpMenuBundle::class => ['all' => true],\n+ Knp\\DoctrineBehaviors\\Bundle\\DoctrineBehaviorsBundle::class => ['all' => true],\nNelmio\\CorsBundle\\NelmioCorsBundle::class => ['all' => true],\nSensio\\Bundle\\FrameworkExtraBundle\\SensioFrameworkExtraBundle::class => ['all' => true],\nSymfony\\Bundle\\DebugBundle\\DebugBundle::class => ['dev' => true, 'test' => true, 'local' => true],\n@@ -17,11 +18,10 @@ return [\nSymfony\\Bundle\\SecurityBundle\\SecurityBundle::class => ['all' => true],\nSymfony\\Bundle\\SwiftmailerBundle\\SwiftmailerBundle::class => ['all' => true],\nSymfony\\Bundle\\TwigBundle\\TwigBundle::class => ['all' => true],\n- Symfony\\WebpackEncoreBundle\\WebpackEncoreBundle::class => ['all' => true],\nSymfony\\Bundle\\WebProfilerBundle\\WebProfilerBundle::class => ['dev' => true, 'local' => true],\nSymfony\\Bundle\\WebServerBundle\\WebServerBundle::class => ['dev' => true, 'test' => true, 'local' => true],\n+ Symfony\\WebpackEncoreBundle\\WebpackEncoreBundle::class => ['all' => true],\nTranslation\\Bundle\\TranslationBundle::class => ['all' => true],\nTranslation\\PlatformAdapter\\Loco\\Bridge\\Symfony\\TranslationAdapterLocoBundle::class => ['dev' => true, 'local' => true],\nWhiteOctober\\PagerfantaBundle\\WhiteOctoberPagerfantaBundle::class => ['all' => true],\n- Knp\\DoctrineBehaviors\\Bundle\\DoctrineBehaviorsBundle::class => ['all' => true],\n];\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
[chore] Cleanup bundles.php
|
95,144 |
12.01.2020 08:11:51
| -3,600 |
a2d74aa2917de6d8241051b3d264faafa2194d19
|
[chore] cleanup `_fields.twig`
|
[
{
"change_type": "MODIFY",
"old_path": "templates/helpers/_fields.twig",
"new_path": "templates/helpers/_fields.twig",
"diff": "{# @todo Make set return _just_ the array of fields for `.value` and `getValue()`. See issue #822 #}\n{# note: For sets we need `field.value.fields`, hence the seemingly obtuse way to iterate over them #}\n- {% for field in field.value.fields|default(field.value) %}\n+ {% for field in field.value %}\n{% set type = field.type %}\n{{ block('common_fields') }}\n{{ block('extended_fields') }}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
[chore] cleanup `_fields.twig`
|
95,144 |
12.01.2020 09:06:39
| -3,600 |
53800b4011147461e51a69fe5d42dfd2007f4147
|
Tiny modifications to image field and input placeholders.
|
[
{
"change_type": "MODIFY",
"old_path": "assets/scss/init/_base.scss",
"new_path": "assets/scss/init/_base.scss",
"diff": "@@ -58,3 +58,7 @@ input.flatpickr-input[disabled] {\nbackground-color: $input-disabled-bg;\ncolor: $input-disabled-color;\n}\n+\n+input::placeholder {\n+ font-style: italic;\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "assets/scss/init/_variables.scss",
"new_path": "assets/scss/init/_variables.scss",
"diff": "@@ -48,6 +48,7 @@ $custom-range-thumb-active-bg: var(--primary-400);\n$input-disabled-bg: #f0f3f6;\n$input-disabled-color: #777;\n+$input-placeholder-color: #aaa;\n$input-btn-focus-width: 0.15rem;\n$input-btn-focus-box-shadow: 0 0 0 $input-btn-focus-width var(--primary-200);\n"
},
{
"change_type": "MODIFY",
"old_path": "translations/messages.en.xlf",
"new_path": "translations/messages.en.xlf",
"diff": "<unit id=\"oOuVKRv\" name=\"image.placeholder_filename\">\n<segment>\n<source>image.placeholder_filename</source>\n- <target>Filename</target>\n+ <target>Filename (upload a new file, or select an existing one)</target>\n</segment>\n</unit>\n<unit id=\"BWubOnS\" name=\"image.placeholder_alt_text\">\n"
},
{
"change_type": "MODIFY",
"old_path": "translations/messages.nl.xlf",
"new_path": "translations/messages.nl.xlf",
"diff": "<unit id=\"oOuVKRv\" name=\"image.placeholder_filename\">\n<segment>\n<source>image.placeholder_filename</source>\n- <target>Bestandsnaam</target>\n+ <target>Bestandsnaam (upload een nieuw bestand, of selecteer een bestaande)</target>\n</segment>\n</unit>\n<unit id=\"BWubOnS\" name=\"image.placeholder_alt_text\">\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Tiny modifications to image field and input placeholders.
|
95,144 |
12.01.2020 13:43:01
| -3,600 |
252b06f4c3b9a2a03a387c158c324610f09598ea
|
Several improvements to how you can handle `type: select` fields in the frontend
|
[
{
"change_type": "MODIFY",
"old_path": "src/Entity/Field/SelectField.php",
"new_path": "src/Entity/Field/SelectField.php",
"diff": "@@ -47,6 +47,38 @@ class SelectField extends Field implements FieldInterface\nreturn (array) $value;\n}\n+ public function getOptions()\n+ {\n+ return $this->getDefinition()->get('values');\n+ }\n+\n+ public function getSelected()\n+ {\n+ // \"ContentSelect\" select, with ids of other content\n+ if ($this->isContentSelect()) {\n+ return new Collection(parent::getValue());\n+ }\n+\n+ // \"Normal\" select, with options\n+ return $this->getOptions()->intersectByKeys(array_flip(parent::getValue()));\n+ }\n+\n+ public function getSelectedIds()\n+ {\n+ return implode(' || ', parent::getValue());\n+ }\n+\n+ public function getContentType()\n+ {\n+ $values = $this->getDefinition()->get('values');\n+\n+ if (is_string($values) && mb_strpos($values, '/') !== false) {\n+ return current(explode('/', $values));\n+ }\n+\n+ return false;\n+ }\n+\npublic function isContentSelect(): bool\n{\n$values = $this->getDefinition()->get('values');\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/helpers/_field_blocks.twig",
"new_path": "templates/helpers/_field_blocks.twig",
"diff": "{# Special case for 'select' fields: if it's a multiple select, the field is an array. #}\n{% if type == \"select\" and field is not empty %}\n- <p><strong>{{ field|label }}: </strong>\n- {{ dump(field) }}\n- </p>\n+ <p><strong>{{ field|label }}: </strong></p>\n+ <ul>\n+ {% if field.contentSelect %}\n+ {% setcontent selected = field.contentType where {'id': field.selectedIds} %}\n+ {% for record in selected %}\n+ <li><a href=\"{{ record|link }}\">{{ record|title }}</a></li>\n+ {% endfor %}\n+ {% else %}\n+ {% for key, value in field.selected %}\n+ <li>{{ value }} <small>(key: <code>{{ key }}</code>)</small></li>\n+ {% endfor %}\n+ {% endif %}\n+ </ul>\n{% endif %}\n{# Checkbox fields #}\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/helpers/_fields.twig",
"new_path": "templates/helpers/_fields.twig",
"diff": "{% endif %}\n{# The rest of the built-in types #}\n- {% if extended|default(false) and (type not in exclude|default([])) %}\n+ {% if extended|default(true) and (type not in exclude|default([])) %}\n{{ block('extended_fields') }}\n{% endif %}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Several improvements to how you can handle `type: select` fields in the frontend
|
95,144 |
12.01.2020 14:48:03
| -3,600 |
e397688a8ee31add97b376790828a3aca6249a3c
|
Output fields in the order as specified in ContentType defnition
|
[
{
"change_type": "MODIFY",
"old_path": "templates/helpers/_fields.twig",
"new_path": "templates/helpers/_fields.twig",
"diff": "{% endapply -%}\n{# SECTION 2: LOOPING AND ITERATION - The actual looping is done here. #}\n- {% for field in record.fields|filter(field => field.name not in omittedkeys) %}\n+ {% for name, definition in record.definition.fields|filter(definition => definition.slug not in omittedkeys) %}\n+ {% set field = record.field(name) %}\n{% set type = field|type %}\n- {# Fields that are considered 'common': 'html', 'markdown', 'textarea',\n- 'text', 'image', 'video' and 'imagelist' #}\n+ {# Fields that are considered 'common': 'html', 'markdown', 'textarea', 'text', 'image', 'video' #}\n{% if common|default(true) and (type not in exclude|default([])) %}\n{{ block('common_fields') }}\n{% endif %}\n{# Finally, the collections, filelists and imagelists #}\n{% if type in ['collection', 'filelist', 'imagelist', 'set'] and (type not in exclude|default([])) %}\n- {# @todo Make set return _just_ the array of fields for `.value` and `getValue()`. See issue #822 #}\n- {# note: For sets we need `field.value.fields`, hence the seemingly obtuse way to iterate over them #}\n{% for field in field.value %}\n{% set type = field.type %}\n{{ block('common_fields') }}\n{{ block('extended_fields') }}\n{% endfor %}\n- {% endif %}\n-\n+ {% endif %}\n{% endfor %}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Output fields in the order as specified in ContentType defnition
|
95,144 |
12.01.2020 15:53:21
| -3,600 |
7e03ca7ba763fba6d73ad21ff695bd8e7f48c52c
|
Remove unneeded PHPStan ignore
|
[
{
"change_type": "MODIFY",
"old_path": "phpstan.neon",
"new_path": "phpstan.neon",
"diff": "@@ -7,10 +7,6 @@ parameters:\nignoreErrors:\n# false positive: `Parameter #1 $value of class Twig\\Node\\Expression\\ConstantExpression constructor expects array, string given.`\n# class `ConstantExpression()` casts to array itself.\n- # @todo Check if this is still valid after update to Twig 3\n- -\n- message: '#value of class Twig\\\\Node\\\\Expression\\\\ConstantExpression constructor expects#'\n- path: %currentWorkingDirectory%/src/*\n# false positive: `Unreachable statement - code above always terminates.`\n# @todo Check if this is still needed after https://github.com/phpstan/phpstan/issues/2651 is fixed\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Remove unneeded PHPStan ignore
|
95,144 |
12.01.2020 16:09:11
| -3,600 |
0deec5e3351ae6ed30d4fae6a33a33a05f4e0a6e
|
Updating PHP-translation to 0.11
|
[
{
"change_type": "MODIFY",
"old_path": "composer.json",
"new_path": "composer.json",
"diff": "\"nelmio/cors-bundle\": \"^2.0\",\n\"nesbot/carbon\": \"^2.28\",\n\"peterkahl/country-code-to-emoji-flag\": \"^1.2\",\n- \"php-translation/symfony-bundle\": \"^0.9\",\n+ \"php-translation/symfony-bundle\": \"^0.11\",\n\"phpdocumentor/reflection-docblock\": \"^4.3\",\n\"psr/simple-cache\": \"^1.0\",\n\"scienta/doctrine-json-functions\": \"^4.1\",\n\"dama/doctrine-test-bundle\": \"^6.2.0\",\n\"lakion/mink-debug-extension\": \"^1.2\",\n\"php-http/httplug-pack\": \"^1.2\",\n- \"php-translation/loco-adapter\": \"^0.8\",\n+ \"php-translation/loco-adapter\": \"^0.10\",\n\"phpspec/phpspec\": \"^5.1\",\n\"phpspec/prophecy\": \"^1.10\",\n\"phpstan/phpstan\": \"^0.12\",\n"
},
{
"change_type": "MODIFY",
"old_path": "config/routes/dev/translation.yaml",
"new_path": "config/routes/dev/translation.yaml",
"diff": "_translation_profiler:\n- resource: '@TranslationBundle/Resources/config/routing_symfony_profiler.yml'\n+ resource: '@TranslationBundle/Resources/config/routing_symfony_profiler.yaml'\n"
},
{
"change_type": "MODIFY",
"old_path": "config/routes/translation.yml",
"new_path": "config/routes/translation.yml",
"diff": "_translation_webui:\n- resource: \"@TranslationBundle/Resources/config/routing_webui.yml\"\n+ resource: \"@TranslationBundle/Resources/config/routing_webui.yaml\"\nprefix: '%bolt.backend_url%'\n"
},
{
"change_type": "DELETE",
"old_path": "templates/bundles/TranslationBundle/SymfonyProfiler/translation.html.twig",
"new_path": null,
"diff": "-{# Temporary workaround, until this patch is in a release:\n- @see: https://github.com/php-translation/symfony-bundle/pull/311\n- @see: https://github.com/bolt/four/issues/506\n- #}\n-\n-{% extends '@WebProfiler/Collector/translation.html.twig' %}\n-\n-{#\n- # Authors Tobias Nyholm, Damien Alexandre (damienalexandre), Damien Harper\n- #}\n-\n-{% import _self as translation_helper %}\n-\n-{% block panelContent %}\n- <h2>Translation Metrics</h2>\n-\n- <div>\n- <a class=\"btn\" href=\"javascript:void(0);\" onclick='syncAll()'>Synchronize all translations</a><br />\n- <div id=\"top-result-area\"></div>\n- </div>\n-\n- <div class=\"metrics\">\n- <div class=\"metric\">\n- <span class=\"value\">{{ collector.countdefines }}</span>\n- <span class=\"label\">Defined messages</span>\n- </div>\n-\n- <div class=\"metric\">\n- <span class=\"value\">{{ collector.countFallbacks }}</span>\n- <span class=\"label\">Fallback messages</span>\n- </div>\n-\n- <div class=\"metric\">\n- <span class=\"value\">{{ collector.countMissings }}</span>\n- <span class=\"label\">Missing messages</span>\n- </div>\n- </div>\n-\n- <h2>Translation Messages</h2>\n-\n- {# sort translation messages in groups #}\n- {% set messages_defined, messages_missing, messages_fallback = [], [], [] %}\n- {% for key, message in collector.messages %}\n- {% if message.state == constant('Symfony\\\\Component\\\\Translation\\\\DataCollectorTranslator::MESSAGE_DEFINED') %}\n- {% set messages_defined = messages_defined|merge({(key): message}) %}\n- {% elseif message.state == constant('Symfony\\\\Component\\\\Translation\\\\DataCollectorTranslator::MESSAGE_MISSING') %}\n- {% set messages_missing = messages_missing|merge({(key): message}) %}\n- {% elseif message.state == constant('Symfony\\\\Component\\\\Translation\\\\DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK') %}\n- {% set messages_fallback = messages_fallback|merge({(key): message}) %}\n- {% endif %}\n- {% endfor %}\n-\n- <form action=\"{{ path('php_translation_profiler_translation_create_assets', {'token': token}) }}\" method=\"post\"\n- id=\"translations-list\" onSubmit=\"return saveTranslations(this);\" >\n- <span class=\"hidden\">\n- <img src=\"{{ asset(\"bundles/translation/css/images/loader.svg\") }}\" width=\"60\" id=\"svg-loader\">\n- </span>\n-\n- <div class=\"sf-tabs\">\n- <div class=\"tab\">\n- <h3 class=\"tab-title\">Defined <span class=\"badge\">{{ messages_defined|length }}</span></h3>\n-\n- <div class=\"tab-content\">\n- <p class=\"help\">\n- These messages are correctly translated into the given locale.\n- </p>\n-\n- {% if messages_defined is empty %}\n- <div class=\"empty\">\n- <p>None of the used translation messages are defined for the given locale.</p>\n- </div>\n- {% else %}\n- {{ translation_helper.render_table(messages_defined) }}\n- {% endif %}\n- </div>\n- </div>\n-\n- <div class=\"tab\">\n- <h3 class=\"tab-title\">Fallback <span class=\"badge\">{{ messages_fallback|length }}</span></h3>\n-\n- <div class=\"tab-content\">\n- <p class=\"help\">\n- These messages are not available for the given locale\n- but Symfony found them in the fallback locale catalog.\n- </p>\n-\n- {% if messages_fallback is empty %}\n- <div class=\"empty\">\n- <p>No fallback translation messages were used.</p>\n- </div>\n- {% else %}\n- {{ translation_helper.render_table(messages_fallback) }}\n- {% endif %}\n- </div>\n- </div>\n-\n- <div class=\"tab\">\n- <h3 class=\"tab-title\">Missing <span class=\"badge\">{{ messages_missing|length }}</span></h3>\n-\n- <div class=\"tab-content\">\n- <p class=\"help\">\n- These messages are not available for the given locale and cannot\n- be found in the fallback locales. Add them to the translation\n- catalogue to avoid Symfony outputting untranslated contents.\n- </p>\n-\n- {% if messages_missing is empty %}\n- <div class=\"empty\">\n- <p>There are no messages of this category.</p>\n- </div>\n- {% else %}\n- {{ translation_helper.render_table(messages_missing, true) }}\n- {% endif %}\n- </div>\n- </div>\n- </div>\n-\n- <p class=\"full-width\" id=\"translationResult\"></p>\n-\n- <button type=\"submit\" class=\"btn\">\n- Add selected messages\n- </button>\n-\n- </form>\n- {% include \"@Translation/SymfonyProfiler/javascripts.html.twig\" %}\n-{% endblock %}\n-\n-{% block panel %}\n- {{ block('panelContent') }}\n-{% endblock %}\n-\n-{% macro render_table(messages, checkedByDefault = false) %}\n- <table>\n- <thead>\n- <tr>\n- <th>\n- <input type=\"checkbox\" id=\"check-all-control\" onchange=\"toggleCheckAll(this)\" {% if checkedByDefault %}checked=\"checked\"{% endif %}>\n- </th>\n- <th>Locale</th>\n- <th>Domain</th>\n- <th>Times used</th>\n- <th>Message ID</th>\n- <th>Message Preview</th>\n- <th>Actions</th>\n- </tr>\n- </thead>\n- <tbody>\n- {% for key, message in messages %}\n- <tr id=\"{{ key }}\">\n- <td>\n- {% if message.state == constant('Symfony\\\\Component\\\\Translation\\\\DataCollectorTranslator::MESSAGE_MISSING') %}\n- <input type=\"checkbox\" name=\"translationKey\" value=\"{{ key }}\" checked=\"checked\" class=\"translation-key-checkbox\">\n- {% else %}\n- <input type=\"checkbox\" disabled=\"disabled\">\n- {% endif %}\n- </td>\n- <td class=\"font-normal text-small\">{{ message.locale }}</td>\n- <td class=\"font-normal text-small text-bold nowrap\">{{ message.domain }}</td>\n- <td class=\"font-normal text-small\">{{ message.count }}</td>\n- <td>\n- {{ message.id }}\n-\n- {% if message.transChoiceNumber is not null %}\n- <small class=\"newline\">(pluralization is used)</small>\n- {% endif %}\n-\n- {% if message.parameters|length > 0 %}\n- <button class=\"btn-link newline text-small sf-toggle\" data-toggle-selector=\"#parameters-{{ loop.index }}\" data-toggle-alt-content=\"Hide parameters\">Show parameters</button>\n-\n- <div id=\"parameters-{{ loop.index }}\" class=\"hidden\">\n- {% for parameters in message.parameters %}\n- {{ profiler_dump(parameters) }}\n- {% if not loop.last %}<br />{% endif %}\n- {% endfor %}\n- </div>\n- {% endif %}\n- </td>\n- <td class=\"translation\">\n- {{ message.translation }}\n- </td>\n- <td width=\"155px\">\n- {% apply spaceless %}\n- <a class=\"edit btn btn-sm\" href=\"javascript:void(0);\" onclick='getEditForm(\"{{ key }}\")'>Edit</a>\n- |\n- <a class=\"sync btn btn-sm\" href=\"javascript:void(0);\" onclick='syncMessage(\"{{ key }}\")'>Sync</a>\n- {% endapply %}\n- </td>\n- </tr>\n- {% endfor %}\n- </tbody>\n- </table>\n-{% endmacro %}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Updating PHP-translation to 0.11
|
95,144 |
12.01.2020 17:00:33
| -3,600 |
5f5a1838bff6a96714279170e303f18165536c0a
|
Updating to Twig 3
|
[
{
"change_type": "MODIFY",
"old_path": "composer.json",
"new_path": "composer.json",
"diff": "\"symfony/webpack-encore-bundle\": \"^1.7\",\n\"symfony/yaml\": \"^4.4\",\n\"tightenco/collect\": \"^6.9\",\n- \"twig/extensions\": \"^1.5\",\n+ \"twig/twig\": \"^3.0\",\n\"ua-parser/uap-php\": \"^3.9\",\n\"webmozart/path-util\": \"^2.3\",\n\"webonyx/graphql-php\": \"^0.13\",\n"
},
{
"change_type": "MODIFY",
"old_path": "config/packages/twig.yaml",
"new_path": "config/packages/twig.yaml",
"diff": "twig:\ndebug: '%kernel.debug%'\n- strict_variables: true\n+ strict_variables: '%kernel.debug%'\nform_themes:\n- '@bolt/form/layout.html.twig'\n- '@bolt/form/fields.html.twig'\n"
},
{
"change_type": "DELETE",
"old_path": "config/packages/twig_extensions.yaml",
"new_path": null,
"diff": "-services:\n- _defaults:\n- public: false\n- autowire: true\n- autoconfigure: true\n-\n- #Twig\\Extensions\\ArrayExtension: ~\n- #Twig\\Extensions\\DateExtension: ~\n- Twig\\Extensions\\IntlExtension: ~ # needed for the 'localizeddate' filter\n- #Twig\\Extensions\\TextExtension: ~\n"
},
{
"change_type": "MODIFY",
"old_path": "symfony.lock",
"new_path": "symfony.lock",
"diff": "\"tightenco/collect\": {\n\"version\": \"v6.9.0\"\n},\n- \"twig/extensions\": {\n- \"version\": \"1.0\",\n- \"recipe\": {\n- \"repo\": \"github.com/symfony/recipes\",\n- \"branch\": \"master\",\n- \"version\": \"1.0\",\n- \"ref\": \"a86723ee8d8b2f9437c8ce60a5546a1c267da5ed\"\n- },\n- \"files\": [\n- \"config/packages/twig_extensions.yaml\"\n- ]\n- },\n\"twig/twig\": {\n\"version\": \"v2.12.3\"\n},\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Updating to Twig 3
|
95,144 |
12.01.2020 17:13:30
| -3,600 |
a11510c2a7f63373d65d618ceb4f2650619dae64
|
Updating phpdoc
|
[
{
"change_type": "MODIFY",
"old_path": "src/Controller/Frontend/TemplateController.php",
"new_path": "src/Controller/Frontend/TemplateController.php",
"diff": "@@ -17,10 +17,6 @@ class TemplateController extends TwigAwareController implements FrontendZone\n* Note: This is _not_ assigned a Route by default. If it were, it's a potential security risk,\n* since a would-be attacker could try to access template files from both the theme and bolt\n* directly.\n- *\n- * @throws \\Twig_Error_Loader\n- * @throws \\Twig_Error_Runtime\n- * @throws \\Twig_Error_Syntax\n*/\npublic function template(string $templateName): Response\n{\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/TwigAwareController.php",
"new_path": "src/Controller/TwigAwareController.php",
"diff": "@@ -45,13 +45,8 @@ class TwigAwareController extends AbstractController\n/**\n* Renders a view.\n*\n- * @final\n- *\n* @param string|array $template\n*\n- * @throws \\Twig_Error_Loader When none of the templates can be found\n- * @throws \\Twig_Error_Syntax When an error occurred during compilation\n- * @throws \\Twig_Error_Runtime When an error occurred during rendering\n*/\nprotected function renderTemplate($template, array $parameters = [], ?Response $response = null): Response\n{\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Updating phpdoc
|
95,144 |
12.01.2020 17:17:24
| -3,600 |
d6c93406c1b9d1954bbad0c49a7ed7f1b72d81fa
|
Update _aside.twig
|
[
{
"change_type": "MODIFY",
"old_path": "public/theme/skeleton/partials/_aside.twig",
"new_path": "public/theme/skeleton/partials/_aside.twig",
"diff": "Lastly, \"path('listing', {'contentTypeSlug': ct.slug})\" will output something like '/pages',\neffectively creating a working link to that contenttpye's listing page. #}\n- {% for ct in config.get('contenttypes') if not ct.viewless|default(false) %}\n+ {% for ct in config.get('contenttypes')|filter(ct => not ct.viewless) %}\n{% setcontent records = ct.slug ~ \"/latest/3\" %}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Update _aside.twig
|
95,144 |
13.01.2020 19:05:01
| -3,600 |
4ad0767c5fa90bf274e6c1faffe8fafc413daa12
|
Update `findOneByFieldValue` method to handle translated fields
|
[
{
"change_type": "MODIFY",
"old_path": "src/Repository/ContentRepository.php",
"new_path": "src/Repository/ContentRepository.php",
"diff": "@@ -189,10 +189,11 @@ class ContentRepository extends ServiceEntityRepository\n{\n$qb = $this->getQueryBuilder();\n- [$where, $value] = JsonHelper::wrapJsonFunction('field.value', $value, $qb);\n+ [$where, $value] = JsonHelper::wrapJsonFunction('translation.value', $value, $qb);\nreturn $qb\n->innerJoin('content.fields', 'field')\n+ ->innerJoin('field.translations', 'translation')\n->andWhere($where . ' = :value')\n->setParameter('value', $value)\n->setMaxResults(1)\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Update `findOneByFieldValue` method to handle translated fields
|
95,144 |
15.01.2020 18:02:25
| -3,600 |
56cf9c2de943c904cf94d64ad03d8c4c2b6e8ce5
|
Don't log the request variables
|
[
{
"change_type": "MODIFY",
"old_path": "src/Log/RequestProcessor.php",
"new_path": "src/Log/RequestProcessor.php",
"diff": "@@ -44,7 +44,6 @@ class RequestProcessor\n'uri' => $request->getUri(),\n'query_string' => $request->getQueryString(),\n'method' => $request->getMethod(),\n- 'request' => $request->request->all(),\n];\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Don't log the request variables
|
95,144 |
15.01.2020 18:20:05
| -3,600 |
4639c9b91634ef014ba47daef9c73c5c2af68bf7
|
Show correct Slug prefix when creating new content
|
[
{
"change_type": "MODIFY",
"old_path": "src/Entity/Field/SlugField.php",
"new_path": "src/Entity/Field/SlugField.php",
"diff": "@@ -31,19 +31,6 @@ class SlugField extends Field implements FieldInterface\nreturn $this;\n}\n- public function getSlugPrefix(): string\n- {\n- // @todo https://github.com/bolt/four/issues/188 allow empty slug prefix\n- $content = $this->getContent();\n-\n- if (! $content) {\n- //@todo remove this\n- return '/foobar/';\n- }\n-\n- return sprintf('/%s/', $content->getDefinition()->get('singular_slug'));\n- }\n-\npublic function getSlugUseFields(): array\n{\nreturn Collection::wrap($this->getDefinition()->get('uses'))->toArray();\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/_partials/fields/slug.html.twig",
"new_path": "templates/_partials/fields/slug.html.twig",
"diff": "{% extends '@bolt/_partials/fields/_base.html.twig' %}\n{% block field %}\n+{% set prefix = '/' ~ record.definition.singular_slug ~ '/' %}\n<editor-slug\n:value='{{ value|json_encode }}'\n:name='{{ name|json_encode }}'\n- :prefix='{{ field.slugPrefix|json_encode }}'\n+ :prefix='{{ prefix|json_encode }}'\n:field-class='{{ class|json_encode }}'\n:generate='{{ field.slugUseFields|join(', ')|json_encode }}'\n:labels='{{ {\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Show correct Slug prefix when creating new content
|
95,144 |
15.01.2020 19:10:24
| -3,600 |
a6da4be93446586735493af555bd667ce499d702
|
Working on slug generation
|
[
{
"change_type": "MODIFY",
"old_path": "assets/js/app/editor/Components/Slug.vue",
"new_path": "assets/js/app/editor/Components/Slug.vue",
"diff": "@@ -93,9 +93,12 @@ export default {\n}\n},\ngenerateSlug() {\n- const title = document.querySelector(\n- `input[name='fields[${this.generate}]']`,\n- ).value;\n+ let title = '';\n+\n+ this.generate.split(',').forEach(element => {\n+ title = title + ' ' + document.querySelector(`input[name='fields[${element}]']`).value;\n+ });\n+\nconst slug = this.$options.filters.slugify(title);\nthis.val = slug;\nthis.$root.$emit('generate-from-title', true);\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/_partials/fields/slug.html.twig",
"new_path": "templates/_partials/fields/slug.html.twig",
"diff": "{% block field %}\n{% set prefix = '/' ~ record.definition.singular_slug ~ '/' %}\n+<br><code>{{ field.slugUseFields|join(', ')|json_encode }}</code>\n<editor-slug\n:value='{{ value|json_encode }}'\n:name='{{ name|json_encode }}'\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Working on slug generation
|
95,144 |
15.01.2020 20:09:05
| -3,600 |
46b56e1535cda3d85e46cfece8eaeac7da5d7197
|
Fix behaviour of Slug field
|
[
{
"change_type": "MODIFY",
"old_path": "assets/js/app/editor/Components/Slug.vue",
"new_path": "assets/js/app/editor/Components/Slug.vue",
"diff": "<i class=\"fas fa-fw\" :class=\"`fa-${icon}`\"></i> {{ buttonText }}\n</button>\n<div class=\"dropdown-menu\">\n- <a class=\"dropdown-item\" @click=\"editSlug\">\n<template v-if=\"!edit\">\n+ <a class=\"dropdown-item\" @click=\"editSlug\">\n<i class=\"fas fa-pencil-alt fa-fw\"></i> {{ labels.button_edit }}\n+ </a>\n</template>\n- <template v-else>\n+ <template v-if=\"!locked\">\n+ <a class=\"dropdown-item\" @click=\"lockSlug\">\n<i class=\"fas fa-lock fa-fw\"></i> {{ labels.button_locked }}\n- </template>\n</a>\n+ </template>\n<a class=\"dropdown-item\" @click=\"generateSlug()\">\n<i class=\"fas fa-link fa-fw\"></i> {{ labels.generate_from }}\n{{ generate }}\n@@ -61,40 +63,46 @@ export default {\ndata: () => {\nreturn {\nedit: false,\n+ locked: false,\nbuttonText: 'Locked',\nicon: 'lock',\n};\n},\nmounted() {\nsetTimeout(() => {\n- const title = document.querySelector(\n- `input[name='fields[${this.generate}]']`,\n- ).value;\n+ console.log('time, time, time');\n+ let title = '';\n+ this.generate.split(',').forEach(element => {\n+ title = title + document.querySelector(`input[name='fields[${element}]']`).value;\n+ });\nif (title.length <= 0) {\n+ this.icon = 'unlock';\n+ this.buttonText = this.$props.labels.button_unlocked;\nthis.$root.$emit('generate-from-title', true);\n}\n}, 0);\nthis.$root.$on('slugify-from-title', () => this.generateSlug());\n- this.buttonText = this.$props.labels.button_locked;\n+\n},\nmethods: {\neditSlug() {\nthis.$root.$emit('generate-from-title', false);\n- if (!this.edit) {\nthis.edit = true;\n+ this.locked = false;\nthis.buttonText = this.$props.labels.button_edit;\nthis.icon = 'pencil-alt';\n- } else {\n+ },\n+ lockSlug() {\n+ this.$root.$emit('generate-from-title', false);\nconst slug = this.$options.filters.slugify(this.val);\nthis.val = slug;\nthis.edit = false;\n+ this.locked = true;\nthis.buttonText = this.$props.labels.button_locked;\nthis.icon = 'lock';\n- }\n},\ngenerateSlug() {\nlet title = '';\n-\nthis.generate.split(',').forEach(element => {\ntitle = title + ' ' + document.querySelector(`input[name='fields[${element}]']`).value;\n});\n@@ -104,8 +112,9 @@ export default {\nthis.$root.$emit('generate-from-title', true);\nthis.edit = false;\n- this.buttonText = this.$props.labels.button_locked;\n- this.icon = 'lock';\n+ this.locked = false;\n+ this.buttonText = this.$props.labels.button_unlocked;\n+ this.icon = 'unlock';\n},\n},\n};\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/_partials/fields/slug.html.twig",
"new_path": "templates/_partials/fields/slug.html.twig",
"diff": ":field-class='{{ class|json_encode }}'\n:generate='{{ field.slugUseFields|join(',')|json_encode }}'\n:labels='{{ {\n+ 'button_unlocked': 'slug.button_unlocked'|trans,\n'button_locked': 'slug.button_locked'|trans,\n'button_edit': 'slug.button_edit'|trans,\n'generate_from': 'slug.generate_from'|trans,\n"
},
{
"change_type": "MODIFY",
"old_path": "translations/messages.en.xlf",
"new_path": "translations/messages.en.xlf",
"diff": "<target>Disabled</target>\n</segment>\n</unit>\n+ <unit id=\"XQ2U6fN\" name=\"slug.button_unlocked\">\n+ <segment>\n+ <source>slug.button_unlocked</source>\n+ <target>Unlocked</target>\n+ </segment>\n+ </unit>\n</file>\n</xliff>\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Fix behaviour of Slug field
|
95,144 |
15.01.2020 20:10:01
| -3,600 |
f0a63ed74227ef60563ecad75b693815a60ab6b4
|
Lint Slug.vue
|
[
{
"change_type": "MODIFY",
"old_path": "assets/js/app/editor/Components/Slug.vue",
"new_path": "assets/js/app/editor/Components/Slug.vue",
"diff": "@@ -73,7 +73,9 @@ export default {\nconsole.log('time, time, time');\nlet title = '';\nthis.generate.split(',').forEach(element => {\n- title = title + document.querySelector(`input[name='fields[${element}]']`).value;\n+ title =\n+ title +\n+ document.querySelector(`input[name='fields[${element}]']`).value;\n});\nif (title.length <= 0) {\nthis.icon = 'unlock';\n@@ -82,7 +84,6 @@ export default {\n}\n}, 0);\nthis.$root.$on('slugify-from-title', () => this.generateSlug());\n-\n},\nmethods: {\neditSlug() {\n@@ -104,7 +105,10 @@ export default {\ngenerateSlug() {\nlet title = '';\nthis.generate.split(',').forEach(element => {\n- title = title + ' ' + document.querySelector(`input[name='fields[${element}]']`).value;\n+ title =\n+ title +\n+ ' ' +\n+ document.querySelector(`input[name='fields[${element}]']`).value;\n});\nconst slug = this.$options.filters.slugify(title);\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Lint Slug.vue
|
95,144 |
15.01.2020 20:13:10
| -3,600 |
98ea749773d8addf5a2dfd36f1e0b1de30b6455b
|
Update slug.html.twig
|
[
{
"change_type": "MODIFY",
"old_path": "templates/_partials/fields/slug.html.twig",
"new_path": "templates/_partials/fields/slug.html.twig",
"diff": "{% block field %}\n{% set prefix = '/' ~ record.definition.singular_slug ~ '/' %}\n-<br><code>{{ field.slugUseFields|join(', ')|json_encode }}</code>\n<editor-slug\n:value='{{ value|json_encode }}'\n:name='{{ name|json_encode }}'\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Update slug.html.twig
|
95,144 |
15.01.2020 20:31:44
| -3,600 |
a9c66b660596c95140db7bc03f1e5387a45cd508
|
Ninja-edit -> remove console.log
|
[
{
"change_type": "MODIFY",
"old_path": "assets/js/app/editor/Components/Slug.vue",
"new_path": "assets/js/app/editor/Components/Slug.vue",
"diff": "@@ -70,7 +70,6 @@ export default {\n},\nmounted() {\nsetTimeout(() => {\n- console.log('time, time, time');\nlet title = '';\nthis.generate.split(',').forEach(element => {\ntitle =\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Ninja-edit -> remove console.log
|
95,144 |
18.01.2020 12:44:03
| -3,600 |
517bedaad2b52b96fe0eba9751e1c6ef05a864d0
|
Generate `services_bolt.yaml` file, so that extensions can be used as services
|
[
{
"change_type": "ADD",
"old_path": null,
"new_path": "config/services_bolt.yaml",
"diff": "+# This file is auto-generated by Bolt. Do not modify.\n+# Generated on: 2020-01-18T12:42:00+01:00\n+\n+services:\n+ _defaults:\n+ autowire: true\n+ autoconfigure: true\n+ AcmeCorp\\ReferenceExtension\\:\n+ resource: '../vendor/acmecorp/reference-extension/src/*'\n+ exclude: '../vendor/acmecorp/reference-extension/src/{Entity,Exception}'\n+ BobdenOtter\\WeatherWidget\\:\n+ resource: '../vendor/bobdenotter/weatherwidget/src/*'\n+ exclude: '../vendor/bobdenotter/weatherwidget/src/{Entity,Exception}'\n+ Bolt\\NewsWidget\\:\n+ resource: '../vendor/bolt/newswidget/src/*'\n+ exclude: '../vendor/bolt/newswidget/src/{Entity,Exception}'\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Extension/ExtensionCompilerPass.php",
"new_path": "src/Extension/ExtensionCompilerPass.php",
"diff": "@@ -16,10 +16,14 @@ class ExtensionCompilerPass implements CompilerPassInterface\n}\n$registry = $container->findDefinition(ExtensionRegistry::class);\n+\n// The important bit: grab all classes that were tagged with our specified CONTAINER_TAG, and shove them into our Repository\nforeach (array_keys($container->findTaggedServiceIds(ExtensionInterface::CONTAINER_TAG)) as $id) {\n/* @see ExtensionRegistry::addCompilerPass() */\n$registry->addMethodCall('addCompilerPass', [$id]);\n}\n+\n+ // Build our own `services_bolt.yml` file\n+ $registry->addMethodCall('buildServices');\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Extension/ExtensionRegistry.php",
"new_path": "src/Extension/ExtensionRegistry.php",
"diff": "@@ -4,9 +4,12 @@ declare(strict_types=1);\nnamespace Bolt\\Extension;\n+use Bolt\\Common\\Str;\nuse Bolt\\Event\\Subscriber\\ExtensionSubscriber;\nuse Composer\\Package\\PackageInterface;\nuse ComposerPackages\\Types;\n+use Symfony\\Component\\Yaml\\Yaml;\n+use Webmozart\\PathUtil\\Path;\nclass ExtensionRegistry\n{\n@@ -16,6 +19,14 @@ class ExtensionRegistry\n/** @var array */\nprotected $extensionClasses = [];\n+ /** @var string */\n+ private $projectDir;\n+\n+ public function __construct(string $projectDir)\n+ {\n+ $this->projectDir = $projectDir;\n+ }\n+\n/**\n* @see ExtensionCompilerPass::process()\n*/\n@@ -122,4 +133,57 @@ class ExtensionRegistry\nreturn $routes;\n}\n+\n+ /**\n+ * Note: we get the composer packages here, not the ones from the compiler\n+ * pass. The latter already get autowired, so we need only the former. We\n+ * _do_ do this during the compiler pass though, since that's a good time\n+ * to build it.\n+ *\n+ * @see ExtensionCompilerPass::process()\n+ */\n+ public function buildServices(): void\n+ {\n+ $services = [\n+ 'services' => [\n+ '_defaults' => [\n+ 'autowire' => true,\n+ 'autoconfigure' => true,\n+ ],\n+ ],\n+ ];\n+\n+ $packages = Types::get('bolt-extension');\n+ foreach ($packages as $package) {\n+ [$name, $service] = $this->createService($package);\n+ if ($name) {\n+ $services['services'][$name] = $service;\n+ }\n+ }\n+\n+ $yaml = \"# This file is auto-generated by Bolt. Do not modify.\\n\";\n+ $yaml .= '# Generated on: ' . date('c') . \"\\n\\n\";\n+ $yaml .= Yaml::dump($services, 3);\n+ file_put_contents($this->projectDir . '/config/services_bolt.yaml', $yaml);\n+ }\n+\n+ private function createService($package): array\n+ {\n+ $extra = $package->getExtra();\n+\n+ // If it doesn't exist, silently bail. It's handled in addComposerPackages\n+ if (! array_key_exists('entrypoint', $extra) || ! class_exists($extra['entrypoint'])) {\n+ return [false, false];\n+ }\n+\n+ $reflection = new \\ReflectionClass($extra['entrypoint']);\n+\n+ $namespace = Str::removeLast($reflection->getName(), Str::splitLast($reflection->getName(), '\\\\'));\n+ $path = Path::makeRelative(dirname($reflection->getFileName()), $this->projectDir . '/foo');\n+\n+ return [$namespace, [\n+ 'resource' => $path . '/*',\n+ 'exclude' => $path . '/{Entity,Exception}',\n+ ]];\n+ }\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Kernel.php",
"new_path": "src/Kernel.php",
"diff": "@@ -64,6 +64,13 @@ class Kernel extends BaseKernel\n$loader->load($confDir . '/{packages}/' . $this->environment . '/*' . self::CONFIG_EXTS, 'glob');\n$loader->load($confDir . '/{services}' . self::CONFIG_EXTS, 'glob');\n$loader->load($confDir . '/{services}_' . $this->environment . self::CONFIG_EXTS, 'glob');\n+\n+ try {\n+ $loader->load($confDir . '/{services}_bolt' . self::CONFIG_EXTS, 'glob');\n+ } catch (\\Exception $e) {\n+ // Ignore errors. The file will be updated on next `cache:clear` or whenever\n+ // the container gets refreshed\n+ }\n}\nprotected function configureRoutes(RouteCollectionBuilder $routes): void\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Generate `services_bolt.yaml` file, so that extensions can be used as services
|
95,144 |
18.01.2020 13:40:15
| -3,600 |
5181e4f766db3931afc6923285fc3971a33c0a5a
|
Add imagelist fixtures
|
[
{
"change_type": "MODIFY",
"old_path": "src/DataFixtures/ContentFixtures.php",
"new_path": "src/DataFixtures/ContentFixtures.php",
"diff": "@@ -237,7 +237,6 @@ class ContentFixtures extends BaseFixture implements DependentFixtureInterface,\n$data = [\n'filename' => $randomImage->getRelativePathname(),\n'alt' => $this->faker->sentence(4, true),\n- 'title' => $this->faker->sentence(7, true),\n'media' => '',\n];\nbreak;\n@@ -268,10 +267,16 @@ class ContentFixtures extends BaseFixture implements DependentFixtureInterface,\n}\nbreak;\ncase 'imagelist':\n- $data = [];\n- break;\ncase 'filelist':\n$data = [];\n+ for ($i = 1; $i < 5; $i++) {\n+ $randomImage = $this->imagesIndex->random();\n+ $data[] = [\n+ 'filename' => $randomImage->getRelativePathname(),\n+ 'alt' => $this->faker->sentence(4, true),\n+ 'media' => '',\n+ ];\n+ }\nbreak;\ndefault:\n$data = [$this->faker->sentence(6, true)];\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Add imagelist fixtures
|
95,144 |
18.01.2020 14:37:25
| -3,600 |
1e8a29b97c706de3b84bf22fa7f4f21a10de8ed4
|
Make "mode: datetime" work
|
[
{
"change_type": "MODIFY",
"old_path": "templates/_partials/fields/date.html.twig",
"new_path": "templates/_partials/fields/date.html.twig",
"diff": "{% endif %}\n{# set mode #}\n{% if mode is not defined %}\n- {% set mode = define.mode|default(false) %}\n+ {% set mode = field.definition.mode|default(false) %}\n{% endif %}\n{# check if we only want the value: valueonly #}\n{% if valueonly is not defined %}\n"
},
{
"change_type": "DELETE",
"old_path": "templates/_partials/fields/datetime.html.twig",
"new_path": null,
"diff": "-{% extends '@bolt/_partials/fields/_base.html.twig' %}\n-\n-{% block field %}\n- {# Check Attributes #}\n- {% if readonly is not defined %}\n- {% set readonly = false %}\n- {% endif %}\n- {% if form is not defined %}\n- {% set form = '' %}\n- {% endif %}\n- {# for timestamps, make sure it's formatted correctly #}\n- {% if value.timestamp is defined %}\n- {% set value = value|date(format='c') %}\n- {% endif %}\n-\n- <editor-datetime\n- :value='{{ value|json_encode }}'\n- :name='{{ name|json_encode }}'\n- :readonly='{{ readonly|json_encode }}'\n- :form='{{ form|json_encode }}'\n- ></editor-datetime>\n-{% endblock %}\n-\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Make "mode: datetime" work
|
95,144 |
18.01.2020 16:56:41
| -3,600 |
3db925b89aac00a119ea541b67a2f3ecc983572d
|
Ok, that generated timestamp is really annoying
|
[
{
"change_type": "MODIFY",
"old_path": "config/services_bolt.yaml",
"new_path": "config/services_bolt.yaml",
"diff": "# This file is auto-generated by Bolt. Do not modify.\n-# Generated on: 2020-01-18T12:48:57+01:00\nservices:\n_defaults:\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Extension/ExtensionRegistry.php",
"new_path": "src/Extension/ExtensionRegistry.php",
"diff": "@@ -162,8 +162,7 @@ class ExtensionRegistry\n}\n}\n- $yaml = \"# This file is auto-generated by Bolt. Do not modify.\\n\";\n- $yaml .= '# Generated on: ' . date('c') . \"\\n\\n\";\n+ $yaml = \"# This file is auto-generated by Bolt. Do not modify.\\n\\n\";\n$yaml .= Yaml::dump($services, 3);\nfile_put_contents($this->projectDir . '/config/services_bolt.yaml', $yaml);\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Ok, that generated timestamp is really annoying
|
95,144 |
18.01.2020 16:59:13
| -3,600 |
a4c81947b70c96b2d1a6d8ac81f278f0b178e743
|
Add `localdate` as an alias of `localedatetime`
|
[
{
"change_type": "MODIFY",
"old_path": "src/Twig/LocaleExtension.php",
"new_path": "src/Twig/LocaleExtension.php",
"diff": "@@ -37,6 +37,7 @@ class LocaleExtension extends AbstractExtension\nreturn [\nnew TwigFilter('localedatetime', [$this, 'localedatetime'], $safe),\n+ new TwigFilter('localdate', [$this, 'localedatetime'], $safe),\n];\n}\n@@ -122,6 +123,7 @@ class LocaleExtension extends AbstractExtension\n// @see: http://php.net/strftime\n$os = mb_strtoupper(mb_substr(PHP_OS, 0, 3));\n$format = $os !== 'WIN' ? $format : preg_replace('#(?<!%)((?:%%)*)%e#', '\\1%#d', $format);\n+ $timestamp = $dateTime->getTimestamp();\n// According to http://php.net/manual/en/function.setlocale.php manual\n// if the second parameter is \"0\", the locale setting is not affected,\n@@ -138,7 +140,6 @@ class LocaleExtension extends AbstractExtension\nreturn $dateTime->format('Y-m-d H:i:s');\n}\n- $timestamp = $dateTime->getTimestamp();\nreturn strftime($format, $timestamp);\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Add `localdate` as an alias of `localedatetime`
|
95,144 |
21.01.2020 21:59:06
| -3,600 |
f76ef0114f4d44da895f72cfb5160a3117b2a85c
|
A few resiliency fixes, for when the DB is empty
|
[
{
"change_type": "MODIFY",
"old_path": "src/Controller/Frontend/DetailController.php",
"new_path": "src/Controller/Frontend/DetailController.php",
"diff": "@@ -59,6 +59,10 @@ class DetailController extends TwigAwareController implements FrontendZone\n$record = $field->getContent();\n}\n+ if (! $record) {\n+ throw new NotFoundHttpException('Content not found');\n+ }\n+\n// If the content is not 'published' we throw a 404, unless we've overridden it.\nif (($record->getStatus() !== Statuses::PUBLISHED) && $requirePublished) {\nthrow new NotFoundHttpException('Content is not published');\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/ContentExtension.php",
"new_path": "src/Twig/ContentExtension.php",
"diff": "@@ -132,8 +132,12 @@ class ContentExtension extends AbstractExtension\n/**\n* @return ImageField|array|null\n*/\n- public function getImage(Content $content, bool $onlyValues = false)\n+ public function getImage(?Content $content, bool $onlyValues = false)\n{\n+ if (! $content) {\n+ return null;\n+ }\n+\nforeach ($content->getFields() as $field) {\nif ($field instanceof ImageField) {\nreturn $onlyValues ? $field->getValue() : $field;\n"
},
{
"change_type": "MODIFY",
"old_path": "translations/messages.en.xlf",
"new_path": "translations/messages.en.xlf",
"diff": "<target>Unlocked</target>\n</segment>\n</unit>\n+ <unit id=\"jz2qkbb\" name=\"general.phrase.no-content-found\">\n+ <segment>\n+ <source>general.phrase.no-content-found</source>\n+ <target>No content found</target>\n+ </segment>\n+ </unit>\n+ <unit id=\"FM8B.gO\" name=\"general.phrase.empty-database\">\n+ <segment>\n+ <source>general.phrase.empty-database</source>\n+ <target>It looks like the database is empty. Write some content in the Bolt backend, or run the command to add some fixtures (dummy content). </target>\n+ </segment>\n+ </unit>\n</file>\n</xliff>\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
A few resiliency fixes, for when the DB is empty
|
95,144 |
21.01.2020 22:11:32
| -3,600 |
aa20602bccdbbd2333717c687a0b1fc581c1e7f4
|
Cleanup magic methods for interacting with `{{ field }}`
|
[
{
"change_type": "MODIFY",
"old_path": "src/Entity/Field.php",
"new_path": "src/Entity/Field.php",
"diff": "@@ -73,18 +73,12 @@ class Field implements FieldInterface, TranslatableInterface\npublic function __toString(): string\n{\n- $value = [];\n- $iterator = new \\RecursiveIteratorIterator(new \\RecursiveArrayIterator($this->getValue()));\n- foreach ($iterator as $iteratorValue) {\n- $value[] = $iteratorValue;\n- }\n-\n- return implode(', ', $value);\n+ return (string) $this->getTwigValue();\n}\npublic function __call(string $key = '', array $arguments = [])\n{\n- $value = $this->getValue();\n+ $value = $this->getTwigValue();\nif (is_array($value) && array_key_exists($key, $value)) {\nreturn $value[$key];\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Cleanup magic methods for interacting with `{{ field }}`
|
95,144 |
24.01.2020 08:19:31
| -3,600 |
f1332ace280787a7b0565885e1d21abfc629f709
|
Disable Embed behat test
|
[
{
"change_type": "MODIFY",
"old_path": "tests/behat/edit_record_1.feature",
"new_path": "tests/behat/edit_record_1.feature",
"diff": "@@ -42,7 +42,7 @@ Feature: Edit record\nWhen I am on \"/page/1?locale=nl\"\nThen I should see \"Changed title NL\"\n- @javascript\n+ @javascript-disabled\nScenario: As an Admin I want to be able to make use of the embed field\nGiven I am logged in as \"admin\"\nWhen I am on \"/bolt/edit/44\"\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Disable Embed behat test
|
95,144 |
24.01.2020 17:18:37
| -3,600 |
b7dbf1df6bc06ad4d0136b2cdc1932cfa695acea
|
Don't render widgets more than once
|
[
{
"change_type": "MODIFY",
"old_path": "src/Extension/ExtensionRegistry.php",
"new_path": "src/Extension/ExtensionRegistry.php",
"diff": "@@ -60,7 +60,7 @@ class ExtensionRegistry\nprivate function getExtensionClasses(): array\n{\n- return $this->extensionClasses;\n+ return array_unique($this->extensionClasses);\n}\n/** @return ExtensionInterface[] */\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Don't render widgets more than once
|
95,144 |
24.01.2020 17:33:15
| -3,600 |
a73f2b68bf17873e23218c1b7dfb1379a10566bf
|
Rebuild our `services_bolt.yaml` less often (attempt 2)
|
[
{
"change_type": "MODIFY",
"old_path": "src/Extension/ExtensionCompilerPass.php",
"new_path": "src/Extension/ExtensionCompilerPass.php",
"diff": "@@ -16,14 +16,13 @@ class ExtensionCompilerPass implements CompilerPassInterface\n}\n$registry = $container->findDefinition(ExtensionRegistry::class);\n+ $packages = array_keys($container->findTaggedServiceIds(ExtensionInterface::CONTAINER_TAG));\n- // The important bit: grab all classes that were tagged with our specified CONTAINER_TAG, and shove them into our Repository\n- foreach (array_keys($container->findTaggedServiceIds(ExtensionInterface::CONTAINER_TAG)) as $id) {\n/* @see ExtensionRegistry::addCompilerPass() */\n- $registry->addMethodCall('addCompilerPass', [$id]);\n- }\n+ $registry->addMethodCall('addCompilerPass', [$packages]);\n- // Build our own `services_bolt.yml` file\n- $registry->addMethodCall('buildServices');\n+ // Remove our own `services_bolt.yml` file, so that it can be recreated\n+ $projectDir = $container->getParameter('kernel.project_dir');\n+ @unlink($projectDir . '/config/services_bolt.yaml');\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Extension/ExtensionRegistry.php",
"new_path": "src/Extension/ExtensionRegistry.php",
"diff": "@@ -31,9 +31,11 @@ class ExtensionRegistry\n/**\n* @see ExtensionCompilerPass::process()\n*/\n- public function addCompilerPass(string $extensionClass): void\n+ public function addCompilerPass(array $extensionClasses): void\n{\n- $this->extensionClasses[] = $extensionClass;\n+ $this->extensionClasses = array_merge($this->extensionClasses, $extensionClasses);\n+\n+ $this->buildServices();\n}\nprivate function addComposerPackages(): void\n@@ -145,6 +147,12 @@ class ExtensionRegistry\n*/\npublic function buildServices(): void\n{\n+ $filename = $this->projectDir . '/config/services_bolt.yaml';\n+\n+ if (file_exists($filename)) {\n+ return;\n+ }\n+\n$services = [\n'services' => [\n'_defaults' => [\n@@ -164,7 +172,8 @@ class ExtensionRegistry\n$yaml = \"# This file is auto-generated by Bolt. Do not modify.\\n\\n\";\n$yaml .= Yaml::dump($services, 3);\n- file_put_contents($this->projectDir . '/config/services_bolt.yaml', $yaml);\n+\n+ file_put_contents($filename, $yaml);\n}\nprivate function createService(CompletePackage $package): array\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Rebuild our `services_bolt.yaml` less often (attempt 2)
|
95,144 |
25.01.2020 12:03:42
| -3,600 |
c5014b731d0b39bf4d5579607b3817cd23cc7e63
|
Build services in compilerpass
|
[
{
"change_type": "MODIFY",
"old_path": "src/Extension/ExtensionCompilerPass.php",
"new_path": "src/Extension/ExtensionCompilerPass.php",
"diff": "@@ -4,11 +4,17 @@ declare(strict_types=1);\nnamespace Bolt\\Extension;\n+use Bolt\\Common\\Str;\nuse Symfony\\Component\\DependencyInjection\\Compiler\\CompilerPassInterface;\nuse Symfony\\Component\\DependencyInjection\\ContainerBuilder;\n+use Symfony\\Component\\Yaml\\Yaml;\n+use Webmozart\\PathUtil\\Path;\nclass ExtensionCompilerPass implements CompilerPassInterface\n{\n+ /** string */\n+ private $projectDir;\n+\npublic function process(ContainerBuilder $container): void\n{\nif ($container->has(ExtensionRegistry::class) === false) {\n@@ -17,12 +23,50 @@ class ExtensionCompilerPass implements CompilerPassInterface\n$registry = $container->findDefinition(ExtensionRegistry::class);\n$packages = array_keys($container->findTaggedServiceIds(ExtensionInterface::CONTAINER_TAG));\n+ $this->projectDir = $container->getParameter('kernel.project_dir');\n/* @see ExtensionRegistry::addCompilerPass() */\n$registry->addMethodCall('addCompilerPass', [$packages]);\n- // Remove our own `services_bolt.yml` file, so that it can be recreated\n- $projectDir = $container->getParameter('kernel.project_dir');\n- @unlink($projectDir . '/config/services_bolt.yaml');\n+ // Rebuild our own `services_bolt.yml` file.\n+ $this->buildServices($packages);\n+ }\n+\n+ public function buildServices(array $packages): void\n+ {\n+ $services = [\n+ 'services' => [\n+ '_defaults' => [\n+ 'autowire' => true,\n+ 'autoconfigure' => true,\n+ ],\n+ ],\n+ ];\n+\n+ foreach ($packages as $package) {\n+ [$name, $service] = $this->createService($package);\n+ if ($name) {\n+ $services['services'][$name] = $service;\n+ }\n+ }\n+\n+ $yaml = \"# This file is auto-generated by Bolt. Do not modify.\\n\\n\";\n+ $yaml .= Yaml::dump($services, 3);\n+\n+ $filename = $this->projectDir . '/config/services_bolt.yaml';\n+ file_put_contents($filename, $yaml);\n+ }\n+\n+ private function createService(string $package): array\n+ {\n+ $reflection = new \\ReflectionClass($package);\n+\n+ $namespace = Str::removeLast($reflection->getName(), Str::splitLast($reflection->getName(), '\\\\'));\n+ $path = Path::makeRelative(dirname($reflection->getFileName()), $this->projectDir . '/foo');\n+\n+ return [$namespace, [\n+ 'resource' => $path . '/*',\n+ 'exclude' => $path . '/{Entity,Exception}',\n+ ]];\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Extension/ExtensionRegistry.php",
"new_path": "src/Extension/ExtensionRegistry.php",
"diff": "@@ -4,13 +4,9 @@ declare(strict_types=1);\nnamespace Bolt\\Extension;\n-use Bolt\\Common\\Str;\nuse Bolt\\Event\\Subscriber\\ExtensionSubscriber;\n-use Composer\\Package\\CompletePackage;\nuse Composer\\Package\\PackageInterface;\nuse ComposerPackages\\Types;\n-use Symfony\\Component\\Yaml\\Yaml;\n-use Webmozart\\PathUtil\\Path;\nclass ExtensionRegistry\n{\n@@ -20,22 +16,12 @@ class ExtensionRegistry\n/** @var array */\nprotected $extensionClasses = [];\n- /** @var string */\n- private $projectDir;\n-\n- public function __construct(string $projectDir)\n- {\n- $this->projectDir = $projectDir;\n- }\n-\n/**\n* @see ExtensionCompilerPass::process()\n*/\npublic function addCompilerPass(array $extensionClasses): void\n{\n$this->extensionClasses = array_merge($this->extensionClasses, $extensionClasses);\n-\n- $this->buildServices();\n}\nprivate function addComposerPackages(): void\n@@ -136,63 +122,4 @@ class ExtensionRegistry\nreturn $routes;\n}\n-\n- /**\n- * Note: we get the composer packages here, not the ones from the compiler\n- * pass. The latter already get autowired, so we need only the former. We\n- * _do_ do this during the compiler pass though, since that's a good time\n- * to build it.\n- *\n- * @see ExtensionCompilerPass::process()\n- */\n- public function buildServices(): void\n- {\n- $filename = $this->projectDir . '/config/services_bolt.yaml';\n-\n- if (file_exists($filename)) {\n- return;\n- }\n-\n- $services = [\n- 'services' => [\n- '_defaults' => [\n- 'autowire' => true,\n- 'autoconfigure' => true,\n- ],\n- ],\n- ];\n-\n- $packages = Types::get('bolt-extension');\n- foreach ($packages as $package) {\n- [$name, $service] = $this->createService($package);\n- if ($name) {\n- $services['services'][$name] = $service;\n- }\n- }\n-\n- $yaml = \"# This file is auto-generated by Bolt. Do not modify.\\n\\n\";\n- $yaml .= Yaml::dump($services, 3);\n-\n- file_put_contents($filename, $yaml);\n- }\n-\n- private function createService(CompletePackage $package): array\n- {\n- $extra = $package->getExtra();\n-\n- // If it doesn't exist, silently bail. It's handled in addComposerPackages\n- if (! array_key_exists('entrypoint', $extra) || ! class_exists($extra['entrypoint'])) {\n- return [false, false];\n- }\n-\n- $reflection = new \\ReflectionClass($extra['entrypoint']);\n-\n- $namespace = Str::removeLast($reflection->getName(), Str::splitLast($reflection->getName(), '\\\\'));\n- $path = Path::makeRelative(dirname($reflection->getFileName()), $this->projectDir . '/foo');\n-\n- return [$namespace, [\n- 'resource' => $path . '/*',\n- 'exclude' => $path . '/{Entity,Exception}',\n- ]];\n- }\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Build services in compilerpass
|
95,144 |
25.01.2020 13:04:51
| -3,600 |
9b121c2290f140bf644479e74ff59120362184f0
|
Updating some branding things (links to boltcms.io)
|
[
{
"change_type": "MODIFY",
"old_path": "assets/js/app/toolbar/Components/Toolbar.vue",
"new_path": "assets/js/app/toolbar/Components/Toolbar.vue",
"diff": "<div class=\"new-item__dropdown dropdown-menu\">\n<ul class=\"toolbar-menu\">\n<li>\n- <a href=\"https://bolt.cm/\" target=\"_blank\">\n+ <a href=\"https://boltcms.io/\" target=\"_blank\">\n<i class=\"fas fa-globe-americas fa-fw\"></i>\n{{ labels['about.visit_bolt'] }}\n</a>\n"
},
{
"change_type": "MODIFY",
"old_path": "assets/scss/modules/admin/_toolbar.scss",
"new_path": "assets/scss/modules/admin/_toolbar.scss",
"diff": "}\n&__profile {\n- margin-left: auto;\npadding-right: 1rem;\n}\n&__site {\ndisplay: none;\n+ margin-left: auto;\n@include media-breakpoint-up(sm) {\ndisplay: block;\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/pages/about.html.twig",
"new_path": "templates/pages/about.html.twig",
"diff": "</p>\n<p>\n- <a href=\"https://bolt.cm\" class=\"btn btn-primary\" target=\"_blank\">\n+ <a href=\"https://boltcms.io\" class=\"btn btn-primary\" target=\"_blank\">\n<i class=\"fa fa-external-link-square-alt\"></i> {{ 'about.visit_bolt'|trans }}\n</a>\n<a href=\"https://docs.bolt.cm\" class=\"btn btn-secondary\" target=\"_blank\">\n"
},
{
"change_type": "MODIFY",
"old_path": "translations/messages.de.xlf",
"new_path": "translations/messages.de.xlf",
"diff": "<unit id=\"k.JymqB\" name=\"about.visit_bolt\">\n<segment>\n<source>about.visit_bolt</source>\n- <target>Besucht Bolt.cm</target>\n+ <target>Besucht Boltcms.io</target>\n</segment>\n</unit>\n<unit id=\"zOfpTLD\" name=\"action.edit_profile\">\n<unit id=\"psOa_9x\" name=\"general.phrase.built-with-bolt\">\n<segment>\n<source>general.phrase.built-with-bolt</source>\n- <target><![CDATA[Diese Webseite wurde erstellt mit <a href='https://bolt.cm' target='_blank' title='Sophisticated, lightweight & simple CMS'>Bolt</a>. ]]></target>\n+ <target><![CDATA[Diese Webseite wurde erstellt mit <a href='https://boltcms.io' target='_blank' title='Sophisticated, lightweight & simple CMS'>Bolt</a>. ]]></target>\n</segment>\n</unit>\n<unit id=\"AGegYAN\" name=\"contenttypes.generic.recent\">\n"
},
{
"change_type": "MODIFY",
"old_path": "translations/messages.en.xlf",
"new_path": "translations/messages.en.xlf",
"diff": "</notes>\n<segment>\n<source>about.visit_bolt</source>\n- <target>Visit Bolt.cm</target>\n+ <target>Visit Boltcms.io</target>\n</segment>\n</unit>\n<unit id=\"UZFanGF\" name=\"about.bolt_documentation\">\n<unit id=\"psOa_9x\" name=\"general.phrase.built-with-bolt\">\n<segment>\n<source>general.phrase.built-with-bolt</source>\n- <target><![CDATA[This website is <a href='https://bolt.cm' target='_blank' title='Sophisticated, lightweight & simple CMS'>Built with Bolt</a>.]]></target>\n+ <target><![CDATA[This website is <a href='https://boltcms.io' target='_blank' title='Sophisticated, lightweight & simple CMS'>Built with Bolt</a>.]]></target>\n</segment>\n</unit>\n<unit id=\"5IxD63c\" name=\"general.latest_bolt_news\">\n"
},
{
"change_type": "MODIFY",
"old_path": "translations/messages.es.xlf",
"new_path": "translations/messages.es.xlf",
"diff": "</notes>\n<segment>\n<source>about.visit_bolt</source>\n- <target>Visita bolt.cm</target>\n+ <target>Visita Boltcms.io</target>\n</segment>\n</unit>\n<unit id=\"UZFanGF\" name=\"about.bolt_documentation\">\n"
},
{
"change_type": "MODIFY",
"old_path": "translations/messages.it.xlf",
"new_path": "translations/messages.it.xlf",
"diff": "</notes>\n<segment>\n<source>about.visit_bolt</source>\n- <target>Visita Bolt.cm</target>\n+ <target>Visita Boltcms.io</target>\n</segment>\n</unit>\n<unit id=\"UZFanGF\" name=\"about.bolt_documentation\">\n"
},
{
"change_type": "MODIFY",
"old_path": "translations/messages.nl.xlf",
"new_path": "translations/messages.nl.xlf",
"diff": "</notes>\n<segment>\n<source>about.visit_bolt</source>\n- <target>Bezoek Bolt.cm</target>\n+ <target>Bezoek Boltcms.io</target>\n</segment>\n</unit>\n<unit id=\"UZFanGF\" name=\"about.bolt_documentation\">\n<unit id=\"psOa_9x\" name=\"general.phrase.built-with-bolt\">\n<segment>\n<source>general.phrase.built-with-bolt</source>\n- <target><![CDATA[Deze website is <a href='https://bolt.cm' target='_blank' title='Weldoordacht, lichtgewicht en eenvoudig CMS'>Gebouwd met Bolt</a>. ]]></target>\n+ <target><![CDATA[Deze website is <a href='https://boltcms.io' target='_blank' title='Weldoordacht, lichtgewicht en eenvoudig CMS'>gemaakt met Bolt</a>. ]]></target>\n</segment>\n</unit>\n<unit id=\"odDw0du\" name=\"action.search\">\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Updating some branding things (links to boltcms.io)
|
95,144 |
25.01.2020 14:01:04
| -3,600 |
9d5fade58ffca5d80800887a8b5a547f84d08827
|
Don't copy translations with assets
|
[
{
"change_type": "MODIFY",
"old_path": "src/Command/CopyAssetsCommand.php",
"new_path": "src/Command/CopyAssetsCommand.php",
"diff": "@@ -30,7 +30,7 @@ class CopyAssetsCommand extends Command\nprotected function configure(): void\n{\n$this\n- ->setDescription('Copy built assets and translation files into the project root');\n+ ->setDescription('Copy built asset files into the project root');\n}\n/**\n@@ -43,7 +43,7 @@ class CopyAssetsCommand extends Command\n/** @var KernelInterface $kernel */\n$kernel = $app->getKernel();\n- $projectDir = $this->getProjectDirectory($kernel->getContainer());\n+ // $projectDir = $this->getProjectDirectory($kernel->getContainer());\n$publicDir = $this->getPublicDirectory($kernel->getContainer());\n// Determine if we can use ../assets or not.\n@@ -51,13 +51,13 @@ class CopyAssetsCommand extends Command\n$baseDir = dirname(dirname(dirname(__DIR__))) . '/assets';\n$dirs = [\n$baseDir . '/assets' => $publicDir .'/assets/',\n- $baseDir . '/translations' => $projectDir . '/translations/',\n+ // $baseDir . '/translations' => $projectDir . '/translations/',\n];\n} else {\n$baseDir = dirname(dirname(__DIR__));\n$dirs = [\n$baseDir . '/public/assets' => $publicDir .'/assets/',\n- $baseDir . '/translations' => $projectDir . '/translations/',\n+ // $baseDir . '/translations' => $projectDir . '/translations/',\n];\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Don't copy translations with assets
|
95,144 |
28.01.2020 17:28:05
| -3,600 |
bb9e35243690cf1af520778c2faf8e150c77d70e
|
Specify `TemplateselectField` as typehint in `getListTemplates`
|
[
{
"change_type": "MODIFY",
"old_path": "src/Twig/RecordExtension.php",
"new_path": "src/Twig/RecordExtension.php",
"diff": "@@ -8,6 +8,7 @@ use Bolt\\Configuration\\Config;\nuse Bolt\\Configuration\\Content\\ContentType;\nuse Bolt\\Entity\\Content;\nuse Bolt\\Entity\\Field;\n+use Bolt\\Entity\\Field\\TemplateselectField;\nuse Bolt\\Repository\\ContentRepository;\nuse Bolt\\Repository\\TaxonomyRepository;\nuse Bolt\\Utils\\Excerpt;\n@@ -176,7 +177,7 @@ class RecordExtension extends AbstractExtension\nreturn new LaravelCollection($options);\n}\n- public function getListTemplates(Field $field): LaravelCollection\n+ public function getListTemplates(TemplateselectField $field): LaravelCollection\n{\n$definition = $field->getDefinition();\n$current = current($field->getValue());\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Specify `TemplateselectField` as typehint in `getListTemplates`
|
95,144 |
28.01.2020 18:23:04
| -3,600 |
231389d3f9a1e50c9423099f5ecd00943591ff27
|
Implement `{{ dump(backtrace() }}`
|
[
{
"change_type": "ADD",
"old_path": null,
"new_path": "src/Twig/DebugExtension.php",
"diff": "+<?php\n+\n+declare(strict_types=1);\n+\n+namespace Bolt\\Twig;\n+\n+use Twig\\Extension\\AbstractExtension;\n+use Twig\\TwigFunction;\n+\n+class DebugExtension extends AbstractExtension\n+{\n+ public function getFunctions(): array\n+ {\n+ return [\n+ new TwigFunction('backtrace', [$this, 'backtrace']),\n+ ];\n+ }\n+\n+ public function backtrace(int $options = DEBUG_BACKTRACE_IGNORE_ARGS, int $limit = 25): array\n+ {\n+ return debug_backtrace($options, $limit);\n+ }\n+}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Implement `{{ dump(backtrace() }}`
|
95,144 |
28.01.2020 20:35:47
| -3,600 |
549b3ad11a60bd5cf7d38bee9a5c39feea9737d9
|
Rename admin_menu() twig function to admin_menu_array() for consistency
|
[
{
"change_type": "MODIFY",
"old_path": "src/Twig/BackendMenuExtension.php",
"new_path": "src/Twig/BackendMenuExtension.php",
"diff": "@@ -24,11 +24,11 @@ class BackendMenuExtension extends AbstractExtension\npublic function getFunctions(): array\n{\nreturn [\n- new TwigFunction('admin_menu', [$this, 'getAdminMenu']),\n+ new TwigFunction('admin_menu_array', [$this, 'getAdminMenuArray']),\n];\n}\n- public function getAdminMenu(): array\n+ public function getAdminMenuArray(): array\n{\nreturn $this->menuBuilder->buildAdminMenu();\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/_base/layout.html.twig",
"new_path": "templates/_base/layout.html.twig",
"diff": "<body>\n<div class=\"admin\">\n- {% set admin_menu_json = admin_menu()|json_encode %}\n+ {% set admin_menu_json = admin_menu_array()|json_encode %}\n<!-- Admin Toolbar -->\n<nav class=\"admin__toolbar\" id=\"toolbar\">\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/pages/menupage.html.twig",
"new_path": "templates/pages/menupage.html.twig",
"diff": "{% import '@bolt/_macro/_macro.html.twig' as macro %}\n{% set menu = [] %}\n-{% for item in admin_menu() %}\n+{% for item in admin_menu_array() %}\n{% if item.slug == slug %}\n{% set menu = item %}\n{% endif %}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Rename admin_menu() twig function to admin_menu_array() for consistency
|
95,144 |
30.01.2020 17:34:40
| -3,600 |
5b87fda9135cf0cd9cdc542d46065f2a86b11916
|
Export fields as actual (not interpreted) values
|
[
{
"change_type": "MODIFY",
"old_path": "src/Entity/Content.php",
"new_path": "src/Entity/Content.php",
"diff": "@@ -359,7 +359,7 @@ class Content\n{\n$fieldValues = [];\nforeach ($this->getFields() as $field) {\n- $fieldValues[$field->getName()] = $field->getParsedValue();\n+ $fieldValues[$field->getName()] = $field->getValue();\n}\nreturn $fieldValues;\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Export fields as actual (not interpreted) values
|
95,144 |
30.01.2020 21:44:01
| -3,600 |
aa34468223f305421608847efa133617a48af261
|
Get the first imagefield that actually has an image in it
|
[
{
"change_type": "MODIFY",
"old_path": "src/Twig/ContentExtension.php",
"new_path": "src/Twig/ContentExtension.php",
"diff": "@@ -139,7 +139,7 @@ class ContentExtension extends AbstractExtension\n}\nforeach ($content->getFields() as $field) {\n- if ($field instanceof ImageField) {\n+ if ($field instanceof ImageField && $field->get('filename')) {\nreturn $onlyValues ? $field->getValue() : $field;\n}\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Get the first imagefield that actually has an image in it
|
95,144 |
01.02.2020 15:04:01
| -3,600 |
cd308051e73d90ef772d524c03f339392a334d56
|
Fetching linked media for an Image field
|
[
{
"change_type": "MODIFY",
"old_path": "src/Entity/Field/ImageField.php",
"new_path": "src/Entity/Field/ImageField.php",
"diff": "@@ -6,6 +6,7 @@ namespace Bolt\\Entity\\Field;\nuse Bolt\\Entity\\Field;\nuse Bolt\\Entity\\FieldInterface;\n+use Bolt\\Entity\\Media;\nuse Bolt\\Repository\\MediaRepository;\nuse Doctrine\\ORM\\Mapping as ORM;\nuse Symfony\\Component\\Asset\\PathPackage;\n@@ -68,9 +69,17 @@ class ImageField extends Field implements FieldInterface, MediaAware\nreturn $filesPackage->getUrl($this->get('filename'));\n}\n- public function getLinkedMedia(): void\n+ public function getLinkedMedia(MediaRepository $mediaRepository): ?Media\n{\n- // @todo Method getLinkedMedia() needs to be implemented\n+ if ($this->get('media')) {\n+ return $this->mediaRepository->findOneBy(['id' => $this->get('media')]);\n+ }\n+\n+ if ($this->get('filename')) {\n+ return $mediaRepository->findOneByFullFilename($this->get('filename'));\n+ }\n+\n+ return null;\n}\npublic function setLinkedMedia(MediaRepository $mediaRepository): void\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Entity/Field/MediaAware.php",
"new_path": "src/Entity/Field/MediaAware.php",
"diff": "@@ -4,6 +4,7 @@ declare(strict_types=1);\nnamespace Bolt\\Entity\\Field;\n+use Bolt\\Entity\\Media;\nuse Bolt\\Repository\\MediaRepository;\n/**\n@@ -11,7 +12,7 @@ use Bolt\\Repository\\MediaRepository;\n*/\ninterface MediaAware\n{\n- public function getLinkedMedia(): void;\n+ public function getLinkedMedia(MediaRepository $mediaRepository): ?Media;\npublic function setLinkedMedia(MediaRepository $mediaRepository): void;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/ImageExtension.php",
"new_path": "src/Twig/ImageExtension.php",
"diff": "@@ -48,7 +48,7 @@ class ImageExtension extends AbstractExtension\nnew TwigFilter('popup', [$this, 'popup'], $safe),\nnew TwigFilter('showimage', [$this, 'showImage'], $safe),\nnew TwigFilter('thumbnail', [$this, 'thumbnail'], $safe),\n- new TwigFilter('media', [$this, 'media']),\n+ new TwigFilter('media', [$this, 'getMedia']),\n];\n}\n@@ -130,24 +130,24 @@ class ImageExtension extends AbstractExtension\n}\n/**\n- * @param ImageField|array|string $image\n+ * @param ImageField|array $image\n*/\n- public function media($image): ?Media\n+ public function getMedia($image): ?Media\n{\nif (is_array($image) && array_key_exists('media', $image)) {\n- $id = $image['media'];\n- } elseif ($image instanceof ImageField) {\n- $id = $image->get('media');\n- } else {\n+ return $this->mediaRepository->findOneBy(['id' => $image['media']]);\n+ }\n+\n+ if ($image instanceof ImageField) {\n+ return $image->getLinkedMedia($this->mediaRepository);\n+ }\n+\nreturn $this->notifications->warning(\n'Incorrect usage of `media`-filter',\n'The `media`-filter can only be applied to an `ImageField`, or an array that has a key named `media` which holds an id.'\n);\n}\n- return $this->mediaRepository->findOneBy(['id' => $id]);\n- }\n-\n/**\n* @param ImageField|Content|array|string $image\n*/\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Fetching linked media for an Image field
|
95,144 |
01.02.2020 15:36:19
| -3,600 |
8e5081ee082da8e67d0bf13aea0e1e89c2254085
|
Make Canonical more robust
|
[
{
"change_type": "MODIFY",
"old_path": "src/Canonical.php",
"new_path": "src/Canonical.php",
"diff": "@@ -5,8 +5,10 @@ declare(strict_types=1);\nnamespace Bolt;\nuse Bolt\\Configuration\\Config;\n+use Psr\\Log\\LoggerInterface;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\RequestStack;\n+use Symfony\\Component\\Routing\\Exception\\InvalidParameterException;\nuse Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface;\nclass Canonical\n@@ -32,11 +34,15 @@ class Canonical\n/** @var string */\nprivate $path = null;\n- public function __construct(Config $config, UrlGeneratorInterface $urlGenerator, RequestStack $requestStack)\n+ /** @var LoggerInterface */\n+ private $logger;\n+\n+ public function __construct(Config $config, UrlGeneratorInterface $urlGenerator, RequestStack $requestStack, LoggerInterface $dbLogger)\n{\n$this->config = $config;\n$this->urlGenerator = $urlGenerator;\n$this->request = $requestStack->getCurrentRequest();\n+ $this->logger = $dbLogger;\n$this->init();\n}\n@@ -150,9 +156,14 @@ class Canonical\n$route = $this->request->attributes->get('_route');\n}\n+ try {\n$this->path = $this->urlGenerator->generate(\n$route,\n$params\n);\n+ } catch (InvalidParameterException $e) {\n+ $this->logger->error($e->getMessage(), $params);\n+ $this->path = '/';\n+ }\n}\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Make Canonical more robust
|
95,144 |
01.02.2020 15:37:30
| -3,600 |
c0b9d6496e279d0df7db90e745a93609617a728b
|
Get correct record for slug, if slug is not unique between ContentTypes
|
[
{
"change_type": "MODIFY",
"old_path": "src/Controller/Frontend/DetailController.php",
"new_path": "src/Controller/Frontend/DetailController.php",
"diff": "@@ -4,6 +4,8 @@ declare(strict_types=1);\nnamespace Bolt\\Controller\\Frontend;\n+use Bolt\\Configuration\\Config;\n+use Bolt\\Configuration\\Content\\ContentType;\nuse Bolt\\Controller\\TwigAwareController;\nuse Bolt\\Enum\\Statuses;\nuse Bolt\\Repository\\ContentRepository;\n@@ -46,7 +48,8 @@ class DetailController extends TwigAwareController implements FrontendZone\nif (is_numeric($slugOrId)) {\n$record = $this->contentRepository->findOneBy(['id' => (int) $slugOrId]);\n} else {\n- $record = $this->contentRepository->findOneBySlug($slugOrId);\n+ $contentType = ContentType::factory($contentTypeSlug, $this->config->get('contenttypes'));\n+ $record = $this->contentRepository->findOneBySlug($slugOrId, $contentType);\n}\nif (! $record) {\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Repository/ContentRepository.php",
"new_path": "src/Repository/ContentRepository.php",
"diff": "@@ -163,13 +163,13 @@ class ContentRepository extends ServiceEntityRepository\nreturn $this->find($id);\n}\n- public function findOneBySlug(string $slug): ?Content\n+ public function findOneBySlug(string $slug, ?ContentType $contentType = null): ?Content\n{\n$qb = $this->getQueryBuilder();\n[$where, $slug] = JsonHelper::wrapJsonFunction('translations.value', $slug, $qb);\n- return $qb\n+ $query = $qb\n->innerJoin('content.fields', 'field')\n->innerJoin(\n\\Bolt\\Entity\\Field\\SlugField::class,\n@@ -179,8 +179,14 @@ class ContentRepository extends ServiceEntityRepository\n)\n->innerJoin('field.translations', 'translations')\n->andWhere($where . ' = :slug')\n- ->setParameter('slug', $slug)\n- ->setMaxResults(1)\n+ ->setParameter('slug', $slug);\n+\n+ if ($contentType) {\n+ $query->andWhere('content.contentType = :ct')\n+ ->setParameter('ct', $contentType->get('slug'));\n+ }\n+\n+ return $query->setMaxResults(1)\n->getQuery()\n->getOneOrNullResult();\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Get correct record for slug, if slug is not unique between ContentTypes
|
95,144 |
01.02.2020 15:49:12
| -3,600 |
7c8ad9f57feb828d16e58fb882ab82c79c1c8455
|
Add support for `template_directory` in `theme.yaml`
|
[
{
"change_type": "MODIFY",
"old_path": "src/Controller/TwigAwareController.php",
"new_path": "src/Controller/TwigAwareController.php",
"diff": "@@ -91,8 +91,14 @@ class TwigAwareController extends AbstractController\n/** @var NativeFilesystemLoader $twigLoaders */\n$twigLoaders = $this->twig->getLoader();\n+ $path = $this->config->getPath('theme');\n+\n+ if ($this->config->get('theme/template_directory')) {\n+ $path = $path . DIRECTORY_SEPARATOR . $this->config->get('theme/template_directory');\n+ }\n+\nif ($twigLoaders instanceof FilesystemLoader) {\n- $twigLoaders->prependPath($this->config->getPath('theme'), '__main__');\n+ $twigLoaders->prependPath($path, '__main__');\n}\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Add support for `template_directory` in `theme.yaml`
|
95,144 |
01.02.2020 16:16:43
| -3,600 |
5f1d31cc909938e6fd536a2735fb164c49cb9220
|
Add JSON Twig Test
|
[
{
"change_type": "MODIFY",
"old_path": "src/Twig/JsonExtension.php",
"new_path": "src/Twig/JsonExtension.php",
"diff": "@@ -9,6 +9,7 @@ use Bolt\\Entity\\Content;\nuse Symfony\\Component\\Serializer\\Normalizer\\NormalizerInterface;\nuse Twig\\Extension\\AbstractExtension;\nuse Twig\\TwigFilter;\n+use Twig\\TwigTest;\nclass JsonExtension extends AbstractExtension\n{\n@@ -33,6 +34,16 @@ class JsonExtension extends AbstractExtension\n];\n}\n+ /**\n+ * {@inheritdoc}\n+ */\n+ public function getTests()\n+ {\n+ return [\n+ new TwigTest('json', [$this, 'testJson']),\n+ ];\n+ }\n+\npublic function jsonRecords($records): string\n{\nreturn Json::json_encode($this->normalizeRecords($records));\n@@ -64,4 +75,12 @@ class JsonExtension extends AbstractExtension\n'group' => [self::SERIALIZE_GROUP],\n]);\n}\n+\n+ /**\n+ * Test whether a passed string contains valid JSON.\n+ */\n+ public function testJson(string $string): bool\n+ {\n+ return Json::test($string);\n+ }\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Add JSON Twig Test
|
95,144 |
01.02.2020 16:26:42
| -3,600 |
6fb2f52b4fdcf04080222fe2df442dc4ebaa822e
|
Add `preg_replace` twig filter
|
[
{
"change_type": "MODIFY",
"old_path": "src/Twig/TextExtension.php",
"new_path": "src/Twig/TextExtension.php",
"diff": "@@ -22,6 +22,7 @@ class TextExtension extends AbstractExtension\nnew TwigFilter('safestring', [$this, 'safeString']),\nnew TwigFilter('slug', [$this, 'slug']),\nnew TwigFilter('ucwords', [$this, 'ucwords']),\n+ new TwigFilter('preg_replace', [$this, 'pregReplace']),\n];\n}\n@@ -43,4 +44,12 @@ class TextExtension extends AbstractExtension\nreturn ucwords($string, $delimiters);\n}\n+\n+ /**\n+ * Perform a regular expression search and replace on the given string.\n+ */\n+ public function pregReplace(string $str, string $pattern, string $replacement = '', int $limit = -1): string\n+ {\n+ return preg_replace($pattern, $replacement, $str, $limit);\n+ }\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Add `preg_replace` twig filter
|
95,144 |
01.02.2020 16:33:32
| -3,600 |
3cb2c89e1ecbb036580e258e837778ce96eec86c
|
Add Shy twig filter
|
[
{
"change_type": "MODIFY",
"old_path": "src/Twig/HtmlExtension.php",
"new_path": "src/Twig/HtmlExtension.php",
"diff": "@@ -5,6 +5,7 @@ declare(strict_types=1);\nnamespace Bolt\\Twig;\nuse Bolt\\Canonical;\n+use Bolt\\Common\\Str;\nuse Bolt\\Utils\\Markdown;\nuse Twig\\Extension\\AbstractExtension;\nuse Twig\\TwigFilter;\n@@ -53,6 +54,7 @@ class HtmlExtension extends AbstractExtension\nreturn [\nnew TwigFilter('markdown', [$this, 'markdown'], $safe),\n+ new TwigFilter('shy', [$this, 'shy'], $safe),\n];\n}\n@@ -68,4 +70,13 @@ class HtmlExtension extends AbstractExtension\n{\nreturn $this->markdown->parse($content);\n}\n+\n+ /**\n+ * Add 'soft hyphens' ­ to a string, so that it won't break layout in HTML when\n+ * using strings without spaces or dashes.\n+ */\n+ public function shy(string $str): string\n+ {\n+ return Str::shyphenate($str);\n+ }\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Add Shy twig filter
|
95,144 |
28.01.2020 19:54:10
| -3,600 |
41370a3616f2724d9b99bc2b3576b7108ce81f5b
|
Implement `{{ record|current }}` Twig filter
|
[
{
"change_type": "MODIFY",
"old_path": "src/Twig/ContentExtension.php",
"new_path": "src/Twig/ContentExtension.php",
"diff": "@@ -10,6 +10,8 @@ use Bolt\\Entity\\Field\\ImageField;\nuse Bolt\\Repository\\ContentRepository;\nuse Bolt\\Utils\\Excerpt;\nuse Bolt\\Utils\\Html;\n+use Symfony\\Component\\HttpFoundation\\Request;\n+use Symfony\\Component\\HttpFoundation\\RequestStack;\nuse Symfony\\Component\\Routing\\Exception\\InvalidParameterException;\nuse Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface;\nuse Symfony\\Component\\Security\\Core\\Security;\n@@ -34,12 +36,21 @@ class ContentExtension extends AbstractExtension\n/** @var Security */\nprivate $security;\n- public function __construct(UrlGeneratorInterface $urlGenerator, ContentRepository $contentRepository, CsrfTokenManagerInterface $csrfTokenManager, Security $security)\n- {\n+ /** @var Request */\n+ private $request;\n+\n+ public function __construct(\n+ UrlGeneratorInterface $urlGenerator,\n+ ContentRepository $contentRepository,\n+ CsrfTokenManagerInterface $csrfTokenManager,\n+ Security $security,\n+ RequestStack $requestStack\n+ ) {\n$this->urlGenerator = $urlGenerator;\n$this->contentRepository = $contentRepository;\n$this->csrfTokenManager = $csrfTokenManager;\n$this->security = $security;\n+ $this->request = $requestStack->getCurrentRequest();\n}\n/**\n@@ -57,6 +68,7 @@ class ContentExtension extends AbstractExtension\nnew TwigFilter('excerpt', [$this, 'getExcerpt'], $safe),\nnew TwigFilter('previous', [$this, 'getPreviousContent']),\nnew TwigFilter('next', [$this, 'getNextContent']),\n+ new TwigFilter('current', [$this, 'isCurrent']),\nnew TwigFilter('link', [$this, 'getLink']),\nnew TwigFilter('edit_link', [$this, 'getEditLink']),\nnew TwigFilter('taxonomies', [$this, 'getTaxonomies']),\n@@ -214,6 +226,18 @@ class ContentExtension extends AbstractExtension\nreturn $this->contentRepository->findAdjacentBy($byColumn, $direction, $content->getId(), $contentType);\n}\n+ public function isCurrent(Content $content): bool\n+ {\n+ $recordParams = [\n+ 'slugOrId' => $content->getSlug() ?: $content->getId(),\n+ 'contentTypeSlug' => $content->getContentTypeSingularSlug(),\n+ ];\n+\n+ $routeParams = $this->request->get('_route_params');\n+\n+ return $recordParams === $routeParams;\n+ }\n+\npublic function getLink(Content $content, bool $canonical = false): ?string\n{\nif ($content->getId() === null) {\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Implement `{{ record|current }}` Twig filter
|
95,144 |
01.02.2020 20:43:36
| -3,600 |
117fe068b13feb387662fd9f0b443b4162c1cd52
|
Improve |current
|
[
{
"change_type": "MODIFY",
"old_path": "src/Controller/Frontend/DetailController.php",
"new_path": "src/Controller/Frontend/DetailController.php",
"diff": "@@ -73,6 +73,10 @@ class DetailController extends TwigAwareController implements FrontendZone\n$singularSlug => $record,\n];\n+ // We add the record as a _global_ variable. This way we can use that\n+ // later on, if we need to get the root record of a page.\n+ $this->twig->addGlobal('record', $record);\n+\n$templates = $this->templateChooser->forRecord($record);\nreturn $this->renderTemplate($templates, $context);\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/ContentExtension.php",
"new_path": "src/Twig/ContentExtension.php",
"diff": "@@ -17,6 +17,7 @@ use Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface;\nuse Symfony\\Component\\Security\\Core\\Security;\nuse Symfony\\Component\\Security\\Csrf\\CsrfTokenManagerInterface;\nuse Tightenco\\Collect\\Support\\Collection;\n+use Twig\\Environment;\nuse Twig\\Extension\\AbstractExtension;\nuse Twig\\Markup;\nuse Twig\\TwigFilter;\n@@ -61,6 +62,7 @@ class ContentExtension extends AbstractExtension\n$safe = [\n'is_safe' => ['html'],\n];\n+ $env = ['needs_environment' => true];\nreturn [\nnew TwigFilter('title', [$this, 'getTitle'], $safe),\n@@ -68,7 +70,7 @@ class ContentExtension extends AbstractExtension\nnew TwigFilter('excerpt', [$this, 'getExcerpt'], $safe),\nnew TwigFilter('previous', [$this, 'getPreviousContent']),\nnew TwigFilter('next', [$this, 'getNextContent']),\n- new TwigFilter('current', [$this, 'isCurrent']),\n+ new TwigFilter('current', [$this, 'isCurrent'], $env),\nnew TwigFilter('link', [$this, 'getLink']),\nnew TwigFilter('edit_link', [$this, 'getEditLink']),\nnew TwigFilter('taxonomies', [$this, 'getTaxonomies']),\n@@ -226,8 +228,16 @@ class ContentExtension extends AbstractExtension\nreturn $this->contentRepository->findAdjacentBy($byColumn, $direction, $content->getId(), $contentType);\n}\n- public function isCurrent(Content $content): bool\n+ public function isCurrent(Environment $env, Content $content): bool\n{\n+ // If we have a $record set in the Global Twig env, we can simply\n+ // compare that to what's passed in.\n+ if (array_key_exists('record', $env->getGlobals())) {\n+ return $env->getGlobals()['record'] === $content;\n+ }\n+\n+ // Otherwise, we'll have to compare 'slugOrId' and 'contentTypeSlug' as\n+ // grabbed from the Request\n$recordParams = [\n'slugOrId' => $content->getSlug() ?: $content->getId(),\n'contentTypeSlug' => $content->getContentTypeSingularSlug(),\n@@ -235,7 +245,10 @@ class ContentExtension extends AbstractExtension\n$routeParams = $this->request->get('_route_params');\n- return $recordParams === $routeParams;\n+ return isset($routeParams['slugOrId']) &&\n+ isset($routeParams['contentTypeSlug']) &&\n+ $recordParams['slugOrId'] === $routeParams['slugOrId'] &&\n+ $recordParams['contentTypeSlug'] === $routeParams['contentTypeSlug'];\n}\npublic function getLink(Content $content, bool $canonical = false): ?string\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Improve |current
|
95,144 |
02.02.2020 08:53:16
| -3,600 |
26dbd7a73ccbf7147c007a08310f17826a94ff77
|
Clarify database section in .env.dist a little
|
[
{
"change_type": "MODIFY",
"old_path": ".env.dist",
"new_path": ".env.dist",
"diff": "###> symfony/framework-bundle ###\nAPP_ENV=dev\nAPP_DEBUG=1\n-APP_SECRET=67d829bf61dc5f87a73fd814e2c9f629\n+APP_SECRET=73fd814e2c9fbf61dc5f87a62967d829\n#TRUSTED_PROXIES=127.0.0.1,127.0.0.2\n#TRUSTED_HOSTS='^localhost|example\\.com$'\n###< symfony/framework-bundle ###\n###> doctrine/doctrine-bundle ###\n+\n+# uncomment the appropiate line(s) below to set the database using a DSN (data source name)\n+# Replace `db_user`, `db_password` and `db_name` where needed. Depending on your server settings,\n+# you might also need to configure the host (\"localhost\" / \"127.0.0.1\") or the port number (\"3306\")\n# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url\n-# For an SQLite database, use: \"sqlite:///%kernel.project_dir%/var/data.db\"\n-# For a PostgreSQL database, use: \"postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=11\"\n-# Set \"serverVersion\" to your server version to avoid edge-case exceptions and extra database calls\n-# SQLite\n+# SQLite (note: _three_ slashes)\nDATABASE_URL=sqlite:///%kernel.project_dir%/var/data/bolt.sqlite\n-# MySQL (with docker)\n-DATABASE_HOST=hostname\n-DATABASE_USER=bolt_db_user\n-DATABASE_PASSWORD=bolt_db_password\n-DATABASE_PORT=3306\n-DATABASE_NAME=bolt\n-#DATABASE_URL=mysql://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_NAME}\n+# MYSQL / MariaDB\n+#DATABASE_URL=mysql://db_user:\"db_password\"@localhost:3306/db_name\n+\n+# Postgres\n+#DATABASE_URL=postgresql://db_user:\"db_password\"@localhost:5432/db_name?serverVersion=11\"\n+\n+# MYSQL / MariaDB (additional settings, needed for Docker)\n+#DATABASE_USER=db_user\n+#DATABASE_PASSWORD=db_password\n+#DATABASE_NAME=db_name\n###< doctrine/doctrine-bundle ###\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Clarify database section in .env.dist a little
|
95,144 |
02.02.2020 12:57:42
| -3,600 |
08c754c71bf248253b5a3912e9a383d9e527bccc
|
Add `--fixtures` option to SetupCommand
|
[
{
"change_type": "MODIFY",
"old_path": "src/Command/SetupCommand.php",
"new_path": "src/Command/SetupCommand.php",
"diff": "@@ -19,7 +19,8 @@ class SetupCommand extends Command\n{\n$this\n->setDescription('Run Bolt setup / installation commands')\n- ->addOption('no-fixtures', 'nf', InputOption::VALUE_NONE, 'If set, no data fixtures will be created. An empty database wil be initialised.');\n+ ->addOption('no-fixtures', 'nf', InputOption::VALUE_NONE, 'If set, no data fixtures will be created and the user will not be prompted for it. An empty database wil be initialised.')\n+ ->addOption('fixtures', 'f', InputOption::VALUE_NONE, 'If set, data fixtures will be created, without prompting the user for it.');\n}\nprotected function execute(InputInterface $input, OutputInterface $output): int\n@@ -39,12 +40,14 @@ class SetupCommand extends Command\n$commandInput = new ArrayInput(['--admin' => true]);\n$exitCode += $command->run($commandInput, $output);\n- $noFixtures = $input->getOption('no-fixtures');\n- if (! $noFixtures) {\n+ // Unless either `--no-fixtures` or `--fixtures` was set, we prompt the user for it.\n+ if (! $input->getOption('no-fixtures')) {\n+ if ($input->getOption('fixtures') || $io->confirm('Add fixtures (dummy content) to the Database?', true)) {\n$command = $this->getApplication()->find('doctrine:fixtures:load');\n$commandInput = new ArrayInput(['--append' => true]);\n$exitCode += $command->run($commandInput, $output);\n}\n+ }\n$io->newLine();\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Add `--fixtures` option to SetupCommand
|
95,144 |
02.02.2020 14:01:49
| -3,600 |
5e2e483df536743faed823601833e557b8ed9452
|
Updating NPM deps, fixing height of checkbox
|
[
{
"change_type": "MODIFY",
"old_path": "assets/scss/modules/listing/row/_checkbox.scss",
"new_path": "assets/scss/modules/listing/row/_checkbox.scss",
"diff": ".listing--checkbox {\nwidth: $checkbox-row-width;\nuser-select: none;\n- margin-bottom: $spacer*0.8;\n+ margin-bottom: 2px;\n.custom-control {\nposition: relative;\n"
},
{
"change_type": "MODIFY",
"old_path": "package-lock.json",
"new_path": "package-lock.json",
"diff": "}\n},\n\"@babel/compat-data\": {\n- \"version\": \"7.8.1\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.8.1.tgz\",\n- \"integrity\": \"sha512-Z+6ZOXvyOWYxJ50BwxzdhRnRsGST8Y3jaZgxYig575lTjVSs3KtJnmESwZegg6e2Dn0td1eDhoWlp1wI4BTCPw==\",\n+ \"version\": \"7.8.5\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.8.5.tgz\",\n+ \"integrity\": \"sha512-jWYUqQX/ObOhG1UiEkbH5SANsE/8oKXiQWjj7p7xgj9Zmnt//aUvyz4dBkK0HNsS8/cbyC5NmmH87VekW+mXFg==\",\n\"dev\": true,\n\"requires\": {\n- \"browserslist\": \"^4.8.2\",\n+ \"browserslist\": \"^4.8.5\",\n\"invariant\": \"^2.2.4\",\n\"semver\": \"^5.5.0\"\n},\n\"dependencies\": {\n+ \"browserslist\": {\n+ \"version\": \"4.8.6\",\n+ \"resolved\": \"https://registry.npmjs.org/browserslist/-/browserslist-4.8.6.tgz\",\n+ \"integrity\": \"sha512-ZHao85gf0eZ0ESxLfCp73GG9O/VTytYDIkIiZDlURppLTI9wErSM/5yAKEq6rcUdxBLjMELmrYUJGg5sxGKMHg==\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"caniuse-lite\": \"^1.0.30001023\",\n+ \"electron-to-chromium\": \"^1.3.341\",\n+ \"node-releases\": \"^1.1.47\"\n+ }\n+ },\n+ \"caniuse-lite\": {\n+ \"version\": \"1.0.30001023\",\n+ \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001023.tgz\",\n+ \"integrity\": \"sha512-C5TDMiYG11EOhVOA62W1p3UsJ2z4DsHtMBQtjzp3ZsUglcQn62WOUgW0y795c7A5uZ+GCEIvzkMatLIlAsbNTA==\",\n+ \"dev\": true\n+ },\n+ \"electron-to-chromium\": {\n+ \"version\": \"1.3.344\",\n+ \"resolved\": \"https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.344.tgz\",\n+ \"integrity\": \"sha512-tvbx2Wl8WBR+ym3u492D0L6/jH+8NoQXqe46+QhbWH3voVPauGuZYeb1QAXYoOAWuiP2dbSvlBx0kQ1F3hu/Mw==\",\n+ \"dev\": true\n+ },\n+ \"node-releases\": {\n+ \"version\": \"1.1.47\",\n+ \"resolved\": \"https://registry.npmjs.org/node-releases/-/node-releases-1.1.47.tgz\",\n+ \"integrity\": \"sha512-k4xjVPx5FpwBUj0Gw7uvFOTF4Ep8Hok1I6qjwL3pLfwe7Y0REQSAqOwwv9TWBCUtMHxcXfY4PgRLRozcChvTcA==\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"semver\": \"^6.3.0\"\n+ },\n+ \"dependencies\": {\n+ \"semver\": {\n+ \"version\": \"6.3.0\",\n+ \"resolved\": \"https://registry.npmjs.org/semver/-/semver-6.3.0.tgz\",\n+ \"integrity\": \"sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==\",\n+ \"dev\": true\n+ }\n+ }\n+ },\n\"semver\": {\n\"version\": \"5.7.1\",\n\"resolved\": \"https://registry.npmjs.org/semver/-/semver-5.7.1.tgz\",\n}\n},\n\"@babel/core\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/core/-/core-7.8.3.tgz\",\n- \"integrity\": \"sha512-4XFkf8AwyrEG7Ziu3L2L0Cv+WyY47Tcsp70JFmpftbAA1K7YL/sgE9jh9HyNj08Y/U50ItUchpN0w6HxAoX1rA==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/core/-/core-7.8.4.tgz\",\n+ \"integrity\": \"sha512-0LiLrB2PwrVI+a2/IEskBopDYSd8BCb3rOvH7D5tzoWd696TBEduBvuLVm4Nx6rltrLZqvI3MCalB2K2aVzQjA==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/code-frame\": \"^7.8.3\",\n- \"@babel/generator\": \"^7.8.3\",\n- \"@babel/helpers\": \"^7.8.3\",\n- \"@babel/parser\": \"^7.8.3\",\n+ \"@babel/generator\": \"^7.8.4\",\n+ \"@babel/helpers\": \"^7.8.4\",\n+ \"@babel/parser\": \"^7.8.4\",\n\"@babel/template\": \"^7.8.3\",\n- \"@babel/traverse\": \"^7.8.3\",\n+ \"@babel/traverse\": \"^7.8.4\",\n\"@babel/types\": \"^7.8.3\",\n\"convert-source-map\": \"^1.7.0\",\n\"debug\": \"^4.1.0\",\n}\n},\n\"@babel/generator\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.8.3.tgz\",\n- \"integrity\": \"sha512-WjoPk8hRpDRqqzRpvaR8/gDUPkrnOOeuT2m8cNICJtZH6mwaCo3v0OKMI7Y6SM1pBtyijnLtAL0HDi41pf41ug==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.8.4.tgz\",\n+ \"integrity\": \"sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/types\": \"^7.8.3\",\n}\n},\n\"@babel/parser\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.8.3.tgz\",\n- \"integrity\": \"sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz\",\n+ \"integrity\": \"sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==\",\n\"dev\": true\n},\n\"@babel/template\": {\n}\n},\n\"@babel/traverse\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.3.tgz\",\n- \"integrity\": \"sha512-we+a2lti+eEImHmEXp7bM9cTxGzxPmBiVJlLVD+FuuQMeeO7RaDbutbgeheDkw+Xe3mCfJHnGOWLswT74m2IPg==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.4.tgz\",\n+ \"integrity\": \"sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/code-frame\": \"^7.8.3\",\n- \"@babel/generator\": \"^7.8.3\",\n+ \"@babel/generator\": \"^7.8.4\",\n\"@babel/helper-function-name\": \"^7.8.3\",\n\"@babel/helper-split-export-declaration\": \"^7.8.3\",\n- \"@babel/parser\": \"^7.8.3\",\n+ \"@babel/parser\": \"^7.8.4\",\n\"@babel/types\": \"^7.8.3\",\n\"debug\": \"^4.1.0\",\n\"globals\": \"^11.1.0\",\n}\n},\n\"@babel/generator\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.8.3.tgz\",\n- \"integrity\": \"sha512-WjoPk8hRpDRqqzRpvaR8/gDUPkrnOOeuT2m8cNICJtZH6mwaCo3v0OKMI7Y6SM1pBtyijnLtAL0HDi41pf41ug==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.8.4.tgz\",\n+ \"integrity\": \"sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/types\": \"^7.8.3\",\n}\n},\n\"@babel/parser\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.8.3.tgz\",\n- \"integrity\": \"sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz\",\n+ \"integrity\": \"sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==\",\n\"dev\": true\n},\n\"@babel/template\": {\n}\n},\n\"@babel/traverse\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.3.tgz\",\n- \"integrity\": \"sha512-we+a2lti+eEImHmEXp7bM9cTxGzxPmBiVJlLVD+FuuQMeeO7RaDbutbgeheDkw+Xe3mCfJHnGOWLswT74m2IPg==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.4.tgz\",\n+ \"integrity\": \"sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/code-frame\": \"^7.8.3\",\n- \"@babel/generator\": \"^7.8.3\",\n+ \"@babel/generator\": \"^7.8.4\",\n\"@babel/helper-function-name\": \"^7.8.3\",\n\"@babel/helper-split-export-declaration\": \"^7.8.3\",\n- \"@babel/parser\": \"^7.8.3\",\n+ \"@babel/parser\": \"^7.8.4\",\n\"@babel/types\": \"^7.8.3\",\n\"debug\": \"^4.1.0\",\n\"globals\": \"^11.1.0\",\n}\n},\n\"@babel/helper-compilation-targets\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.3.tgz\",\n- \"integrity\": \"sha512-JLylPCsFjhLN+6uBSSh3iYdxKdeO9MNmoY96PE/99d8kyBFaXLORtAVhqN6iHa+wtPeqxKLghDOZry0+Aiw9Tw==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.4.tgz\",\n+ \"integrity\": \"sha512-3k3BsKMvPp5bjxgMdrFyq0UaEO48HciVrOVF0+lon8pp95cyJ2ujAh0TrBHNMnJGT2rr0iKOJPFFbSqjDyf/Pg==\",\n\"dev\": true,\n\"requires\": {\n- \"@babel/compat-data\": \"^7.8.1\",\n- \"browserslist\": \"^4.8.2\",\n+ \"@babel/compat-data\": \"^7.8.4\",\n+ \"browserslist\": \"^4.8.5\",\n\"invariant\": \"^2.2.4\",\n- \"levenary\": \"^1.1.0\",\n+ \"levenary\": \"^1.1.1\",\n\"semver\": \"^5.5.0\"\n},\n+ \"dependencies\": {\n+ \"browserslist\": {\n+ \"version\": \"4.8.6\",\n+ \"resolved\": \"https://registry.npmjs.org/browserslist/-/browserslist-4.8.6.tgz\",\n+ \"integrity\": \"sha512-ZHao85gf0eZ0ESxLfCp73GG9O/VTytYDIkIiZDlURppLTI9wErSM/5yAKEq6rcUdxBLjMELmrYUJGg5sxGKMHg==\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"caniuse-lite\": \"^1.0.30001023\",\n+ \"electron-to-chromium\": \"^1.3.341\",\n+ \"node-releases\": \"^1.1.47\"\n+ }\n+ },\n+ \"caniuse-lite\": {\n+ \"version\": \"1.0.30001023\",\n+ \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001023.tgz\",\n+ \"integrity\": \"sha512-C5TDMiYG11EOhVOA62W1p3UsJ2z4DsHtMBQtjzp3ZsUglcQn62WOUgW0y795c7A5uZ+GCEIvzkMatLIlAsbNTA==\",\n+ \"dev\": true\n+ },\n+ \"electron-to-chromium\": {\n+ \"version\": \"1.3.344\",\n+ \"resolved\": \"https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.344.tgz\",\n+ \"integrity\": \"sha512-tvbx2Wl8WBR+ym3u492D0L6/jH+8NoQXqe46+QhbWH3voVPauGuZYeb1QAXYoOAWuiP2dbSvlBx0kQ1F3hu/Mw==\",\n+ \"dev\": true\n+ },\n+ \"node-releases\": {\n+ \"version\": \"1.1.47\",\n+ \"resolved\": \"https://registry.npmjs.org/node-releases/-/node-releases-1.1.47.tgz\",\n+ \"integrity\": \"sha512-k4xjVPx5FpwBUj0Gw7uvFOTF4Ep8Hok1I6qjwL3pLfwe7Y0REQSAqOwwv9TWBCUtMHxcXfY4PgRLRozcChvTcA==\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"semver\": \"^6.3.0\"\n+ },\n\"dependencies\": {\n+ \"semver\": {\n+ \"version\": \"6.3.0\",\n+ \"resolved\": \"https://registry.npmjs.org/semver/-/semver-6.3.0.tgz\",\n+ \"integrity\": \"sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==\",\n+ \"dev\": true\n+ }\n+ }\n+ },\n\"semver\": {\n\"version\": \"5.7.1\",\n\"resolved\": \"https://registry.npmjs.org/semver/-/semver-5.7.1.tgz\",\n}\n},\n\"@babel/parser\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.8.3.tgz\",\n- \"integrity\": \"sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz\",\n+ \"integrity\": \"sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==\",\n\"dev\": true\n},\n\"@babel/template\": {\n}\n},\n\"@babel/generator\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.8.3.tgz\",\n- \"integrity\": \"sha512-WjoPk8hRpDRqqzRpvaR8/gDUPkrnOOeuT2m8cNICJtZH6mwaCo3v0OKMI7Y6SM1pBtyijnLtAL0HDi41pf41ug==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.8.4.tgz\",\n+ \"integrity\": \"sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/types\": \"^7.8.3\",\n}\n},\n\"@babel/parser\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.8.3.tgz\",\n- \"integrity\": \"sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz\",\n+ \"integrity\": \"sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==\",\n\"dev\": true\n},\n\"@babel/template\": {\n}\n},\n\"@babel/traverse\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.3.tgz\",\n- \"integrity\": \"sha512-we+a2lti+eEImHmEXp7bM9cTxGzxPmBiVJlLVD+FuuQMeeO7RaDbutbgeheDkw+Xe3mCfJHnGOWLswT74m2IPg==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.4.tgz\",\n+ \"integrity\": \"sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/code-frame\": \"^7.8.3\",\n- \"@babel/generator\": \"^7.8.3\",\n+ \"@babel/generator\": \"^7.8.4\",\n\"@babel/helper-function-name\": \"^7.8.3\",\n\"@babel/helper-split-export-declaration\": \"^7.8.3\",\n- \"@babel/parser\": \"^7.8.3\",\n+ \"@babel/parser\": \"^7.8.4\",\n\"@babel/types\": \"^7.8.3\",\n\"debug\": \"^4.1.0\",\n\"globals\": \"^11.1.0\",\n}\n},\n\"@babel/parser\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.8.3.tgz\",\n- \"integrity\": \"sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz\",\n+ \"integrity\": \"sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==\",\n\"dev\": true\n},\n\"@babel/template\": {\n}\n},\n\"@babel/generator\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.8.3.tgz\",\n- \"integrity\": \"sha512-WjoPk8hRpDRqqzRpvaR8/gDUPkrnOOeuT2m8cNICJtZH6mwaCo3v0OKMI7Y6SM1pBtyijnLtAL0HDi41pf41ug==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.8.4.tgz\",\n+ \"integrity\": \"sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/types\": \"^7.8.3\",\n}\n},\n\"@babel/parser\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.8.3.tgz\",\n- \"integrity\": \"sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz\",\n+ \"integrity\": \"sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==\",\n\"dev\": true\n},\n\"@babel/template\": {\n}\n},\n\"@babel/traverse\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.3.tgz\",\n- \"integrity\": \"sha512-we+a2lti+eEImHmEXp7bM9cTxGzxPmBiVJlLVD+FuuQMeeO7RaDbutbgeheDkw+Xe3mCfJHnGOWLswT74m2IPg==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.4.tgz\",\n+ \"integrity\": \"sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/code-frame\": \"^7.8.3\",\n- \"@babel/generator\": \"^7.8.3\",\n+ \"@babel/generator\": \"^7.8.4\",\n\"@babel/helper-function-name\": \"^7.8.3\",\n\"@babel/helper-split-export-declaration\": \"^7.8.3\",\n- \"@babel/parser\": \"^7.8.3\",\n+ \"@babel/parser\": \"^7.8.4\",\n\"@babel/types\": \"^7.8.3\",\n\"debug\": \"^4.1.0\",\n\"globals\": \"^11.1.0\",\n}\n},\n\"@babel/generator\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.8.3.tgz\",\n- \"integrity\": \"sha512-WjoPk8hRpDRqqzRpvaR8/gDUPkrnOOeuT2m8cNICJtZH6mwaCo3v0OKMI7Y6SM1pBtyijnLtAL0HDi41pf41ug==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.8.4.tgz\",\n+ \"integrity\": \"sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/types\": \"^7.8.3\",\n}\n},\n\"@babel/parser\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.8.3.tgz\",\n- \"integrity\": \"sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz\",\n+ \"integrity\": \"sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==\",\n\"dev\": true\n},\n\"@babel/template\": {\n}\n},\n\"@babel/traverse\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.3.tgz\",\n- \"integrity\": \"sha512-we+a2lti+eEImHmEXp7bM9cTxGzxPmBiVJlLVD+FuuQMeeO7RaDbutbgeheDkw+Xe3mCfJHnGOWLswT74m2IPg==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.4.tgz\",\n+ \"integrity\": \"sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/code-frame\": \"^7.8.3\",\n- \"@babel/generator\": \"^7.8.3\",\n+ \"@babel/generator\": \"^7.8.4\",\n\"@babel/helper-function-name\": \"^7.8.3\",\n\"@babel/helper-split-export-declaration\": \"^7.8.3\",\n- \"@babel/parser\": \"^7.8.3\",\n+ \"@babel/parser\": \"^7.8.4\",\n\"@babel/types\": \"^7.8.3\",\n\"debug\": \"^4.1.0\",\n\"globals\": \"^11.1.0\",\n}\n},\n\"@babel/parser\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.8.3.tgz\",\n- \"integrity\": \"sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz\",\n+ \"integrity\": \"sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==\",\n\"dev\": true\n},\n\"@babel/template\": {\n}\n},\n\"@babel/generator\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.8.3.tgz\",\n- \"integrity\": \"sha512-WjoPk8hRpDRqqzRpvaR8/gDUPkrnOOeuT2m8cNICJtZH6mwaCo3v0OKMI7Y6SM1pBtyijnLtAL0HDi41pf41ug==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.8.4.tgz\",\n+ \"integrity\": \"sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/types\": \"^7.8.3\",\n}\n},\n\"@babel/parser\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.8.3.tgz\",\n- \"integrity\": \"sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz\",\n+ \"integrity\": \"sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==\",\n\"dev\": true\n},\n\"@babel/template\": {\n}\n},\n\"@babel/traverse\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.3.tgz\",\n- \"integrity\": \"sha512-we+a2lti+eEImHmEXp7bM9cTxGzxPmBiVJlLVD+FuuQMeeO7RaDbutbgeheDkw+Xe3mCfJHnGOWLswT74m2IPg==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.4.tgz\",\n+ \"integrity\": \"sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/code-frame\": \"^7.8.3\",\n- \"@babel/generator\": \"^7.8.3\",\n+ \"@babel/generator\": \"^7.8.4\",\n\"@babel/helper-function-name\": \"^7.8.3\",\n\"@babel/helper-split-export-declaration\": \"^7.8.3\",\n- \"@babel/parser\": \"^7.8.3\",\n+ \"@babel/parser\": \"^7.8.4\",\n\"@babel/types\": \"^7.8.3\",\n\"debug\": \"^4.1.0\",\n\"globals\": \"^11.1.0\",\n}\n},\n\"@babel/helpers\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/helpers/-/helpers-7.8.3.tgz\",\n- \"integrity\": \"sha512-LmU3q9Pah/XyZU89QvBgGt+BCsTPoQa+73RxAQh8fb8qkDyIfeQnmgs+hvzhTCKTzqOyk7JTkS3MS1S8Mq5yrQ==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/helpers/-/helpers-7.8.4.tgz\",\n+ \"integrity\": \"sha512-VPbe7wcQ4chu4TDQjimHv/5tj73qz88o12EPkO2ValS2QiQS/1F2SsjyIGNnAD0vF/nZS6Cf9i+vW6HIlnaR8w==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/template\": \"^7.8.3\",\n- \"@babel/traverse\": \"^7.8.3\",\n+ \"@babel/traverse\": \"^7.8.4\",\n\"@babel/types\": \"^7.8.3\"\n},\n\"dependencies\": {\n}\n},\n\"@babel/generator\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.8.3.tgz\",\n- \"integrity\": \"sha512-WjoPk8hRpDRqqzRpvaR8/gDUPkrnOOeuT2m8cNICJtZH6mwaCo3v0OKMI7Y6SM1pBtyijnLtAL0HDi41pf41ug==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.8.4.tgz\",\n+ \"integrity\": \"sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/types\": \"^7.8.3\",\n}\n},\n\"@babel/parser\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.8.3.tgz\",\n- \"integrity\": \"sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz\",\n+ \"integrity\": \"sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==\",\n\"dev\": true\n},\n\"@babel/template\": {\n}\n},\n\"@babel/traverse\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.3.tgz\",\n- \"integrity\": \"sha512-we+a2lti+eEImHmEXp7bM9cTxGzxPmBiVJlLVD+FuuQMeeO7RaDbutbgeheDkw+Xe3mCfJHnGOWLswT74m2IPg==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.4.tgz\",\n+ \"integrity\": \"sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/code-frame\": \"^7.8.3\",\n- \"@babel/generator\": \"^7.8.3\",\n+ \"@babel/generator\": \"^7.8.4\",\n\"@babel/helper-function-name\": \"^7.8.3\",\n\"@babel/helper-split-export-declaration\": \"^7.8.3\",\n- \"@babel/parser\": \"^7.8.3\",\n+ \"@babel/parser\": \"^7.8.4\",\n\"@babel/types\": \"^7.8.3\",\n\"debug\": \"^4.1.0\",\n\"globals\": \"^11.1.0\",\n}\n},\n\"@babel/parser\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.8.3.tgz\",\n- \"integrity\": \"sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz\",\n+ \"integrity\": \"sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==\",\n\"dev\": true\n},\n\"@babel/template\": {\n}\n},\n\"@babel/plugin-transform-for-of\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.8.3.tgz\",\n- \"integrity\": \"sha512-ZjXznLNTxhpf4Q5q3x1NsngzGA38t9naWH8Gt+0qYZEJAcvPI9waSStSh56u19Ofjr7QmD0wUsQ8hw8s/p1VnA==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.8.4.tgz\",\n+ \"integrity\": \"sha512-iAXNlOWvcYUYoV8YIxwS7TxGRJcxyl8eQCfT+A5j8sKUzRFvJdcyjp97jL2IghWSRDaL2PU2O2tX8Cu9dTBq5A==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/helper-plugin-utils\": \"^7.8.3\"\n}\n},\n\"@babel/parser\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.8.3.tgz\",\n- \"integrity\": \"sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz\",\n+ \"integrity\": \"sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==\",\n\"dev\": true\n},\n\"@babel/template\": {\n}\n},\n\"@babel/plugin-transform-parameters\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.8.3.tgz\",\n- \"integrity\": \"sha512-/pqngtGb54JwMBZ6S/D3XYylQDFtGjWrnoCF4gXZOUpFV/ujbxnoNGNvDGu6doFWRPBveE72qTx/RRU44j5I/Q==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.8.4.tgz\",\n+ \"integrity\": \"sha512-IsS3oTxeTsZlE5KqzTbcC2sV0P9pXdec53SU+Yxv7o/6dvGM5AkTotQKhoSffhNgZ/dftsSiOoxy7evCYJXzVA==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/helper-call-delegate\": \"^7.8.3\",\n}\n},\n\"@babel/plugin-transform-typeof-symbol\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.3.tgz\",\n- \"integrity\": \"sha512-3TrkKd4LPqm4jHs6nPtSDI/SV9Cm5PRJkHLUgTcqRQQTMAZ44ZaAdDZJtvWFSaRcvT0a1rTmJ5ZA5tDKjleF3g==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.4.tgz\",\n+ \"integrity\": \"sha512-2QKyfjGdvuNfHsb7qnBBlKclbD4CfshH2KvDabiijLMGXPHJXGxtDzwIF7bQP+T0ysw8fYTtxPafgfs/c1Lrqg==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/helper-plugin-utils\": \"^7.8.3\"\n}\n},\n\"@babel/preset-env\": {\n- \"version\": \"7.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.8.3.tgz\",\n- \"integrity\": \"sha512-Rs4RPL2KjSLSE2mWAx5/iCH+GC1ikKdxPrhnRS6PfFVaiZeom22VFKN4X8ZthyN61kAaR05tfXTbCvatl9WIQg==\",\n+ \"version\": \"7.8.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.8.4.tgz\",\n+ \"integrity\": \"sha512-HihCgpr45AnSOHRbS5cWNTINs0TwaR8BS8xIIH+QwiW8cKL0llV91njQMpeMReEPVs+1Ao0x3RLEBLtt1hOq4w==\",\n\"dev\": true,\n\"requires\": {\n- \"@babel/compat-data\": \"^7.8.0\",\n- \"@babel/helper-compilation-targets\": \"^7.8.3\",\n+ \"@babel/compat-data\": \"^7.8.4\",\n+ \"@babel/helper-compilation-targets\": \"^7.8.4\",\n\"@babel/helper-module-imports\": \"^7.8.3\",\n\"@babel/helper-plugin-utils\": \"^7.8.3\",\n\"@babel/plugin-proposal-async-generator-functions\": \"^7.8.3\",\n\"@babel/plugin-transform-dotall-regex\": \"^7.8.3\",\n\"@babel/plugin-transform-duplicate-keys\": \"^7.8.3\",\n\"@babel/plugin-transform-exponentiation-operator\": \"^7.8.3\",\n- \"@babel/plugin-transform-for-of\": \"^7.8.3\",\n+ \"@babel/plugin-transform-for-of\": \"^7.8.4\",\n\"@babel/plugin-transform-function-name\": \"^7.8.3\",\n\"@babel/plugin-transform-literals\": \"^7.8.3\",\n\"@babel/plugin-transform-member-expression-literals\": \"^7.8.3\",\n\"@babel/plugin-transform-named-capturing-groups-regex\": \"^7.8.3\",\n\"@babel/plugin-transform-new-target\": \"^7.8.3\",\n\"@babel/plugin-transform-object-super\": \"^7.8.3\",\n- \"@babel/plugin-transform-parameters\": \"^7.8.3\",\n+ \"@babel/plugin-transform-parameters\": \"^7.8.4\",\n\"@babel/plugin-transform-property-literals\": \"^7.8.3\",\n\"@babel/plugin-transform-regenerator\": \"^7.8.3\",\n\"@babel/plugin-transform-reserved-words\": \"^7.8.3\",\n\"@babel/plugin-transform-spread\": \"^7.8.3\",\n\"@babel/plugin-transform-sticky-regex\": \"^7.8.3\",\n\"@babel/plugin-transform-template-literals\": \"^7.8.3\",\n- \"@babel/plugin-transform-typeof-symbol\": \"^7.8.3\",\n+ \"@babel/plugin-transform-typeof-symbol\": \"^7.8.4\",\n\"@babel/plugin-transform-unicode-regex\": \"^7.8.3\",\n\"@babel/types\": \"^7.8.3\",\n- \"browserslist\": \"^4.8.2\",\n+ \"browserslist\": \"^4.8.5\",\n\"core-js-compat\": \"^3.6.2\",\n\"invariant\": \"^2.2.2\",\n- \"levenary\": \"^1.1.0\",\n+ \"levenary\": \"^1.1.1\",\n\"semver\": \"^5.5.0\"\n},\n\"dependencies\": {\n\"to-fast-properties\": \"^2.0.0\"\n}\n},\n+ \"browserslist\": {\n+ \"version\": \"4.8.6\",\n+ \"resolved\": \"https://registry.npmjs.org/browserslist/-/browserslist-4.8.6.tgz\",\n+ \"integrity\": \"sha512-ZHao85gf0eZ0ESxLfCp73GG9O/VTytYDIkIiZDlURppLTI9wErSM/5yAKEq6rcUdxBLjMELmrYUJGg5sxGKMHg==\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"caniuse-lite\": \"^1.0.30001023\",\n+ \"electron-to-chromium\": \"^1.3.341\",\n+ \"node-releases\": \"^1.1.47\"\n+ }\n+ },\n+ \"caniuse-lite\": {\n+ \"version\": \"1.0.30001023\",\n+ \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001023.tgz\",\n+ \"integrity\": \"sha512-C5TDMiYG11EOhVOA62W1p3UsJ2z4DsHtMBQtjzp3ZsUglcQn62WOUgW0y795c7A5uZ+GCEIvzkMatLIlAsbNTA==\",\n+ \"dev\": true\n+ },\n+ \"electron-to-chromium\": {\n+ \"version\": \"1.3.344\",\n+ \"resolved\": \"https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.344.tgz\",\n+ \"integrity\": \"sha512-tvbx2Wl8WBR+ym3u492D0L6/jH+8NoQXqe46+QhbWH3voVPauGuZYeb1QAXYoOAWuiP2dbSvlBx0kQ1F3hu/Mw==\",\n+ \"dev\": true\n+ },\n+ \"node-releases\": {\n+ \"version\": \"1.1.47\",\n+ \"resolved\": \"https://registry.npmjs.org/node-releases/-/node-releases-1.1.47.tgz\",\n+ \"integrity\": \"sha512-k4xjVPx5FpwBUj0Gw7uvFOTF4Ep8Hok1I6qjwL3pLfwe7Y0REQSAqOwwv9TWBCUtMHxcXfY4PgRLRozcChvTcA==\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"semver\": \"^6.3.0\"\n+ },\n+ \"dependencies\": {\n+ \"semver\": {\n+ \"version\": \"6.3.0\",\n+ \"resolved\": \"https://registry.npmjs.org/semver/-/semver-6.3.0.tgz\",\n+ \"integrity\": \"sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==\",\n+ \"dev\": true\n+ }\n+ }\n+ },\n\"semver\": {\n\"version\": \"5.7.1\",\n\"resolved\": \"https://registry.npmjs.org/semver/-/semver-5.7.1.tgz\",\n},\n\"dependencies\": {\n\"browserslist\": {\n- \"version\": \"4.8.5\",\n- \"resolved\": \"https://registry.npmjs.org/browserslist/-/browserslist-4.8.5.tgz\",\n- \"integrity\": \"sha512-4LMHuicxkabIB+n9874jZX/az1IaZ5a+EUuvD7KFOu9x/Bd5YHyO0DIz2ls/Kl8g0ItS4X/ilEgf4T1Br0lgSg==\",\n+ \"version\": \"4.8.6\",\n+ \"resolved\": \"https://registry.npmjs.org/browserslist/-/browserslist-4.8.6.tgz\",\n+ \"integrity\": \"sha512-ZHao85gf0eZ0ESxLfCp73GG9O/VTytYDIkIiZDlURppLTI9wErSM/5yAKEq6rcUdxBLjMELmrYUJGg5sxGKMHg==\",\n\"dev\": true,\n\"requires\": {\n- \"caniuse-lite\": \"^1.0.30001022\",\n- \"electron-to-chromium\": \"^1.3.338\",\n- \"node-releases\": \"^1.1.46\"\n+ \"caniuse-lite\": \"^1.0.30001023\",\n+ \"electron-to-chromium\": \"^1.3.341\",\n+ \"node-releases\": \"^1.1.47\"\n}\n},\n\"caniuse-lite\": {\n- \"version\": \"1.0.30001022\",\n- \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001022.tgz\",\n- \"integrity\": \"sha512-FjwPPtt/I07KyLPkBQ0g7/XuZg6oUkYBVnPHNj3VHJbOjmmJ/GdSo/GUY6MwINEQvjhP6WZVbX8Tvms8xh0D5A==\",\n+ \"version\": \"1.0.30001023\",\n+ \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001023.tgz\",\n+ \"integrity\": \"sha512-C5TDMiYG11EOhVOA62W1p3UsJ2z4DsHtMBQtjzp3ZsUglcQn62WOUgW0y795c7A5uZ+GCEIvzkMatLIlAsbNTA==\",\n\"dev\": true\n},\n\"electron-to-chromium\": {\n- \"version\": \"1.3.340\",\n- \"resolved\": \"https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.340.tgz\",\n- \"integrity\": \"sha512-hRFBAglhcj5iVYH+o8QU0+XId1WGoc0VGowJB1cuJAt3exHGrivZvWeAO5BRgBZqwZtwxjm8a5MQeGoT/Su3ww==\",\n+ \"version\": \"1.3.344\",\n+ \"resolved\": \"https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.344.tgz\",\n+ \"integrity\": \"sha512-tvbx2Wl8WBR+ym3u492D0L6/jH+8NoQXqe46+QhbWH3voVPauGuZYeb1QAXYoOAWuiP2dbSvlBx0kQ1F3hu/Mw==\",\n\"dev\": true\n},\n\"node-releases\": {\n}\n},\n\"eslint-config-prettier\": {\n- \"version\": \"6.9.0\",\n- \"resolved\": \"https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.9.0.tgz\",\n- \"integrity\": \"sha512-k4E14HBtcLv0uqThaI6I/n1LEqROp8XaPu6SO9Z32u5NlGRC07Enu1Bh2KEFw4FNHbekH8yzbIU9kUGxbiGmCA==\",\n+ \"version\": \"6.10.0\",\n+ \"resolved\": \"https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.10.0.tgz\",\n+ \"integrity\": \"sha512-AtndijGte1rPILInUdHjvKEGbIV06NuvPrqlIEaEaWtbtvJh464mDeyGMdZEQMsGvC0ZVkiex1fSNcC4HAbRGg==\",\n\"dev\": true,\n\"requires\": {\n\"get-stdin\": \"^6.0.0\"\n\"dev\": true\n},\n\"levenary\": {\n- \"version\": \"1.1.0\",\n- \"resolved\": \"https://registry.npmjs.org/levenary/-/levenary-1.1.0.tgz\",\n- \"integrity\": \"sha512-VHcwhO0UTpUW7rLPN2/OiWJdgA1e9BqEDALhrgCe/F+uUJnep6CoUsTzMeP8Rh0NGr9uKquXxqe7lwLZo509nQ==\",\n+ \"version\": \"1.1.1\",\n+ \"resolved\": \"https://registry.npmjs.org/levenary/-/levenary-1.1.1.tgz\",\n+ \"integrity\": \"sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ==\",\n\"dev\": true,\n\"requires\": {\n\"leven\": \"^3.1.0\"\n\"resolved\": \"https://registry.npmjs.org/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.1.tgz\",\n\"integrity\": \"sha512-3j8wdDzYuWO3lM3Reg03MuQR957t287Rpcxp1njpEa8oDrikb+FwGdW3n+FELh/A6qib6yPit0j/pv9G/yeAqA==\"\n},\n- \"lodash.isboolean\": {\n- \"version\": \"3.0.3\",\n- \"resolved\": \"https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz\",\n- \"integrity\": \"sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=\"\n- },\n- \"lodash.isregexp\": {\n- \"version\": \"4.0.1\",\n- \"resolved\": \"https://registry.npmjs.org/lodash.isregexp/-/lodash.isregexp-4.0.1.tgz\",\n- \"integrity\": \"sha1-4T5kezDNVZdSoEzZEghvr32hwws=\"\n- },\n- \"lodash.isstring\": {\n- \"version\": \"4.0.1\",\n- \"resolved\": \"https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz\",\n- \"integrity\": \"sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=\"\n- },\n\"lodash.mapvalues\": {\n\"version\": \"4.6.0\",\n\"resolved\": \"https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz\",\n}\n},\n\"luxon\": {\n- \"version\": \"1.21.3\",\n- \"resolved\": \"https://registry.npmjs.org/luxon/-/luxon-1.21.3.tgz\",\n- \"integrity\": \"sha512-lLRwNcNnkZLuv13A1FUuZRZmTWF7ro2ricYvb0L9cvBYHPvZhQdKwrYnZzi103D2XKmlVmxWpdn2wfIiOt2YEw==\"\n+ \"version\": \"1.22.0\",\n+ \"resolved\": \"https://registry.npmjs.org/luxon/-/luxon-1.22.0.tgz\",\n+ \"integrity\": \"sha512-3sLvlfbFo+AxVEY3IqxymbumtnlgBwjDExxK60W3d+trrUzErNAz/PfvPT+mva+vEUrdIodeCOs7fB6zHtRSrw==\"\n},\n\"make-dir\": {\n\"version\": \"1.3.0\",\n\"integrity\": \"sha512-F6yTRuc06xr1h5Qw/ykb2LuFynJ2IxkKfCMf+1xqPffkxh0S09Zc902XCffcsw/XMFq/OzQ1w54fLIDtmRNHnQ==\"\n},\n\"stylelint-config-recommended-scss\": {\n- \"version\": \"4.1.0\",\n- \"resolved\": \"https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-4.1.0.tgz\",\n- \"integrity\": \"sha512-4012ca0weVi92epm3RRBRZcRJIyl5vJjJ/tJAKng+Qat5+cnmuCwyOI2vXkKdjNfGd0gvzyKCKEkvTMDcbtd7Q==\",\n+ \"version\": \"4.2.0\",\n+ \"resolved\": \"https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-4.2.0.tgz\",\n+ \"integrity\": \"sha512-4bI5BYbabo/GCQ6LbRZx/ZlVkK65a1jivNNsD+ix/Lw0U3iAch+jQcvliGnnAX8SUPaZ0UqzNVNNAF3urswa7g==\",\n\"requires\": {\n\"stylelint-config-recommended\": \"^3.0.0\"\n}\n}\n},\n\"stylelint-scss\": {\n- \"version\": \"3.13.0\",\n- \"resolved\": \"https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-3.13.0.tgz\",\n- \"integrity\": \"sha512-SaLnvQyndaPcsgVJsMh6zJ1uKVzkRZJx+Wg/stzoB1mTBdEmGketbHrGbMQNymzH/0mJ06zDSpeCDvNxqIJE5A==\",\n+ \"version\": \"3.14.2\",\n+ \"resolved\": \"https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-3.14.2.tgz\",\n+ \"integrity\": \"sha512-59/BkIEWyFoORiejDIQB2P2kmg0KcqMn7wtj1y5sRvS4N+Qh+Ng3hbKelOzgS+OM2Ezbai0uEev8xckXxkh9TQ==\",\n\"requires\": {\n- \"lodash.isboolean\": \"^3.0.3\",\n- \"lodash.isregexp\": \"^4.0.1\",\n- \"lodash.isstring\": \"^4.0.1\",\n+ \"lodash\": \"^4.17.15\",\n\"postcss-media-query-parser\": \"^0.2.3\",\n\"postcss-resolve-nested-selector\": \"^0.1.1\",\n\"postcss-selector-parser\": \"^6.0.2\",\n"
},
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "\"flagpack\": \"^1.0.4\",\n\"jquery\": \"^3.4.1\",\n\"locutus\": \"^2.0.11\",\n- \"luxon\": \"^1.21.3\",\n+ \"luxon\": \"^1.22.0\",\n\"no-scroll\": \"^2.1.1\",\n\"node-vibrant\": \"^3.1.5\",\n\"popper.js\": \"^1.16.1\",\n\"register-service-worker\": \"^1.6.2\",\n\"selectize\": \"^0.12.6\",\n\"simplemde\": \"^1.11.2\",\n- \"stylelint-config-recommended-scss\": \"^4.1\",\n- \"stylelint-scss\": \"^3.13\",\n+ \"stylelint-config-recommended-scss\": \"^4.2.0\",\n+ \"stylelint-scss\": \"^3.14.2\",\n\"terser\": \"^4.6.3\",\n\"tinycolor2\": \"^1.4.1\",\n\"vue\": \"^2.6.11\",\n\"zxcvbn\": \"^4.4.2\"\n},\n\"devDependencies\": {\n- \"@babel/core\": \"^7.8.3\",\n+ \"@babel/core\": \"^7.8.4\",\n\"@babel/plugin-transform-regenerator\": \"^7.8.3\",\n\"@babel/plugin-transform-runtime\": \"^7.8.3\",\n\"@babel/polyfill\": \"^7.8.3\",\n- \"@babel/preset-env\": \"^7.8.3\",\n+ \"@babel/preset-env\": \"^7.8.4\",\n\"@fortawesome/fontawesome-free\": \"^5.12.0\",\n\"@symfony/webpack-encore\": \"^0.28.2\",\n\"@vue/test-utils\": \"^1.0.0-beta.31\",\n\"babel-eslint\": \"^10.0.3\",\n\"babel-jest\": \"^24.9.0\",\n\"eslint\": \"^6.8.0\",\n- \"eslint-config-prettier\": \"^6.9.0\",\n+ \"eslint-config-prettier\": \"^6.10.0\",\n\"eslint-plugin-prettier\": \"^3.1.2\",\n\"eslint-plugin-standard\": \"^4.0.1\",\n\"eslint-plugin-vue\": \"^6.1.2\",\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Updating NPM deps, fixing height of checkbox
|
95,144 |
04.02.2020 17:13:32
| -3,600 |
c7aa20b5e4fbf01bdb4a0726df70cac4813daebf
|
Remove (deprecate) unneeded addTwigExtension
|
[
{
"change_type": "MODIFY",
"old_path": "src/Command/ExtensionsShowCommand.php",
"new_path": "src/Command/ExtensionsShowCommand.php",
"diff": "@@ -47,7 +47,7 @@ class ExtensionsShowCommand extends Command\n/** @var ExtensionInterface $extension */\n$extension = $this->extensionRegistry->getExtension($extensionName);\n- if ($extension instanceof ExtensionInterface) {\n+ if (! $extension instanceof ExtensionInterface) {\n$io->caution('No such extension.');\nreturn 0;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Extension/BaseExtension.php",
"new_path": "src/Extension/BaseExtension.php",
"diff": "@@ -71,15 +71,10 @@ abstract class BaseExtension implements ExtensionInterface\n}\n/**\n- * Shortcut method to register a TwigExtension.\n+ * @deprecated\n*/\npublic function addTwigExtension(TwigExtensionInterface $extension): void\n{\n- if ($this->getTwig()->hasExtension(\\get_class($extension))) {\n- return;\n- }\n-\n- $this->getTwig()->addExtension($extension);\n}\n/**\n@@ -145,7 +140,6 @@ abstract class BaseExtension implements ExtensionInterface\n*/\npublic function registerTwigExtension(TwigExtensionInterface $extension): void\n{\n- $this->addTwigExtension($extension);\n}\n/**\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Remove (deprecate) unneeded addTwigExtension
|
95,144 |
04.02.2020 20:01:03
| -3,600 |
4601455c34783e8fa85f76555ce1f1e5a440b9e1
|
Ensure slugs are not numerical, add example of route to allow access to records by number
|
[
{
"change_type": "MODIFY",
"old_path": "config/routes.yaml",
"new_path": "config/routes.yaml",
"diff": "@@ -27,10 +27,20 @@ frontend:\n#contentlisting:\n# path: /{contenttypeslug}\n# defaults:\n-# _controller: Bolt\\Controller\\Frontend\\Controller::contentListing\n+# _controller: Bolt\\Controller\\Frontend\\ListingController::listing\n# requirements:\n# contenttypeslug: '%bolt.requirement.pluralcontenttypes%'\n+# Use this route to display a record, based on the value of a field. for example,\n+# URLs like `/number/12`, where the intent is to display the record from the\n+# \"entry\" ContentType, where the \"title\" Field is equal to \"12\".\n+entrybynumber:\n+ path: /number/{value}\n+ defaults:\n+ _controller: Bolt\\Controller\\Frontend\\DetailController::contentByFieldValue\n+ contentTypeSlug: 'entries'\n+ field: 'title'\n+\n# ------------------------------------------------------------------------------\n# last of all, try to find content only by slug (SEO routes) before throwing 404\ncontent_seo:\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Frontend/DetailController.php",
"new_path": "src/Controller/Frontend/DetailController.php",
"diff": "@@ -6,6 +6,7 @@ namespace Bolt\\Controller\\Frontend;\nuse Bolt\\Configuration\\Content\\ContentType;\nuse Bolt\\Controller\\TwigAwareController;\n+use Bolt\\Entity\\Content;\nuse Bolt\\Enum\\Statuses;\nuse Bolt\\Repository\\ContentRepository;\nuse Bolt\\TemplateChooser;\n@@ -51,6 +52,31 @@ class DetailController extends TwigAwareController implements FrontendZone\n$record = $this->contentRepository->findOneBySlug($slugOrId, $contentType);\n}\n+ // Update the canonical, with the correct path\n+ $this->canonical->setPath(null, [\n+ 'contentTypeSlug' => $record->getContentTypeSingularSlug(),\n+ 'slugOrId' => $record->getSlug(),\n+ ]);\n+\n+ return $this->renderSingle($record, $requirePublished);\n+ }\n+\n+ public function contentByFieldValue(string $contentTypeSlug, string $field, string $value): Response\n+ {\n+ $contentType = ContentType::factory($contentTypeSlug, $this->config->get('contenttypes'));\n+ $record = $this->contentRepository->findOneByFieldValue($field, $value, $contentType);\n+\n+ // Update the canonical, with the correct path\n+ $this->canonical->setPath(null, [\n+ 'field' => $field,\n+ 'value' => $value,\n+ ]);\n+\n+ return $this->renderSingle($record);\n+ }\n+\n+ public function renderSingle(?Content $record, bool $requirePublished = true): Response\n+ {\nif (! $record) {\nthrow new NotFoundHttpException('Content not found');\n}\n@@ -62,12 +88,6 @@ class DetailController extends TwigAwareController implements FrontendZone\n$singularSlug = $record->getContentTypeSingularSlug();\n- // Update the canonical, with the correct path\n- $this->canonical->setPath(null, [\n- 'contentTypeSlug' => $record->getContentTypeSingularSlug(),\n- 'slugOrId' => $record->getSlug(),\n- ]);\n-\n$context = [\n'record' => $record,\n$singularSlug => $record,\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Entity/Field/SlugField.php",
"new_path": "src/Entity/Field/SlugField.php",
"diff": "@@ -23,6 +23,12 @@ class SlugField extends Field implements FieldInterface\n$value = reset($value);\n}\n$value = Str::slug($value);\n+\n+ if (is_numeric($value)) {\n+ $slug = $this->getContent()->getDefinition()->get('singular_slug');\n+ $value = $slug . '-' . $value;\n+ }\n+\nparent::setValue([$value]);\nreturn $this;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Repository/ContentRepository.php",
"new_path": "src/Repository/ContentRepository.php",
"diff": "@@ -191,18 +191,26 @@ class ContentRepository extends ServiceEntityRepository\n->getOneOrNullResult();\n}\n- public function findOneByFieldValue(string $fieldName, $value): ?Content\n+ public function findOneByFieldValue(string $fieldName, string $value, ?ContentType $contentType = null): ?Content\n{\n$qb = $this->getQueryBuilder();\n[$where, $value] = JsonHelper::wrapJsonFunction('translation.value', $value, $qb);\n- return $qb\n+ $query = $qb\n->innerJoin('content.fields', 'field')\n->innerJoin('field.translations', 'translation')\n->andWhere($where . ' = :value')\n->setParameter('value', $value)\n- ->setMaxResults(1)\n+ ->andWhere('field.name = :name')\n+ ->setParameter('name', $fieldName);\n+\n+ if ($contentType) {\n+ $query->andWhere('content.contentType = :ct')\n+ ->setParameter('ct', $contentType->get('slug'));\n+ }\n+\n+ return $query->setMaxResults(1)\n->getQuery()\n->getOneOrNullResult();\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Ensure slugs are not numerical, add example of route to allow access to records by number
|
95,144 |
07.02.2020 07:15:52
| -3,600 |
2efabc4305963ab040cf5df193157987acf33f89
|
Add description to ContentTypes
|
[
{
"change_type": "MODIFY",
"old_path": "config/bolt/contenttypes.yaml",
"new_path": "config/bolt/contenttypes.yaml",
"diff": "@@ -163,6 +163,7 @@ showcases:\nslug: showcases\nsingular_name: Showcase\nsingular_slug: showcase\n+ description: The 'Showcases' is not particularly useful in most cases, but it does a good job of showcasing most of the available fieldtypes.\nfields:\ntitle:\ntype: text\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/content/listing.html.twig",
"new_path": "templates/content/listing.html.twig",
"diff": "</div>\n<div class=\"card-body\">\n+ {% if contentType.description %}\n+ <p>{{ contentType.description }}</p>\n+ {% endif %}\n+\n<ul class=\"px-2\">\n<li>Name: <code>{{ contentType.name }}</code> (singular: <code>{{ contentType.singular_name }}</code>)</li>\n<li>Slug: <code>{{ contentType.slug }}</code> (singular: <code>{{ contentType.singular_slug }}</code>)</li>\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Add description to ContentTypes
|
95,144 |
08.02.2020 11:25:01
| -3,600 |
55cd964dd7a8a00e0a385818c1c5f0e3b616c197
|
Making `viewless` work better, and update `absolute_link`
|
[
{
"change_type": "MODIFY",
"old_path": "config/bolt/contenttypes.yaml",
"new_path": "config/bolt/contenttypes.yaml",
"diff": "@@ -301,6 +301,11 @@ blocks:\ncontent:\ntype: html\nheight: 150px\n+ content_link:\n+ type: text\n+ label: Link\n+ placeholder: 'contenttype/slug or http://example.org/'\n+ postfix: \"Use this to add a link for this Block. This could either be an 'internal' link like <tt>page/about</tt>, if you use a contenttype/slug combination. Otherwise use a proper URL, like `https://example.org`.\"\nrelations:\npages:\nmultiple: false\n"
},
{
"change_type": "MODIFY",
"old_path": "public/theme/skeleton/partials/_aside.twig",
"new_path": "public/theme/skeleton/partials/_aside.twig",
"diff": "{{ block.content }}\n{% set edit_link = block|edit_link %}\n- {% set content_link = block|link %}\n+ {% set content_link = block.content_link|default(block|link) %}\n{% if content_link or edit_link %}\n<p>\n{%- if content_link %}\n- <a href=\"{{ relative_path(content_link|e) }}\">{{ __('general.phrase.read-more') }}</a>\n+ <a href=\"{{ absolute_link(content_link|e) }}\">{{ __('general.phrase.read-more') }}</a>\n{% endif -%}\n{%- if edit_link %}\n/ <a href=\"{{ edit_link }}\">{{ __('general.phrase.edit') }}</a>\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Configuration/Content/ContentType.php",
"new_path": "src/Configuration/Content/ContentType.php",
"diff": "@@ -14,7 +14,7 @@ class ContentType extends DeepCollection\nreturn $this->get($name);\n}\n- public static function factory(string $name, Collection $contentTypesConfig): self\n+ public static function factory(?string $name, Collection $contentTypesConfig): self\n{\nif ($contentTypesConfig->has($name)) {\nreturn new self($contentTypesConfig->get($name));\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Frontend/DetailController.php",
"new_path": "src/Controller/Frontend/DetailController.php",
"diff": "@@ -54,8 +54,8 @@ class DetailController extends TwigAwareController implements FrontendZone\n// Update the canonical, with the correct path\n$this->canonical->setPath(null, [\n- 'contentTypeSlug' => $record->getContentTypeSingularSlug(),\n- 'slugOrId' => $record->getSlug(),\n+ 'contentTypeSlug' => $record ? $record->getContentTypeSingularSlug() : null,\n+ 'slugOrId' => $record ? $record->getSlug() : null,\n]);\nreturn $this->renderSingle($record, $requirePublished);\n@@ -86,6 +86,11 @@ class DetailController extends TwigAwareController implements FrontendZone\nthrow new NotFoundHttpException('Content is not published');\n}\n+ // If the ContentType is 'viewless' we also throw a 404.\n+ if (($record->getDefinition()->get('viewless') === true) && $requirePublished) {\n+ throw new NotFoundHttpException('Content is not viewable');\n+ }\n+\n$singularSlug = $record->getContentTypeSingularSlug();\n$context = [\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/ContentExtension.php",
"new_path": "src/Twig/ContentExtension.php",
"diff": "@@ -253,7 +253,7 @@ class ContentExtension extends AbstractExtension\npublic function getLink(Content $content, bool $canonical = false): ?string\n{\n- if ($content->getId() === null) {\n+ if ($content->getId() === null || $content->getDefinition()->get('viewless')) {\nreturn null;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/HtmlExtension.php",
"new_path": "src/Twig/HtmlExtension.php",
"diff": "@@ -6,6 +6,7 @@ namespace Bolt\\Twig;\nuse Bolt\\Canonical;\nuse Bolt\\Common\\Str;\n+use Bolt\\Utils\\Html;\nuse Bolt\\Utils\\Markdown;\nuse Twig\\Extension\\AbstractExtension;\nuse Twig\\TwigFilter;\n@@ -41,6 +42,7 @@ class HtmlExtension extends AbstractExtension\nnew TwigFunction('canonical', [$this, 'canonical']),\nnew TwigFunction('markdown', [$this, 'markdown'], $safe),\nnew TwigFunction('redirect', [$this, 'redirect']),\n+ new TwigFunction('absolute_link', [$this, 'absoluteLink']),\n];\n}\n@@ -89,4 +91,14 @@ class HtmlExtension extends AbstractExtension\nheader(\"Location: ${path}\");\nexit();\n}\n+\n+ /**\n+ * Use relative_path to create a proper link to either a relative page, or\n+ * to an external source. In the below example, the editor can provide\n+ * either page/about, or https://boltcms.io, and both will work\n+ */\n+ public function absoluteLink(string $link): string\n+ {\n+ return Html::makeAbsoluteLink($link);\n+ }\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Utils/Html.php",
"new_path": "src/Utils/Html.php",
"diff": "@@ -4,6 +4,8 @@ declare(strict_types=1);\nnamespace Bolt\\Utils;\n+use Bolt\\Common\\Str;\n+\nclass Html\n{\n/**\n@@ -131,4 +133,13 @@ class Html\nreturn $link;\n}\n+\n+ public static function makeAbsoluteLink(string $link): string\n+ {\n+ if (mb_strpos($link, '://') !== false || mb_substr($link, 0, 2) === '//') {\n+ return $link;\n+ }\n+\n+ return Str::ensureStartsWith($link, '/');\n+ }\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/helpers/_fields.twig",
"new_path": "templates/helpers/_fields.twig",
"diff": "{% endapply -%}\n{# SECTION 2: LOOPING AND ITERATION - The actual looping is done here. #}\n- {% for name, definition in record.definition.fields|filter(definition => definition.slug not in omittedkeys) %}\n+ {% for name, definition in record.definition.fields|filter((definition, name) => definition.slug not in omittedkeys and record.hasField(name)) %}\n{% set field = record.field(name) %}\n{% set type = field|type %}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Making `viewless` work better, and update `absolute_link`
|
95,144 |
11.02.2020 15:21:02
| -3,600 |
83d9029f71a2bbe6787fe6a770fe687eda718f7f
|
Implement missing utility functions for widgets
|
[
{
"change_type": "MODIFY",
"old_path": "src/Twig/WidgetExtension.php",
"new_path": "src/Twig/WidgetExtension.php",
"diff": "@@ -48,21 +48,18 @@ class WidgetExtension extends AbstractExtension\nreturn $this->widgetRenderer->renderWidgetsForTarget($target, $params);\n}\n- public function hasWidgets($input = null): bool\n+ public function hasWidgets(string $target): bool\n{\n- // @todo See Github issue https://github.com/bolt/four/issues/135\n- return false;\n+ return count($this->listwidgets($target)) > 0;\n}\n- public function listwidgets($input = null): array\n+ public function listwidgets(string $target)\n{\n- // @todo See Github issue https://github.com/bolt/four/issues/135\n- return [];\n+ return $this->widgetRenderer->listWidgetsForTarget($target);\n}\n- public function countwidgets($input = null): int\n+ public function countwidgets(string $target): int\n{\n- // @todo See Github issue https://github.com/bolt/four/issues/135\n- return count($this->listwidgets($input));\n+ return count($this->listwidgets($target));\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Widget/BaseWidget.php",
"new_path": "src/Widget/BaseWidget.php",
"diff": "@@ -123,6 +123,7 @@ abstract class BaseWidget implements WidgetInterface\n// Extension is set, and needs to be available in the template\n$params['extension'] = $this->extension;\n+ $params['widget'] = $this;\nif ($this instanceof TwigAware) {\n$this->addTwigLoader();\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Widgets.php",
"new_path": "src/Widgets.php",
"diff": "@@ -84,11 +84,7 @@ class Widgets\npublic function renderWidgetsForTarget(string $target, array $params = []): string\n{\n- $widgets = $this->queue->filter(function (WidgetInterface $widget) use ($target) {\n- return $widget->getTarget() === $target;\n- })->sortBy(function (WidgetInterface $widget) {\n- return $widget->getPriority();\n- });\n+ $widgets = $this->filteredWidgets($target);\n$output = '';\n@@ -99,6 +95,20 @@ class Widgets\nreturn $output;\n}\n+ public function listWidgetsForTarget(string $target): Collection\n+ {\n+ return $this->filteredWidgets($target);\n+ }\n+\n+ private function filteredWidgets(string $target): Collection\n+ {\n+ return $this->queue->filter(function (WidgetInterface $widget) use ($target) {\n+ return $widget->getTarget() === $target;\n+ })->sortBy(function (WidgetInterface $widget) {\n+ return $widget->getPriority();\n+ });\n+ }\n+\nprivate function invokeWidget(WidgetInterface $widget, array $params = []): ?string\n{\nif ($this->isRendered($widget)) {\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Implement missing utility functions for widgets
|
95,144 |
11.02.2020 16:17:40
| -3,600 |
19897eb68186afc1f496d3c882fd42b61e66dfcb
|
Use JSON functions for SQLite > 3.9.0 (attempt 2)
|
[
{
"change_type": "MODIFY",
"old_path": "src/Doctrine/Functions/JsonExtract.php",
"new_path": "src/Doctrine/Functions/JsonExtract.php",
"diff": "@@ -9,6 +9,8 @@ use Scienta\\DoctrineJsonFunctions\\Query\\AST\\Functions\\AbstractJsonFunctionNode;\n/**\n* \"JSON_EXTRACT\" \"(\" StringPrimary \",\" StringPrimary {\",\" StringPrimary }* \")\"\n+ *\n+ * See: \"JSON_EXTRACT: Bolt\\Doctrine\\Functions\\JsonExtract\" in `config/packages/doctrine.yaml`\n*/\nclass JsonExtract extends AbstractJsonFunctionNode\n{\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Use JSON functions for SQLite > 3.9.0 (attempt 2)
|
95,144 |
12.02.2020 15:37:38
| -3,600 |
145f46da2c6ca6aabc72cbddaa6883d6ef390ef4
|
Tweak, tweak config to pinpoint breakage
|
[
{
"change_type": "MODIFY",
"old_path": ".travis.yml",
"new_path": ".travis.yml",
"diff": "@@ -27,6 +27,7 @@ before_install:\ninstall:\n- COMPOSER_MEMORY_LIMIT=-1 composer update $COMPOSER_FLAGS\n+ - ./bin/console bolt:info\n- nvm install 12.5\n- npm ci\n- mkdir -p ./var/log/e2e-reports/report/features/\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Doctrine/JsonHelper.php",
"new_path": "src/Doctrine/JsonHelper.php",
"diff": "@@ -23,7 +23,8 @@ class JsonHelper\n$platform = $qb->getEntityManager()->getConnection()->getDatabasePlatform();\nif ($platform instanceof SqlitePlatform) {\n- return self::checkSqliteVersion($qb);\n+// dump(self::checkSqliteVersion($qb));\n+ return false;\n}\n// MySQL80Platform is implicitly included with MySQL57Platform\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/e2e/display_record.feature",
"new_path": "tests/e2e/display_record.feature",
"diff": "@@ -2,14 +2,14 @@ Feature: Display single record\n@javascript\nScenario: As a user I want to display a single record\nWhen I am on \"/page/1\"\n- Then I wait for \"title\"\n+ Then I wait for \".title\"\nAnd I should not see an \".edit-link\" element\n@javascript\nScenario: As an admin I want to see edit link on single record page\nGiven I am logged in as \"admin\"\nAnd I am on \"/page/1\"\n- Then I wait for \"title\"\n+ Then I wait for \".title\"\nAnd I should see \"Edit\" in the \".edit-link\" element\n@javascript\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Tweak, tweak config to pinpoint breakage
|
95,144 |
12.02.2020 16:56:13
| -3,600 |
4d02ede01ceee19d80fe05ef06ef83c5dad33d8a
|
Try to upload images to imgur
|
[
{
"change_type": "MODIFY",
"old_path": ".travis.yml",
"new_path": ".travis.yml",
"diff": "@@ -71,3 +71,5 @@ script:\n- make behat-api-quiet\n# run JS e2e tests\n- ./run_behat_tests.sh && make behat-js-quiet\n+ # Upload Behat screenshots to IMGUR\n+ - ./vendor/bin/upload-screenshots \"var/log/behat-reports/*.png\"\n"
},
{
"change_type": "MODIFY",
"old_path": "Makefile",
"new_path": "Makefile",
"diff": "@@ -82,7 +82,7 @@ behat-js-quiet: ## to run behat JS tests quietly\nmake server\njava -jar -Dwebdriver.chrome.driver=\"./bin/chromedriver\" -Djava.awt.headless=true ./bin/selenium-server-standalone-3.141.59.jar >/dev/null 2>&1 &\nsleep 2s\n- vendor/bin/behat --tags=javascript --format=progress\n+ vendor/bin/behat --tags=javascript --format=progress --stop-on-failure\nkill -9 $(lsof -t -i:4444)\nmake behat:\n"
},
{
"change_type": "MODIFY",
"old_path": "behat.yml",
"new_path": "behat.yml",
"diff": "@@ -21,7 +21,7 @@ default:\nextensions:\nLakion\\Behat\\MinkDebugExtension:\ndirectory: var/log/behat-reports\n- screenshot: false\n+ screenshot: true\nBehat\\MinkExtension:\nbrowser_name: chrome\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Try to upload images to imgur
|
95,144 |
12.02.2020 17:43:05
| -3,600 |
94d710ce4623a4cb8b791a72dbb6d94794a3258d
|
Bumping version for SQLite to 3.28.0
|
[
{
"change_type": "MODIFY",
"old_path": "behat.yml",
"new_path": "behat.yml",
"diff": "@@ -21,7 +21,7 @@ default:\nextensions:\nLakion\\Behat\\MinkDebugExtension:\ndirectory: var/log/behat-reports\n- screenshot: true\n+ screenshot: false\nBehat\\MinkExtension:\nbrowser_name: chrome\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Doctrine/JsonHelper.php",
"new_path": "src/Doctrine/JsonHelper.php",
"diff": "@@ -14,6 +14,15 @@ use Doctrine\\ORM\\QueryBuilder;\nclass JsonHelper\n{\n+ /**\n+ * We're guessing which versions of SQLite support JSON. So far, tests indicate:\n+ * - 3.20.1 - Not OK (Travis PHP 7.2)\n+ * - 3.28.0 - OK (Travis PHP 7.3)\n+ * - 3.29.0 - OK (MacOS Mojave)\n+ * - 3.30.1 - OK (MacOS Catalina)\n+ */\n+ public const SQLITE_WITH_JSON = '3.28.0';\n+\n/**\n* Because Mysql 5.6 and Sqlite handle values in JSON differently, we\n* use this method to check if we can use JSON functions directly.\n@@ -78,6 +87,6 @@ class JsonHelper\n[$client_version] = explode(' - ', $wrapped->getAttribute(\\PDO::ATTR_CLIENT_VERSION));\n- return version_compare($client_version, '3.9.0') > 0;\n+ return version_compare($client_version, self::SQLITE_WITH_JSON) > 0;\n}\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Bumping version for SQLite to 3.28.0
|
95,144 |
13.02.2020 07:15:19
| -3,600 |
d887a84774f06c812fd31b95673adf19c348c99f
|
Implement `isallowed` twig function
|
[
{
"change_type": "ADD",
"old_path": null,
"new_path": "src/Twig/UserExtension.php",
"diff": "+<?php\n+\n+declare(strict_types=1);\n+\n+namespace Bolt\\Twig;\n+\n+use Symfony\\Component\\Security\\Core\\Security;\n+use Twig\\Extension\\AbstractExtension;\n+use Twig\\TwigFunction;\n+\n+class UserExtension extends AbstractExtension\n+{\n+ /** @var Security */\n+ private $security;\n+\n+ public function __construct(Security $security)\n+ {\n+ $this->security = $security;\n+ }\n+\n+ /**\n+ * {@inheritdoc}\n+ */\n+ public function getFunctions(): array\n+ {\n+ return [\n+ new TwigFunction('isallowed', [$this, 'isAllowed']),\n+ ];\n+ }\n+\n+ /**\n+ * @todo Replace with better method, once we've implemented https://github.com/bolt/core/issues/186\n+ */\n+ public function isAllowed(): bool\n+ {\n+ if ($this->security->getUser()) {\n+ return true;\n+ }\n+\n+ return false;\n+ }\n+}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Implement `isallowed` twig function
|
95,144 |
13.02.2020 13:59:58
| -3,600 |
b2bb2dbc32eec86a64738ddb3d1719842b59beb3
|
Update `bin/console bolt:info` and "About" information
|
[
{
"change_type": "MODIFY",
"old_path": "src/Command/InfoCommand.php",
"new_path": "src/Command/InfoCommand.php",
"diff": "@@ -56,9 +56,13 @@ HELP\n$platform = $this->doctrineVersion->getPlatform();\n+ $connection = !empty($platform['connection_status']) ? sprintf('- <comment>%s</comment>', $platform['connection_status']) : '';\n+\n$io->listing([\nsprintf('Install type: <info>%s</info>', Version::installType()),\n- sprintf('Database: <info>%s %s</info> - <comment>%s</comment>', $platform['driver_name'], $platform['server_version'], $platform['connection_status']),\n+ sprintf('Database: <info>%s %s</info> %s', $platform['driver_name'], $platform['server_version'], $connection),\n+ sprintf('PHP version: <info>%s</info>', PHP_VERSION),\n+ sprintf('Operating System: <info>%s</info> - <comment>%s</comment>', php_uname(\"s\"), php_uname('r')),\n]);\n$io->text('');\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/GeneralController.php",
"new_path": "src/Controller/Backend/GeneralController.php",
"diff": "@@ -33,6 +33,9 @@ class GeneralController extends TwigAwareController implements BackendZone\n$twigVars = [\n'installType' => Version::installType(),\n'platform' => $this->doctrineVersion->getPlatform(),\n+ 'php' => PHP_VERSION,\n+ 'os_name' => php_uname(\"s\"),\n+ 'os_version' => php_uname(\"r\"),\n];\nreturn $this->renderTemplate('@bolt/pages/about.html.twig', $twigVars);\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/pages/about.html.twig",
"new_path": "templates/pages/about.html.twig",
"diff": "<h2>Bolt {{ constant('Bolt\\\\Version::VERSION') }}<small> - {{ constant('Bolt\\\\Version::CODENAME') }}</small></h2>\n+ <p><b>{{ 'about.system_info'|trans }}:</b></p>\n<ul>\n<li>Install type: <code>{{ installType }}</code></li>\n<li>Database: <code>{{ platform.driver_name }} {{ platform.server_version }} <small> - {{ platform.connection_status }}</small> </code></li>\n+ <li>PHP version: <code>{{ php }}</code></li>\n+ <li>Operating System: <code>{{ os_name }} - <small>{{ os_version }}</small></code></li>\n</ul>\n+ <hr>\n<p>\nBolt is a CMS that strives to be simple, fast, straightforward and enjoyable to use. Both for\n"
},
{
"change_type": "MODIFY",
"old_path": "translations/messages.en.xlf",
"new_path": "translations/messages.en.xlf",
"diff": "<target>Update all</target>\n</segment>\n</unit>\n+ <unit id=\"QVRwwK4\" name=\"about.system_info\">\n+ <segment>\n+ <source>about.system_info</source>\n+ <target>System Information</target>\n+ </segment>\n+ </unit>\n</file>\n</xliff>\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Update `bin/console bolt:info` and "About" information
|
95,144 |
16.02.2020 20:07:52
| -3,600 |
f734f408b769caeff9139261d88ac5dfb181a061
|
Frontend Controllers should allow both POST and GET
|
[
{
"change_type": "MODIFY",
"old_path": "src/Controller/Frontend/DetailController.php",
"new_path": "src/Controller/Frontend/DetailController.php",
"diff": "@@ -33,12 +33,12 @@ class DetailController extends TwigAwareController implements FrontendZoneInterf\n* \"/{contentTypeSlug}/{slugOrId}\",\n* name=\"record\",\n* requirements={\"contentTypeSlug\"=\"%bolt.requirement.contenttypes%\"},\n- * methods={\"GET\"})\n+ * methods={\"GET|POST\"})\n* @Route(\n* \"/{_locale}/{contentTypeSlug}/{slugOrId}\",\n* name=\"record_locale\",\n* requirements={\"contentTypeSlug\"=\"%bolt.requirement.contenttypes%\", \"_locale\": \"%app_locales%\"},\n- * methods={\"GET\"})\n+ * methods={\"GET|POST\"})\n*\n* @param string|int $slugOrId\n*/\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Frontend/HomepageController.php",
"new_path": "src/Controller/Frontend/HomepageController.php",
"diff": "@@ -21,8 +21,12 @@ class HomepageController extends TwigAwareController implements FrontendZoneInte\n}\n/**\n- * @Route(\"/\", methods={\"GET\"}, name=\"homepage\")\n- * @Route(\"/{_locale}/\", methods={\"GET\"}, name=\"homepage_locale\", requirements={\"_locale\": \"%app_locales%\"})\n+ * @Route(\"/\", methods={\"GET|POST\"}, name=\"homepage\")\n+ * @Route(\n+ * \"/{_locale}/\",\n+ * methods={\"GET|POST\"},\n+ * name=\"homepage_locale\",\n+ * requirements={\"_locale\": \"%app_locales%\"})\n*/\npublic function homepage(ContentRepository $contentRepository): Response\n{\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Frontend/ListingController.php",
"new_path": "src/Controller/Frontend/ListingController.php",
"diff": "@@ -32,12 +32,12 @@ class ListingController extends TwigAwareController implements FrontendZoneInter\n* \"/{contentTypeSlug}\",\n* name=\"listing\",\n* requirements={\"contentTypeSlug\"=\"%bolt.requirement.contenttypes%\"},\n- * methods={\"GET\"})\n+ * methods={\"GET|POST\"})\n* @Route(\n* \"/{_locale}/{contentTypeSlug}\",\n* name=\"listing_locale\",\n* requirements={\"contentTypeSlug\"=\"%bolt.requirement.contenttypes%\", \"_locale\": \"%app_locales%\"},\n- * methods={\"GET\"})\n+ * methods={\"GET|POST\"})\n*/\npublic function listing(ContentRepository $contentRepository, Request $request, string $contentTypeSlug): Response\n{\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Frontend/SearchController.php",
"new_path": "src/Controller/Frontend/SearchController.php",
"diff": "@@ -29,8 +29,8 @@ class SearchController extends TwigAwareController implements FrontendZoneInterf\n}\n/**\n- * @Route(\"/search\", methods={\"GET\", \"POST\"}, name=\"search\")\n- * @Route(\"/{_locale}/search\", methods={\"GET\", \"POST\"}, name=\"search_locale\")\n+ * @Route(\"/search\", methods={\"GET|POST\"}, name=\"search\")\n+ * @Route(\"/{_locale}/search\", methods={\"GET|POST\"}, name=\"search_locale\")\n*/\npublic function search(ContentRepository $contentRepository, Request $request): Response\n{\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Frontend/TaxonomyController.php",
"new_path": "src/Controller/Frontend/TaxonomyController.php",
"diff": "@@ -27,13 +27,13 @@ class TaxonomyController extends TwigAwareController implements FrontendZoneInte\n* \"/{taxonomyslug}/{slug}\",\n* name=\"taxonomy\",\n* requirements={\"taxonomyslug\"=\"%bolt.requirement.taxonomies%\"},\n- * methods={\"GET\"}\n+ * methods={\"GET|POST\"}\n* )\n* @Route(\n* \"/{_locale}/{taxonomyslug}/{slug}\",\n* name=\"taxonomy_locale\",\n* requirements={\"taxonomyslug\"=\"%bolt.requirement.taxonomies%\", \"_locale\": \"%app_locales%\"},\n- * methods={\"GET\"}\n+ * methods={\"GET|POST\"}\n* )\n*/\npublic function listing(ContentRepository $contentRepository, Request $request, string $taxonomyslug, string $slug): Response\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Frontend Controllers should allow both POST and GET
|
95,144 |
16.02.2020 20:18:37
| -3,600 |
98cf29c1ba28793dd88231bf31b38102f833ee61
|
Allow getting extensions by partial name.
|
[
{
"change_type": "MODIFY",
"old_path": "src/Extension/ExtensionRegistry.php",
"new_path": "src/Extension/ExtensionRegistry.php",
"diff": "@@ -68,6 +68,12 @@ class ExtensionRegistry\nreturn $this->extensions[$name];\n}\n+ foreach ($this->extensions as $key => $extension) {\n+ if (strpos($key, $name) !== false) {\n+ return $extension;\n+ }\n+ }\n+\nreturn null;\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Allow getting extensions by partial name.
|
95,144 |
17.02.2020 15:28:06
| -3,600 |
75945fbc9545d299e54c691440a7e3bfcd75aaed
|
Remove config_local.yaml from git
|
[
{
"change_type": "MODIFY",
"old_path": "config/bolt/config.yaml",
"new_path": "config/bolt/config.yaml",
"diff": "# in the project root.\n# The name of the website\n-sitename: A sample site in CONFIG\n+sitename: Bolt Core Git Clone\npayoff: The amazing payoff goes here\nsecret: '%env(APP_SECRET)%'\n"
},
{
"change_type": "DELETE",
"old_path": "config/bolt/config_local.yaml",
"new_path": null,
"diff": "-database:\n- driver: mysql\n- databasename: bolt\n- username: root\n- password: ''\n-\n-sitename: Bolt Core Git Clone\n-\n-debug: true\n-debug_show_loggedoff: false\n-debug_error_level: -1 # equivalent to E_ALL\n-debug_error_use_symfony: true # When set to true, Symfony Profiler will be used for exception display when possible\n-debug_trace_argument_limit: 4 # Determine how many steps in the backtrace will show (dump) arguments.\n-\n-strict_variables: false\n-\n-# Options that will be forced in next major version\n-compatibility:\n- # Whether to return TemplateView instead of TemplateResponse from Controller\\Base::render()\n- # Response methods cannot be used on TemplateView objects.\n- # Setting this value to false is deprecated.\n- template_view: true\n- # Set to 'false' to enable using a newer version of the setcontent parser.\n- setcontent_legacy: true\n-\n-session:\n- cookie_lifetime: 0\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Remove config_local.yaml from git
|
95,144 |
17.02.2020 15:35:43
| -3,600 |
38660cd4f996134906682f61514b9bb5900d9d8e
|
Remove `dump()` from codebase
|
[
{
"change_type": "MODIFY",
"old_path": "src/Twig/ContentExtension.php",
"new_path": "src/Twig/ContentExtension.php",
"diff": "@@ -10,6 +10,7 @@ use Bolt\\Entity\\Field\\ImageField;\nuse Bolt\\Repository\\ContentRepository;\nuse Bolt\\Utils\\Excerpt;\nuse Bolt\\Utils\\Html;\n+use Psr\\Log\\LoggerInterface;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\RequestStack;\nuse Symfony\\Component\\Routing\\Exception\\InvalidParameterException;\n@@ -40,18 +41,23 @@ class ContentExtension extends AbstractExtension\n/** @var Request */\nprivate $request;\n+ /** @var LoggerInterface */\n+ private $logger;\n+\npublic function __construct(\nUrlGeneratorInterface $urlGenerator,\nContentRepository $contentRepository,\nCsrfTokenManagerInterface $csrfTokenManager,\nSecurity $security,\n- RequestStack $requestStack\n+ RequestStack $requestStack,\n+ LoggerInterface $dbLogger\n) {\n$this->urlGenerator = $urlGenerator;\n$this->contentRepository = $contentRepository;\n$this->csrfTokenManager = $csrfTokenManager;\n$this->security = $security;\n$this->request = $requestStack->getCurrentRequest();\n+ $this->logger = $dbLogger;\n}\n/**\n@@ -320,8 +326,7 @@ class ContentExtension extends AbstractExtension\n$canonical ? UrlGeneratorInterface::ABSOLUTE_URL : UrlGeneratorInterface::ABSOLUTE_PATH\n);\n} catch (InvalidParameterException $e) {\n- // @todo More graceful logging, tell user that (probably) the ContentType went missing.\n- dump($e);\n+ $this->logger->notice('Could not create URL for route \\'' . $route .'\\'. Perhaps the ContentType was changed or removed. Try clearing the cache');\n$link = '';\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Remove `dump()` from codebase
|
95,144 |
17.02.2020 17:29:46
| -3,600 |
2ca56d8b183b6005757bb9c03e3cdca21b395e49
|
Set db logged as `synthetic: true` in `services_test.yaml`
|
[
{
"change_type": "ADD",
"old_path": null,
"new_path": "config/services_test.yaml",
"diff": "+services:\n+ monolog.processor.request:\n+ synthetic: true\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Log/LogHandler.php",
"new_path": "src/Log/LogHandler.php",
"diff": "@@ -10,9 +10,7 @@ use Monolog\\Handler\\AbstractProcessingHandler;\nclass LogHandler extends AbstractProcessingHandler\n{\n- /**\n- * @var EntityManagerInterface\n- */\n+ /** @var EntityManagerInterface */\nprotected $em;\npublic function __construct(EntityManagerInterface $em)\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "src/Log/LoggerTrait.php",
"diff": "+<?php\n+\n+namespace Bolt\\Log;\n+\n+use Psr\\Log\\LoggerInterface;\n+\n+trait LoggerTrait\n+{\n+ /**\n+ * @required\n+ */\n+ public function setLogger(LoggerInterface $dbLogger)\n+ {\n+ $this->logger = $dbLogger;\n+ }\n+}\n+\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/ContentExtension.php",
"new_path": "src/Twig/ContentExtension.php",
"diff": "@@ -7,6 +7,7 @@ namespace Bolt\\Twig;\nuse Bolt\\Entity\\Content;\nuse Bolt\\Entity\\Field\\Excerptable;\nuse Bolt\\Entity\\Field\\ImageField;\n+use Bolt\\Log\\LoggerTrait;\nuse Bolt\\Repository\\ContentRepository;\nuse Bolt\\Utils\\Excerpt;\nuse Bolt\\Utils\\Html;\n@@ -26,6 +27,8 @@ use Twig\\TwigFunction;\nclass ContentExtension extends AbstractExtension\n{\n+ use LoggerTrait;\n+\n/** @var UrlGeneratorInterface */\nprivate $urlGenerator;\n@@ -41,23 +44,18 @@ class ContentExtension extends AbstractExtension\n/** @var Request */\nprivate $request;\n- /** @var LoggerInterface */\n- private $logger;\n-\npublic function __construct(\nUrlGeneratorInterface $urlGenerator,\nContentRepository $contentRepository,\nCsrfTokenManagerInterface $csrfTokenManager,\nSecurity $security,\n- RequestStack $requestStack,\n- LoggerInterface $dbLogger\n+ RequestStack $requestStack\n) {\n$this->urlGenerator = $urlGenerator;\n$this->contentRepository = $contentRepository;\n$this->csrfTokenManager = $csrfTokenManager;\n$this->security = $security;\n$this->request = $requestStack->getCurrentRequest();\n- $this->logger = $dbLogger;\n}\n/**\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Set db logged as `synthetic: true` in `services_test.yaml`
|
95,144 |
17.02.2020 19:28:16
| -3,600 |
1803f0b6afcbec408f21e2245e368d8f40955d60
|
Use Loggertrait
|
[
{
"change_type": "MODIFY",
"old_path": "src/Canonical.php",
"new_path": "src/Canonical.php",
"diff": "@@ -5,7 +5,7 @@ declare(strict_types=1);\nnamespace Bolt;\nuse Bolt\\Configuration\\Config;\n-use Psr\\Log\\LoggerInterface;\n+use Bolt\\Log\\LoggerTrait;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\RequestStack;\nuse Symfony\\Component\\Routing\\Exception\\InvalidParameterException;\n@@ -13,6 +13,8 @@ use Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface;\nclass Canonical\n{\n+ use LoggerTrait;\n+\n/** @var Config */\nprivate $config;\n@@ -34,15 +36,11 @@ class Canonical\n/** @var string */\nprivate $path = null;\n- /** @var LoggerInterface */\n- private $logger;\n-\n- public function __construct(Config $config, UrlGeneratorInterface $urlGenerator, RequestStack $requestStack, LoggerInterface $dbLogger)\n+ public function __construct(Config $config, UrlGeneratorInterface $urlGenerator, RequestStack $requestStack)\n{\n$this->config = $config;\n$this->urlGenerator = $urlGenerator;\n$this->request = $requestStack->getCurrentRequest();\n- $this->logger = $dbLogger;\n$this->init();\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Security/LoginFormAuthenticator.php",
"new_path": "src/Security/LoginFormAuthenticator.php",
"diff": "@@ -5,10 +5,10 @@ declare(strict_types=1);\nnamespace Bolt\\Security;\nuse Bolt\\Entity\\User;\n+use Bolt\\Log\\LoggerTrait;\nuse Bolt\\Repository\\UserAuthTokenRepository;\nuse Bolt\\Repository\\UserRepository;\nuse Doctrine\\ORM\\EntityManagerInterface;\n-use Psr\\Log\\LoggerInterface;\nuse Symfony\\Component\\HttpFoundation\\RedirectResponse;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\Routing\\RouterInterface;\n@@ -25,6 +25,8 @@ use UAParser\\Parser;\nclass LoginFormAuthenticator extends AbstractFormLoginAuthenticator\n{\n+ use LoggerTrait;\n+\n/** @var UserRepository */\nprivate $userRepository;\n@@ -40,23 +42,18 @@ class LoginFormAuthenticator extends AbstractFormLoginAuthenticator\n/** @var EntityManagerInterface */\nprivate $em;\n- /** @var LoggerInterface */\n- private $logger;\n-\npublic function __construct(\nUserRepository $userRepository,\nRouterInterface $router,\nCsrfTokenManagerInterface $csrfTokenManager,\nUserPasswordEncoderInterface $passwordEncoder,\n- EntityManagerInterface $em,\n- LoggerInterface $dbLogger\n+ EntityManagerInterface $em\n) {\n$this->userRepository = $userRepository;\n$this->router = $router;\n$this->csrfTokenManager = $csrfTokenManager;\n$this->passwordEncoder = $passwordEncoder;\n$this->em = $em;\n- $this->logger = $dbLogger;\n}\nprotected function getLoginUrl()\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Security/LogoutListener.php",
"new_path": "src/Security/LogoutListener.php",
"diff": "@@ -5,8 +5,8 @@ declare(strict_types=1);\nnamespace Bolt\\Security;\nuse Bolt\\Entity\\User;\n+use Bolt\\Log\\LoggerTrait;\nuse Doctrine\\ORM\\EntityManagerInterface;\n-use Psr\\Log\\LoggerInterface;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\Response;\nuse Symfony\\Component\\Security\\Core\\Authentication\\Token\\TokenInterface;\n@@ -14,15 +14,13 @@ use Symfony\\Component\\Security\\Http\\Logout\\LogoutHandlerInterface;\nclass LogoutListener implements LogoutHandlerInterface\n{\n- private $em;\n+ use LoggerTrait;\n- /** @var LoggerInterface */\n- private $logger;\n+ private $em;\n- public function __construct(EntityManagerInterface $em, LoggerInterface $dbLogger)\n+ public function __construct(EntityManagerInterface $em)\n{\n$this->em = $em;\n- $this->logger = $dbLogger;\n}\npublic function logout(Request $request, Response $response, TokenInterface $token): void\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Use Loggertrait
|
95,144 |
17.02.2020 19:48:49
| -3,600 |
8a75a1d97a44883278e75a8b04a598a5cc027755
|
Add PHP 7.4 to travis, remove failing ones.
|
[
{
"change_type": "MODIFY",
"old_path": ".travis.yml",
"new_path": ".travis.yml",
"diff": "@@ -14,12 +14,7 @@ matrix:\ninclude:\n- php: 7.2\n- php: 7.3\n- - php: 7.4snapshot\n- - php: nightly\n- env: COMPOSER_FLAGS=\"--ignore-platform-reqs\"\n- allow_failures:\n- - php: 7.4snapshot\n- - php: nightly\n+ - php: 7.4\nbefore_install:\n- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo \"xdebug not available\"\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Add PHP 7.4 to travis, remove failing ones.
|
95,144 |
18.02.2020 22:03:44
| -3,600 |
caf27738f53f8f1d42bb6846c664c770bcc68ea8
|
Stop surplus logging from Canonical
|
[
{
"change_type": "MODIFY",
"old_path": "src/Canonical.php",
"new_path": "src/Canonical.php",
"diff": "@@ -5,7 +5,6 @@ declare(strict_types=1);\nnamespace Bolt;\nuse Bolt\\Configuration\\Config;\n-use Bolt\\Log\\LoggerTrait;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\RequestStack;\nuse Symfony\\Component\\Routing\\Exception\\InvalidParameterException;\n@@ -13,8 +12,6 @@ use Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface;\nclass Canonical\n{\n- use LoggerTrait;\n-\n/** @var Config */\nprivate $config;\n@@ -160,8 +157,8 @@ class Canonical\n$params\n);\n} catch (InvalidParameterException $e) {\n- $this->logger->error($e->getMessage(), $params);\n- $this->path = '/';\n+ // Just use the current URL /shrug\n+ $this->request->getUri();\n}\n}\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Stop surplus logging from Canonical
|
95,144 |
18.02.2020 22:16:35
| -3,600 |
a2f20b6b74a220d505df3af1d6d0346ee9922d0e
|
Replace Swiftmailer with Mailer
|
[
{
"change_type": "MODIFY",
"old_path": ".env.dist",
"new_path": ".env.dist",
"diff": "@@ -33,12 +33,9 @@ DATABASE_URL=sqlite:///%kernel.project_dir%/var/data/bolt.sqlite\n###< doctrine/doctrine-bundle ###\n-###> symfony/swiftmailer-bundle ###\n-# For Gmail as a transport, use: \"gmail://username:password@localhost\"\n-# For a generic SMTP server, use: \"smtp://localhost:25?encryption=&auth_mode=\"\n-# Delivery is disabled by default via \"null://localhost\"\n-MAILER_URL=null://localhost\n-###< symfony/swiftmailer-bundle ###\n+###> symfony/mailer ###\n+# MAILER_DSN=smtp://localhost\n+###< symfony/mailer ###\n###> nelmio/cors-bundle ###\nCORS_ALLOW_ORIGIN=^https?://localhost(:[0-9]+)?$\n"
},
{
"change_type": "MODIFY",
"old_path": "composer.json",
"new_path": "composer.json",
"diff": "\"symfony/form\": \"^4.4\",\n\"symfony/framework-bundle\": \"^4.4\",\n\"symfony/http-client\": \"^4.4\",\n+ \"symfony/mailer\": \"^4.4\",\n\"symfony/maker-bundle\": \"^1.14\",\n\"symfony/monolog-bridge\": \"^4.4\",\n\"symfony/monolog-bundle\": \"^3.5\",\n\"symfony/security-bundle\": \"^4.4\",\n\"symfony/serializer\": \"^4.4\",\n\"symfony/stopwatch\": \"^4.4\",\n- \"symfony/swiftmailer-bundle\": \"^3.4\",\n\"symfony/translation\": \"^4.4\",\n\"symfony/twig-bundle\": \"^4.4\",\n\"symfony/validator\": \"^4.4\",\n"
},
{
"change_type": "MODIFY",
"old_path": "config/bundles.php",
"new_path": "config/bundles.php",
"diff": "@@ -16,7 +16,6 @@ return [\nSymfony\\Bundle\\MakerBundle\\MakerBundle::class => ['dev' => true, 'local' => true],\nSymfony\\Bundle\\MonologBundle\\MonologBundle::class => ['all' => true],\nSymfony\\Bundle\\SecurityBundle\\SecurityBundle::class => ['all' => true],\n- Symfony\\Bundle\\SwiftmailerBundle\\SwiftmailerBundle::class => ['all' => true],\nSymfony\\Bundle\\TwigBundle\\TwigBundle::class => ['all' => true],\nSymfony\\Bundle\\WebProfilerBundle\\WebProfilerBundle::class => ['dev' => true, 'local' => true],\nSymfony\\Bundle\\WebServerBundle\\WebServerBundle::class => ['dev' => true, 'test' => true, 'local' => true],\n"
},
{
"change_type": "DELETE",
"old_path": "config/packages/dev/swiftmailer.yaml",
"new_path": null,
"diff": "-# See https://symfony.com/doc/current/email/dev_environment.html\n-swiftmailer:\n- # send all emails to a specific address\n- #delivery_addresses: ['me@example.com']\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "config/packages/mailer.yaml",
"diff": "+framework:\n+ mailer:\n+ dsn: '%env(MAILER_DSN)%'\n"
},
{
"change_type": "DELETE",
"old_path": "config/packages/swiftmailer.yaml",
"new_path": null,
"diff": "-swiftmailer:\n- url: '%env(MAILER_URL)%'\n- spool: { type: 'memory' }\n"
},
{
"change_type": "DELETE",
"old_path": "config/packages/test/swiftmailer.yaml",
"new_path": null,
"diff": "-swiftmailer:\n- disable_delivery: true\n"
},
{
"change_type": "MODIFY",
"old_path": "phpunit.xml.dist",
"new_path": "phpunit.xml.dist",
"diff": "<env name=\"LOCO_PROJECT_API_KEY\" value=\"\"/>\n<!-- ###- php-translation/loco-adapter ### -->\n- <!-- ###+ symfony/swiftmailer-bundle ### -->\n- <!-- For Gmail as a transport, use: \"gmail://username:password@localhost\" -->\n- <!-- For a generic SMTP server, use: \"smtp://localhost:25?encryption=&auth_mode=\" -->\n- <!-- Delivery is disabled by default via \"null://localhost\" -->\n- <env name=\"MAILER_URL\" value=\"null://localhost\"/>\n- <!-- ###- symfony/swiftmailer-bundle ### -->\n+ <!-- ###+ symfony/mailer ### -->\n+ <!-- MAILER_DSN=smtp://localhost -->\n+ <!-- ###- symfony/mailer ### -->\n</php>\n<testsuites>\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Command/ListUsersCommand.php",
"new_path": "src/Command/ListUsersCommand.php",
"diff": "@@ -12,6 +12,8 @@ use Symfony\\Component\\Console\\Input\\InputOption;\nuse Symfony\\Component\\Console\\Output\\BufferedOutput;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\nuse Symfony\\Component\\Console\\Style\\SymfonyStyle;\n+use Symfony\\Component\\Mailer\\MailerInterface;\n+use Symfony\\Component\\Mime\\Email;\n/**\n* A console command that lists all the existing users.\n@@ -35,7 +37,7 @@ class ListUsersCommand extends Command\nprivate $emailSender;\nprivate $users;\n- public function __construct(\\Swift_Mailer $mailer, $emailSender, UserRepository $users)\n+ public function __construct(MailerInterface $mailer, $emailSender, UserRepository $users)\n{\nparent::__construct();\n@@ -125,13 +127,12 @@ HELP\n*/\nprivate function sendReport(string $contents, string $recipient): void\n{\n- // See https://symfony.com/doc/current/cookbook/email/email.html\n- $message = $this->mailer->createMessage()\n- ->setSubject(sprintf('app:list-users report (%s)', date('Y-m-d H:i:s')))\n- ->setFrom($this->emailSender)\n- ->setTo($recipient)\n- ->setBody($contents, 'text/plain');\n-\n- $this->mailer->send($message);\n+ $email = (new Email())\n+ ->from($this->emailSender)\n+ ->to($recipient)\n+ ->subject(sprintf('app:list-users report (%s)', date('Y-m-d H:i:s')))\n+ ->text($contents);\n+\n+ $this->mailer->send($email);\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "symfony.lock",
"new_path": "symfony.lock",
"diff": "\"version\": \"1.1.2\"\n},\n\"egulias/email-validator\": {\n- \"version\": \"2.1.13\"\n+ \"version\": \"2.1.17\"\n},\n\"embed/embed\": {\n\"version\": \"v3.4.2\"\n\"phpcs.xml.dist\"\n]\n},\n- \"swiftmailer/swiftmailer\": {\n- \"version\": \"v6.2.3\"\n- },\n\"symfony/asset\": {\n\"version\": \"v4.4.2\"\n},\n\"symfony/intl\": {\n\"version\": \"v4.4.2\"\n},\n+ \"symfony/mailer\": {\n+ \"version\": \"4.3\",\n+ \"recipe\": {\n+ \"repo\": \"github.com/symfony/recipes\",\n+ \"branch\": \"master\",\n+ \"version\": \"4.3\",\n+ \"ref\": \"15658c2a0176cda2e7dba66276a2030b52bd81b2\"\n+ },\n+ \"files\": [\n+ \"config/packages/mailer.yaml\"\n+ ]\n+ },\n\"symfony/maker-bundle\": {\n\"version\": \"1.0\",\n\"recipe\": {\n\"symfony/polyfill-ctype\": {\n\"version\": \"v1.13.1\"\n},\n- \"symfony/polyfill-iconv\": {\n- \"version\": \"v1.13.1\"\n- },\n\"symfony/polyfill-intl-grapheme\": {\n\"version\": \"v1.13.1\"\n},\n\"symfony/string\": {\n\"version\": \"v5.0.2\"\n},\n- \"symfony/swiftmailer-bundle\": {\n- \"version\": \"2.5\",\n- \"recipe\": {\n- \"repo\": \"github.com/symfony/recipes\",\n- \"branch\": \"master\",\n- \"version\": \"2.5\",\n- \"ref\": \"ae4d22af30bbd484506bc1817c5a3ef72c855b93\"\n- },\n- \"files\": [\n- \"config/packages/dev/swiftmailer.yaml\",\n- \"config/packages/swiftmailer.yaml\",\n- \"config/packages/test/swiftmailer.yaml\"\n- ]\n- },\n\"symfony/translation\": {\n\"version\": \"3.3\",\n\"recipe\": {\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Replace Swiftmailer with Mailer
|
95,144 |
19.02.2020 07:56:15
| -3,600 |
fe5931367250691b57afa69d0184936f9523c258
|
Add migrations and `content_id` column to logging table
|
[
{
"change_type": "MODIFY",
"old_path": "composer.json",
"new_path": "composer.json",
"diff": "\"doctrine/doctrine-bundle\": \"^2.0\",\n\"doctrine/doctrine-cache-bundle\": \"^1.4\",\n\"doctrine/doctrine-fixtures-bundle\": \"^3.3\",\n+ \"doctrine/doctrine-migrations-bundle\": \"^2.1\",\n\"doctrine/orm\": \"^2.7\",\n\"drupol/composer-packages\": \"^1.1\",\n\"embed/embed\": \"^3.4\",\n"
},
{
"change_type": "MODIFY",
"old_path": "config/bundles.php",
"new_path": "config/bundles.php",
"diff": "@@ -6,6 +6,7 @@ return [\nDoctrine\\Bundle\\DoctrineBundle\\DoctrineBundle::class => ['all' => true],\nDoctrine\\Bundle\\DoctrineCacheBundle\\DoctrineCacheBundle::class => ['all' => true],\nDoctrine\\Bundle\\FixturesBundle\\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true, 'local' => true],\n+ Doctrine\\Bundle\\MigrationsBundle\\DoctrineMigrationsBundle::class => ['all' => true],\nHttp\\HttplugBundle\\HttplugBundle::class => ['dev' => true, 'local' => true],\nKnp\\Bundle\\MenuBundle\\KnpMenuBundle::class => ['all' => true],\nKnp\\DoctrineBehaviors\\Bundle\\DoctrineBehaviorsBundle::class => ['all' => true],\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "config/packages/doctrine_migrations.yaml",
"diff": "+doctrine_migrations:\n+ dir_name: '%kernel.project_dir%/src/Migrations'\n+\n+ # Possible values: \"BY_YEAR\", \"BY_YEAR_AND_MONTH\", false\n+ organize_migrations: false\n+\n+ # Run all migrations in a transaction.\n+ all_or_nothing: false\n"
},
{
"change_type": "MODIFY",
"old_path": "config/services.yaml",
"new_path": "config/services.yaml",
"diff": "@@ -25,7 +25,7 @@ services:\n# this creates a service per class whose id is the fully-qualified class name\nBolt\\:\nresource: '../src/*'\n- exclude: '../src/{Entity,Exception,Kernel.php}'\n+ exclude: '../src/{Entity,Exception,Migrations,Kernel.php}'\n# controllers are imported separately to make sure services can be injected\n# as action arguments even if you don't extend any base controller class\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Entity/Log.php",
"new_path": "src/Entity/Log.php",
"diff": "@@ -55,6 +55,11 @@ class Log\n*/\nprivate $user;\n+ /**\n+ * @ORM\\Column(type=\"content\", type=\"integer\", nullable=true)\n+ */\n+ private $content;\n+\n/**\n* @ORM\\Column(name=\"location\", type=\"array\", nullable=true)\n*/\n@@ -166,4 +171,15 @@ class Log\n$this->user = $user;\nreturn $this;\n}\n+\n+ public function getContent(): ?int\n+ {\n+ return $this->content;\n+ }\n+\n+ public function setContent(integer $content): self\n+ {\n+ $this->content = $content;\n+ return $this;\n+ }\n}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "src/Migrations/Version20200219064805.php",
"diff": "+<?php\n+\n+declare(strict_types=1);\n+\n+namespace Application\\Migrations;\n+\n+use Doctrine\\DBAL\\Schema\\Schema;\n+use Doctrine\\Migrations\\AbstractMigration;\n+\n+/**\n+ * Auto-generated Migration: Please modify to your needs!\n+ */\n+final class Version20200219064805 extends AbstractMigration\n+{\n+ public function getDescription() : string\n+ {\n+ return '';\n+ }\n+\n+ public function up(Schema $schema) : void\n+ {\n+ // this up() migration is auto-generated, please modify it to your needs\n+ $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'sqlite', 'Migration can only be executed safely on \\'sqlite\\'.');\n+\n+ $this->addSql('DROP INDEX IDX_3431ED74AF0465EA');\n+ $this->addSql('DROP INDEX IDX_3431ED74A3934190');\n+ $this->addSql('DROP INDEX name_idx');\n+ $this->addSql('DROP INDEX group_idx');\n+ $this->addSql('CREATE TEMPORARY TABLE __temp__bolt_relation AS SELECT id, from_content_id, to_content_id, name, position, \"group\" FROM bolt_relation');\n+ $this->addSql('DROP TABLE bolt_relation');\n+ $this->addSql('CREATE TABLE bolt_relation (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, from_content_id INTEGER NOT NULL, to_content_id INTEGER NOT NULL, name VARCHAR(191) NOT NULL COLLATE BINARY, position INTEGER NOT NULL, \"group\" VARCHAR(191) NOT NULL COLLATE BINARY, CONSTRAINT FK_3431ED74AF0465EA FOREIGN KEY (from_content_id) REFERENCES bolt_content (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_3431ED74A3934190 FOREIGN KEY (to_content_id) REFERENCES bolt_content (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)');\n+ $this->addSql('INSERT INTO bolt_relation (id, from_content_id, to_content_id, name, position, \"group\") SELECT id, from_content_id, to_content_id, name, position, \"group\" FROM __temp__bolt_relation');\n+ $this->addSql('DROP TABLE __temp__bolt_relation');\n+ $this->addSql('CREATE INDEX IDX_3431ED74AF0465EA ON bolt_relation (from_content_id)');\n+ $this->addSql('CREATE INDEX IDX_3431ED74A3934190 ON bolt_relation (to_content_id)');\n+ $this->addSql('CREATE INDEX name_idx ON bolt_relation (name)');\n+ $this->addSql('CREATE INDEX group_idx ON bolt_relation (\"group\")');\n+ $this->addSql('DROP INDEX IDX_C5BCC03C9557E6F6');\n+ $this->addSql('DROP INDEX IDX_C5BCC03C84A0A3ED');\n+ $this->addSql('CREATE TEMPORARY TABLE __temp__bolt_taxonomy_content AS SELECT taxonomy_id, content_id FROM bolt_taxonomy_content');\n+ $this->addSql('DROP TABLE bolt_taxonomy_content');\n+ $this->addSql('CREATE TABLE bolt_taxonomy_content (taxonomy_id INTEGER NOT NULL, content_id INTEGER NOT NULL, PRIMARY KEY(taxonomy_id, content_id), CONSTRAINT FK_C5BCC03C9557E6F6 FOREIGN KEY (taxonomy_id) REFERENCES bolt_taxonomy (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_C5BCC03C84A0A3ED FOREIGN KEY (content_id) REFERENCES bolt_content (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)');\n+ $this->addSql('INSERT INTO bolt_taxonomy_content (taxonomy_id, content_id) SELECT taxonomy_id, content_id FROM __temp__bolt_taxonomy_content');\n+ $this->addSql('DROP TABLE __temp__bolt_taxonomy_content');\n+ $this->addSql('CREATE INDEX IDX_C5BCC03C9557E6F6 ON bolt_taxonomy_content (taxonomy_id)');\n+ $this->addSql('CREATE INDEX IDX_C5BCC03C84A0A3ED ON bolt_taxonomy_content (content_id)');\n+ $this->addSql('DROP INDEX IDX_F5AB2E9CF675F31B');\n+ $this->addSql('DROP INDEX content_type_idx');\n+ $this->addSql('DROP INDEX status_idx');\n+ $this->addSql('CREATE TEMPORARY TABLE __temp__bolt_content AS SELECT id, author_id, content_type, status, created_at, modified_at, published_at, depublished_at FROM bolt_content');\n+ $this->addSql('DROP TABLE bolt_content');\n+ $this->addSql('CREATE TABLE bolt_content (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, author_id INTEGER DEFAULT NULL, content_type VARCHAR(191) NOT NULL COLLATE BINARY, status VARCHAR(191) NOT NULL COLLATE BINARY, created_at DATETIME NOT NULL, modified_at DATETIME DEFAULT NULL, published_at DATETIME DEFAULT NULL, depublished_at DATETIME DEFAULT NULL, CONSTRAINT FK_F5AB2E9CF675F31B FOREIGN KEY (author_id) REFERENCES bolt_user (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');\n+ $this->addSql('INSERT INTO bolt_content (id, author_id, content_type, status, created_at, modified_at, published_at, depublished_at) SELECT id, author_id, content_type, status, created_at, modified_at, published_at, depublished_at FROM __temp__bolt_content');\n+ $this->addSql('DROP TABLE __temp__bolt_content');\n+ $this->addSql('CREATE INDEX IDX_F5AB2E9CF675F31B ON bolt_content (author_id)');\n+ $this->addSql('CREATE INDEX content_type_idx ON bolt_content (content_type)');\n+ $this->addSql('CREATE INDEX status_idx ON bolt_content (status)');\n+ $this->addSql('DROP INDEX IDX_4A2EBBE584A0A3ED');\n+ $this->addSql('DROP INDEX IDX_4A2EBBE5727ACA70');\n+ $this->addSql('CREATE TEMPORARY TABLE __temp__bolt_field AS SELECT id, content_id, parent_id, name, sortorder, version, type FROM bolt_field');\n+ $this->addSql('DROP TABLE bolt_field');\n+ $this->addSql('CREATE TABLE bolt_field (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, content_id INTEGER NOT NULL, parent_id INTEGER DEFAULT NULL, name VARCHAR(191) NOT NULL COLLATE BINARY, sortorder INTEGER NOT NULL, version INTEGER DEFAULT NULL, type VARCHAR(191) NOT NULL COLLATE BINARY, CONSTRAINT FK_4A2EBBE584A0A3ED FOREIGN KEY (content_id) REFERENCES bolt_content (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_4A2EBBE5727ACA70 FOREIGN KEY (parent_id) REFERENCES bolt_field (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');\n+ $this->addSql('INSERT INTO bolt_field (id, content_id, parent_id, name, sortorder, version, type) SELECT id, content_id, parent_id, name, sortorder, version, type FROM __temp__bolt_field');\n+ $this->addSql('DROP TABLE __temp__bolt_field');\n+ $this->addSql('CREATE INDEX IDX_4A2EBBE584A0A3ED ON bolt_field (content_id)');\n+ $this->addSql('CREATE INDEX IDX_4A2EBBE5727ACA70 ON bolt_field (parent_id)');\n+ $this->addSql('DROP INDEX IDX_5C60C0542C2AC5D3');\n+ $this->addSql('DROP INDEX field_translation_unique_translation');\n+ $this->addSql('CREATE TEMPORARY TABLE __temp__bolt_field_translation AS SELECT id, translatable_id, value, locale FROM bolt_field_translation');\n+ $this->addSql('DROP TABLE bolt_field_translation');\n+ $this->addSql('CREATE TABLE bolt_field_translation (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, translatable_id INTEGER DEFAULT NULL, value CLOB NOT NULL COLLATE BINARY --(DC2Type:json)\n+ , locale VARCHAR(5) NOT NULL COLLATE BINARY, CONSTRAINT FK_5C60C0542C2AC5D3 FOREIGN KEY (translatable_id) REFERENCES bolt_field (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)');\n+ $this->addSql('INSERT INTO bolt_field_translation (id, translatable_id, value, locale) SELECT id, translatable_id, value, locale FROM __temp__bolt_field_translation');\n+ $this->addSql('DROP TABLE __temp__bolt_field_translation');\n+ $this->addSql('CREATE INDEX IDX_5C60C0542C2AC5D3 ON bolt_field_translation (translatable_id)');\n+ $this->addSql('CREATE UNIQUE INDEX field_translation_unique_translation ON bolt_field_translation (translatable_id, locale)');\n+ $this->addSql('DROP INDEX UNIQ_8B90D313A76ED395');\n+ $this->addSql('CREATE TEMPORARY TABLE __temp__bolt_user_auth_token AS SELECT id, user_id, useragent, validity FROM bolt_user_auth_token');\n+ $this->addSql('DROP TABLE bolt_user_auth_token');\n+ $this->addSql('CREATE TABLE bolt_user_auth_token (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, useragent VARCHAR(255) NOT NULL COLLATE BINARY, validity DATETIME NOT NULL, CONSTRAINT FK_8B90D313A76ED395 FOREIGN KEY (user_id) REFERENCES bolt_user (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');\n+ $this->addSql('INSERT INTO bolt_user_auth_token (id, user_id, useragent, validity) SELECT id, user_id, useragent, validity FROM __temp__bolt_user_auth_token');\n+ $this->addSql('DROP TABLE __temp__bolt_user_auth_token');\n+ $this->addSql('CREATE UNIQUE INDEX UNIQ_8B90D313A76ED395 ON bolt_user_auth_token (user_id)');\n+ $this->addSql('ALTER TABLE bolt_log ADD COLUMN content INTEGER DEFAULT NULL');\n+ $this->addSql('DROP INDEX IDX_7BF75FB1F675F31B');\n+ $this->addSql('CREATE TEMPORARY TABLE __temp__bolt_media AS SELECT id, author_id, location, path, filename, type, width, height, filesize, crop_x, crop_y, crop_zoom, created_at, modified_at, title, description, original_filename, copyright FROM bolt_media');\n+ $this->addSql('DROP TABLE bolt_media');\n+ $this->addSql('CREATE TABLE bolt_media (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, author_id INTEGER DEFAULT NULL, location VARCHAR(191) NOT NULL COLLATE BINARY, path CLOB NOT NULL COLLATE BINARY, filename VARCHAR(191) NOT NULL COLLATE BINARY, type VARCHAR(191) NOT NULL COLLATE BINARY, width INTEGER DEFAULT NULL, height INTEGER DEFAULT NULL, filesize INTEGER DEFAULT NULL, crop_x INTEGER DEFAULT NULL, crop_y INTEGER DEFAULT NULL, crop_zoom DOUBLE PRECISION DEFAULT NULL, created_at DATETIME NOT NULL, modified_at DATETIME NOT NULL, title VARCHAR(191) DEFAULT NULL COLLATE BINARY, description VARCHAR(1000) DEFAULT NULL COLLATE BINARY, original_filename VARCHAR(1000) DEFAULT NULL COLLATE BINARY, copyright VARCHAR(191) DEFAULT NULL COLLATE BINARY, CONSTRAINT FK_7BF75FB1F675F31B FOREIGN KEY (author_id) REFERENCES bolt_user (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');\n+ $this->addSql('INSERT INTO bolt_media (id, author_id, location, path, filename, type, width, height, filesize, crop_x, crop_y, crop_zoom, created_at, modified_at, title, description, original_filename, copyright) SELECT id, author_id, location, path, filename, type, width, height, filesize, crop_x, crop_y, crop_zoom, created_at, modified_at, title, description, original_filename, copyright FROM __temp__bolt_media');\n+ $this->addSql('DROP TABLE __temp__bolt_media');\n+ $this->addSql('CREATE INDEX IDX_7BF75FB1F675F31B ON bolt_media (author_id)');\n+ }\n+\n+ public function down(Schema $schema) : void\n+ {\n+ // this down() migration is auto-generated, please modify it to your needs\n+ $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'sqlite', 'Migration can only be executed safely on \\'sqlite\\'.');\n+\n+ $this->addSql('DROP INDEX IDX_F5AB2E9CF675F31B');\n+ $this->addSql('DROP INDEX content_type_idx');\n+ $this->addSql('DROP INDEX status_idx');\n+ $this->addSql('CREATE TEMPORARY TABLE __temp__bolt_content AS SELECT id, author_id, content_type, status, created_at, modified_at, published_at, depublished_at FROM bolt_content');\n+ $this->addSql('DROP TABLE bolt_content');\n+ $this->addSql('CREATE TABLE bolt_content (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, author_id INTEGER DEFAULT NULL, content_type VARCHAR(191) NOT NULL, status VARCHAR(191) NOT NULL, created_at DATETIME NOT NULL, modified_at DATETIME DEFAULT NULL, published_at DATETIME DEFAULT NULL, depublished_at DATETIME DEFAULT NULL)');\n+ $this->addSql('INSERT INTO bolt_content (id, author_id, content_type, status, created_at, modified_at, published_at, depublished_at) SELECT id, author_id, content_type, status, created_at, modified_at, published_at, depublished_at FROM __temp__bolt_content');\n+ $this->addSql('DROP TABLE __temp__bolt_content');\n+ $this->addSql('CREATE INDEX IDX_F5AB2E9CF675F31B ON bolt_content (author_id)');\n+ $this->addSql('CREATE INDEX content_type_idx ON bolt_content (content_type)');\n+ $this->addSql('CREATE INDEX status_idx ON bolt_content (status)');\n+ $this->addSql('DROP INDEX IDX_4A2EBBE584A0A3ED');\n+ $this->addSql('DROP INDEX IDX_4A2EBBE5727ACA70');\n+ $this->addSql('CREATE TEMPORARY TABLE __temp__bolt_field AS SELECT id, content_id, parent_id, name, sortorder, version, type FROM bolt_field');\n+ $this->addSql('DROP TABLE bolt_field');\n+ $this->addSql('CREATE TABLE bolt_field (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, content_id INTEGER NOT NULL, parent_id INTEGER DEFAULT NULL, name VARCHAR(191) NOT NULL, sortorder INTEGER NOT NULL, version INTEGER DEFAULT NULL, type VARCHAR(191) NOT NULL)');\n+ $this->addSql('INSERT INTO bolt_field (id, content_id, parent_id, name, sortorder, version, type) SELECT id, content_id, parent_id, name, sortorder, version, type FROM __temp__bolt_field');\n+ $this->addSql('DROP TABLE __temp__bolt_field');\n+ $this->addSql('CREATE INDEX IDX_4A2EBBE584A0A3ED ON bolt_field (content_id)');\n+ $this->addSql('CREATE INDEX IDX_4A2EBBE5727ACA70 ON bolt_field (parent_id)');\n+ $this->addSql('DROP INDEX IDX_5C60C0542C2AC5D3');\n+ $this->addSql('DROP INDEX field_translation_unique_translation');\n+ $this->addSql('CREATE TEMPORARY TABLE __temp__bolt_field_translation AS SELECT id, translatable_id, value, locale FROM bolt_field_translation');\n+ $this->addSql('DROP TABLE bolt_field_translation');\n+ $this->addSql('CREATE TABLE bolt_field_translation (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, translatable_id INTEGER DEFAULT NULL, value CLOB NOT NULL --(DC2Type:json)\n+ , locale VARCHAR(5) NOT NULL)');\n+ $this->addSql('INSERT INTO bolt_field_translation (id, translatable_id, value, locale) SELECT id, translatable_id, value, locale FROM __temp__bolt_field_translation');\n+ $this->addSql('DROP TABLE __temp__bolt_field_translation');\n+ $this->addSql('CREATE INDEX IDX_5C60C0542C2AC5D3 ON bolt_field_translation (translatable_id)');\n+ $this->addSql('CREATE UNIQUE INDEX field_translation_unique_translation ON bolt_field_translation (translatable_id, locale)');\n+ $this->addSql('CREATE TEMPORARY TABLE __temp__bolt_log AS SELECT id, message, context, level, level_name, created_at, extra, user, location FROM bolt_log');\n+ $this->addSql('DROP TABLE bolt_log');\n+ $this->addSql('CREATE TABLE bolt_log (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, message CLOB NOT NULL, context CLOB DEFAULT NULL --(DC2Type:array)\n+ , level SMALLINT NOT NULL, level_name VARCHAR(50) NOT NULL, created_at DATETIME NOT NULL, extra CLOB DEFAULT NULL --(DC2Type:array)\n+ , user CLOB DEFAULT NULL --(DC2Type:array)\n+ , location CLOB DEFAULT NULL --(DC2Type:array)\n+ )');\n+ $this->addSql('INSERT INTO bolt_log (id, message, context, level, level_name, created_at, extra, user, location) SELECT id, message, context, level, level_name, created_at, extra, user, location FROM __temp__bolt_log');\n+ $this->addSql('DROP TABLE __temp__bolt_log');\n+ $this->addSql('DROP INDEX IDX_7BF75FB1F675F31B');\n+ $this->addSql('CREATE TEMPORARY TABLE __temp__bolt_media AS SELECT id, author_id, location, path, filename, type, width, height, filesize, crop_x, crop_y, crop_zoom, created_at, modified_at, title, description, original_filename, copyright FROM bolt_media');\n+ $this->addSql('DROP TABLE bolt_media');\n+ $this->addSql('CREATE TABLE bolt_media (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, author_id INTEGER DEFAULT NULL, location VARCHAR(191) NOT NULL, path CLOB NOT NULL, filename VARCHAR(191) NOT NULL, type VARCHAR(191) NOT NULL, width INTEGER DEFAULT NULL, height INTEGER DEFAULT NULL, filesize INTEGER DEFAULT NULL, crop_x INTEGER DEFAULT NULL, crop_y INTEGER DEFAULT NULL, crop_zoom DOUBLE PRECISION DEFAULT NULL, created_at DATETIME NOT NULL, modified_at DATETIME NOT NULL, title VARCHAR(191) DEFAULT NULL, description VARCHAR(1000) DEFAULT NULL, original_filename VARCHAR(1000) DEFAULT NULL, copyright VARCHAR(191) DEFAULT NULL)');\n+ $this->addSql('INSERT INTO bolt_media (id, author_id, location, path, filename, type, width, height, filesize, crop_x, crop_y, crop_zoom, created_at, modified_at, title, description, original_filename, copyright) SELECT id, author_id, location, path, filename, type, width, height, filesize, crop_x, crop_y, crop_zoom, created_at, modified_at, title, description, original_filename, copyright FROM __temp__bolt_media');\n+ $this->addSql('DROP TABLE __temp__bolt_media');\n+ $this->addSql('CREATE INDEX IDX_7BF75FB1F675F31B ON bolt_media (author_id)');\n+ $this->addSql('DROP INDEX IDX_3431ED74AF0465EA');\n+ $this->addSql('DROP INDEX IDX_3431ED74A3934190');\n+ $this->addSql('DROP INDEX name_idx');\n+ $this->addSql('DROP INDEX group_idx');\n+ $this->addSql('CREATE TEMPORARY TABLE __temp__bolt_relation AS SELECT id, from_content_id, to_content_id, name, position, \"group\" FROM bolt_relation');\n+ $this->addSql('DROP TABLE bolt_relation');\n+ $this->addSql('CREATE TABLE bolt_relation (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, from_content_id INTEGER NOT NULL, to_content_id INTEGER NOT NULL, name VARCHAR(191) NOT NULL, position INTEGER NOT NULL, \"group\" VARCHAR(191) NOT NULL)');\n+ $this->addSql('INSERT INTO bolt_relation (id, from_content_id, to_content_id, name, position, \"group\") SELECT id, from_content_id, to_content_id, name, position, \"group\" FROM __temp__bolt_relation');\n+ $this->addSql('DROP TABLE __temp__bolt_relation');\n+ $this->addSql('CREATE INDEX IDX_3431ED74AF0465EA ON bolt_relation (from_content_id)');\n+ $this->addSql('CREATE INDEX IDX_3431ED74A3934190 ON bolt_relation (to_content_id)');\n+ $this->addSql('CREATE INDEX name_idx ON bolt_relation (name)');\n+ $this->addSql('CREATE INDEX group_idx ON bolt_relation (\"group\")');\n+ $this->addSql('DROP INDEX IDX_C5BCC03C9557E6F6');\n+ $this->addSql('DROP INDEX IDX_C5BCC03C84A0A3ED');\n+ $this->addSql('CREATE TEMPORARY TABLE __temp__bolt_taxonomy_content AS SELECT taxonomy_id, content_id FROM bolt_taxonomy_content');\n+ $this->addSql('DROP TABLE bolt_taxonomy_content');\n+ $this->addSql('CREATE TABLE bolt_taxonomy_content (taxonomy_id INTEGER NOT NULL, content_id INTEGER NOT NULL, PRIMARY KEY(taxonomy_id, content_id))');\n+ $this->addSql('INSERT INTO bolt_taxonomy_content (taxonomy_id, content_id) SELECT taxonomy_id, content_id FROM __temp__bolt_taxonomy_content');\n+ $this->addSql('DROP TABLE __temp__bolt_taxonomy_content');\n+ $this->addSql('CREATE INDEX IDX_C5BCC03C9557E6F6 ON bolt_taxonomy_content (taxonomy_id)');\n+ $this->addSql('CREATE INDEX IDX_C5BCC03C84A0A3ED ON bolt_taxonomy_content (content_id)');\n+ $this->addSql('DROP INDEX UNIQ_8B90D313A76ED395');\n+ $this->addSql('CREATE TEMPORARY TABLE __temp__bolt_user_auth_token AS SELECT id, user_id, useragent, validity FROM bolt_user_auth_token');\n+ $this->addSql('DROP TABLE bolt_user_auth_token');\n+ $this->addSql('CREATE TABLE bolt_user_auth_token (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, useragent VARCHAR(255) NOT NULL, validity DATETIME NOT NULL)');\n+ $this->addSql('INSERT INTO bolt_user_auth_token (id, user_id, useragent, validity) SELECT id, user_id, useragent, validity FROM __temp__bolt_user_auth_token');\n+ $this->addSql('DROP TABLE __temp__bolt_user_auth_token');\n+ $this->addSql('CREATE UNIQUE INDEX UNIQ_8B90D313A76ED395 ON bolt_user_auth_token (user_id)');\n+ }\n+}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Add migrations and `content_id` column to logging table
|
95,144 |
19.02.2020 19:28:48
| -3,600 |
5c5bbbecdbded90abd8d454b86aa068062134f63
|
Prepare release 4.0.0-rc.4
|
[
{
"change_type": "MODIFY",
"old_path": "package-lock.json",
"new_path": "package-lock.json",
"diff": "{\n\"name\": \"bolt\",\n- \"version\": \"4.0.0-beta.5\",\n+ \"version\": \"4.0.0-rc.4\",\n\"lockfileVersion\": 1,\n\"requires\": true,\n\"dependencies\": {\n\"dev\": true\n},\n\"@fortawesome/fontawesome-free\": {\n- \"version\": \"5.12.0\",\n- \"resolved\": \"https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.12.0.tgz\",\n- \"integrity\": \"sha512-vKDJUuE2GAdBERaQWmmtsciAMzjwNrROXA5KTGSZvayAsmuTGjam5z6QNqNPCwDfVljLWuov1nEC3mEQf/n6fQ==\",\n+ \"version\": \"5.12.1\",\n+ \"resolved\": \"https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.12.1.tgz\",\n+ \"integrity\": \"sha512-ZtjIIFplxncqxvogq148C3hBLQE+W3iJ8E4UvJ09zIJUgzwLcROsWwFDErVSXY2Plzao5J9KUYNHKHMEUYDMKw==\",\n\"dev\": true\n},\n\"@hapi/address\": {\n\"integrity\": \"sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==\"\n},\n\"dropzone\": {\n- \"version\": \"5.5.1\",\n- \"resolved\": \"https://registry.npmjs.org/dropzone/-/dropzone-5.5.1.tgz\",\n- \"integrity\": \"sha512-3VduRWLxx9hbVr42QieQN25mx/I61/mRdUSuxAmDGdDqZIN8qtP7tcKMa3KfpJjuGjOJGYYUzzeq6eGDnkzesA==\"\n+ \"version\": \"5.7.0\",\n+ \"resolved\": \"https://registry.npmjs.org/dropzone/-/dropzone-5.7.0.tgz\",\n+ \"integrity\": \"sha512-kOltiZXH5cO/72I22JjE+w6BoT6uaVLfWdFMsi1PMKFkU6BZWpqRwjnsRm0o6ANGTBuZar5Piu7m/CbKqRPiYg==\"\n},\n\"duplexer\": {\n\"version\": \"0.1.1\",\n\"dev\": true\n},\n\"eslint-plugin-vue\": {\n- \"version\": \"6.1.2\",\n- \"resolved\": \"https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-6.1.2.tgz\",\n- \"integrity\": \"sha512-M75oAB+2a/LNkLKRbeEaS07EjzjIUaV7/hYoHAfRFeeF8ZMmCbahUn8nQLsLP85mkar24+zDU3QW2iT1JRsACw==\",\n+ \"version\": \"6.2.1\",\n+ \"resolved\": \"https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-6.2.1.tgz\",\n+ \"integrity\": \"sha512-MiIDOotoWseIfLIfGeDzF6sDvHkVvGd2JgkvjyHtN3q4RoxdAXrAMuI3SXTOKatljgacKwpNAYShmcKZa4yZzw==\",\n\"dev\": true,\n\"requires\": {\n+ \"natural-compare\": \"^1.4.0\",\n\"semver\": \"^5.6.0\",\n\"vue-eslint-parser\": \"^7.0.0\"\n},\n}\n},\n\"vue-loader\": {\n- \"version\": \"15.8.3\",\n- \"resolved\": \"https://registry.npmjs.org/vue-loader/-/vue-loader-15.8.3.tgz\",\n- \"integrity\": \"sha512-yFksTFbhp+lxlm92DrKdpVIWMpranXnTEuGSc0oW+Gk43M9LWaAmBTnfj5+FCdve715mTHvo78IdaXf5TbiTJg==\",\n+ \"version\": \"15.9.0\",\n+ \"resolved\": \"https://registry.npmjs.org/vue-loader/-/vue-loader-15.9.0.tgz\",\n+ \"integrity\": \"sha512-FeDHvTSpwyLeF7LIV1PYkvqUQgTJ8UmOxhSlCyRSxaXCKk+M6NF4tDQsLsPPNeDPyR7TfRQ8MLg6v+8PsDV9xQ==\",\n\"requires\": {\n\"@vue/component-compiler-utils\": \"^3.1.0\",\n\"hash-sum\": \"^1.0.2\",\n"
},
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "{\n\"name\": \"bolt\",\n- \"version\": \"4.0.0-beta.5\",\n+ \"version\": \"4.0.0-rc.4\",\n\"homepage\": \"https://boltcms.io\",\n\"author\": \"Bob den Otter <bob@twokings.nl> (https://boltcms.io)\",\n\"license\": \"MIT\",\n\"system\"\n],\n\"bugs\": {\n- \"url\": \"https://github.com/bolt/four/issues\"\n+ \"url\": \"https://github.com/bolt/core/issues\"\n},\n\"main\": \"webpack.config.js\",\n\"directories\": {\n},\n\"repository\": {\n\"type\": \"git\",\n- \"url\": \"git://github.com/bolt/four.git\"\n+ \"url\": \"git://github.com/bolt/core.git\"\n},\n\"dependencies\": {\n\"@vue/cli-service\": \"^3.12.1\",\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/Async/UploadController.php",
"new_path": "src/Controller/Backend/Async/UploadController.php",
"diff": "@@ -88,7 +88,7 @@ class UploadController implements AsyncZoneInterface\nreturn $this->sanitiseFilename($name);\n});\n- // @todo Refactor file upload handler. See issue https://github.com/bolt/four/issues/402\n+ // @todo Refactor file upload handler. See issue https://github.com/bolt/core/issues/402\n/** @var File $result */\n$result = $uploadHandler->process($_FILES);\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/bundles/TranslationBundle/WebUI/base.html.twig",
"new_path": "templates/bundles/TranslationBundle/WebUI/base.html.twig",
"diff": "{% if not app.request.get('configName') %}\n<p>These are the translations used in Bolt. We rely on the community to expand on new\ntranslations, and keep them up to date. If you wish to participate, read the\n- <a href=\"https://github.com/bolt/four/wiki/Contribute-on-translations\">instructions here</a>.\n+ <a href=\"https://github.com/bolt/core/wiki/Contribute-on-translations\">instructions here</a>.\n</p>\n{% endif %}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Prepare release 4.0.0-rc.4
|
95,144 |
20.02.2020 14:19:02
| -3,600 |
01badeb25e121d4cf97b00003d3fc2afcd16b6b3
|
Ninja-edit `contenttypes.yaml`: Add `type: data` explanation
|
[
{
"change_type": "MODIFY",
"old_path": "config/bolt/contenttypes.yaml",
"new_path": "config/bolt/contenttypes.yaml",
"diff": "@@ -395,6 +395,7 @@ tests:\n# checkbox - integer - checkbox-field which is 1 (checked) or 0 (unchecked)\n# set - text (65kb) - Input type for sests. Group fields semantically into a combined set field.\n# collection - text (65kb) - Input type for collections. Add multiple fields of different types. Useful for lists.\n+# data - text (65kb) - Read-only field, useful for storing (raw) data provided by an external source.\n# Using YAML repeated nodes\n#\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Ninja-edit `contenttypes.yaml`: Add `type: data` explanation
|
95,144 |
20.02.2020 16:06:21
| -3,600 |
ad5abdea6e41a75b13a07c4f75b1bd1aaf43da75
|
ensure contenttypes have a slug
|
[
{
"change_type": "MODIFY",
"old_path": "src/Configuration/Parser/ContentTypesParser.php",
"new_path": "src/Configuration/Parser/ContentTypesParser.php",
"diff": "@@ -197,6 +197,10 @@ class ContentTypesParser extends BaseParser\n$groups = [];\n$acceptFileTypes = $this->generalConfig->get('accept_file_types');\n+ if (! isset($fields['slug'])) {\n+ $fields['slug'] = ['type' => 'slug'];\n+ }\n+\nforeach ($fields as $key => $field) {\n$this->parseField($key, $field, $acceptFileTypes, $currentGroup);\n// Convert array into FieldType\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Entity/Content.php",
"new_path": "src/Entity/Content.php",
"diff": "@@ -137,12 +137,14 @@ class Content\npublic function __construct(?ContentType $contentTypeDefinition = null)\n{\n$this->createdAt = new \\DateTime();\n+ $this->status = Statuses::DRAFT;\n$this->taxonomies = new ArrayCollection();\n$this->fields = new ArrayCollection();\nif ($contentTypeDefinition) {\n$this->setContentType($contentTypeDefinition->getSlug());\n$this->setDefinition($contentTypeDefinition);\n+ $this->setFieldValue('slug', '');\n}\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
ensure contenttypes have a slug
|
95,144 |
21.02.2020 06:50:36
| -3,600 |
3993dd0750c916e5245b7804215640ac955856ab
|
Allow for BaseExtension to get Storage\Query
|
[
{
"change_type": "ADD",
"old_path": null,
"new_path": "public/theme/leaf",
"diff": "+/Users/bob/Bolt/themedev/bolt-leaf-theme\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Event/Subscriber/ExtensionSubscriber.php",
"new_path": "src/Event/Subscriber/ExtensionSubscriber.php",
"diff": "@@ -5,6 +5,7 @@ declare(strict_types=1);\nnamespace Bolt\\Event\\Subscriber;\nuse Bolt\\Extension\\ExtensionRegistry;\n+use Bolt\\Storage\\Query;\nuse Doctrine\\ORM\\EntityManagerInterface;\nuse Symfony\\Component\\Console\\ConsoleEvents;\nuse Symfony\\Component\\Console\\Event\\ConsoleCommandEvent;\n@@ -23,13 +24,14 @@ class ExtensionSubscriber implements EventSubscriberInterface\n/** @var array */\nprivate $objects = [];\n- public function __construct(ContainerInterface $container, ExtensionRegistry $extensionRegistry, EntityManagerInterface $objectManager)\n+ public function __construct(ContainerInterface $container, ExtensionRegistry $extensionRegistry, EntityManagerInterface $objectManager, Query $query)\n{\n$this->extensionRegistry = $extensionRegistry;\n$this->objects = [\n'manager' => $objectManager,\n'container' => $container,\n+ 'query' => $query,\n];\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Extension/ServicesTrait.php",
"new_path": "src/Extension/ServicesTrait.php",
"diff": "@@ -5,6 +5,7 @@ declare(strict_types=1);\nnamespace Bolt\\Extension;\nuse Bolt\\Configuration\\Config;\n+use Bolt\\Storage\\Query;\nuse Bolt\\Widgets;\nuse Doctrine\\ORM\\EntityManagerInterface;\nuse Psr\\Container\\ContainerInterface;\n@@ -22,6 +23,9 @@ trait ServicesTrait\n/** @var ContainerInterface */\nprotected $container;\n+ /** @var Query */\n+ protected $query;\n+\n/**\n* Injects commonly used objects into the extension, for use by the\n* extension. Called from the listener.\n@@ -32,6 +36,7 @@ trait ServicesTrait\n{\n$this->entityManager = $objects['manager'];\n$this->container = $objects['container'];\n+ $this->query = $objects['query'];\n}\n/**\n@@ -113,4 +118,9 @@ trait ServicesTrait\n{\nreturn $this->container;\n}\n+\n+ public function getQuery(): Query\n+ {\n+ return $this->query;\n+ }\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Allow for BaseExtension to get Storage\Query
|
95,144 |
21.02.2020 06:54:48
| -3,600 |
a7604435e0b1dce72098194ae37a0d647046e9a3
|
Show proper exception when trying to set non-existing Field
|
[
{
"change_type": "MODIFY",
"old_path": "src/Entity/Content.php",
"new_path": "src/Entity/Content.php",
"diff": "@@ -453,6 +453,10 @@ class Content\npublic function addFieldByName(string $fieldName): void\n{\n+ if (! $this->hasFieldDefined($fieldName)) {\n+ throw new \\Exception(sprintf(\"Can't set Field '%s' of '%s'. Make sure the Field is defined in the %s ContentType.\", $fieldName, $this->getDefinition()->get('slug'), $this->getDefinition()->get('name')));\n+ }\n+\n$definition = $this->contentTypeDefinition->get('fields')->get($fieldName);\n$field = FieldRepository::factory($definition, $fieldName);\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Show proper exception when trying to set non-existing Field
|
95,144 |
21.02.2020 06:57:14
| -3,600 |
7c2029bcdc8dfacfc68c3729957c7bc47eb6857e
|
Make Request optional to allow using Storage\Query in a non-web context
|
[
{
"change_type": "MODIFY",
"old_path": "src/Storage/ContentQueryParser.php",
"new_path": "src/Storage/ContentQueryParser.php",
"diff": "@@ -434,7 +434,7 @@ class ContentQueryParser\n}\n}\n- public function getRequest(): Request\n+ public function getRequest(): ?Request\n{\nreturn $this->requestStack->getCurrentRequest();\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Storage/Handler/SelectQueryHandler.php",
"new_path": "src/Storage/Handler/SelectQueryHandler.php",
"diff": "@@ -61,12 +61,17 @@ class SelectQueryHandler\nreturn $this->createPaginator($request, $query, $amountPerPage);\n}\n- private function createPaginator(Request $request, Query $query, int $amountPerPage): Pagerfanta\n+ private function createPaginator(?Request $request, Query $query, int $amountPerPage): Pagerfanta\n{\n$paginator = new Pagerfanta(new DoctrineORMAdapter($query, true, true));\n$paginator->setMaxPerPage($amountPerPage);\n+ // If we don't have $request, we're likely not in a web context.\n+ if ($request) {\n$page = (int) $request->get('page', 1);\n+ } else {\n+ $page = 1;\n+ }\n// If we have multiple pagers on page, we shouldn't allow one of the\n// pagers to go over the maximum, thereby throwing an exception. In this\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Make Request optional to allow using Storage\Query in a non-web context
|
95,144 |
21.02.2020 07:42:47
| -3,600 |
0d04122e40fe35c46f336e2d9257b2cd75f1dcdf
|
Only list published content
|
[
{
"change_type": "MODIFY",
"old_path": "src/Controller/Frontend/ListingController.php",
"new_path": "src/Controller/Frontend/ListingController.php",
"diff": "@@ -45,7 +45,7 @@ class ListingController extends TwigAwareController implements FrontendZoneInter\n$page = (int) $request->query->get('page', 1);\n$amountPerPage = $contentType->get('listing_records');\n- $records = $this->query->getContent($contentTypeSlug)\n+ $records = $this->query->getContent($contentTypeSlug, ['status' => 'published'])\n->setMaxPerPage($amountPerPage)\n->setCurrentPage($page);\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Only list published content
|
95,144 |
21.02.2020 08:00:27
| -3,600 |
002a354f2f4c6d3c5277b725fa9731021a9a512b
|
Fix paging in backend
|
[
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/ContentOverviewController.php",
"new_path": "src/Controller/Backend/ContentOverviewController.php",
"diff": "@@ -23,6 +23,7 @@ class ContentOverviewController extends TwigAwareController implements BackendZo\npublic function overview(Request $request, Query $query, string $contentType = ''): Response\n{\n$contentTypeObject = ContentType::factory($contentType, $this->config->get('contenttypes'));\n+ $page = (int) $request->query->get('page', 1);\n$params = [\n'status' => '!unknown',\n@@ -42,7 +43,8 @@ class ContentOverviewController extends TwigAwareController implements BackendZo\n}\n$records = $query->getContentForTwig($contentType, $params)\n- ->setMaxPerPage($contentTypeObject->get('records_per_page'));\n+ ->setMaxPerPage($contentTypeObject->get('records_per_page'))\n+ ->setCurrentPage($page);\nreturn $this->renderTemplate('@bolt/content/listing.html.twig', [\n'contentType' => $contentTypeObject,\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Fix paging in backend
|
95,144 |
21.02.2020 15:41:33
| -3,600 |
d73ab1f2e6c0f172042376ff584a2e9190d04807
|
Updating symfony.lock (to see if it influences Insight bhaviour)
|
[
{
"change_type": "MODIFY",
"old_path": "symfony.lock",
"new_path": "symfony.lock",
"diff": "{\n\"acmecorp/reference-extension\": {\n- \"version\": \"1.0.8\"\n+ \"version\": \"1.2.0\"\n},\n\"api-platform/core\": {\n\"version\": \"2.5\",\n]\n},\n\"behat/behat\": {\n- \"version\": \"v3.5.0\"\n+ \"version\": \"v3.6.1\"\n},\n\"behat/gherkin\": {\n\"version\": \"v4.6.0\"\n\"repo\": \"github.com/symfony/recipes\",\n\"branch\": \"master\",\n\"version\": \"2.1\",\n- \"ref\": \"158be9d4b4c2127d9ec741c97e3cb1b6610b5294\"\n+ \"ref\": \"af4f8fa93b1fee9e6f15d1e208ce743bb31cb2b2\"\n},\n\"files\": [\n\"behat.yml.dist\",\n- \"config/bootstrap.php\",\n\"features/bootstrap/FeatureContext.php\",\n\"features/bootstrap/bootstrap.php\",\n\"features/demo.feature\"\n]\n},\n\"behat/transliterator\": {\n- \"version\": \"v1.2.0\"\n+ \"version\": \"v1.3.0\"\n},\n\"behatch/contexts\": {\n\"version\": \"3.2.0\"\n},\n\"bobdenotter/weatherwidget\": {\n- \"version\": \"1.0.9\"\n+ \"version\": \"1.1.0\"\n},\n\"bolt/common\": {\n- \"version\": \"2.1.3\"\n+ \"version\": \"2.1.5\"\n},\n\"bolt/newswidget\": {\n- \"version\": \"1.1.0\"\n+ \"version\": \"1.2.0\"\n},\n\"clue/stream-filter\": {\n\"version\": \"v1.4.1\"\n},\n\"cocur/slugify\": {\n- \"version\": \"v3.2\"\n+ \"version\": \"v4.0.0\"\n},\n\"coduo/php-matcher\": {\n- \"version\": \"3.2.3\"\n+ \"version\": \"4.0.0\"\n},\n\"coduo/php-to-string\": {\n- \"version\": \"2.0.2\"\n+ \"version\": \"3.0.0\"\n},\n\"composer/ca-bundle\": {\n- \"version\": \"1.2.5\"\n+ \"version\": \"1.2.6\"\n},\n\"composer/composer\": {\n- \"version\": \"1.9.1\"\n+ \"version\": \"1.9.3\"\n},\n\"composer/semver\": {\n- \"version\": \"1.5.0\"\n+ \"version\": \"1.5.1\"\n},\n\"composer/spdx-licenses\": {\n- \"version\": \"1.5.2\"\n+ \"version\": \"1.5.3\"\n},\n\"composer/xdebug-handler\": {\n\"version\": \"1.4.0\"\n\"repo\": \"github.com/symfony/recipes\",\n\"branch\": \"master\",\n\"version\": \"1.0\",\n- \"ref\": \"cb4152ebcadbe620ea2261da1a1c5a9b8cea7672\"\n+ \"ref\": \"a2759dd6123694c8d901d0ec80006e044c2e6457\"\n},\n\"files\": [\n\"config/routes/annotations.yaml\"\n\"version\": \"1.6.4\"\n},\n\"doctrine/common\": {\n- \"version\": \"v2.11.0\"\n+ \"version\": \"2.12.0\"\n},\n\"doctrine/data-fixtures\": {\n- \"version\": \"1.4.0\"\n+ \"version\": \"1.4.2\"\n},\n\"doctrine/dbal\": {\n\"version\": \"v2.10.1\"\n},\n\"doctrine/doctrine-bundle\": {\n- \"version\": \"1.12\",\n+ \"version\": \"2.0\",\n\"recipe\": {\n\"repo\": \"github.com/symfony/recipes\",\n\"branch\": \"master\",\n- \"version\": \"1.12\",\n- \"ref\": \"72dd6c4b34e12ff1da8320cc7a8688666836f4da\"\n+ \"version\": \"2.0\",\n+ \"ref\": \"a9f2463b9f73efe74482f831f03a204a41328555\"\n},\n\"files\": [\n\"config/packages/doctrine.yaml\",\n\"version\": \"1.2.0\"\n},\n\"doctrine/migrations\": {\n- \"version\": \"2.2.0\"\n+ \"version\": \"2.2.1\"\n},\n\"doctrine/orm\": {\n- \"version\": \"v2.7.0\"\n+ \"version\": \"v2.7.1\"\n},\n\"doctrine/persistence\": {\n- \"version\": \"1.3.3\"\n+ \"version\": \"1.3.6\"\n},\n\"doctrine/reflection\": {\n- \"version\": \"v1.0.0\"\n+ \"version\": \"v1.1.0\"\n},\n\"drupol/composer-packages\": {\n\"version\": \"1.1.2\"\n\"version\": \"1.6.1\"\n},\n\"instaclick/php-webdriver\": {\n- \"version\": \"1.4.6\"\n+ \"version\": \"1.4.7\"\n},\n\"intervention/image\": {\n\"version\": \"2.5.1\"\n\"version\": \"5.2.9\"\n},\n\"knplabs/doctrine-behaviors\": {\n- \"version\": \"v2.0.0\"\n+ \"version\": \"v2.0.1\"\n},\n\"knplabs/knp-menu\": {\n- \"version\": \"2.6.0\"\n+ \"version\": \"v3.1.0\"\n},\n\"knplabs/knp-menu-bundle\": {\n- \"version\": \"v2.3.0\"\n+ \"version\": \"v3.0.0\"\n},\n\"lakion/mink-debug-extension\": {\n\"version\": \"v1.2.3\"\n},\n\"league/flysystem\": {\n- \"version\": \"1.0.63\"\n+ \"version\": \"1.0.64\"\n},\n\"league/glide\": {\n\"version\": \"1.5.0\"\n\"version\": \"1.25.3\"\n},\n\"myclabs/deep-copy\": {\n- \"version\": \"1.9.4\"\n+ \"version\": \"1.9.5\"\n},\n\"nelmio/cors-bundle\": {\n\"version\": \"1.5\",\n]\n},\n\"nesbot/carbon\": {\n- \"version\": \"2.28.0\"\n+ \"version\": \"2.30.0\"\n},\n\"nette/application\": {\n- \"version\": \"v3.0.3\"\n+ \"version\": \"v3.0.4\"\n},\n\"nette/component-model\": {\n\"version\": \"v3.0.0\"\n\"version\": \"v3.0.3\"\n},\n\"nette/robot-loader\": {\n- \"version\": \"v3.2.1\"\n+ \"version\": \"v3.2.2\"\n},\n\"nette/routing\": {\n\"version\": \"v3.0.0\"\n},\n\"nette/utils\": {\n- \"version\": \"v3.1.0\"\n+ \"version\": \"v3.1.1\"\n},\n\"nikic/php-parser\": {\n\"version\": \"v4.3.0\"\n\"config/packages/nyholm_psr7.yaml\"\n]\n},\n- \"ocramius/package-versions\": {\n- \"version\": \"1.5.1\"\n- },\n\"ocramius/proxy-manager\": {\n\"version\": \"2.2.3\"\n},\n\"version\": \"1.3.0\"\n},\n\"php-translation/common\": {\n- \"version\": \"1.0.0\"\n+ \"version\": \"3.0.1\"\n},\n\"php-translation/extractor\": {\n- \"version\": \"1.7.1\"\n+ \"version\": \"2.0.1\"\n},\n\"php-translation/loco-adapter\": {\n\"version\": \"0.8\",\n]\n},\n\"php-translation/symfony-bundle\": {\n- \"version\": \"0.4\",\n+ \"version\": \"0.10\",\n\"recipe\": {\n\"repo\": \"github.com/symfony/recipes-contrib\",\n\"branch\": \"master\",\n- \"version\": \"0.4\",\n- \"ref\": \"ee15ad002114fba7b694a7fe429419b518d43bc4\"\n+ \"version\": \"0.10\",\n+ \"ref\": \"7626dc2639039d9db29789b560171f2f2a9d8468\"\n},\n\"files\": [\n\"config/packages/dev/php_translation.yaml\",\n]\n},\n\"php-translation/symfony-storage\": {\n- \"version\": \"1.1.0\"\n+ \"version\": \"2.2.0\"\n},\n\"phpdocumentor/reflection-common\": {\n\"version\": \"2.0.0\"\n\"version\": \"v1.1.0\"\n},\n\"phpspec/phpspec\": {\n- \"version\": \"5.1.2\"\n+ \"version\": \"6.1.1\"\n},\n\"phpspec/prophecy\": {\n- \"version\": \"1.10.1\"\n+ \"version\": \"v1.10.2\"\n},\n\"phpstan/phpdoc-parser\": {\n- \"version\": \"0.3.5\"\n+ \"version\": \"0.4.3\"\n},\n\"phpstan/phpstan\": {\n- \"version\": \"0.11.19\"\n+ \"version\": \"0.12.11\"\n},\n\"phpstan/phpstan-doctrine\": {\n- \"version\": \"0.11.6\"\n+ \"version\": \"0.12.9\"\n},\n\"phpstan/phpstan-symfony\": {\n- \"version\": \"0.11.6\"\n+ \"version\": \"0.12.4\"\n},\n\"phpunit/php-code-coverage\": {\n\"version\": \"6.1.4\"\n\"repo\": \"github.com/symfony/recipes\",\n\"branch\": \"master\",\n\"version\": \"4.7\",\n- \"ref\": \"f1546d78502f904f37f7b47a42b1444cbf1d3423\"\n+ \"ref\": \"00fdb38c318774cd39f475a753028a5e8d25d47c\"\n},\n\"files\": [\n\".env.test\",\n\"phpunit.xml.dist\",\n- \"config/bootstrap.php\",\n- \"tests/.gitignore\"\n+ \"tests/bootstrap.php\"\n]\n},\n\"psr/cache\": {\n\"version\": \"3.0.3\"\n},\n\"ramsey/uuid\": {\n- \"version\": \"3.9.2\"\n+ \"version\": \"3.9.3\"\n},\n\"roave/security-advisories\": {\n\"version\": \"dev-master\"\n},\n\"scienta/doctrine-json-functions\": {\n- \"version\": \"4.1.1\"\n+ \"version\": \"4.1.2\"\n},\n\"sebastian/code-unit-reverse-lookup\": {\n\"version\": \"1.0.1\"\n\"version\": \"1.7.2\"\n},\n\"seld/phar-utils\": {\n- \"version\": \"1.0.1\"\n+ \"version\": \"1.1.0\"\n},\n\"sensio/framework-extra-bundle\": {\n\"version\": \"5.2\",\n\"version\": \"2.3.0\"\n},\n\"slevomat/coding-standard\": {\n- \"version\": \"5.0.4\"\n+ \"version\": \"6.1.5\"\n},\n\"squizlabs/php_codesniffer\": {\n\"version\": \"3.0\",\n]\n},\n\"symfony/asset\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/browser-kit\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/cache\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/cache-contracts\": {\n\"version\": \"v2.0.1\"\n},\n\"symfony/config\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/console\": {\n\"version\": \"4.4\",\n\"repo\": \"github.com/symfony/recipes\",\n\"branch\": \"master\",\n\"version\": \"4.4\",\n- \"ref\": \"fead3ab2e80622c61d13dac0d21a3430a45efae8\"\n+ \"ref\": \"ea8c0eda34fda57e7d5cd8cbd889e2a387e3472c\"\n},\n\"files\": [\n\"bin/console\",\n]\n},\n\"symfony/css-selector\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/debug\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/debug-bundle\": {\n\"version\": \"4.1\",\n]\n},\n\"symfony/dependency-injection\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/doctrine-bridge\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/dom-crawler\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/dotenv\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/error-handler\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/event-dispatcher\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/event-dispatcher-contracts\": {\n\"version\": \"v1.1.7\"\n},\n\"symfony/expression-language\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/filesystem\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/finder\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/flex\": {\n\"version\": \"1.0\",\n]\n},\n\"symfony/form\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/framework-bundle\": {\n\"version\": \"4.4\",\n]\n},\n\"symfony/http-client\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/http-client-contracts\": {\n\"version\": \"v2.0.1\"\n},\n\"symfony/http-foundation\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/http-kernel\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/inflector\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/intl\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/mailer\": {\n\"version\": \"4.3\",\n}\n},\n\"symfony/mime\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/monolog-bridge\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/monolog-bundle\": {\n\"version\": \"3.3\",\n\"repo\": \"github.com/symfony/recipes\",\n\"branch\": \"master\",\n\"version\": \"3.3\",\n- \"ref\": \"6240c6d43e8237a32452f057f81816820fd56ab6\"\n+ \"ref\": \"877bdb4223245783d00ed1f7429aa7ebc606d914\"\n},\n\"files\": [\n\"config/packages/dev/monolog.yaml\",\n]\n},\n\"symfony/options-resolver\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/polyfill-ctype\": {\n- \"version\": \"v1.13.1\"\n+ \"version\": \"v1.14.0\"\n},\n\"symfony/polyfill-intl-grapheme\": {\n- \"version\": \"v1.13.1\"\n+ \"version\": \"v1.14.0\"\n},\n\"symfony/polyfill-intl-icu\": {\n- \"version\": \"v1.13.1\"\n+ \"version\": \"v1.14.0\"\n},\n\"symfony/polyfill-intl-idn\": {\n- \"version\": \"v1.13.1\"\n+ \"version\": \"v1.14.0\"\n},\n\"symfony/polyfill-intl-normalizer\": {\n- \"version\": \"v1.13.1\"\n+ \"version\": \"v1.14.0\"\n},\n\"symfony/polyfill-mbstring\": {\n- \"version\": \"v1.13.1\"\n- },\n- \"symfony/polyfill-php70\": {\n- \"version\": \"v1.13.1\"\n+ \"version\": \"v1.14.0\"\n},\n\"symfony/polyfill-php72\": {\n- \"version\": \"v1.13.1\"\n+ \"version\": \"v1.14.0\"\n},\n\"symfony/polyfill-php73\": {\n- \"version\": \"v1.13.1\"\n+ \"version\": \"v1.14.0\"\n},\n\"symfony/process\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/property-access\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/property-info\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/routing\": {\n\"version\": \"4.2\",\n\"repo\": \"github.com/symfony/recipes\",\n\"branch\": \"master\",\n\"version\": \"4.4\",\n- \"ref\": \"30efd98dd3b4ead6e9ad4713b1efc43bbe94bf77\"\n+ \"ref\": \"7b4408dc203049666fe23fabed23cbadc6d8440f\"\n},\n\"files\": [\n\"config/packages/security.yaml\"\n]\n},\n\"symfony/security-core\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/security-csrf\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/security-guard\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/security-http\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/serializer\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/service-contracts\": {\n\"version\": \"v2.0.1\"\n},\n\"symfony/stopwatch\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/string\": {\n- \"version\": \"v5.0.2\"\n+ \"version\": \"v5.0.4\"\n},\n\"symfony/translation\": {\n\"version\": \"3.3\",\n\"version\": \"v2.0.1\"\n},\n\"symfony/twig-bridge\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/twig-bundle\": {\n\"version\": \"4.4\",\n]\n},\n\"symfony/var-dumper\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/var-exporter\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/web-link\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symfony/web-profiler-bundle\": {\n\"version\": \"3.3\",\n]\n},\n\"symfony/yaml\": {\n- \"version\": \"v4.4.2\"\n+ \"version\": \"v4.4.4\"\n},\n\"symplify/auto-bind-parameter\": {\n- \"version\": \"v7.2.0\"\n+ \"version\": \"v7.2.2\"\n},\n\"symplify/autowire-array-parameter\": {\n- \"version\": \"v7.2.0\"\n+ \"version\": \"v7.2.2\"\n},\n\"symplify/coding-standard\": {\n- \"version\": \"v7.0.2\"\n+ \"version\": \"v7.2.2\"\n+ },\n+ \"symplify/easy-coding-standard\": {\n+ \"version\": \"v7.2.2\"\n},\n\"symplify/package-builder\": {\n- \"version\": \"v7.2.0\"\n+ \"version\": \"v7.2.2\"\n},\n\"symplify/set-config-resolver\": {\n- \"version\": \"v7.2.0\"\n+ \"version\": \"v7.2.2\"\n},\n\"symplify/smart-file-system\": {\n- \"version\": \"v7.2.0\"\n+ \"version\": \"v7.2.2\"\n},\n\"theseer/tokenizer\": {\n\"version\": \"1.1.3\"\n},\n\"tightenco/collect\": {\n- \"version\": \"v6.9.0\"\n+ \"version\": \"v6.16.0\"\n},\n\"twig/twig\": {\n- \"version\": \"v2.12.3\"\n+ \"version\": \"v3.0.3\"\n},\n\"ua-parser/uap-php\": {\n- \"version\": \"v3.9.2\"\n+ \"version\": \"v3.9.7\"\n},\n\"webimpress/safe-writer\": {\n\"version\": \"2.0.0\"\n},\n\"webmozart/assert\": {\n- \"version\": \"1.6.0\"\n+ \"version\": \"1.7.0\"\n},\n\"webmozart/path-util\": {\n\"version\": \"2.3.0\"\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Updating symfony.lock (to see if it influences Insight bhaviour)
|
95,144 |
22.02.2020 12:46:35
| -3,600 |
1658bbc8a2af8c7bb9ac26e4869128e2b9199af3
|
Allow configuration of web root folder
|
[
{
"change_type": "MODIFY",
"old_path": ".env.dist",
"new_path": ".env.dist",
"diff": "@@ -34,20 +34,13 @@ DATABASE_URL=sqlite:///%kernel.project_dir%/var/data/bolt.sqlite\n###< doctrine/doctrine-bundle ###\n###> symfony/mailer ###\n-# MAILER_DSN=smtp://localhost\n+MAILER_DSN=smtp://localhost\n###< symfony/mailer ###\n###> nelmio/cors-bundle ###\n-CORS_ALLOW_ORIGIN=^https?://localhost(:[0-9]+)?$\n+CORS_ALLOW_ORIGIN=^https?://(localhost|127\\\\.0\\\\.0\\\\.1)(:[0-9]+)?$\n###< nelmio/cors-bundle ###\n-# blackfire access tokens for performance measurement\n-BLACKFIRE_CLIENT_ID=\n-BLACKFIRE_CLIENT_TOKEN=\n-BLACKFIRE_SERVER_ID=\n-BLACKFIRE_SERVER_TOKEN=\n-BLACKFIRE_LOG_LEVEL=0\n-\n###> php-translation/loco-adapter ###\nLOCO_PROJECT_API_KEY=\n###< php-translation/loco-adapter ###\n"
},
{
"change_type": "MODIFY",
"old_path": "config/packages/assets.yaml",
"new_path": "config/packages/assets.yaml",
"diff": "framework:\nassets:\n- json_manifest_path: '%kernel.project_dir%/public/assets/manifest.json'\n+ json_manifest_path: '%kernel.project_dir%/%bolt.public_folder%/assets/manifest.json'\n"
},
{
"change_type": "MODIFY",
"old_path": "config/packages/framework.yaml",
"new_path": "config/packages/framework.yaml",
"diff": "@@ -15,7 +15,7 @@ framework:\nphp_errors:\nlog: true\nassets:\n- json_manifest_path: '%kernel.project_dir%/public/assets/manifest.json'\n+ json_manifest_path: '%kernel.project_dir%/%bolt.public_folder%/assets/manifest.json'\ncache:\n# this value is used as part of the \"namespace\" generated for the cache item keys\n# to avoid collisions when multiple apps share the same cache backend (e.g. a Redis server)\n"
},
{
"change_type": "MODIFY",
"old_path": "config/packages/webpack_encore.yaml",
"new_path": "config/packages/webpack_encore.yaml",
"diff": "webpack_encore:\n# The path where Encore is building the assets.\n# This should match Encore.setOutputPath() in webpack.config.js.\n- output_path: '%kernel.project_dir%/public/assets'\n+ output_path: '%kernel.project_dir%/%bolt.public_folder%/assets'\n"
},
{
"change_type": "MODIFY",
"old_path": "config/services.yaml",
"new_path": "config/services.yaml",
"diff": "@@ -20,6 +20,7 @@ services:\n$locales: '%app_locales%'\n$emailSender: '%app.notifications.email_sender%'\n$projectDir: '%kernel.project_dir%'\n+ $publicFolder: '%bolt.public_folder%'\n# makes classes in src/ available to be used as services\n# this creates a service per class whose id is the fully-qualified class name\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Command/CopyAssetsCommand.php",
"new_path": "src/Command/CopyAssetsCommand.php",
"diff": "@@ -4,27 +4,30 @@ declare(strict_types=1);\nnamespace Bolt\\Command;\n-use Symfony\\Bundle\\FrameworkBundle\\Console\\Application;\nuse Symfony\\Component\\Console\\Command\\Command;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\nuse Symfony\\Component\\Console\\Style\\SymfonyStyle;\n-use Symfony\\Component\\DependencyInjection\\ContainerInterface;\nuse Symfony\\Component\\Filesystem\\Filesystem;\nuse Symfony\\Component\\Finder\\Finder;\n-use Symfony\\Component\\HttpKernel\\KernelInterface;\nclass CopyAssetsCommand extends Command\n{\n+ /** @var string */\nprotected static $defaultName = 'bolt:copy-assets';\n+ /** @var Filesystem */\nprivate $filesystem;\n- public function __construct(Filesystem $filesystem)\n+ /** @var string */\n+ private $publicDirectory;\n+\n+ public function __construct(Filesystem $filesystem, string $publicFolder, string $projectDir)\n{\nparent::__construct();\n$this->filesystem = $filesystem;\n+ $this->publicDirectory = $projectDir . '/' . $publicFolder;\n}\nprotected function configure(): void\n@@ -38,13 +41,7 @@ class CopyAssetsCommand extends Command\n*/\nprotected function execute(InputInterface $input, OutputInterface $output): int\n{\n- /** @var Application $app */\n- $app = $this->getApplication();\n- /** @var KernelInterface $kernel */\n- $kernel = $app->getKernel();\n-\n- // $projectDir = $this->getProjectDirectory($kernel->getContainer());\n- $publicDir = $this->getPublicDirectory($kernel->getContainer());\n+ $publicDir = $this->getPublicDirectory();\n// Determine if we can use ../assets or not.\nif (file_exists(dirname(dirname(dirname(__DIR__))) . '/assets')) {\n@@ -107,35 +104,8 @@ class CopyAssetsCommand extends Command\n$this->filesystem->mirror($originDir, $targetDir, Finder::create()->ignoreDotFiles(false)->in($originDir));\n}\n- private function getProjectDirectory(ContainerInterface $container): string\n- {\n- if ($container->hasParameter('kernel.project_dir')) {\n- return $container->getParameter('kernel.project_dir');\n- }\n-\n- return dirname(dirname(dirname(dirname(dirname(__DIR__)))));\n- }\n-\n- private function getPublicDirectory(ContainerInterface $container): string\n+ private function getPublicDirectory(): string\n{\n- $defaultPublicDir = 'public';\n-\n- if (! $container->hasParameter('kernel.project_dir')) {\n- return $defaultPublicDir;\n- }\n-\n- $composerFilePath = $container->getParameter('kernel.project_dir').'/composer.json';\n-\n- if (! is_readable($composerFilePath)) {\n- return $defaultPublicDir;\n- }\n-\n- $composerConfig = json_decode(file_get_contents($composerFilePath), true);\n-\n- if (isset($composerConfig['extra']['public-dir'])) {\n- return $composerConfig['extra']['public-dir'];\n- }\n-\n- return $this->getProjectDirectory($container) . '/' . $defaultPublicDir;\n+ return $this->publicDirectory;\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Command/CopyThemesCommand.php",
"new_path": "src/Command/CopyThemesCommand.php",
"diff": "@@ -4,27 +4,31 @@ declare(strict_types=1);\nnamespace Bolt\\Command;\n-use Symfony\\Bundle\\FrameworkBundle\\Console\\Application;\n+use Bolt\\Version;\nuse Symfony\\Component\\Console\\Command\\Command;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\nuse Symfony\\Component\\Console\\Style\\SymfonyStyle;\n-use Symfony\\Component\\DependencyInjection\\ContainerInterface;\nuse Symfony\\Component\\Filesystem\\Filesystem;\nuse Symfony\\Component\\Finder\\Finder;\n-use Symfony\\Component\\HttpKernel\\KernelInterface;\nclass CopyThemesCommand extends Command\n{\n+ /** @var string */\nprotected static $defaultName = 'bolt:copy-themes';\n+ /** @var Filesystem */\nprivate $filesystem;\n- public function __construct(Filesystem $filesystem)\n+ /** @var string */\n+ private $publicDirectory;\n+\n+ public function __construct(Filesystem $filesystem, string $publicFolder, string $projectDir)\n{\nparent::__construct();\n$this->filesystem = $filesystem;\n+ $this->publicDirectory = $projectDir . '/' . $publicFolder;\n}\nprotected function configure(): void\n@@ -38,12 +42,7 @@ class CopyThemesCommand extends Command\n*/\nprotected function execute(InputInterface $input, OutputInterface $output): int\n{\n- /** @var Application $app */\n- $app = $this->getApplication();\n- /** @var KernelInterface $kernel */\n- $kernel = $app->getKernel();\n-\n- $publicDir = $this->getPublicDirectory($kernel->getContainer());\n+ $publicDir = $this->getPublicDirectory();\n$io = new SymfonyStyle($input, $output);\n@@ -55,6 +54,10 @@ class CopyThemesCommand extends Command\n$baseDir . '/skeleton' => $publicDir .'/theme/skeleton',\n];\n} else {\n+ if (Version::installType() === 'Git clone') {\n+ $io->error('This command only works with the \\'Composer install\\' install type.');\n+ return 1;\n+ }\n$io->error('Run \\'composer require bolt/themes\\' before using this command.');\nreturn 1;\n}\n@@ -104,35 +107,8 @@ class CopyThemesCommand extends Command\n$this->filesystem->mirror($originDir, $targetDir, Finder::create()->ignoreDotFiles(false)->in($originDir));\n}\n- private function getProjectDirectory(ContainerInterface $container): string\n- {\n- if ($container->hasParameter('kernel.project_dir')) {\n- return $container->getParameter('kernel.project_dir');\n- }\n-\n- return dirname(dirname(dirname(dirname(dirname(__DIR__)))));\n- }\n-\n- private function getPublicDirectory(ContainerInterface $container): string\n+ private function getPublicDirectory(): string\n{\n- $defaultPublicDir = 'public';\n-\n- if (! $container->hasParameter('kernel.project_dir')) {\n- return $defaultPublicDir;\n- }\n-\n- $composerFilePath = $container->getParameter('kernel.project_dir').'/composer.json';\n-\n- if (! is_readable($composerFilePath)) {\n- return $defaultPublicDir;\n- }\n-\n- $composerConfig = json_decode(file_get_contents($composerFilePath), true);\n-\n- if (isset($composerConfig['extra']['public-dir'])) {\n- return $composerConfig['extra']['public-dir'];\n- }\n-\n- return $this->getProjectDirectory($container) . '/' . $defaultPublicDir;\n+ return $this->publicDirectory;\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Configuration/Config.php",
"new_path": "src/Configuration/Config.php",
"diff": "@@ -36,7 +36,7 @@ class Config\n/** @var string */\nprivate $locales;\n- public function __construct(string $locales, Stopwatch $stopwatch, string $projectDir, CacheInterface $cache)\n+ public function __construct(string $locales, Stopwatch $stopwatch, string $projectDir, CacheInterface $cache, string $publicFolder)\n{\n$this->locales = $locales;\n$this->stopwatch = $stopwatch;\n@@ -45,7 +45,7 @@ class Config\n$this->data = $this->getConfig();\n// @todo PathResolver shouldn't be part of Config. Refactor to separate class\n- $this->pathResolver = new PathResolver($projectDir, [], $this->get('general/theme'));\n+ $this->pathResolver = new PathResolver($projectDir, $this->get('general/theme'), $publicFolder);\n}\nprivate function getConfig(): Collection\n@@ -96,7 +96,7 @@ class Config\n// If we're parsing the config, we'll also need to pre-initialise\n// the PathResolver, because we need to know the theme path.\n- $this->pathResolver = new PathResolver($this->projectDir, [], $config->get('general')->get('theme'));\n+ $this->pathResolver = new PathResolver($this->projectDir, $config->get('general')->get('theme'));\n$theme = new ThemeParser($this->projectDir, $this->getPath('theme'));\n$config['theme'] = $theme->parse();\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Configuration/PathResolver.php",
"new_path": "src/Configuration/PathResolver.php",
"diff": "@@ -26,7 +26,7 @@ class PathResolver\n/**\n* Default paths for Bolt installation.\n*/\n- public static function defaultPaths(): array\n+ public static function defaultPaths(string $public): array\n{\nreturn [\n'site' => '.',\n@@ -36,7 +36,7 @@ class PathResolver\n'database' => '%var%/database',\n'extensions' => '%site%/extensions',\n'extensions_config' => '%config%/extensions',\n- 'web' => '%site%/public',\n+ 'web' => '%site%/' . $public,\n'files' => '%web%/files',\n'themes' => '%web%/theme',\n'bolt_assets' => '%web%/bolt-public',\n@@ -45,15 +45,13 @@ class PathResolver\n/**\n* @param string $root the root path which must be absolute\n- * @param array $paths initial path definitions\n*\n* @throws ConfigurationException\n*/\n- public function __construct(string $root, array $paths = [], string $themeName = '')\n+ public function __construct(string $root, string $themeName = '', string $public = 'public')\n{\n- if (empty($paths)) {\n- $paths = $this->defaultPaths();\n- }\n+ $paths = $this->defaultPaths($public);\n+\nforeach ($paths as $name => $path) {\n$this->define($name, $path);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Kernel.php",
"new_path": "src/Kernel.php",
"diff": "@@ -84,6 +84,8 @@ class Kernel extends BaseKernel\nprivate function setBoltParameters(ContainerBuilder $container, string $confDir): void\n{\n+ $container->setParameter('bolt.public_folder', $this->guesstimatePublicFolder());\n+\n$fileLocator = new FileLocator([$confDir . '/bolt']);\n$fileName = $fileLocator->locate('config.yaml', null, true);\n@@ -148,4 +150,18 @@ class Kernel extends BaseKernel\n$container->setParameter('bolt.requirement.pluraltaxonomies', $pluralslugs);\n$container->setParameter('bolt.requirement.taxonomies', $slugs);\n}\n+\n+ private function guesstimatePublicFolder(): string\n+ {\n+ $projectDir = $this->getProjectDir();\n+ $candidates = ['public', 'public_html', 'www', 'web', 'httpdocs', 'wwwroot', 'htdocs', 'http_public', 'private_html'];\n+\n+ foreach ($candidates as $candidate) {\n+ if (is_dir($projectDir . '/' . $candidate)) {\n+ return $candidate;\n+ }\n+ }\n+\n+ throw new \\Exception('The Public Folder could not be determined. Expected folder `public`, `public_html`, `www`, `web`, `httpdocs`, `wwwroot`, `htdocs`, `http_public` or `private_html` to exist.');\n+ }\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Allow configuration of web root folder
|
95,144 |
22.02.2020 13:33:17
| -3,600 |
f34975b965cd16c3a995823fcce9fcff54373659
|
Prepare release 4.0.0-rc.5
|
[
{
"change_type": "MODIFY",
"old_path": "package-lock.json",
"new_path": "package-lock.json",
"diff": "{\n\"name\": \"bolt\",\n- \"version\": \"4.0.0-rc.4\",\n+ \"version\": \"4.0.0-rc.5\",\n\"lockfileVersion\": 1,\n\"requires\": true,\n\"dependencies\": {\n\"integrity\": \"sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=\"\n},\n\"codemirror\": {\n- \"version\": \"5.51.0\",\n- \"resolved\": \"https://registry.npmjs.org/codemirror/-/codemirror-5.51.0.tgz\",\n- \"integrity\": \"sha512-vyuYYRv3eXL0SCuZA4spRFlKNzQAewHcipRQCOKgRy7VNAvZxTKzbItdbCl4S5AgPZ5g3WkHp+ibWQwv9TLG7Q==\"\n+ \"version\": \"5.52.0\",\n+ \"resolved\": \"https://registry.npmjs.org/codemirror/-/codemirror-5.52.0.tgz\",\n+ \"integrity\": \"sha512-K2UB6zjscrfME03HeRe/IuOmCeqNpw7PLKGHThYpLbZEuKf+ZoujJPhxZN4hHJS1O7QyzEsV7JJZGxuQWVaFCg==\"\n},\n\"codemirror-spell-checker\": {\n\"version\": \"1.1.2\",\n"
},
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "{\n\"name\": \"bolt\",\n- \"version\": \"4.0.0-rc.4\",\n+ \"version\": \"4.0.0-rc.5\",\n\"homepage\": \"https://boltcms.io\",\n\"author\": \"Bob den Otter <bob@twokings.nl> (https://boltcms.io)\",\n\"license\": \"MIT\",\n\"baguettebox.js\": \"^1.11.0\",\n\"bootbox\": \"^5.4.0\",\n\"bootstrap\": \"^4.4.1\",\n- \"codemirror\": \"^5.51.0\",\n+ \"codemirror\": \"^5.52.0\",\n\"dropzone\": \"^5.5.1\",\n\"flagpack\": \"^1.0.4\",\n\"jquery\": \"^3.4.1\",\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Prepare release 4.0.0-rc.5
|
95,144 |
22.02.2020 14:20:19
| -3,600 |
f1dde48e5006d9c9efc79552aad57ea679f30258
|
Make sure templateselect is "stringable"
|
[
{
"change_type": "MODIFY",
"old_path": "src/Entity/Field/TemplateselectField.php",
"new_path": "src/Entity/Field/TemplateselectField.php",
"diff": "@@ -16,6 +16,11 @@ class TemplateselectField extends Field implements FieldInterface\n{\npublic const TYPE = 'templateselect';\n+ public function __toString(): string\n+ {\n+ return $this->getTwigValue();\n+ }\n+\npublic function setValue($value): Field\n{\nif (Json::test($value)) {\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Make sure templateselect is "stringable"
|
95,144 |
22.02.2020 14:47:37
| -3,600 |
e3fee99fc05de0a50a0d6e2e3d132643da3473f2
|
Slightly different approach
|
[
{
"change_type": "MODIFY",
"old_path": "src/Entity/Field.php",
"new_path": "src/Entity/Field.php",
"diff": "@@ -77,7 +77,13 @@ class Field implements FieldInterface, TranslatableInterface\npublic function __toString(): string\n{\n- return (string) $this->getTwigValue();\n+ $value = $this->getTwigValue();\n+\n+ if (is_array($value)) {\n+ $value = implode('', $value);\n+ }\n+\n+ return (string) $value;\n}\npublic function __call(string $key = '', array $arguments = [])\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Entity/Field/TemplateselectField.php",
"new_path": "src/Entity/Field/TemplateselectField.php",
"diff": "@@ -16,11 +16,6 @@ class TemplateselectField extends Field implements FieldInterface\n{\npublic const TYPE = 'templateselect';\n- public function __toString(): string\n- {\n- return $this->getTwigValue();\n- }\n-\npublic function setValue($value): Field\n{\nif (Json::test($value)) {\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Slightly different approach
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.