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,192 |
07.08.2019 16:10:27
| -7,200 |
36789fe8f83d961cbd6b96c1388411ced1a50222
|
aligment of ui control buttons on listings like view mode, pagers, checkbox
|
[
{
"change_type": "MODIFY",
"old_path": "assets/js/app/listing/Components/Filter.vue",
"new_path": "assets/js/app/listing/Components/Filter.vue",
"diff": ":class=\"{ 'is-selected': size === 'small' }\"\n@click=\"changeSize('small')\"\n>\n- <i class=\"fas fa-align-justify fa-fw\"></i> Compact\n+ <i class=\"fas fa-align-justify fa-fw\"></i><span class=\"sr-only\">Compact view mode</span>\n</button>\n</li>\n:class=\"{ 'is-selected': size === 'normal' }\"\n@click=\"changeSize('normal')\"\n>\n- <i class=\"fas fa-grip-lines fa-fw\"></i> Expanded\n+ <i class=\"fas fa-grip-lines fa-fw\"></i><span class=\"sr-only\">Expanded view mode</span>\n</button>\n</li>\n"
},
{
"change_type": "MODIFY",
"old_path": "assets/js/app/listing/Components/Records.vue",
"new_path": "assets/js/app/listing/Components/Records.vue",
"diff": "<template>\n- <div class=\"listing-records\"></div>\n+ <div class=\"listing-records\">\n+ </div>\n</template>\n<script>\n"
},
{
"change_type": "MODIFY",
"old_path": "assets/js/app/listing/Components/Table/index.vue",
"new_path": "assets/js/app/listing/Components/Table/index.vue",
"diff": "<template>\n+ <div class=\"listing__records\">\n<draggable v-model=\"records\" :options=\"draggableOptions\">\n<transition-group>\n<table-row\n></table-row>\n</transition-group>\n</draggable>\n+ </div>\n</template>\n<script>\n"
},
{
"change_type": "MODIFY",
"old_path": "assets/scss/init/_variables.scss",
"new_path": "assets/scss/init/_variables.scss",
"diff": "@@ -104,6 +104,7 @@ $yiq-contrasted-threshold: 150;\n:root {\n--background: #f3f5f7;\n--foreground: #FFF;\n+ --foreground-border: #e8e8e8;\n--primary: #255687;\n--shade: #666;\n--shade-light: #ddd;\n"
},
{
"change_type": "MODIFY",
"old_path": "assets/scss/modules/base/_pagination.scss",
"new_path": "assets/scss/modules/base/_pagination.scss",
"diff": "span,\na {\n- font-size: 0.9375rem;\n+ font-size: 0.875rem;\ndisplay: flex;\nalign-items: center;\njustify-content: center;\nbackground: var(--foreground);\nborder-radius: $border-radius;\nbox-shadow: $card-box-shadow;\n- padding: $spacer / 2;\n- margin-right: $spacer / 3;\n+ padding: $spacer*0.4 $spacer*0.5;\n+ margin-right: $spacer*0.5;\nmin-width: 34px;\nletter-spacing: $letter-spacing;\n+ border: 1px solid var(--foreground-border);\n+ &:last-child {\n+ margin-right: 0;\n+ }\n&.disabled {\n- color: var(--shade-400);\n+ color: $disabled;\n&:hover {\nbackground: var(--foreground);\n&:hover {\ntext-decoration: none;\n- background: var(--shade-100);\n+ background: var(--background);\n}\n&:focus {\n"
},
{
"change_type": "MODIFY",
"old_path": "assets/scss/modules/listing/_filter.scss",
"new_path": "assets/scss/modules/listing/_filter.scss",
"diff": "display: flex;\njustify-content: space-between;\nmin-height: 40px;\n- background-color: #fff;\n- padding: 0.5rem 0.625rem 0.5rem 0.5rem;\n+ //background-color: #fff;\n+ padding: 0.5rem 0 0.5rem 0;\nborder-radius: $border-radius;\noverflow: hidden;\n- &:first-of-type {\n- margin-bottom: $spacer;\n- }\n-\n&:last-of-type {\n- margin-top: $spacer;\n+ margin-bottom: $spacer;\n}\n.pagination {\njustify-content: flex-end;\nli {\n- display: inline-flex;\nmargin-right: $spacer / 3;\n&:last-child {\n}\n}\n- .custom-control {\n- margin-top: $spacer*0.25;\n+ .custom-checkbox {\n+ padding: 0.625rem;\n+ width: 32px;\n+ height: 34px;\n+ border: 1px solid var(--foreground-border);\n+ .custom-control-label {\n+ &:before, &:after {\n+ top: -0.125rem;\n+ left: -.8125rem;\n+ }\n+ }\n}\n.control--button {\nbackground: var(--foreground);\nborder-radius: $border-radius;\nbox-shadow: $card-box-shadow;\n- padding: $spacer / 2;\n- font-size: 0.9rem;\n+ padding: $spacer*0.4 $spacer*0.5;\n+ font-size: 0.875rem;\n+ min-height: 2.125rem;\n+ border: 1px solid var(--foreground-border);\n&:hover {\ncursor: pointer;\n}\n&.is-selected {\n- background: $disabled;\n+ background-color: rgb(247, 247, 247);\n}\n&.is-active {\nbackground: var(--primary);\ncolor: var(--foreground);\n}\n+\n+ .fas {\n+ margin-right: 0;\n+ }\n}\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "assets/scss/modules/listing/row/_container.scss",
"new_path": "assets/scss/modules/listing/row/_container.scss",
"diff": ".listing__row {\nwidth: calc(100% - #{$checkbox-row-width});\n}\n+\n+ &:last-child {\n+ .listing__row, .listing--checkbox {\n+ margin-bottom: 0.25rem;\n+ }\n+ }\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "assets/scss/vendor/bootstrap/_overrides.scss",
"new_path": "assets/scss/vendor/bootstrap/_overrides.scss",
"diff": "@@ -45,3 +45,8 @@ $theme-colors: (\nbackground: transparent;\n}\n}\n+\n+\n+.card-header {\n+ padding: 0.8125rem 1.25rem;\n+}\n\\ No newline at end of file\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
aligment of ui control buttons on listings like view mode, pagers, checkbox
|
95,192 |
07.08.2019 16:42:36
| -7,200 |
6da4ab9aaf9cb460e1000ac5d78f4256e91c855e
|
layout tweaks, removing the Hey in account, alignment of pager, fixed name for View website iso View [site title] for fixed button width
|
[
{
"change_type": "MODIFY",
"old_path": "assets/scss/modules/admin/_toolbar.scss",
"new_path": "assets/scss/modules/admin/_toolbar.scss",
"diff": "font-size: 0.875rem;\nwhite-space: nowrap;\n@include media-breakpoint-up(sm) {\n- padding: 0.825rem 1rem;\n+ padding: 0.85rem 1rem;\n}\n@include media-breakpoint-up(md) {\nfont-size: 0.9375rem;\n"
},
{
"change_type": "MODIFY",
"old_path": "assets/scss/modules/base/_pagination.scss",
"new_path": "assets/scss/modules/base/_pagination.scss",
"diff": "//** Base | Pagination\n.pagination {\n- margin-left: auto;\n+ margin: 0 auto;\nnav {\ndisplay: flex;\n-\nspan,\na {\nfont-size: 0.875rem;\n"
},
{
"change_type": "MODIFY",
"old_path": "assets/scss/modules/listing/row/_container.scss",
"new_path": "assets/scss/modules/listing/row/_container.scss",
"diff": "width: calc(100% - #{$checkbox-row-width});\n}\n- &:last-child {\n- .listing__row, .listing--checkbox {\n- margin-bottom: 0.25rem;\n- }\n- }\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/_base/layout.html.twig",
"new_path": "templates/_base/layout.html.twig",
"diff": "{# Setting the labels and their localisations that are used in the sidebar-menu. #}\n{% set labels = {\n'about.bolt_documentation': 'about.bolt_documentation'|trans,\n- 'action.view_site': 'action.view'|trans ~ ' ' ~ config.get('general/sitename'),\n+ 'action.view_site': 'action.view'|trans ~ ' website',\n'action.create_new': 'action.create_new'|trans,\n'general.greeting': 'general.greeting'|trans({'%name%': user_display_name}),\n'action.logout': 'action.logout'|trans,\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/e2e/features/login.feature",
"new_path": "tests/e2e/features/login.feature",
"diff": "@@ -6,4 +6,4 @@ Feature: Logging in\n| password | admin%1 |\nAnd I click the \"login_button\" element\nThen the \"dashboard\" page is displayed\n- And there is element \"profile_text\" with text \"Hey, Admin!\"\n\\ No newline at end of file\n+ And there is element \"profile_text\" with text \"Admin\"\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "translations/messages.en.xlf",
"new_path": "translations/messages.en.xlf",
"diff": "<unit id=\"XNTbZW6\" name=\"action.visit_site\">\n<segment>\n<source>action.visit_site</source>\n- <target>Visit site</target>\n+ <target>Visit website</target>\n</segment>\n</unit>\n<unit id=\"KfVJho2\" name=\"action.create_new\">\n<segment>\n<source>action.create_new</source>\n- <target>Create new</target>\n+ <target>Create a new</target>\n</segment>\n</unit>\n<unit id=\"b_RPpcB\" name=\"general.greeting\">\n<segment>\n<source>general.greeting</source>\n- <target>Hey, %name%!</target>\n+ <target>%name%</target>\n</segment>\n</unit>\n<unit id=\"bmdn3u9\" name=\"action.logout\">\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
layout tweaks, removing the Hey in account, alignment of pager, fixed name for View website iso View [site title] for fixed button width
|
95,192 |
07.08.2019 16:59:01
| -7,200 |
1deb5015bbe90b9ecb5043d18c726346ebd27ed6
|
hover style main nav links
|
[
{
"change_type": "MODIFY",
"old_path": "assets/scss/modules/admin/_sidebar.scss",
"new_path": "assets/scss/modules/admin/_sidebar.scss",
"diff": "@include media-breakpoint-up(lg) {\npadding-top: 1.625rem;\n}\n- a {\n- font-size: 0.9375rem;\n- }\n&--separator {\npadding: 0 $spacer;\nfont-weight: $font-weight-semibold;\nletter-spacing: $letter-spacing;\ncolor: var(--admin-sidebar-text);\n-\n+ font-size: 0.9375rem;\n&:hover {\n- @include darken(--admin-sidebar, 0.02);\n+ @include darken(--admin-sidebar, 0.25);\ncolor: var(--admin-sidebar-icon);\ntext-decoration: none;\na {\nfont-weight: $font-weight-bold;\nletter-spacing: $letter-spacing;\n- padding: $spacer;\n}\n}\nletter-spacing: initial;\n&:hover {\n- @include darken(--admin-sidebar-menu, 0.2);\n+ @include darken(--admin-sidebar-menu, 0.1);\ncolor: var(--admin-sidebar-menu-text);\ntext-decoration: none;\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
hover style main nav links
|
95,179 |
07.08.2019 19:22:22
| -7,200 |
4cc186131a4a37569afeb753567f3842e3388286
|
Translations in controller classes
|
[
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/AuthenticationController.php",
"new_path": "src/Controller/Backend/AuthenticationController.php",
"diff": "@@ -52,8 +52,8 @@ class AuthenticationController extends TwigAwareController implements BackendZon\npublic function resetPassword(): Response\n{\n$twigVars = [\n- 'title' => 'Reset Password',\n- 'subtitle' => 'To reset your password, if you\\'ve misplaced it',\n+ 'title' => 'controller.authentication.reset_title',\n+ 'subtitle' => 'controller.authentication.reset_subtitle',\n];\nreturn $this->renderTemplate('@bolt/pages/placeholder.html.twig', $twigVars);\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/DatabaseIntegrityController.php",
"new_path": "src/Controller/Backend/DatabaseIntegrityController.php",
"diff": "@@ -20,8 +20,8 @@ class DatabaseIntegrityController extends TwigAwareController implements Backend\npublic function check(): Response\n{\n$twigVars = [\n- 'title' => 'Database Check',\n- 'subtitle' => 'To check the Database',\n+ 'title' => 'controller.database.check_title',\n+ 'subtitle' => 'controller.database.check_subtitle',\n];\nreturn $this->renderTemplate('@bolt/pages/placeholder.html.twig', $twigVars);\n@@ -33,8 +33,8 @@ class DatabaseIntegrityController extends TwigAwareController implements Backend\npublic function update(): Response\n{\n$twigVars = [\n- 'title' => 'Database Update',\n- 'subtitle' => 'To update the Database',\n+ 'title' => 'controller.database.update_title',\n+ 'subtitle' => 'controller.database.update_title',\n];\nreturn $this->renderTemplate('@bolt/pages/placeholder.html.twig', $twigVars);\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/OmnisearchController.php",
"new_path": "src/Controller/Backend/OmnisearchController.php",
"diff": "@@ -20,8 +20,8 @@ class OmnisearchController extends TwigAwareController implements BackendZone\npublic function omnisearch(): Response\n{\n$twigVars = [\n- 'title' => 'Omnisearch',\n- 'subtitle' => 'To search, in an omni-like fashion',\n+ 'title' => 'controller.omnisearch.title',\n+ 'subtitle' => 'controller.omnisearch.subtitle',\n];\nreturn $this->renderTemplate('@bolt/pages/placeholder.html.twig', $twigVars);\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/UserController.php",
"new_path": "src/Controller/Backend/UserController.php",
"diff": "@@ -9,6 +9,7 @@ use Bolt\\Repository\\UserRepository;\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Security;\nuse Symfony\\Component\\HttpFoundation\\Response;\nuse Symfony\\Component\\Routing\\Annotation\\Route;\n+use Symfony\\Component\\Translation\\TranslatorInterface;\n/**\n* @Security(\"is_granted('ROLE_ADMIN')\")\n@@ -31,8 +32,8 @@ class UserController extends TwigAwareController implements BackendZone\n$users = $this->users->findBy([], ['username' => 'ASC'], 1000);\n$twigVars = [\n- 'title' => 'Users & Permissions',\n- 'subtitle' => 'To edit users and their permissions',\n+ 'title' => 'controller.user.title',\n+ 'subtitle' => 'controller.user.subtitle',\n'users' => $users,\n];\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/users/listing.html.twig",
"new_path": "templates/users/listing.html.twig",
"diff": "{% import '@bolt/_macro/_macro.html.twig' as macro %}\n{% block title %}\n- {{ macro.icon('users') }} {{ title }}\n+ {{ macro.icon('users') }} {{ title|trans }}\n{% endblock %}\n{% block container \"widecontent\" %}\n{% block main %}\n- <h2>{{ subtitle }}</h2>\n+ <h2>{{ subtitle|trans }}</h2>\n<table class=\"table\" style=\"min-width: 100%; width: auto;\">\n<thead>\n"
},
{
"change_type": "MODIFY",
"old_path": "translations/messages.en.xlf",
"new_path": "translations/messages.en.xlf",
"diff": "<source>listing_table.actions.button_edit</source>\n<target>Edit</target>\n</trans-unit>\n+ <trans-unit id=\"Iy4HXCU\" resname=\"controller.user.title\">\n+ <source>controller.user.title</source>\n+ <target><![CDATA[Users & Permissions]]></target>\n+ </trans-unit>\n+ <trans-unit id=\"HBwIQ9b\" resname=\"controller.user.subtitle\">\n+ <source>controller.user.subtitle</source>\n+ <target>To edit users and their permissions</target>\n+ </trans-unit>\n+ <trans-unit id=\"rkVeKe_\" resname=\"controller.authentication.reset_title\">\n+ <source>controller.authentication.reset_title</source>\n+ <target>Reset Password</target>\n+ </trans-unit>\n+ <trans-unit id=\"lN_rF8O\" resname=\"controller.authentication.reset_subtitle\">\n+ <source>controller.authentication.reset_subtitle</source>\n+ <target>To reset your password, if you've misplaced it</target>\n+ </trans-unit>\n+ <trans-unit id=\"0Gyf5xr\" resname=\"controller.database.check_title\">\n+ <source>controller.database.check_title</source>\n+ <target>Database Check</target>\n+ </trans-unit>\n+ <trans-unit id=\"SeDwjX6\" resname=\"controller.database.check_subtitle\">\n+ <source>controller.database.check_subtitle</source>\n+ <target>To check the Database</target>\n+ </trans-unit>\n+ <trans-unit id=\"nJnALPG\" resname=\"controller.database.update_title\">\n+ <source>controller.database.update_title</source>\n+ <target>Database Update</target>\n+ </trans-unit>\n+ <trans-unit id=\"nRE74_i\" resname=\"controller.database.update_subtitle\">\n+ <source>controller.database.update_subtitle</source>\n+ <target>To update the Database</target>\n+ </trans-unit>\n+ <trans-unit id=\"a3UNsKw\" resname=\"controller.omnisearch.title\">\n+ <source>controller.omnisearch.title</source>\n+ <target>Omnisearch</target>\n+ </trans-unit>\n+ <trans-unit id=\"4N41oTU\" resname=\"controller.omnisearch.subtitle\">\n+ <source>controller.omnisearch.subtitle</source>\n+ <target>To search, in an omni-like fashion</target>\n+ </trans-unit>\n</body>\n</file>\n</xliff>\n"
},
{
"change_type": "MODIFY",
"old_path": "translations/messages.nl.xlf",
"new_path": "translations/messages.nl.xlf",
"diff": "<source>listing_table.actions.button_edit</source>\n<target>__listing_table.actions.button_edit</target>\n</trans-unit>\n+ <trans-unit id=\"Iy4HXCU\" resname=\"controller.user.title\">\n+ <source>controller.user.title</source>\n+ <target><![CDATA[Users & Permissions]]></target>\n+ </trans-unit>\n+ <trans-unit id=\"HBwIQ9b\" resname=\"controller.user.subtitle\">\n+ <source>controller.user.subtitle</source>\n+ <target>To edit users and their permissions</target>\n+ </trans-unit>\n+ <trans-unit id=\"rkVeKe_\" resname=\"controller.authentication.reset_title\">\n+ <source>controller.authentication.reset_title</source>\n+ <target>Reset Password</target>\n+ </trans-unit>\n+ <trans-unit id=\"lN_rF8O\" resname=\"controller.authentication.reset_subtitle\">\n+ <source>controller.authentication.reset_subtitle</source>\n+ <target>To reset your password, if you've misplaced it</target>\n+ </trans-unit>\n+ <trans-unit id=\"0Gyf5xr\" resname=\"controller.database.check_title\">\n+ <source>controller.database.check_title</source>\n+ <target>Database Check</target>\n+ </trans-unit>\n+ <trans-unit id=\"SeDwjX6\" resname=\"controller.database.check_subtitle\">\n+ <source>controller.database.check_subtitle</source>\n+ <target>To check the Database</target>\n+ </trans-unit>\n+ <trans-unit id=\"nJnALPG\" resname=\"controller.database.update_title\">\n+ <source>controller.database.update_title</source>\n+ <target>Database Update</target>\n+ </trans-unit>\n+ <trans-unit id=\"nRE74_i\" resname=\"controller.database.update_subtitle\">\n+ <source>controller.database.update_subtitle</source>\n+ <target>To update the Database</target>\n+ </trans-unit>\n+ <trans-unit id=\"a3UNsKw\" resname=\"controller.omnisearch.title\">\n+ <source>controller.omnisearch.title</source>\n+ <target>Omnisearch</target>\n+ </trans-unit>\n+ <trans-unit id=\"4N41oTU\" resname=\"controller.omnisearch.subtitle\">\n+ <source>controller.omnisearch.subtitle</source>\n+ <target>To search, in an omni-like fashion</target>\n+ </trans-unit>\n</body>\n</file>\n</xliff>\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Translations in controller classes
|
95,179 |
07.08.2019 19:37:35
| -7,200 |
d11c1f049f68343423c7c1ed86e2125b267d07f2
|
Missing titles fixed
|
[
{
"change_type": "MODIFY",
"old_path": "templates/users/listing.html.twig",
"new_path": "templates/users/listing.html.twig",
"diff": "<thead>\n<tr>\n<th scope=\"col\">#</th>\n- <th scope=\"col\" class=\"text-nowrap\">Display name</th>\n- <th scope=\"col\" class=\"text-nowrap\">Username</th>\n- <th scope=\"col\" class=\"text-nowrap\">Email</th>\n- <th scope=\"col\" class=\"text-nowrap\">Roles</th>\n- <th scope=\"col\" class=\"text-nowrap\">Last seen</th>\n- <th scope=\"col\" class=\"text-nowrap\">Last IP</th>\n- <th scope=\"col\" class=\"text-nowrap\">Actions</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_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+ <th scope=\"col\" class=\"text-nowrap\">{{ 'listing.title_actions'|trans }}</th>\n</tr>\n</thead>\n"
},
{
"change_type": "MODIFY",
"old_path": "translations/messages.en.xlf",
"new_path": "translations/messages.en.xlf",
"diff": "<source>controller.omnisearch.subtitle</source>\n<target>To search, in an omni-like fashion</target>\n</trans-unit>\n+ <trans-unit id=\"7cXqH5s\" resname=\"listing.title_display_name\">\n+ <source>listing.title_display_name</source>\n+ <target>Display name</target>\n+ </trans-unit>\n+ <trans-unit id=\"Ay7xZ2h\" resname=\"listing.title_username\">\n+ <source>listing.title_username</source>\n+ <target>Username</target>\n+ </trans-unit>\n+ <trans-unit id=\"RN1tdtJ\" resname=\"listing.title_email\">\n+ <source>listing.title_email</source>\n+ <target>Email</target>\n+ </trans-unit>\n+ <trans-unit id=\"0pjZ.GV\" resname=\"listing.title_roles\">\n+ <source>listing.title_roles</source>\n+ <target>Roles</target>\n+ </trans-unit>\n+ <trans-unit id=\"hXEFV1n\" resname=\"listing.title_last_seen\">\n+ <source>listing.title_last_seen</source>\n+ <target>Last seen</target>\n+ </trans-unit>\n+ <trans-unit id=\"pn7kE17\" resname=\"listing.title_last_ip\">\n+ <source>listing.title_last_ip</source>\n+ <target>Last IP</target>\n+ </trans-unit>\n+ <trans-unit id=\"GZ65uOC\" resname=\"listing.title_actions\">\n+ <source>listing.title_actions</source>\n+ <target>Actions</target>\n+ </trans-unit>\n</body>\n</file>\n</xliff>\n"
},
{
"change_type": "MODIFY",
"old_path": "translations/messages.nl.xlf",
"new_path": "translations/messages.nl.xlf",
"diff": "<source>controller.omnisearch.subtitle</source>\n<target>To search, in an omni-like fashion</target>\n</trans-unit>\n+ <trans-unit id=\"7cXqH5s\" resname=\"listing.title_display_name\">\n+ <source>listing.title_display_name</source>\n+ <target>__listing.title_display_name</target>\n+ </trans-unit>\n+ <trans-unit id=\"Ay7xZ2h\" resname=\"listing.title_username\">\n+ <source>listing.title_username</source>\n+ <target>__listing.title_username</target>\n+ </trans-unit>\n+ <trans-unit id=\"RN1tdtJ\" resname=\"listing.title_email\">\n+ <source>listing.title_email</source>\n+ <target>__listing.title_email</target>\n+ </trans-unit>\n+ <trans-unit id=\"0pjZ.GV\" resname=\"listing.title_roles\">\n+ <source>listing.title_roles</source>\n+ <target>__listing.title_roles</target>\n+ </trans-unit>\n+ <trans-unit id=\"hXEFV1n\" resname=\"listing.title_last_seen\">\n+ <source>listing.title_last_seen</source>\n+ <target>__listing.title_last_seen</target>\n+ </trans-unit>\n+ <trans-unit id=\"pn7kE17\" resname=\"listing.title_last_ip\">\n+ <source>listing.title_last_ip</source>\n+ <target>__listing.title_last_ip</target>\n+ </trans-unit>\n+ <trans-unit id=\"GZ65uOC\" resname=\"listing.title_actions\">\n+ <source>listing.title_actions</source>\n+ <target>__listing.title_actions</target>\n+ </trans-unit>\n</body>\n</file>\n</xliff>\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Missing titles fixed
|
95,144 |
08.08.2019 06:09:35
| -7,200 |
121f5ffa82f5f7824c4b4421fa381cca1a6548ce
|
Update travis.yml Node to 12.5
|
[
{
"change_type": "MODIFY",
"old_path": ".travis.yml",
"new_path": ".travis.yml",
"diff": "@@ -31,7 +31,7 @@ before_install:\ninstall:\n- COMPOSER_MEMORY_LIMIT=-1 composer update $COMPOSER_FLAGS\n- - nvm install 8.2\n+ - nvm install 12.5\n- npm install\n- cd tests/e2e && npm install && node ./node_modules/protractor/bin/webdriver-manager update --gecko=false && cd ../..\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Update travis.yml Node to 12.5
|
95,144 |
08.08.2019 14:11:15
| -7,200 |
1b7282e98de529f7e46976eb4d92f8813525acab
|
Passing through Labels
|
[
{
"change_type": "MODIFY",
"old_path": "assets/js/app/listing/Components/Table/Row/_Actions.vue",
"new_path": "assets/js/app/listing/Components/Table/Row/_Actions.vue",
"diff": "@@ -70,7 +70,7 @@ export default {\nname: 'Actions',\nprops: ['type', 'record', 'labels'],\ncreated() {\n- console.log(this.labels);\n+ // console.log(this.labels);\n},\n};\n</script>\n"
},
{
"change_type": "MODIFY",
"old_path": "assets/js/app/sidebar/Components/Sidebar.vue",
"new_path": "assets/js/app/sidebar/Components/Sidebar.vue",
"diff": "<sidebar-toggler\n:version=\"version\"\n:about-link=\"aboutLink\"\n+ :labels=\"labels\"\n></sidebar-toggler>\n<footer class=\"admin__sidebar--footer\">\n<a :href=\"aboutLink\"\n@@ -23,7 +24,7 @@ export default {\n'sidebar-menu': Menu,\n'sidebar-toggler': SidebarToggler,\n},\n- props: ['menu', 'version', 'aboutLink'],\n+ props: ['menu', 'version', 'aboutLink', 'labels'],\ncreated() {\nconst slim = JSON.parse(localStorage.getItem('slim-sidebar'));\n"
},
{
"change_type": "MODIFY",
"old_path": "package-lock.json",
"new_path": "package-lock.json",
"diff": "}\n},\n\"flagpack\": {\n- \"version\": \"1.0.3\",\n- \"resolved\": \"https://registry.npmjs.org/flagpack/-/flagpack-1.0.3.tgz\",\n- \"integrity\": \"sha512-Akdxdw+otgBSbObJQEosOIHCwMX+2HeeKK6LCeQK3kgxMLHPkOZwNZz2MLFcm9GUkkY0PkfQHE1B8TrxqaQxIQ==\"\n+ \"version\": \"1.0.4\",\n+ \"resolved\": \"https://registry.npmjs.org/flagpack/-/flagpack-1.0.4.tgz\",\n+ \"integrity\": \"sha512-FVEZ1k/3qxY+M3ZlFoHafbcl/B1GtQxsWsOsXu4RlYp3+zqv1EHP3Woyf6N/h/4ud9W/lgUeYURivMwc6pv5DQ==\"\n},\n\"flat-cache\": {\n\"version\": \"2.0.1\",\n"
},
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "\"bootstrap\": \"^4.3.1\",\n\"codemirror\": \"^5.48.2\",\n\"dropzone\": \"^5.5.1\",\n- \"flagpack\": \"^1.0.3\",\n+ \"flagpack\": \"^1.0.4\",\n\"jquery\": \"^3.4.1\",\n\"luxon\": \"^1.17.2\",\n\"no-scroll\": \"^2.1.1\",\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Passing through Labels
|
95,179 |
08.08.2019 16:32:56
| -7,200 |
1cff5184a4eaddc0c31fdabfd97bde5bf7e7245d
|
Missing notification translates on case of invalid user edit
|
[
{
"change_type": "MODIFY",
"old_path": "translations/messages.en.xlf",
"new_path": "translations/messages.en.xlf",
"diff": "<source>listing.title_actions</source>\n<target>Actions</target>\n</trans-unit>\n+ <trans-unit id=\"fkXL.k6\" resname=\"user.not_valid_email\">\n+ <source>user.not_valid_email</source>\n+ <target>Invalid email</target>\n+ </trans-unit>\n+ <trans-unit id=\"HjWW.NS\" resname=\"user.not_valid_password\">\n+ <source>user.not_valid_password</source>\n+ <target>Invalid password</target>\n+ </trans-unit>\n</body>\n</file>\n</xliff>\n"
},
{
"change_type": "MODIFY",
"old_path": "translations/messages.nl.xlf",
"new_path": "translations/messages.nl.xlf",
"diff": "<source>listing.title_actions</source>\n<target>__listing.title_actions</target>\n</trans-unit>\n+ <trans-unit id=\"fkXL.k6\" resname=\"user.not_valid_email\">\n+ <source>user.not_valid_email</source>\n+ <target>Invalid email</target>\n+ </trans-unit>\n+ <trans-unit id=\"HjWW.NS\" resname=\"user.not_valid_password\">\n+ <source>user.not_valid_password</source>\n+ <target>Invalid password</target>\n+ </trans-unit>\n</body>\n</file>\n</xliff>\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Missing notification translates on case of invalid user edit
|
95,179 |
08.08.2019 16:34:22
| -7,200 |
9fdf46eb809dde52808992f931b34301c1cdecfe
|
Pass a *currently missing* default password for template
|
[
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/ProfileController.php",
"new_path": "src/Controller/Backend/ProfileController.php",
"diff": "@@ -87,6 +87,7 @@ class ProfileController extends TwigAwareController implements BackendZone\nreturn $this->renderTemplate('@bolt/users/edit.html.twig', [\n'display_name' => $displayName,\n'user' => $user,\n+ 'suggestedPassword' => sprintf('%s_1234', $user->getUsername()),\n]);\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Pass a *currently missing* default password for template
|
95,179 |
08.08.2019 16:35:15
| -7,200 |
428d9d7d781baca8d239d1dbb487dd193fb60ad5
|
Validation allows empty roles but template doesn't handles - fix
|
[
{
"change_type": "MODIFY",
"old_path": "templates/users/edit.html.twig",
"new_path": "templates/users/edit.html.twig",
"diff": "{% set roleOptions = [] %}\n- {% for roleName, roleHierarchy in roles %}\n+ {% for roleName, roleHierarchy in roles ?? [] %}\n{% set roleOptions = roleOptions|merge([\n{\n'key': roleName,\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Validation allows empty roles but template doesn't handles - fix
|
95,144 |
09.08.2019 05:41:14
| -7,200 |
7e4814091505fc85f6c42de8c714b793e3d431f8
|
Use `npm ci` in travis.yml
|
[
{
"change_type": "MODIFY",
"old_path": ".travis.yml",
"new_path": ".travis.yml",
"diff": "@@ -32,8 +32,8 @@ before_install:\ninstall:\n- COMPOSER_MEMORY_LIMIT=-1 composer update $COMPOSER_FLAGS\n- nvm install 12.5\n- - npm install\n- - cd tests/e2e && npm install && node ./node_modules/protractor/bin/webdriver-manager update --gecko=false && cd ../..\n+ - npm ci\n+ - cd tests/e2e && npm ci && node ./node_modules/protractor/bin/webdriver-manager update --gecko=false && cd ../..\nbefore_script:\n# build assets\n"
},
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "\"stylelint-config-standard\": \"^18.3.0\",\n\"vue-jest\": \"^3.0.4\",\n\"vue-loader\": \"^15.7.1\",\n- \"vue-router\": \"^3.1.1\",\n+ \"vue-router\": \"^3.1.2\",\n\"vue-template-compiler\": \"^2.6.10\",\n\"webpackbar\": \"^4.0.0\",\n\"workbox-webpack-plugin\": \"^4.3.1\"\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/e2e/package-lock.json",
"new_path": "tests/e2e/package-lock.json",
"diff": "}\n},\n\"ajv\": {\n- \"version\": \"6.10.1\",\n- \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.10.1.tgz\",\n- \"integrity\": \"sha512-w1YQaVGNC6t2UCPjEawK/vo/dG8OOrVtUmhBT1uJJYxbl5kU2Tj3v6LGqBcsysN1yhuCStJCCA3GqdvKY8sqXQ==\",\n+ \"version\": \"6.10.2\",\n+ \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz\",\n+ \"integrity\": \"sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==\",\n\"requires\": {\n\"fast-deep-equal\": \"^2.0.1\",\n\"fast-json-stable-stringify\": \"^2.0.0\",\n\"integrity\": \"sha1-q8av7tzqUugJzcA3au0845Y10X8=\"\n},\n\"archiver\": {\n- \"version\": \"3.0.0\",\n- \"resolved\": \"https://registry.npmjs.org/archiver/-/archiver-3.0.0.tgz\",\n- \"integrity\": \"sha512-5QeR6Xc5hSA9X1rbQfcuQ6VZuUXOaEdB65Dhmk9duuRJHYif/ZyJfuyJqsQrj34PFjU5emv5/MmfgA8un06onw==\",\n+ \"version\": \"3.1.1\",\n+ \"resolved\": \"https://registry.npmjs.org/archiver/-/archiver-3.1.1.tgz\",\n+ \"integrity\": \"sha512-5Hxxcig7gw5Jod/8Gq0OneVgLYET+oNHcxgWItq4TbhOzRLKNAFUb9edAftiMKXvXfCB0vbGrJdZDNq0dWMsxg==\",\n\"requires\": {\n- \"archiver-utils\": \"^2.0.0\",\n- \"async\": \"^2.0.0\",\n+ \"archiver-utils\": \"^2.1.0\",\n+ \"async\": \"^2.6.3\",\n\"buffer-crc32\": \"^0.2.1\",\n- \"glob\": \"^7.0.0\",\n- \"readable-stream\": \"^2.0.0\",\n- \"tar-stream\": \"^1.5.0\",\n- \"zip-stream\": \"^2.0.1\"\n+ \"glob\": \"^7.1.4\",\n+ \"readable-stream\": \"^3.4.0\",\n+ \"tar-stream\": \"^2.1.0\",\n+ \"zip-stream\": \"^2.1.2\"\n}\n},\n\"archiver-utils\": {\n- \"version\": \"2.0.0\",\n- \"resolved\": \"https://registry.npmjs.org/archiver-utils/-/archiver-utils-2.0.0.tgz\",\n- \"integrity\": \"sha512-JRBgcVvDX4Mwu2RBF8bBaHcQCSxab7afsxAPYDQ5W+19quIPP5CfKE7Ql+UHs9wYvwsaNR8oDuhtf5iqrKmzww==\",\n+ \"version\": \"2.1.0\",\n+ \"resolved\": \"https://registry.npmjs.org/archiver-utils/-/archiver-utils-2.1.0.tgz\",\n+ \"integrity\": \"sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==\",\n\"requires\": {\n- \"glob\": \"^7.0.0\",\n- \"graceful-fs\": \"^4.1.0\",\n+ \"glob\": \"^7.1.4\",\n+ \"graceful-fs\": \"^4.2.0\",\n\"lazystream\": \"^1.0.0\",\n- \"lodash.assign\": \"^4.2.0\",\n\"lodash.defaults\": \"^4.2.0\",\n\"lodash.difference\": \"^4.5.0\",\n\"lodash.flatten\": \"^4.4.0\",\n\"lodash.isplainobject\": \"^4.0.6\",\n- \"lodash.toarray\": \"^4.4.0\",\n\"lodash.union\": \"^4.6.0\",\n\"normalize-path\": \"^3.0.0\",\n\"readable-stream\": \"^2.0.0\"\n+ },\n+ \"dependencies\": {\n+ \"readable-stream\": {\n+ \"version\": \"2.3.6\",\n+ \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz\",\n+ \"integrity\": \"sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==\",\n+ \"requires\": {\n+ \"core-util-is\": \"~1.0.0\",\n+ \"inherits\": \"~2.0.3\",\n+ \"isarray\": \"~1.0.0\",\n+ \"process-nextick-args\": \"~2.0.0\",\n+ \"safe-buffer\": \"~5.1.1\",\n+ \"string_decoder\": \"~1.1.1\",\n+ \"util-deprecate\": \"~1.0.1\"\n+ }\n+ }\n}\n},\n\"array-union\": {\n}\n},\n\"async\": {\n- \"version\": \"2.6.2\",\n- \"resolved\": \"https://registry.npmjs.org/async/-/async-2.6.2.tgz\",\n- \"integrity\": \"sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==\",\n+ \"version\": \"2.6.3\",\n+ \"resolved\": \"https://registry.npmjs.org/async/-/async-2.6.3.tgz\",\n+ \"integrity\": \"sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==\",\n\"requires\": {\n- \"lodash\": \"^4.17.11\"\n+ \"lodash\": \"^4.17.14\"\n}\n},\n\"asynckit\": {\n\"integrity\": \"sha1-ibTRmasr7kneFk6gK4nORi1xt2c=\"\n},\n\"base64-js\": {\n- \"version\": \"1.3.0\",\n- \"resolved\": \"https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz\",\n- \"integrity\": \"sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==\"\n+ \"version\": \"1.3.1\",\n+ \"resolved\": \"https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz\",\n+ \"integrity\": \"sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==\"\n},\n\"bcrypt-pbkdf\": {\n\"version\": \"1.0.2\",\n\"integrity\": \"sha1-Qpzuu/pffpNueNc/vcfacWKyDiA=\"\n},\n\"bl\": {\n- \"version\": \"1.2.2\",\n- \"resolved\": \"https://registry.npmjs.org/bl/-/bl-1.2.2.tgz\",\n- \"integrity\": \"sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==\",\n+ \"version\": \"3.0.0\",\n+ \"resolved\": \"https://registry.npmjs.org/bl/-/bl-3.0.0.tgz\",\n+ \"integrity\": \"sha512-EUAyP5UHU5hxF8BPT0LKW8gjYLhq1DQIcneOX/pL/m2Alo+OYDQAJlHq+yseMP50Os2nHXOSic6Ss3vSQeyf4A==\",\n\"requires\": {\n- \"readable-stream\": \"^2.3.5\",\n- \"safe-buffer\": \"^5.1.1\"\n+ \"readable-stream\": \"^3.0.1\"\n}\n},\n\"blocking-proxy\": {\n\"resolved\": \"https://registry.npmjs.org/browsermob-proxy/-/browsermob-proxy-1.0.10.tgz\",\n\"integrity\": \"sha512-M/mrsFBwZsHVlVFmIk4xg/l7E6rWK0Xq+BKNCfFW2ITROwubqWhy2/Eg+JvQAYxDRJ3S/v0aaHrnNjm9yehlKg==\",\n\"requires\": {\n- \"webdriverio\": \"^5.11.0\"\n+ \"webdriverio\": \"^5.11.13\"\n}\n},\n\"browserstack\": {\n\"ieee754\": \"^1.1.4\"\n}\n},\n- \"buffer-alloc\": {\n- \"version\": \"1.2.0\",\n- \"resolved\": \"https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz\",\n- \"integrity\": \"sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==\",\n- \"requires\": {\n- \"buffer-alloc-unsafe\": \"^1.1.0\",\n- \"buffer-fill\": \"^1.0.0\"\n- }\n- },\n- \"buffer-alloc-unsafe\": {\n- \"version\": \"1.1.0\",\n- \"resolved\": \"https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz\",\n- \"integrity\": \"sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==\"\n- },\n\"buffer-crc32\": {\n\"version\": \"0.2.13\",\n\"resolved\": \"https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz\",\n\"integrity\": \"sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=\"\n},\n- \"buffer-fill\": {\n- \"version\": \"1.0.0\",\n- \"resolved\": \"https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz\",\n- \"integrity\": \"sha1-+PeLdniYiO858gXNY39o5wISKyw=\"\n- },\n\"buffer-from\": {\n\"version\": \"1.1.1\",\n\"resolved\": \"https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz\",\n\"integrity\": \"sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==\"\n},\n\"compress-commons\": {\n- \"version\": \"1.2.2\",\n- \"resolved\": \"https://registry.npmjs.org/compress-commons/-/compress-commons-1.2.2.tgz\",\n- \"integrity\": \"sha1-UkqfEJA/OoEzibAiXSfEi7dRiQ8=\",\n+ \"version\": \"2.1.1\",\n+ \"resolved\": \"https://registry.npmjs.org/compress-commons/-/compress-commons-2.1.1.tgz\",\n+ \"integrity\": \"sha512-eVw6n7CnEMFzc3duyFVrQEuY1BlHR3rYsSztyG32ibGMW722i3C6IizEGMFmfMU+A+fALvBIwxN3czffTcdA+Q==\",\n\"requires\": {\n- \"buffer-crc32\": \"^0.2.1\",\n- \"crc32-stream\": \"^2.0.0\",\n- \"normalize-path\": \"^2.0.0\",\n- \"readable-stream\": \"^2.0.0\"\n+ \"buffer-crc32\": \"^0.2.13\",\n+ \"crc32-stream\": \"^3.0.1\",\n+ \"normalize-path\": \"^3.0.0\",\n+ \"readable-stream\": \"^2.3.6\"\n},\n\"dependencies\": {\n- \"normalize-path\": {\n- \"version\": \"2.1.1\",\n- \"resolved\": \"https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz\",\n- \"integrity\": \"sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=\",\n+ \"readable-stream\": {\n+ \"version\": \"2.3.6\",\n+ \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz\",\n+ \"integrity\": \"sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==\",\n\"requires\": {\n- \"remove-trailing-separator\": \"^1.0.1\"\n+ \"core-util-is\": \"~1.0.0\",\n+ \"inherits\": \"~2.0.3\",\n+ \"isarray\": \"~1.0.0\",\n+ \"process-nextick-args\": \"~2.0.0\",\n+ \"safe-buffer\": \"~5.1.1\",\n+ \"string_decoder\": \"~1.1.1\",\n+ \"util-deprecate\": \"~1.0.1\"\n}\n}\n}\n}\n},\n\"crc32-stream\": {\n- \"version\": \"2.0.0\",\n- \"resolved\": \"https://registry.npmjs.org/crc32-stream/-/crc32-stream-2.0.0.tgz\",\n- \"integrity\": \"sha1-483TtN8xaN10494/u8t7KX/pCPQ=\",\n+ \"version\": \"3.0.1\",\n+ \"resolved\": \"https://registry.npmjs.org/crc32-stream/-/crc32-stream-3.0.1.tgz\",\n+ \"integrity\": \"sha512-mctvpXlbzsvK+6z8kJwSJ5crm7yBwrQMTybJzMw1O4lLGJqjlDCXY2Zw7KheiA6XBEcBmfLx1D88mjRGVJtY9w==\",\n\"requires\": {\n\"crc\": \"^3.4.4\",\n- \"readable-stream\": \"^2.0.0\"\n+ \"readable-stream\": \"^3.4.0\"\n}\n},\n\"cross-env\": {\n}\n},\n\"find\": {\n- \"version\": \"0.2.9\",\n- \"resolved\": \"https://registry.npmjs.org/find/-/find-0.2.9.tgz\",\n- \"integrity\": \"sha1-S3Px/55WrZG3bnFkB/5f/mVUu4w=\",\n+ \"version\": \"0.3.0\",\n+ \"resolved\": \"https://registry.npmjs.org/find/-/find-0.3.0.tgz\",\n+ \"integrity\": \"sha512-iSd+O4OEYV/I36Zl8MdYJO0xD82wH528SaCieTVHhclgiYNe9y+yPKSwK+A7/WsmHL1EZ+pYUJBXWTL5qofksw==\",\n\"requires\": {\n\"traverse-chain\": \"~0.1.0\"\n}\n}\n},\n\"graceful-fs\": {\n- \"version\": \"4.2.0\",\n- \"resolved\": \"https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.0.tgz\",\n- \"integrity\": \"sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg==\"\n+ \"version\": \"4.2.1\",\n+ \"resolved\": \"https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.1.tgz\",\n+ \"integrity\": \"sha512-b9usnbDGnD928gJB3LrCmxoibr3VE4U2SMo5PBuBnokWyDADTqDPXg4YpwKF1trpH+UbGp7QLicO3+aWEy0+mw==\"\n},\n\"grapheme-splitter\": {\n\"version\": \"1.0.4\",\n\"integrity\": \"sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==\"\n},\n\"inquirer\": {\n- \"version\": \"6.4.1\",\n- \"resolved\": \"https://registry.npmjs.org/inquirer/-/inquirer-6.4.1.tgz\",\n- \"integrity\": \"sha512-/Jw+qPZx4EDYsaT6uz7F4GJRNFMRdKNeUZw3ZnKV8lyuUgz/YWRCSUAJMZSVhSq4Ec0R2oYnyi6b3d4JXcL5Nw==\",\n+ \"version\": \"6.5.0\",\n+ \"resolved\": \"https://registry.npmjs.org/inquirer/-/inquirer-6.5.0.tgz\",\n+ \"integrity\": \"sha512-scfHejeG/lVZSpvCXpsB4j/wQNPM5JC8kiElOI0OUTwmc1RTpXr4H32/HOlQHcZiYl2z2VElwuCVDRG8vFmbnA==\",\n\"requires\": {\n\"ansi-escapes\": \"^3.2.0\",\n\"chalk\": \"^2.4.2\",\n\"cli-width\": \"^2.0.0\",\n\"external-editor\": \"^3.0.3\",\n\"figures\": \"^2.0.0\",\n- \"lodash\": \"^4.17.11\",\n+ \"lodash\": \"^4.17.12\",\n\"mute-stream\": \"0.0.7\",\n\"run-async\": \"^2.2.0\",\n\"rxjs\": \"^6.4.0\",\n\"pako\": \"~1.0.2\",\n\"readable-stream\": \"~2.3.6\",\n\"set-immediate-shim\": \"~1.0.1\"\n+ },\n+ \"dependencies\": {\n+ \"readable-stream\": {\n+ \"version\": \"2.3.6\",\n+ \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz\",\n+ \"integrity\": \"sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==\",\n+ \"requires\": {\n+ \"core-util-is\": \"~1.0.0\",\n+ \"inherits\": \"~2.0.3\",\n+ \"isarray\": \"~1.0.0\",\n+ \"process-nextick-args\": \"~2.0.0\",\n+ \"safe-buffer\": \"~5.1.1\",\n+ \"string_decoder\": \"~1.1.1\",\n+ \"util-deprecate\": \"~1.0.1\"\n+ }\n+ }\n}\n},\n\"kakunin\": {\n\"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n},\n\"webdriver-manager\": {\n- \"version\": \"12.1.5\",\n- \"resolved\": \"https://registry.npmjs.org/webdriver-manager/-/webdriver-manager-12.1.5.tgz\",\n- \"integrity\": \"sha512-f1apDjMpZ8SHlXtXGzqBxOjV+WQcDRz5PN7pWScgjXS7vhUIFcM3V89Shetf4A04n8DDR2MxiVQq6JproFcRZw==\",\n+ \"version\": \"12.1.6\",\n+ \"resolved\": \"https://registry.npmjs.org/webdriver-manager/-/webdriver-manager-12.1.6.tgz\",\n+ \"integrity\": \"sha512-B1mOycNCrbk7xODw7Jgq/mdD3qzPxMaTsnKIQDy2nXlQoyjTrJTTD0vRpEZI9b8RibPEyQvh9zIZ0M1mpOxS3w==\",\n\"requires\": {\n\"adm-zip\": \"^0.4.9\",\n\"chalk\": \"^1.1.1\",\n\"integrity\": \"sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=\",\n\"requires\": {\n\"readable-stream\": \"^2.0.5\"\n+ },\n+ \"dependencies\": {\n+ \"readable-stream\": {\n+ \"version\": \"2.3.6\",\n+ \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz\",\n+ \"integrity\": \"sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==\",\n+ \"requires\": {\n+ \"core-util-is\": \"~1.0.0\",\n+ \"inherits\": \"~2.0.3\",\n+ \"isarray\": \"~1.0.0\",\n+ \"process-nextick-args\": \"~2.0.0\",\n+ \"safe-buffer\": \"~5.1.1\",\n+ \"string_decoder\": \"~1.1.1\",\n+ \"util-deprecate\": \"~1.0.1\"\n+ }\n+ }\n}\n},\n\"lie\": {\n}\n},\n\"lodash\": {\n- \"version\": \"4.17.13\",\n- \"resolved\": \"https://registry.npmjs.org/lodash/-/lodash-4.17.13.tgz\",\n- \"integrity\": \"sha512-vm3/XWXfWtRua0FkUyEHBZy8kCPjErNBT9fJx8Zvs+U6zjqPbTUOpkaoum3O5uiA8sm+yNMHXfYkTUHFoMxFNA==\"\n+ \"version\": \"4.17.15\",\n+ \"resolved\": \"https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz\",\n+ \"integrity\": \"sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==\"\n},\n- \"lodash.assign\": {\n- \"version\": \"4.2.0\",\n- \"resolved\": \"https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz\",\n- \"integrity\": \"sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=\"\n+ \"lodash.clonedeep\": {\n+ \"version\": \"4.5.0\",\n+ \"resolved\": \"https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz\",\n+ \"integrity\": \"sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=\"\n},\n\"lodash.defaults\": {\n\"version\": \"4.2.0\",\n\"resolved\": \"https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz\",\n\"integrity\": \"sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==\"\n},\n- \"lodash.toarray\": {\n- \"version\": \"4.4.0\",\n- \"resolved\": \"https://registry.npmjs.org/lodash.toarray/-/lodash.toarray-4.4.0.tgz\",\n- \"integrity\": \"sha1-JMS/zWsvuji/0FlNsRedjptlZWE=\"\n- },\n\"lodash.union\": {\n\"version\": \"4.6.0\",\n\"resolved\": \"https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz\",\n\"integrity\": \"sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==\"\n},\n\"multiple-cucumber-html-reporter\": {\n- \"version\": \"1.11.8\",\n- \"resolved\": \"https://registry.npmjs.org/multiple-cucumber-html-reporter/-/multiple-cucumber-html-reporter-1.11.8.tgz\",\n- \"integrity\": \"sha512-gQTko8ZUzBvxakX8fH3z9slRFsDzPiOwFjk6yXX76bj5cOXmnfASqPjBe0G0oynEzWhQwW2VH7szD2+ngu1xaw==\",\n- \"requires\": {\n- \"chalk\": \"1.1.3\",\n- \"find\": \"^0.2.9\",\n- \"fs-extra\": \"^5.0.0\",\n- \"js-base64\": \"^2.4.3\",\n- \"jsonfile\": \"^4.0.0\",\n- \"lodash\": \"^4.17.5\",\n- \"moment\": \"^2.21.0\",\n- \"opn\": \"^5.2.0\",\n+ \"version\": \"1.12.0\",\n+ \"resolved\": \"https://registry.npmjs.org/multiple-cucumber-html-reporter/-/multiple-cucumber-html-reporter-1.12.0.tgz\",\n+ \"integrity\": \"sha512-aDQnFKJhUaEiJyww5Bd7XZ2M8/VG3U0M83QBAnfKJ8hR5A70zUpH1mnQKDlzPp6/dDmeE2P9HMateFlWXZF0zg==\",\n+ \"requires\": {\n+ \"chalk\": \"^2.4.2\",\n+ \"find\": \"^0.3.0\",\n+ \"fs-extra\": \"^8.1.0\",\n+ \"js-base64\": \"^2.5.1\",\n+ \"jsonfile\": \"^5.0.0\",\n+ \"lodash\": \"^4.17.14\",\n+ \"moment\": \"^2.24.0\",\n+ \"open\": \"^6.4.0\",\n\"uuid\": \"^3.2.1\"\n},\n\"dependencies\": {\n- \"ansi-regex\": {\n- \"version\": \"2.1.1\",\n- \"resolved\": \"https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz\",\n- \"integrity\": \"sha1-w7M6te42DYbg5ijwRorn7yfWVN8=\"\n- },\n- \"ansi-styles\": {\n- \"version\": \"2.2.1\",\n- \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n- \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n- },\n- \"chalk\": {\n- \"version\": \"1.1.3\",\n- \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n- \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n- \"requires\": {\n- \"ansi-styles\": \"^2.2.1\",\n- \"escape-string-regexp\": \"^1.0.2\",\n- \"has-ansi\": \"^2.0.0\",\n- \"strip-ansi\": \"^3.0.0\",\n- \"supports-color\": \"^2.0.0\"\n- }\n- },\n\"fs-extra\": {\n- \"version\": \"5.0.0\",\n- \"resolved\": \"https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz\",\n- \"integrity\": \"sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==\",\n+ \"version\": \"8.1.0\",\n+ \"resolved\": \"https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz\",\n+ \"integrity\": \"sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==\",\n\"requires\": {\n- \"graceful-fs\": \"^4.1.2\",\n+ \"graceful-fs\": \"^4.2.0\",\n\"jsonfile\": \"^4.0.0\",\n\"universalify\": \"^0.1.0\"\n- }\n},\n+ \"dependencies\": {\n\"jsonfile\": {\n\"version\": \"4.0.0\",\n\"resolved\": \"https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz\",\n\"requires\": {\n\"graceful-fs\": \"^4.1.6\"\n}\n+ }\n+ }\n},\n- \"strip-ansi\": {\n- \"version\": \"3.0.1\",\n- \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz\",\n- \"integrity\": \"sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=\",\n+ \"jsonfile\": {\n+ \"version\": \"5.0.0\",\n+ \"resolved\": \"https://registry.npmjs.org/jsonfile/-/jsonfile-5.0.0.tgz\",\n+ \"integrity\": \"sha512-NQRZ5CRo74MhMMC3/3r5g2k4fjodJ/wh8MxjFbCViWKFjxrnudWSY5vomh+23ZaXzAS7J3fBZIR2dV6WbmfM0w==\",\n\"requires\": {\n- \"ansi-regex\": \"^2.0.0\"\n+ \"graceful-fs\": \"^4.1.6\",\n+ \"universalify\": \"^0.1.2\"\n}\n- },\n- \"supports-color\": {\n- \"version\": \"2.0.0\",\n- \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n- \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n}\n}\n},\n\"mimic-fn\": \"^1.0.0\"\n}\n},\n- \"opn\": {\n- \"version\": \"5.5.0\",\n- \"resolved\": \"https://registry.npmjs.org/opn/-/opn-5.5.0.tgz\",\n- \"integrity\": \"sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==\",\n+ \"open\": {\n+ \"version\": \"6.4.0\",\n+ \"resolved\": \"https://registry.npmjs.org/open/-/open-6.4.0.tgz\",\n+ \"integrity\": \"sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg==\",\n\"requires\": {\n\"is-wsl\": \"^1.1.0\"\n}\n\"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n},\n\"webdriver-manager\": {\n- \"version\": \"12.1.5\",\n- \"resolved\": \"https://registry.npmjs.org/webdriver-manager/-/webdriver-manager-12.1.5.tgz\",\n- \"integrity\": \"sha512-f1apDjMpZ8SHlXtXGzqBxOjV+WQcDRz5PN7pWScgjXS7vhUIFcM3V89Shetf4A04n8DDR2MxiVQq6JproFcRZw==\",\n+ \"version\": \"12.1.6\",\n+ \"resolved\": \"https://registry.npmjs.org/webdriver-manager/-/webdriver-manager-12.1.6.tgz\",\n+ \"integrity\": \"sha512-B1mOycNCrbk7xODw7Jgq/mdD3qzPxMaTsnKIQDy2nXlQoyjTrJTTD0vRpEZI9b8RibPEyQvh9zIZ0M1mpOxS3w==\",\n\"requires\": {\n\"adm-zip\": \"^0.4.9\",\n\"chalk\": \"^1.1.1\",\n}\n},\n\"protractor-cucumber-framework\": {\n- \"version\": \"6.1.2\",\n- \"resolved\": \"https://registry.npmjs.org/protractor-cucumber-framework/-/protractor-cucumber-framework-6.1.2.tgz\",\n- \"integrity\": \"sha512-3IwKmOrvj7BK2Hyoos4pNeROaBvGnG8cI+6AXltD266EV7B2Pb9MEF+u3+FaMYG0dHv6q0b5Z0whp1Ocse6h1Q==\",\n+ \"version\": \"6.1.3\",\n+ \"resolved\": \"https://registry.npmjs.org/protractor-cucumber-framework/-/protractor-cucumber-framework-6.1.3.tgz\",\n+ \"integrity\": \"sha512-9sps6eOIAkOHU8dFF8VvjDHIc+qhJbYZqZMf/H8O72Q1Ef6+jjuFq8NYibJqP4MI6uZ40tNBLcg06siHsfGjLA==\",\n\"requires\": {\n\"debug\": \"^3.1.0\",\n\"glob\": \"^7.1.2\",\n}\n},\n\"psl\": {\n- \"version\": \"1.2.0\",\n- \"resolved\": \"https://registry.npmjs.org/psl/-/psl-1.2.0.tgz\",\n- \"integrity\": \"sha512-GEn74ZffufCmkDDLNcl3uuyF/aSD6exEyh1v/ZSdAomB82t6G9hzJVRx0jBmLDW+VfZqks3aScmMw9DszwUalA==\"\n+ \"version\": \"1.3.0\",\n+ \"resolved\": \"https://registry.npmjs.org/psl/-/psl-1.3.0.tgz\",\n+ \"integrity\": \"sha512-avHdspHO+9rQTLbv1RO+MPYeP/SzsCoxofjVnHanETfQhTJrmB0HlDoW+EiN/R+C0BZ+gERab9NY0lPN2TxNag==\"\n},\n\"punycode\": {\n\"version\": \"2.1.1\",\n\"integrity\": \"sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==\"\n},\n\"readable-stream\": {\n- \"version\": \"2.3.6\",\n- \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz\",\n- \"integrity\": \"sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==\",\n+ \"version\": \"3.4.0\",\n+ \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz\",\n+ \"integrity\": \"sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==\",\n\"requires\": {\n- \"core-util-is\": \"~1.0.0\",\n- \"inherits\": \"~2.0.3\",\n- \"isarray\": \"~1.0.0\",\n- \"process-nextick-args\": \"~2.0.0\",\n- \"safe-buffer\": \"~5.1.1\",\n- \"string_decoder\": \"~1.1.1\",\n- \"util-deprecate\": \"~1.0.1\"\n+ \"inherits\": \"^2.0.3\",\n+ \"string_decoder\": \"^1.1.1\",\n+ \"util-deprecate\": \"^1.0.1\"\n}\n},\n\"rechoir\": {\n}\n},\n\"regenerator-runtime\": {\n- \"version\": \"0.13.2\",\n- \"resolved\": \"https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz\",\n- \"integrity\": \"sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==\"\n- },\n- \"remove-trailing-separator\": {\n- \"version\": \"1.1.0\",\n- \"resolved\": \"https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz\",\n- \"integrity\": \"sha1-wkvOKig62tW8P1jg1IJJuSN52O8=\"\n+ \"version\": \"0.13.3\",\n+ \"resolved\": \"https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz\",\n+ \"integrity\": \"sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==\"\n},\n\"repeat-string\": {\n\"version\": \"1.6.1\",\n}\n},\n\"resolve\": {\n- \"version\": \"1.11.1\",\n- \"resolved\": \"https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz\",\n- \"integrity\": \"sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==\",\n+ \"version\": \"1.12.0\",\n+ \"resolved\": \"https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz\",\n+ \"integrity\": \"sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==\",\n\"requires\": {\n\"path-parse\": \"^1.0.6\"\n}\n}\n},\n\"tar-stream\": {\n- \"version\": \"1.6.2\",\n- \"resolved\": \"https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz\",\n- \"integrity\": \"sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==\",\n+ \"version\": \"2.1.0\",\n+ \"resolved\": \"https://registry.npmjs.org/tar-stream/-/tar-stream-2.1.0.tgz\",\n+ \"integrity\": \"sha512-+DAn4Nb4+gz6WZigRzKEZl1QuJVOLtAwwF+WUxy1fJ6X63CaGaUAxJRD2KEn1OMfcbCjySTYpNC6WmfQoIEOdw==\",\n\"requires\": {\n- \"bl\": \"^1.0.0\",\n- \"buffer-alloc\": \"^1.2.0\",\n- \"end-of-stream\": \"^1.0.0\",\n+ \"bl\": \"^3.0.0\",\n+ \"end-of-stream\": \"^1.4.1\",\n\"fs-constants\": \"^1.0.0\",\n- \"readable-stream\": \"^2.3.0\",\n- \"to-buffer\": \"^1.1.1\",\n- \"xtend\": \"^4.0.0\"\n+ \"inherits\": \"^2.0.3\",\n+ \"readable-stream\": \"^3.1.1\"\n}\n},\n\"thenify\": {\n\"os-tmpdir\": \"~1.0.2\"\n}\n},\n- \"to-buffer\": {\n- \"version\": \"1.1.1\",\n- \"resolved\": \"https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz\",\n- \"integrity\": \"sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==\"\n- },\n\"tough-cookie\": {\n\"version\": \"2.4.3\",\n\"resolved\": \"https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz\",\n\"integrity\": \"sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=\"\n},\n\"type\": {\n- \"version\": \"1.0.1\",\n- \"resolved\": \"https://registry.npmjs.org/type/-/type-1.0.1.tgz\",\n- \"integrity\": \"sha512-MAM5dBMJCJNKs9E7JXo4CXRAansRfG0nlJxW7Wf6GZzSOvH31zClSaHdIMWLehe/EGMBkqeC55rrkaOr5Oo7Nw==\"\n+ \"version\": \"1.0.3\",\n+ \"resolved\": \"https://registry.npmjs.org/type/-/type-1.0.3.tgz\",\n+ \"integrity\": \"sha512-51IMtNfVcee8+9GJvj0spSuFcZHe9vSib6Xtgsny1Km9ugyz2mbS08I3rsUIRYgJohFRFU1160sgRodYz378Hg==\"\n},\n\"type-detect\": {\n\"version\": \"4.0.8\",\n}\n},\n\"webdriver\": {\n- \"version\": \"5.11.0\",\n- \"resolved\": \"https://registry.npmjs.org/webdriver/-/webdriver-5.11.0.tgz\",\n- \"integrity\": \"sha512-iGjynLrEiAe8UAPtj1I53Dmn56LGlP5ypYvFUKEljo8YWbg2DEg4nLHLIE2c1RHMLQc8eXpMmWc4qkO8j5Y+Jw==\",\n+ \"version\": \"5.11.13\",\n+ \"resolved\": \"https://registry.npmjs.org/webdriver/-/webdriver-5.11.13.tgz\",\n+ \"integrity\": \"sha512-XZho6xW1G+ksPePKWP54k3nzadTf6skPUTPKUVKAdrgbPgHHEwhMEYJhRgZiQ3ZLSOF/IP6ViwsbZg+BYJ+sbA==\",\n\"requires\": {\n\"@wdio/config\": \"^5.11.0\",\n\"@wdio/logger\": \"^5.11.0\",\n}\n},\n\"webdriverio\": {\n- \"version\": \"5.11.0\",\n- \"resolved\": \"https://registry.npmjs.org/webdriverio/-/webdriverio-5.11.0.tgz\",\n- \"integrity\": \"sha512-lXZ4XKkXJt5KgnV+j7osvGvMgjGKqyer+z9kIPRyfurE4UkPsUFIT5Eg19ik8iju0p+cNY4+IuK/GXEK/uK6ag==\",\n+ \"version\": \"5.11.13\",\n+ \"resolved\": \"https://registry.npmjs.org/webdriverio/-/webdriverio-5.11.13.tgz\",\n+ \"integrity\": \"sha512-GTH4aNP4GzuxmeF+CLXIEyfYccXV2hANhqw+cQPE3U0qZ0ir3ZTSTLre90gHVJzY6rcgx0QzIMazuUbNB0kVoA==\",\n\"requires\": {\n\"@wdio/config\": \"^5.11.0\",\n\"@wdio/logger\": \"^5.11.0\",\n\"archiver\": \"^3.0.0\",\n\"css-value\": \"^0.0.1\",\n\"grapheme-splitter\": \"^1.0.2\",\n+ \"lodash.clonedeep\": \"^4.5.0\",\n\"lodash.isobject\": \"^3.0.2\",\n\"lodash.isplainobject\": \"^4.0.6\",\n- \"lodash.merge\": \"^4.6.1\",\n\"lodash.zip\": \"^4.2.0\",\n\"resq\": \"^1.5.0\",\n\"rgb2hex\": \"^0.1.0\",\n\"serialize-error\": \"^4.1.0\",\n- \"webdriver\": \"^5.11.0\"\n+ \"webdriver\": \"^5.11.13\"\n}\n},\n\"which\": {\n\"resolved\": \"https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz\",\n\"integrity\": \"sha1-1QH5ezvbQDr4757MIFcxh6rawOk=\"\n},\n- \"xtend\": {\n- \"version\": \"4.0.2\",\n- \"resolved\": \"https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz\",\n- \"integrity\": \"sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==\"\n- },\n\"zip-stream\": {\n- \"version\": \"2.0.1\",\n- \"resolved\": \"https://registry.npmjs.org/zip-stream/-/zip-stream-2.0.1.tgz\",\n- \"integrity\": \"sha512-c+eUhhkDpaK87G/py74wvWLtz2kzMPNCCkUApkun50ssE0oQliIQzWpTnwjB+MTKVIf2tGzIgHyqW/Y+W77ecQ==\",\n+ \"version\": \"2.1.2\",\n+ \"resolved\": \"https://registry.npmjs.org/zip-stream/-/zip-stream-2.1.2.tgz\",\n+ \"integrity\": \"sha512-ykebHGa2+uzth/R4HZLkZh3XFJzivhVsjJt8bN3GvBzLaqqrUdRacu+c4QtnUgjkkQfsOuNE1JgLKMCPNmkKgg==\",\n\"requires\": {\n- \"archiver-utils\": \"^2.0.0\",\n- \"compress-commons\": \"^1.2.0\",\n- \"readable-stream\": \"^2.0.0\"\n+ \"archiver-utils\": \"^2.1.0\",\n+ \"compress-commons\": \"^2.1.1\",\n+ \"readable-stream\": \"^3.4.0\"\n}\n}\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Use `npm ci` in travis.yml
|
95,144 |
09.08.2019 06:19:39
| -7,200 |
4bb15db021521fbd0adc530321e2442dadfc8cc0
|
Fix weird logic in "Edit Profile"
|
[
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/ProfileController.php",
"new_path": "src/Controller/Backend/ProfileController.php",
"diff": "@@ -8,6 +8,7 @@ use Bolt\\Common\\Json;\nuse Bolt\\Controller\\CsrfTrait;\nuse Bolt\\Controller\\TwigAwareController;\nuse Bolt\\Entity\\User;\n+use Bolt\\Utils\\Str;\nuse Doctrine\\Common\\Persistence\\ObjectManager;\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Security;\nuse Symfony\\Component\\HttpFoundation\\RedirectResponse;\n@@ -25,19 +26,13 @@ class ProfileController extends TwigAwareController implements BackendZone\n{\nuse CsrfTrait;\n- /**\n- * @var UrlGeneratorInterface\n- */\n+ /** @var UrlGeneratorInterface */\nprivate $urlGenerator;\n- /**\n- * @var ObjectManager\n- */\n+ /*** @var ObjectManager */\nprivate $em;\n- /**\n- * @var UserPasswordEncoderInterface\n- */\n+ /*** @var UserPasswordEncoderInterface */\nprivate $passwordEncoder;\npublic function __construct(\n@@ -87,11 +82,11 @@ class ProfileController extends TwigAwareController implements BackendZone\nreturn $this->renderTemplate('@bolt/users/edit.html.twig', [\n'display_name' => $displayName,\n'user' => $user,\n- 'suggestedPassword' => sprintf('%s_1234', $user->getUsername()),\n+ 'suggestedPassword' => Str::generatePassword(),\n]);\n}\n- if ($newPassword !== null) {\n+ if (! empty($newPassword)) {\n$user->setPassword($this->passwordEncoder->encodePassword($user, $newPassword));\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Fix weird logic in "Edit Profile"
|
95,144 |
10.08.2019 11:10:18
| -7,200 |
58a7137ef50722b1ac5bc8a8c9e69dd68460cb6f
|
Add full URL in API results
|
[
{
"change_type": "MODIFY",
"old_path": "src/Entity/Field/ImageField.php",
"new_path": "src/Entity/Field/ImageField.php",
"diff": "@@ -9,6 +9,7 @@ use Bolt\\Entity\\FieldInterface;\nuse Doctrine\\ORM\\Mapping as ORM;\nuse Symfony\\Component\\Asset\\PathPackage;\nuse Symfony\\Component\\Asset\\VersionStrategy\\EmptyVersionStrategy;\n+use Symfony\\Component\\HttpFoundation\\Request;\n/**\n* @ORM\\Entity\n@@ -49,6 +50,11 @@ class ImageField extends Field implements FieldInterface\n// Generate a URL\n$value['path'] = $this->getPath();\n+ // @todo This needs to be injected, not created on the fly.\n+ $package = new PathPackage('/files/', new EmptyVersionStrategy());\n+ $request = Request::createFromGlobals();\n+ $value['url'] = $request->getUriForPath($package->getUrl($this->getPath()));\n+\nreturn $value;\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Add full URL in API results
|
95,144 |
10.08.2019 14:17:41
| -7,200 |
f6b1d8d64c61e8cfb65fc073e94abc846d62fb7b
|
Preparing release 4.0.0 beta 2.
|
[
{
"change_type": "MODIFY",
"old_path": "package-lock.json",
"new_path": "package-lock.json",
"diff": "{\n\"name\": \"bolt\",\n- \"version\": \"4.0.0-beta.1\",\n+ \"version\": \"4.0.0-beta.2\",\n\"lockfileVersion\": 1,\n\"requires\": true,\n\"dependencies\": {\n\"integrity\": \"sha1-2jCcwmPfFZlMaIypAheco8fNfH4=\"\n},\n\"clone-deep\": {\n- \"version\": \"2.0.2\",\n- \"resolved\": \"https://registry.npmjs.org/clone-deep/-/clone-deep-2.0.2.tgz\",\n- \"integrity\": \"sha512-SZegPTKjCgpQH63E+eN6mVEEPdQBOUzjyJm5Pora4lrwWRFS8I0QAxV/KD6vV/i0WuijHZWQC1fMsPEdxfdVCQ==\",\n+ \"version\": \"4.0.1\",\n+ \"resolved\": \"https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz\",\n+ \"integrity\": \"sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==\",\n\"dev\": true,\n\"requires\": {\n- \"for-own\": \"^1.0.0\",\n\"is-plain-object\": \"^2.0.4\",\n- \"kind-of\": \"^6.0.0\",\n- \"shallow-clone\": \"^1.0.0\"\n+ \"kind-of\": \"^6.0.2\",\n+ \"shallow-clone\": \"^3.0.0\"\n}\n},\n\"clone-regexp\": {\n\"resolved\": \"https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz\",\n\"integrity\": \"sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=\"\n},\n- \"for-own\": {\n- \"version\": \"1.0.0\",\n- \"resolved\": \"https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz\",\n- \"integrity\": \"sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=\",\n- \"dev\": true,\n- \"requires\": {\n- \"for-in\": \"^1.0.1\"\n- }\n- },\n\"forever-agent\": {\n\"version\": \"0.6.1\",\n\"resolved\": \"https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz\",\n\"integrity\": \"sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=\",\n\"dev\": true\n},\n- \"lodash.tail\": {\n- \"version\": \"4.1.1\",\n- \"resolved\": \"https://registry.npmjs.org/lodash.tail/-/lodash.tail-4.1.1.tgz\",\n- \"integrity\": \"sha1-0jM6NtnncXyK0vfKyv7HwytERmQ=\",\n- \"dev\": true\n- },\n\"lodash.template\": {\n\"version\": \"4.5.0\",\n\"resolved\": \"https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz\",\n}\n}\n},\n- \"mixin-object\": {\n- \"version\": \"2.0.1\",\n- \"resolved\": \"https://registry.npmjs.org/mixin-object/-/mixin-object-2.0.1.tgz\",\n- \"integrity\": \"sha1-T7lJRB2rGCVA8f4DW6YOGUel5X4=\",\n- \"dev\": true,\n- \"requires\": {\n- \"for-in\": \"^0.1.3\",\n- \"is-extendable\": \"^0.1.1\"\n- },\n- \"dependencies\": {\n- \"for-in\": {\n- \"version\": \"0.1.8\",\n- \"resolved\": \"https://registry.npmjs.org/for-in/-/for-in-0.1.8.tgz\",\n- \"integrity\": \"sha1-2Hc5COMSVhCZUrH9ubP6hn0ndeE=\",\n- \"dev\": true\n- }\n- }\n- },\n\"mkdirp\": {\n\"version\": \"0.5.1\",\n\"resolved\": \"http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz\",\n}\n},\n\"sass-loader\": {\n- \"version\": \"7.1.0\",\n- \"resolved\": \"https://registry.npmjs.org/sass-loader/-/sass-loader-7.1.0.tgz\",\n- \"integrity\": \"sha512-+G+BKGglmZM2GUSfT9TLuEp6tzehHPjAMoRRItOojWIqIGPloVCMhNIQuG639eJ+y033PaGTSjLaTHts8Kw79w==\",\n+ \"version\": \"7.2.0\",\n+ \"resolved\": \"https://registry.npmjs.org/sass-loader/-/sass-loader-7.2.0.tgz\",\n+ \"integrity\": \"sha512-h8yUWaWtsbuIiOCgR9fd9c2lRXZ2uG+h8Dzg/AGNj+Hg/3TO8+BBAW9mEP+mh8ei+qBKqSJ0F1FLlYjNBc61OA==\",\n\"dev\": true,\n\"requires\": {\n- \"clone-deep\": \"^2.0.1\",\n+ \"clone-deep\": \"^4.0.1\",\n\"loader-utils\": \"^1.0.1\",\n- \"lodash.tail\": \"^4.1.1\",\n\"neo-async\": \"^2.5.0\",\n- \"pify\": \"^3.0.0\",\n+ \"pify\": \"^4.0.1\",\n\"semver\": \"^5.5.0\"\n},\n\"dependencies\": {\n+ \"pify\": {\n+ \"version\": \"4.0.1\",\n+ \"resolved\": \"https://registry.npmjs.org/pify/-/pify-4.0.1.tgz\",\n+ \"integrity\": \"sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==\",\n+ \"dev\": true\n+ },\n\"semver\": {\n\"version\": \"5.7.0\",\n\"resolved\": \"https://registry.npmjs.org/semver/-/semver-5.7.0.tgz\",\n}\n},\n\"shallow-clone\": {\n- \"version\": \"1.0.0\",\n- \"resolved\": \"https://registry.npmjs.org/shallow-clone/-/shallow-clone-1.0.0.tgz\",\n- \"integrity\": \"sha512-oeXreoKR/SyNJtRJMAKPDSvd28OqEwG4eR/xc856cRGBII7gX9lvAqDxusPm0846z/w/hWYjI1NpKwJ00NHzRA==\",\n+ \"version\": \"3.0.1\",\n+ \"resolved\": \"https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz\",\n+ \"integrity\": \"sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==\",\n\"dev\": true,\n\"requires\": {\n- \"is-extendable\": \"^0.1.1\",\n- \"kind-of\": \"^5.0.0\",\n- \"mixin-object\": \"^2.0.1\"\n- },\n- \"dependencies\": {\n- \"kind-of\": {\n- \"version\": \"5.1.0\",\n- \"resolved\": \"https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz\",\n- \"integrity\": \"sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==\",\n- \"dev\": true\n- }\n+ \"kind-of\": \"^6.0.2\"\n}\n},\n\"shebang-command\": {\n"
},
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "{\n\"name\": \"bolt\",\n- \"version\": \"4.0.0-beta.1\",\n+ \"version\": \"4.0.0-beta.2\",\n\"homepage\": \"https://boltcms.io\",\n\"author\": \"Bob den Otter <bob@twokings.nl> (https://boltcms.io)\",\n\"license\": \"MIT\",\n\"postcss-preset-env\": \"^6.7.0\",\n\"prettier\": \"^1.18.2\",\n\"regenerator-runtime\": \"^0.13.3\",\n- \"sass-loader\": \"^7.1.0\",\n+ \"sass-loader\": \"^7.2.0\",\n\"source-sans-pro\": \"^2.45.0\",\n\"stylelint\": \"^10.1.0\",\n\"stylelint-config-standard\": \"^18.3.0\",\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Preparing release 4.0.0 beta 2.
|
95,144 |
10.08.2019 18:12:54
| -7,200 |
8fef113962b82076186439c09de7f61217361f37
|
Set Twig path dynamically.
|
[
{
"change_type": "MODIFY",
"old_path": "src/Configuration/Config.php",
"new_path": "src/Configuration/Config.php",
"diff": "@@ -41,7 +41,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, []);\n+ $this->pathResolver = new PathResolver($projectDir, [], $this->get('general/theme'));\n}\nprivate function getConfig(): Collection\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Configuration/Parser/BaseParser.php",
"new_path": "src/Configuration/Parser/BaseParser.php",
"diff": "@@ -27,7 +27,7 @@ abstract class BaseParser\npublic function __construct(string $projectDir, string $initialFilename)\n{\n$this->fileLocator = new FileLocator([$projectDir . '/config/bolt']);\n- $this->pathResolver = new PathResolver(dirname(dirname(dirname(__DIR__))), []);\n+ $this->pathResolver = new PathResolver(dirname(dirname(dirname(__DIR__))));\n$this->initialFilename = $initialFilename;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Configuration/PathResolver.php",
"new_path": "src/Configuration/PathResolver.php",
"diff": "@@ -49,7 +49,7 @@ class PathResolver\n*\n* @throws ConfigurationException\n*/\n- public function __construct(string $root, array $paths = [])\n+ public function __construct(string $root, array $paths = [], string $themeName = '')\n{\nif (empty($paths)) {\n$paths = $this->defaultPaths();\n@@ -65,6 +65,8 @@ class PathResolver\n}\n$this->paths['root'] = $root;\n+\n+ $this->paths['theme'] = '%themes%/' . $themeName;\n}\n/**\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Set Twig path dynamically.
|
95,144 |
11.08.2019 11:13:04
| -7,200 |
0b0299eac684d43de28beb281c7e47a3a1d4be38
|
A number of small tweaks.
|
[
{
"change_type": "MODIFY",
"old_path": "assets/scss/layout/_admin.scss",
"new_path": "assets/scss/layout/_admin.scss",
"diff": "grid-column-gap: 1.5rem;\n}\n@include media-breakpoint-up(wd) {\n- grid-column-gap: 2rem;\n- padding: $spacer $spacer*2 $spacer $spacer*2;\n+ grid-column-gap: 3.5rem;\n+ padding: $spacer $spacer*2 $spacer $spacer*3.5;\n}\n&--has-sidebar {\n// grid-template-columns: 3fr 1fr;\n"
},
{
"change_type": "MODIFY",
"old_path": "assets/scss/modules/admin/_header.scss",
"new_path": "assets/scss/modules/admin/_header.scss",
"diff": "font-size: 1.825rem;\nfont-size: $h1-font-size;\ncolor: var(--admin-sidebar);\n- margin-top: $spacer;\n+ margin-top: 0.7rem;\nposition: relative;\n// max width set for menu button breathing room\nmax-width: 80%;\n@include media-breakpoint-up(sm) {\n- margin-top: $spacer*1.25;\n+ margin-top: 0.7rem;\n// max width set for menu button breathing room\nmax-width: 85%;\n}\n}\n&__prefix {\nfont-weight: $font-weight-normal;\n- font-size: 1rem;\n+ font-size: 1.1rem;\ndisplay: block;\n+ line-height: 2rem;\n}\n}\npadding: $spacer*1.25 $spacer*1.25 0;\n}\n@include media-breakpoint-up(wd) {\n- padding: $spacer*1.25 $spacer*2 1rem;\n+ padding: $spacer*1.25 $spacer*2 1rem $spacer*3.5;\n}\n}\n&--togglebar {\n"
},
{
"change_type": "MODIFY",
"old_path": "package-lock.json",
"new_path": "package-lock.json",
"diff": "}\n},\n\"@symfony/webpack-encore\": {\n- \"version\": \"0.27.0\",\n- \"resolved\": \"https://registry.npmjs.org/@symfony/webpack-encore/-/webpack-encore-0.27.0.tgz\",\n- \"integrity\": \"sha512-ih+H1SQkjFYe2t0wSnksMzfaiWUjlvimDFyXAgHPmeFxCUiypMgGksAz1OxnF83qjEjC08GDkjJayblQ72qIug==\",\n+ \"version\": \"0.28.0\",\n+ \"resolved\": \"https://registry.npmjs.org/@symfony/webpack-encore/-/webpack-encore-0.28.0.tgz\",\n+ \"integrity\": \"sha512-Jx3/nhhtxQHNk/vpAWFVffKGbyDUIQoodNvMOU/bxVR/vQehEQUiVLUZsjBunbrEWaeikXUsc5zbeMut8BjXeA==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/core\": \"^7.4.0\",\n\"css-loader\": \"^2.1.1\",\n\"fast-levenshtein\": \"^2.0.6\",\n\"file-loader\": \"^1.1.10\",\n- \"friendly-errors-webpack-plugin\": \"^1.7.0\",\n+ \"friendly-errors-webpack-plugin\": \"^2.0.0-beta.1\",\n\"fs-extra\": \"^2.0.0\",\n\"loader-utils\": \"^1.1.0\",\n\"lodash\": \">=3.5 <5\",\n\"terser-webpack-plugin\": \"^1.1.0\",\n\"tmp\": \"^0.0.33\",\n\"webpack\": \"^4.20.0\",\n- \"webpack-chunk-hash\": \"^0.6.0\",\n\"webpack-cli\": \"^3.0.0\",\n\"webpack-dev-server\": \"^3.1.14\",\n\"webpack-manifest-plugin\": \"^2.0.2\",\n}\n}\n},\n- \"@types/anymatch\": {\n- \"version\": \"1.3.1\",\n- \"resolved\": \"https://registry.npmjs.org/@types/anymatch/-/anymatch-1.3.1.tgz\",\n- \"integrity\": \"sha512-/+CRPXpBDpo2RK9C68N3b2cOvO0Cf5B9aPijHsoDQTHivnGSObdOF2BRQOYjojWTDy6nQvMjmqRXIxH55VjxxA==\",\n- \"dev\": true\n- },\n\"@types/babel__core\": {\n\"version\": \"7.1.2\",\n\"resolved\": \"https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.2.tgz\",\n\"integrity\": \"sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ==\",\n\"dev\": true\n},\n- \"@types/tapable\": {\n- \"version\": \"1.0.4\",\n- \"resolved\": \"https://registry.npmjs.org/@types/tapable/-/tapable-1.0.4.tgz\",\n- \"integrity\": \"sha512-78AdXtlhpCHT0K3EytMpn4JNxaf5tbqbLcbIRoQIHzpTIyjpxLQKRoxU55ujBXAtg3Nl2h/XWvfDa9dsMOd0pQ==\",\n- \"dev\": true\n- },\n- \"@types/uglify-js\": {\n- \"version\": \"3.0.4\",\n- \"resolved\": \"https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.0.4.tgz\",\n- \"integrity\": \"sha512-SudIN9TRJ+v8g5pTG8RRCqfqTMNqgWCKKd3vtynhGzkIIjxaicNAMuY5TRadJ6tzDu3Dotf3ngaMILtmOdmWEQ==\",\n- \"dev\": true,\n- \"requires\": {\n- \"source-map\": \"^0.6.1\"\n- }\n- },\n\"@types/unist\": {\n\"version\": \"2.0.3\",\n\"resolved\": \"https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz\",\n\"@types/unist\": \"*\"\n}\n},\n- \"@types/webpack\": {\n- \"version\": \"4.32.1\",\n- \"resolved\": \"https://registry.npmjs.org/@types/webpack/-/webpack-4.32.1.tgz\",\n- \"integrity\": \"sha512-9n38CBx9uga1FEAdTipnt0EkbKpsCJFh7xJb1LE65FFb/A6OOLFX022vYsGC1IyVCZ/GroNg9u/RMmlDxGcLIw==\",\n- \"dev\": true,\n- \"requires\": {\n- \"@types/anymatch\": \"*\",\n- \"@types/node\": \"*\",\n- \"@types/tapable\": \"*\",\n- \"@types/uglify-js\": \"*\",\n- \"source-map\": \"^0.6.0\"\n- }\n- },\n\"@types/yargs\": {\n\"version\": \"12.0.12\",\n\"resolved\": \"https://registry.npmjs.org/@types/yargs/-/yargs-12.0.12.tgz\",\n\"integrity\": \"sha1-aN/1++YMUes3cl6p4+0xDcwed24=\"\n},\n\"bootbox\": {\n- \"version\": \"5.3.0\",\n- \"resolved\": \"https://registry.npmjs.org/bootbox/-/bootbox-5.3.0.tgz\",\n- \"integrity\": \"sha512-INjBFCPgUg8rH2/HpW+s9BmZv/ndXdMwfHM2Xc/VIrbm5WiwdXgeK9ifvXtW8MGZwCPQPwrYZ1yQEHLkhHWXaw==\",\n+ \"version\": \"5.3.1\",\n+ \"resolved\": \"https://registry.npmjs.org/bootbox/-/bootbox-5.3.1.tgz\",\n+ \"integrity\": \"sha512-qAgUoJs3Z/11QeaJMf05T6PaX8FGY+08Tew/hLjoeIPryt2PCs4GA7OUUU2FvQ7JmyXHOjg27KfUwpTTEM91ew==\",\n\"requires\": {\n\"bootstrap\": \">=3.0.0\",\n\"jquery\": \">=1.12.0\",\n\"integrity\": \"sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=\"\n},\n\"friendly-errors-webpack-plugin\": {\n- \"version\": \"1.7.0\",\n- \"resolved\": \"https://registry.npmjs.org/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-1.7.0.tgz\",\n- \"integrity\": \"sha512-K27M3VK30wVoOarP651zDmb93R9zF28usW4ocaK3mfQeIEI5BPht/EzZs5E8QLLwbLRJQMwscAjDxYPb1FuNiw==\",\n+ \"version\": \"2.0.0-beta.2\",\n+ \"resolved\": \"https://registry.npmjs.org/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-2.0.0-beta.2.tgz\",\n+ \"integrity\": \"sha512-0x14cdjGx5q0yZc3Cy9sgAF/szWUFx1WxH/IX88UuKbM5Z+7FCk/Z/6hFbXMcz3qqK0mp7WrHKX3cxhUAL2aqQ==\",\n\"dev\": true,\n\"requires\": {\n- \"chalk\": \"^1.1.3\",\n- \"error-stack-parser\": \"^2.0.0\",\n- \"string-width\": \"^2.0.0\"\n+ \"chalk\": \"^2.4.2\",\n+ \"error-stack-parser\": \"^2.0.2\",\n+ \"string-width\": \"^2.0.0\",\n+ \"strip-ansi\": \"^5\"\n},\n\"dependencies\": {\n- \"ansi-styles\": {\n- \"version\": \"2.2.1\",\n- \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n- \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\",\n+ \"ansi-regex\": {\n+ \"version\": \"4.1.0\",\n+ \"resolved\": \"https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz\",\n+ \"integrity\": \"sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==\",\n\"dev\": true\n},\n- \"chalk\": {\n- \"version\": \"1.1.3\",\n- \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n- \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n+ \"strip-ansi\": {\n+ \"version\": \"5.2.0\",\n+ \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz\",\n+ \"integrity\": \"sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==\",\n\"dev\": true,\n\"requires\": {\n- \"ansi-styles\": \"^2.2.1\",\n- \"escape-string-regexp\": \"^1.0.2\",\n- \"has-ansi\": \"^2.0.0\",\n- \"strip-ansi\": \"^3.0.0\",\n- \"supports-color\": \"^2.0.0\"\n+ \"ansi-regex\": \"^4.1.0\"\n}\n- },\n- \"supports-color\": {\n- \"version\": \"2.0.0\",\n- \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n- \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\",\n- \"dev\": true\n}\n}\n},\n}\n},\n\"terser\": {\n- \"version\": \"4.1.3\",\n- \"resolved\": \"https://registry.npmjs.org/terser/-/terser-4.1.3.tgz\",\n- \"integrity\": \"sha512-on13d+cnpn5bMouZu+J8tPYQecsdRJCJuxFJ+FVoPBoLJgk5bCBkp+Uen2hWyi0KIUm6eDarnlAlH+KgIx/PuQ==\",\n+ \"version\": \"4.1.4\",\n+ \"resolved\": \"https://registry.npmjs.org/terser/-/terser-4.1.4.tgz\",\n+ \"integrity\": \"sha512-+ZwXJvdSwbd60jG0Illav0F06GDJF0R4ydZ21Q3wGAFKoBGyJGo34F63vzJHgvYxc1ukOtIjvwEvl9MkjzM6Pg==\",\n\"requires\": {\n\"commander\": \"^2.20.0\",\n\"source-map\": \"~0.6.1\",\n\"javascript-stringify\": \"^1.6.0\"\n}\n},\n- \"webpack-chunk-hash\": {\n- \"version\": \"0.6.0\",\n- \"resolved\": \"https://registry.npmjs.org/webpack-chunk-hash/-/webpack-chunk-hash-0.6.0.tgz\",\n- \"integrity\": \"sha512-FsOg1RpW2nf3nYpGTy/Qs59RZ7gYG+sI4VrCE8TIBQYh/Kogi04xD39Pj9zUEeUcNx9HeTVPGSO3mtmpLeX9eQ==\",\n- \"dev\": true,\n- \"requires\": {\n- \"@types/webpack\": \"^3.0.0 || ^4.0.0\"\n- }\n- },\n\"webpack-cli\": {\n\"version\": \"3.3.6\",\n\"resolved\": \"https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.3.6.tgz\",\n"
},
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "\"@vue/cli-service\": \"^3.10.0\",\n\"axios\": \"^0.19.0\",\n\"baguettebox.js\": \"^1.11.0\",\n- \"bootbox\": \"^5.3.0\",\n+ \"bootbox\": \"^5.3.1\",\n\"bootstrap\": \"^4.3.1\",\n\"codemirror\": \"^5.48.2\",\n\"dropzone\": \"^5.5.1\",\n\"simplemde\": \"^1.11.2\",\n\"stylelint-config-recommended-scss\": \"^3.3.0\",\n\"stylelint-scss\": \"^3.9.3\",\n- \"terser\": \"^4.1.3\",\n+ \"terser\": \"^4.1.4\",\n\"tinycolor2\": \"^1.4.1\",\n\"vue\": \"^2.6.10\",\n\"vue-flatpickr-component\": \"^8.1.2\",\n\"@babel/polyfill\": \"^7.4.4\",\n\"@babel/preset-env\": \"^7.5.5\",\n\"@fortawesome/fontawesome-free\": \"^5.10.1\",\n- \"@symfony/webpack-encore\": \"^0.27.0\",\n+ \"@symfony/webpack-encore\": \"^0.28.0\",\n\"@vue/test-utils\": \"^1.0.0-beta.29\",\n\"ajv-keywords\": \"^3.4.1\",\n\"autoprefixer\": \"^9.6.1\",\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/content/_buttons.html.twig",
"new_path": "templates/content/_buttons.html.twig",
"diff": "{% import '@bolt/_macro/_macro.html.twig' as macro %}\n-<div class=\"btn-group\">\n{{ macro.button('action.save', 'fa-save', 'success', {'type': 'submit', 'form': 'editcontent'}) }}\n+<div class=\"btn-group\">\n{% if record.id %}\n{{ macro.button(\n"
},
{
"change_type": "MODIFY",
"old_path": "translations/messages.it.xlf",
"new_path": "translations/messages.it.xlf",
"diff": "<unit id=\"7aLIA3c\" name=\"caption.dashboard\">\n<segment>\n<source>caption.dashboard</source>\n- <target>Dashboard</target>\n+ <target>Bolt Dashboard</target>\n</segment>\n</unit>\n<unit id=\"xuNRuUu\" name=\"caption.translations: messages\">\n<target><![CDATA[Un CMS sofisticato, semplice e leggero]]></target>\n</segment>\n</unit>\n- <unit id=\"mo_k9.1\" name=\"general.dashboard\">\n- <segment>\n- <source>general.dashboard</source>\n- <target>general.dashboard</target>\n- </segment>\n- </unit>\n<unit id=\"HK7XTUX\" name=\"caption.edit\">\n<segment state=\"translated\">\n<source>caption.edit</source>\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
A number of small tweaks.
|
95,144 |
11.08.2019 13:38:16
| -7,200 |
3472cee2b1994ff52ec36b2b8bf5ddc6327d9c8b
|
Code formatting stuffs
|
[
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/ContentEditController.php",
"new_path": "src/Controller/Backend/ContentEditController.php",
"diff": "@@ -52,6 +52,7 @@ class ContentEditController extends TwigAwareController implements BackendZone\n/** @var TemplateChooser */\nprivate $templateChooser;\n+\n/** @var ContentFillListener */\nprivate $contentFillListener;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/ExtensionsController.php",
"new_path": "src/Controller/Backend/ExtensionsController.php",
"diff": "@@ -22,6 +22,7 @@ class ExtensionsController extends AbstractController implements BackendZone\n{\n$this->extensionRegistry = $extensionRegistry;\n}\n+\n/**\n* @Route(\"/extensions\", name=\"bolt_extensions\")\n*/\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/UserEditController.php",
"new_path": "src/Controller/Backend/UserEditController.php",
"diff": "@@ -26,19 +26,13 @@ class UserEditController extends TwigAwareController implements BackendZone\n{\nuse CsrfTrait;\n- /**\n- * @var UrlGeneratorInterface\n- */\n+ /** @var UrlGeneratorInterface */\nprivate $urlGenerator;\n- /**\n- * @var ObjectManager\n- */\n+ /** @var ObjectManager */\nprivate $em;\n- /**\n- * @var UserPasswordEncoderInterface\n- */\n+ /** @var UserPasswordEncoderInterface */\nprivate $passwordEncoder;\npublic function __construct(\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/CsrfTrait.php",
"new_path": "src/Controller/CsrfTrait.php",
"diff": "@@ -11,9 +11,7 @@ use Symfony\\Component\\Security\\Csrf\\CsrfTokenManagerInterface;\ntrait CsrfTrait\n{\n- /**\n- * @var CsrfTokenManagerInterface\n- */\n+ /** @var CsrfTokenManagerInterface */\nprotected $csrfTokenManager;\nprotected function validateCsrf(Request $request, string $tokenId): void\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Frontend/DetailController.php",
"new_path": "src/Controller/Frontend/DetailController.php",
"diff": "@@ -15,19 +15,13 @@ use Symfony\\Component\\Routing\\Annotation\\Route;\nclass DetailController extends TwigAwareController implements FrontendZone\n{\n- /**\n- * @var TemplateChooser\n- */\n+ /** @var TemplateChooser */\nprivate $templateChooser;\n- /**\n- * @var ContentRepository\n- */\n+ /** @var ContentRepository */\nprivate $contentRepository;\n- /**\n- * @var FieldRepository\n- */\n+ /** @var FieldRepository */\nprivate $fieldRepository;\npublic function __construct(TemplateChooser $templateChooser, ContentRepository $contentRepository, FieldRepository $fieldRepository)\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Frontend/HomepageController.php",
"new_path": "src/Controller/Frontend/HomepageController.php",
"diff": "@@ -12,9 +12,7 @@ use Symfony\\Component\\Routing\\Annotation\\Route;\nclass HomepageController extends TwigAwareController implements FrontendZone\n{\n- /**\n- * @var TemplateChooser\n- */\n+ /** @var TemplateChooser */\nprivate $templateChooser;\npublic function __construct(TemplateChooser $templateChooser)\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Frontend/ListingController.php",
"new_path": "src/Controller/Frontend/ListingController.php",
"diff": "@@ -15,9 +15,7 @@ use Symfony\\Component\\Routing\\Annotation\\Route;\nclass ListingController extends TwigAwareController implements FrontendZone\n{\n- /**\n- * @var TemplateChooser\n- */\n+ /** @var TemplateChooser */\nprivate $templateChooser;\npublic function __construct(TemplateChooser $templateChooser)\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Frontend/SearchController.php",
"new_path": "src/Controller/Frontend/SearchController.php",
"diff": "@@ -15,9 +15,7 @@ use Symfony\\Component\\Routing\\Annotation\\Route;\nclass SearchController extends TwigAwareController implements FrontendZone\n{\n- /**\n- * @var TemplateChooser\n- */\n+ /** @var TemplateChooser */\nprivate $templateChooser;\npublic function __construct(TemplateChooser $templateChooser)\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Frontend/TaxonomyController.php",
"new_path": "src/Controller/Frontend/TaxonomyController.php",
"diff": "@@ -14,9 +14,7 @@ use Symfony\\Component\\Routing\\Annotation\\Route;\nclass TaxonomyController extends TwigAwareController implements FrontendZone\n{\n- /**\n- * @var TemplateChooser\n- */\n+ /** @var TemplateChooser */\nprivate $templateChooser;\npublic function __construct(TemplateChooser $templateChooser)\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/UserTrait.php",
"new_path": "src/Controller/UserTrait.php",
"diff": "@@ -10,9 +10,7 @@ use Symfony\\Component\\Security\\Core\\Exception\\UnsupportedUserException;\ntrait UserTrait\n{\n- /**\n- * @var TokenStorageInterface\n- */\n+ /** @var TokenStorageInterface */\nprotected $tokenStorage;\nprotected function getUser(): ?User\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Event/Listener/FieldDiscriminatorListener.php",
"new_path": "src/Event/Listener/FieldDiscriminatorListener.php",
"diff": "@@ -17,9 +17,7 @@ use Doctrine\\ORM\\ORMException;\n*/\nclass FieldDiscriminatorListener\n{\n- /**\n- * @var MappingDriver\n- */\n+ /** @var MappingDriver */\nprivate $mappingDriver;\n/**\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/ContentExtension.php",
"new_path": "src/Twig/ContentExtension.php",
"diff": "@@ -20,14 +20,10 @@ use Twig\\TwigFunction;\nclass ContentExtension extends AbstractExtension\n{\n- /**\n- * @var UrlGeneratorInterface\n- */\n+ /** @var UrlGeneratorInterface */\nprivate $urlGenerator;\n- /**\n- * @var ContentRepository\n- */\n+ /** @var ContentRepository */\nprivate $contentRepository;\n/** @var CsrfTokenManagerInterface */\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/JsonExtension.php",
"new_path": "src/Twig/JsonExtension.php",
"diff": "@@ -13,9 +13,7 @@ class JsonExtension extends AbstractExtension\n{\nprivate const SERIALIZE_GROUP = 'get_content';\n- /**\n- * @var NormalizerInterface\n- */\n+ /** @var NormalizerInterface */\nprivate $normalizer;\npublic function __construct(NormalizerInterface $normalizer)\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/TranslatableExtension.php",
"new_path": "src/Twig/TranslatableExtension.php",
"diff": "@@ -14,14 +14,10 @@ use Twig\\TwigFunction;\nclass TranslatableExtension extends AbstractExtension\n{\n- /**\n- * @var EntityManagerInterface\n- */\n+ /** @var EntityManagerInterface */\nprivate $em;\n- /**\n- * @var TranslationRepository\n- */\n+ /** @var TranslationRepository */\nprivate $translationRepository;\npublic function __construct(EntityManagerInterface $em)\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Utils/Str.php",
"new_path": "src/Utils/Str.php",
"diff": "@@ -15,9 +15,7 @@ class Str extends \\Bolt\\Common\\Str\n*/\nprivate static $slugifyInstance = null;\n- /**\n- * @var Slugify[]\n- */\n+ /** @var Slugify[] */\nprivate static $slugifySafeInstances = [];\n/**\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Code formatting stuffs
|
95,144 |
11.08.2019 18:39:06
| -7,200 |
c1eb8d3698b06e82cf4979a5f45e899d99fdb875
|
Working on some more tiny tweaks
|
[
{
"change_type": "ADD",
"old_path": null,
"new_path": "assets/scss/modules/editor/fields/_pre_postfix.scss",
"diff": "+.form--helper {\n+ font-size: 0.95rem;\n+ color: #666;\n+ max-width: 46em;\n+ display: inline-block;\n+ margin: 0.5rem 0;\n+}\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "assets/scss/modules/editor/fields/fields.scss",
"new_path": "assets/scss/modules/editor/fields/fields.scss",
"diff": "@import '_textarea';\n@import '_date';\n@import '_image';\n+@import '_pre_postfix';\n"
},
{
"change_type": "MODIFY",
"old_path": "config/bolt/config.yaml",
"new_path": "config/bolt/config.yaml",
"diff": "@@ -31,7 +31,7 @@ theme: skeleton\n#\n# This can be done as [nl_NL, Dutch_Netherlands] when specifying multiple\n# locales, ensure the first is a standard locale.\n-locale: nl_NL\n+locale: en\n# Set the timezone to be used on the website. For a list of valid timezone\n# settings, see: http://php.net/manual/en/timezones.php\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Command/SetupCommand.php",
"new_path": "src/Command/SetupCommand.php",
"diff": "@@ -8,6 +8,7 @@ use Symfony\\Component\\Console\\Command\\Command;\nuse Symfony\\Component\\Console\\Input\\ArrayInput;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\n+use Symfony\\Component\\Console\\Style\\SymfonyStyle;\nclass SetupCommand extends Command\n{\n@@ -20,21 +21,32 @@ class SetupCommand extends Command\nprotected function execute(InputInterface $input, OutputInterface $output): ?int\n{\n+ $exitCode = 0;\n+ $io = new SymfonyStyle($input, $output);\n+\n$command = $this->getApplication()->find('doctrine:database:create');\n$commandInput = new ArrayInput(['-q' => true]);\n- $command->run($commandInput, $output);\n+ $exitCode += $command->run($commandInput, $output);\n$command = $this->getApplication()->find('doctrine:schema:create');\n$commandInput = new ArrayInput([]);\n- $command->run($commandInput, $output);\n+ $exitCode += $command->run($commandInput, $output);\n$command = $this->getApplication()->find('bolt:add-user');\n$commandInput = new ArrayInput(['--admin' => true]);\n- $command->run($commandInput, $output);\n+ $exitCode += $command->run($commandInput, $output);\n$command = $this->getApplication()->find('doctrine:fixtures:load');\n$commandInput = new ArrayInput(['--append' => true]);\n- $command->run($commandInput, $output);\n+ $exitCode += $command->run($commandInput, $output);\n+\n+ $io->newLine();\n+\n+ if ($exitCode !== 0) {\n+ $io->error('Some errors occurred while setting up Bolt.');\n+ } else {\n+ $io->success('Bolt was set up successfully! Start a web server, and open your Bolt site in a browser.');\n+ }\nreturn null;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/ImageExtension.php",
"new_path": "src/Twig/ImageExtension.php",
"diff": "@@ -137,6 +137,10 @@ class ImageExtension extends AbstractExtension\n{\n$filename = null;\n+ if ($image instanceof Content) {\n+ $image = $this->getImageFromContent($image);\n+ }\n+\nif ($image instanceof ImageField) {\n$filename = $image->get('filename');\n} elseif (is_array($image)) {\n@@ -155,6 +159,10 @@ class ImageExtension extends AbstractExtension\n{\n$alt = '';\n+ if ($image instanceof Content) {\n+ $image = $this->getImageFromContent($image);\n+ }\n+\nif ($image instanceof ImageField) {\n$alt = $image->get('alt');\n} elseif (is_array($image)) {\n@@ -165,4 +173,15 @@ class ImageExtension extends AbstractExtension\nreturn htmlentities($alt, ENT_QUOTES);\n}\n+\n+ private function getImageFromContent(Content $content)\n+ {\n+ foreach ($content->getFields() as $field) {\n+ if ($field instanceof ImageField) {\n+ return $field->getValue();\n+ }\n+ }\n+\n+ return null;\n+ }\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/media/edit.html.twig",
"new_path": "templates/media/edit.html.twig",
"diff": "<div class=\"card-body\">\n<form>\n- <div class=\"form-group\">\n+ <span class=\"form-group\">\n<button type=\"submit\" class=\"btn btn-success mb-3\" form=\"editcontent\">\n<i class=\"fas fa-save mr-2\"></i> {{ 'action.save'|trans }}\n</button>\n+ <p>{{ 'label.predominant_colors__in_image'|trans }}:\n<ul class=\"ui divided selection list\" id=\"swatcheslist\">\n</ul>\n+ </p>\n- </div>\n{% include '@bolt/_partials/fields/text.html.twig' with {\n'label': 'field.id'|trans,\nvar swatches = vibrant.swatches();\nfor (var swatch in swatches) {\nif (swatches.hasOwnProperty(swatch) && swatches[swatch]) {\n+ // <li>Vibrant <span class=\"badge badge-secondary\" style=\"background-color: #94ad49\">#94ad49</span></li>\n+\nvar elem = document.createElement('li');\n- var label = document.createElement('div');\n+ var badge = document.createElement('span');\nvar labelNode = document.createTextNode(swatches[swatch].getHex());\nvar referenceNode = document.getElementById('swatcheslist');\n- label.className = \"ui horizontal label\";\n- label.setAttribute('style', 'background-color: ' + swatches[swatch].getHex());\n- elem.appendChild(label).appendChild(labelNode);\n+ badge.className = \"badge badge-secondary ml-2\";\n+ badge.setAttribute('style', 'background-color: ' + swatches[swatch].getHex());\nelem.appendChild(document.createTextNode(swatch));\n+ elem.appendChild(badge).appendChild(labelNode);\nreferenceNode.append(elem);\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "translations/messages.en.xlf",
"new_path": "translations/messages.en.xlf",
"diff": "<target>Unknown user</target>\n</segment>\n</unit>\n+ <unit id=\"EaqUUfe\" name=\"label.predominant_colors__in_image\">\n+ <segment>\n+ <source>label.predominant_colors__in_image</source>\n+ <target>Predominant colors in image</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>Voorvertoning</target>\n</segment>\n</unit>\n+ <unit id=\"EaqUUfe\" name=\"label.predominant_colors__in_image\">\n+ <segment>\n+ <source>label.predominant_colors__in_image</source>\n+ <target>Overheersende kleuren in afbeelding</target>\n+ </segment>\n+ </unit>\n</file>\n</xliff>\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Working on some more tiny tweaks
|
95,144 |
11.08.2019 18:45:25
| -7,200 |
7dc76751b3ea384e88fa3ce65f70dc2f6f549e73
|
Update edit.html.twig
|
[
{
"change_type": "MODIFY",
"old_path": "templates/media/edit.html.twig",
"new_path": "templates/media/edit.html.twig",
"diff": "<div class=\"card-body\">\n<form>\n- <span class=\"form-group\">\n+ <div class=\"form-group\">\n<button type=\"submit\" class=\"btn btn-success mb-3\" form=\"editcontent\">\n<i class=\"fas fa-save mr-2\"></i> {{ 'action.save'|trans }}\n</button>\n<ul class=\"ui divided selection list\" id=\"swatcheslist\">\n</ul>\n</p>\n-\n+ </div>\n{% include '@bolt/_partials/fields/text.html.twig' with {\n'label': 'field.id'|trans,\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Update edit.html.twig
|
95,144 |
11.08.2019 19:33:20
| -7,200 |
bb82c7b357aaa7680b49da294c2a9e505c386758
|
Fix taxonomy controller
|
[
{
"change_type": "MODIFY",
"old_path": "src/Controller/Frontend/TaxonomyController.php",
"new_path": "src/Controller/Frontend/TaxonomyController.php",
"diff": "@@ -35,11 +35,19 @@ class TaxonomyController extends TwigAwareController implements FrontendZone\n$page = (int) $request->query->get('page', 1);\n$amountPerPage = $this->config->get('general/listing_records');\n+ $taxonomy = $this->config->get('taxonomies/'. $taxonomyslug);\n+\n/** @var Content[] $records */\n$records = $contentRepository->findForTaxonomy($page, $taxonomyslug, $slug, $amountPerPage);\n$templates = $this->templateChooser->forTaxonomy($taxonomyslug);\n- return $this->renderTemplate($templates, ['records' => $records]);\n+ $twigVars = [\n+ 'records' => $records,\n+ 'taxonomy' => $taxonomy,\n+ 'slug' => $slug,\n+ ];\n+\n+ return $this->renderTemplate($templates, $twigVars);\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "translations/messages.en.xlf",
"new_path": "translations/messages.en.xlf",
"diff": "<target>Unknown user</target>\n</segment>\n</unit>\n+ <unit id=\"EaqUUfe\" name=\"label.predominant_colors__in_image\">\n+ <segment>\n+ <source>label.predominant_colors__in_image</source>\n+ <target>Predominant colors in image</target>\n+ </segment>\n+ </unit>\n+ <unit id=\"8RPjZ5w\" name=\"general.phrase.overview-for\">\n+ <segment>\n+ <source>general.phrase.overview-for</source>\n+ <target>Overview for '%slug%'</target>\n+ </segment>\n+ </unit>\n</file>\n</xliff>\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Fix taxonomy controller
|
95,144 |
16.08.2019 15:54:48
| -7,200 |
51e9bdf89c8c56881bfcd486f6667bd0ccebc831
|
Use `Bolt\Common` instead of `Bolt\Utils\Str`
|
[
{
"change_type": "MODIFY",
"old_path": "src/Command/AddUserCommand.php",
"new_path": "src/Command/AddUserCommand.php",
"diff": "@@ -4,9 +4,9 @@ declare(strict_types=1);\nnamespace Bolt\\Command;\n+use Bolt\\Common\\Str;\nuse Bolt\\Entity\\User;\nuse Bolt\\Repository\\UserRepository;\n-use Bolt\\Utils\\Str;\nuse Bolt\\Utils\\Validator;\nuse Doctrine\\ORM\\EntityManagerInterface;\nuse Symfony\\Component\\Console\\Command\\Command;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Configuration/Parser/ContentTypesParser.php",
"new_path": "src/Configuration/Parser/ContentTypesParser.php",
"diff": "@@ -5,10 +5,10 @@ declare(strict_types=1);\nnamespace Bolt\\Configuration\\Parser;\nuse Bolt\\Common\\Arr;\n+use Bolt\\Common\\Str;\nuse Bolt\\Configuration\\Content\\ContentType;\nuse Bolt\\Enum\\Statuses;\nuse Bolt\\Exception\\ConfigurationException;\n-use Bolt\\Utils\\Str;\nuse Tightenco\\Collect\\Support\\Collection;\nclass ContentTypesParser extends BaseParser\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Configuration/Parser/GeneralParser.php",
"new_path": "src/Configuration/Parser/GeneralParser.php",
"diff": "@@ -5,8 +5,8 @@ declare(strict_types=1);\nnamespace Bolt\\Configuration\\Parser;\nuse Bolt\\Common\\Arr;\n+use Bolt\\Common\\Str;\nuse Bolt\\Utils\\Html;\n-use Bolt\\Utils\\Str;\nuse Tightenco\\Collect\\Support\\Collection;\nuse Webmozart\\PathUtil\\Path;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Configuration/Parser/TaxonomyParser.php",
"new_path": "src/Configuration/Parser/TaxonomyParser.php",
"diff": "@@ -4,7 +4,7 @@ declare(strict_types=1);\nnamespace Bolt\\Configuration\\Parser;\n-use Bolt\\Utils\\Str;\n+use Bolt\\Common\\Str;\nuse Tightenco\\Collect\\Support\\Collection;\nclass TaxonomyParser extends BaseParser\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/ProfileController.php",
"new_path": "src/Controller/Backend/ProfileController.php",
"diff": "@@ -5,10 +5,10 @@ declare(strict_types=1);\nnamespace Bolt\\Controller\\Backend;\nuse Bolt\\Common\\Json;\n+use Bolt\\Common\\Str;\nuse Bolt\\Controller\\CsrfTrait;\nuse Bolt\\Controller\\TwigAwareController;\nuse Bolt\\Entity\\User;\n-use Bolt\\Utils\\Str;\nuse Doctrine\\Common\\Persistence\\ObjectManager;\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Security;\nuse Symfony\\Component\\HttpFoundation\\RedirectResponse;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/UserEditController.php",
"new_path": "src/Controller/Backend/UserEditController.php",
"diff": "@@ -5,10 +5,10 @@ declare(strict_types=1);\nnamespace Bolt\\Controller\\Backend;\nuse Bolt\\Common\\Json;\n+use Bolt\\Common\\Str;\nuse Bolt\\Controller\\CsrfTrait;\nuse Bolt\\Controller\\TwigAwareController;\nuse Bolt\\Entity\\User;\n-use Bolt\\Utils\\Str;\nuse Doctrine\\Common\\Persistence\\ObjectManager;\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Security;\nuse Symfony\\Component\\HttpFoundation\\RedirectResponse;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/DataFixtures/TaxonomyFixtures.php",
"new_path": "src/DataFixtures/TaxonomyFixtures.php",
"diff": "@@ -5,9 +5,9 @@ declare(strict_types=1);\nnamespace Bolt\\DataFixtures;\nuse Bolt\\Collection\\DeepCollection;\n+use Bolt\\Common\\Str;\nuse Bolt\\Configuration\\Config;\nuse Bolt\\Entity\\Taxonomy;\n-use Bolt\\Utils\\Str;\nuse Doctrine\\Bundle\\FixturesBundle\\FixtureGroupInterface;\nuse Doctrine\\Common\\Persistence\\ObjectManager;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/DataFixtures/UserFixtures.php",
"new_path": "src/DataFixtures/UserFixtures.php",
"diff": "@@ -4,9 +4,9 @@ declare(strict_types=1);\nnamespace Bolt\\DataFixtures;\n+use Bolt\\Common\\Str;\nuse Bolt\\Entity\\User;\nuse Bolt\\Repository\\UserRepository;\n-use Bolt\\Utils\\Str;\nuse Doctrine\\Bundle\\FixturesBundle\\FixtureGroupInterface;\nuse Doctrine\\Common\\Persistence\\ObjectManager;\nuse Symfony\\Component\\Security\\Core\\Encoder\\UserPasswordEncoderInterface;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Entity/Field/SlugField.php",
"new_path": "src/Entity/Field/SlugField.php",
"diff": "@@ -4,9 +4,9 @@ declare(strict_types=1);\nnamespace Bolt\\Entity\\Field;\n+use Bolt\\Common\\Str;\nuse Bolt\\Entity\\Field;\nuse Bolt\\Entity\\FieldInterface;\n-use Bolt\\Utils\\Str;\nuse Doctrine\\ORM\\Mapping as ORM;\nuse Tightenco\\Collect\\Support\\Collection;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Entity/Taxonomy.php",
"new_path": "src/Entity/Taxonomy.php",
"diff": "@@ -4,7 +4,7 @@ declare(strict_types=1);\nnamespace Bolt\\Entity;\n-use Bolt\\Utils\\Str;\n+use Bolt\\Common\\Str;\nuse Doctrine\\Common\\Collections\\ArrayCollection;\nuse Doctrine\\Common\\Collections\\Collection;\nuse Doctrine\\ORM\\Mapping as ORM;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/TextExtension.php",
"new_path": "src/Twig/TextExtension.php",
"diff": "@@ -4,7 +4,7 @@ declare(strict_types=1);\nnamespace Bolt\\Twig;\n-use Bolt\\Utils\\Str;\n+use Bolt\\Common\\Str;\nuse Twig\\Extension\\AbstractExtension;\nuse Twig\\TwigFilter;\n"
},
{
"change_type": "DELETE",
"old_path": "src/Utils/Str.php",
"new_path": null,
"diff": "-<?php\n-\n-declare(strict_types=1);\n-\n-namespace Bolt\\Utils;\n-\n-use Cocur\\Slugify\\Slugify;\n-\n-class Str extends \\Bolt\\Common\\Str\n-{\n- /**\n- * We use Slugify as a Singleton because Slugify::create() is quite heavy\n- *\n- * @var Slugify\n- */\n- private static $slugifyInstance = null;\n-\n- /** @var Slugify[] */\n- private static $slugifySafeInstances = [];\n-\n- /**\n- * Returns a \"safe\" version of the given string - basically only US-ASCII and\n- * numbers. Needed because filenames and titles and such, can't use all characters.\n- */\n- public static function makeSafe(string $str, bool $strict = false, string $extrachars = ''): string\n- {\n- $str = str_replace('&', '', $str);\n-\n- $slugify = self::getSafeSlugify($strict, $extrachars);\n- $str = $slugify->slugify($str, '');\n-\n- if ($strict) {\n- $str = str_replace(' ', '-', $str);\n- }\n-\n- return $str;\n- }\n-\n- public static function slug(string $str, $options = null): string\n- {\n- return self::getSlugify()->slugify($str, $options);\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. Only breaks in long (> 19 chars) words.\n- */\n- public static function shyphenate(string $str): string\n- {\n- $res = preg_match_all('/([a-z0-9]{19,})/i', $str, $matches);\n-\n- if ($res) {\n- foreach ($matches[1] as $match) {\n- $str = str_replace($match, wordwrap($match, 10, '­', true), $str);\n- }\n- }\n-\n- return $str;\n- }\n-\n- private static function getSlugify(): Slugify\n- {\n- if (self::$slugifyInstance === null) {\n- self::$slugifyInstance = Slugify::create();\n- }\n- return self::$slugifyInstance;\n- }\n-\n- private static function getSafeSlugify(bool $strict = false, string $extrachars = ''): Slugify\n- {\n- $key = $strict ? 'strict_' : '' . $extrachars;\n-\n- if (empty(self::$slugifySafeInstances[$key]) === true) {\n- $delim = '/';\n- if ($extrachars !== '') {\n- $extrachars = preg_quote($extrachars, $delim);\n- }\n- if ($strict) {\n- $slugify = Slugify::create([\n- 'regexp' => '/[^a-z0-9_' . $extrachars . ' -]+/',\n- ]);\n- } else {\n- // Allow Uppercase and don't convert spaces to dashes\n- $slugify = Slugify::create([\n- 'regexp' => '/[^a-zA-Z0-9_.,' . $extrachars . ' -]+/',\n- 'lowercase' => false,\n- ]);\n- }\n-\n- self::$slugifySafeInstances[$key] = $slugify;\n- }\n-\n- return self::$slugifySafeInstances[$key];\n- }\n-\n- public static function generatePassword($length = 12)\n- {\n- // The \"pool\" of potential characters contains special characters, but\n- // with less frequency than 'a-z' and '0-9'.\n- $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789' .\n- 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789' .\n- 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789' .\n- 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789' .\n- '-=~!@#$%^&*()_+,./<>?;:[]{}\\|';\n-\n- $str = '';\n- $max = mb_strlen($chars) - 1;\n-\n- for ($i = 0; $i < $length; $i++) {\n- $str .= $chars[random_int(0, $max)];\n- }\n-\n- return $str;\n- }\n-}\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/php/Utils/StrTest.php",
"new_path": "tests/php/Utils/StrTest.php",
"diff": "@@ -4,7 +4,7 @@ declare(strict_types=1);\nnamespace Bolt\\Tests\\Utils;\n-use Bolt\\Utils\\Str;\n+use Bolt\\Common\\Str;\nclass StrTest extends \\PHPUnit\\Framework\\TestCase\n{\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Use `Bolt\Common` instead of `Bolt\Utils\Str`
|
95,144 |
16.08.2019 15:55:21
| -7,200 |
7069581e002cc32f9b60fb8d1affc24415740263
|
Use Symfony/HttpClient instead of Guzzle
|
[
{
"change_type": "MODIFY",
"old_path": "src/DataFixtures/ImageFetchFixtures.php",
"new_path": "src/DataFixtures/ImageFetchFixtures.php",
"diff": "@@ -7,10 +7,10 @@ namespace Bolt\\DataFixtures;\nuse Bolt\\Configuration\\FileLocations;\nuse Doctrine\\Bundle\\FixturesBundle\\FixtureGroupInterface;\nuse Doctrine\\Common\\Persistence\\ObjectManager;\n-use GuzzleHttp\\Client;\nuse Illuminate\\Support\\Collection;\nuse Symfony\\Component\\Console\\Helper\\ProgressBar;\nuse Symfony\\Component\\Console\\Output\\ConsoleOutput;\n+use Symfony\\Component\\HttpClient\\HttpClient;\nclass ImageFetchFixtures extends BaseFixture implements FixtureGroupInterface\n{\n@@ -67,9 +67,10 @@ class ImageFetchFixtures extends BaseFixture implements FixtureGroupInterface\n$url = $this->urls->random() . random_int(10000, 99999);\n$filename = 'image_' . random_int(10000, 99999) . '.jpg';\n- $client = new Client();\n+ $client = HttpClient::create();\n$resource = fopen($outputPath . $filename, 'w');\n- $client->request('GET', $url, ['sink' => $resource]);\n+ fwrite($resource, $client->request('GET', $url)->getContent());\n+ fclose($resource);\n$progressBar->advance();\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Use Symfony/HttpClient instead of Guzzle
|
95,144 |
16.08.2019 15:55:52
| -7,200 |
1403750785db3fa794deee82dfaa9e53dcbb8b15
|
Use `Json::json_encode` instead of `\GuzzleHttp\json_encode`
|
[
{
"change_type": "MODIFY",
"old_path": "src/Repository/ContentRepository.php",
"new_path": "src/Repository/ContentRepository.php",
"diff": "@@ -4,6 +4,7 @@ declare(strict_types=1);\nnamespace Bolt\\Repository;\n+use Bolt\\Common\\Json;\nuse Bolt\\Configuration\\Content\\ContentType;\nuse Bolt\\Entity\\Content;\nuse Bolt\\Enum\\Statuses;\n@@ -157,7 +158,7 @@ class ContentRepository extends ServiceEntityRepository\n'field.id = slug.id'\n)\n->andWhere('slug.value = :slug')\n- ->setParameter('slug', \\GuzzleHttp\\json_encode([$slug]))\n+ ->setParameter('slug', Json::json_encode([$slug]))\n->getQuery()\n->getOneOrNullResult();\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Repository/FieldRepository.php",
"new_path": "src/Repository/FieldRepository.php",
"diff": "@@ -4,6 +4,7 @@ declare(strict_types=1);\nnamespace Bolt\\Repository;\n+use Bolt\\Common\\Json;\nuse Bolt\\Entity\\Field;\nuse Doctrine\\Bundle\\DoctrineBundle\\Repository\\ServiceEntityRepository;\nuse Doctrine\\ORM\\QueryBuilder;\n@@ -31,7 +32,7 @@ class FieldRepository extends ServiceEntityRepository\n{\nreturn $this->getQueryBuilder()\n->andWhere('field.value = :slug')\n- ->setParameter('slug', \\GuzzleHttp\\json_encode([$slug]))\n+ ->setParameter('slug', Json::json_encode([$slug]))\n->getQuery()\n->getOneOrNullResult();\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Storage/Query/SelectQuery.php",
"new_path": "src/Storage/Query/SelectQuery.php",
"diff": "@@ -4,6 +4,7 @@ declare(strict_types=1);\nnamespace Bolt\\Storage\\Query;\n+use Bolt\\Common\\Json;\nuse Doctrine\\ORM\\Query\\Expr\\Base;\nuse Doctrine\\ORM\\Query\\ParameterTypeInferer;\nuse Doctrine\\ORM\\QueryBuilder;\n@@ -325,7 +326,7 @@ class SelectQuery implements ContentQueryInterface\n)\n->setParameter($keyParam, $key);\nforeach ($filter->getParameters() as $key => $value) {\n- $this->qb->setParameter($key, \\GuzzleHttp\\json_encode([$value]));\n+ $this->qb->setParameter($key, Json::json_encode([$value]));\n}\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/JsonExtension.php",
"new_path": "src/Twig/JsonExtension.php",
"diff": "@@ -4,6 +4,7 @@ declare(strict_types=1);\nnamespace Bolt\\Twig;\n+use Bolt\\Common\\Json;\nuse Bolt\\Entity\\Content;\nuse Symfony\\Component\\Serializer\\Normalizer\\NormalizerInterface;\nuse Twig\\Extension\\AbstractExtension;\n@@ -34,7 +35,7 @@ class JsonExtension extends AbstractExtension\npublic function jsonRecords($records): string\n{\n- return \\GuzzleHttp\\json_encode($this->normalizeRecords($records));\n+ return Json::json_encode($this->normalizeRecords($records));\n}\npublic function normalizeRecords($records): array\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Use `Json::json_encode` instead of `\GuzzleHttp\json_encode`
|
95,144 |
16.08.2019 16:15:57
| -7,200 |
4e01234c859d17b968afcdea56c160003fb16683
|
Distinguish between editing "New Page" and "Untitled Page"
|
[
{
"change_type": "MODIFY",
"old_path": "translations/messages.en.xlf",
"new_path": "translations/messages.en.xlf",
"diff": "<target>Search</target>\n</segment>\n</unit>\n+ <unit id=\"QoeqyPT\" name=\"caption.new_contenttype\">\n+ <segment>\n+ <source>caption.new_contenttype</source>\n+ <target>New %contenttype%</target>\n+ </segment>\n+ </unit>\n+ <unit id=\"n.jOrkg\" name=\"caption.untitled_contenttype\">\n+ <segment>\n+ <source>caption.untitled_contenttype</source>\n+ <target>Untitled %contenttype%</target>\n+ </segment>\n+ </unit>\n</file>\n</xliff>\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Distinguish between editing "New Page" and "Untitled Page"
|
95,168 |
16.08.2019 16:24:06
| -7,200 |
b3c1ed0396b741a43cf326f4234053ed2e5dbd54
|
Do not return the filtered fields but filtered content
|
[
{
"change_type": "MODIFY",
"old_path": "src/Repository/ContentRepository.php",
"new_path": "src/Repository/ContentRepository.php",
"diff": "@@ -64,8 +64,20 @@ class ContentRepository extends ServiceEntityRepository\n}\nif ($filter) {\n- $qb->andWhere($qb->expr()->like('f.value', ':filterValue'))\n+ // First, create a querybuilder to get the fields that match the Query\n+ $filterQB = $this->getQueryBuilder()\n+ ->select('partial content.{id}');\n+\n+ $filterQB->addSelect('f')\n+ ->innerJoin('content.fields', 'f')\n+ ->andWhere($filterQB->expr()->like('f.value', ':filterValue'))\n->setParameter('filterValue', '%' . $filter . '%');\n+\n+ // These are the ID's of content we need.\n+ $ids = array_column($filterQB->getQuery()->getArrayResult(), 'id');\n+\n+ $qb->andWhere('content.id IN (:ids)')\n+ ->setParameter('ids', $ids);\n}\nreturn $this->createPaginator($qb->getQuery(), $page, $amountPerPage);\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Do not return the filtered fields but filtered content
|
95,144 |
18.08.2019 13:10:27
| -7,200 |
ed6ab39ad00c07450609fbcbc60d5fc0208f629f
|
Add multilingual routes for the frontend controllers
|
[
{
"change_type": "MODIFY",
"old_path": "config/routes.yaml",
"new_path": "config/routes.yaml",
"diff": "frontend:\nresource: '../src/Controller/Frontend/'\nprefix: /\n+ type: annotation\n# ------------------------------------------------------------------------------\n# Place your own routes here, that have a LOWER priority than the default routes.\n-api_entrypoint:\n- path: '%bolt.backend_url%/api'\n- controller: api_platform.swagger.action.ui\n-# ------------------------------------------------------------------------------\n-# These are the routes defining the Bolt Control Panel (\"backend\"). It's common\n-# to modify the `prefix` so the Control Panel can be accessed at a custom URL.\n-control_panel_async:\n- resource: '../src/Controller/Backend/Async'\n- prefix: '%bolt.backend_url%/async'\n-\n-control_panel:\n- resource: '../src/Controller/Backend/'\n- prefix: '%bolt.backend_url%'\n# ------------------------------------------------------------------------------\n# Examples:\n"
},
{
"change_type": "DELETE",
"old_path": "config/routes/annotations.yaml",
"new_path": null,
"diff": "-\n-# All routes, used by Bolt: Control Panel, Async and Thumbs, unless overridden\n-# in `../routing.yml` or another location\n-controllers:\n- resource: '../src/Controller/'\n- type: annotation\n-\n"
},
{
"change_type": "MODIFY",
"old_path": "config/routes/api_platform.yaml",
"new_path": "config/routes/api_platform.yaml",
"diff": "@@ -2,3 +2,7 @@ api_platform:\nresource: .\ntype: api_platform\nprefix: /api\n+\n+api_entrypoint:\n+ path: '%bolt.backend_url%/api'\n+ controller: api_platform.swagger.action.ui\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "config/routes/bolt.yaml",
"diff": "+# All route definitions, used by Bolt: Bolt Control Panel (\"backend\"), Async and\n+# Thumbs, unless overridden in `../routing.yml` or another location.\n+\n+# The Bolt Control Panel (\"backend\"). It's common to modify the `prefix` so the\n+# Control Panel can be accessed at a custom URL.\n+control_panel:\n+ resource: '../../src/Controller/Backend/'\n+ prefix: '%bolt.backend_url%'\n+ type: annotation\n+\n+# Async: Upload, Embed\n+control_panel_async:\n+ resource: '../src/Controller/Backend/Async'\n+ prefix: '%bolt.backend_url%/async'\n+ type: annotation\n+\n+# ImageController, Currently only used for thumbnails\n+controllers:\n+ resource: '../src/Controller/ImageController.php'\n+ type: annotation\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Frontend/DetailController.php",
"new_path": "src/Controller/Frontend/DetailController.php",
"diff": "@@ -37,6 +37,11 @@ class DetailController extends TwigAwareController implements FrontendZone\n* name=\"record\",\n* requirements={\"contentTypeSlug\"=\"%bolt.requirement.contenttypes%\"},\n* methods={\"GET\"})\n+ * @Route(\n+ * \"/{_locale}/{contentTypeSlug}/{slugOrId}\",\n+ * name=\"record_locale\",\n+ * requirements={\"contentTypeSlug\"=\"%bolt.requirement.contenttypes%\", \"_locale\": \"%app_locales%\"},\n+ * methods={\"GET\"})\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": "@@ -22,6 +22,7 @@ class HomepageController extends TwigAwareController implements FrontendZone\n/**\n* @Route(\"/\", methods={\"GET\"}, name=\"homepage\")\n+ * @Route(\"/{_locale}/\", methods={\"GET\"}, name=\"homepage_locale\", 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": "@@ -29,6 +29,11 @@ class ListingController extends TwigAwareController implements FrontendZone\n* name=\"listing\",\n* requirements={\"contentTypeSlug\"=\"%bolt.requirement.contenttypes%\"},\n* methods={\"GET\"})\n+ * @Route(\n+ * \"/{_locale}/{contentTypeSlug}\",\n+ * name=\"listing_locale\",\n+ * requirements={\"contentTypeSlug\"=\"%bolt.requirement.contenttypes%\", \"_locale\": \"%app_locales%\"},\n+ * methods={\"GET\"})\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": "@@ -25,10 +25,7 @@ class SearchController extends TwigAwareController implements FrontendZone\n/**\n* @Route(\"/search\", methods={\"GET\", \"POST\"}, name=\"search\")\n- *\n- * @throws \\Twig_Error_Loader\n- * @throws \\Twig_Error_Runtime\n- * @throws \\Twig_Error_Syntax\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": "@@ -29,6 +29,12 @@ class TaxonomyController extends TwigAwareController implements FrontendZone\n* requirements={\"taxonomyslug\"=\"%bolt.requirement.taxonomies%\"},\n* methods={\"GET\"}\n* )\n+ * @Route(\n+ * \"/{_locale}/{taxonomyslug}/{slug}\",\n+ * name=\"taxonomy_locale\",\n+ * requirements={\"taxonomyslug\"=\"%bolt.requirement.taxonomies%\", \"_locale\": \"%app_locales%\"},\n+ * methods={\"GET\"}\n+ * )\n*/\npublic function listing(ContentRepository $contentRepository, Request $request, string $taxonomyslug, string $slug): Response\n{\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Add multilingual routes for the frontend controllers
|
95,144 |
18.08.2019 14:29:07
| -7,200 |
706f80a59b3b03aab69efbbec2783fec169e1040
|
Fixing thumbnails in listings, and some more image-related tweaks
|
[
{
"change_type": "MODIFY",
"old_path": "assets/js/app/listing/Components/Table/Row/index.vue",
"new_path": "assets/js/app/listing/Components/Table/Row/index.vue",
"diff": "<div\nv-if=\"size === 'normal' && record.extras.image !== null\"\nclass=\"listing__row--item is-thumbnail\"\n- :style=\"`background-image: url(${record.extras.image.path})`\"\n+ :style=\"`background-image: url('${record.extras.image.thumbnail}')`\"\n></div>\n<!-- end column -->\n"
},
{
"change_type": "MODIFY",
"old_path": "public/theme/skeleton/record.twig",
"new_path": "public/theme/skeleton/record.twig",
"diff": "{# Output all fields, in the order as defined in the content type.\nTo change the generated html and configure the options, see:\nhttps://docs.bolt.cm/templating #}\n- {% with { 'record': record, 'common': true, 'extended': true, 'repeaters': true, 'blocks': true, 'magicimage': record|imagename } %}\n+ {% with { 'record': record, 'common': true, 'extended': true, 'repeaters': true, 'blocks': true, 'exclude': [record|image.fieldname] } %}\n{{ block('sub_fields', 'partials/_sub_fields.twig') }}\n{% endwith %}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Entity/ContentExtrasTrait.php",
"new_path": "src/Entity/ContentExtrasTrait.php",
"diff": "@@ -35,7 +35,6 @@ trait ContentExtrasTrait\nreturn [\n'title' => $this->contentExtension->getTitle($content),\n'image' => $this->contentExtension->getImage($content),\n- 'imagename' => $this->contentExtension->getImageName($content),\n'excerpt' => $this->contentExtension->getExcerpt($content),\n'link' => $this->contentExtension->getLink($content),\n'editLink' => $this->contentExtension->getEditLink($content),\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Entity/Field/ImageField.php",
"new_path": "src/Entity/Field/ImageField.php",
"diff": "@@ -27,6 +27,8 @@ class ImageField extends Field implements FieldInterface\n'title' => '',\n'path' => '',\n'media' => '',\n+ 'thumbnail' => '',\n+ 'fieldname' => ''\n];\n}\n@@ -51,9 +53,13 @@ class ImageField extends Field implements FieldInterface\n$value['path'] = $this->getPath();\n// @todo This needs to be injected, not created on the fly.\n- $package = new PathPackage('/files/', new EmptyVersionStrategy());\n$request = Request::createFromGlobals();\n- $value['url'] = $request->getUriForPath($package->getUrl($this->getPath()));\n+ $value['url'] = $request->getUriForPath($this->getPath());\n+\n+ $thumbPackage = new PathPackage('/thumbs/', new EmptyVersionStrategy());\n+ $value['thumbnail'] = $thumbPackage->getUrl($this->get('filename')) . '?w=400&h=400&fit=crop';\n+\n+ $value['fieldname'] = $this->getName();\nreturn $value;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/ContentExtension.php",
"new_path": "src/Twig/ContentExtension.php",
"diff": "@@ -45,13 +45,12 @@ class ContentExtension extends AbstractExtension\nreturn [\nnew TwigFilter('title', [$this, 'getTitle'], $safe),\n- new TwigFilter('image', [$this, 'getImage'], $safe),\n- new TwigFilter('imagename', [$this, 'getImageName']),\n+ new TwigFilter('image', [$this, 'getImage']),\nnew TwigFilter('excerpt', [$this, 'getExcerpt'], $safe),\nnew TwigFilter('previous', [$this, 'getPreviousContent']),\nnew TwigFilter('next', [$this, 'getNextContent']),\n- new TwigFilter('link', [$this, 'getLink'], $safe),\n- new TwigFilter('edit_link', [$this, 'getEditLink'], $safe),\n+ new TwigFilter('link', [$this, 'getLink']),\n+ new TwigFilter('edit_link', [$this, 'getEditLink']),\nnew TwigFilter('taxonomies', [$this, 'getTaxonomies']),\n];\n}\n@@ -134,17 +133,6 @@ class ContentExtension extends AbstractExtension\nreturn null;\n}\n- public function getImageName(Content $content): ?string\n- {\n- foreach ($content->getFields() as $field) {\n- if ($field instanceof ImageField) {\n- return $field->getName();\n- }\n- }\n-\n- return null;\n- }\n-\n/**\n* @param string|array|null $focus\n*/\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/ImageExtension.php",
"new_path": "src/Twig/ImageExtension.php",
"diff": "@@ -54,7 +54,6 @@ class ImageExtension extends AbstractExtension\nnew TwigFunction('popup', [$this, 'popup'], ['is_safe' => ['html']]),\nnew TwigFunction('showimage', [$this, 'showImage'], ['is_safe' => ['html']]),\nnew TwigFunction('thumbnail', [$this, 'thumbnail'], ['is_safe' => ['html']]),\n- new TwigFunction('magicimagename', [$this, 'magicImageName']),\n];\n}\n@@ -125,11 +124,6 @@ class ImageExtension extends AbstractExtension\nreturn $urlBuilder->getUrl($filename, $params);\n}\n- public function magicImageName(Content $record): ?string\n- {\n- $record->getExtras()['imagename'];\n- }\n-\n/**\n* @param ImageField|Content|array|string $image\n*/\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/api/content/get_content.feature",
"new_path": "tests/api/content/get_content.feature",
"diff": "@@ -22,7 +22,9 @@ Feature: Get content with API\n\"title\": @string@,\n\"path\": @string@,\n\"media\": @string@,\n- \"url\": @string@\n+ \"url\": @string@,\n+ \"thumbnail\": @string@,\n+ \"fieldname\": @string@\n},\n\"@*@\": \"@*@\"\n},\n@@ -58,7 +60,9 @@ Feature: Get content with API\n\"title\": @string@,\n\"path\": @string@,\n\"media\": @string@,\n- \"url\": @string@\n+ \"url\": @string@,\n+ \"thumbnail\": @string@,\n+ \"fieldname\": @string@\n},\n\"@*@\": \"@*@\"\n},\n@@ -99,7 +103,9 @@ Feature: Get content with API\n\"title\": @string@,\n\"path\": @string@,\n\"media\": @string@,\n- \"url\": @string@\n+ \"url\": @string@,\n+ \"thumbnail\": @string@,\n+ \"fieldname\": @string@\n},\n\"@*@\": \"@*@\"\n},\n@@ -155,7 +161,9 @@ Feature: Get content with API\n\"title\": @string@,\n\"path\": @string@,\n\"media\": @string@,\n- \"url\": @string@\n+ \"url\": @string@,\n+ \"thumbnail\": @string@,\n+ \"fieldname\": @string@\n},\n\"@*@\": \"@*@\"\n},\n@@ -205,7 +213,9 @@ Feature: Get content with API\n\"title\": @string@,\n\"path\": @string@,\n\"media\": @string@,\n- \"url\": @string@\n+ \"url\": @string@,\n+ \"thumbnail\": @string@,\n+ \"fieldname\": @string@\n},\n\"@*@\": \"@*@\"\n},\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Fixing thumbnails in listings, and some more image-related tweaks
|
95,144 |
18.08.2019 19:42:34
| -7,200 |
21b4277485e63f9ca9f84b03dcb02919e6cbf33a
|
Select Images in Imagefields with "From Library" button
|
[
{
"change_type": "MODIFY",
"old_path": "assets/js/app/editor/Components/Editor/Image/Image.vue",
"new_path": "assets/js/app/editor/Components/Editor/Image/Image.vue",
"diff": "</div>\n<div class=\"btn-toolbar\" role=\"toolbar\">\n<div class=\"btn-group mr-2\" role=\"group\">\n- <button class=\"btn btn-secondary\" type=\"button\" @click=\"selectFile\">\n+ <button class=\"btn btn-secondary\" type=\"button\" @click=\"selectUploadFile\">\n<i class=\"fas fa-fw fa-upload\"></i>{{ labels.button_upload }}\n</button>\n</div>\n<div class=\"btn-group mr-2\" role=\"group\">\n- <button class=\"btn btn-secondary\" type=\"button\">\n+ <button class=\"btn btn-secondary\" type=\"button\" @click=\"selectServerFile\">\n<i class=\"fas fa-fw fa-th\"></i> {{ labels.button_from_library }}\n</button>\n</div>\nimport baguetteBox from 'baguettebox.js';\nimport field from '../../../mixins/value';\nimport Axios from 'axios';\n+import bootbox from 'bootbox';\nexport default {\nname: 'EditorImage',\n@@ -104,6 +105,7 @@ export default {\n'media',\n'csrf_token',\n'labels',\n+ 'filelist',\n],\ndata: () => {\nreturn {\n@@ -135,9 +137,31 @@ export default {\n});\n},\nmethods: {\n- selectFile() {\n+ selectUploadFile() {\nthis.$refs.selectFile.click();\n},\n+ selectServerFile() {\n+ const thumbnailParams = this.thumbnail.split('?').pop();\n+ let thisField = this;\n+ Axios.get(this.filelist)\n+ .then(res => {\n+ console.log(res);\n+ bootbox.prompt({\n+ title: \"Select a file\",\n+ inputType: 'select',\n+ inputOptions: res.data,\n+ callback: function (result) {\n+ if (result) {\n+ thisField.filename = result;\n+ thisField.previewImage = `/thumbs/${result}?${thumbnailParams}`;\n+ }\n+ }\n+ });\n+ })\n+ .catch(err => {\n+ console.warn(err);\n+ });\n+ },\nonDragEnter(e) {\ne.preventDefault();\nthis.dragCount++;\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "src/Controller/Backend/Async/FileListingController.php",
"diff": "+<?php\n+\n+declare(strict_types=1);\n+\n+namespace Bolt\\Controller\\Backend\\Async;\n+\n+use Bolt\\Configuration\\Config;\n+use Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Security;\n+use Symfony\\Component\\Finder\\Finder;\n+use Symfony\\Component\\HttpFoundation\\JsonResponse;\n+use Symfony\\Component\\HttpFoundation\\Request;\n+use Symfony\\Component\\Routing\\Annotation\\Route;\n+use Tightenco\\Collect\\Support\\Collection;\n+\n+/**\n+ * @Security(\"is_granted('ROLE_ADMIN')\")\n+ */\n+class FileListingController implements AsyncZone\n+{\n+ /** @var Config */\n+ private $config;\n+\n+ public function __construct(Config $config)\n+ {\n+ $this->config = $config;\n+ }\n+\n+ /**\n+ * @Route(\"/list_files\", name=\"bolt_async_filelisting\", methods={\"GET\"})\n+ */\n+ public function index(Request $request): JsonResponse\n+ {\n+ $locationName = $request->query->get('location', 'files');\n+ $type = $request->query->get('type', 'images');\n+\n+ $path = $this->config->getPath($locationName, true);\n+\n+ $files = $this->getFilesIndex($path, $type);\n+\n+ return new JsonResponse($files);\n+ }\n+\n+ private function getFilesIndex(string $path, string $type): Collection\n+ {\n+ if ($type === 'images') {\n+ $glob = '*.{jpg,png,gif,jpeg}';\n+ } else {\n+ $glob = null;\n+ }\n+\n+ $files = [];\n+\n+ foreach ($this->findFiles($path, $glob) as $file) {\n+ $files[] = [\n+ 'group' => $file->getRelativePath(),\n+ 'value' => $file->getRelativePathname(),\n+ 'text' => $file->getFilename(),\n+ ];\n+ }\n+\n+ return new Collection($files);\n+ }\n+\n+ private function findFiles(string $path, ?string $glob = null): Finder\n+ {\n+ $finder = new Finder();\n+ $finder->in($path)->depth('< 3')->sortByType()->files();\n+\n+ if ($glob) {\n+ $finder->name($glob);\n+ }\n+\n+ return $finder;\n+ }\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/_partials/fields/image.html.twig",
"new_path": "templates/_partials/fields/image.html.twig",
"diff": "{% block field %}\n{% set setPath = field.definition.get('upload')|default('') %}\n{% set directory = path('bolt_async_upload', {'location': location|default('files'), 'path': setPath}) %}\n+ {% set filelist = path('bolt_async_filelisting', {'location': location|default('files') }) %}\n{% set labels = {\n'button_upload': 'image.button_upload'|trans,\n'button_from_library': 'image.button_from_library'|trans,\n:alt='{{ field.get('alt')|json_encode }}'\n:media='{{ field.get('media')|json_encode }}'\n:directory='{{ directory|json_encode }}'\n+ :filelist='{{ filelist|json_encode }}'\n:csrf_token='{{ csrf_token('upload')|json_encode }}'\n:labels='{{ labels }}'\n></editor-image>\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Select Images in Imagefields with "From Library" button
|
95,168 |
19.08.2019 14:36:51
| -7,200 |
dd2ed29bb2f2eb8f4a24f36ed3fbbf870db17dca
|
WIP for better sortby content and taxonomy
|
[
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/ContentOverviewController.php",
"new_path": "src/Controller/Backend/ContentOverviewController.php",
"diff": "@@ -27,11 +27,12 @@ class ContentOverviewController extends TwigAwareController implements BackendZo\n$page = (int) $request->query->get('page', 1);\n$amountPerPage = $contentType->get('records_per_page', 10);\n- if ($request->query->get('sort') && $request->query->get('filter')) {\n+ if ($request->query->get('sort') && $request->query->get('filter') && $request->query->get('taxonomy')) {\n$sortBy = $request->query->get('sort');\n$filter = $request->query->get('filter');\n+ $taxonomy = $request->query->get('taxonomy');\n- $records = $contentRepository->findForListing($page, $amountPerPage, $contentType, false, $sortBy, $filter);\n+ $records = $contentRepository->findForListing($page, $amountPerPage, $contentType, false, $sortBy, $filter, $taxonomy);\n} elseif ($request->query->get('sort')) {\n$sortBy = $request->query->get('sort');\n$records = $contentRepository->findForListing($page, $amountPerPage, $contentType, false, $sortBy, '');\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Repository/ContentRepository.php",
"new_path": "src/Repository/ContentRepository.php",
"diff": "@@ -34,7 +34,7 @@ class ContentRepository extends ServiceEntityRepository\nreturn $this->createQueryBuilder('content');\n}\n- public function findForListing(int $page, int $amountPerPage, ?ContentType $contentType = null, bool $onlyPublished = true, string $sortBy = '', string $filter = ''): Pagerfanta\n+ public function findForListing(int $page, int $amountPerPage, ?ContentType $contentType = null, bool $onlyPublished = true, string $sortBy = '', string $filter = '', string $taxonomy = ''): Pagerfanta\n{\n$qb = $this->getQueryBuilder()\n->addSelect('a')\n@@ -55,12 +55,33 @@ class ContentRepository extends ServiceEntityRepository\n->innerJoin('content.fields', 'f');\n}\n+ if($taxonomy) {\n+ $qb->addSelect('t')\n+ ->innerJoin('content.taxonomies', 't')\n+ ->andWhere('slug', ':taxonomySlug')\n+ ->setParameter('taxonomySlug', $taxonomy);\n+ }\n+\nif ($sortBy && \\in_array($sortBy, $this->contentColumns, true)) {\n$qb->orderBy('content.' . $sortBy);\n} elseif (! empty($sortBy)) {\n- $qb->andWhere('f.name = :fieldname')\n+ // First, create a querybuilder to get the fields that match the Query\n+ $sortByQB = $this->getQueryBuilder()\n+ ->select('partial content.{id}');\n+\n+ $sortByQB->addSelect('f')\n+ ->innerJoin('content.fields', 'f')\n+ ->andWhere('f.name = :fieldname')\n+ ->setParameter('fieldname', $sortBy);\n+\n+ // These are the ID's of content we need.\n+ $ids = array_column($sortByQB->getQuery()->getArrayResult(), 'id');\n+\n+ $qb->andWhere('content.id IN (:ids)')\n+ ->setParameter('ids', $ids)\n+ ->andWhere('f.name = :fieldname')\n->setParameter('fieldname', $sortBy)\n- ->orderBy('f.value');\n+ ->addOrderBy('f.value');\n}\nif ($filter) {\n@@ -79,6 +100,7 @@ class ContentRepository extends ServiceEntityRepository\n$qb->andWhere('content.id IN (:ids)')\n->setParameter('ids', $ids);\n}\n+ dump($qb->getQuery()->getArrayResult());\nreturn $this->createPaginator($qb->getQuery(), $page, $amountPerPage);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/content/listing.html.twig",
"new_path": "templates/content/listing.html.twig",
"diff": "'modifiedAt': 'Modified date', 'publishedAt': 'Published date', 'depublishedAt': 'Depublished date'\n} %}\n{% set sortBy = app.request.get('sort')|default() %}\n+ {% set taxonomy = app.request.get('taxonomy')|default() %}\n{% set filterValue = app.request.get('filter')|default() %}\n-\n<div class=\"card\">\n<div class=\"card-header\">\n{{ 'title.contentlisting'|trans }}\n<div class=\"card-body\">\n<form>\n<div class=\"form-group\">\n- <p>\n- <strong>{{ 'listing.title_sortby'|trans }}</strong>:\n- <select class=\"form-control\" name=\"sort\">\n- <option value=\"\" disabled {% if sortBy is empty %}selected{% endif %}>\n- {{ 'listing.option_select_item'|trans }}\n- </option>\n- {% for key, filterOption in filterOptions %}\n- <option value=\"{{ key }}\" {% if sortBy == key %}selected{% endif %}>\n- {{ filterOption }}\n- </option>\n- {% endfor %}\n- </select>\n- </p>\n+{# Needs more work #}\n+{# <p>#}\n+{# <strong>{{ 'listing.title_sortby'|trans }}</strong>:#}\n+{# <select class=\"form-control\" name=\"sort\">#}\n+{# <option value=\"\" disabled {% if sortBy is empty %}selected{% endif %}>#}\n+{# {{ 'listing.option_select_item'|trans }}#}\n+{# </option>#}\n+{# {% for key, filterOption in filterOptions %}#}\n+{# <option value=\"{{ key }}\" {% if sortBy == key %}selected{% endif %}>#}\n+{# {{ filterOption }}#}\n+{# </option>#}\n+{# {% endfor %}#}\n+{# </select>#}\n+{# </p>#}\n+{# {% if contentType.get('taxonomy') %}#}\n+{# <p>#}\n+{# <strong>{{ 'listing.title_taxonomy'|trans }}</strong>:#}\n+{# <select class=\"form-control\" name=\"taxonomy\">#}\n+{# <option value=\"\" disabled {% if sortBy is empty %}selected{% endif %}>#}\n+{# {{ 'listing.option_select_item'|trans }}#}\n+{# </option>#}\n+{# {% for taxonomy in contentType.get('taxonomy') %}#}\n+{# {% set taxonomyDefinition = config.get('taxonomies/' ~ taxonomy) %}#}\n+{# {% for key, taxonomyValue in taxonomyDefinition.options %}#}\n+{# <option value=\"{{ key }}\" {% if taxonomy == key %}selected{% endif %}>#}\n+{# {{ taxonomyValue }}#}\n+{# </option>#}\n+{# {% endfor %}#}\n+{# {% endfor %}#}\n+{# </select>#}\n+{# </p>#}\n+{# {% endif %}#}\n<p>\n<strong>{{ 'listing.title_title'|trans }}</strong>:\n<input class=\"form-control\" type=\"text\" name=\"filter\" value=\"{{ filterValue }}\"\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
WIP for better sortby content and taxonomy
|
95,144 |
19.08.2019 21:29:23
| -7,200 |
23a8bcc9b03ee3d077526138e967e54554e0f4b6
|
Fix "full screen" for wysiwyg editor.
|
[
{
"change_type": "MODIFY",
"old_path": "assets/scss/modules/editor/fields/_html.scss",
"new_path": "assets/scss/modules/editor/fields/_html.scss",
"diff": ".trumbowyg-box {\nmargin: 0;\n}\n+\n+.trumbowyg-fullscreen {\n+ position: fixed;\n+ top: $admin-toolbar-height;\n+ left: $admin-sidebar-width;\n+ margin: 0;\n+ padding: 0;\n+ z-index: 99999;\n+ right: 0;\n+ bottom: 0;\n+ width: auto;\n+ height: auto;\n+ @include media-breakpoint-up(wd) {\n+ left: $admin-sidebar-width-wide;\n+ }\n+}\n+\n+.is-slim .trumbowyg-fullscreen {\n+ left: $admin-sidebar-width / 3;\n+}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Fix "full screen" for wysiwyg editor.
|
95,144 |
19.08.2019 21:42:37
| -7,200 |
b0a347eaffafca742b35a7c2c78286581390b391
|
Fix fullscreen for markdown editor
|
[
{
"change_type": "MODIFY",
"old_path": "assets/scss/vendor/simplemde.scss",
"new_path": "assets/scss/vendor/simplemde.scss",
"diff": ".editor-toolbar.fullscreen,\n.editor-preview-side {\nz-index: 10000;\n+ background: #F0F3F6;\n+ position: fixed;\n+ top: $admin-toolbar-height;\n+ left: $admin-sidebar-width;\n+ margin: 0;\n+ right: 0;\n+ @include media-breakpoint-up(wd) {\n+ left: $admin-sidebar-width-wide;\n+ }\n}\n-.CodeMirror-fullscreen,\n-.editor-toolbar.fullscreen {\n+.CodeMirror-fullscreen {\n+ top: $admin-toolbar-height + 50px;\n+ padding: 0;\n+ bottom: 0;\n+ width: auto;\n+ height: auto;\nbackground: var(--foreground);\n}\n+.is-slim .CodeMirror-fullscreen,\n+.is-slim .editor-toolbar.fullscreen,\n+.is-slim .editor-preview-side {\n+ left: $admin-sidebar-width / 3;\n+}\n+\n+\n.editor-toolbar {\nbackground-color: $input-disabled-bg;\nopacity: 1;\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Fix fullscreen for markdown editor
|
95,144 |
20.08.2019 07:52:53
| -7,200 |
64e6e3ca2ad536b5e38e84847a90951fb9af1aab
|
Tweaking margins for fullscreen editors
|
[
{
"change_type": "MODIFY",
"old_path": "assets/scss/modules/editor/fields/_html.scss",
"new_path": "assets/scss/modules/editor/fields/_html.scss",
"diff": ".trumbowyg-fullscreen {\nposition: fixed;\n- top: $admin-toolbar-height;\n+ top: $admin-toolbar-height-wide + 1px;\nleft: $admin-sidebar-width;\nmargin: 0;\npadding: 0;\n"
},
{
"change_type": "MODIFY",
"old_path": "assets/scss/vendor/simplemde.scss",
"new_path": "assets/scss/vendor/simplemde.scss",
"diff": "z-index: 10000;\nbackground: #F0F3F6;\nposition: fixed;\n- top: $admin-toolbar-height;\n+ top: $admin-toolbar-height-wide - 11px;\nleft: $admin-sidebar-width;\nmargin: 0;\nright: 0;\n}\n.CodeMirror-fullscreen {\n- top: $admin-toolbar-height + 50px;\n+ top: $admin-toolbar-height-wide + 39px;\npadding: 0;\nbottom: 0;\nwidth: auto;\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Tweaking margins for fullscreen editors
|
95,144 |
22.08.2019 17:53:05
| -7,200 |
1716607975a526839b8628553bf493644de247c1
|
Several small Vue fixes and tweaks
|
[
{
"change_type": "MODIFY",
"old_path": "assets/js/app/editor/Components/Editor/Date/Date.vue",
"new_path": "assets/js/app/editor/Components/Editor/Date/Date.vue",
"diff": "v-model=\"val\"\nclass=\"form-control editor--date\"\n:config=\"config\"\n- :disabled=\"disabled == 1\"\n+ :disabled=\"disabled\"\n:form=\"form\"\n:name=\"name\"\nplaceholder=\"Select date\"\n<div class=\"input-group-append\">\n<button\nclass=\"btn btn-secondary\"\n- :class=\"{ 'btn-outline-secondary': disabled == 1 }\"\n+ :class=\"{ 'btn-outline-secondary': disabled }\"\ntype=\"button\"\n- :disabled=\"disabled == 1\"\n+ :disabled=\"disabled\"\ndata-toggle\n>\n<i class=\"fa fa-calendar\">\n@@ -52,7 +52,7 @@ export default {\nrequired: true,\n},\ndisabled: {\n- type: String,\n+ type: Boolean,\nrequired: true,\n},\nmode: {\n@@ -68,9 +68,9 @@ export default {\ntype: String,\ndefault: 'en',\n},\n- // eslint-disable-next-line vue/require-default-prop\nlabels: {\n- type: Array,\n+ type: String,\n+ default: '',\n},\n},\n"
},
{
"change_type": "MODIFY",
"old_path": "assets/js/app/editor/Components/Editor/Embed/Embed.vue",
"new_path": "assets/js/app/editor/Components/Editor/Embed/Embed.vue",
"diff": "class=\"author_url\"\n:name=\"name + '[authorurl]'\"\ntype=\"hidden\"\n- :value=\"author_url\"\n+ :value=\"authorurl\"\n/>\n<input\nclass=\"html\"\n"
},
{
"change_type": "MODIFY",
"old_path": "assets/js/app/listing/Components/Table/index.vue",
"new_path": "assets/js/app/listing/Components/Table/index.vue",
"diff": "<template>\n<div class=\"listing__records\">\n- <draggable v-model=\"records\" :options=\"draggableOptions\">\n+ <draggable\n+ v-model=\"records\"\n+ handle=\".listing__row--move\"\n+ force-fallback=\"true\"\n+ >\n<transition-group>\n<table-row\nv-for=\"record in records\"\n@@ -24,14 +28,6 @@ export default {\n'table-row': Row,\n},\nprops: ['labels'],\n- data: () => {\n- return {\n- draggableOptions: {\n- handle: '.listing__row--move',\n- forceFallback: true,\n- },\n- };\n- },\ncomputed: {\nrecords: {\nget() {\n"
},
{
"change_type": "MODIFY",
"old_path": "assets/js/app/toolbar/Components/Toolbar.vue",
"new_path": "assets/js/app/toolbar/Components/Toolbar.vue",
"diff": "<div class=\"profile__dropdown dropdown-menu dropdown-menu-right\">\n<ul>\n<li>\n- <a :href=\"backend_prefix + 'profile-edit'\">\n+ <a :href=\"backendPrefix + 'profile-edit'\">\n<i class=\"fas fa-user-edit fa-fw\"></i>\n{{ labels['action.edit_profile'] }}\n</a>\n</li>\n<li>\n- <a :href=\"backend_prefix + 'logout'\">\n+ <a :href=\"backendPrefix + 'logout'\">\n<i class=\"fas fa-sign-out-alt fa-fw\"></i>\n{{ labels['action.logout'] }}\n</a>\n"
},
{
"change_type": "MODIFY",
"old_path": "package-lock.json",
"new_path": "package-lock.json",
"diff": "\"dev\": true\n},\n\"@vue/cli-overlay\": {\n- \"version\": \"3.10.0\",\n- \"resolved\": \"https://registry.npmjs.org/@vue/cli-overlay/-/cli-overlay-3.10.0.tgz\",\n- \"integrity\": \"sha512-DQCY6WIl1UN1nOuPirW63CcYWSBdIn6s4zdGfFodCfV+0PAEXGcrfNStygG+IKUsydQaJGTneV7SFxcS+9gyzA==\"\n+ \"version\": \"3.11.0\",\n+ \"resolved\": \"https://registry.npmjs.org/@vue/cli-overlay/-/cli-overlay-3.11.0.tgz\",\n+ \"integrity\": \"sha512-yYZP27vjioWmohwXQ9mTPHHxktfAaTM6RDehyG83yvY07wcdxhwrNNCMm8eE9My/K2F8oAPf8uoDZZmkr/EXBw==\"\n},\n\"@vue/cli-service\": {\n- \"version\": \"3.10.0\",\n- \"resolved\": \"https://registry.npmjs.org/@vue/cli-service/-/cli-service-3.10.0.tgz\",\n- \"integrity\": \"sha512-aQaAjtkpSl4XFBM7Di9doh4GvHp1H8/H1QJKRK8bPJ5MVbt8Lt4tBo+YgK9Qs/9x0mrxCAa5UrR9+8ZWIQs2Zw==\",\n+ \"version\": \"3.11.0\",\n+ \"resolved\": \"https://registry.npmjs.org/@vue/cli-service/-/cli-service-3.11.0.tgz\",\n+ \"integrity\": \"sha512-HSU4wHlYKQt8O968JUz/AeYvFSokxJjMkr7dgVNVb6rpBn859Emkr960plWGr1z1hc3qNOwLuSUGk5OSfq1inA==\",\n\"requires\": {\n\"@intervolga/optimize-cssnano-plugin\": \"^1.0.5\",\n\"@soda/friendly-errors-webpack-plugin\": \"^1.7.1\",\n- \"@vue/cli-overlay\": \"^3.10.0\",\n- \"@vue/cli-shared-utils\": \"^3.10.0\",\n- \"@vue/component-compiler-utils\": \"^2.6.0\",\n+ \"@vue/cli-overlay\": \"^3.11.0\",\n+ \"@vue/cli-shared-utils\": \"^3.11.0\",\n+ \"@vue/component-compiler-utils\": \"^3.0.0\",\n\"@vue/preload-webpack-plugin\": \"^1.1.0\",\n\"@vue/web-component-wrapper\": \"^1.2.0\",\n\"acorn\": \"^6.1.1\",\n\"thread-loader\": \"^2.1.2\",\n\"url-loader\": \"^1.1.2\",\n\"vue-loader\": \"^15.7.0\",\n- \"webpack\": \">=4 < 4.29\",\n+ \"webpack\": \"^4.0.0\",\n\"webpack-bundle-analyzer\": \"^3.3.0\",\n\"webpack-chain\": \"^4.11.0\",\n\"webpack-dev-server\": \"^3.4.1\",\n}\n},\n\"@vue/cli-shared-utils\": {\n- \"version\": \"3.10.0\",\n- \"resolved\": \"https://registry.npmjs.org/@vue/cli-shared-utils/-/cli-shared-utils-3.10.0.tgz\",\n- \"integrity\": \"sha512-i96XBUtLdWeKFCC/ot12ngqnVikN/dXpelGdyxvNZczCkX7Je0FUdrZkiw0+uTYTu1RmuYWpLs+vb/YQerjiWg==\",\n+ \"version\": \"3.11.0\",\n+ \"resolved\": \"https://registry.npmjs.org/@vue/cli-shared-utils/-/cli-shared-utils-3.11.0.tgz\",\n+ \"integrity\": \"sha512-D7pst/4v9H1DD66fLxlZOwRR09R03MV0ROdKxBHmh3FmnApCA/RiaolFA/8w+B3CnevYMlV3SJ5fOAgedbswbA==\",\n\"requires\": {\n\"@hapi/joi\": \"^15.0.1\",\n\"chalk\": \"^2.4.1\",\n}\n},\n\"@vue/component-compiler-utils\": {\n- \"version\": \"2.6.0\",\n- \"resolved\": \"https://registry.npmjs.org/@vue/component-compiler-utils/-/component-compiler-utils-2.6.0.tgz\",\n- \"integrity\": \"sha512-IHjxt7LsOFYc0DkTncB7OXJL7UzwOLPPQCfEUNyxL2qt+tF12THV+EO33O1G2Uk4feMSWua3iD39Itszx0f0bw==\",\n+ \"version\": \"3.0.0\",\n+ \"resolved\": \"https://registry.npmjs.org/@vue/component-compiler-utils/-/component-compiler-utils-3.0.0.tgz\",\n+ \"integrity\": \"sha512-am+04/0UX7ektcmvhYmrf84BDVAD8afFOf4asZjN84q8xzxFclbk5x0MtxuKGfp+zjN5WWPJn3fjFAWtDdIGSw==\",\n\"requires\": {\n\"consolidate\": \"^0.15.1\",\n\"hash-sum\": \"^1.0.2\",\n\"integrity\": \"sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA==\"\n},\n\"address\": {\n- \"version\": \"1.1.0\",\n- \"resolved\": \"https://registry.npmjs.org/address/-/address-1.1.0.tgz\",\n- \"integrity\": \"sha512-4diPfzWbLEIElVG4AnqP+00SULlPzNuyJFNnmMrLgyaxG6tZXJ1sn7mjBu4fHrJE+Yp/jgylOweJn2xsLMFggQ==\"\n+ \"version\": \"1.1.1\",\n+ \"resolved\": \"https://registry.npmjs.org/address/-/address-1.1.1.tgz\",\n+ \"integrity\": \"sha512-srclZEseI6OB0MgWYWuYpr2F5fHMxh5lgWF72CeUFm5QgJyviPA64Q7PzJdBQkFCJibEycqsZ5b9L0l/J8SlyQ==\"\n},\n\"adjust-sourcemap-loader\": {\n\"version\": \"2.0.0\",\n\"integrity\": \"sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=\",\n\"dev\": true\n},\n- \"array-filter\": {\n- \"version\": \"0.0.1\",\n- \"resolved\": \"https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz\",\n- \"integrity\": \"sha1-fajPLiZijtcygDWB/SH2fKzS7uw=\"\n- },\n\"array-find-index\": {\n\"version\": \"1.0.2\",\n\"resolved\": \"https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz\",\n\"resolved\": \"https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz\",\n\"integrity\": \"sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=\"\n},\n- \"array-map\": {\n- \"version\": \"0.0.0\",\n- \"resolved\": \"https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz\",\n- \"integrity\": \"sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=\"\n- },\n- \"array-reduce\": {\n- \"version\": \"0.0.0\",\n- \"resolved\": \"https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz\",\n- \"integrity\": \"sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=\"\n- },\n\"array-union\": {\n\"version\": \"1.0.2\",\n\"resolved\": \"https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz\",\n\"integrity\": \"sha1-aN/1++YMUes3cl6p4+0xDcwed24=\"\n},\n\"bootbox\": {\n- \"version\": \"5.3.1\",\n- \"resolved\": \"https://registry.npmjs.org/bootbox/-/bootbox-5.3.1.tgz\",\n- \"integrity\": \"sha512-qAgUoJs3Z/11QeaJMf05T6PaX8FGY+08Tew/hLjoeIPryt2PCs4GA7OUUU2FvQ7JmyXHOjg27KfUwpTTEM91ew==\",\n+ \"version\": \"5.3.2\",\n+ \"resolved\": \"https://registry.npmjs.org/bootbox/-/bootbox-5.3.2.tgz\",\n+ \"integrity\": \"sha512-D1HEziBATs5NDTFCfWnr32IsMWZijwLt631gigtItS9B631c3h1H5kJIS/jPn0q6I+tG7K4JzdMeCGZ0FCsehQ==\",\n\"requires\": {\n\"bootstrap\": \">=3.0.0\",\n\"jquery\": \">=1.12.0\",\n\"integrity\": \"sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==\"\n},\n\"default-gateway\": {\n- \"version\": \"5.0.2\",\n- \"resolved\": \"https://registry.npmjs.org/default-gateway/-/default-gateway-5.0.2.tgz\",\n- \"integrity\": \"sha512-wXuT0q8T5vxQNecrTgz/KbU2lPUMRc98I9Y5dnH3yhFB3BGYqtADK4lhivLlG0OfjhmfKx1PGILG2jR4zjI+WA==\",\n+ \"version\": \"5.0.3\",\n+ \"resolved\": \"https://registry.npmjs.org/default-gateway/-/default-gateway-5.0.3.tgz\",\n+ \"integrity\": \"sha512-zW+ld9xtN0+q48wIwhitUzhfERJN7BPgvijPhuCKG6bfWqnoqtSNSnrXfvAME2ZJLpgYpz6UorpBddGfLzrJBw==\",\n\"requires\": {\n- \"execa\": \"^1.0.0\",\n- \"ip-regex\": \"^2.1.0\"\n+ \"execa\": \"^2.0.3\"\n+ },\n+ \"dependencies\": {\n+ \"execa\": {\n+ \"version\": \"2.0.4\",\n+ \"resolved\": \"https://registry.npmjs.org/execa/-/execa-2.0.4.tgz\",\n+ \"integrity\": \"sha512-VcQfhuGD51vQUQtKIq2fjGDLDbL6N1DTQVpYzxZ7LPIXw3HqTuIz6uxRmpV1qf8i31LHf2kjiaGI+GdHwRgbnQ==\",\n+ \"requires\": {\n+ \"cross-spawn\": \"^6.0.5\",\n+ \"get-stream\": \"^5.0.0\",\n+ \"is-stream\": \"^2.0.0\",\n+ \"merge-stream\": \"^2.0.0\",\n+ \"npm-run-path\": \"^3.0.0\",\n+ \"onetime\": \"^5.1.0\",\n+ \"p-finally\": \"^2.0.0\",\n+ \"signal-exit\": \"^3.0.2\",\n+ \"strip-final-newline\": \"^2.0.0\"\n+ }\n+ },\n+ \"get-stream\": {\n+ \"version\": \"5.1.0\",\n+ \"resolved\": \"https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz\",\n+ \"integrity\": \"sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==\",\n+ \"requires\": {\n+ \"pump\": \"^3.0.0\"\n+ }\n+ },\n+ \"is-stream\": {\n+ \"version\": \"2.0.0\",\n+ \"resolved\": \"https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz\",\n+ \"integrity\": \"sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==\"\n+ },\n+ \"mimic-fn\": {\n+ \"version\": \"2.1.0\",\n+ \"resolved\": \"https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz\",\n+ \"integrity\": \"sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==\"\n+ },\n+ \"npm-run-path\": {\n+ \"version\": \"3.1.0\",\n+ \"resolved\": \"https://registry.npmjs.org/npm-run-path/-/npm-run-path-3.1.0.tgz\",\n+ \"integrity\": \"sha512-Dbl4A/VfiVGLgQv29URL9xshU8XDY1GeLy+fsaZ1AA8JDSfjvr5P5+pzRbWqRSBxk6/DW7MIh8lTM/PaGnP2kg==\",\n+ \"requires\": {\n+ \"path-key\": \"^3.0.0\"\n+ }\n+ },\n+ \"onetime\": {\n+ \"version\": \"5.1.0\",\n+ \"resolved\": \"https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz\",\n+ \"integrity\": \"sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==\",\n+ \"requires\": {\n+ \"mimic-fn\": \"^2.1.0\"\n+ }\n+ },\n+ \"p-finally\": {\n+ \"version\": \"2.0.1\",\n+ \"resolved\": \"https://registry.npmjs.org/p-finally/-/p-finally-2.0.1.tgz\",\n+ \"integrity\": \"sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==\"\n+ },\n+ \"path-key\": {\n+ \"version\": \"3.1.0\",\n+ \"resolved\": \"https://registry.npmjs.org/path-key/-/path-key-3.1.0.tgz\",\n+ \"integrity\": \"sha512-8cChqz0RP6SHJkMt48FW0A7+qUOn+OsnOsVtzI59tZ8m+5bCSk7hzwET0pulwOM2YMn9J1efb07KB9l9f30SGg==\"\n+ }\n}\n},\n\"defaults\": {\n}\n},\n\"eslint\": {\n- \"version\": \"6.2.0\",\n- \"resolved\": \"https://registry.npmjs.org/eslint/-/eslint-6.2.0.tgz\",\n- \"integrity\": \"sha512-sS0SZwm5UAoI83F+cgdomz0cBNPs+AnRvEboNYeWvrZ8UcDHCu/5muocwoDL2TkHq9skkP0GvZjmwI8HG7S3sw==\",\n+ \"version\": \"6.2.1\",\n+ \"resolved\": \"https://registry.npmjs.org/eslint/-/eslint-6.2.1.tgz\",\n+ \"integrity\": \"sha512-ES7BzEzr0Q6m5TK9i+/iTpKjclXitOdDK4vT07OqbkBT2/VcN/gO9EL1C4HlK3TAOXYv2ItcmbVR9jO1MR0fJg==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/code-frame\": \"^7.0.0\",\n\"debug\": \"^4.0.1\",\n\"doctrine\": \"^3.0.0\",\n\"eslint-scope\": \"^5.0.0\",\n- \"eslint-utils\": \"^1.4.0\",\n+ \"eslint-utils\": \"^1.4.2\",\n\"eslint-visitor-keys\": \"^1.1.0\",\n\"espree\": \"^6.1.0\",\n\"esquery\": \"^1.0.1\",\n}\n},\n\"eslint-plugin-standard\": {\n- \"version\": \"4.0.0\",\n- \"resolved\": \"https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.0.tgz\",\n- \"integrity\": \"sha512-OwxJkR6TQiYMmt1EsNRMe5qG3GsbjlcOhbGUBY4LtavF9DsLaTcoR+j2Tdjqi23oUwKNUqX7qcn5fPStafMdlA==\",\n+ \"version\": \"4.0.1\",\n+ \"resolved\": \"https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.1.tgz\",\n+ \"integrity\": \"sha512-v/KBnfyaOMPmZc/dmc6ozOdWqekGp7bBGq4jLAecEfPGmfKiWS4sA8sC0LqiV9w5qmXAtXVn4M3p1jSyhY85SQ==\",\n\"dev\": true\n},\n\"eslint-plugin-vue\": {\n}\n},\n\"eslint-utils\": {\n- \"version\": \"1.4.0\",\n- \"resolved\": \"https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.0.tgz\",\n- \"integrity\": \"sha512-7ehnzPaP5IIEh1r1tkjuIrxqhNkzUJa9z3R92tLJdZIVdWaczEhr3EbhGtsMrVxi1KeR8qA7Off6SWc5WNQqyQ==\",\n+ \"version\": \"1.4.2\",\n+ \"resolved\": \"https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.2.tgz\",\n+ \"integrity\": \"sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q==\",\n\"dev\": true,\n\"requires\": {\n\"eslint-visitor-keys\": \"^1.0.0\"\n\"integrity\": \"sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==\"\n},\n\"highlight.js\": {\n- \"version\": \"9.15.9\",\n- \"resolved\": \"https://registry.npmjs.org/highlight.js/-/highlight.js-9.15.9.tgz\",\n- \"integrity\": \"sha512-M0zZvfLr5p0keDMCAhNBp03XJbKBxUx5AfyfufMdFMEP4N/Xj6dh0IqC75ys7BAzceR34NgcvXjupRVaHBPPVQ==\"\n+ \"version\": \"9.15.10\",\n+ \"resolved\": \"https://registry.npmjs.org/highlight.js/-/highlight.js-9.15.10.tgz\",\n+ \"integrity\": \"sha512-RoV7OkQm0T3os3Dd2VHLNMoaoDVx77Wygln3n9l5YV172XonWG6rgQD3XnF/BuFFZw9A0TJgmMSO8FEWQgvcXw==\"\n},\n\"hmac-drbg\": {\n\"version\": \"1.0.1\",\n\"jsonify\": {\n\"version\": \"0.0.0\",\n\"resolved\": \"https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz\",\n- \"integrity\": \"sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=\"\n+ \"integrity\": \"sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=\",\n+ \"dev\": true\n},\n\"jsprim\": {\n\"version\": \"1.4.1\",\n\"merge-stream\": {\n\"version\": \"2.0.0\",\n\"resolved\": \"https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz\",\n- \"integrity\": \"sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==\",\n- \"dev\": true\n+ \"integrity\": \"sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==\"\n},\n\"merge2\": {\n\"version\": \"1.2.4\",\n}\n},\n\"sass-loader\": {\n- \"version\": \"7.2.0\",\n- \"resolved\": \"https://registry.npmjs.org/sass-loader/-/sass-loader-7.2.0.tgz\",\n- \"integrity\": \"sha512-h8yUWaWtsbuIiOCgR9fd9c2lRXZ2uG+h8Dzg/AGNj+Hg/3TO8+BBAW9mEP+mh8ei+qBKqSJ0F1FLlYjNBc61OA==\",\n+ \"version\": \"7.3.1\",\n+ \"resolved\": \"https://registry.npmjs.org/sass-loader/-/sass-loader-7.3.1.tgz\",\n+ \"integrity\": \"sha512-tuU7+zm0pTCynKYHpdqaPpe+MMTQ76I9TPZ7i4/5dZsigE350shQWe5EZNl5dBidM49TPET75tNqRbcsUZWeNA==\",\n\"dev\": true,\n\"requires\": {\n\"clone-deep\": \"^4.0.1\",\n\"loader-utils\": \"^1.0.1\",\n\"neo-async\": \"^2.5.0\",\n\"pify\": \"^4.0.1\",\n- \"semver\": \"^5.5.0\"\n+ \"semver\": \"^6.3.0\"\n},\n\"dependencies\": {\n\"pify\": {\n\"resolved\": \"https://registry.npmjs.org/pify/-/pify-4.0.1.tgz\",\n\"integrity\": \"sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==\",\n\"dev\": true\n- },\n- \"semver\": {\n- \"version\": \"5.7.0\",\n- \"resolved\": \"https://registry.npmjs.org/semver/-/semver-5.7.0.tgz\",\n- \"integrity\": \"sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==\",\n- \"dev\": true\n}\n}\n},\n\"integrity\": \"sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=\"\n},\n\"shell-quote\": {\n- \"version\": \"1.6.1\",\n- \"resolved\": \"https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz\",\n- \"integrity\": \"sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=\",\n- \"requires\": {\n- \"array-filter\": \"~0.0.0\",\n- \"array-map\": \"~0.0.0\",\n- \"array-reduce\": \"~0.0.0\",\n- \"jsonify\": \"~0.0.0\"\n- }\n+ \"version\": \"1.7.1\",\n+ \"resolved\": \"https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.1.tgz\",\n+ \"integrity\": \"sha512-2kUqeAGnMAu6YrTPX4E3LfxacH9gKljzVjlkUeSqY0soGwK4KLl7TURXCem712tkhBCeeaFP9QK4dKn88s3Icg==\"\n},\n\"shellwords\": {\n\"version\": \"0.1.1\",\n\"resolved\": \"http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz\",\n\"integrity\": \"sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=\"\n},\n+ \"strip-final-newline\": {\n+ \"version\": \"2.0.0\",\n+ \"resolved\": \"https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz\",\n+ \"integrity\": \"sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==\"\n+ },\n\"strip-indent\": {\n\"version\": \"1.0.1\",\n\"resolved\": \"https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz\",\n}\n},\n\"stylelint-scss\": {\n- \"version\": \"3.9.3\",\n- \"resolved\": \"https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-3.9.3.tgz\",\n- \"integrity\": \"sha512-pLLpwSpUwiqpAga/C22ZuN/d5ql2zVWGzG8MO+P3DQYcDNue3eZGvda/bJdkx4mDcVy06jlDt+BgSvMYUrwleQ==\",\n+ \"version\": \"3.9.4\",\n+ \"resolved\": \"https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-3.9.4.tgz\",\n+ \"integrity\": \"sha512-RHUHnEDRi2TONwFm2l0OMLo5y78aEYljabZsaf2+27JHM5aLjlO5waMlIwcK7xNfHlD/Ma9LoRAiFtI5ikNI2g==\",\n\"requires\": {\n- \"lodash\": \"^4.17.11\",\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- \"postcss-value-parser\": \"^4.0.0\"\n+ \"postcss-value-parser\": \"^4.0.2\"\n},\n\"dependencies\": {\n\"cssesc\": {\n}\n},\n\"postcss-value-parser\": {\n- \"version\": \"4.0.1\",\n- \"resolved\": \"https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.1.tgz\",\n- \"integrity\": \"sha512-3Jk+/CVH0HBfgSSFWALKm9Hyzf4kumPjZfUxkRYZNcqFztELb2APKxv0nlX8HCdc1/ymePmT/nFf1ST6fjWH2A==\"\n+ \"version\": \"4.0.2\",\n+ \"resolved\": \"https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.2.tgz\",\n+ \"integrity\": \"sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ==\"\n}\n}\n},\n}\n},\n\"thread-loader\": {\n- \"version\": \"2.1.2\",\n- \"resolved\": \"https://registry.npmjs.org/thread-loader/-/thread-loader-2.1.2.tgz\",\n- \"integrity\": \"sha512-7xpuc9Ifg6WU+QYw/8uUqNdRwMD+N5gjwHKMqETrs96Qn+7BHwECpt2Brzr4HFlf4IAkZsayNhmGdbkBsTJ//w==\",\n+ \"version\": \"2.1.3\",\n+ \"resolved\": \"https://registry.npmjs.org/thread-loader/-/thread-loader-2.1.3.tgz\",\n+ \"integrity\": \"sha512-wNrVKH2Lcf8ZrWxDF/khdlLlsTMczdcwPA9VEK4c2exlEPynYWxi9op3nPTo5lAnDIkE0rQEB3VBP+4Zncc9Hg==\",\n\"requires\": {\n\"loader-runner\": \"^2.3.1\",\n\"loader-utils\": \"^1.1.0\",\n"
},
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "\"url\": \"git://github.com/bolt/four.git\"\n},\n\"dependencies\": {\n- \"@vue/cli-service\": \"^3.10.0\",\n+ \"@vue/cli-service\": \"^3.11.0\",\n\"axios\": \"^0.19.0\",\n\"baguettebox.js\": \"^1.11.0\",\n- \"bootbox\": \"^5.3.1\",\n+ \"bootbox\": \"^5.3.2\",\n\"bootstrap\": \"^4.3.1\",\n\"codemirror\": \"^5.48.4\",\n\"dropzone\": \"^5.5.1\",\n\"selectize\": \"^0.12.6\",\n\"simplemde\": \"^1.11.2\",\n\"stylelint-config-recommended-scss\": \"^3.3.0\",\n- \"stylelint-scss\": \"^3.9.3\",\n+ \"stylelint-scss\": \"^3.9.4\",\n\"terser\": \"^4.2.0\",\n\"tinycolor2\": \"^1.4.1\",\n\"vue\": \"^2.6.10\",\n\"babel-core\": \"^7.0.0-bridge.0\",\n\"babel-eslint\": \"^10.0.2\",\n\"babel-jest\": \"^24.9.0\",\n- \"eslint\": \"^6.2.0\",\n+ \"eslint\": \"^6.2.1\",\n\"eslint-config-prettier\": \"^6.1.0\",\n\"eslint-plugin-prettier\": \"^3.1.0\",\n- \"eslint-plugin-standard\": \"^4.0.0\",\n+ \"eslint-plugin-standard\": \"^4.0.1\",\n\"eslint-plugin-vue\": \"^5.2.3\",\n\"jest\": \"^24.9.0\",\n\"jest-serializer-vue\": \"^2.0.2\",\n\"postcss-preset-env\": \"^6.7.0\",\n\"prettier\": \"^1.18.2\",\n\"regenerator-runtime\": \"^0.13.3\",\n- \"sass-loader\": \"^7.2.0\",\n+ \"sass-loader\": \"^7.3.1\",\n\"source-sans-pro\": \"^2.45.0\",\n\"stylelint\": \"^10.1.0\",\n\"stylelint-config-standard\": \"^18.3.0\",\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/_base/layout.html.twig",
"new_path": "templates/_base/layout.html.twig",
"diff": "<admin-toolbar\nsite-name=\"{{ config.get('general/sitename') }}\"\n:menu=\"{{ admin_menu_json }}\"\n- user=\"{{ user|default }}\"\n:labels=\"{{ labels }}\"\n- :backend_prefix=\"{{ path('bolt_dashboard') }}\"\n+ :backend-prefix=\"{{ path('bolt_dashboard') }}\"\n></admin-toolbar>\n</nav>\n<!-- End Admin Toolbar -->\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/_partials/fields/date.html.twig",
"new_path": "templates/_partials/fields/date.html.twig",
"diff": "form='{{ form }}'\nmode='{{ mode }}'\nlocale='{{user.locale}}'\n- labels=\"{{ { 'toggle': 'editor_date.toggle'|trans }|json_encode }}\"\n+ labels='{{ { 'toggle': 'editor_date.toggle'|trans }|json_encode }}'\n></editor-date>\n{% endblock %}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Several small Vue fixes and tweaks
|
95,144 |
23.08.2019 16:33:44
| -7,200 |
7e15ce32baf999158d786824cfbca3e7ff116233
|
rename languageselect.html.twig to _languageselect.html.twig
|
[
{
"change_type": "MODIFY",
"old_path": "public/theme/skeleton/partials/_footer.twig",
"new_path": "public/theme/skeleton/partials/_footer.twig",
"diff": "<h4>{{ __('general.phrase.select_language') }}</h4>\n- {% include 'helpers/languageselect.html.twig' with {'type': 'select'} %}\n+ {% include 'helpers/_languageselect.html.twig' with {'type': 'select'} %}\n<hr>\n"
},
{
"change_type": "RENAME",
"old_path": "templates/helpers/languageselect.html.twig",
"new_path": "templates/helpers/_languageselect.html.twig",
"diff": ""
}
] |
PHP
|
MIT License
|
bolt/core
|
rename languageselect.html.twig to _languageselect.html.twig
|
95,144 |
23.08.2019 19:32:56
| -7,200 |
1c4cde999a32a30a9daff5033ecfdfa8a9d09028
|
Adding a few helpers
|
[
{
"change_type": "ADD",
"old_path": null,
"new_path": "templates/helpers/_field_blocks.twig",
"diff": "+{# Sub-block for 'text' field such as 'text', 'textarea', or 'html' #}\n+{% block text_field %}\n+ <div data-bolt-field=\"{{ field.name }}\">\n+ {%- autoescape false -%}\n+ {{ field.twigValue() }}\n+ {%- endautoescape -%}\n+ </div>\n+{% endblock %}\n+\n+{# Sub-block for Markdown fields #}\n+{% block markdown_field %}\n+ <div data-bolt-field=\"{{ field.name }}\">\n+ {{ field.twigValue() }}\n+ </div>\n+{% endblock %}\n+\n+{# Sub-block for 'imagelist' fields #}\n+{% block imagelist_field %}\n+ <div class=\"bolt-imagelist\">\n+ {% for image in field %}\n+ <div class=\"bolt-imageholder\">\n+ {{ popup(image.filename, 200, 0) }}\n+ </div>\n+ {% endfor %}\n+ </div>\n+{% endblock %}\n+\n+{# Block for \"basic\" fields like HTML, Markdown, Textarea and Text #}\n+{% block common_fields %}\n+\n+ {# HTML, Textarea, Text fields #}\n+ {% if type in ['html', 'textarea', 'text'] %}\n+ {% set tag = (field.name in ['title', 'name', 'caption', 'subject', 'heading']) ? 'h3' : 'p' %}\n+ <{{tag}}>{{ block('text_field') }}</{{tag}}>\n+ {% endif %}\n+\n+ {# Markdown fields #}\n+ {% if type == 'markdown' %}\n+ {{ block('markdown_field') }}\n+ {% endif %}\n+\n+ {# Image fields #}\n+ {% if type == \"image\" and field is not empty %}\n+ {{ field|showimage('684') }}\n+ {% endif %}\n+\n+ {# Video fields #}\n+ {% if type == \"video\" and field.responsive|default is not empty %}\n+ <div class=\"flex-video {{ field.ratio|default(1) > 1.5 ? 'widescreen' }}\">\n+ {{ field.responsive }}\n+ </div>\n+ {% endif %}\n+\n+{% endblock %}\n+\n+{# Block for other field types, like Geo, Select, Checkbox and others. #}\n+{% block extended_fields %}\n+\n+ {# Geolocation field #}\n+ {% if type == \"geolocation\" and field.latitude|default is not empty %}\n+ <img src=\"http://maps.googleapis.com/maps/api/staticmap?center={{ field.latitude }},{{ field.longitude }}&zoom=14&size=617x300&sensor=false&markers={{ field.latitude }},{{ field.longitude }}\">\n+ {% endif %}\n+\n+ {# 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.definition.label|default(field.name) }}: </strong>\n+ {{ dump(field) }}\n+ </p>\n+ {% endif %}\n+\n+ {# Checkbox fields #}\n+ {% if type == \"checkbox\" %}\n+ <p><strong>{{ field.definition.label|default(field.name) }}</strong>: {{ field ? \"checked\" : \"not checked\" }}</p>\n+ {% endif %}\n+\n+ {# Imagelist fields #}\n+ {% if type == \"imagelist\" and field is not empty %}\n+ {{ block('imagelist_field') }}\n+ {% endif %}\n+\n+ {# No special case defined for this type of field. We just output them, if it's\n+ a simple scalar, and 'dump' them otherwise. #}\n+ {% if type in [ 'filelist', 'datetime', 'date', 'integer', 'float' ] and field is not empty %}\n+ <p><strong>{{ field.definition.label|default(field.name) }}: </strong>\n+ {% if field is iterable %}\n+ {{ dump(field) }}\n+ {% else %}\n+ {{ field }}\n+ {% endif %}\n+ </p>\n+ {% endif %}\n+\n+{% endblock %}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "templates/helpers/_fields.twig",
"diff": "+{#\n+ Default output for fields.\n+\n+ This file is contains the 'sub_fields' Twig block tag.\n+\n+ The 'sub_fields' Twig block is split into two parts:\n+ - The first section initializes the variables and settings, both from the\n+ ContentType definitions as well as passed in variables.\n+ - The last section is where the actual looping is done, and the relevant\n+ {{ block() }} function is called, for the 'ContentType fields',\n+ 'repeater fields', 'block fields' and 'template fields' in turn.\n+\n+ Read the relevant section in the documentation on usage of this\n+ functionality: https://docs.bolt.cm/templating\n+\n+ For more information on using blocks, see the Twig documentation at:\n+ - https://twig.sensiolabs.org/doc/2.x/tags/block.html\n+ - https://twig.sensiolabs.org/doc/2.x/functions/block.html\n+#}\n+{% use 'helpers/_field_blocks.twig' %}\n+\n+{% block sub_fields %}\n+ {# SECTION 1: INITIALIZATION #}\n+ {%- spaceless %}\n+ {# Set up the array of fieldnames that should be iterated. We do this by looping\n+ over _all_ the fields, and skipping those in the 'omittedkeys' array. #}\n+ {% set omittedkeys = [ 'id', 'slug', 'datecreated', 'datechanged', 'datepublish',\n+ 'datedepublish', 'username', 'status', 'ownerid', 'templatefields' ] %}\n+\n+ {# Skip over the fields that are used in the slug, unless explicitly told not to,\n+ using the `skip_uses` parameter. #}\n+ {% if (record.contentType.fields.slug.uses|default(null) is iterable) and skip_uses|default(true) %}\n+ {% set omittedkeys = omittedkeys|merge(record.contentType.fields.slug.uses) %}\n+ {% endif %}\n+\n+ {# We also skip over the fields that are explicitly excluded. #}\n+ {% if exclude|default is iterable %}\n+ {% set omittedkeys = omittedkeys|merge(exclude) %}\n+ {% endif %}\n+ {% endspaceless -%}\n+\n+ {# SECTION 2: LOOPING AND ITERATION - The actual looping is done here. #}\n+ {% for field in record.fields if (field.name not in omittedkeys) %}\n+\n+ {% set type = field.definition.type %}\n+\n+ {# Fields that are considered 'common': 'html', 'markdown', 'textarea',\n+ 'text', 'image', 'video' and 'imagelist' #}\n+ {% if common|default(true) and (type not in exclude|default([])) %}\n+\n+ {{ block('common_fields') }}\n+\n+ {% endif %}\n+\n+ {# The rest of the built-in types #}\n+ {% if extended|default(false) and (type not in exclude|default([])) %}\n+\n+ {{ block('extended_fields') }}\n+\n+ {% endif %}\n+\n+ {% endfor %}\n+\n+ {# We do the same for the templatefields, if set and not empty. #}\n+ {% if record.hasField('templateFields') %}\n+ {# Note: This needs to be expanded upon!! For better detection the 'virtual'\n+ content type for the templatefields should know about the types of fields. #}\n+ {% set templatefields_field_types = attribute(record.contentType.templatefields.first, 'fields') %}\n+\n+ {% for key, field in record.templateFields if (key not in omittedkeys) %}\n+\n+ {% set type = attribute(attribute(templatefields_field_types, key), 'type') %}\n+ {{ block('common_fields') }}\n+ {{ block('extended_fields') }}\n+\n+ {% endfor %}\n+\n+ {% endif %}\n+{% endblock sub_fields %}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "templates/helpers/_pager.html.twig",
"diff": "+{% if records.haveToPaginate|default() %}\n+\n+ {% set route = 'listing' %}\n+ {% set routeParams = app.request.get('_route_params') %}\n+\n+\n+ {# The Pagerfanta function allows you to configure what is paginated,\n+ the theme (template) to use for it, as well as a number of other options.\n+ See: https://github.com/whiteoctober/WhiteOctoberPagerfantaBundle #}\n+\n+ <div class=\"{{ class }}\">\n+ {{ pagerfanta(records, theme, {\n+ 'proximity': surround\n+ }) }}\n+ </div>\n+\n+ <div class=\"navigation text-center\">\n+ <ul class=\"pagination\">\n+ {% if records.hasPreviousPage %}\n+ {% set p = routeParams|merge({page: records.previousPage}) %}\n+ <li class=\"prev\"><a href=\"{{ path(route, p) }}\" rel=\"previous\"><i class=\"fa fw fa-long-arrow-left\"></i> Previous</a></li>\n+ {% else %}\n+ <li class=\"prev disabled\"><span><i class=\"fa fw fa-arrow-left\"></i> Previous</span></li>\n+ {% endif %}\n+\n+ {% for i in 1 .. records.nbPages %}\n+ {% if i == records.currentPage %}\n+ <li class=\"active\"><span>{{ i }} <span class=\"sr-only\">(current)</span></span></li>\n+ {% else %}\n+ {% set p = routeParams|merge({page: i}) %}\n+ <li><a href=\"{{ path(route, p) }}\">{{ i }}</a></li>\n+ {% endif %}\n+ {% endfor %}\n+\n+ {% if records.hasNextPage %}\n+ {% set p = routeParams|merge({page: records.nextPage}) %}\n+ <li class=\"prev\"><a href=\"{{ path(route, p) }}\" rel=\"next\">Next <i class=\"fa fw fa-arrow-right\"></i></a></li>\n+ {% else %}\n+ <li class=\"next disabled\"><span>Next <i class=\"fa fw fa-arrow-right\"></i></span></li>\n+ {% endif %}\n+ </ul>\n+ </div>\n+{% endif %}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "templates/helpers/_taxonomylinks.html.twig",
"diff": "+{% if record|taxonomies %}\n+ <p>\n+ {% for type, taxonomies in record|taxonomies %}\n+ <em>\n+ {% if taxonomies|length < 2 %}\n+ {{ config.get('taxonomies')[type].singular_name }}:\n+ {% else %}\n+ {{ config.get('taxonomies')[type].name }}:\n+ {% endif %}\n+ </em>\n+ {% for taxonomy in taxonomies %}\n+ <a href=\"{{ taxonomy.link }}\" class=\"taxonomy-{{ type }}\">{{ taxonomy.name }}</a>{% if not loop.last %}, {% endif %}\n+ {% else %}\n+ {{ __('general.phrase.none') }}\n+ {% endfor %}\n+ {% if not loop.last %} - {% endif %}\n+ {% endfor %}\n+ </p>\n+{% endif %}\n\\ No newline at end of file\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Adding a few helpers
|
95,144 |
24.08.2019 14:23:41
| -7,200 |
8fcd0493185e29f4257ab2ff5c42b01ac8e402ac
|
Working on menu, pager and helpers
|
[
{
"change_type": "MODIFY",
"old_path": "src/Configuration/Config.php",
"new_path": "src/Configuration/Config.php",
"diff": "@@ -11,6 +11,7 @@ use Bolt\\Configuration\\Parser\\ContentTypesParser;\nuse Bolt\\Configuration\\Parser\\GeneralParser;\nuse Bolt\\Configuration\\Parser\\MenuParser;\nuse Bolt\\Configuration\\Parser\\TaxonomyParser;\n+use Bolt\\Configuration\\Parser\\ThemeParser;\nuse Psr\\SimpleCache\\CacheInterface;\nuse Symfony\\Component\\Stopwatch\\Stopwatch;\nuse Tightenco\\Collect\\Support\\Collection;\n@@ -108,11 +109,18 @@ class Config\n$menu = new MenuParser($this->projectDir);\n$config['menu'] = $menu->parse();\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+\n+ $theme = new ThemeParser($this->projectDir, $this->getPath('theme'));\n+ $config['theme'] = $theme->parse();\n+\n// @todo Add these config files if needed, or refactor them out otherwise\n//'permissions' => $this->parseConfigYaml('permissions.yml'),\n//'extensions' => $this->parseConfigYaml('extensions.yml'),\n- $timestamps = $this->getConfigFilesTimestamps($general, $taxonomy, $contentTypes, $menu);\n+ $timestamps = $this->getConfigFilesTimestamps($general, $taxonomy, $contentTypes, $menu, $theme);\nreturn [\nDeepCollection::deepMake($config),\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "src/Configuration/Parser/ThemeParser.php",
"diff": "+<?php\n+\n+declare(strict_types=1);\n+\n+namespace Bolt\\Configuration\\Parser;\n+\n+use Tightenco\\Collect\\Support\\Collection;\n+\n+class ThemeParser extends BaseParser\n+{\n+ public function __construct(string $projectDir, string $path, string $filename = 'theme.yaml')\n+ {\n+ $this->path = $path;\n+ parent::__construct($projectDir, $filename);\n+ }\n+\n+ /**\n+ * Read and parse the theme.yml configuration file.\n+ */\n+ public function parse(): Collection\n+ {\n+ $theme = $this->parseConfigYaml($this->path . '/theme.yaml', true);\n+\n+ return new Collection($theme);\n+ }\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/TwigAwareController.php",
"new_path": "src/Controller/TwigAwareController.php",
"diff": "@@ -53,6 +53,11 @@ class TwigAwareController extends AbstractController\n// Set User in global Twig environment\n$parameters['user'] = $parameters['user'] ?? $this->getUser();\n+ // if theme.yaml was loaded, set it as global.\n+ if ($this->config->has('theme')) {\n+ $parameters['theme'] = $this->config->get('theme');\n+ }\n+\n$this->setThemePackage();\n$this->setTwigLoader();\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/FrontendMenuExtension.php",
"new_path": "src/Twig/FrontendMenuExtension.php",
"diff": "@@ -38,7 +38,7 @@ class FrontendMenuExtension extends AbstractExtension\nreturn $this->menuBuilder->buildMenu($name);\n}\n- public function renderMenu(Environment $twig, ?string $name = null, string $template = '_sub_menu.twig', string $class = '', bool $withsubmenus = true): string\n+ public function renderMenu(Environment $twig, ?string $name = null, string $template = 'helpers/_menu.html.twig', string $class = '', bool $withsubmenus = true): string\n{\n$context = [\n'menu' => $this->menuBuilder->buildMenu($name),\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/RecordExtension.php",
"new_path": "src/Twig/RecordExtension.php",
"diff": "@@ -9,6 +9,8 @@ use Bolt\\Entity\\Field;\nuse Bolt\\Repository\\TaxonomyRepository;\nuse Doctrine\\Common\\Collections\\Collection;\nuse Pagerfanta\\Pagerfanta;\n+use Symfony\\Component\\HttpFoundation\\Request;\n+use Symfony\\Component\\HttpFoundation\\RequestStack;\nuse Tightenco\\Collect\\Support\\Collection as LaravelCollection;\nuse Twig\\Environment;\nuse Twig\\Extension\\AbstractExtension;\n@@ -24,9 +26,13 @@ class RecordExtension extends AbstractExtension\n/** @var TaxonomyRepository */\nprivate $taxonomyRepository;\n- public function __construct(TaxonomyRepository $taxonomyRepository)\n+ /** @var Request */\n+ private $request;\n+\n+ public function __construct(TaxonomyRepository $taxonomyRepository, RequestStack $requestStack)\n{\n$this->taxonomyRepository = $taxonomyRepository;\n+ $this->request = $requestStack->getCurrentRequest();\n}\n/**\n@@ -52,13 +58,14 @@ class RecordExtension extends AbstractExtension\nreturn 'list_templates placeholder';\n}\n- public function pager(Environment $twig, Pagerfanta $records, string $template = '_sub_pager.twig', string $class = 'pagination', string $theme = 'default', int $surround = 3)\n+ public function pager(Environment $twig, Pagerfanta $records, string $template = 'helpers/_pager_basic.html.twig', string $class = 'pagination', int $surround = 3)\n{\n$context = [\n'records' => $records,\n'surround' => $surround,\n'class' => $class,\n- 'theme' => $theme,\n+ 'route' => $this->request->get('_route'),\n+ 'routeParams' => $this->request->get('_route_params'),\n];\nreturn $twig->render($template, $context);\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/helpers/_field_blocks.twig",
"new_path": "templates/helpers/_field_blocks.twig",
"diff": "{# Sub-block for 'text' field such as 'text', 'textarea', or 'html' #}\n{% block text_field %}\n<div data-bolt-field=\"{{ field.name }}\">\n+ <{{tag}}>\n{%- autoescape false -%}\n{{ field.twigValue() }}\n{%- endautoescape -%}\n+ </{{tag}}>\n</div>\n{% endblock %}\n{# HTML, Textarea, Text fields #}\n{% if type in ['html', 'textarea', 'text'] %}\n{% set tag = (field.name in ['title', 'name', 'caption', 'subject', 'heading']) ? 'h3' : 'p' %}\n- <{{tag}}>{{ block('text_field') }}</{{tag}}>\n+ {{ block('text_field') }}\n{% endif %}\n{# Markdown fields #}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "templates/helpers/_menu.html.twig",
"diff": "+{% macro display_menu_item(item, loop) %}\n+\n+ {% if item.submenu %}\n+ {% set class = 'navbar-link' %}\n+ <div class=\"navbar-item has-dropdown is-hoverable\">\n+ {% else %}\n+ {% set class = 'navbar-item' %}\n+ {% endif %}\n+\n+ <a href='{{ item.link }}' {% if item.title is defined %}title='{{ item.title|escape }}'{% endif %}\n+ class='{{ class }} {% if item.current %}current {% endif %}{% if item.class is defined %}{{item.class}}{% endif %} index-{{ loop.index }}{% if loop.first %} first{% endif %}{% if loop.last %} last{% endif %}'>\n+ {% if item.label is defined %}{{item.label}}{% else %} - {% endif %}\n+ </a>\n+\n+ {% if item.submenu %}\n+ <div class=\"navbar-dropdown\">\n+ {% for submenu in item.submenu %}\n+ {{ _self.display_menu_item(submenu, loop) }}\n+ {% endfor %}\n+ </div>\n+\n+ </div>\n+ {% endif %}\n+\n+{% endmacro %}\n+\n+{% for item in menu %}\n+ {{ _self.display_menu_item(item, loop, 'navbar-link') }}\n+{% endfor %}\n"
},
{
"change_type": "DELETE",
"old_path": "templates/helpers/_pager.html.twig",
"new_path": null,
"diff": "-{% if records.haveToPaginate|default() %}\n-\n- {% set route = 'listing' %}\n- {% set routeParams = app.request.get('_route_params') %}\n-\n-\n- {# The Pagerfanta function allows you to configure what is paginated,\n- the theme (template) to use for it, as well as a number of other options.\n- See: https://github.com/whiteoctober/WhiteOctoberPagerfantaBundle #}\n-\n- <div class=\"{{ class }}\">\n- {{ pagerfanta(records, theme, {\n- 'proximity': surround\n- }) }}\n- </div>\n-\n- <div class=\"navigation text-center\">\n- <ul class=\"pagination\">\n- {% if records.hasPreviousPage %}\n- {% set p = routeParams|merge({page: records.previousPage}) %}\n- <li class=\"prev\"><a href=\"{{ path(route, p) }}\" rel=\"previous\"><i class=\"fa fw fa-long-arrow-left\"></i> Previous</a></li>\n- {% else %}\n- <li class=\"prev disabled\"><span><i class=\"fa fw fa-arrow-left\"></i> Previous</span></li>\n- {% endif %}\n-\n- {% for i in 1 .. records.nbPages %}\n- {% if i == records.currentPage %}\n- <li class=\"active\"><span>{{ i }} <span class=\"sr-only\">(current)</span></span></li>\n- {% else %}\n- {% set p = routeParams|merge({page: i}) %}\n- <li><a href=\"{{ path(route, p) }}\">{{ i }}</a></li>\n- {% endif %}\n- {% endfor %}\n-\n- {% if records.hasNextPage %}\n- {% set p = routeParams|merge({page: records.nextPage}) %}\n- <li class=\"prev\"><a href=\"{{ path(route, p) }}\" rel=\"next\">Next <i class=\"fa fw fa-arrow-right\"></i></a></li>\n- {% else %}\n- <li class=\"next disabled\"><span>Next <i class=\"fa fw fa-arrow-right\"></i></span></li>\n- {% endif %}\n- </ul>\n- </div>\n-{% endif %}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "templates/helpers/_pager_basic.html.twig",
"diff": "+{#\n+Predefined variables:\n+\n+ - `records`: The records to iterate over\n+ - `route`: The name of the route, to use in `{{ path() }}`\n+ - `routeParams`: Parameters to pass in to `{{ path() }}` to create the correct url\n+ - `surround`: The amount of items to show around the 'current' one. \"3\" by default.\n+ - `class`: The main CSS class to apply to the pager. \"pagination\" by default\n+\n+#}\n+{% if records.haveToPaginate|default() %}\n+ <ul class=\"{{ class }}\">\n+ <li>\n+ {% if records.hasPreviousPage %}\n+ {% set p = routeParams|merge({page: records.previousPage}) %}\n+ <a href=\"{{ path(route, p) }}\">Previous</a>\n+ {% else %}\n+ <a disabled>Previous</a>\n+ {% endif %}\n+ </li>\n+\n+ {% for i in 1 .. records.nbPages %}\n+ <li>\n+ {% set p = routeParams|merge({page: i}) %}\n+ <a href=\"{{ path(route, p) }}\" {{ (i == records.currentPage) ? 'class=\"current\"' }}>{{ i }}</a>\n+ </li>\n+ {% endfor %}\n+\n+ <li>\n+ {% if records.hasNextPage %}\n+ {% set p = routeParams|merge({page: records.nextPage}) %}\n+ <a href=\"{{ path(route, p) }}\">Next page</a>\n+ {% else %}\n+ <a disabled>Next page</a>\n+ {% endif %}\n+ </li>\n+ </ul>\n+{% endif %}\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/helpers/_pager_bulma.html.twig",
"new_path": "templates/helpers/_pager_bulma.html.twig",
"diff": "-{% if records.haveToPaginate|default() %}\n-\n- {% set route = 'listing' %}\n- {% set routeParams = app.request.get('_route_params') %}\n+{#\n+Predefined variables:\n+ - `records`: The records to iterate over\n+ - `route`: The name of the route, to use in `{{ path() }}`\n+ - `routeParams`: Parameters to pass in to `{{ path() }}` to create the correct url\n+ - `surround`: The amount of items to show around the 'current' one. \"3\" by default.\n+ - `class`: The main CSS class to apply to the pager. \"pagination\" by default\n- {# The Pagerfanta function allows you to configure what is paginated,\n- the theme (template) to use for it, as well as a number of other options.\n- See: https://github.com/whiteoctober/WhiteOctoberPagerfantaBundle #}\n+#}\n+{% if records.haveToPaginate|default() %}\n- <div class=\"{{ class }}\">\n- {{ pagerfanta(records, theme, {\n- 'proximity': surround\n- }) }}\n- </div>\n+ <nav class=\"pagination {{ class != 'pagination' ? class }}\" role=\"navigation\" aria-label=\"pagination\">\n- <div class=\"navigation text-center\">\n- <ul class=\"pagination\">\n{% if records.hasPreviousPage %}\n{% set p = routeParams|merge({page: records.previousPage}) %}\n- <li class=\"prev\"><a href=\"{{ path(route, p) }}\" rel=\"previous\"><i class=\"fa fw fa-long-arrow-left\"></i> Previous</a></li>\n+ <a href=\"{{ path(route, p) }}\" class=\"pagination-previous\">Previous</a>\n+ {% else %}\n+ <a class=\"pagination-previous\" disabled>Previous</a>\n+ {% endif %}\n+\n+ {% if records.hasNextPage %}\n+ {% set p = routeParams|merge({page: records.nextPage}) %}\n+ <a href=\"{{ path(route, p) }}\" class=\"pagination-next\">Next page</a>\n{% else %}\n- <li class=\"prev disabled\"><span><i class=\"fa fw fa-arrow-left\"></i> Previous</span></li>\n+ <a class=\"pagination-next\" disabled>Next page</a>\n{% endif %}\n+ <ul class=\"pagination-list\">\n{% for i in 1 .. records.nbPages %}\n+ <li>\n{% if i == records.currentPage %}\n- <li class=\"active\"><span>{{ i }} <span class=\"sr-only\">(current)</span></span></li>\n+ <a class=\"pagination-link is-current\" aria-label=\"Page {{ i }}\" aria-current=\"page\">{{ i }}</a>\n{% else %}\n{% set p = routeParams|merge({page: i}) %}\n- <li><a href=\"{{ path(route, p) }}\">{{ i }}</a></li>\n+ <a href=\"{{ path(route, p) }}\" class=\"pagination-link\" aria-label=\"Goto page {{ i }}\">{{ i }}</a>\n{% endif %}\n+ </li>\n{% endfor %}\n-\n- {% if records.hasNextPage %}\n- {% set p = routeParams|merge({page: records.nextPage}) %}\n- <li class=\"prev\"><a href=\"{{ path(route, p) }}\" rel=\"next\">Next <i class=\"fa fw fa-arrow-right\"></i></a></li>\n- {% else %}\n- <li class=\"next disabled\"><span>Next <i class=\"fa fw fa-arrow-right\"></i></span></li>\n- {% endif %}\n</ul>\n- </div>\n+ </nav>\n+\n{% endif %}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Working on menu, pager and helpers
|
95,144 |
24.08.2019 17:12:21
| -7,200 |
6b4f1b61b9b7b4a511a029bcf7d026ec4ab9b4d0
|
Fix pager in skeleton
|
[
{
"change_type": "MODIFY",
"old_path": "public/theme/skeleton/partials/_sub_pager.twig",
"new_path": "public/theme/skeleton/partials/_sub_pager.twig",
"diff": "See: https://github.com/whiteoctober/WhiteOctoberPagerfantaBundle #}\n<div class=\"{{ class }}\">\n- {{ pagerfanta(records, theme, {\n+ {{ pagerfanta(records, 'default', {\n'proximity': surround\n}) }}\n</div>\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Fix pager in skeleton
|
95,144 |
24.08.2019 20:38:59
| -7,200 |
e0cd134b4b5212d1b8b4c2a173fd8abea85dcae5
|
Ignore contenttypes that start with __, and slug always overrules key
|
[
{
"change_type": "MODIFY",
"old_path": "src/Configuration/Parser/ContentTypesParser.php",
"new_path": "src/Configuration/Parser/ContentTypesParser.php",
"diff": "@@ -34,7 +34,10 @@ class ContentTypesParser extends BaseParser\nforeach ($tempContentTypes as $key => $contentType) {\nif (is_array($contentType)) {\n$contentType = $this->parseContentType($key, $contentType);\n- $contentTypes[$key] = $contentType;\n+\n+ if ($contentType) {\n+ $contentTypes[$contentType->getSlug()] = $contentType;\n+ }\n}\n}\n@@ -48,11 +51,11 @@ class ContentTypesParser extends BaseParser\n*\n* @throws ConfigurationException\n*/\n- protected function parseContentType($key, array $contentType): ContentType\n+ protected function parseContentType($key, array $contentType): ?ContentType\n{\n- // If the slug isn't set, and the 'key' isn't numeric, use that as the slug.\n- if (! isset($contentType['slug']) && ! is_numeric($key)) {\n- $contentType['slug'] = Str::slug($key);\n+ // If the key starts with `__`, we ignore it.\n+ if (substr($key, 0, 2 ) === \"__\") {\n+ return null;\n}\n// If neither 'name' nor 'slug' is set, we need to warn the user. Same goes for when\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Ignore contenttypes that start with __, and slug always overrules key
|
95,144 |
02.09.2019 14:00:19
| -7,200 |
40353687344c59e79aed6d015fe6377f9693718e
|
Explicit typehinting
|
[
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/ContentEditController.php",
"new_path": "src/Controller/Backend/ContentEditController.php",
"diff": "@@ -11,6 +11,7 @@ use Bolt\\Entity\\Content;\nuse Bolt\\Entity\\Field;\nuse Bolt\\Entity\\Relation;\nuse Bolt\\Entity\\Taxonomy;\n+use Bolt\\Entity\\User;\nuse Bolt\\Enum\\Statuses;\nuse Bolt\\Event\\Listener\\ContentFillListener;\nuse Bolt\\Repository\\ContentRepository;\n@@ -82,7 +83,11 @@ class ContentEditController extends TwigAwareController implements BackendZone\npublic function new(string $contentType, Request $request): Response\n{\n$content = new Content();\n- $content->setAuthor($this->getUser());\n+\n+ /** @var User $user */\n+ $user = $this->getUser();\n+\n+ $content->setAuthor($user);\n$content->setContentType($contentType);\n$this->contentFillListener->fillContent($content);\n@@ -172,9 +177,12 @@ class ContentEditController extends TwigAwareController implements BackendZone\n*/\npublic function duplicate(Request $request, Content $content): Response\n{\n+ /** @var User $user */\n+ $user = $this->getUser();\n+\n$content->setId(null);\n$content->setCreatedAt(null);\n- $content->setAuthor($this->getUser());\n+ $content->setAuthor($user);\n$content->setModifiedAt(null);\n$content->setDepublishedAt(null);\n$content->setPublishedAt(null);\n@@ -246,9 +254,12 @@ class ContentEditController extends TwigAwareController implements BackendZone\n$locale = $this->getPostedLocale($formData);\n+ /** @var User $user */\n+ $user = $this->getUser();\n+\nif ($content === null) {\n$content = new Content();\n- $content->setAuthor($this->getUser());\n+ $content->setAuthor($user);\n$content->setContentType($request->attributes->get('id'));\n}\n$this->contentFillListener->fillContent($content);\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/ProfileController.php",
"new_path": "src/Controller/Backend/ProfileController.php",
"diff": "@@ -67,6 +67,7 @@ class ProfileController extends TwigAwareController implements BackendZone\n{\n$this->validateCsrf($request, 'profileedit');\n+ /** @var User $user */\n$user = $this->getUser();\n$displayName = $user->getDisplayName();\n$url = $this->urlGenerator->generate('bolt_profile_edit');\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Explicit typehinting
|
95,144 |
02.09.2019 14:34:08
| -7,200 |
6f227874308dff263e1c835118bce99765d4a975
|
Use Reference Extension instead of Weather in widget tests
|
[
{
"change_type": "MODIFY",
"old_path": "tests/php/Widget/WidgetsTest.php",
"new_path": "tests/php/Widget/WidgetsTest.php",
"diff": "@@ -4,7 +4,7 @@ declare(strict_types=1);\nnamespace Bolt\\Tests\\Widget;\n-use BobdenOtter\\WeatherWidget\\WeatherWidget;\n+use AcmeCorp\\ReferenceExtension\\ReferenceWidget;\nuse Bolt\\Tests\\StringTestCase;\nuse Bolt\\Widget\\BoltHeaderWidget;\nuse Bolt\\Widget\\Injector\\HtmlInjector;\n@@ -25,7 +25,7 @@ use Twig\\Loader\\ArrayLoader;\nclass WidgetsTest extends StringTestCase\n{\n- private function getWidgetsObject(array $templates = ['weather.twig' => '[Hello, weather!]'], $zone = RequestZone::BACKEND): Widgets\n+ private function getWidgetsObject(array $templates = ['reference.twig' => '[Hello, reference!]'], $zone = RequestZone::BACKEND): Widgets\n{\n$queueProcessor = new QueueProcessor(new HtmlInjector());\n$requestStack = new RequestStack();\n@@ -64,14 +64,14 @@ class WidgetsTest extends StringTestCase\n{\n$widgets = $this->getWidgetsObject();\n- $weatherWidget = new WeatherWidget();\n- $weatherWidget->setTemplate('weather.twig');\n+ $referenceWidget = new ReferenceWidget();\n+ $referenceWidget->setTemplate('reference.twig');\n- $widgets->registerWidget($weatherWidget);\n+ $widgets->registerWidget($referenceWidget);\n$this->assertSameHtml(\n- '<div class=\"widget\" id=\"widget-weather-widget\" name=\"Weather Widget\">[Hello, weather!]</div>',\n- $widgets->renderWidgetByName('Weather Widget')\n+ '<div class=\"widget\" id=\"widget-acmecorp-referencewidget\" name=\"Acme CorpReferenceWidget\">[Hello, reference!]</div>',\n+ $widgets->renderWidgetByName('AcmeCorp ReferenceWidget')\n);\n}\n@@ -104,44 +104,44 @@ class WidgetsTest extends StringTestCase\n$this->assertSameHtml('Bolt', $response->headers->get('X-Powered-By'));\n}\n- public function testProcessWeatherWidgetInTarget(): void\n+ public function testProcessReferenceWidgetInTarget(): void\n{\n$widgets = $this->getWidgetsObject();\n$response = new Response('<html><body>foo</body></html>');\n- $weather = new WeatherWidget();\n+ $referenceWidget = new ReferenceWidget();\n// overwrite things just to simplify test\n- $weather->setTarget(Target::END_OF_BODY);\n- $weather->setTemplate('weather.twig');\n+ $referenceWidget->setTarget(Target::END_OF_BODY);\n+ $referenceWidget->setTemplate('reference.twig');\n- $widgets->registerWidget($weather);\n+ $widgets->registerWidget($referenceWidget);\n$widgets->processQueue($response);\n$this->assertSameHtml(\n- '<html><body>foo<div class=\"widget\" id=\"widget-weather-widget\" name=\"Weather Widget\">[Hello, weather!]</div></body></html>',\n+ '<html><body>foo<div class=\"widget\" id=\"widget-acmecorp-referencewidget\" name=\"AcmeCorp ReferenceWidget\">[Hello, reference!]</div></body></html>',\n$response->getContent()\n);\n}\n- public function testProcessWeatherWidgetInTarget2(): void\n+ public function testProcessReferenceWidgetInTarget2(): void\n{\n$widgets = $this->getWidgetsObject();\n$response = new Response('<html><body>foo</body></html>');\n- $weather = new WeatherWidget();\n+ $reference = new ReferenceWidget();\n// overwrite things just to simplify test\n- $weather->setTarget(Target::START_OF_BODY);\n- $weather->setTemplate('weather.twig');\n+ $reference->setTarget(Target::START_OF_BODY);\n+ $reference->setTemplate('reference.twig');\n- $widgets->registerWidget($weather);\n+ $widgets->registerWidget($reference);\n$widgets->processQueue($response);\n$this->assertSameHtml(\n- '<html><body><div class=\"widget\" id=\"widget-weather-widget\" name=\"Weather Widget\">[Hello, weather!]</div>foo</body></html>',\n+ '<html><body><div class=\"widget\" id=\"widget-acmecorp-referencewidget\" name=\"Acme CorpReferenceWidget\">[Hello, reference!]</div>foo</body></html>',\n$response->getContent()\n);\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Use Reference Extension instead of Weather in widget tests
|
95,144 |
04.09.2019 17:01:12
| -7,200 |
aa539bd4acafa5a87141129b85fd6ee337c69be9
|
Make detection of template folder for extensions a bit more robust.
|
[
{
"change_type": "MODIFY",
"old_path": "src/Widget/BaseWidget.php",
"new_path": "src/Widget/BaseWidget.php",
"diff": "@@ -158,15 +158,22 @@ abstract class BaseWidget implements WidgetInterface\npublic function getTemplateFolder(): ?string\n{\n- if ($this->templateFolder === null) {\n+ if ($this->templateFolder !== null) {\n+ return $this->templateFolder;\n+ }\n+\n$reflection = new \\ReflectionClass($this);\n- $folder = dirname(dirname($reflection->getFilename())) . DIRECTORY_SEPARATOR . 'templates';\n+\n+ $folder = dirname($reflection->getFilename()) . DIRECTORY_SEPARATOR . 'templates';\nif (realpath($folder)) {\n- $this->templateFolder = realpath($folder);\n+ return realpath($folder);\n}\n+ $folder = dirname(dirname($reflection->getFilename())) . DIRECTORY_SEPARATOR . 'templates';\n+ if (realpath($folder)) {\n+ return realpath($folder);\n}\n- return $this->templateFolder;\n+ return null;\n}\nprivate function addTwigLoader(): void\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Make detection of template folder for extensions a bit more robust.
|
95,144 |
05.09.2019 20:50:53
| -7,200 |
39a1df02a726bb8751dd4a798cc601529a7cfc19
|
Bump `php-translation/symfony-bundle` to `0.9.0`
|
[
{
"change_type": "MODIFY",
"old_path": "composer.json",
"new_path": "composer.json",
"diff": "\"nelmio/cors-bundle\": \"^1.5\",\n\"nesbot/carbon\": \"^1.38 || ^2.19\",\n\"peterkahl/country-code-to-emoji-flag\": \"^0.9.1\",\n- \"php-translation/symfony-bundle\": \"^0.8\",\n+ \"php-translation/symfony-bundle\": \"^0.9\",\n\"phpdocumentor/reflection-docblock\": \"^4.3\",\n\"psr/simple-cache\": \"^1.0\",\n\"sensio/framework-extra-bundle\": \"^5.3\",\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/bundles/TranslationBundle/WebUI/base.html.twig",
"new_path": "templates/bundles/TranslationBundle/WebUI/base.html.twig",
"diff": "</div>\n</nav>\n-{% block body %}{% endblock %}\n+{% block _translation_bundle_body %}{% endblock %}\n{% endblock %}\n+{% block _translation_bundle_js %}\n+ <script type=\"text/javascript\" src=\"{{ asset(\"bundles/translation/js/webui.js\") }}\"></script>\n+{% endblock %}\n+\n{% block javascripts %}\n{{ parent() }}\n<script type=\"text/javascript\" src=\"{{ asset(\"bundles/translation/js/webui.js\") }}\"></script>\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Bump `php-translation/symfony-bundle` to `0.9.0`
|
95,144 |
05.09.2019 22:33:30
| -7,200 |
04e8cd9de4a75ca77e811758dc94ac527fef3a36
|
Render widgets only once
|
[
{
"change_type": "MODIFY",
"old_path": "src/Widgets.php",
"new_path": "src/Widgets.php",
"diff": "@@ -33,6 +33,9 @@ class Widgets\n/** @var QueueProcessor */\nprivate $queueProcessor;\n+ /** @var array */\n+ private $rendered = [];\n+\n/** @var Environment */\nprivate $twig;\n@@ -96,6 +99,10 @@ class Widgets\nprivate function invokeWidget(WidgetInterface $widget, array $params = []): ?string\n{\n+ if ($this->isRendered($widget)) {\n+ return $this->getRendered($widget);\n+ }\n+\nif ($widget instanceof StopwatchAware) {\n$widget->startStopwatch($this->stopwatch);\n}\n@@ -109,13 +116,15 @@ class Widgets\n}\n// Call the magic `__invoke` method on the $widget object\n- $renderedWidget = $widget($params);\n+ $output = $widget($params);\nif ($widget instanceof StopwatchAware) {\n$widget->stopStopwatch();\n}\n- return $renderedWidget;\n+ $this->setRendered($widget, $output);\n+\n+ return $output;\n}\npublic function processQueue(Response $response): Response\n@@ -141,4 +150,23 @@ class Widgets\n}\n);\n}\n+\n+ private function isRendered(WidgetInterface $widget): bool\n+ {\n+ return array_key_exists($widget->getName(), $this->rendered);\n+ }\n+\n+ private function getRendered(WidgetInterface $widget): ?string\n+ {\n+ if (! $this->isRendered($widget)) {\n+ return null;\n+ }\n+\n+ return $this->rendered[$widget->getName()];\n+ }\n+\n+ private function setRendered(WidgetInterface $widget, string $output): void\n+ {\n+ $this->rendered[$widget->getName()] = $output;\n+ }\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Render widgets only once
|
95,144 |
06.09.2019 16:31:31
| -7,200 |
9bf774c64e02ed4efde45b2794f26d426d8ce261
|
Tweaking CSS
|
[
{
"change_type": "MODIFY",
"old_path": "assets/js/app/listing/Components/Table/Row/index.vue",
"new_path": "assets/js/app/listing/Components/Table/Row/index.vue",
"diff": ":class=\"`is-${size}`\"\n@mouseleave=\"leave\"\n>\n+\n+ <!-- column thumbnail -->\n+ <div\n+ v-if=\"size === 'normal' && record.extras.image !== null\"\n+ class=\"listing__row--item is-thumbnail\"\n+ :style=\"`background-image: url('${record.extras.image.thumbnail}')`\"\n+ ></div>\n+ <!-- end column -->\n+\n<!-- column details -->\n<div class=\"listing__row--item is-details\">\n<a\n<row-meta :type=\"type\" :size=\"size\" :record=\"record\"></row-meta>\n<!-- end column -->\n- <!-- column thumbnail -->\n- <div\n- v-if=\"size === 'normal' && record.extras.image !== null\"\n- class=\"listing__row--item is-thumbnail\"\n- :style=\"`background-image: url('${record.extras.image.thumbnail}')`\"\n- ></div>\n- <!-- end column -->\n-\n+ <!-- excerpt for small screens -->\n<div class=\"listing__row--item is-excerpt\">\n<span>{{ record.extras.excerpt }}</span>\n</div>\n<!-- end column -->\n<!-- column sorting -->\n- <row-sorting></row-sorting>\n+ <!-- <row-sorting></row-sorting> -->\n<!-- end column -->\n</div>\n</transition-group>\n"
},
{
"change_type": "MODIFY",
"old_path": "assets/scss/init/_variables.scss",
"new_path": "assets/scss/init/_variables.scss",
"diff": "@@ -14,7 +14,9 @@ $big-z-index: 1000;\n$font-family-base: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n$headings-font-family: 'Source Sans Variable', sans-serif;\n-$font-size-base: 1rem;\n+$font-size-base: 0.9rem;\n+$font-size-largescreen: 1rem;\n+$line-height-base: 1.5;\n// Minor Third progression for header font sizes\n$h1-font-size: $font-size-base * 2.07;\n@@ -82,20 +84,13 @@ $grid-breakpoints: (\nxxs: 0,\nxs: 480px,\nsm: 576px,\n- md: 768px,\n+ md: 760px,\nlg: 992px,\n- xl: 1280px,\n+ xl: 1272px,\nwd: 1400px,\nxw: 1750px\n);\n-// sbonardt: if this is for grid-column of main grid layout, that's set back to 1.5rem. Do not change column-gap of main grid as this breaks the whole feel!\n-$column-gap: 3rem;\n-\n-// Modal Dialog spacing\n-// sbonardt: if this is such a specific usage thing, why make it a sass variable?\n-$modal-dialog-margin-y-sm-up: 4rem;\n-\n// This number determines of a button has white or black text (a11y)\n// 150: about equal to 3.0 color contrast ( WCAG2 for bold and texts above 18pts).\n// 117: for 4.5 color contrast (WCAG2 for normal text) (see ~bootstrap/_functions.scss for use in function)\n"
},
{
"change_type": "MODIFY",
"old_path": "assets/scss/layout/_admin.scss",
"new_path": "assets/scss/layout/_admin.scss",
"diff": "//** Layout | Admin\n+// Override for body font-size on large screens\n+body {\n+ @include media-breakpoint-up(wd) {\n+ font-size: $font-size-largescreen;\n+ }\n+}\n+\n// Main Layout Grid\n.admin {\nmargin-top: $admin-toolbar-height;\n//grid with autofit to make columns expand full width if other column(s) not present\ngrid-template-columns: repeat(12, 1fr);\ngrid-template-rows: auto;\n- grid-column-gap: 1.5rem;\n+ grid-column-gap: 2rem;\n+ padding: $spacer $spacer*1.5 $spacer $spacer*2.5\n}\n@include media-breakpoint-up(wd) {\n"
},
{
"change_type": "MODIFY",
"old_path": "assets/scss/modules/admin/_header.scss",
"new_path": "assets/scss/modules/admin/_header.scss",
"diff": "}\n@include media-breakpoint-up(md) {\n- padding: $spacer*1.25 $spacer*1.25 0;\n+ padding: $spacer*1.25 $spacer*1.25 0 $spacer*2.5;\n}\n@include media-breakpoint-up(wd) {\n"
},
{
"change_type": "MODIFY",
"old_path": "assets/scss/modules/admin/_sidebar.scss",
"new_path": "assets/scss/modules/admin/_sidebar.scss",
"diff": "font-weight: $font-weight-semibold;\nletter-spacing: $letter-spacing;\ncolor: var(--admin-sidebar-text);\n+ font-size: 0.85rem;\n+\n+ @include media-breakpoint-up(wd) {\nfont-size: 0.9375rem;\n+ }\n&:hover {\n@include darken(--admin-sidebar, 0.25);\n"
},
{
"change_type": "MODIFY",
"old_path": "assets/scss/modules/admin/_toolbar.scss",
"new_path": "assets/scss/modules/admin/_toolbar.scss",
"diff": "width: 100%;\ndisplay: flex;\npadding: 0;\n- // @include media-breakpoint-up(lg) {\n- // padding-right: 1rem;\n- // }\n&.is-dark {\ncolor: var(--admin-toolbar-text-light);\n"
},
{
"change_type": "MODIFY",
"old_path": "assets/scss/modules/listing/row/row.scss",
"new_path": "assets/scss/modules/listing/row/row.scss",
"diff": "@@ -115,9 +115,10 @@ $checkbox-row-width: 32px;\n@include media-breakpoint-up(md) {\norder: 2;\n- flex: 1 0 360px;\n- padding: $spacer*0.4 $spacer*2 $spacer*0.5 $spacer*0.625;\n+ flex: 1 0 290px;\n+ padding: $spacer*0.4 $spacer $spacer*0.5 $spacer*0.625;\nmargin-bottom: 0;\n+ line-height: 1.50rem;\n}\na {\n@@ -223,10 +224,16 @@ $checkbox-row-width: 32px;\nflex-wrap: wrap;\npadding: 0;\nlist-style: none;\n- font-size: 0.875rem;\n+ font-size: 0.8rem;\n+ line-height: 1.6;\nletter-spacing: $letter-spacing;\nmargin-bottom: 0;\n+ @include media-breakpoint-up(wd) {\n+ font-size: 0.875rem;\n+ line-height: 1.5;\n+ }\n+\nli {\n//display: flex;\npadding-right: 1rem;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Widgets.php",
"new_path": "src/Widgets.php",
"diff": "@@ -165,7 +165,7 @@ class Widgets\nreturn $this->rendered[$widget->getName()];\n}\n- private function setRendered(WidgetInterface $widget, string $output): void\n+ private function setRendered(WidgetInterface $widget, ?string $output): void\n{\n$this->rendered[$widget->getName()] = $output;\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Tweaking CSS
|
95,144 |
06.09.2019 17:28:56
| -7,200 |
98173cb89ba403b677fca32899ce8205d9598bbc
|
Updating tightenco/collect to 6.0
|
[
{
"change_type": "MODIFY",
"old_path": "composer.json",
"new_path": "composer.json",
"diff": "\"symfony/var-dumper\": \"^4.3\",\n\"symfony/webpack-encore-bundle\": \"^1.6\",\n\"symfony/yaml\": \"^4.3\",\n- \"tightenco/collect\": \"^5.8\",\n+ \"tightenco/collect\": \"^6.0\",\n\"twig/extensions\": \"^1.5\",\n\"webmozart/path-util\": \"^2.3\",\n\"webonyx/graphql-php\": \"^0.13\",\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Updating tightenco/collect to 6.0
|
95,144 |
07.09.2019 09:55:53
| -7,200 |
d974b848145623b132f8b172434a8d0de3ba5cbc
|
Fixing some twig deprecations
|
[
{
"change_type": "MODIFY",
"old_path": "public/theme/skeleton/partials/_sub_menu.twig",
"new_path": "public/theme/skeleton/partials/_sub_menu.twig",
"diff": "invokes itself to insert the items of the submenus. #}\n{% macro display_menu_item(item, loop, withsubmenus) %}\n{% from _self import display_menu_item %}\n- {% spaceless %}\n+ {% apply spaceless %}\n{% set with_submenu = withsubmenus and item.submenu is not empty %}\n<li class=\"index-{{ loop.index -}}\n{{ loop.first ? ' first' -}}\n</ul>\n{% endif %}\n</li>\n- {% endspaceless %}\n+ {% endapply %}\n{% endmacro %}\n{# Make the macro available for use #}\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/_macro/_macro.html.twig",
"new_path": "templates/_macro/_macro.html.twig",
"diff": "{# Button Macro with defaults #}\n-{% macro icon(icon = 'question-circle') %}{% spaceless %}\n+{% macro icon(icon = 'question-circle') %}{% apply spaceless %}\n{% set icon = icon|replace({'fa-': ''}) %}\n<i class=\"fas fa-fw fa-{{ icon }}\"></i>\n-{% endspaceless %}{% endmacro %}\n+{% endapply %}{% endmacro %}\n-{% macro button(label = 'Button', icon = 'question-circle', class = 'tertiary', attr = []) %}{% spaceless %}\n+{% macro button(label = 'Button', icon = 'question-circle', class = 'tertiary', attr = []) %}{% apply spaceless %}\n{% set label = label|trans %}\n{% set icon = icon|replace({'fa-': ''}) %}\n{{- label -}}\n</button>\n-{% endspaceless %}{% endmacro %}\n+{% endapply %}{% endmacro %}\n-{% macro buttonlink(label = 'Button', link = '', icon = 'question-circle', class = 'tertiary', attr = [], translate = true) %}{% spaceless %}\n+{% macro buttonlink(label = 'Button', link = '', icon = 'question-circle', class = 'tertiary', attr = [], translate = true) %}{% apply spaceless %}\n{% if translate %}\n{% set label = label|trans %}\n{{- label -}}\n</a>\n-{% endspaceless %}{% endmacro %}\n+{% endapply %}{% endmacro %}\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/_partials/fields/_base.html.twig",
"new_path": "templates/_partials/fields/_base.html.twig",
"diff": "-{%- spaceless -%}\n+{%- apply spaceless -%}\n{# This template fragment is used to \"extend\" the different fields, used in\nBolt's backend. Most of the values get passed in, either through a `Field`,\n{% set postfix = '<span id=\"' ~ id ~ '_postfix\" class=\"form--helper\">' ~ postfix ~ '</span>' %}\n{% endif %}\n-{%- endspaceless -%}\n+{%- endapply -%}\n<!-- field \" {{ type }} {{ variant }} {{ label }} {{ name }} -->\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/bundles/TranslationBundle/SymfonyProfiler/translation.html.twig",
"new_path": "templates/bundles/TranslationBundle/SymfonyProfiler/translation.html.twig",
"diff": "{{ message.translation }}\n</td>\n<td width=\"155px\">\n- {% spaceless %}\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- {% endspaceless %}\n+ {% endapply %}\n</td>\n</tr>\n{% endfor %}\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/content/_fields.html.twig",
"new_path": "templates/content/_fields.html.twig",
"diff": "-{% for group in groups if group != 'Relations' %}\n+{% for group in groups|filter(group => group != 'Relations') %}\n<div class=\"tab-pane {% if loop.first %}show active{% endif %}\" id=\"{{ group|slug }}\" role=\"tabpanel\"\naria-labelledby=\"{{ group|slug }}-tab\">\n- {% for key, fielddefinition in record.definition.fields if fielddefinition.group == group %}\n+ {% for key, fielddefinition in record.definition.fields|filter(fielddefinition => fielddefinition.group == group) %}\n{% if record.hasField(key) %}\n{% set field = record.getField(key)|translated(currentlocale) %}\n{% else %}\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/helpers/_fields.twig",
"new_path": "templates/helpers/_fields.twig",
"diff": "{% block sub_fields %}\n{# SECTION 1: INITIALIZATION #}\n- {%- spaceless %}\n+ {%- apply spaceless %}\n{# Set up the array of fieldnames that should be iterated. We do this by looping\nover _all_ the fields, and skipping those in the 'omittedkeys' array. #}\n{% set omittedkeys = [ 'id', 'slug', 'datecreated', 'datechanged', 'datepublish',\n{% if exclude|default is iterable %}\n{% set omittedkeys = omittedkeys|merge(exclude) %}\n{% endif %}\n- {% endspaceless -%}\n+ {% endapply -%}\n{# SECTION 2: LOOPING AND ITERATION - The actual looping is done here. #}\n{% for field in record.fields if (field.name not in omittedkeys) %}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Fixing some twig deprecations
|
95,144 |
07.09.2019 12:12:46
| -7,200 |
c78b55e52e0619575f50886e2f7ce01b66ca95d0
|
Refactor CacheInterface to Symfony\Contracts\Cache\CacheInterface
|
[
{
"change_type": "MODIFY",
"old_path": "src/Configuration/Config.php",
"new_path": "src/Configuration/Config.php",
"diff": "@@ -12,10 +12,9 @@ use Bolt\\Configuration\\Parser\\GeneralParser;\nuse Bolt\\Configuration\\Parser\\MenuParser;\nuse Bolt\\Configuration\\Parser\\TaxonomyParser;\nuse Bolt\\Configuration\\Parser\\ThemeParser;\n-use Psr\\SimpleCache\\CacheInterface;\nuse Symfony\\Component\\Stopwatch\\Stopwatch;\n+use Symfony\\Contracts\\Cache\\CacheInterface;\nuse Tightenco\\Collect\\Support\\Collection;\n-use Webmozart\\PathUtil\\Path;\nclass Config\n{\n@@ -49,44 +48,26 @@ class Config\n{\n$this->stopwatch->start('bolt.parseconfig');\n- if ($this->validCache()) {\n- $data = $this->getCache();\n- } else {\n- [$data, $timestamps] = $this->parseConfig();\n- $this->setCache($data, $timestamps);\n- }\n-\n- $this->stopwatch->stop('bolt.parseconfig');\n-\n- return $data;\n- }\n-\n- private function validCache(): bool\n- {\n- if (! $this->cache->has('config_cache') || ! $this->cache->has('config_timestamps')) {\n- return false;\n- }\n-\n- $timestamps = $this->cache->get('config_timestamps');\n+ [$data, $timestamps] = $this->getCache();\n+ // Verify if timestamps are unchanged. If not, invalidate cache.\nforeach ($timestamps as $filename => $timestamp) {\nif (file_exists($filename) === false || filemtime($filename) > $timestamp) {\n- return false;\n+ $this->cache->delete('config_cache');\n+ [$data] = $this->getCache();\n}\n}\n- return true;\n- }\n+ $this->stopwatch->stop('bolt.parseconfig');\n- private function getCache(): Collection\n- {\n- return $this->cache->get('config_cache');\n+ return $data;\n}\n- private function setCache(Collection $data, array $timestamps): void\n+ private function getCache(): array\n{\n- $this->cache->set('config_cache', $data);\n- $this->cache->set('config_timestamps', $timestamps);\n+ return $this->cache->get('config_cache', function () {\n+ return $this->parseConfig();\n+ });\n}\n/**\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Refactor CacheInterface to Symfony\Contracts\Cache\CacheInterface
|
95,144 |
07.09.2019 14:22:50
| -7,200 |
0cef300e810e996b104f5bcf6fbb0a633dc50230
|
Make widgets use `Symfony\Contracts\Cache\CacheInterface`
|
[
{
"change_type": "MODIFY",
"old_path": "src/Widget/CacheAware.php",
"new_path": "src/Widget/CacheAware.php",
"diff": "@@ -4,7 +4,7 @@ declare(strict_types=1);\nnamespace Bolt\\Widget;\n-use Psr\\SimpleCache\\CacheInterface;\n+use Symfony\\Contracts\\Cache\\CacheInterface;\n/**\n* Interface CacheAware - Widgets that make use of caching need to implement\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Widget/CacheTrait.php",
"new_path": "src/Widget/CacheTrait.php",
"diff": "@@ -5,7 +5,8 @@ declare(strict_types=1);\nnamespace Bolt\\Widget;\nuse Bolt\\Widget\\Exception\\WidgetException;\n-use Psr\\SimpleCache\\CacheInterface;\n+use Symfony\\Contracts\\Cache\\CacheInterface;\n+use Symfony\\Contracts\\Cache\\ItemInterface;\ntrait CacheTrait\n{\n@@ -27,32 +28,13 @@ trait CacheTrait\nthrow new WidgetException('Widget of class ' . self::class . ' is not initialised properly. Make sure the Widget `implements CacheAware`.');\n}\n- if ($this->isCached()) {\n- return $this->getFromCache();\n+ return $this->cache->get(\n+ $this->key,\n+ function (ItemInterface $item) use ($params) {\n+ $item->expiresAfter($this->getCacheDuration());\n+ return $this->run($params);\n}\n-\n- $output = $this->run($params);\n-\n- if ($output !== null) {\n- $this->setToCache($output);\n- }\n-\n- return $output;\n- }\n-\n- private function setToCache(string $output): void\n- {\n- $this->cache->set($this->key, $output, $this->getCacheDuration());\n- }\n-\n- private function getFromCache(): string\n- {\n- return $this->cache->get($this->key);\n- }\n-\n- private function isCached(): bool\n- {\n- return $this->cache->has($this->key);\n+ );\n}\nprivate function createKey()\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Widget/Injector/QueueProcessor.php",
"new_path": "src/Widget/Injector/QueueProcessor.php",
"diff": "@@ -8,9 +8,9 @@ use Bolt\\Widget\\CacheAware;\nuse Bolt\\Widget\\RequestAware;\nuse Bolt\\Widget\\ResponseAware;\nuse Bolt\\Widget\\WidgetInterface;\n-use Psr\\SimpleCache\\CacheInterface;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\Response;\n+use Symfony\\Contracts\\Cache\\CacheInterface;\nuse Tightenco\\Collect\\Support\\Collection;\nclass QueueProcessor\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Widgets.php",
"new_path": "src/Widgets.php",
"diff": "@@ -11,11 +11,11 @@ use Bolt\\Widget\\RequestAware;\nuse Bolt\\Widget\\StopwatchAware;\nuse Bolt\\Widget\\TwigAware;\nuse Bolt\\Widget\\WidgetInterface;\n-use Psr\\SimpleCache\\CacheInterface;\nuse Symfony\\Component\\HttpFoundation\\RequestStack;\nuse Symfony\\Component\\HttpFoundation\\Response;\nuse Symfony\\Component\\HttpFoundation\\StreamedResponse;\nuse Symfony\\Component\\Stopwatch\\Stopwatch;\n+use Symfony\\Contracts\\Cache\\CacheInterface;\nuse Tightenco\\Collect\\Support\\Collection;\nuse Twig\\Environment;\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Make widgets use `Symfony\Contracts\Cache\CacheInterface`
|
95,144 |
07.09.2019 14:38:09
| -7,200 |
b45b30227b1cb74be0ada953265d68064c999a4f
|
Make cached menu use `Symfony\Contracts\Cache\CacheInterface`
|
[
{
"change_type": "MODIFY",
"old_path": "src/Menu/CachedBackendMenuBuilder.php",
"new_path": "src/Menu/CachedBackendMenuBuilder.php",
"diff": "@@ -4,7 +4,7 @@ declare(strict_types=1);\nnamespace Bolt\\Menu;\n-use Psr\\SimpleCache\\CacheInterface;\n+use Symfony\\Contracts\\Cache\\CacheInterface;\nfinal class CachedBackendMenuBuilder implements BackendMenuBuilderInterface\n{\n@@ -22,13 +22,8 @@ final class CachedBackendMenuBuilder implements BackendMenuBuilderInterface\npublic function buildAdminMenu(): array\n{\n- if ($this->cache->has('backendmenu')) {\n- $menu = $this->cache->get('backendmenu');\n- } else {\n- $menu = $this->menuBuilder->buildAdminMenu();\n- $this->cache->set('backendmenu', $menu);\n- }\n-\n- return $menu;\n+ return $this->cache->get('backendmenu', function () {\n+ return $this->menuBuilder->buildAdminMenu();\n+ });\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Menu/CachedFrontendMenuBuilder.php",
"new_path": "src/Menu/CachedFrontendMenuBuilder.php",
"diff": "@@ -4,7 +4,7 @@ declare(strict_types=1);\nnamespace Bolt\\Menu;\n-use Psr\\SimpleCache\\CacheInterface;\n+use Symfony\\Contracts\\Cache\\CacheInterface;\nfinal class CachedFrontendMenuBuilder implements FrontendMenuBuilderInterface\n{\n@@ -24,12 +24,9 @@ final class CachedFrontendMenuBuilder implements FrontendMenuBuilderInterface\n{\n$key = 'frontendmenu_' . ($name ?: 'main');\n- if ($this->cache->has($key)) {\n- $menu = $this->cache->get($key);\n- } else {\n- $menu = $this->menuBuilder->buildMenu($name);\n- $this->cache->set($key, $menu);\n- }\n+ return $this->cache->get($key, function () use ($name) {\n+ return $this->menuBuilder->buildMenu($name);\n+ });\nreturn $menu;\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Make cached menu use `Symfony\Contracts\Cache\CacheInterface`
|
95,144 |
07.09.2019 17:22:28
| -7,200 |
8cf073e1719672dea3ffc01b0e2721912325ba76
|
Hide new passwords by default, still keeping suggestions
|
[
{
"change_type": "MODIFY",
"old_path": "src/Command/AddUserCommand.php",
"new_path": "src/Command/AddUserCommand.php",
"diff": "@@ -15,6 +15,7 @@ use Symfony\\Component\\Console\\Input\\InputArgument;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\Console\\Input\\InputOption;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\n+use Symfony\\Component\\Console\\Question\\Question;\nuse Symfony\\Component\\Console\\Style\\SymfonyStyle;\nuse Symfony\\Component\\Security\\Core\\Encoder\\UserPasswordEncoderInterface;\nuse Symfony\\Component\\Stopwatch\\Stopwatch;\n@@ -138,7 +139,11 @@ class AddUserCommand extends Command\nif ($password !== null) {\n$this->io->text(' > <info>Password</info>: ' . str_repeat('*', mb_strlen($password)));\n} else {\n- $password = $this->io->ask('Password', Str::generatePassword(), [$this->validator, 'validatePassword']);\n+ $passwordQuestion = new Question('Password', Str::generatePassword());\n+ $passwordQuestion->setHidden(true);\n+ $passwordQuestion->setValidator([$this->validator, 'validatePassword']);\n+\n+ $password = $this->io->askQuestion($passwordQuestion);\n$input->setArgument('password', $password);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/_partials/fields/password.html.twig",
"new_path": "templates/_partials/fields/password.html.twig",
"diff": ":label='{{ label|json_encode }}'\n:label_class='{{ label_class|default()|json_encode }}'\n:class='{{ class|json_encode }}'\n- :hidden='{{ hidden|default('false') }}'\n+ :hidden='{{ hidden|default('true') }}'\n></editor-password>\n{% endblock %}\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/users/edit.html.twig",
"new_path": "templates/users/edit.html.twig",
"diff": "'label': 'label.password'|trans,\n'name': 'password',\n'value': suggestedPassword,\n- 'hidden': 'false',\n+ 'hidden': 'true',\n+ 'postfix': suggestedPassword ? __('password.suggested', {'%password%': suggestedPassword })\n} %}\n{% include '@bolt/_partials/fields/email.html.twig' with {\n"
},
{
"change_type": "MODIFY",
"old_path": "translations/messages.en.xlf",
"new_path": "translations/messages.en.xlf",
"diff": "<target>Select Language</target>\n</segment>\n</unit>\n+ <unit id=\"hiE9jap\" name=\"password.suggested\">\n+ <segment>\n+ <source>password.suggested</source>\n+ <target><![CDATA[Suggested secure password: <code>%password%</code>]]></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>Kies taal</target>\n</segment>\n</unit>\n+ <unit id=\"7whLbH8\" name=\"user.new_user\">\n+ <segment>\n+ <source>user.new_user</source>\n+ <target>Nieuwe gebruiker</target>\n+ </segment>\n+ </unit>\n+ <unit id=\"hiE9jap\" name=\"password.suggested\">\n+ <segment>\n+ <source>password.suggested</source>\n+ <target><![CDATA[Voorgesteld sterk wachtwoord: <code>%password%</code>]]></target>\n+ </segment>\n+ </unit>\n</file>\n</xliff>\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Hide new passwords by default, still keeping suggestions
|
95,144 |
08.09.2019 16:40:14
| -7,200 |
6f6fd8e6f3502b06480bcc4316dbbc1f06d47c0a
|
Cleanup config for Doctrine
|
[
{
"change_type": "DELETE",
"old_path": "config/packages/dev/doctrine.yaml",
"new_path": null,
"diff": "-doctrine:\n- # for SQLite\n- dbal:\n- driver: 'pdo_sqlite'\n- server_version: '3.15'\n- charset: utf8mb4\n- url: '%env(resolve:DATABASE_URL)%'\n- # for MySQL (with Docker)\n-# dbal:\n-# driver: 'pdo_mysql'\n-# charset: utf8mb4\n-# server_version: 5.6\n-# url: 'mysql://%env(DATABASE_USER)%:%env(DATABASE_PASSWORD)%@%env(DATABASE_HOST)%:3306/%env(DATABASE_NAME)%'\n"
},
{
"change_type": "MODIFY",
"old_path": "config/packages/doctrine.yaml",
"new_path": "config/packages/doctrine.yaml",
"diff": "@@ -6,6 +6,17 @@ parameters:\nenv(DATABASE_URL): ''\ndoctrine:\n+ dbal:\n+ # For SQLite\n+ # driver: 'pdo_sqlite'\n+ # server_version: '3.15'\n+\n+ # For MySQL\n+ # charset: utf8mb4\n+ # server_version: 5.7\n+ charset: utf8mb4\n+ url: '%env(resolve:DATABASE_URL)%'\n+\norm:\nauto_generate_proxy_classes: '%kernel.debug%'\nnaming_strategy: doctrine.orm.naming_strategy.underscore\n"
},
{
"change_type": "MODIFY",
"old_path": "config/packages/prod/doctrine.yaml",
"new_path": "config/packages/prod/doctrine.yaml",
"diff": "doctrine:\n- dbal:\n- driver: 'pdo_mysql'\n- charset: utf8mb4\n- server_version: 5.6\n- url: '%env(DATABASE_URL)%'\n-\norm:\nmetadata_cache_driver:\ntype: service\n"
},
{
"change_type": "DELETE",
"old_path": "config/packages/test/doctrine.yaml",
"new_path": null,
"diff": "-doctrine:\n- dbal:\n- driver: 'pdo_sqlite'\n- server_version: '3.15'\n- charset: utf8mb4\n- url: '%env(resolve:DATABASE_URL)%'\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Configuration/Config.php",
"new_path": "src/Configuration/Config.php",
"diff": "@@ -137,7 +137,17 @@ class Config\n*/\npublic function get(string $path, $default = null)\n{\n- return Arr::get($this->data, $path, $default);\n+ $value = Arr::get($this->data, $path, $default);\n+\n+ // Basic getenv parser, for values like `%env(FOO_BAR)%`\n+ if (is_string($value) && preg_match('/%env\\(([A-Z0-9_]+)\\)%/', $value, $matches)) {\n+ dump($matches);\n+ if (getenv($matches[1])) {\n+ $value = getenv($matches[1]);\n+ }\n+ }\n+\n+ return $value;\n}\npublic function has(string $path): bool\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Cleanup config for Doctrine
|
95,144 |
09.09.2019 18:03:50
| -7,200 |
6b849cb34fbd541153a0ef05541ae316cad1ac85
|
Update _languageselect.html.twig
|
[
{
"change_type": "MODIFY",
"old_path": "templates/helpers/_languageselect.html.twig",
"new_path": "templates/helpers/_languageselect.html.twig",
"diff": "@@ -13,8 +13,15 @@ The current locale is in the Request object, which is an instance of `Symfony\\Co\n#}\n+{# Make sure type is either 'list' or 'select' #}\n+{% if type|default('list') != 'list' %}{% set type = 'select' %}{% endif %}\n+\n+{# Set `class` and `style` variables #}\n+{% set class = 'class=\"languageselect_' ~ type ~ (class is defined ? ' ' ~ class) ~ '\"' %}\n+{% set style = (style is defined ? ' style=\"' ~ style ~ '\"') %}\n+\n{% if type == 'list' %}\n- <ul class=\"languageselect_list\">\n+ <ul {{ class|raw }} {{ style|raw }}>\n{% for locale in locales() %}\n<li class=\"{{ locale.current ? 'current': '' }}\">\n<a href=\"{{ locale.link }}\">{{ locale.emoji }} {{ locale.localizedname }} </a>\n@@ -24,7 +31,7 @@ The current locale is in the Request object, which is an instance of `Symfony\\Co\n{% endif %}\n{% if type == 'select' %}\n- <select name=\"languageselect_list\" type=\"select\" class=\"languageselect_select\"\n+ <select name=\"languageselect_list\" type=\"select\" {{ class|raw }} {{ style|raw }}\nonchange=\"if( this.options[this.selectedIndex].value != '' ) location.href=this.options[this.selectedIndex].value;\">\n{% for locale in locales() %}\n<option value=\"{{ locale.link }}\" {{ locale.current ? 'selected=\"selected\"': '' }}>\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Update _languageselect.html.twig
|
95,144 |
09.09.2019 20:24:25
| -7,200 |
386470c1ff9e96b9518b9dd2876598592a4eb645
|
Minor tweaks to checkbox
|
[
{
"change_type": "MODIFY",
"old_path": "templates/_partials/fields/_base.html.twig",
"new_path": "templates/_partials/fields/_base.html.twig",
"diff": "{% if not label|default %}\n{% set label = field.definition.label|default(field.name|default('unnamed')|ucwords) %}\n{% endif %}\n+{% if type != 'checkbox' %}\n{% set label = label|trim(':') ~ ':' %}\n+{% endif %}\n{# Set the placeholder #}\n{% if not placeholder|default %}\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/_partials/fields/checkbox.html.twig",
"new_path": "templates/_partials/fields/checkbox.html.twig",
"diff": "{% block field %}\n<div class=\"custom-control custom-checkbox\">\n{# What the heck is this hidden field for, you might wonder? Well, it's\n- there to make sure an unchecked checkbox still shows up in the server\n+ here to make sure an unchecked checkbox still shows up in the server\nresponse, so we can handle it there, if present. #}\n<input type=\"hidden\" name=\"{{ name }}\" value=\"0\">\n<input class=\"custom-control-input\" id=\"{{ name }}\" name=\"{{ name }}\" type=\"checkbox\"\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Minor tweaks to checkbox
|
95,144 |
11.09.2019 15:03:04
| -7,200 |
1f6e5fe8e95487d8b50c28461504dbb185644c69
|
Update Kakunin dependencies
|
[
{
"change_type": "MODIFY",
"old_path": "tests/e2e/package-lock.json",
"new_path": "tests/e2e/package-lock.json",
"diff": "}\n},\n\"cross-env\": {\n- \"version\": \"5.2.0\",\n- \"resolved\": \"https://registry.npmjs.org/cross-env/-/cross-env-5.2.0.tgz\",\n- \"integrity\": \"sha512-jtdNFfFW1hB7sMhr/H6rW1Z45LFqyI431m3qU6bFXcQ3Eh7LtBuG3h74o7ohHZ3crrRkkqHlo4jYHFPcjroANg==\",\n+ \"version\": \"5.2.1\",\n+ \"resolved\": \"https://registry.npmjs.org/cross-env/-/cross-env-5.2.1.tgz\",\n+ \"integrity\": \"sha512-1yHhtcfAd1r4nwQgknowuUNfIT9E8dOMMspC36g45dN+iD1blloi7xp8X/xAIDnjHWyt1uQ8PHk2fkNaym7soQ==\",\n\"requires\": {\n- \"cross-spawn\": \"^6.0.5\",\n- \"is-windows\": \"^1.0.0\"\n+ \"cross-spawn\": \"^6.0.5\"\n}\n},\n\"cross-spawn\": {\n\"resolved\": \"https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz\",\n\"integrity\": \"sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=\"\n},\n- \"is-windows\": {\n- \"version\": \"1.0.2\",\n- \"resolved\": \"https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz\",\n- \"integrity\": \"sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==\"\n- },\n\"is-wsl\": {\n\"version\": \"1.1.0\",\n\"resolved\": \"https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz\",\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/e2e/package.json",
"new_path": "tests/e2e/package.json",
"diff": "\"kakunin\": \"cross-env NODE_ENV=prod kakunin\"\n},\n\"dependencies\": {\n- \"cross-env\": \"^5.2.0\",\n+ \"cross-env\": \"^5.2.1\",\n\"kakunin\": \"^2.6\"\n}\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Update Kakunin dependencies
|
95,144 |
11.09.2019 15:47:21
| -7,200 |
13ccf45d7e646d525d9e734f9129181f43f5e428
|
Let's try Xenial, then
|
[
{
"change_type": "MODIFY",
"old_path": ".travis.yml",
"new_path": ".travis.yml",
"diff": "language: php\n-dist: trusty\n+dist: xenial\nsudo: false\naddons:\n@@ -35,7 +35,7 @@ install:\n- COMPOSER_MEMORY_LIMIT=-1 composer update $COMPOSER_FLAGS\n- nvm install 12.5\n- npm ci\n- - cd tests/e2e && npm ci && node ./node_modules/protractor/bin/webdriver-manager update --gecko=false --versions.chrome=74.0.3729.6 && cd ../..\n+ - cd tests/e2e && npm ci && node ./node_modules/protractor/bin/webdriver-manager update --gecko=false && cd ../..\nbefore_script:\n# build assets\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Let's try Xenial, then
|
95,144 |
11.09.2019 16:00:38
| -7,200 |
deb6dc1d44c7967881acbd6b2b638c3c7b13cc9f
|
Let's poke about some more
|
[
{
"change_type": "MODIFY",
"old_path": ".travis.yml",
"new_path": ".travis.yml",
"diff": "@@ -35,6 +35,8 @@ install:\n- COMPOSER_MEMORY_LIMIT=-1 composer update $COMPOSER_FLAGS\n- nvm install 12.5\n- npm ci\n+ - mkdir -p ./var/log/e2e-reports/report/features/\n+ - touch ./var/log/e2e-reports/report/features/.gitkeep\n- cd tests/e2e && npm ci && node ./node_modules/protractor/bin/webdriver-manager update --gecko=false && cd ../..\nbefore_script:\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Let's poke about some more
|
95,144 |
11.09.2019 14:32:49
| -7,200 |
f87c5a3c5018516915ab2759f355acc85568eaba
|
Simplify "fields" a bit.
|
[
{
"change_type": "MODIFY",
"old_path": "public/theme/skeleton/record.twig",
"new_path": "public/theme/skeleton/record.twig",
"diff": "{# Output all fields, in the order as defined in the content type.\nTo change the generated html and configure the options, see:\nhttps://docs.bolt.cm/templating #}\n- {% with { 'record': record, 'common': true, 'extended': true, 'repeaters': true, 'blocks': true, 'exclude': [record|image.fieldname] } %}\n+ {% with { 'record': record, 'exclude': [record|image.fieldname|default()] } %}\n{{ block('sub_fields', 'partials/_sub_fields.twig') }}\n{% endwith %}\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/helpers/_fields.twig",
"new_path": "templates/helpers/_fields.twig",
"diff": "- The first section initializes the variables and settings, both from the\nContentType definitions as well as passed in variables.\n- The last section is where the actual looping is done, and the relevant\n- {{ block() }} function is called, for the 'ContentType fields',\n- 'repeater fields', 'block fields' and 'template fields' in turn.\n+ {{ block() }} function is called, for the 'ContentType fields' in turn.\nRead the relevant section in the documentation on usage of this\nfunctionality: https://docs.bolt.cm/templating\n{% block sub_fields %}\n{# SECTION 1: INITIALIZATION #}\n{%- apply spaceless %}\n+\n{# Set up the array of fieldnames that should be iterated. We do this by looping\nover _all_ the fields, and skipping those in the 'omittedkeys' array. #}\n{% set omittedkeys = [ 'id', 'slug', 'datecreated', 'datechanged', 'datepublish',\n{% endfor %}\n- {# We do the same for the templatefields, if set and not empty. #}\n- {% if record.hasField('templateFields') %}\n- {# Note: This needs to be expanded upon!! For better detection the 'virtual'\n- content type for the templatefields should know about the types of fields. #}\n- {% set templatefields_field_types = attribute(record.contentType.templatefields.first, 'fields') %}\n-\n- {% for key, field in record.templateFields|filter(key => key not in omittedkeys) %}\n-\n- {% set type = attribute(attribute(templatefields_field_types, key), 'type') %}\n- {{ block('common_fields') }}\n- {{ block('extended_fields') }}\n-\n- {% endfor %}\n-\n- {% endif %}\n{% endblock sub_fields %}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Simplify "fields" a bit.
|
95,144 |
11.09.2019 14:51:28
| -7,200 |
4fb2150caeb5557ecaf89c9f127525f834895c41
|
When pressing enter, save the record instead of previewing it
|
[
{
"change_type": "MODIFY",
"old_path": "templates/content/edit.html.twig",
"new_path": "templates/content/edit.html.twig",
"diff": "<input type=\"hidden\" name=\"_csrf_token\" value=\"{{ csrf_token('editrecord') }}\">\n<input type=\"hidden\" name=\"_edit_locale\" value=\"{{ currentlocale }}\">\n+ {# To prevent confusion in browsers about which submit to use when pressing 'enter', we\n+ provide this _input_ here. All browsers will use this as a default. See #454 on Github. #}\n+ <input type=\"submit\" form=\"editcontent\" style=\"display: none;\" value=\"__('action.save')\">\n{% set groups = record.definition.groups %}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
When pressing enter, save the record instead of previewing it
|
95,144 |
11.09.2019 18:15:00
| -7,200 |
27bc2d8df8ed3c52f46879b9551a4bef9c3bde73
|
Allowing focal point settings for thumbnail images
|
[
{
"change_type": "MODIFY",
"old_path": "assets/scss/vendor/bootstrap/bootstrap.scss",
"new_path": "assets/scss/vendor/bootstrap/bootstrap.scss",
"diff": "@import \"~bootstrap/scss/custom-forms\";\n@import \"~bootstrap/scss/card\";\n@import \"~bootstrap/scss/alert\";\n+@import \"~bootstrap/scss/media\";\n@import \"~bootstrap/scss/modal\";\n@import \"~bootstrap/scss/close\";\n@import \"~bootstrap/scss/progress\";\n"
},
{
"change_type": "MODIFY",
"old_path": "package-lock.json",
"new_path": "package-lock.json",
"diff": "}\n},\n\"terser\": {\n- \"version\": \"4.3.0\",\n- \"resolved\": \"https://registry.npmjs.org/terser/-/terser-4.3.0.tgz\",\n- \"integrity\": \"sha512-w5CzrvQOwYAH54aG22IrUJI4yX1w62XQmMdEOM6H4w0ii6rc3HJ89fmcOGN5mRwBWfUgaqO7RJTp4aoY/uE+qQ==\",\n+ \"version\": \"4.3.1\",\n+ \"resolved\": \"https://registry.npmjs.org/terser/-/terser-4.3.1.tgz\",\n+ \"integrity\": \"sha512-pnzH6dnFEsR2aa2SJaKb1uSCl3QmIsJ8dEkj0Fky+2AwMMcC9doMqLOQIH6wVTEKaVfKVvLSk5qxPBEZT9mywg==\",\n\"requires\": {\n\"commander\": \"^2.20.0\",\n\"source-map\": \"~0.6.1\",\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/MediaEditController.php",
"new_path": "src/Controller/Backend/MediaEditController.php",
"diff": "@@ -78,7 +78,10 @@ class MediaEditController extends TwigAwareController implements BackendZone\n$media->setTitle($post['title'])\n->setDescription($post['description'])\n->setCopyright($post['copyright'])\n- ->setOriginalFilename($post['originalFilename']);\n+ ->setOriginalFilename($post['originalFilename'])\n+ ->setCropX((int) $post['cropX'])\n+ ->setCropY((int) $post['cropY'])\n+ ->setCropZoom((float) $post['cropZoom']);\n$this->em->persist($media);\n$this->em->flush();\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Entity/Media.php",
"new_path": "src/Entity/Media.php",
"diff": "@@ -50,10 +50,25 @@ class Media\nprivate $height;\n/**\n- * @ORM\\Column(type=\"integer\")\n+ * @ORM\\Column(type=\"integer\", nullable=true)\n*/\nprivate $filesize;\n+ /**\n+ * @ORM\\Column(type=\"integer\", nullable=true)\n+ */\n+ private $cropX;\n+\n+ /**\n+ * @ORM\\Column(type=\"integer\", nullable=true)\n+ */\n+ private $cropY;\n+\n+ /**\n+ * @ORM\\Column(type=\"float\", nullable=true)\n+ */\n+ private $cropZoom;\n+\n/**\n* @var User\n*\n@@ -287,4 +302,40 @@ class Media\nreturn $this;\n}\n+\n+ public function getCropX()\n+ {\n+ return $this->cropX;\n+ }\n+\n+ public function setCropX(int $cropX): self\n+ {\n+ $this->cropX = $cropX;\n+\n+ return $this;\n+ }\n+\n+ public function getCropY()\n+ {\n+ return $this->cropY;\n+ }\n+\n+ public function setCropY(int $cropY): self\n+ {\n+ $this->cropY = $cropY;\n+\n+ return $this;\n+ }\n+\n+ public function getCropZoom()\n+ {\n+ return $this->cropZoom;\n+ }\n+\n+ public function setCropZoom(float $cropZoom): self\n+ {\n+ $this->cropZoom = $cropZoom;\n+\n+ return $this;\n+ }\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "translations/messages.en.xlf",
"new_path": "translations/messages.en.xlf",
"diff": "<target><![CDATA[Suggested secure password: <code>%password%</code>]]></target>\n</segment>\n</unit>\n+ <unit id=\"fLOd6Zd\" name=\"field.cropX\">\n+ <segment>\n+ <source>field.cropX</source>\n+ <target>Crop X</target>\n+ </segment>\n+ </unit>\n+ <unit id=\"Sd_AbmV\" name=\"field.cropXPostfix\">\n+ <segment>\n+ <source>field.cropXPostfix</source>\n+ <target>Position of crop on X-axis, range 0-100. </target>\n+ </segment>\n+ </unit>\n+ <unit id=\"BQBmQHT\" name=\"field.cropYPostfix\">\n+ <segment>\n+ <source>field.cropYPostfix</source>\n+ <target>Position of crop on X-axis, range 0-100. </target>\n+ </segment>\n+ </unit>\n+ <unit id=\"hi98HIj\" name=\"field.cropY\">\n+ <segment>\n+ <source>field.cropY</source>\n+ <target>Crop Y</target>\n+ </segment>\n+ </unit>\n+ <unit id=\"PHOpD5y\" name=\"field.cropZoom\">\n+ <segment>\n+ <source>field.cropZoom</source>\n+ <target>Crop zoomfactor</target>\n+ </segment>\n+ </unit>\n+ <unit id=\"tn6Z8wY\" name=\"field.cropZoomPostfix\">\n+ <segment>\n+ <source>field.cropZoomPostfix</source>\n+ <target>Zoom-level of crop, range 1-10. </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><![CDATA[Voorgesteld sterk wachtwoord: <code>%password%</code>]]></target>\n</segment>\n</unit>\n+ <unit id=\"TtIlBDd\" name=\"caption.edit_image\">\n+ <segment>\n+ <source>caption.edit_image</source>\n+ <target>Bewerk afbeelding</target>\n+ </segment>\n+ </unit>\n+ <unit id=\"fLOd6Zd\" name=\"field.cropX\">\n+ <segment>\n+ <source>field.cropX</source>\n+ <target>Uitsnede X</target>\n+ </segment>\n+ </unit>\n+ <unit id=\"hi98HIj\" name=\"field.cropY\">\n+ <segment>\n+ <source>field.cropY</source>\n+ <target>Uitsnede Y</target>\n+ </segment>\n+ </unit>\n+ <unit id=\"PHOpD5y\" name=\"field.cropZoom\">\n+ <segment>\n+ <source>field.cropZoom</source>\n+ <target>Zoomfactor uitsnede</target>\n+ </segment>\n+ </unit>\n+ <unit id=\"BQBmQHT\" name=\"field.cropYPostfix\">\n+ <segment>\n+ <source>field.cropYPostfix</source>\n+ <target>Positie van uitsnede op de Y-as, van 0-100. </target>\n+ </segment>\n+ </unit>\n+ <unit id=\"Sd_AbmV\" name=\"field.cropXPostfix\">\n+ <segment>\n+ <source>field.cropXPostfix</source>\n+ <target>Positie van uitsnede op de X-as, van 0-100. </target>\n+ </segment>\n+ </unit>\n+ <unit id=\"tn6Z8wY\" name=\"field.cropZoomPostfix\">\n+ <segment>\n+ <source>field.cropZoomPostfix</source>\n+ <target>Zoom-niveau van uitsnede, van 1-10.</target>\n+ </segment>\n+ </unit>\n</file>\n</xliff>\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Allowing focal point settings for thumbnail images
|
95,144 |
12.09.2019 16:08:07
| -7,200 |
819c99526a8a0948483c10c82c0d870ff9049134
|
Allow for eventlisteners in extensions
|
[
{
"change_type": "MODIFY",
"old_path": "src/Event/Subscriber/ExtensionSubscriber.php",
"new_path": "src/Event/Subscriber/ExtensionSubscriber.php",
"diff": "@@ -9,9 +9,11 @@ use Bolt\\Extension\\ExtensionRegistry;\nuse Bolt\\Widgets;\nuse Symfony\\Component\\Console\\ConsoleEvents;\nuse Symfony\\Component\\Console\\Event\\ConsoleCommandEvent;\n+use Symfony\\Component\\EventDispatcher\\EventDispatcher;\nuse Symfony\\Component\\EventDispatcher\\EventSubscriberInterface;\nuse Symfony\\Component\\HttpKernel\\Event\\ControllerEvent;\nuse Symfony\\Component\\HttpKernel\\KernelEvents;\n+use Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface;\nuse Twig\\Environment;\nclass ExtensionSubscriber implements EventSubscriberInterface\n@@ -30,12 +32,16 @@ class ExtensionSubscriber implements EventSubscriberInterface\n/** @var Environment */\nprivate $twig;\n- public function __construct(ExtensionRegistry $extensionRegistry, Widgets $widgets, Config $config, Environment $twig)\n+ /** @var EventDispatcher */\n+ private $dispatcher;\n+\n+ public function __construct(ExtensionRegistry $extensionRegistry, Widgets $widgets, Config $config, Environment $twig, EventDispatcherInterface $dispatcher)\n{\n$this->extensionRegistry = $extensionRegistry;\n$this->widgets = $widgets;\n$this->config = $config;\n$this->twig = $twig;\n+ $this->dispatcher = $dispatcher;\n}\n/**\n@@ -43,7 +49,7 @@ class ExtensionSubscriber implements EventSubscriberInterface\n*/\npublic function onKernelResponse(ControllerEvent $event): void\n{\n- $this->extensionRegistry->initializeAll($this->widgets, $this->config, $this->twig);\n+ $this->extensionRegistry->initializeAll($this->widgets, $this->config, $this->twig, $this->dispatcher);\n}\n/**\n@@ -51,7 +57,7 @@ class ExtensionSubscriber implements EventSubscriberInterface\n*/\npublic function onConsoleResponse(ConsoleCommandEvent $event): void\n{\n- $this->extensionRegistry->initializeAll($this->widgets, $this->config, $this->twig);\n+ $this->extensionRegistry->initializeAll($this->widgets, $this->config, $this->twig, $this->dispatcher);\n}\n/**\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Extension/BaseExtension.php",
"new_path": "src/Extension/BaseExtension.php",
"diff": "@@ -13,7 +13,9 @@ use Composer\\Package\\CompletePackage;\nuse Composer\\Package\\PackageInterface;\nuse ComposerPackages\\Packages;\nuse Symfony\\Component\\Filesystem\\Filesystem;\n+use Symfony\\Component\\HttpKernel\\HttpKernel;\nuse Symfony\\Component\\Yaml\\Parser;\n+use Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface;\nuse Tightenco\\Collect\\Support\\Collection;\nuse Twig\\Environment;\nuse Twig\\Extension\\ExtensionInterface as TwigExtensionInterface;\n@@ -35,6 +37,12 @@ abstract class BaseExtension implements ExtensionInterface\n/** @var Environment */\nprotected $twig;\n+ /** @var HttpKernel */\n+ protected $kernel;\n+\n+ /** @var EventDispatcherInterface */\n+ private $dispatcher;\n+\n/**\n* Returns the descriptive name of the Extension\n*/\n@@ -132,15 +140,16 @@ abstract class BaseExtension implements ExtensionInterface\n/**\n* Injects commonly used objects into the extension, for use by the\n- * extension. Called from the listener\n+ * extension. Called from the listener.\n*\n* @see ExtensionSubscriber\n*/\n- public function injectObjects(Widgets $widgets, Config $boltConfig, Environment $twig): void\n+ public function injectObjects(Widgets $widgets, Config $boltConfig, Environment $twig, EventDispatcherInterface $dispatcher): void\n{\n$this->widgets = $widgets;\n$this->boltConfig = $boltConfig;\n$this->twig = $twig;\n+ $this->dispatcher = $dispatcher;\n}\n/**\n@@ -165,6 +174,11 @@ abstract class BaseExtension implements ExtensionInterface\n$this->twig->addExtension($extension);\n}\n+ public function registerListener($event, $callback): void\n+ {\n+ $this->dispatcher->addListener($event, $callback);\n+ }\n+\n/**\n* Get the ComposerPackage, that contains information about the package,\n* version, etc.\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Extension/ExtensionInterface.php",
"new_path": "src/Extension/ExtensionInterface.php",
"diff": "@@ -6,6 +6,7 @@ namespace Bolt\\Extension;\nuse Bolt\\Configuration\\Config;\nuse Bolt\\Widgets;\n+use Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface;\nuse Twig\\Environment;\ninterface ExtensionInterface\n@@ -16,7 +17,7 @@ interface ExtensionInterface\npublic function getClass(): string;\n- public function injectObjects(Widgets $widgets, Config $config, Environment $twig): void;\n+ public function injectObjects(Widgets $widgets, Config $config, Environment $twig, EventDispatcherInterface $dispatcher): void;\npublic function initialize(): void;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Extension/ExtensionRegistry.php",
"new_path": "src/Extension/ExtensionRegistry.php",
"diff": "@@ -8,6 +8,7 @@ use Bolt\\Configuration\\Config;\nuse Bolt\\Widgets;\nuse Composer\\Package\\PackageInterface;\nuse ComposerPackages\\Types;\n+use Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface;\nuse Twig\\Environment;\nclass ExtensionRegistry\n@@ -18,6 +19,9 @@ class ExtensionRegistry\n/** @var array */\nprotected $extensionClasses = [];\n+ /**\n+ * @see ExtensionCompilerPass::process()\n+ */\npublic function addCompilerPass(string $extensionClass): void\n{\n$this->extensionClasses[] = $extensionClass;\n@@ -56,13 +60,13 @@ class ExtensionRegistry\nreturn $this->extensions;\n}\n- public function initializeAll(Widgets $widgets, Config $config, Environment $twig): void\n+ public function initializeAll(Widgets $widgets, Config $config, Environment $twig, EventDispatcherInterface $dispatcher): void\n{\n$this->addComposerPackages();\nforeach ($this->getExtensionClasses() as $extensionClass) {\n$extension = new $extensionClass();\n- $extension->injectObjects($widgets, $config, $twig);\n+ $extension->injectObjects($widgets, $config, $twig, $dispatcher);\n$extension->initialize();\n$this->extensions[$extensionClass] = $extension;\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Allow for eventlisteners in extensions
|
95,144 |
13.09.2019 15:54:55
| -7,200 |
9b783f85047874b478b863bcc7ad09c248dff111
|
Preparing release 4.0.0-beta3
|
[
{
"change_type": "MODIFY",
"old_path": "composer.json",
"new_path": "composer.json",
"diff": "\"bolt/common\": \"^2.1.0\",\n\"cocur/slugify\": \"^3.2\",\n\"composer/composer\": \"^1.9\",\n- \"doctrine/annotations\": \"^1.6\",\n+ \"doctrine/annotations\": \"^1.7\",\n\"doctrine/doctrine-bundle\": \"^1.11\",\n\"doctrine/doctrine-cache-bundle\": \"^1.3.1\",\n\"doctrine/orm\": \"^2.6\",\n\"drupol/composer-packages\": \"^1.0\",\n- \"embed/embed\": \"^3.3\",\n+ \"embed/embed\": \"^3.4\",\n\"erusev/parsedown\": \"^1.7\",\n- \"ezyang/htmlpurifier\": \"^4.10\",\n+ \"ezyang/htmlpurifier\": \"^4.11\",\n\"fzaninotto/faker\": \"^1.8\",\n\"gedmo/doctrine-extensions\": \"v2.4.x-dev\",\n\"knplabs/knp-menu-bundle\": \"^2.2\",\n\"league/glide-symfony\": \"^1.0\",\n\"miljar/php-exif\": \"^0.6.4\",\n\"nelmio/cors-bundle\": \"^1.5\",\n- \"nesbot/carbon\": \"^1.38 || ^2.19\",\n+ \"nesbot/carbon\": \"^1.38 || ^2.24\",\n\"peterkahl/country-code-to-emoji-flag\": \"^0.9.1\",\n\"php-translation/symfony-bundle\": \"^0.9\",\n\"phpdocumentor/reflection-docblock\": \"^4.3\",\n\"psr/simple-cache\": \"^1.0\",\n- \"sensio/framework-extra-bundle\": \"^5.3\",\n+ \"sensio/framework-extra-bundle\": \"^5.4\",\n\"sensiolabs/security-checker\": \"^5.0\",\n\"siriusphp/upload\": \"^2.1\",\n\"symfony/asset\": \"^4.3\",\n\"symfony/console\": \"^4.3\",\n\"symfony/dependency-injection\": \"^4.3\",\n\"symfony/expression-language\": \"^4.3\",\n- \"symfony/flex\": \"^1.2\",\n+ \"symfony/flex\": \"^1.4\",\n\"symfony/form\": \"^4.3\",\n\"symfony/framework-bundle\": \"^4.3\",\n\"symfony/http-client\": \"^4.3\",\n\"symfony/monolog-bridge\": \"^4.3\",\n- \"symfony/monolog-bundle\": \"^3.3\",\n- \"symfony/polyfill-php72\": \"^1.11\",\n+ \"symfony/monolog-bundle\": \"^3.4\",\n+ \"symfony/polyfill-php72\": \"^1.12\",\n\"symfony/security-bundle\": \"^4.3\",\n\"symfony/serializer\": \"^4.3\",\n\"symfony/swiftmailer-bundle\": \"^3.2\",\n\"bolt/newswidget\": \"^1.0\",\n\"coduo/php-matcher\": \"^3.2\",\n\"dama/doctrine-test-bundle\": \"^5.0\",\n- \"doctrine/doctrine-fixtures-bundle\": \"^3.1\",\n+ \"doctrine/doctrine-fixtures-bundle\": \"^3.2\",\n\"lakion/mink-debug-extension\": \"^1.2\",\n- \"php-http/httplug-pack\": \"^1.1\",\n+ \"php-http/httplug-pack\": \"^1.2\",\n\"php-translation/loco-adapter\": \"^0.8\",\n\"phpspec/phpspec\": \"^5.1\",\n\"phpspec/prophecy\": \"^1.8\",\n\"phpstan/phpstan\": \"^0.11\",\n\"phpstan/phpstan-doctrine\": \"^0.11\",\n\"phpstan/phpstan-symfony\": \"^0.11\",\n- \"phpunit/phpunit\": \"^7.0\",\n+ \"phpunit/phpunit\": \"^7.5\",\n\"roave/security-advisories\": \"dev-master@dev\",\n\"symfony/browser-kit\": \"^4.3\",\n\"symfony/css-selector\": \"^4.3\",\n\"symfony/debug-bundle\": \"^4.3\",\n\"symfony/dotenv\": \"^4.3\",\n- \"symfony/maker-bundle\": \"^1.11\",\n+ \"symfony/maker-bundle\": \"^1.13\",\n\"symfony/stopwatch\": \"^4.3\",\n\"symfony/web-profiler-bundle\": \"^4.3\",\n\"symfony/web-server-bundle\": \"^4.3\",\n"
},
{
"change_type": "MODIFY",
"old_path": "package-lock.json",
"new_path": "package-lock.json",
"diff": "}\n},\n\"eslint-config-prettier\": {\n- \"version\": \"6.2.0\",\n- \"resolved\": \"https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.2.0.tgz\",\n- \"integrity\": \"sha512-VLsgK/D+S/FEsda7Um1+N8FThec6LqE3vhcMyp8mlmto97y3fGf3DX7byJexGuOb1QY0Z/zz222U5t+xSfcZDQ==\",\n+ \"version\": \"6.3.0\",\n+ \"resolved\": \"https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.3.0.tgz\",\n+ \"integrity\": \"sha512-EWaGjlDAZRzVFveh2Jsglcere2KK5CJBhkNSa1xs3KfMUGdRiT7lG089eqPdvlzWHpAqaekubOsOMu8W8Yk71A==\",\n\"dev\": true,\n\"requires\": {\n\"get-stdin\": \"^6.0.0\"\n"
},
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "\"babel-eslint\": \"^10.0.3\",\n\"babel-jest\": \"^24.9.0\",\n\"eslint\": \"^6.3.0\",\n- \"eslint-config-prettier\": \"^6.2.0\",\n+ \"eslint-config-prettier\": \"^6.3.0\",\n\"eslint-plugin-prettier\": \"^3.1.0\",\n\"eslint-plugin-standard\": \"^4.0.1\",\n\"eslint-plugin-vue\": \"^5.2.3\",\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Preparing release 4.0.0-beta3
|
95,144 |
15.09.2019 15:44:37
| -7,200 |
89d36dd3d7c3e017bdd44def3245257240cbd4e3
|
Make sidebar menu show `(Untitled)` instead of "blank" for records without title.
|
[
{
"change_type": "MODIFY",
"old_path": "assets/js/app/sidebar/Components/Menu/_SubMenu.vue",
"new_path": "assets/js/app/sidebar/Components/Menu/_SubMenu.vue",
"diff": "<a :href=\"subitem.editLink\">\n<i class=\"fas fa-fw mr-2\" :class=\"subitem.icon\"></i>\n<!-- eslint-disable-next-line vue/no-v-html -->\n- <span v-html=\"subitem.name\"></span>\n+ <span v-if=\"subitem.name\" v-html=\"subitem.name\"></span>\n+ <span v-else><em>(Untitled)</em></span>\n</a>\n</li>\n</ul>\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Make sidebar menu show `(Untitled)` instead of "blank" for records without title.
|
95,144 |
17.09.2019 21:54:45
| -7,200 |
da4a5cc3151c1b97d75a44b6aa3f071ea8491eff
|
Fix upload fields, token was broken
|
[
{
"change_type": "MODIFY",
"old_path": "assets/js/app/editor/Components/Image.vue",
"new_path": "assets/js/app/editor/Components/Image.vue",
"diff": "@@ -129,7 +129,7 @@ export default {\nreturn this.name + '[]';\n},\ntoken() {\n- return this.csrf_token;\n+ return this.csrfToken;\n},\n},\nmounted() {\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/_partials/fields/image.html.twig",
"new_path": "templates/_partials/fields/image.html.twig",
"diff": ":media='{{ field.get('media')|json_encode }}'\n:directory='{{ directory|json_encode }}'\n:filelist='{{ filelist|json_encode }}'\n- :csrf_token='{{ csrf_token('upload')|json_encode }}'\n+ :csrf-token='{{ csrf_token('upload')|json_encode }}'\n:labels='{{ labels }}'\n></editor-image>\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/finder/_uploader.html.twig",
"new_path": "templates/finder/_uploader.html.twig",
"diff": "<div class=\"card-header\">{{ 'caption.file_uploader'|trans }}</div>\n<form class=\"dropzone editor__image--dropzone\"\n- action=\"{{ path('bolt_async_upload', {'location': location, 'path': path}) }}\"\n+ action=\"{{ path('bolt_async_upload', {'location': location.key, 'path': path}) }}\"\nmethod=\"POST\">\n{{ macro.icon('upload') }}\n<input type=\"hidden\" name=\"_csrf_token\" value=\"{{ csrf_token('upload') }}\">\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Fix upload fields, token was broken
|
95,169 |
17.09.2019 13:40:51
| 25,200 |
955eef4824ffb4a0e18347d8f909890306cf0f9f
|
Issue [#514](https://github.com/bolt/core/issues/514)
Changed the repository method to accept the credential(string) and has
the storage engine compare the lowercase values. At least this is
consistent to the strings compared so it should be a consistent
experience
|
[
{
"change_type": "MODIFY",
"old_path": "src/Repository/UserRepository.php",
"new_path": "src/Repository/UserRepository.php",
"diff": "@@ -20,4 +20,27 @@ class UserRepository extends ServiceEntityRepository\n$user = $this->findOneBy(['username' => $username]);\nreturn $user instanceof User ? $user : null;\n}\n+\n+ public function findOneByCredentials(string $username): ?User\n+ {\n+ $qb = $this->createQueryBuilder('user');\n+ if (filter_var($username, FILTER_VALIDATE_EMAIL)) {\n+ $qb->andWhere(\n+ $qb->expr()->eq(\n+ $qb->expr()->lower('user.email'),\n+ $qb->expr()->lower(':username')\n+ )\n+ );\n+ } else {\n+ $qb->andWhere(\n+ $qb->expr()->eq(\n+ $qb->expr()->lower('user.username'),\n+ $qb->expr()->lower(':username')\n+ )\n+ );\n+ }\n+ $qb->setParameter('username', $username);\n+ $user = $qb->getQuery()->getOneOrNullResult();\n+ return $user instanceof User ? $user : null;\n+ }\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Security/LoginFormAuthenticator.php",
"new_path": "src/Security/LoginFormAuthenticator.php",
"diff": "@@ -74,7 +74,7 @@ class LoginFormAuthenticator extends AbstractFormLoginAuthenticator\nthrow new InvalidCsrfTokenException();\n}\n- return $this->userRepository->findOneByUsername($credentials['username']);\n+ return $this->userRepository->findOneByCredentials($credentials['username']);\n}\npublic function checkCredentials($credentials, UserInterface $user)\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "tests/php/Repository/UserRepositoryTest.php",
"diff": "+<?php\n+\n+declare(strict_types=1);\n+\n+namespace Bolt\\Tests\\Repository;\n+\n+use Bolt\\Entity\\User;\n+use Bolt\\Tests\\DbAwareTestCase;\n+\n+class UserRepositoryTest extends DbAwareTestCase\n+{\n+ protected function setUp(): void\n+ {\n+ parent::setUp();\n+\n+ // fixtures loading takes a lot of time, it would be better to load database dump for tests\n+ self::runCommand('doctrine:fixtures:load --no-interaction --group=without-images');\n+ }\n+\n+ public function testFindOneByUsername()\n+ {\n+ $admin = $this->getEm()->getRepository(User::class)->findOneByUsername('admin');\n+ $this->assertInstanceOf(User::class, $admin);\n+\n+ $administrator = $this->getEm()->getRepository(User::class)->findOneByUsername('administrator');\n+ $this->assertNull($administrator);\n+ }\n+\n+ public function testFindOneByCredentials()\n+ {\n+ $admin = $this->getEm()->getRepository(User::class)->findOneByCredentials('admin');\n+ $this->assertInstanceOf(User::class, $admin);\n+\n+ $adminEmail = $this->getEm()->getRepository(User::class)->findOneByCredentials('admin@example.org');\n+ $this->assertInstanceOf(User::class, $adminEmail);\n+\n+ $janeAdmin = $this->getEm()->getRepository(User::class)->findOneByCredentials('Jane_Admin');\n+ $this->assertInstanceOf(User::class, $janeAdmin);\n+\n+ $janeAdminEmail = $this->getEm()->getRepository(User::class)->findOneByCredentials('Jane_Admin@Example.Org');\n+ $this->assertInstanceOf(User::class, $janeAdminEmail);\n+\n+ $administrator = $this->getEm()->getRepository(User::class)->findOneByCredentials('administrator');\n+ $this->assertNull($administrator);\n+ }\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/php/Security/LoginFormAuthenticatorTest.php",
"new_path": "tests/php/Security/LoginFormAuthenticatorTest.php",
"diff": "@@ -37,7 +37,7 @@ class LoginFormAuthenticatorTest extends TestCase\npublic function testGetUser(): void\n{\n$userRepository = $this->createConfiguredMock(UserRepository::class, [\n- 'findOneByUsername' => $this->createMock(User::class),\n+ 'findOneByCredentials' => $this->createMock(User::class),\n]);\n$csrfTokenManager = $this->createConfiguredMock(CsrfTokenManagerInterface::class, [\n'isTokenValid' => true,\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/spec/Bolt/Security/LoginFormAuthenticatorSpec.php",
"new_path": "tests/spec/Bolt/Security/LoginFormAuthenticatorSpec.php",
"diff": "@@ -41,7 +41,7 @@ class LoginFormAuthenticatorSpec extends ObjectBehavior\npublic function it_gets_user(CsrfTokenManagerInterface $csrfTokenManager, UserProviderInterface $userProvider, UserRepository $userRepository, User $user): void\n{\n- $userRepository->findOneByUsername(self::TEST_TOKEN['username'])->shouldBeCalledOnce()->wilLReturn($user);\n+ $userRepository->findOneByCredentials(self::TEST_TOKEN['username'])->shouldBeCalledOnce()->wilLReturn($user);\n$csrfTokenManager->isTokenValid(Argument::type(CsrfToken::class))->willReturn(true);\n$this->getUser(self::TEST_TOKEN, $userProvider)->shouldBeAnInstanceOf(User::class);\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Issue [#514](https://github.com/bolt/core/issues/514)
Changed the repository method to accept the credential(string) and has
the storage engine compare the lowercase values. At least this is
consistent to the strings compared so it should be a consistent
experience
|
95,169 |
18.09.2019 15:32:18
| 25,200 |
e4febd2a5dbdfb7541eef965fcc246013e2ee216
|
empty password throws 500
'', null, and [] all empty. If attempting validation, fail. If admin
trying to edit user, don't update password
|
[
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/UserEditController.php",
"new_path": "src/Controller/Backend/UserEditController.php",
"diff": "@@ -103,7 +103,7 @@ class UserEditController extends TwigAwareController implements BackendZone\n]);\n}\n- if ($request->get('password') !== null) {\n+ if (! empty($newPassword)) {\n$user->setPassword($this->passwordEncoder->encodePassword($user, $newPassword));\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Security/LoginFormAuthenticator.php",
"new_path": "src/Security/LoginFormAuthenticator.php",
"diff": "@@ -79,7 +79,7 @@ class LoginFormAuthenticator extends AbstractFormLoginAuthenticator\npublic function checkCredentials($credentials, UserInterface $user)\n{\n- return $this->passwordEncoder->isPasswordValid($user, $credentials['password']);\n+ return empty($credentials['password']) ? false : $this->passwordEncoder->isPasswordValid($user, $credentials['password']);\n}\npublic function onAuthenticationSuccess(Request $request, TokenInterface $token, $providerKey)\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
#625 empty password throws 500
'', null, and [] all empty. If attempting validation, fail. If admin
trying to edit user, don't update password
|
95,169 |
19.09.2019 11:25:40
| 25,200 |
1ea73bfc9d13622772c72f61390748f24f638c4f
|
Add Password Strength Bar
Modified Password.vue to add optional ProgressBar
Added zxcvbn library to test password strength
Added library to templates that use it
Changed Twig variable away from 'user' (overwrites logged in 'user')
|
[
{
"change_type": "MODIFY",
"old_path": "assets/js/app/editor/Components/Password.vue",
"new_path": "assets/js/app/editor/Components/Password.vue",
"diff": "<div class=\"input-group-prepend\">\n<input\n:id=\"id\"\n+ ref=\"inputField\"\nclass=\"form-control\"\ntype=\"password\"\n:name=\"name\"\n:value=\"value\"\nautocomplete=\"new-password\"\n+ @input=\"measureStrength\"\n/>\n<i\n@click=\"togglePassword\"\n></i>\n</div>\n+ <progress-bar\n+ v-if=\"strength\"\n+ ref=\"progressBar\"\n+ max=\"4\"\n+ height=\"2px\"\n+ ></progress-bar>\n</div>\n</template>\n<script>\n+ import ProgressBar from './ProgressBar';\n+\nexport default {\nname: 'EditorPassword',\n- props: ['value', 'name', 'id', 'hidden'],\n+\n+ components: {\n+ ProgressBar,\n+ },\n+\n+ props: ['value', 'name', 'id', 'hidden', 'strength'],\nmounted: function() {\n// this.val = this.$options.filters.strip(this.value);\nif (!this.hidden) {\nthis.$refs.visibilityToggle.click();\n}\n+ if (this.value && this.strength) {\n+ this.$refs.inputField.dispatchEvent(new Event('input'));\n+ }\n},\nmethods: {\n@@ -45,6 +63,13 @@ export default {\niconElement.classList.replace('fa-eye-slash', 'fa-eye');\n}\n},\n+ measureStrength(event) {\n+ const inputElement = event.target;\n+ if (this.strength) {\n+ let result = window.zxcvbn(inputElement.value);\n+ this.$refs.progressBar.value = result.score;\n+ }\n+ },\n},\n};\n</script>\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "assets/js/app/editor/Components/ProgressBar.vue",
"diff": "+<template>\n+ <div class=\"progress\" :style=\"styleHeight\">\n+ <div\n+ class=\"progress-bar\"\n+ role=\"progressbar\"\n+ aria-valuemin=\"0\"\n+ :aria-valuenow=\"value\"\n+ :aria-valuemax=\"max\"\n+ :style=\"styleWidth\"\n+ ></div>\n+ </div>\n+</template>\n+\n+<script>\n+export default {\n+ name: 'ProgressBar',\n+ props: {\n+ max: {\n+ type: Number,\n+ default: 100,\n+ },\n+ value: {\n+ type: Number,\n+ default: 0,\n+ },\n+ height: {\n+ type: String,\n+ default: null,\n+ },\n+ },\n+ computed: {\n+ styleWidth() {\n+ return { width: 100 * (this.value / this.max) + '%' };\n+ },\n+ styleHeight() {\n+ return { height: this.height || null };\n+ },\n+ },\n+};\n+</script>\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "assets/js/zxcvbn.js",
"diff": "+import zxcvbn from 'zxcvbn';\n+\n+window.zxcvbn = zxcvbn;\n"
},
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "\"vue-simplemde\": \"^1.0.0\",\n\"vue-trumbowyg\": \"^3.4.2\",\n\"vuedraggable\": \"^2.23.0\",\n- \"vuex\": \"^3.1.1\"\n+ \"vuex\": \"^3.1.1\",\n+ \"zxcvbn\": \"^4.4.2\"\n},\n\"devDependencies\": {\n\"@babel/core\": \"^7.6.0\",\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/UserEditController.php",
"new_path": "src/Controller/Backend/UserEditController.php",
"diff": "@@ -63,7 +63,7 @@ class UserEditController extends TwigAwareController implements BackendZone\nreturn $this->renderTemplate('@bolt/users/edit.html.twig', [\n'display_name' => $user->getDisplayName(),\n- 'user' => $user,\n+ 'userEdit' => $user,\n'roles' => $roles,\n'suggestedPassword' => $suggestedPassword,\n]);\n@@ -99,7 +99,7 @@ class UserEditController extends TwigAwareController implements BackendZone\nif ($this->validateUser($user, $newPassword) === false) {\nreturn $this->renderTemplate('@bolt/users/edit.html.twig', [\n'display_name' => $displayName,\n- 'user' => $user,\n+ 'userEdit' => $user,\n]);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/_partials/fields/password.html.twig",
"new_path": "templates/_partials/fields/password.html.twig",
"diff": ":value='{{ value|json_encode }}'\n:label='{{ label|json_encode }}'\n:label_class='{{ label_class|default()|json_encode }}'\n+ :strength='{{ strength|default()|json_encode }}'\n:class='{{ class|json_encode }}'\n:hidden='{{ hidden|default('true') }}'\n></editor-password>\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/users/edit.html.twig",
"new_path": "templates/users/edit.html.twig",
"diff": "<input type=\"hidden\" name=\"_csrf_token\" value=\"{{ csrf_token('useredit') }}\">\n{% include '@bolt/_partials/fields/text.html.twig' with {\n+ 'id' : 'username',\n'label' : 'label.username'|trans,\n'name' : 'username',\n- 'value' : user.username,\n- 'disabled' : user.username is empty ? 'false' : 'true',\n+ 'value' : userEdit.username,\n+ 'disabled' : userEdit.username is empty ? 'false' : 'true',\n} %}\n{% include '@bolt/_partials/fields/text.html.twig' with {\n+ 'id' : 'display_name',\n'label' : 'label.display_name'|trans,\n'name' : 'displayName',\n- 'value' : user.displayName,\n+ 'value' : userEdit.displayName,\n'disabled' : false,\n} %}\n{% include '@bolt/_partials/fields/password.html.twig' with {\n+ 'id' : 'password',\n'label': 'label.password'|trans,\n'name': 'password',\n'value': suggestedPassword,\n'hidden': 'true',\n+ 'strength': 'true',\n'postfix': suggestedPassword ? __('password.suggested', {'%password%': suggestedPassword })\n} %}\n{% include '@bolt/_partials/fields/email.html.twig' with {\n+ 'id' : 'email',\n'label': 'label.email'|trans,\n'label_class': 'required',\n- 'value': user.email,\n+ 'value': userEdit.email,\n'name': 'email',\n'class': 'form-control',\n} %}\n{% endfor %}\n{% include '@bolt/_partials/fields/select.html.twig' with {\n+ 'id' : 'locale',\n'label' : 'label.locale'|trans,\n'name' : 'locale',\n- 'value' : user.locale,\n+ 'value' : userEdit.locale,\n'options' : localeOptions,\n} %}\n{% endfor %}\n{% include '@bolt/_partials/fields/select.html.twig' with {\n+ 'id' : 'roles',\n'label' : 'label.roles'|trans,\n'name' : 'roles',\n- 'value' : user.roles,\n+ 'value' : userEdit.roles,\n'options' : roleOptions,\n} %}\n</form>\n</div>\n{% endblock %}\n+\n+{% block javascripts %}\n+ {{ encore_entry_script_tags('zxcvbn') }}\n+ {{ parent() }}\n+{% endblock %}\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/users/profile.html.twig",
"new_path": "templates/users/profile.html.twig",
"diff": "<input type=\"hidden\" name=\"_csrf_token\" value=\"{{ csrf_token('profileedit') }}\">\n{% include '@bolt/_partials/fields/text.html.twig' with {\n+ 'id' : 'username',\n'label' : 'label.username'|trans,\n'name' : 'username',\n'value' : user.username,\n} %}\n{% include '@bolt/_partials/fields/text.html.twig' with {\n+ 'id' : 'display_name',\n'label' : 'label.display_name'|trans,\n'name' : 'displayName',\n'value' : user.displayName,\n} %}\n{% include '@bolt/_partials/fields/password.html.twig' with {\n+ 'id' : 'password',\n'label': 'label.password'|trans,\n'label_class': 'required',\n'name': 'password',\n+ 'strength': 'true',\n'value': '',\n} %}\n{% include '@bolt/_partials/fields/email.html.twig' with {\n+ 'id' : 'email',\n'label': 'label.email'|trans,\n'label_class': 'required',\n'value': user.email,\n{% endfor %}\n{% include '@bolt/_partials/fields/select.html.twig' with {\n+ 'id' : 'locale',\n'label' : 'label.locale'|trans,\n'name' : 'locale',\n'value' : user.locale,\n</form>\n</div>\n{% endblock %}\n+\n+{% block javascripts %}\n+ {{ encore_entry_script_tags('zxcvbn') }}\n+ {{ parent() }}\n+{% endblock %}\n"
},
{
"change_type": "MODIFY",
"old_path": "webpack.config.js",
"new_path": "webpack.config.js",
"diff": "@@ -22,6 +22,7 @@ Encore.addPlugin(\n.enableVersioning(false)\n.addEntry('bolt', './assets/js/bolt.js')\n+ .addEntry('zxcvbn', './assets/js/zxcvbn.js')\n.addStyleEntry('theme-default', './assets/scss/themes/default.scss')\n.addStyleEntry('theme-light', './assets/scss/themes/light.scss')\n.addStyleEntry('theme-dark', './assets/scss/themes/dark.scss')\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
#516 Add Password Strength Bar
Modified Password.vue to add optional ProgressBar
Added zxcvbn library to test password strength
Added library to templates that use it
Changed Twig variable away from 'user' (overwrites logged in 'user')
|
95,144 |
20.09.2019 18:36:24
| -7,200 |
e57a23421d7ce7ea1a2e1580ae73d674d841ed84
|
Use `json_extract` to get values from JSON-ified columns.
|
[
{
"change_type": "MODIFY",
"old_path": "composer.json",
"new_path": "composer.json",
"diff": "\"php-translation/symfony-bundle\": \"^0.9\",\n\"phpdocumentor/reflection-docblock\": \"^4.3\",\n\"psr/simple-cache\": \"^1.0\",\n+ \"scienta/doctrine-json-functions\": \"^4.0\",\n\"sensio/framework-extra-bundle\": \"^5.4\",\n\"sensiolabs/security-checker\": \"^5.0\",\n\"siriusphp/upload\": \"^2.1\",\n"
},
{
"change_type": "MODIFY",
"old_path": "config/packages/doctrine.yaml",
"new_path": "config/packages/doctrine.yaml",
"diff": "@@ -39,3 +39,6 @@ doctrine:\nprefix: Gedmo\\Translator\\Entity\ndir: \"%kernel.project_dir%/vendor/gedmo/doctrine-extensions/lib/Gedmo/Translator/Entity\"\nis_bundle: false\n+ dql:\n+ string_functions:\n+ JSON_EXTRACT: Bolt\\Doctrine\\Functions\\JsonExtract\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "src/Doctrine/Functions/JsonExtract.php",
"diff": "+<?php\n+\n+declare(strict_types=1);\n+\n+namespace Bolt\\Doctrine\\Functions;\n+\n+use Doctrine\\ORM\\Query\\SqlWalker;\n+use Scienta\\DoctrineJsonFunctions\\Query\\AST\\Functions\\AbstractJsonFunctionNode;\n+\n+/**\n+ * \"JSON_EXTRACT\" \"(\" StringPrimary \",\" StringPrimary {\",\" StringPrimary }* \")\"\n+ */\n+class JsonExtract extends AbstractJsonFunctionNode\n+{\n+ public const FUNCTION_NAME = 'JSON_EXTRACT';\n+\n+ /** @var string[] */\n+ protected $requiredArgumentTypes = [self::STRING_PRIMARY_ARG, self::STRING_PRIMARY_ARG];\n+\n+ /** @var string[] */\n+ protected $optionalArgumentTypes = [self::STRING_PRIMARY_ARG];\n+\n+ /** @var bool */\n+ protected $allowOptionalArgumentRepeat = true;\n+\n+ protected function validatePlatform(SqlWalker $sqlWalker): void\n+ {\n+ }\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Storage/Query/SelectQuery.php",
"new_path": "src/Storage/Query/SelectQuery.php",
"diff": "@@ -4,7 +4,6 @@ declare(strict_types=1);\nnamespace Bolt\\Storage\\Query;\n-use Bolt\\Common\\Json;\nuse Doctrine\\ORM\\Query\\Expr\\Base;\nuse Doctrine\\ORM\\Query\\ParameterTypeInferer;\nuse Doctrine\\ORM\\QueryBuilder;\n@@ -304,7 +303,7 @@ class SelectQuery implements ContentQueryInterface\n$keyParam = 'field_' . $index;\n$originalLeftExpression = 'content.' . $key;\n- $newLeftExpression = $fieldsAlias . '.value';\n+ $newLeftExpression = sprintf(\"JSON_EXTRACT(%s.value, '$[0]')\", $fieldsAlias);\n$where = $filter->getExpression();\n$where = str_replace($originalLeftExpression, $newLeftExpression, $where);\n@@ -326,7 +325,7 @@ class SelectQuery implements ContentQueryInterface\n)\n->setParameter($keyParam, $key);\nforeach ($filter->getParameters() as $key => $value) {\n- $this->qb->setParameter($key, Json::json_encode([$value]));\n+ $this->qb->setParameter($key, $value);\n}\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "symfony.lock",
"new_path": "symfony.lock",
"diff": "\"roave/security-advisories\": {\n\"version\": \"dev-master\"\n},\n+ \"scienta/doctrine-json-functions\": {\n+ \"version\": \"4.0.2\"\n+ },\n\"sebastian/code-unit-reverse-lookup\": {\n\"version\": \"1.0.1\"\n},\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Use `json_extract` to get values from JSON-ified columns.
|
95,144 |
21.09.2019 14:57:36
| -7,200 |
7919e32bd092b07ce1d48e67b34956c5834093db
|
Refactor objects passed into extensions.
|
[
{
"change_type": "MODIFY",
"old_path": "src/Event/Subscriber/ExtensionSubscriber.php",
"new_path": "src/Event/Subscriber/ExtensionSubscriber.php",
"diff": "@@ -7,6 +7,7 @@ namespace Bolt\\Event\\Subscriber;\nuse Bolt\\Configuration\\Config;\nuse Bolt\\Extension\\ExtensionRegistry;\nuse Bolt\\Widgets;\n+use Doctrine\\Common\\Persistence\\ObjectManager;\nuse Symfony\\Component\\Console\\ConsoleEvents;\nuse Symfony\\Component\\Console\\Event\\ConsoleCommandEvent;\nuse Symfony\\Component\\EventDispatcher\\EventSubscriberInterface;\n@@ -22,25 +23,20 @@ class ExtensionSubscriber implements EventSubscriberInterface\n/** @var ExtensionRegistry */\nprivate $extensionRegistry;\n- /** @var Widgets */\n- private $widgets;\n+ /** @var array */\n+ private $objects = [];\n- /** @var Config */\n- private $config;\n-\n- /** @var Environment */\n- private $twig;\n-\n- /** @var EventDispatcherInterface */\n- private $dispatcher;\n-\n- public function __construct(ExtensionRegistry $extensionRegistry, Widgets $widgets, Config $config, Environment $twig, EventDispatcherInterface $dispatcher)\n+ public function __construct(ExtensionRegistry $extensionRegistry, Widgets $widgets, Config $config, Environment $twig, EventDispatcherInterface $dispatcher, ObjectManager $objectManager)\n{\n$this->extensionRegistry = $extensionRegistry;\n- $this->widgets = $widgets;\n- $this->config = $config;\n- $this->twig = $twig;\n- $this->dispatcher = $dispatcher;\n+\n+ $this->objects = [\n+ 'widgets' => $widgets,\n+ 'config' => $config,\n+ 'twig' => $twig,\n+ 'dispatcher' => $dispatcher,\n+ 'manager' => $objectManager,\n+ ];\n}\n/**\n@@ -48,7 +44,7 @@ class ExtensionSubscriber implements EventSubscriberInterface\n*/\npublic function onKernelResponse(ControllerEvent $event): void\n{\n- $this->extensionRegistry->initializeAll($this->widgets, $this->config, $this->twig, $this->dispatcher);\n+ $this->extensionRegistry->initializeAll($this->objects);\n}\n/**\n@@ -56,7 +52,7 @@ class ExtensionSubscriber implements EventSubscriberInterface\n*/\npublic function onConsoleResponse(ConsoleCommandEvent $event): void\n{\n- $this->extensionRegistry->initializeAll($this->widgets, $this->config, $this->twig, $this->dispatcher);\n+ $this->extensionRegistry->initializeAll($this->objects);\n}\n/**\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Extension/BaseExtension.php",
"new_path": "src/Extension/BaseExtension.php",
"diff": "@@ -12,6 +12,7 @@ use Cocur\\Slugify\\Slugify;\nuse Composer\\Package\\CompletePackage;\nuse Composer\\Package\\PackageInterface;\nuse ComposerPackages\\Packages;\n+use Doctrine\\Common\\Persistence\\ObjectManager;\nuse Symfony\\Component\\EventDispatcher\\EventDispatcher;\nuse Symfony\\Component\\Filesystem\\Filesystem;\nuse Symfony\\Component\\Yaml\\Parser;\n@@ -38,7 +39,9 @@ abstract class BaseExtension implements ExtensionInterface\nprotected $twig;\n/** @var EventDispatcherInterface */\n- private $dispatcher;\n+ private $eventDispatcher;\n+ /** @var ObjectManager */\n+ protected $objectManager;\n/**\n* Returns the descriptive name of the Extension\n@@ -87,7 +90,7 @@ abstract class BaseExtension implements ExtensionInterface\n$this->config = new Collection($config);\n}\n- private function getConfigFilenames(): array\n+ public function getConfigFilenames(): array\n{\n$slugify = new Slugify();\n$base = $slugify->slugify(str_replace('Extension', '', $this->getClass()));\n@@ -141,12 +144,13 @@ abstract class BaseExtension implements ExtensionInterface\n*\n* @see ExtensionSubscriber\n*/\n- public function injectObjects(Widgets $widgets, Config $boltConfig, Environment $twig, EventDispatcherInterface $dispatcher): void\n+ public function injectObjects(array $objects): void\n{\n- $this->widgets = $widgets;\n- $this->boltConfig = $boltConfig;\n- $this->twig = $twig;\n- $this->dispatcher = $dispatcher;\n+ $this->widgets = $objects['widgets'];\n+ $this->boltConfig = $objects['config'];\n+ $this->twig = $objects['twig'];\n+ $this->eventDispatcher = $objects['dispatcher'];\n+ $this->objectManager = $objects['manager'];\n}\n/**\n@@ -174,7 +178,7 @@ abstract class BaseExtension implements ExtensionInterface\npublic function registerListener($event, $callback): void\n{\n/** @var EventDispatcher $dp */\n- $dp = $this->dispatcher;\n+ $dp = $this->eventDispatcher;\n$dp->addListener($event, $callback);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Extension/ExtensionInterface.php",
"new_path": "src/Extension/ExtensionInterface.php",
"diff": "@@ -4,11 +4,6 @@ declare(strict_types=1);\nnamespace Bolt\\Extension;\n-use Bolt\\Configuration\\Config;\n-use Bolt\\Widgets;\n-use Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface;\n-use Twig\\Environment;\n-\ninterface ExtensionInterface\n{\npublic const CONTAINER_TAG = 'bolt.extension';\n@@ -17,7 +12,7 @@ interface ExtensionInterface\npublic function getClass(): string;\n- public function injectObjects(Widgets $widgets, Config $config, Environment $twig, EventDispatcherInterface $dispatcher): void;\n+ public function injectObjects(array $objects): void;\npublic function initialize(): void;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Extension/ExtensionRegistry.php",
"new_path": "src/Extension/ExtensionRegistry.php",
"diff": "@@ -4,12 +4,8 @@ declare(strict_types=1);\nnamespace Bolt\\Extension;\n-use Bolt\\Configuration\\Config;\n-use Bolt\\Widgets;\nuse Composer\\Package\\PackageInterface;\nuse ComposerPackages\\Types;\n-use Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface;\n-use Twig\\Environment;\nclass ExtensionRegistry\n{\n@@ -60,13 +56,27 @@ class ExtensionRegistry\nreturn $this->extensions;\n}\n- public function initializeAll(Widgets $widgets, Config $config, Environment $twig, EventDispatcherInterface $dispatcher): void\n+ public function getExtensionNames(): array\n+ {\n+ return array_keys($this->extensions);\n+ }\n+\n+ public function getExtension(string $name): ?ExtensionInterface\n+ {\n+ if (isset($this->extensions[$name])) {\n+ return $this->extensions[$name];\n+ }\n+\n+ return null;\n+ }\n+\n+ public function initializeAll(array $objects): void\n{\n$this->addComposerPackages();\nforeach ($this->getExtensionClasses() as $extensionClass) {\n$extension = new $extensionClass();\n- $extension->injectObjects($widgets, $config, $twig, $dispatcher);\n+ $extension->injectObjects($objects);\n$extension->initialize();\n$this->extensions[$extensionClass] = $extension;\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Refactor objects passed into extensions.
|
95,144 |
22.09.2019 19:59:29
| -7,200 |
771d6b24473cbdadafa86b0a06270f213d0324c2
|
Various DX improvements: ContentRepository::findOneByFieldValue, Content::setDefinition, Content::setFieldValue
|
[
{
"change_type": "MODIFY",
"old_path": "src/Configuration/Config.php",
"new_path": "src/Configuration/Config.php",
"diff": "@@ -168,4 +168,9 @@ class Config\n{\nreturn new Collection($this->get('general/accept_media_types'));\n}\n+\n+ public function getContentType(string $name): ?Collection\n+ {\n+ return $this->get('contenttypes/' . $name);\n+ }\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Configuration/Parser/ContentTypesParser.php",
"new_path": "src/Configuration/Parser/ContentTypesParser.php",
"diff": "@@ -119,6 +119,12 @@ class ContentTypesParser extends BaseParser\nif (! isset($contentType['singleton'])) {\n$contentType['singleton'] = false;\n}\n+ if (! isset($contentType['record_template'])) {\n+ $contentType['record_template'] = $contentType['singular_slug'] . '.twig';\n+ }\n+ if (! isset($contentType['listing_template'])) {\n+ $contentType['listing_template'] = $contentType['slug'] . '.twig';\n+ }\nif ($contentType['singleton']) {\n$contentType['listing_records'] = 1;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/DataFixtures/ContentFixtures.php",
"new_path": "src/DataFixtures/ContentFixtures.php",
"diff": "@@ -103,7 +103,6 @@ class ContentFixtures extends BaseFixture implements DependentFixtureInterface,\n$sortorder = 1;\nforeach ($contentType['fields'] as $name => $fieldType) {\n$field = Field::factory($fieldType, $name);\n- $field->setName($name);\nif (isset($preset[$name])) {\n$field->setValue($preset[$name]);\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Entity/Content.php",
"new_path": "src/Entity/Content.php",
"diff": "@@ -133,11 +133,16 @@ class Content\n*/\nprivate $taxonomies;\n- public function __construct()\n+ public function __construct(?ContentType $contentTypeDefinition = null)\n{\n$this->createdAt = new \\DateTime();\n$this->taxonomies = new ArrayCollection();\n$this->fields = new ArrayCollection();\n+\n+ if ($contentTypeDefinition) {\n+ $this->setContentType($contentTypeDefinition->getSlug());\n+ $this->setDefinition($contentTypeDefinition);\n+ }\n}\npublic function __toString(): string\n@@ -167,6 +172,11 @@ class Content\n$this->contentTypeDefinition = ContentType::factory($this->contentType, $contentTypesConfig);\n}\n+ public function setDefinition(ContentType $contentType): void\n+ {\n+ $this->contentTypeDefinition = $contentType;\n+ }\n+\npublic function getDefinition(): ?ContentType\n{\nreturn $this->contentTypeDefinition;\n@@ -348,6 +358,17 @@ class Content\nreturn $this->getField($fieldName)->getParsedValue();\n}\n+ public function setFieldValue(string $fieldName, $value): void\n+ {\n+ if (! $this->hasField($fieldName)) {\n+ $this->addFieldByName($fieldName);\n+ }\n+\n+ $field = $this->getField($fieldName);\n+\n+ $field->setValue($value);\n+ }\n+\npublic function getField(string $fieldName): Field\n{\nif ($this->hasField($fieldName) === false) {\n@@ -393,6 +414,15 @@ class Content\nreturn $this;\n}\n+ public function addFieldByName(string $fieldName): void\n+ {\n+ $definition = $this->contentTypeDefinition->get('fields')->get($fieldName);\n+\n+ $field = Field::factory($definition, $fieldName);\n+\n+ $this->addField($field);\n+ }\n+\npublic function removeField(Field $field): self\n{\nunset($this->fields[$field->getName()]);\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Entity/Field.php",
"new_path": "src/Entity/Field.php",
"diff": "@@ -86,7 +86,13 @@ class Field implements Translatable, FieldInterface\npublic function __toString(): string\n{\n- return implode(', ', $this->getValue());\n+ $value = '';\n+ $iterator = new \\RecursiveIteratorIterator(new \\RecursiveArrayIterator($this->getValue()));\n+ foreach ($iterator as $iteratorValue) {\n+ $value .= $iteratorValue .', ';\n+ }\n+\n+ return $value;\n}\npublic static function factory(LaravelCollection $definition, string $name = ''): self\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Menu/BackendMenuBuilder.php",
"new_path": "src/Menu/BackendMenuBuilder.php",
"diff": "@@ -299,13 +299,19 @@ final class BackendMenuBuilder implements BackendMenuBuilderInterface\n$result = [];\nforeach ($records as $record) {\n- $result[] = [\n+ try {\n+ $additionalResult = [\n'id' => $record->getId(),\n'name' => $this->contentExtension->getTitle($record),\n'link' => $this->contentExtension->getLink($record),\n'editLink' => $this->contentExtension->getEditLink($record),\n'icon' => $record->getIcon(),\n];\n+\n+ $result[] = $additionalResult;\n+ } catch (\\RuntimeException $exception) {\n+ // When a record is not initialised (yet), don't break, but fail gracefully.\n+ }\n}\nreturn $result;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Repository/ContentRepository.php",
"new_path": "src/Repository/ContentRepository.php",
"diff": "@@ -192,6 +192,18 @@ class ContentRepository extends ServiceEntityRepository\n)\n->andWhere('slug.value = :slug')\n->setParameter('slug', Json::json_encode([$slug]))\n+ ->setMaxResults(1)\n+ ->getQuery()\n+ ->getOneOrNullResult();\n+ }\n+\n+ public function findOneByFieldValue(string $fieldName, $value): ?Content\n+ {\n+ return $this->getQueryBuilder()\n+ ->innerJoin('content.fields', 'field')\n+ ->andWhere('field.value = :value')\n+ ->setParameter('value', Json::json_encode([$value]))\n+ ->setMaxResults(1)\n->getQuery()\n->getOneOrNullResult();\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Various DX improvements: ContentRepository::findOneByFieldValue, Content::setDefinition, Content::setFieldValue
|
95,144 |
23.09.2019 20:30:31
| -7,200 |
ceaeb4ede61876b2d9b73a7db6361d6aa53cad67
|
Improve sorting and set a default for `{% setcontent limit %}`
|
[
{
"change_type": "MODIFY",
"old_path": "src/Repository/ContentRepository.php",
"new_path": "src/Repository/ContentRepository.php",
"diff": "@@ -63,9 +63,14 @@ class ContentRepository extends ServiceEntityRepository\n->setParameter('taxonomySlug', $taxonomy);\n}\n- if ($sortBy && \\in_array($sortBy, $this->contentColumns, true)) {\n- $qb->orderBy('content.' . $sortBy);\n- } elseif (! empty($sortBy)) {\n+ [ $order, $direction, $sortByField ] = $this->createSortBy($sortBy, $contentType);\n+\n+\n+ if (!$sortByField) {\n+ $qb->orderBy('content.' . $order, $direction);\n+ } else {\n+ // @todo Make sorting on a Field work as expected.\n+ dump('This is not correct');\n// First, create a querybuilder to get the fields that match the Query\n$sortByQB = $this->getQueryBuilder()\n->select('partial content.{id}');\n@@ -73,16 +78,14 @@ class ContentRepository extends ServiceEntityRepository\n$sortByQB->addSelect('f')\n->innerJoin('content.fields', 'f')\n->andWhere('f.name = :fieldname')\n- ->setParameter('fieldname', $sortBy);\n+ ->setParameter('fieldname', $order)\n+ ->addOrderBy('f.name', $direction);\n// These are the ID's of content we need.\n$ids = array_column($sortByQB->getQuery()->getArrayResult(), 'id');\n$qb->andWhere('content.id IN (:ids)')\n- ->setParameter('ids', $ids)\n- ->andWhere('f.name = :fieldname')\n- ->setParameter('fieldname', $sortBy)\n- ->addOrderBy('f.value');\n+ ->setParameter('ids', $ids);\n}\nif ($filter) {\n@@ -101,9 +104,45 @@ class ContentRepository extends ServiceEntityRepository\n$qb->andWhere('content.id IN (:ids)')\n->setParameter('ids', $ids);\n}\n+\nreturn $this->createPaginator($qb->getQuery(), $page, $amountPerPage);\n}\n+ /**\n+ * Cobble together the sorting order, and whether or not it's a column in `content` or `fields`.\n+ *\n+ * @param string $order\n+ * @param ContentType $contentType\n+ * @return array\n+ */\n+ private function createSortBy(string $order = '', ContentType $contentType): array\n+ {\n+ dump($this->contentColumns);\n+\n+ if (empty($order)) {\n+ $order = $contentType->get('sort');\n+ }\n+\n+ if (strpos($order, '-') === 0) {\n+ $direction = 'DESC';\n+ $order = substr($order, 1);\n+ } elseif (strpos($order, ' DESC') !== false) {\n+ $direction = 'DESC';\n+ $order = str_replace(' DESC', '', $order);\n+ } else {\n+ $order = str_replace(' ASC', '', $order);\n+ $direction = 'ASC';\n+ }\n+\n+ if (\\in_array($order, $this->contentColumns, true)) {\n+ $sortByField = false;\n+ } else {\n+ $sortByField = true;\n+ }\n+\n+ return [ $order, $direction, $sortByField ];\n+ }\n+\npublic function findForTaxonomy(int $page, string $taxonomyslug, string $slug, int $amountPerPage, bool $onlyPublished = true): Pagerfanta\n{\n$qb = $this->getQueryBuilder()\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Storage/Query/ContentQueryParser.php",
"new_path": "src/Storage/Query/ContentQueryParser.php",
"diff": "@@ -193,7 +193,8 @@ class ContentQueryParser\n*/\nprotected function parseDirectives(): void\n{\n- $this->directives = [];\n+ // If the user doesn't pass in a limit, we'll get 20. Don't break the site by fetching _all_.\n+ $this->directives = ['limit' => 20];\nif (! $this->params) {\nreturn;\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Improve sorting and set a default for `{% setcontent limit %}`
|
95,144 |
23.09.2019 20:47:53
| -7,200 |
daf1d4ce6ab495ba1e84e83d04870e7d1a09eb6e
|
Sane default for `sort`
|
[
{
"change_type": "MODIFY",
"old_path": "src/Configuration/Parser/ContentTypesParser.php",
"new_path": "src/Configuration/Parser/ContentTypesParser.php",
"diff": "@@ -94,7 +94,7 @@ class ContentTypesParser extends BaseParser\n$contentType['show_in_menu'] = true;\n}\nif (! isset($contentType['sort'])) {\n- $contentType['sort'] = false;\n+ $contentType['sort'] = 'id';\n}\nif (! isset($contentType['default_status'])) {\n$contentType['default_status'] = Statuses::PUBLISHED;\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Sane default for `sort`
|
95,155 |
24.09.2019 14:15:20
| -7,200 |
45d276844b0df5b672d9204cd05959e6164163a8
|
fix(config): fix form_themes in twig config
|
[
{
"change_type": "MODIFY",
"old_path": "config/packages/twig.yaml",
"new_path": "config/packages/twig.yaml",
"diff": "@@ -2,8 +2,8 @@ twig:\ndebug: '%kernel.debug%'\nstrict_variables: true\nform_themes:\n- - 'form/layout.twig'\n- - 'form/fields.twig'\n+ - '@bolt/form/layout.html.twig'\n+ - '@bolt/form/fields.html.twig'\npaths:\n# Since the name of the theme folder is dynamic, we shouldn't set it here, but dynamically\n# See TwigAwareController::setTwigLoader()\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/form/layout.html.twig",
"new_path": "templates/form/layout.html.twig",
"diff": "-{% extends 'bootstrap_3_layout.html.html.twig' %}\n+{% extends 'bootstrap_3_layout.html.twig' %}\n{# Errors #}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
fix(config): fix form_themes in twig config
|
95,144 |
25.09.2019 09:07:40
| -7,200 |
cf1a7b0e8ace7bf17f483f432a53ca41dacbb10e
|
Allowing Twig\Markup for |excerpt filter
|
[
{
"change_type": "MODIFY",
"old_path": "src/Twig/ContentExtension.php",
"new_path": "src/Twig/ContentExtension.php",
"diff": "@@ -15,6 +15,7 @@ use Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface;\nuse Symfony\\Component\\Security\\Csrf\\CsrfTokenManagerInterface;\nuse Tightenco\\Collect\\Support\\Collection;\nuse Twig\\Extension\\AbstractExtension;\n+use Twig\\Markup;\nuse Twig\\TwigFilter;\nuse Twig\\TwigFunction;\n@@ -134,12 +135,13 @@ class ContentExtension extends AbstractExtension\n}\n/**\n+ * @param string|Markup|Content $content\n* @param string|array|null $focus\n*/\npublic function getExcerpt($content, int $length = 280, bool $includeTitle = true, $focus = null): string\n{\n- if (is_string($content)) {\n- return Excerpt::getExcerpt($content, $length);\n+ if (is_string($content) || $content instanceof Markup) {\n+ return Excerpt::getExcerpt((string) $content, $length);\n}\n$excerptParts = [];\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Allowing Twig\Markup for |excerpt filter
|
95,144 |
25.09.2019 17:22:27
| -7,200 |
02cff698e31e47ea494df8088051dc01102d5610
|
Improving pagers, adding 'barebones' backend page for extensions
|
[
{
"change_type": "MODIFY",
"old_path": "templates/content/listing.html.twig",
"new_path": "templates/content/listing.html.twig",
"diff": "</div>\n</div>\n+ <div class=\"card\">\n+ <div class=\"card-header\">\n+ {{ 'title.contentType'|trans }} {{ contentType.name }}\n+ </div>\n+ <div class=\"card-body\">\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+ <li>Record template: <code>{{ contentType.record_template }}</code></li>\n+ <li>Listing template: <code>{{ contentType.listing_template }}</code> ({{ contentType.listing_records }} records)</li>\n+ {% if contentType.locales %}\n+ <li>Locales:\n+ {% for locale in contentType.locales %}\n+ {{ flag(locale) }}\n+ {%- if not loop.last %}, {% endif %}\n+ {% endfor %}\n+ </li>\n+ {% endif %}\n+ </ul>\n+\n+ </div>\n+ </div>\n+\n{% endblock %}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "templates/pages/barebones.html.twig",
"diff": "+{% extends '@bolt/_base/layout.html.twig' %}\n+{% import '@bolt/_macro/_macro.html.twig' as macro %}\n+\n+{% block title %}\n+ {{ macro.icon(icon|default('question-circle')) }}\n+ {{ title|default('Untitled Page') }}\n+{% endblock title %}\n+\n+{% block main %}\n+\n+ {% if not main|default() and not mainMarkdown|default() %}\n+ Content goes here. Please pass in `main` or `mainMarkdown` to see output.\n+ {% endif %}\n+\n+ {{ main|default() }}\n+ {{ mainMarkdown|default()|markdown }}\n+\n+{% endblock main %}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Improving pagers, adding 'barebones' backend page for extensions
|
95,144 |
26.09.2019 13:27:53
| -7,200 |
0a1e9f064cdb87377b622991b180cc0efd7ec65a
|
Add support for `general/omit_backgrounds` configuration option
|
[
{
"change_type": "MODIFY",
"old_path": "assets/scss/layout/_login.scss",
"new_path": "assets/scss/layout/_login.scss",
"diff": "html#login {\n- background: linear-gradient(rgba(255, 255, 255, 0.4), rgba(0, 0, 0, 0.4)), url(https://source.unsplash.com/daily);\n+ background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(37, 86, 135, 0.5));\n+\n+ &.with-background {\n+ background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(37, 86, 135, 0.5)), url(https://source.unsplash.com/daily);\nbackground-position: center;\nbackground-size: cover;\n+ }\nbody {\nbackground: transparent;\n"
},
{
"change_type": "MODIFY",
"old_path": "config/bolt/config.yaml",
"new_path": "config/bolt/config.yaml",
"diff": "# Note: Database setup is best done in ENV variables. See the file `.env`\n# in the project root.\n-\n# The name of the website\nsitename: A sample site in CONFIG\npayoff: The amazing payoff goes here\n@@ -54,6 +53,9 @@ maintenance_template: maintenance_default.twig\n# Default: 3 (3 am)\ncron_hour: 3\n+# You can set a preference to omit background images on the login screen.\n+omit_backgrounds: true\n+\n# If your site is reachable under different urls (say, both blog.example.org/\n# as well as example.org/), its a good idea to set one of these as the\n# canonical, so its clear which is the primary address of the site.\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/_base/layout_blank.html.twig",
"new_path": "templates/_base/layout_blank.html.twig",
"diff": "<!DOCTYPE html>\n-<html {% if block('html_id') %}id=\"{% block html_id %}{% endblock %}\"{% endif %}>\n+<html {% if block('html_id') %}id=\"{% block html_id %}{% endblock %}\"{% endif %}\n+{% if block('html_class') %}class=\"{% block html_class %}{% endblock %}\"{% endif %}>\n<head>\n<meta charset=\"utf-8\">\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/security/login.html.twig",
"new_path": "templates/security/login.html.twig",
"diff": "{% block html_id 'login' %}\n+{% block html_class %}\n+ {% if not config.get('general/omit_backgrounds') %}with-background{% endif %}\n+{% endblock %}\n+\n{% block javascripts %}\n{{ parent() }}\n{% endblock %}\n{% block main %}\n-\n<div>\n<div>\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Add support for `general/omit_backgrounds` configuration option
|
95,143 |
28.09.2019 09:36:34
| -7,200 |
b087f19b7b2798effddb44e23269d8788b346899
|
Update from Stretch to Buster
Update the base container to explicitly use Buster (or the same issue we ran into now is going to crop up whenever Debian has a new release out)
Use the appropriate ttf-fonts package for Buster
|
[
{
"change_type": "MODIFY",
"old_path": "docker/php/Dockerfile",
"new_path": "docker/php/Dockerfile",
"diff": "-# https://github.com/docker-library/php/blob/master/7.3/stretch/fpm/Dockerfile\n-FROM php:7.3-fpm\n+# https://github.com/docker-library/php/blob/master/7.3/buster/fpm/Dockerfile\n+FROM php:7.3-fpm-buster\nENV PATH /path/to/bin/folder:$PATH\nENV PHP_MEMORYLIMIT 2048M\n@@ -33,7 +33,7 @@ RUN extBuildDeps=\" \\\nzip unzip \\\nacl \\\niproute2 \\\n- ttf-freefont \\\n+ fonts-freefont-ttf \\\nfontconfig \\\ndbus \\\nopenssh-client \\\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Update from Stretch to Buster
- Update the base container to explicitly use Buster (or the same issue we ran into now is going to crop up whenever Debian has a new release out)
- Use the appropriate ttf-fonts package for Buster
|
95,144 |
28.09.2019 12:18:41
| -7,200 |
9238e2084aac757afa19617e553ba12dec0dff7f
|
Fix trailing comma in `__toString` method
|
[
{
"change_type": "MODIFY",
"old_path": "src/Entity/Field.php",
"new_path": "src/Entity/Field.php",
"diff": "@@ -86,13 +86,13 @@ class Field implements Translatable, FieldInterface\npublic function __toString(): string\n{\n- $value = '';\n+ $value = [];\n$iterator = new \\RecursiveIteratorIterator(new \\RecursiveArrayIterator($this->getValue()));\nforeach ($iterator as $iteratorValue) {\n- $value .= $iteratorValue .', ';\n+ $value[] = $iteratorValue;\n}\n- return $value;\n+ return implode(', ', $value);\n}\npublic static function factory(LaravelCollection $definition, string $name = ''): self\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Fix trailing comma in `__toString` method
|
95,144 |
28.09.2019 13:29:30
| -7,200 |
8786c7dbd4ff97a3e7acf81748db487d1a261990
|
Finetuning the "Edit User" screen
|
[
{
"change_type": "MODIFY",
"old_path": "assets/js/app/editor/Components/Password.vue",
"new_path": "assets/js/app/editor/Components/Password.vue",
"diff": "v-if=\"strength\"\nref=\"progressBar\"\nmax=\"4\"\n- height=\"2px\"\n+ height=\"4px\"\n></progress-bar>\n</div>\n</template>\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/users/edit.html.twig",
"new_path": "templates/users/edit.html.twig",
"diff": "<theme-select></theme-select>\n#}\n- <button class=\"btn btn-primary\" type=\"submit\">\n- <i class=\"fa fa-save\" aria-hidden=\"true\"></i> {{ 'action.save'|trans }}\n- </button>\n+ {{ macro.button('action.save', 'fa-save', 'primary', {'type': 'submit', 'form': 'editcontent'}) }}\n</form>\n</div>\n{% endblock %}\n+{% block aside %}\n+ <div id=\"metadata\">\n+ <form class=\"ui form\">\n+ <div class=\"card mb-3\">\n+ <div class=\"card-body\">\n+ {{ macro.button('action.save', 'fa-save', 'primary', {'type': 'submit', 'form': 'editcontent'}) }}\n+ </div>\n+ </div>\n+ </form>\n+ </div>\n+\n+{% endblock %}\n+\n{% block javascripts %}\n{{ encore_entry_script_tags('zxcvbn') }}\n{{ parent() }}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Finetuning the "Edit User" screen
|
95,144 |
28.09.2019 13:37:34
| -7,200 |
0161cf30518360aa8d2a7e5cfef0132d9424f7c0
|
Updating Profile edit screen too
|
[
{
"change_type": "MODIFY",
"old_path": "templates/users/edit.html.twig",
"new_path": "templates/users/edit.html.twig",
"diff": "{% endblock %}\n{% block aside %}\n- <div id=\"metadata\">\n+ <div id=\"metadata\" class=\"d-none d-xl-block\">\n<form class=\"ui form\">\n<div class=\"card mb-3\">\n<div class=\"card-body\">\n</div>\n</form>\n</div>\n-\n{% endblock %}\n{% block javascripts %}\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/users/profile.html.twig",
"new_path": "templates/users/profile.html.twig",
"diff": "<theme-select></theme-select>\n#}\n- <button class=\"btn btn-primary\" type=\"submit\">\n- <i class=\"fa fa-save\" aria-hidden=\"true\"></i> {{ 'action.save'|trans }}\n- </button>\n+ {{ macro.button('action.save', 'fa-save', 'primary', {'type': 'submit', 'form': 'editcontent'}) }}\n+\n+ </form>\n+ </div>\n+{% endblock %}\n+\n+{% block aside %}\n+ <div id=\"metadata\" class=\"d-none d-xl-block\">\n+ <form class=\"ui form\">\n+ <div class=\"card mb-3\">\n+ <div class=\"card-body\">\n+ {{ macro.button('action.save', 'fa-save', 'primary', {'type': 'submit', 'form': 'editcontent'}) }}\n+ </div>\n+ </div>\n</form>\n</div>\n{% endblock %}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Updating Profile edit screen too
|
95,144 |
28.09.2019 13:46:45
| -7,200 |
d6750b6dd562e71f4ac4f6874df79b6bb26036c7
|
Change file_exists -> is_readable
|
[
{
"change_type": "MODIFY",
"old_path": "src/Command/CopyAssetsCommand.php",
"new_path": "src/Command/CopyAssetsCommand.php",
"diff": "@@ -126,7 +126,7 @@ class CopyAssetsCommand extends Command\n$composerFilePath = $container->getParameter('kernel.project_dir').'/composer.json';\n- if (! file_exists($composerFilePath)) {\n+ if (! is_readable($composerFilePath)) {\nreturn $defaultPublicDir;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Command/CopyThemesCommand.php",
"new_path": "src/Command/CopyThemesCommand.php",
"diff": "@@ -123,7 +123,7 @@ class CopyThemesCommand extends Command\n$composerFilePath = $container->getParameter('kernel.project_dir').'/composer.json';\n- if (! file_exists($composerFilePath)) {\n+ if (! is_readable($composerFilePath)) {\nreturn $defaultPublicDir;\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Change file_exists -> is_readable
|
95,144 |
28.09.2019 14:49:22
| -7,200 |
1cf746585053c0267c2dd01c3b84c434fea02f61
|
Spring cleaning: composer and npm updates
|
[
{
"change_type": "MODIFY",
"old_path": "package-lock.json",
"new_path": "package-lock.json",
"diff": "}\n},\n\"@babel/core\": {\n- \"version\": \"7.6.0\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/core/-/core-7.6.0.tgz\",\n- \"integrity\": \"sha512-FuRhDRtsd6IptKpHXAa+4WPZYY2ZzgowkbLBecEDDSje1X/apG7jQM33or3NdOmjXBKWGOg4JmSiRfUfuTtHXw==\",\n+ \"version\": \"7.6.2\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/core/-/core-7.6.2.tgz\",\n+ \"integrity\": \"sha512-l8zto/fuoZIbncm+01p8zPSDZu/VuuJhAfA7d/AbzM09WR7iVhavvfNDYCNpo1VvLk6E6xgAoP9P+/EMJHuRkQ==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/code-frame\": \"^7.5.5\",\n- \"@babel/generator\": \"^7.6.0\",\n- \"@babel/helpers\": \"^7.6.0\",\n- \"@babel/parser\": \"^7.6.0\",\n+ \"@babel/generator\": \"^7.6.2\",\n+ \"@babel/helpers\": \"^7.6.2\",\n+ \"@babel/parser\": \"^7.6.2\",\n\"@babel/template\": \"^7.6.0\",\n- \"@babel/traverse\": \"^7.6.0\",\n+ \"@babel/traverse\": \"^7.6.2\",\n\"@babel/types\": \"^7.6.0\",\n\"convert-source-map\": \"^1.1.0\",\n\"debug\": \"^4.1.0\",\n},\n\"dependencies\": {\n\"@babel/generator\": {\n- \"version\": \"7.6.0\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.6.0.tgz\",\n- \"integrity\": \"sha512-Ms8Mo7YBdMMn1BYuNtKuP/z0TgEIhbcyB8HVR6PPNYp4P61lMsABiS4A3VG1qznjXVCf3r+fVHhm4efTYVsySA==\",\n+ \"version\": \"7.6.2\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.6.2.tgz\",\n+ \"integrity\": \"sha512-j8iHaIW4gGPnViaIHI7e9t/Hl8qLjERI6DcV9kEpAIDJsAOrcnXqRS7t+QbhL76pwbtqP+QCQLL0z1CyVmtjjQ==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/types\": \"^7.6.0\",\n\"jsesc\": \"^2.5.1\",\n\"lodash\": \"^4.17.13\",\n- \"source-map\": \"^0.5.0\",\n- \"trim-right\": \"^1.0.1\"\n+ \"source-map\": \"^0.5.0\"\n}\n},\n\"@babel/parser\": {\n- \"version\": \"7.6.0\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.6.0.tgz\",\n- \"integrity\": \"sha512-+o2q111WEx4srBs7L9eJmcwi655eD8sXniLqMB93TBK9GrNzGrxDWSjiqz2hLU0Ha8MTXFIP0yd9fNdP+m43ZQ==\",\n+ \"version\": \"7.6.2\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.6.2.tgz\",\n+ \"integrity\": \"sha512-mdFqWrSPCmikBoaBYMuBulzTIKuXVPtEISFbRRVNwMWpCms/hmE2kRq0bblUHaNRKrjRlmVbx1sDHmjmRgD2Xg==\",\n\"dev\": true\n},\n\"@babel/template\": {\n}\n},\n\"@babel/traverse\": {\n- \"version\": \"7.6.0\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.6.0.tgz\",\n- \"integrity\": \"sha512-93t52SaOBgml/xY74lsmt7xOR4ufYvhb5c5qiM6lu4J/dWGMAfAh6eKw4PjLes6DI6nQgearoxnFJk60YchpvQ==\",\n+ \"version\": \"7.6.2\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.6.2.tgz\",\n+ \"integrity\": \"sha512-8fRE76xNwNttVEF2TwxJDGBLWthUkHWSldmfuBzVRmEDWOtu4XdINTgN7TDWzuLg4bbeIMLvfMFD9we5YcWkRQ==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/code-frame\": \"^7.5.5\",\n- \"@babel/generator\": \"^7.6.0\",\n+ \"@babel/generator\": \"^7.6.2\",\n\"@babel/helper-function-name\": \"^7.1.0\",\n\"@babel/helper-split-export-declaration\": \"^7.4.4\",\n- \"@babel/parser\": \"^7.6.0\",\n+ \"@babel/parser\": \"^7.6.2\",\n\"@babel/types\": \"^7.6.0\",\n\"debug\": \"^4.1.0\",\n\"globals\": \"^11.1.0\",\n}\n},\n\"@babel/helpers\": {\n- \"version\": \"7.6.0\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/helpers/-/helpers-7.6.0.tgz\",\n- \"integrity\": \"sha512-W9kao7OBleOjfXtFGgArGRX6eCP0UEcA2ZWEWNkJdRZnHhW4eEbeswbG3EwaRsnQUAEGWYgMq1HsIXuNNNy2eQ==\",\n+ \"version\": \"7.6.2\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/helpers/-/helpers-7.6.2.tgz\",\n+ \"integrity\": \"sha512-3/bAUL8zZxYs1cdX2ilEE0WobqbCmKWr/889lf2SS0PpDcpEIY8pb1CCyz0pEcX3pEb+MCbks1jIokz2xLtGTA==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/template\": \"^7.6.0\",\n- \"@babel/traverse\": \"^7.6.0\",\n+ \"@babel/traverse\": \"^7.6.2\",\n\"@babel/types\": \"^7.6.0\"\n},\n\"dependencies\": {\n\"@babel/generator\": {\n- \"version\": \"7.6.0\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.6.0.tgz\",\n- \"integrity\": \"sha512-Ms8Mo7YBdMMn1BYuNtKuP/z0TgEIhbcyB8HVR6PPNYp4P61lMsABiS4A3VG1qznjXVCf3r+fVHhm4efTYVsySA==\",\n+ \"version\": \"7.6.2\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.6.2.tgz\",\n+ \"integrity\": \"sha512-j8iHaIW4gGPnViaIHI7e9t/Hl8qLjERI6DcV9kEpAIDJsAOrcnXqRS7t+QbhL76pwbtqP+QCQLL0z1CyVmtjjQ==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/types\": \"^7.6.0\",\n\"jsesc\": \"^2.5.1\",\n\"lodash\": \"^4.17.13\",\n- \"source-map\": \"^0.5.0\",\n- \"trim-right\": \"^1.0.1\"\n+ \"source-map\": \"^0.5.0\"\n}\n},\n\"@babel/parser\": {\n- \"version\": \"7.6.0\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.6.0.tgz\",\n- \"integrity\": \"sha512-+o2q111WEx4srBs7L9eJmcwi655eD8sXniLqMB93TBK9GrNzGrxDWSjiqz2hLU0Ha8MTXFIP0yd9fNdP+m43ZQ==\",\n+ \"version\": \"7.6.2\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.6.2.tgz\",\n+ \"integrity\": \"sha512-mdFqWrSPCmikBoaBYMuBulzTIKuXVPtEISFbRRVNwMWpCms/hmE2kRq0bblUHaNRKrjRlmVbx1sDHmjmRgD2Xg==\",\n\"dev\": true\n},\n\"@babel/template\": {\n}\n},\n\"@babel/traverse\": {\n- \"version\": \"7.6.0\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.6.0.tgz\",\n- \"integrity\": \"sha512-93t52SaOBgml/xY74lsmt7xOR4ufYvhb5c5qiM6lu4J/dWGMAfAh6eKw4PjLes6DI6nQgearoxnFJk60YchpvQ==\",\n+ \"version\": \"7.6.2\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.6.2.tgz\",\n+ \"integrity\": \"sha512-8fRE76xNwNttVEF2TwxJDGBLWthUkHWSldmfuBzVRmEDWOtu4XdINTgN7TDWzuLg4bbeIMLvfMFD9we5YcWkRQ==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/code-frame\": \"^7.5.5\",\n- \"@babel/generator\": \"^7.6.0\",\n+ \"@babel/generator\": \"^7.6.2\",\n\"@babel/helper-function-name\": \"^7.1.0\",\n\"@babel/helper-split-export-declaration\": \"^7.4.4\",\n- \"@babel/parser\": \"^7.6.0\",\n+ \"@babel/parser\": \"^7.6.2\",\n\"@babel/types\": \"^7.6.0\",\n\"debug\": \"^4.1.0\",\n\"globals\": \"^11.1.0\",\n}\n},\n\"@babel/plugin-proposal-object-rest-spread\": {\n- \"version\": \"7.5.5\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.5.5.tgz\",\n- \"integrity\": \"sha512-F2DxJJSQ7f64FyTVl5cw/9MWn6naXGdk3Q3UhDbFEEHv+EilCPoeRD3Zh/Utx1CJz4uyKlQ4uH+bJPbEhMV7Zw==\",\n+ \"version\": \"7.6.2\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.6.2.tgz\",\n+ \"integrity\": \"sha512-LDBXlmADCsMZV1Y9OQwMc0MyGZ8Ta/zlD9N67BfQT8uYwkRswiu2hU6nJKrjrt/58aH/vqfQlR/9yId/7A2gWw==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/helper-plugin-utils\": \"^7.0.0\",\n}\n},\n\"@babel/plugin-proposal-unicode-property-regex\": {\n- \"version\": \"7.4.4\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.4.4.tgz\",\n- \"integrity\": \"sha512-j1NwnOqMG9mFUOH58JTFsA/+ZYzQLUZ/drqWUqxCYLGeu2JFZL8YrNC9hBxKmWtAuOCHPcRpgv7fhap09Fb4kA==\",\n+ \"version\": \"7.6.2\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.6.2.tgz\",\n+ \"integrity\": \"sha512-NxHETdmpeSCtiatMRYWVJo7266rrvAC3DTeG5exQBIH/fMIUK7ejDNznBbn3HQl/o9peymRRg7Yqkx6PdUXmMw==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/helper-plugin-utils\": \"^7.0.0\",\n\"@babel/helper-regex\": \"^7.4.4\",\n- \"regexpu-core\": \"^4.5.4\"\n+ \"regexpu-core\": \"^4.6.0\"\n},\n\"dependencies\": {\n\"regexpu-core\": {\n- \"version\": \"4.5.5\",\n- \"resolved\": \"https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.5.5.tgz\",\n- \"integrity\": \"sha512-FpI67+ky9J+cDizQUJlIlNZFKual/lUkFr1AG6zOCpwZ9cLrg8UUVakyUQJD7fCDIe9Z2nwTQJNPyonatNmDFQ==\",\n+ \"version\": \"4.6.0\",\n+ \"resolved\": \"https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.6.0.tgz\",\n+ \"integrity\": \"sha512-YlVaefl8P5BnFYOITTNzDvan1ulLOiXJzCNZxduTIosN17b87h3bvG9yHMoHaRuo88H4mQ06Aodj5VtYGGGiTg==\",\n\"dev\": true,\n\"requires\": {\n\"regenerate\": \"^1.4.0\",\n}\n},\n\"@babel/plugin-transform-block-scoping\": {\n- \"version\": \"7.6.0\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.6.0.tgz\",\n- \"integrity\": \"sha512-tIt4E23+kw6TgL/edACZwP1OUKrjOTyMrFMLoT5IOFrfMRabCgekjqFd5o6PaAMildBu46oFkekIdMuGkkPEpA==\",\n+ \"version\": \"7.6.2\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.6.2.tgz\",\n+ \"integrity\": \"sha512-zZT8ivau9LOQQaOGC7bQLQOT4XPkPXgN2ERfUgk1X8ql+mVkLc4E8eKk+FO3o0154kxzqenWCorfmEXpEZcrSQ==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/helper-plugin-utils\": \"^7.0.0\",\n}\n},\n\"@babel/plugin-transform-dotall-regex\": {\n- \"version\": \"7.4.4\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.4.4.tgz\",\n- \"integrity\": \"sha512-P05YEhRc2h53lZDjRPk/OektxCVevFzZs2Gfjd545Wde3k+yFDbXORgl2e0xpbq8mLcKJ7Idss4fAg0zORN/zg==\",\n+ \"version\": \"7.6.2\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.6.2.tgz\",\n+ \"integrity\": \"sha512-KGKT9aqKV+9YMZSkowzYoYEiHqgaDhGmPNZlZxX6UeHC4z30nC1J9IrZuGqbYFB1jaIGdv91ujpze0exiVK8bA==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/helper-plugin-utils\": \"^7.0.0\",\n\"@babel/helper-regex\": \"^7.4.4\",\n- \"regexpu-core\": \"^4.5.4\"\n+ \"regexpu-core\": \"^4.6.0\"\n},\n\"dependencies\": {\n\"regexpu-core\": {\n- \"version\": \"4.5.5\",\n- \"resolved\": \"https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.5.5.tgz\",\n- \"integrity\": \"sha512-FpI67+ky9J+cDizQUJlIlNZFKual/lUkFr1AG6zOCpwZ9cLrg8UUVakyUQJD7fCDIe9Z2nwTQJNPyonatNmDFQ==\",\n+ \"version\": \"4.6.0\",\n+ \"resolved\": \"https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.6.0.tgz\",\n+ \"integrity\": \"sha512-YlVaefl8P5BnFYOITTNzDvan1ulLOiXJzCNZxduTIosN17b87h3bvG9yHMoHaRuo88H4mQ06Aodj5VtYGGGiTg==\",\n\"dev\": true,\n\"requires\": {\n\"regenerate\": \"^1.4.0\",\n}\n},\n\"@babel/plugin-transform-named-capturing-groups-regex\": {\n- \"version\": \"7.6.0\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.6.0.tgz\",\n- \"integrity\": \"sha512-jem7uytlmrRl3iCAuQyw8BpB4c4LWvSpvIeXKpMb+7j84lkx4m4mYr5ErAcmN5KM7B6BqrAvRGjBIbbzqCczew==\",\n+ \"version\": \"7.6.2\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.6.2.tgz\",\n+ \"integrity\": \"sha512-xBdB+XOs+lgbZc2/4F5BVDVcDNS4tcSKQc96KmlqLEAwz6tpYPEvPdmDfvVG0Ssn8lAhronaRs6Z6KSexIpK5g==\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"regexpu-core\": \"^4.6.0\"\n+ },\n+ \"dependencies\": {\n+ \"regexpu-core\": {\n+ \"version\": \"4.6.0\",\n+ \"resolved\": \"https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.6.0.tgz\",\n+ \"integrity\": \"sha512-YlVaefl8P5BnFYOITTNzDvan1ulLOiXJzCNZxduTIosN17b87h3bvG9yHMoHaRuo88H4mQ06Aodj5VtYGGGiTg==\",\n\"dev\": true,\n\"requires\": {\n- \"regexp-tree\": \"^0.1.13\"\n+ \"regenerate\": \"^1.4.0\",\n+ \"regenerate-unicode-properties\": \"^8.1.0\",\n+ \"regjsgen\": \"^0.5.0\",\n+ \"regjsparser\": \"^0.6.0\",\n+ \"unicode-match-property-ecmascript\": \"^1.0.4\",\n+ \"unicode-match-property-value-ecmascript\": \"^1.1.0\"\n+ }\n+ },\n+ \"regjsgen\": {\n+ \"version\": \"0.5.0\",\n+ \"resolved\": \"https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.0.tgz\",\n+ \"integrity\": \"sha512-RnIrLhrXCX5ow/E5/Mh2O4e/oa1/jW0eaBKTSy3LaCj+M3Bqvm97GWDp2yUtzIs4LEn65zR2yiYGFqb2ApnzDA==\",\n+ \"dev\": true\n+ },\n+ \"regjsparser\": {\n+ \"version\": \"0.6.0\",\n+ \"resolved\": \"https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.0.tgz\",\n+ \"integrity\": \"sha512-RQ7YyokLiQBomUJuUG8iGVvkgOLxwyZM8k6d3q5SAXpg4r5TZJZigKFvC6PpD+qQ98bCDC5YelPeA3EucDoNeQ==\",\n+ \"dev\": true,\n+ \"requires\": {\n+ \"jsesc\": \"~0.5.0\"\n+ }\n+ }\n}\n},\n\"@babel/plugin-transform-new-target\": {\n}\n},\n\"@babel/plugin-transform-runtime\": {\n- \"version\": \"7.6.0\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.6.0.tgz\",\n- \"integrity\": \"sha512-Da8tMf7uClzwUm/pnJ1S93m/aRXmoYNDD7TkHua8xBDdaAs54uZpTWvEt6NGwmoVMb9mZbntfTqmG2oSzN/7Vg==\",\n+ \"version\": \"7.6.2\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.6.2.tgz\",\n+ \"integrity\": \"sha512-cqULw/QB4yl73cS5Y0TZlQSjDvNkzDbu0FurTZyHlJpWE5T3PCMdnyV+xXoH1opr1ldyHODe3QAX3OMAii5NxA==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/helper-module-imports\": \"^7.0.0\",\n}\n},\n\"@babel/plugin-transform-spread\": {\n- \"version\": \"7.2.2\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.2.tgz\",\n- \"integrity\": \"sha512-KWfky/58vubwtS0hLqEnrWJjsMGaOeSBn90Ezn5Jeg9Z8KKHmELbP1yGylMlm5N6TPKeY9A2+UaSYLdxahg01w==\",\n+ \"version\": \"7.6.2\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.6.2.tgz\",\n+ \"integrity\": \"sha512-DpSvPFryKdK1x+EDJYCy28nmAaIMdxmhot62jAXF/o99iA33Zj2Lmcp3vDmz+MUh0LNYVPvfj5iC3feb3/+PFg==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/helper-plugin-utils\": \"^7.0.0\"\n}\n},\n\"@babel/plugin-transform-unicode-regex\": {\n- \"version\": \"7.4.4\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.4.4.tgz\",\n- \"integrity\": \"sha512-il+/XdNw01i93+M9J9u4T7/e/Ue/vWfNZE4IRUQjplu2Mqb/AFTDimkw2tdEdSH50wuQXZAbXSql0UphQke+vA==\",\n+ \"version\": \"7.6.2\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.6.2.tgz\",\n+ \"integrity\": \"sha512-orZI6cWlR3nk2YmYdb0gImrgCUwb5cBUwjf6Ks6dvNVvXERkwtJWOQaEOjPiu0Gu1Tq6Yq/hruCZZOOi9F34Dw==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/helper-plugin-utils\": \"^7.0.0\",\n\"@babel/helper-regex\": \"^7.4.4\",\n- \"regexpu-core\": \"^4.5.4\"\n+ \"regexpu-core\": \"^4.6.0\"\n},\n\"dependencies\": {\n\"regexpu-core\": {\n- \"version\": \"4.5.5\",\n- \"resolved\": \"https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.5.5.tgz\",\n- \"integrity\": \"sha512-FpI67+ky9J+cDizQUJlIlNZFKual/lUkFr1AG6zOCpwZ9cLrg8UUVakyUQJD7fCDIe9Z2nwTQJNPyonatNmDFQ==\",\n+ \"version\": \"4.6.0\",\n+ \"resolved\": \"https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.6.0.tgz\",\n+ \"integrity\": \"sha512-YlVaefl8P5BnFYOITTNzDvan1ulLOiXJzCNZxduTIosN17b87h3bvG9yHMoHaRuo88H4mQ06Aodj5VtYGGGiTg==\",\n\"dev\": true,\n\"requires\": {\n\"regenerate\": \"^1.4.0\",\n}\n},\n\"@babel/preset-env\": {\n- \"version\": \"7.6.0\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.6.0.tgz\",\n- \"integrity\": \"sha512-1efzxFv/TcPsNXlRhMzRnkBFMeIqBBgzwmZwlFDw5Ubj0AGLeufxugirwZmkkX/ayi3owsSqoQ4fw8LkfK9SYg==\",\n+ \"version\": \"7.6.2\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.6.2.tgz\",\n+ \"integrity\": \"sha512-Ru7+mfzy9M1/YTEtlDS8CD45jd22ngb9tXnn64DvQK3ooyqSw9K4K9DUWmYknTTVk4TqygL9dqCrZgm1HMea/Q==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/helper-module-imports\": \"^7.0.0\",\n\"@babel/plugin-proposal-async-generator-functions\": \"^7.2.0\",\n\"@babel/plugin-proposal-dynamic-import\": \"^7.5.0\",\n\"@babel/plugin-proposal-json-strings\": \"^7.2.0\",\n- \"@babel/plugin-proposal-object-rest-spread\": \"^7.5.5\",\n+ \"@babel/plugin-proposal-object-rest-spread\": \"^7.6.2\",\n\"@babel/plugin-proposal-optional-catch-binding\": \"^7.2.0\",\n- \"@babel/plugin-proposal-unicode-property-regex\": \"^7.4.4\",\n+ \"@babel/plugin-proposal-unicode-property-regex\": \"^7.6.2\",\n\"@babel/plugin-syntax-async-generators\": \"^7.2.0\",\n\"@babel/plugin-syntax-dynamic-import\": \"^7.2.0\",\n\"@babel/plugin-syntax-json-strings\": \"^7.2.0\",\n\"@babel/plugin-transform-arrow-functions\": \"^7.2.0\",\n\"@babel/plugin-transform-async-to-generator\": \"^7.5.0\",\n\"@babel/plugin-transform-block-scoped-functions\": \"^7.2.0\",\n- \"@babel/plugin-transform-block-scoping\": \"^7.6.0\",\n+ \"@babel/plugin-transform-block-scoping\": \"^7.6.2\",\n\"@babel/plugin-transform-classes\": \"^7.5.5\",\n\"@babel/plugin-transform-computed-properties\": \"^7.2.0\",\n\"@babel/plugin-transform-destructuring\": \"^7.6.0\",\n- \"@babel/plugin-transform-dotall-regex\": \"^7.4.4\",\n+ \"@babel/plugin-transform-dotall-regex\": \"^7.6.2\",\n\"@babel/plugin-transform-duplicate-keys\": \"^7.5.0\",\n\"@babel/plugin-transform-exponentiation-operator\": \"^7.2.0\",\n\"@babel/plugin-transform-for-of\": \"^7.4.4\",\n\"@babel/plugin-transform-modules-commonjs\": \"^7.6.0\",\n\"@babel/plugin-transform-modules-systemjs\": \"^7.5.0\",\n\"@babel/plugin-transform-modules-umd\": \"^7.2.0\",\n- \"@babel/plugin-transform-named-capturing-groups-regex\": \"^7.6.0\",\n+ \"@babel/plugin-transform-named-capturing-groups-regex\": \"^7.6.2\",\n\"@babel/plugin-transform-new-target\": \"^7.4.4\",\n\"@babel/plugin-transform-object-super\": \"^7.5.5\",\n\"@babel/plugin-transform-parameters\": \"^7.4.4\",\n\"@babel/plugin-transform-regenerator\": \"^7.4.5\",\n\"@babel/plugin-transform-reserved-words\": \"^7.2.0\",\n\"@babel/plugin-transform-shorthand-properties\": \"^7.2.0\",\n- \"@babel/plugin-transform-spread\": \"^7.2.0\",\n+ \"@babel/plugin-transform-spread\": \"^7.6.2\",\n\"@babel/plugin-transform-sticky-regex\": \"^7.2.0\",\n\"@babel/plugin-transform-template-literals\": \"^7.4.4\",\n\"@babel/plugin-transform-typeof-symbol\": \"^7.2.0\",\n- \"@babel/plugin-transform-unicode-regex\": \"^7.4.4\",\n+ \"@babel/plugin-transform-unicode-regex\": \"^7.6.2\",\n\"@babel/types\": \"^7.6.0\",\n\"browserslist\": \"^4.6.0\",\n\"core-js-compat\": \"^3.1.1\",\n\"dev\": true\n},\n\"@fortawesome/fontawesome-free\": {\n- \"version\": \"5.11.1\",\n- \"resolved\": \"https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.11.1.tgz\",\n- \"integrity\": \"sha512-DtXLVYAkDU0ce1cFUgLvZaMd1R2J/LviBYih9xr4ZLhQMrgvYX7w2vOxlpKLRALfIj5GyC5zoVrcACOkLcFgvg==\",\n+ \"version\": \"5.11.2\",\n+ \"resolved\": \"https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.11.2.tgz\",\n+ \"integrity\": \"sha512-XiUPoS79r1G7PcpnNtq85TJ7inJWe0v+b5oZJZKb0pGHNIV6+UiNeQWiFGmuQ0aj7GEhnD/v9iqxIsjuRKtEnQ==\",\n\"dev\": true\n},\n\"@hapi/address\": {\n}\n},\n\"luxon\": {\n- \"version\": \"1.18.0\",\n- \"resolved\": \"https://registry.npmjs.org/luxon/-/luxon-1.18.0.tgz\",\n- \"integrity\": \"sha512-PDaY57G9k1yN46IRdt7M6I55yGd9NFBQYFvNsxLdOtapMfujJICPNdOIvCtYIq67W8hLdK3Zy8HJps+RRbIoAA==\"\n+ \"version\": \"1.19.3\",\n+ \"resolved\": \"https://registry.npmjs.org/luxon/-/luxon-1.19.3.tgz\",\n+ \"integrity\": \"sha512-YwTDjGRQC0QC9Iya2g2eKZfgEFqRId4ZoLHORQcfTMB/5xrTx427V7ZPjQJ1vzvhA2vJfG2bh1Kv8V8IFMWCUA==\"\n},\n\"make-dir\": {\n\"version\": \"1.3.0\",\n\"integrity\": \"sha512-8t6074A68gHfU8Neftl0Le6KTDwfGAj7IyjPIMSfikI2wJUTHDMaIq42bUsfVnj8mhx0R+45rdUXHGpN164avA==\",\n\"dev\": true\n},\n- \"regexp-tree\": {\n- \"version\": \"0.1.13\",\n- \"resolved\": \"https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.13.tgz\",\n- \"integrity\": \"sha512-hwdV/GQY5F8ReLZWO+W1SRoN5YfpOKY6852+tBFcma72DKBIcHjPRIlIvQN35bCOljuAfP2G2iB0FC/w236mUw==\",\n- \"dev\": true\n- },\n\"regexpp\": {\n\"version\": \"2.0.1\",\n\"resolved\": \"https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz\",\n}\n},\n\"sortablejs\": {\n- \"version\": \"1.9.0\",\n- \"resolved\": \"https://registry.npmjs.org/sortablejs/-/sortablejs-1.9.0.tgz\",\n- \"integrity\": \"sha512-Ot6bYJ6PoqPmpsqQYXjn1+RKrY2NWQvQt/o4jfd/UYwVWndyO5EPO8YHbnm5HIykf8ENsm4JUrdAvolPT86yYA==\"\n+ \"version\": \"1.10.0\",\n+ \"resolved\": \"https://registry.npmjs.org/sortablejs/-/sortablejs-1.10.0.tgz\",\n+ \"integrity\": \"sha512-+e0YakK1BxgEZpf9l9UiFaiQ8ZOBn1p/4qkkXr8QDVmYyCrUDTyDRRGm0AgW4E4cD0wtgxJ6yzIRkSPUwqhuhg==\"\n},\n\"source-list-map\": {\n\"version\": \"2.0.1\",\n}\n},\n\"stylelint-scss\": {\n- \"version\": \"3.11.0\",\n- \"resolved\": \"https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-3.11.0.tgz\",\n- \"integrity\": \"sha512-2rA9hV8+ebvzGyRBQt/KCLDS1o11SEVRzOBlhAbqk4u1PVnWcjUhRhKIGGGWcyM4QE9t+YWivbnq6kjdeHg2Nw==\",\n+ \"version\": \"3.11.1\",\n+ \"resolved\": \"https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-3.11.1.tgz\",\n+ \"integrity\": \"sha512-0FZNSfy5X2Or4VRA3Abwfrw1NHrI6jHT8ji9xSwP8Re2Kno0i90qbHwm8ohPO0kRB1RP9x1vCYBh4Tij+SZjIg==\",\n\"requires\": {\n\"lodash\": \"^4.17.15\",\n\"postcss-media-query-parser\": \"^0.2.3\",\n}\n},\n\"terser\": {\n- \"version\": \"4.3.1\",\n- \"resolved\": \"https://registry.npmjs.org/terser/-/terser-4.3.1.tgz\",\n- \"integrity\": \"sha1-CYILyzOYKZxLSNmoau/GUSfQ7WU=\",\n+ \"version\": \"4.3.3\",\n+ \"resolved\": \"https://registry.npmjs.org/terser/-/terser-4.3.3.tgz\",\n+ \"integrity\": \"sha512-Nzr7dpRjSzMEUS+z2UYQBtzE0LDm5k0Yy8RgLRPy85QUo1TjU5lIOBwzS5/FVAMaVyHZ3WTTU2BuQcMn8KXnNQ==\",\n\"requires\": {\n\"commander\": \"^2.20.0\",\n\"source-map\": \"~0.6.1\",\n\"commander\": {\n\"version\": \"2.20.0\",\n\"resolved\": \"https://registry.npmjs.org/commander/-/commander-2.20.0.tgz\",\n- \"integrity\": \"sha1-1YuytcHuj4ew00ACfp6U4iLFpCI=\"\n+ \"integrity\": \"sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==\"\n}\n}\n},\n}\n},\n\"vuedraggable\": {\n- \"version\": \"2.23.0\",\n- \"resolved\": \"https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.23.0.tgz\",\n- \"integrity\": \"sha512-RgdH16k43WNoxyRcv/OarB/DZh9SY5TYthk9TS4YiHXpelD1DytEG0phLAXiXx5EhsmdH8ltSWxklGa4g1WTCw==\",\n+ \"version\": \"2.23.1\",\n+ \"resolved\": \"https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.23.1.tgz\",\n+ \"integrity\": \"sha512-YgWnG7RC/V+nPksueT9cUGzvj7gBYqpEomazuAK5bBcImuPAeLsq0hwE5kSGItbHQpVnYdT/QX1kRR1XsjNeqw==\",\n\"requires\": {\n- \"sortablejs\": \"^1.9.0\"\n+ \"sortablejs\": \"^1.10.0\"\n}\n},\n\"vuex\": {\n"
},
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "\"dropzone\": \"^5.5.1\",\n\"flagpack\": \"^1.0.4\",\n\"jquery\": \"^3.4.1\",\n- \"luxon\": \"^1.18.0\",\n+ \"luxon\": \"^1.19.3\",\n\"no-scroll\": \"^2.1.1\",\n\"popper.js\": \"^1.15.0\",\n\"register-service-worker\": \"^1.6.2\",\n\"selectize\": \"^0.12.6\",\n\"simplemde\": \"^1.11.2\",\n\"stylelint-config-recommended-scss\": \"^3.3.0\",\n- \"stylelint-scss\": \"^3.11.0\",\n- \"terser\": \"^4.3.1\",\n+ \"stylelint-scss\": \"^3.11.1\",\n+ \"terser\": \"^4.3.3\",\n\"tinycolor2\": \"^1.4.1\",\n\"vue\": \"^2.6.10\",\n\"vue-flatpickr-component\": \"^8.1.3\",\n\"vue-multiselect\": \"^2.1.6\",\n\"vue-simplemde\": \"^1.0.0\",\n\"vue-trumbowyg\": \"^3.4.2\",\n- \"vuedraggable\": \"^2.23.0\",\n+ \"vuedraggable\": \"^2.23.1\",\n\"vuex\": \"^3.1.1\",\n\"zxcvbn\": \"^4.4.2\"\n},\n\"devDependencies\": {\n- \"@babel/core\": \"^7.6.0\",\n+ \"@babel/core\": \"^7.6.2\",\n\"@babel/plugin-transform-regenerator\": \"^7.4.5\",\n- \"@babel/plugin-transform-runtime\": \"^7.6.0\",\n+ \"@babel/plugin-transform-runtime\": \"^7.6.2\",\n\"@babel/polyfill\": \"^7.6.0\",\n- \"@babel/preset-env\": \"^7.6.0\",\n- \"@fortawesome/fontawesome-free\": \"^5.11.1\",\n+ \"@babel/preset-env\": \"^7.6.2\",\n+ \"@fortawesome/fontawesome-free\": \"^5.11.2\",\n\"@symfony/webpack-encore\": \"^0.28.0\",\n\"@vue/test-utils\": \"^1.0.0-beta.29\",\n\"ajv-keywords\": \"^3.4.1\",\n"
},
{
"change_type": "MODIFY",
"old_path": "phpunit.xml.dist",
"new_path": "phpunit.xml.dist",
"diff": "<!-- ###+ doctrine/doctrine-bundle ### -->\n<env name=\"DATABASE_URL\" value=\"sqlite::memory:\" force=\"true\"/>\n<!-- ###- doctrine/doctrine-bundle ### -->\n-\n- <!-- ###+ symfony/swiftmailer-bundle ### -->\n- <env name=\"MAILER_URL\" value=\"null://localhost\"/>\n- <!-- ###- symfony/swiftmailer-bundle ### -->\n-\n<!-- ###+ nelmio/cors-bundle ### -->\n<env name=\"CORS_ALLOW_ORIGIN\" value=\"^https?://localhost(:[0-9]+)?$\"/>\n<!-- ###- nelmio/cors-bundle ### -->\n<!-- ###+ php-translation/loco-adapter ### -->\n<env name=\"LOCO_PROJECT_API_KEY\" value=\"\"/>\n<!-- ###- php-translation/loco-adapter ### -->\n+\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</php>\n<testsuites>\n"
},
{
"change_type": "MODIFY",
"old_path": "symfony.lock",
"new_path": "symfony.lock",
"diff": "\"version\": \"1.0.0\"\n},\n\"egulias/email-validator\": {\n- \"version\": \"2.1.2\"\n+ \"version\": \"2.1.11\"\n},\n\"embed/embed\": {\n\"version\": \"v3.3.9\"\n}\n},\n\"swiftmailer/swiftmailer\": {\n- \"version\": \"v6.0.2\"\n+ \"version\": \"v6.2.1\"\n},\n\"symfony/apache-pack\": {\n\"version\": \"1.0\",\n\"version\": \"v1.8.0\"\n},\n\"symfony/polyfill-iconv\": {\n- \"version\": \"v1.10.0\"\n+ \"version\": \"v1.12.0\"\n},\n\"symfony/polyfill-intl-icu\": {\n\"version\": \"v1.6.0\"\n\"repo\": \"github.com/symfony/recipes\",\n\"branch\": \"master\",\n\"version\": \"2.5\",\n- \"ref\": \"8daf8ede72274989fb0dc66b83cb4bc1693afbb9\"\n- }\n+ \"ref\": \"429afc6c6778a1fdddb52a4f708cd94ff2c9960f\"\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"
}
] |
PHP
|
MIT License
|
bolt/core
|
Spring cleaning: composer and npm updates
|
95,144 |
28.09.2019 17:29:51
| -7,200 |
8236e7b331be8e6f28b6d7742f443c860af517dc
|
Making `type: select` fields work with selecting from a ContentType.
|
[
{
"change_type": "MODIFY",
"old_path": "config/bolt/config.yaml",
"new_path": "config/bolt/config.yaml",
"diff": "@@ -114,6 +114,10 @@ listing_template: listing.twig\nlisting_records: 6\nlisting_sort: datepublish DESC\n+# Maximum amount of items to show in a `<select>` for picking a record. For\n+# example in `type: select`.\n+maximum_listing_select: 1000\n+\n# Because of limitations on how the underlying database queries work, there are\n# only two options for sorting on taxonomies. ASC for roughly \"oldest first\"\n# and DESC for roughly newest first.\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/RecordExtension.php",
"new_path": "src/Twig/RecordExtension.php",
"diff": "@@ -4,8 +4,11 @@ declare(strict_types=1);\nnamespace Bolt\\Twig;\n+use Bolt\\Configuration\\Config;\n+use Bolt\\Configuration\\Content\\ContentType;\nuse Bolt\\Entity\\Content;\nuse Bolt\\Entity\\Field;\n+use Bolt\\Repository\\ContentRepository;\nuse Bolt\\Repository\\TaxonomyRepository;\nuse Doctrine\\Common\\Collections\\Collection;\nuse Pagerfanta\\Pagerfanta;\n@@ -23,16 +26,24 @@ use Twig\\TwigFunction;\n*/\nclass RecordExtension extends AbstractExtension\n{\n+ /** @var ContentRepository */\n+ private $contentRepository;\n+\n/** @var TaxonomyRepository */\nprivate $taxonomyRepository;\n/** @var Request */\nprivate $request;\n- public function __construct(TaxonomyRepository $taxonomyRepository, RequestStack $requestStack)\n+ /** @var Config */\n+ private $config;\n+\n+ public function __construct(ContentRepository $contentRepository, TaxonomyRepository $taxonomyRepository, RequestStack $requestStack, Config $config)\n{\n+ $this->contentRepository = $contentRepository;\n$this->taxonomyRepository = $taxonomyRepository;\n$this->request = $requestStack->getCurrentRequest();\n+ $this->config = $config;\n}\n/**\n@@ -46,7 +57,7 @@ class RecordExtension extends AbstractExtension\nreturn [\nnew TwigFunction('list_templates', [$this, 'getListTemplates']),\nnew TwigFunction('pager', [$this, 'pager'], $env + $safe),\n- new TwigFunction('selectoptionsfromarray', [$this, 'selectoptionsfromarray']),\n+ new TwigFunction('selectOptions', [$this, 'selectOptions']),\nnew TwigFunction('taxonomyoptions', [$this, 'taxonomyoptions']),\nnew TwigFunction('taxonomyvalues', [$this, 'taxonomyvalues']),\nnew TwigFunction('icon', [$this, 'icon'], $safe),\n@@ -82,7 +93,21 @@ class RecordExtension extends AbstractExtension\nreturn \"<i class='fas mr-2 fa-${icon}'></i>\";\n}\n- public function selectoptionsfromarray(Field $field): LaravelCollection\n+ public function selectOptions(Field $field): LaravelCollection\n+ {\n+ $values = $field->getDefinition()->get('values');\n+\n+\n+ if (is_array($values)) {\n+ return $this->selectOptionsArray($field);\n+ } else {\n+ return $this->selectOptionsContentType($field);\n+ }\n+\n+\n+ }\n+\n+ private function selectOptionsArray(Field $field): LaravelCollection\n{\n$values = $field->getDefinition()->get('values');\n$currentValues = $field->getValue();\n@@ -112,6 +137,54 @@ class RecordExtension extends AbstractExtension\nreturn new LaravelCollection($options);\n}\n+ private function selectOptionsContentType(Field $field): LaravelCollection\n+ {\n+ [ $contentTypeSlug, $fieldNames ] = explode('/', $field->getDefinition()->get('values'));\n+\n+ // @todo Actually do something with these, instead of using a default.\n+ $fieldNames = explode(',', $fieldNames);\n+\n+ $currentValues = $field->getValue();\n+\n+ $options = [];\n+\n+ if ($field->getDefinition()->get('required', false)) {\n+ $options[] = [\n+ 'key' => '',\n+ 'value' => '',\n+ 'selected' => false,\n+ ];\n+ }\n+\n+ $contentType = ContentType::factory($contentTypeSlug, $this->config->get('contenttypes'));\n+\n+ $maxAmount = $this->config->get('maximum_listing_select', 1000);\n+\n+ /** @var Content[] $records */\n+ $records = $this->contentRepository->findForListing(1, $maxAmount, $contentType);\n+\n+ foreach ($records as $record) {\n+ $options[] = [\n+ 'key' => $record->getId(),\n+ 'value' => sprintf('%s. %s (%s)', $record->getId(), $record->getExtras()['title'], $record->getStatus()),\n+ 'selected' => in_array($record->getId(), $currentValues, true),\n+ ];\n+ }\n+\n+ return new LaravelCollection($options);\n+\n+ foreach ($values as $key => $value) {\n+ $options[] = [\n+ 'key' => $key,\n+ 'value' => $value,\n+ 'selected' => in_array($key, $currentValues, true),\n+ ];\n+ }\n+\n+ return new LaravelCollection($options);\n+ }\n+\n+\npublic function taxonomyoptions($taxonomy): LaravelCollection\n{\n$options = [];\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/_partials/fields/select.html.twig",
"new_path": "templates/_partials/fields/select.html.twig",
"diff": "#}\n{% if options is not defined %}\n- {% set options = selectoptionsfromarray(field) %}\n+ {% set options = selectOptions(field) %}\n{% endif %}\n{% set multiple = field.definition.get('multiple')|default ? 'true' : 'false' %}\n"
},
{
"change_type": "MODIFY",
"old_path": "translations/messages.en.xlf",
"new_path": "translations/messages.en.xlf",
"diff": "<target>Zoom-level of crop, range 1-10. </target>\n</segment>\n</unit>\n+ <unit id=\"n.3JZvX\" name=\"title.contentType\">\n+ <segment>\n+ <source>title.contentType</source>\n+ <target>Content Type</target>\n+ </segment>\n+ </unit>\n</file>\n</xliff>\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Making `type: select` fields work with selecting from a ContentType.
|
95,144 |
29.09.2019 08:42:37
| -7,200 |
04b51674e690364d52b3a9f3c6f085f305e061ac
|
fix `is_iterable`
|
[
{
"change_type": "MODIFY",
"old_path": "src/Twig/RecordExtension.php",
"new_path": "src/Twig/RecordExtension.php",
"diff": "@@ -97,7 +97,7 @@ class RecordExtension extends AbstractExtension\n{\n$values = $field->getDefinition()->get('values');\n- if (is_array($values)) {\n+ if (is_iterable($values)) {\nreturn $this->selectOptionsArray($field);\n}\nreturn $this->selectOptionsContentType($field);\n@@ -135,6 +135,7 @@ class RecordExtension extends AbstractExtension\nprivate function selectOptionsContentType(Field $field): LaravelCollection\n{\n+ dump($field->getDefinition()->get('values'));\n[ $contentTypeSlug, $fieldNames ] = explode('/', $field->getDefinition()->get('values'));\n// @todo Actually do something with these, instead of using a default.\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
fix `is_iterable`
|
95,144 |
29.09.2019 12:48:18
| -7,200 |
3731a8ef97ce5e1f58f29bdf0d32653edf013a03
|
[chore] Typehinting and minor cleanup in TwigExtensions
|
[
{
"change_type": "MODIFY",
"old_path": "src/Twig/ArrayExtension.php",
"new_path": "src/Twig/ArrayExtension.php",
"diff": "@@ -19,7 +19,7 @@ final class ArrayExtension extends AbstractExtension\n/**\n* {@inheritdoc}\n*/\n- public function getFunctions()\n+ public function getFunctions(): array\n{\n$safe = ['is_safe' => ['html']];\n@@ -31,7 +31,7 @@ final class ArrayExtension extends AbstractExtension\n/**\n* {@inheritdoc}\n*/\n- public function getFilters()\n+ public function getFilters(): array\n{\nreturn [\nnew TwigFilter('order', [$this, 'order']),\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/ContentExtension.php",
"new_path": "src/Twig/ContentExtension.php",
"diff": "@@ -40,7 +40,7 @@ class ContentExtension extends AbstractExtension\n/**\n* {@inheritdoc}\n*/\n- public function getFilters()\n+ public function getFilters(): array\n{\n$safe = ['is_safe' => ['html']];\n@@ -59,7 +59,7 @@ class ContentExtension extends AbstractExtension\n/**\n* {@inheritdoc}\n*/\n- public function getFunctions()\n+ public function getFunctions(): array\n{\n$safe = ['is_safe' => ['html']];\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/FrontendMenuExtension.php",
"new_path": "src/Twig/FrontendMenuExtension.php",
"diff": "@@ -29,11 +29,11 @@ class FrontendMenuExtension extends AbstractExtension\nreturn [\nnew TwigFunction('menu', [$this, 'renderMenu'], $env + $safe),\n- new TwigFunction('menu_array', [$this, 'getMenu'], $env + $safe),\n+ new TwigFunction('menu_array', [$this, 'getMenu'], $safe),\n];\n}\n- public function getMenu(Environment $twig, ?string $name = null): array\n+ public function getMenu(?string $name = null): array\n{\nreturn $this->menuBuilder->buildMenu($name);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/ImageExtension.php",
"new_path": "src/Twig/ImageExtension.php",
"diff": "@@ -94,6 +94,9 @@ class ImageExtension extends AbstractExtension\nreturn sprintf('<img src=\"%s\" alt=\"%s\" %s %s>', $link, $alt, (string) $width, (string) $height);\n}\n+ /**\n+ * @param ImageField|array|string $image\n+ */\npublic function thumbnail($image, int $width = 320, int $height = 240, ?string $location = null, ?string $path = null, ?string $fit = null)\n{\n$filename = $this->getFilename($image);\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/JsonExtension.php",
"new_path": "src/Twig/JsonExtension.php",
"diff": "@@ -38,6 +38,9 @@ class JsonExtension extends AbstractExtension\nreturn Json::json_encode($this->normalizeRecords($records));\n}\n+ /**\n+ * @param Content|array|\\Traversable $records\n+ */\npublic function normalizeRecords($records): array\n{\nif ($records instanceof Content) {\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/RelatedExtension.php",
"new_path": "src/Twig/RelatedExtension.php",
"diff": "@@ -37,7 +37,7 @@ class RelatedExtension extends AbstractExtension\n/**\n* {@inheritdoc}\n*/\n- public function getFilters()\n+ public function getFilters(): array\n{\nreturn [\nnew TwigFilter('related', [$this, 'getRelatedContent']),\n@@ -51,7 +51,7 @@ class RelatedExtension extends AbstractExtension\n/**\n* {@inheritdoc}\n*/\n- public function getFunctions()\n+ public function getFunctions(): array\n{\nreturn [\nnew TwigFunction('related_content', [$this, 'getRelatedContent']),\n@@ -123,7 +123,7 @@ class RelatedExtension extends AbstractExtension\nreturn null;\n}\n- public function getRelatedOptions(Content $source, string $contentType)\n+ public function getRelatedOptions(string $contentType): Collection\n{\n$contentType = ContentType::factory($contentType, $this->config->get('contenttypes'));\n$content = $this->contentRepository->findForListing(1, 1000, $contentType, false);\n@@ -146,7 +146,7 @@ class RelatedExtension extends AbstractExtension\nreturn new Collection($options);\n}\n- public function getRelatedValues(Content $source, string $contentType)\n+ public function getRelatedValues(Content $source, string $contentType): Collection\n{\nif ($source->getId() === null) {\nreturn new Collection([]);\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/SetcontentExtension.php",
"new_path": "src/Twig/SetcontentExtension.php",
"diff": "@@ -26,7 +26,7 @@ class SetcontentExtension extends AbstractExtension\n/**\n* {@inheritdoc}\n*/\n- public function getTokenParsers()\n+ public function getTokenParsers(): array\n{\nreturn [\nnew SetcontentTokenParser(),\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/TextExtension.php",
"new_path": "src/Twig/TextExtension.php",
"diff": "@@ -16,7 +16,7 @@ class TextExtension extends AbstractExtension\n/**\n* {@inheritdoc}\n*/\n- public function getFilters()\n+ public function getFilters(): array\n{\nreturn [\nnew TwigFilter('safestring', [$this, 'safeString']),\n@@ -25,7 +25,7 @@ class TextExtension extends AbstractExtension\n];\n}\n- public function safeString($str, $strict = false, $extrachars = '')\n+ public function safeString($str, $strict = false, $extrachars = ''): string\n{\nreturn Str::makeSafe($str, $strict, $extrachars);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/TranslatableExtension.php",
"new_path": "src/Twig/TranslatableExtension.php",
"diff": "@@ -43,7 +43,7 @@ class TranslatableExtension extends AbstractExtension\n];\n}\n- public function findTranslations(Translatable $entity, ?string $locale = null)\n+ public function findTranslations(Translatable $entity, ?string $locale = null): array\n{\n$translations = $this->translationRepository->findTranslations($entity);\nif ($locale) {\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/UserExtension.php",
"new_path": "src/Twig/UserExtension.php",
"diff": "@@ -15,7 +15,7 @@ class UserExtension extends AbstractExtension\n/**\n* {@inheritdoc}\n*/\n- public function getFunctions()\n+ public function getFunctions(): array\n{\nreturn [\nnew TwigFunction('getuser', [$this, 'dummy']),\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/content/_relationships.html.twig",
"new_path": "templates/content/_relationships.html.twig",
"diff": "{% for contentType, relation in record.definition.relations %}\n- {% set options = record|related_options(contentType) %}\n+ {% set options = related_options(contentType) %}\n{% set value = record|related_values(contentType) %}\n<div class=\"form-group editor--group is-normal\">\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
[chore] Typehinting and minor cleanup in TwigExtensions
|
95,144 |
30.09.2019 16:55:07
| -7,200 |
40a2125570c8154234c0f9b8743c575c2274da48
|
Add `type: templateselect` field
|
[
{
"change_type": "ADD",
"old_path": null,
"new_path": "public/theme/skeleton/custom/setcontent_1.twig",
"diff": "+{% extends 'partials/_master.twig' %}\n+\n+{% block main %}\n+\n+ <h1>One </h1>\n+ {% setcontent entries = \"entries/latest/4\" %}\n+ {{ dump(entries) }}\n+ {% for entry in entries %}\n+ <li>{{ entry.contenttype }} {{ entry.id }} . {{ entry|title }}</li>\n+ {% endfor %}\n+\n+ <h1>Two </h1>\n+ {% setcontent pages = \"pages\" %}\n+ {{ dump(pages) }}\n+ {% for page in pages %}\n+ <li>{{ page.contenttype }} {{ page.id }} . {{ page|title }}</li>\n+ {% endfor %}\n+\n+ {# If there are more records than will fit on one page, the pager is shown. #}\n+ {{ pager(pages, template = 'partials/_sub_pager.twig') }}\n+\n+ <h1>Three </h1>\n+ {% setcontent pagethis = \"entries\" where {'id': 31} returnsingle %}\n+ {{ dump(pagethis) }}\n+\n+{% endblock main %}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/DataFixtures/ContentFixtures.php",
"new_path": "src/DataFixtures/ContentFixtures.php",
"diff": "@@ -173,6 +173,12 @@ class ContentFixtures extends BaseFixture implements DependentFixtureInterface,\ncase 'text':\n$data = [$this->faker->sentence(6, true)];\nbreak;\n+ case 'email':\n+ $data = [$this->faker->email()];\n+ break;\n+ case 'templateselect':\n+ $data = [];\n+ break;\ndefault:\n$data = [$this->faker->sentence(6, true)];\n}\n@@ -212,6 +218,17 @@ class ContentFixtures extends BaseFixture implements DependentFixtureInterface,\n'text_sanitised' => 'Text field with <strong>markup</strong>, including <script>console.log(\\'hoi\\')</script>. The end.',\n];\n+ // Only add this fixture if the file exists: It does in the \"Git Clone\", but not in the\n+ // \"Composer create-project\".\n+ $file = dirname(dirname(__DIR__)) . '/public/theme/skeleton/custom/setcontent_1.twig';\n+ if (file_exists($file)) {\n+ $records['pages'][] = [\n+ 'heading' => 'Setcontent test page',\n+ 'slug' => 'Setcontent test page',\n+ 'template' => 'custom/setcontent_1.twig',\n+ ];\n+ }\n+\nreturn $records;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Twig/RecordExtension.php",
"new_path": "src/Twig/RecordExtension.php",
"diff": "@@ -13,6 +13,7 @@ use Bolt\\Repository\\TaxonomyRepository;\nuse Bolt\\Utils\\Excerpt;\nuse Doctrine\\Common\\Collections\\Collection;\nuse Pagerfanta\\Pagerfanta;\n+use Symfony\\Component\\Finder\\Finder;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\RequestStack;\nuse Tightenco\\Collect\\Support\\Collection as LaravelCollection;\n@@ -59,17 +60,13 @@ class RecordExtension extends AbstractExtension\nnew TwigFunction('list_templates', [$this, 'getListTemplates']),\nnew TwigFunction('pager', [$this, 'pager'], $env + $safe),\nnew TwigFunction('selectOptions', [$this, 'selectOptions']),\n+ new TwigFunction('listTemplates', [$this, 'getListTemplates']),\nnew TwigFunction('taxonomyoptions', [$this, 'taxonomyoptions']),\nnew TwigFunction('taxonomyvalues', [$this, 'taxonomyvalues']),\nnew TwigFunction('icon', [$this, 'icon'], $safe),\n];\n}\n- public function getListTemplates(): string\n- {\n- return 'list_templates placeholder';\n- }\n-\npublic function pager(Environment $twig, Pagerfanta $records, string $template = 'helpers/_pager_basic.html.twig', string $class = 'pagination', int $surround = 3)\n{\n$context = [\n@@ -173,6 +170,47 @@ class RecordExtension extends AbstractExtension\nreturn new LaravelCollection($options);\n}\n+\n+ public function getListTemplates(Field $field): LaravelCollection\n+ {\n+ $definition = $field->getDefinition();\n+ $current = current($field->getValue());\n+\n+ $finder = new Finder();\n+ $finder\n+ ->files()\n+ ->in($this->config->getPath('theme'))\n+ ->name($definition->get('filter', '*.twig'))\n+ ->path($definition->get('path'));\n+\n+ $options = [[\n+ 'key' => '',\n+ 'value' => '(choose a template)',\n+ 'selected' => false,\n+ ]];\n+\n+ foreach ($finder as $file) {\n+ $options[] = [\n+ 'key' => $file->getRelativePathname(),\n+ 'value' => $file->getRelativePathname(),\n+ ];\n+\n+ if ($current == $file->getRelativePathname()) {\n+ $current = false;\n+ }\n+ }\n+\n+ if ($current !== false) {\n+ $options[] = [\n+ 'key' => $current,\n+ 'value' => $current . ' (file seems to be missing)',\n+ ];\n+ }\n+\n+ return new LaravelCollection($options);\n+ }\n+\n+\npublic function taxonomyoptions(LaravelCollection $taxonomy): LaravelCollection\n{\n$options = [];\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "templates/_partials/fields/templateselect.html.twig",
"diff": "+{% extends '@bolt/_partials/fields/_base.html.twig' %}\n+\n+{# On top of the attributes that get set/defined in `_base.html.twig`,\n+ The Select fields has three additional attributes:\n+\n+ - options: The actual options that are available in the select\n+ - multiple: A boolean to set whether or not we allow multiple selections\n+ - allowempty: A boolean to set whether or not we allow clearing the selection\n+ #}\n+\n+{% set options = listTemplates(field) %}\n+{% set multiple = 'false' %}\n+{% set allowempty = 'true' %}\n+\n+{% block field %}\n+ <editor-select\n+ :value=\"{{ field.value|json_encode }}\"\n+ :name='{{ name|json_encode }}'\n+ :id='{{ id|json_encode }}'\n+ :options=\"{{ options|json_encode }}\"\n+ :form='{{ form|json_encode }}'\n+ :multiple=\"{{ multiple }}\"\n+ :allowempty=\"{{ allowempty }}\"\n+ ></editor-select>\n+{% endblock %}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Add `type: templateselect` field
|
95,144 |
30.09.2019 19:51:09
| -7,200 |
daa894b5d6be765739e7380a164f74dbcdb33077
|
updating listing
|
[
{
"change_type": "MODIFY",
"old_path": "public/theme/skeleton/custom/setcontent_1.twig",
"new_path": "public/theme/skeleton/custom/setcontent_1.twig",
"diff": "{% extends 'partials/_master.twig' %}\n+{% macro isbigger(a, b) %}\n+ {% if a >= b %}== yes =={% else %}== no =={% endif %}\n+{% endmacro %}\n+\n+{% macro issmaller(a, b) %}\n+ {% if a <= b or (b == null) %}== yes =={% else %}== no =={% endif %}\n+{% endmacro %}\n+\n{% block main %}\n+ <section id=\"one\">\n<h1>One </h1>\n{% setcontent entries = \"entries/latest/4\" %}\n{{ dump(entries) }}\n{% for entry in entries %}\n- <li>{{ entry.contenttype }} {{ entry.id }} . {{ entry|title }}</li>\n+ <li>\n+ {{ entry.contenttype }} {{ entry.id }} . {{ entry|title }}\n+ <span class=\"s{{ loop.index }}\">{{ _self.issmaller(entry.id, last|default()) }}</span>\n+ </li>\n+ {% set last = entry.id %}\n{% endfor %}\n+ <section>\n+ {# If there are more records than will fit on one page, the pager is shown. #}\n+ {{ pager(entries, template = 'partials/_sub_pager.twig') }}\n+\n+ <section id=\"two\">\n<h1>Two </h1>\n{% setcontent pages = \"pages\" %}\n{{ dump(pages) }}\n{% for page in pages %}\n- <li>{{ page.contenttype }} {{ page.id }} . {{ page|title }}</li>\n+ <li>\n+ {{ page.contenttype }} {{ page.id }} . {{ page|title }}\n+ <span class=\"s{{ loop.index }}\">{{ _self.isbigger(page.id, last|default()) }}<span></span>\n+ </li>\n+ {% set last = page.id %}\n{% endfor %}\n+ </section>\n+\n{# If there are more records than will fit on one page, the pager is shown. #}\n{{ pager(pages, template = 'partials/_sub_pager.twig') }}\n+ <section id=\"three\">\n<h1>Three </h1>\n- {% setcontent pagethis = \"entries\" where {'id': 31} returnsingle %}\n- {{ dump(pagethis) }}\n+ {% setcontent pagetwo = \"pages\" where {'id': 2 } returnsingle %}\n+ <span class=\"s1\">{{ pagetwo.id }}</span>\n+ <span class=\"s2\">{{ pagetwo.status }}</span>\n+ {{ dump(pagetwo) }}\n+ </section>\n+\n+ <section id=\"four\">\n+ <h1>Four</h1>\n+ {% setcontent pages = \"pages\" orderby 'title' %}\n+ {{ dump(pages) }}\n+ {% for page in pages %}\n+ <li>\n+ {{ page.contenttype }} {{ page.id }} . {{ page|title }}\n+ <span class=\"s{{ loop.index }}\">{{ _self.isbigger(page.id, last|default()) }}<span></span>\n+ </li>\n+ {% set last = page.id %}\n+ {% endfor %}\n+ </section>\n{% endblock main %}\n"
},
{
"change_type": "MODIFY",
"old_path": "public/theme/skeleton/listing.twig",
"new_path": "public/theme/skeleton/listing.twig",
"diff": "{% block main %}\n- <h1>One </h1>\n- {% for page in records %}\n- <li>{{ page.id }} . {{ page|title }}</li>\n- {% endfor %}\n-\n- {# If there are more records than will fit on one page, the pager is shown. #}\n- {{ pager(records, template = 'partials/_sub_pager.twig') }}\n-\n-\n- <h1>Two </h1>\n- {% setcontent pages = \"pages\" %}\n- {{ dump(pages) }}\n- {% for page in pages %}\n- <li>{{ page.contenttype }} {{ page.id }} . {{ page|title }}</li>\n- {% endfor %}\n-\n- {# If there are more records than will fit on one page, the pager is shown. #}\n- {{ pager(pages, template = 'partials/_sub_pager.twig') }}\n-\n- <h1>Three </h1>\n- {% setcontent pagethis = \"entries\" where {'id': 31} returnsingle %}\n- {{ dump(pagethis) }}\n-\n- <h1>Four </h1>\n- {% setcontent entries = \"entries/latest/4\" %}\n- {{ dump(entries) }}\n- {% for page in pages %}\n- <li>{{ page.contenttype }} {{ page.id }} . {{ page|title }}</li>\n- {% endfor %}\n-\n-\n- {# {% for page in pages %}#}\n-{# <li>{{ pagethis.contenttype }} {{ pagethis.id }} . {{ pagethis|title }}</li>#}\n-{# {% endfor %}#}\n-\n-\n-\n{# This template is used for 'listings': Generic pages that list a number of\nrecords from a certain content type. These records are available as an array\ncalled 'records'. In the for-loop below, we iterate over the records that\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
updating listing
|
95,144 |
30.09.2019 21:12:13
| -7,200 |
b47700beed6b922f90b9a72bc29fd85fdf499c93
|
Working on setcontent
|
[
{
"change_type": "MODIFY",
"old_path": "config/bolt/contenttypes.yaml",
"new_path": "config/bolt/contenttypes.yaml",
"diff": "@@ -93,7 +93,7 @@ pages:\ntype: templateselect\nfilter: '*.twig'\ntaxonomy: [ groups ]\n-\n+ listing_records: 6\n# Entries can be used for things like 'news' or 'blogpostings'. They have a\n# 'teaser', which can be used for a short blurb on listing-pages, allowing\n"
},
{
"change_type": "MODIFY",
"old_path": "public/theme/skeleton/custom/setcontent_1.twig",
"new_path": "public/theme/skeleton/custom/setcontent_1.twig",
"diff": "<section id=\"one\">\n<h1>One</h1>\n- {% setcontent entries = \"entries/latest/4\" %}\n+ {% setcontent entries = \"entries/latest/4\" printquery %}\n{{ dump(entries) }}\n{% for entry in entries %}\n<li>\n<section id=\"two\">\n<h1>Two</h1>\n- {% setcontent pages = \"pages\" %}\n+ {% setcontent pages = \"pages\" limit 2 %}\n{{ dump(pages) }}\n{% for page in pages %}\n<li>\n<section id=\"four\">\n<h1>Four</h1>\n- {% setcontent pages = \"pages\" orderby 'title' %}\n- {{ dump(pages) }}\n+ {% setcontent pages = \"pages\" orderby 'heading' %}\n{% for page in pages %}\n<li>\n- {{ page.contenttype }} {{ page.id }} . {{ page|title }}\n- <span class=\"s{{ loop.index }}\">{{ _self.isbigger(page.id, last|default()) }}<span></span>\n+ {{ page.contenttype }} {{ page.id }} . {{ page.heading }}\n+ <span class=\"s{{ loop.index }}\">{{ _self.isbigger(page.heading, last|default()) }}<span></span>\n</li>\n- {% set last = page.id %}\n+ {% set last = page.heading %}\n{% endfor %}\n</section>\n+ <section id=\"five\">\n+ <h1>Five</h1>\n+ {% setcontent entries = \"entries\" limit \"3\" %}\n+ {% for entry in entries %}\n+ <li>\n+ {{ entry.contenttype }} {{ entry.id }} . {{ entry|title }}\n+ <span class=\"s{{ loop.index }}\">{{ _self.issmaller(entry.id, last|default()) }}</span>\n+ </li>\n+ {% set last = entry.id %}\n+ {% endfor %}\n+ <section>\n+\n+ <section id=\"six\">\n+ <h1>Six</h1>\n+ {% setcontent entries = \"entries\" where {'title': '%consequatur%' } printquery %}\n+ {{ dump(entries) }}\n+ {% for entry in entries %}\n+ <li>\n+ {{ entry.contenttype }} {{ entry.id }} . {{ entry|title }}\n+ <span class=\"s{{ loop.index }}\">{{ _self.issmaller(entry.id, last|default()) }}</span>\n+ </li>\n+ {% set last = entry.id %}\n+ {% endfor %}\n+ <section>\n+\n{% endblock main %}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Repository/ContentRepository.php",
"new_path": "src/Repository/ContentRepository.php",
"diff": "@@ -180,6 +180,7 @@ class ContentRepository extends ServiceEntityRepository\n}\n$qb->setMaxResults($amount);\n+\nreturn $qb->getQuery()->getResult();\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Storage/ContentQueryParser.php",
"new_path": "src/Storage/ContentQueryParser.php",
"diff": "@@ -9,11 +9,9 @@ use Bolt\\Events\\QueryEvent;\nuse Bolt\\Events\\QueryEvents;\nuse Bolt\\Repository\\ContentRepository;\nuse Bolt\\Storage\\Directive\\GetQueryDirective;\n-use Bolt\\Storage\\Directive\\HydrateDirective;\nuse Bolt\\Storage\\Directive\\LimitDirective;\nuse Bolt\\Storage\\Directive\\OffsetDirective;\nuse Bolt\\Storage\\Directive\\OrderDirective;\n-use Bolt\\Storage\\Directive\\PagingDirective;\nuse Bolt\\Storage\\Directive\\PrintQueryDirective;\nuse Bolt\\Storage\\Directive\\ReturnSingleDirective;\nuse Bolt\\Storage\\Handler\\FirstQueryHandler;\n@@ -92,11 +90,9 @@ class ContentQueryParser\n$this->addHandler('namedselect', new IdentifiedSelectHandler());\n$this->addDirectiveHandler('getquery', new GetQueryDirective());\n- $this->addDirectiveHandler('hydrate', new HydrateDirective());\n$this->addDirectiveHandler('limit', new LimitDirective());\n$this->addDirectiveHandler('order', new OrderDirective());\n$this->addDirectiveHandler('page', new OffsetDirective());\n- $this->addDirectiveHandler('paging', new PagingDirective());\n$this->addDirectiveHandler('printquery', new PrintQueryDirective());\n$this->addDirectiveHandler('returnsingle', new ReturnSingleDirective());\n}\n@@ -285,9 +281,9 @@ class ContentQueryParser\n/**\n* Returns a directive from the parsed list.\n*\n- * @param string $key\n+ * @param string|int|bool|null $key\n*/\n- public function getDirective($key): ?string\n+ public function getDirective($key)\n{\nif (array_key_exists($key, $this->directives)) {\nreturn $this->directives[$key];\n@@ -299,40 +295,33 @@ class ContentQueryParser\n/**\n* Sets a directive for the named key.\n*\n- * @param string $key\n- * @param string|bool $value\n+ * @param string|int|bool $value\n*/\n- public function setDirective($key, $value): void\n+ public function setDirective(string $key, $value): void\n{\n$this->directives[$key] = $value;\n}\n/**\n* Returns the handler for the named directive.\n- *\n- * @param string $check\n*/\n- public function getDirectiveHandler($check): callable\n+ public function getDirectiveHandler(string $key): callable\n{\n- return $this->directiveHandlers[$check];\n+ return $this->directiveHandlers[$key];\n}\n/**\n* Returns boolean for existence of handler.\n- *\n- * @param string $check\n*/\n- public function hasDirectiveHandler($check): bool\n+ public function hasDirectiveHandler(string $key): bool\n{\n- return array_key_exists($check, $this->directiveHandlers);\n+ return array_key_exists($key, $this->directiveHandlers);\n}\n/**\n* Adds a handler for the named directive.\n- *\n- * @param string $key\n*/\n- public function addDirectiveHandler($key, ?callable $callback = null): void\n+ public function addDirectiveHandler(string $key, ?callable $callback = null): void\n{\nif (! array_key_exists($key, $this->directiveHandlers)) {\n$this->directiveHandlers[$key] = $callback;\n@@ -341,10 +330,8 @@ class ContentQueryParser\n/**\n* Adds a handler AND operation for the named operation.\n- *\n- * @param string $operation\n*/\n- public function addHandler($operation, callable $callback): void\n+ public function addHandler(string $operation, callable $callback): void\n{\n$this->handlers[$operation] = $callback;\n$this->addOperation($operation);\n@@ -352,31 +339,24 @@ class ContentQueryParser\n/**\n* Returns a handler for the named operation.\n- *\n- * @param string $operation\n*/\n- public function getHandler($operation): callable\n+ public function getHandler(string $operation): callable\n{\nreturn $this->handlers[$operation];\n}\n/**\n* Adds a service for the named operation.\n- *\n- * @param string $operation\n- * @param QueryInterface $service\n*/\n- public function addService($operation, $service): void\n+ public function addService(string $operation, QueryInterface $service): void\n{\n$this->services[$operation] = $service;\n}\n/**\n* Returns a service for the named operation.\n- *\n- * @param string $operation\n*/\n- public function getService($operation): QueryInterface\n+ public function getService(string $operation): QueryInterface\n{\nreturn $this->services[$operation];\n}\n@@ -391,20 +371,16 @@ class ContentQueryParser\n/**\n* Helper method to check if parameters are set for a specific key.\n- *\n- * @param string $param\n*/\n- public function hasParameter($param): bool\n+ public function hasParameter(string $param): bool\n{\nreturn array_key_exists($param, $this->params);\n}\n/**\n* Returns a single named parameter.\n- *\n- * @param string $param\n*/\n- public function getParameter($param): array\n+ public function getParameter(string $param): array\n{\nreturn $this->params[$param];\n}\n@@ -435,7 +411,7 @@ class ContentQueryParser\n*\n* @param string $operation name of operation to parse for\n*/\n- public function addOperation($operation): void\n+ public function addOperation(string $operation): void\n{\nif (! in_array($operation, $this->operations, true)) {\n$this->operations[] = $operation;\n@@ -447,7 +423,7 @@ class ContentQueryParser\n*\n* @param string $operation name of operation to remove\n*/\n- public function removeOperation($operation): void\n+ public function removeOperation(string $operation): void\n{\nif (in_array($operation, $this->operations, true)) {\n$key = array_search($operation, $this->operations, true);\n"
},
{
"change_type": "DELETE",
"old_path": "src/Storage/Directive/HydrateDirective.php",
"new_path": null,
"diff": "-<?php\n-\n-declare(strict_types=1);\n-\n-namespace Bolt\\Storage\\Directive;\n-\n-use Bolt\\Storage\\QueryInterface;\n-\n-/**\n- * Directive to add a limit modifier to the query.\n- */\n-class HydrateDirective\n-{\n- /**\n- * @param int $limit\n- */\n- public function __invoke(QueryInterface $query, $limit): void\n- {\n- // Not implemented yet\n- }\n-}\n"
},
{
"change_type": "DELETE",
"old_path": "src/Storage/Directive/PagingDirective.php",
"new_path": null,
"diff": "-<?php\n-\n-declare(strict_types=1);\n-\n-namespace Bolt\\Storage\\Directive;\n-\n-use Bolt\\Storage\\QueryInterface;\n-\n-/**\n- * Directive to add a limit modifier to the query.\n- */\n-class PagingDirective\n-{\n- /**\n- * @param int $limit\n- */\n- public function __invoke(QueryInterface $query, $limit): void\n- {\n- // Not implemented yet\n- }\n-}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Storage/Directive/PrintQueryDirective.php",
"new_path": "src/Storage/Directive/PrintQueryDirective.php",
"diff": "@@ -5,6 +5,7 @@ declare(strict_types=1);\nnamespace Bolt\\Storage\\Directive;\nuse Bolt\\Storage\\QueryInterface;\n+use Doctrine\\ORM\\Query\\Parameter;\n/**\n* Directive a raw output of the generated query.\n@@ -13,6 +14,21 @@ class PrintQueryDirective\n{\npublic function __invoke(QueryInterface $query): void\n{\n- echo $query;\n+ $output = sprintf('<code>%s</code>', $query->getQueryBuilder()->getDQL());\n+\n+ $output .= '<ul>';\n+\n+ /** @var Parameter $parameter */\n+ foreach ($query->getQueryBuilder()->getParameters() as $parameter) {\n+ $output .= sprintf(\n+ '<li><code>%s</code>: <code>%s</code></li>',\n+ $parameter->getName(),\n+ $parameter->getValue()\n+ );\n+ }\n+\n+ $output .= '</ul>';\n+\n+ echo $output;\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Storage/Handler/SelectQueryHandler.php",
"new_path": "src/Storage/Handler/SelectQueryHandler.php",
"diff": "@@ -33,7 +33,6 @@ class SelectQueryHandler\n$selectQuery->setParameters($contentQuery->getParameters());\n$contentQuery->runScopes($selectQuery);\n- $contentQuery->runDirectives($selectQuery);\n// This is required. Not entirely sure why.\n$selectQuery->build();\n@@ -43,6 +42,8 @@ class SelectQueryHandler\n$selectQuery->doReferenceJoins();\n$selectQuery->doFieldJoins();\n+ $contentQuery->runDirectives($selectQuery);\n+\nif ($selectQuery->getSingleFetchMode()) {\nreturn $qb\n->setMaxResults(1)\n@@ -52,7 +53,9 @@ class SelectQueryHandler\n$query = $qb->getQuery();\n- return $this->createPaginator($query, 1, 4);\n+ $pagerSize = (int) $contentQuery->getDirective('limit');\n+\n+ return $this->createPaginator($query, 1, $pagerSize);\n}\nprivate function createPaginator(Query $query, int $page, int $amountPerPage): Pagerfanta\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Storage/QueryParameterParser.php",
"new_path": "src/Storage/QueryParameterParser.php",
"diff": "@@ -16,14 +16,19 @@ class QueryParameterParser\n{\n/** @var string */\npublic $alias;\n+\n/** @var string */\nprotected $key;\n+\n/** @var mixed */\nprotected $value;\n+\n/** @var Expr */\nprotected $expr;\n+\n/** @var array */\nprotected $valueMatchers = [];\n+\n/** @var Filter[] */\nprotected $filterHandlers = [];\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Storage/SelectQuery.php",
"new_path": "src/Storage/SelectQuery.php",
"diff": "@@ -353,7 +353,7 @@ class SelectQuery implements ContentQueryInterface\n}\n}\n- public function setContentTypeFilter(array $contentTypes)\n+ public function setContentTypeFilter(array $contentTypes): void\n{\n$this->setContentType(current($contentTypes));\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Working on setcontent
|
95,144 |
01.10.2019 17:32:05
| -7,200 |
6b4cbae96f689d957a2a6e6228c18f9313eabd79
|
Working on JSON stuff
|
[
{
"change_type": "ADD",
"old_path": null,
"new_path": "src/Doctrine/UseJsonFunctions.php",
"diff": "+<?php\n+\n+declare(strict_types=1);\n+\n+namespace Bolt\\Doctrine;\n+\n+use Doctrine\\DBAL\\Platforms\\MariaDb1027Platform;\n+use Doctrine\\DBAL\\Platforms\\MySQL57Platform;\n+use Doctrine\\DBAL\\Platforms\\MySQL80Platform;\n+use Doctrine\\DBAL\\Platforms\\SqlitePlatform;\n+use Doctrine\\ORM\\QueryBuilder;\n+\n+class UseJsonFunctions\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+ */\n+ public static function check(QueryBuilder $qb): bool\n+ {\n+ $platform = $qb->getEntityManager()->getConnection()->getDatabasePlatform();\n+\n+ if ($platform instanceof SqlitePlatform) {\n+ // @todo We need to determine somehow if SQLite was loaded with the JSON1 extension.\n+ return false;\n+ }\n+\n+ if ($platform instanceof MySQL57Platform || $platform instanceof MySQL80Platform || $platform instanceof MariaDb1027Platform) {\n+ return true;\n+ }\n+\n+ return false;\n+ }\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Repository/FieldRepository.php",
"new_path": "src/Repository/FieldRepository.php",
"diff": "@@ -5,6 +5,7 @@ declare(strict_types=1);\nnamespace Bolt\\Repository;\nuse Bolt\\Common\\Json;\n+use Bolt\\Doctrine\\UseJsonFunctions;\nuse Bolt\\Entity\\Field;\nuse Doctrine\\Bundle\\DoctrineBundle\\Repository\\ServiceEntityRepository;\nuse Doctrine\\ORM\\QueryBuilder;\n@@ -30,9 +31,20 @@ class FieldRepository extends ServiceEntityRepository\npublic function findOneBySlug(string $slug): ?Field\n{\n- return $this->getQueryBuilder()\n- ->andWhere('field.value = :slug')\n- ->setParameter('slug', Json::json_encode([$slug]))\n+ $qb = $this->getQueryBuilder();\n+\n+ // Because Mysql 5.6 and Sqlite handle values in JSON differently, we\n+ // need to adapt the query.\n+ if (UseJsonFunctions::check($qb)) {\n+ $where = \"JSON_EXTRACT(field.value, '$[0]')\";\n+ } else {\n+ $where = 'field.value';\n+ $slug = Json::json_encode([$slug]);\n+ }\n+\n+ return $qb\n+ ->andWhere($where . ' = :slug')\n+ ->setParameter('slug', $slug)\n->setMaxResults(1)\n->getQuery()\n->getOneOrNullResult();\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Storage/SelectQuery.php",
"new_path": "src/Storage/SelectQuery.php",
"diff": "@@ -5,10 +5,7 @@ declare(strict_types=1);\nnamespace Bolt\\Storage;\nuse Bolt\\Common\\Json;\n-use Doctrine\\DBAL\\Platforms\\MariaDb1027Platform;\n-use Doctrine\\DBAL\\Platforms\\MySQL57Platform;\n-use Doctrine\\DBAL\\Platforms\\MySQL80Platform;\n-use Doctrine\\DBAL\\Platforms\\SqlitePlatform;\n+use Bolt\\Doctrine\\UseJsonFunctions;\nuse Doctrine\\ORM\\Query\\Expr\\Base;\nuse Doctrine\\ORM\\Query\\ParameterTypeInferer;\nuse Doctrine\\ORM\\QueryBuilder;\n@@ -318,11 +315,15 @@ class SelectQuery implements ContentQueryInterface\n$keyParam = 'field_' . $index;\n$originalLeftExpression = 'content.' . $key;\n- if ($this->useJsonFunctions()) {\n+\n+ // Because Mysql 5.6 and Sqlite handle values in JSON differently, we\n+ // need to adapt the query.\n+ if (UseJsonFunctions::check($this->qb)) {\n$newLeftExpression = sprintf(\"JSON_EXTRACT(%s.value, '$[0]')\", $fieldsAlias);\n} else {\n$newLeftExpression = sprintf('%s.value', $fieldsAlias);\n}\n+\n$where = $filter->getExpression();\n$where = str_replace($originalLeftExpression, $newLeftExpression, $where);\n@@ -344,7 +345,7 @@ class SelectQuery implements ContentQueryInterface\n)\n->setParameter($keyParam, $key);\nforeach ($filter->getParameters() as $key => $value) {\n- if ($this->useJsonFunctions()) {\n+ if (UseJsonFunctions::check($this->qb)) {\n$this->qb->setParameter($key, $value);\n} else {\n$this->qb->setParameter($key, Json::json_encode([$value]));\n@@ -365,20 +366,4 @@ class SelectQuery implements ContentQueryInterface\n$this->qb->andWhere(implode(' OR ', $where));\n}\n-\n- private function useJsonFunctions(): bool\n- {\n- $platform = $this->qb->getEntityManager()->getConnection()->getDatabasePlatform();\n-\n- if ($platform instanceof SqlitePlatform) {\n- // @todo We need to determine somehow if SQLite was loaded with the JSON1 extension.\n- return false;\n- }\n-\n- if ($platform instanceof MySQL57Platform || $platform instanceof MySQL80Platform || $platform instanceof MariaDb1027Platform) {\n- return true;\n- }\n-\n- return false;\n- }\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Working on JSON stuff
|
95,144 |
02.10.2019 17:07:55
| -7,200 |
073a69a6f4341e5ab09f6210bad95b9010ff222b
|
Making pagers tick
|
[
{
"change_type": "MODIFY",
"old_path": "public/theme/skeleton/custom/setcontent_1.twig",
"new_path": "public/theme/skeleton/custom/setcontent_1.twig",
"diff": "<section id=\"two\">\n<h1>Two</h1>\n- {% setcontent pages = \"pages\" limit 20 %}\n+ {% setcontent pages = \"pages, entries\" limit 4 %}\nResults: <span id=\"results-two\">{{ entries|length > 5 ? 'yes' }}</span>\n<ul>\n{% for page in pages %}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Storage/Handler/SelectQueryHandler.php",
"new_path": "src/Storage/Handler/SelectQueryHandler.php",
"diff": "@@ -10,6 +10,7 @@ use Bolt\\Storage\\SelectQuery;\nuse Doctrine\\ORM\\Query;\nuse Pagerfanta\\Adapter\\DoctrineORMAdapter;\nuse Pagerfanta\\Pagerfanta;\n+use Symfony\\Component\\HttpFoundation\\Request;\n/**\n* Handler class to perform select query and return a resultset.\n@@ -53,16 +54,24 @@ class SelectQueryHandler\n$query = $qb->getQuery();\n- $pagerSize = (int) $contentQuery->getDirective('limit');\n+ $amountPerPage = (int) $contentQuery->getDirective('limit');\n- return $this->createPaginator($query, 1, $pagerSize);\n+ return $this->createPaginator($query, $amountPerPage);\n}\n- private function createPaginator(Query $query, int $page, int $amountPerPage): Pagerfanta\n+ private function createPaginator(Query $query, int $amountPerPage): Pagerfanta\n{\n$paginator = new Pagerfanta(new DoctrineORMAdapter($query, true, true));\n$paginator->setMaxPerPage($amountPerPage);\n- $paginator->setCurrentPage($page);\n+\n+ $request = Request::createFromGlobals();\n+ $page = (int) $request->get('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+ // case, this specific pager show stay on the last page.\n+ $paginator->setCurrentPage(min($page, $paginator->getNbPages()));\n+\nreturn $paginator;\n}\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Making pagers tick
|
95,144 |
03.10.2019 17:17:22
| -7,200 |
a5ccd7aa033b9ec1eb8860d6cd4a4a1b7bbde64c
|
Add database platform and version to 'About' and 'bolt:info'
|
[
{
"change_type": "MODIFY",
"old_path": "src/Command/InfoCommand.php",
"new_path": "src/Command/InfoCommand.php",
"diff": "@@ -16,6 +16,16 @@ class InfoCommand extends Command\nprotected static $defaultName = 'bolt:info';\n+ /** @var \\Bolt\\Doctrine\\Version */\n+ private $doctrineVersion;\n+\n+ public function __construct(\\Bolt\\Doctrine\\Version $doctrineVersion)\n+ {\n+ $this->doctrineVersion = $doctrineVersion;\n+\n+ parent::__construct();\n+ }\n+\n/**\n* {@inheritdoc}\n*/\n@@ -41,17 +51,20 @@ HELP\n$this->outputImage($io);\n$message = sprintf(\n- 'Bolt version: <info>%s</info>, <comment>%s (%s)</comment>.',\n- Version::fullName(),\n- Version::codeName(),\n- Version::installType()\n+ 'Bolt version: <comment>%s</comment>', Version::VERSION\n);\n- $io->text([\n- $message,\n- '',\n+ $io->text([$message, '']);\n+\n+ $platform = $this->doctrineVersion->getPlatform();\n+\n+ $io->listing([\n+ sprintf('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]);\n+ $io->text('');\n+\nreturn null;\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Controller/Backend/GeneralController.php",
"new_path": "src/Controller/Backend/GeneralController.php",
"diff": "@@ -17,13 +17,24 @@ use Symfony\\Component\\Routing\\Annotation\\Route;\n*/\nclass GeneralController extends TwigAwareController implements BackendZone\n{\n+ /** @var \\Bolt\\Doctrine\\Version */\n+ private $doctrineVersion;\n+\n+ public function __construct(\\Bolt\\Doctrine\\Version $doctrineVersion)\n+ {\n+ $this->doctrineVersion = $doctrineVersion;\n+ }\n+\n/**\n* @Route(\"/about\", name=\"bolt_about\")\n*/\npublic function about(): Response\n{\n+ $platform = $this->doctrineVersion->getPlatform();\n+\n$twigVars = [\n'installType' => Version::installType(),\n+ 'platform' => $platform,\n];\nreturn $this->renderTemplate('@bolt/pages/about.html.twig', $twigVars);\n"
},
{
"change_type": "RENAME",
"old_path": "src/Doctrine/UseJsonFunctions.php",
"new_path": "src/Doctrine/Version.php",
"diff": "@@ -4,19 +4,29 @@ declare(strict_types=1);\nnamespace Bolt\\Doctrine;\n+use Doctrine\\DBAL\\Connection;\n+use Doctrine\\DBAL\\Driver\\PDOConnection;\nuse Doctrine\\DBAL\\Platforms\\MariaDb1027Platform;\nuse Doctrine\\DBAL\\Platforms\\MySQL57Platform;\nuse Doctrine\\DBAL\\Platforms\\MySQL80Platform;\nuse Doctrine\\DBAL\\Platforms\\SqlitePlatform;\nuse Doctrine\\ORM\\QueryBuilder;\n-class UseJsonFunctions\n+class Version\n{\n+ /** @var Connection */\n+ private $connection;\n+\n+ public function __construct(Connection $connection)\n+ {\n+ $this->connection = $connection;\n+ }\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*/\n- public static function check(QueryBuilder $qb): bool\n+ public static function useJsonFunction(QueryBuilder $qb): bool\n{\n$platform = $qb->getEntityManager()->getConnection()->getDatabasePlatform();\n@@ -31,4 +41,19 @@ class UseJsonFunctions\nreturn false;\n}\n+\n+ public function getPlatform(): array\n+ {\n+ /** @var PDOConnection $wrapped */\n+ $wrapped = $this->connection->getWrappedConnection();\n+\n+ [$client_version] = explode(' - ', $wrapped->getAttribute(\\PDO::ATTR_CLIENT_VERSION));\n+\n+ return [\n+ 'client_version' => $client_version,\n+ 'driver_name' => $wrapped->getAttribute(\\PDO::ATTR_DRIVER_NAME),\n+ 'connection_status' => $wrapped->getAttribute(\\PDO::ATTR_CONNECTION_STATUS),\n+ 'server_version' => $wrapped->getAttribute(\\PDO::ATTR_SERVER_VERSION),\n+ ];\n+ }\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Repository/FieldRepository.php",
"new_path": "src/Repository/FieldRepository.php",
"diff": "@@ -5,7 +5,7 @@ declare(strict_types=1);\nnamespace Bolt\\Repository;\nuse Bolt\\Common\\Json;\n-use Bolt\\Doctrine\\UseJsonFunctions;\n+use Bolt\\Doctrine\\Version;\nuse Bolt\\Entity\\Field;\nuse Doctrine\\Bundle\\DoctrineBundle\\Repository\\ServiceEntityRepository;\nuse Doctrine\\ORM\\QueryBuilder;\n@@ -35,7 +35,7 @@ class FieldRepository extends ServiceEntityRepository\n// Because Mysql 5.6 and Sqlite handle values in JSON differently, we\n// need to adapt the query.\n- if (UseJsonFunctions::check($qb)) {\n+ if (Version::useJsonFunction($qb)) {\n$where = \"JSON_EXTRACT(field.value, '$[0]')\";\n} else {\n$where = 'field.value';\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Storage/SelectQuery.php",
"new_path": "src/Storage/SelectQuery.php",
"diff": "@@ -5,7 +5,7 @@ declare(strict_types=1);\nnamespace Bolt\\Storage;\nuse Bolt\\Common\\Json;\n-use Bolt\\Doctrine\\UseJsonFunctions;\n+use Bolt\\Doctrine\\Version;\nuse Doctrine\\ORM\\Query\\Expr\\Base;\nuse Doctrine\\ORM\\Query\\ParameterTypeInferer;\nuse Doctrine\\ORM\\QueryBuilder;\n@@ -318,7 +318,7 @@ class SelectQuery implements ContentQueryInterface\n// Because Mysql 5.6 and Sqlite handle values in JSON differently,\n// we need to adapt the query.\n- if (UseJsonFunctions::check($this->qb)) {\n+ if (Version::useJsonFunction($this->qb)) {\n$newLeftExpression = sprintf(\"JSON_EXTRACT(%s.value, '$[0]')\", $fieldsAlias);\n} else {\n$newLeftExpression = sprintf('%s.value', $fieldsAlias);\n@@ -345,7 +345,7 @@ class SelectQuery implements ContentQueryInterface\n)\n->setParameter($keyParam, $key);\nforeach ($filter->getParameters() as $key => $value) {\n- if (UseJsonFunctions::check($this->qb)) {\n+ if (Version::useJsonFunction($this->qb)) {\n$this->qb->setParameter($key, $value);\n} else {\n$this->qb->setParameter($key, Json::json_encode([$value]));\n"
},
{
"change_type": "MODIFY",
"old_path": "templates/pages/about.html.twig",
"new_path": "templates/pages/about.html.twig",
"diff": "{% block main %}\n- <h2>Bolt {{ constant('Bolt\\\\Version::VERSION') }}</h2>\n+ <h2>Bolt {{ constant('Bolt\\\\Version::VERSION') }}<small> - {{ constant('Bolt\\\\Version::CODENAME') }}</small></h2>\n- <h3>{{ constant('Bolt\\\\Version::CODENAME') }} <small><em>({{ installType }})</em></small></h3>\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+ </ul>\n<p>\nBolt is a CMS that strives to be simple, fast, straightforward and enjoyable to use. Both for\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Add database platform and version to 'About' and 'bolt:info'
|
95,144 |
04.10.2019 06:31:29
| -7,200 |
896d599e21c9e133c4bc1758c9081b9e3bd6244b
|
try/catch for `\PDO::ATTR_CONNECTION_STATUS`
|
[
{
"change_type": "MODIFY",
"old_path": "src/Doctrine/Version.php",
"new_path": "src/Doctrine/Version.php",
"diff": "@@ -49,10 +49,16 @@ class Version\n[$client_version] = explode(' - ', $wrapped->getAttribute(\\PDO::ATTR_CLIENT_VERSION));\n+ try {\n+ $status = $wrapped->getAttribute(\\PDO::ATTR_CONNECTION_STATUS);\n+ } catch (\\PDOException $e) {\n+ $status = '';\n+ }\n+\nreturn [\n'client_version' => $client_version,\n'driver_name' => $wrapped->getAttribute(\\PDO::ATTR_DRIVER_NAME),\n- 'connection_status' => $wrapped->getAttribute(\\PDO::ATTR_CONNECTION_STATUS),\n+ 'connection_status' => $status,\n'server_version' => $wrapped->getAttribute(\\PDO::ATTR_SERVER_VERSION),\n];\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
try/catch for `\PDO::ATTR_CONNECTION_STATUS`
|
95,144 |
04.10.2019 08:25:04
| -7,200 |
097ef8c82d7b8af5990e56a2320473c13d448e84
|
Sync Makefile and Dockerfile between `core` and `project`
|
[
{
"change_type": "MODIFY",
"old_path": "Makefile",
"new_path": "Makefile",
"diff": "-start:\n+DC_RUN ?= docker-compose run --rm\n+\n+.PHONY: help install build-assets copy-assets server server-stop cache csclear cscheck csfix csfix-tests stancheck test \\\n+behat e2e full-test db-create db-update db-reset docker-install docker-install-deps docker-start docker-assets-serve \\\n+docker-update docker-cache docker-csclear docker-cscheck docker-csfix docker-stancheck docker-db-create docker-db-reset \\\n+docker-db-update docker-npm-fix-env docker-test docker-server-stop docker-behat docker-behat-rerun docker-full-test \\\n+docker-command docker-console\n+\n+default: help\n+\n+help:\n+ @grep -E '^[a-zA-Z_-]+:.*?##.*$$' $(MAKEFILE_LIST) | sort | awk '{split($$0, a, \":\"); printf \"\\033[36m%-30s\\033[0m %-30s %s\\n\", a[1], a[2], a[3]}'\n+\n+start: ## to run the install scripts and start the server\nmake install\nmake db-create\nmake server\n-install:\n+install: ## to install all project\ncp -n .env.dist .env || true\ncomposer install\nnpm install\n@@ -12,21 +25,21 @@ install:\nupdate:\ncomposer update && composer outdated\n-server:\n+server: ## to start server\nbin/console server:start 127.0.0.1:8088 -q || true\n-server-stop:\n+server-stop: ## to stop server\nbin/console server:stop\n-cache:\n+cache: ## to clean cache\nbin/console cache:clear\n-csclear:\n+csclear: ## to clean cache and check coding style\nmkdir -p var/cache/ecs\nchmod -R a+rw var/cache/ecs\nrm -rf var/cache/ecs/*\n-cscheck:\n+cscheck: ## to check coding style\nmake csclear\nvendor/bin/ecs check src\nvendor/bin/ecs check tests/spec --config vendor/symplify/easy-coding-standard/config/common/namespaces.yml\n@@ -35,33 +48,33 @@ cscheck:\nvendor/bin/ecs check tests/php --config vendor/symplify/easy-coding-standard/config/common/strict.yml\nmake stancheck\n-csfix:\n+csfix: ## to fix coding style\nmake csclear\nvendor/bin/ecs check src --fix\nvendor/bin/ecs check tests/spec --fix --config vendor/symplify/easy-coding-standard/config/common/namespaces.yml\nvendor/bin/ecs check tests/php --fix --config vendor/symplify/easy-coding-standard/config/common/namespaces.yml --config vendor/symplify/easy-coding-standard/config/common/phpunit.yml --config vendor/symplify/easy-coding-standard/config/common/strict.yml\nmake stancheck\n-stancheck:\n+stancheck: ## to run phpstan\nvendor/bin/phpstan --memory-limit=1G analyse -c phpstan.neon src\n-test:\n+test: ## to run phpunit tests\nvendor/bin/phpspec run\nvendor/bin/phpunit\n-behat:\n+behat: ## to run behat tests\nmake server\nvendor/bin/behat -v\n-behat-rerun:\n+behat-rerun: ## to rerun behat tests\nmake server\nvendor/bin/behat -v --rerun\n-e2e:\n+e2e: ## to run kakunin tests\nmake server\ncd tests/e2e && npm run kakunin && cd ../..\n-full-test:\n+full-test: ## to run full tests\nmake cscheck\nmake test\nmake behat\n@@ -75,100 +88,103 @@ e2e-install:\ncd tests/e2e && npm install\nnode ./tests/e2e/node_modules/protractor/bin/webdriver-manager update --gecko=false\n-db-create:\n+db-create: ## to create database and load fixtures\nbin/console doctrine:database:create\nbin/console doctrine:schema:create\nbin/console doctrine:fixtures:load -n\n-db-update:\n+db-update: ## to update schema database\nbin/console doctrine:schema:update -v --dump-sql --force --complete\n-db-reset:\n+db-reset: ## to delete database and load fixtures\nbin/console doctrine:schema:drop --force --full-database\nbin/console doctrine:schema:create\nbin/console doctrine:fixtures:load -n\n# Dockerized commands:\n-docker-install:\n+docker-install: ## to install project with docker\nmake docker-start\nmake docker-install-deps\nmake docker-db-create\n-docker-install-deps:\n+docker-install-deps: ## to install all assets with docker\ndocker-compose exec -T php sh -c \"composer install\"\n- docker-compose run node sh -c \"npm install\"\n- docker-compose run node sh -c \"npm rebuild node-sass\"\n- docker-compose run node sh -c \"npm run build\"\n+ $(DC_RUN) node sh -c \"npm install\"\n+ $(DC_RUN) node sh -c \"npm rebuild node-sass\"\n+ $(DC_RUN) node sh -c \"npm run build\"\n-docker-start:\n+docker-start: ## to build containers\ncp -n .env.dist .env || true\ndocker-compose up -d\n-docker-assets-serve:\n- docker-compose run node sh -c \"npm run serve\"\n+docker-assets-serve: ## to run server with npm\n+ $(DC_RUN) node sh -c \"npm run serve\"\n-docker-update:\n+docker-update: ## to update dependencies with docker\ndocker-compose exec -T php sh -c \"composer update && composer outdated\"\n-docker-cache:\n+docker-cache: ## to clean cache with docke\ndocker-compose exec -T php sh -c \"bin/console cache:clear\"\n-docker-csclear:\n+docker-csclear: ## to clean cache and check coding style with docker\ndocker-compose exec -T php sh -c \"mkdir -p var/cache/ecs\"\ndocker-compose exec -T php sh -c \"chmod -R a+rw var/cache/ecs\"\ndocker-compose exec -T php sh -c \"rm -rf var/cache/ecs/*\"\n-docker-cscheck:\n+docker-cscheck: ## to check coding style with docker\nmake docker-csclear\ndocker-compose exec -T php sh -c \"vendor/bin/ecs check src\"\nmake docker-stancheck\n-docker-csfix:\n+docker-csfix: ## to fix coding style with docker\nmake docker-csclear\ndocker-compose exec -T php sh -c \"vendor/bin/ecs check src --fix\"\nmake docker-stancheck\n-docker-stancheck:\n+docker-stancheck: ## to run phpstane with docker\ndocker-compose exec -T php sh -c \"vendor/bin/phpstan analyse -c phpstan.neon src\"\n-docker-db-create:\n+docker-db-create: ## to create database and load fixtures with docker\ndocker-compose exec -T php sh -c \"bin/console doctrine:database:create\"\ndocker-compose exec -T php sh -c \"bin/console doctrine:schema:create\"\ndocker-compose exec -T php sh -c \"bin/console doctrine:fixtures:load -n\"\n-docker-db-reset:\n+docker-db-reset: ## to delete database with docker\ndocker-compose exec -T php sh -c \"bin/console doctrine:schema:drop --force --full-database\"\ndocker-compose exec -T php sh -c \"bin/console doctrine:schema:create\"\ndocker-compose exec -T php sh -c \"bin/console doctrine:fixtures:load -n\"\n-docker-db-update:\n+docker-db-update: ## to update schema database with docker\ndocker-compose exec -T php sh -c \"bin/console doctrine:schema:update -v --dump-sql --force --complete\"\n-docker-npm-fix-env:\n- docker-compose run node sh -c \"npm rebuild node-sass\"\n+docker-npm-fix-env: ## to rebuild asset sass\n+ $(DC_RUN) node sh -c \"npm rebuild node-sass\"\n-docker-test:\n+docker-test: ## to run phpspec and phpunit tests with docker\ndocker-compose exec -T php sh -c \"vendor/bin/phpspec run\"\ndocker-compose exec -T php sh -c \"vendor/bin/phpunit\"\n-docker-server:\n+docker-server: ## to start server with docker\ndocker-compose exec -T php bin/console server:start 127.0.0.1:8088\n-docker-behat:\n+docker-server-stop: ## to stop server with docker\n+ docker-compose exec -T -u www-data php bin/console server:stop\n+\n+docker-behat: ## to run behat tests with docker\ndocker-compose exec -T php vendor/bin/behat -v\n-docker-behat-rerun:\n+docker-behat-rerun: ## to rerun behat tests with docker\ndocker-compose exec -T php vendor/bin/behat -v --rerun\n-docker-full-test:\n+docker-full-test: ## to run all test with docker\nmake docker-cache\nmake docker-cscheck\nmake docker-test\nmake docker-behat\nmake e2e\n-docker-command:\n+docker-command: ## to run commmand shell in php container\ndocker-compose exec -T php sh -c \"$(c)\"\n-docker-console:\n+docker-console: ## to run commmand with console symfony in php container\ndocker-compose exec -T php sh -c \"bin/console $(c)\"\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Sync Makefile and Dockerfile between `core` and `project`
|
95,192 |
04.10.2019 15:20:36
| -7,200 |
3ee27d3629ddb2de065b1eafb0833662b9cf7134
|
fix aligment main container and grid gutter on breakpoints
|
[
{
"change_type": "MODIFY",
"old_path": "assets/scss/layout/_admin.scss",
"new_path": "assets/scss/layout/_admin.scss",
"diff": "@@ -96,14 +96,14 @@ body {\n}\n&--container {\n- padding: $spacer * 0.625;\n+ padding: $spacer*0.625; //do not just change this as it's tied to the main grid and other paddings/gutters\n@include media-breakpoint-up(sm) {\n- padding: $spacer * 1;\n+ padding: $spacer*1; //do not just change this as it's tied to the main grid and other paddings/gutters\n}\n@include media-breakpoint-up(md) {\n- padding: $spacer * 1.25;\n+ padding: $spacer*1.25; //do not just change this as it's tied to the main grid and other paddings/gutters\n}\n@include media-breakpoint-up(xl) {\n@@ -112,12 +112,12 @@ body {\ngrid-template-columns: repeat(12, 1fr);\ngrid-template-rows: auto;\ngrid-column-gap: 2rem;\n- padding: $spacer $spacer*1.5 $spacer $spacer*2.5;\n+ padding: $spacer $spacer*2 $spacer $spacer*2; //do not just change this as it's tied to the main grid and other paddings/gutters\n}\n- @include media-breakpoint-up(wd) {\n- grid-column-gap: 3.5rem;\n- padding: $spacer $spacer*2 $spacer $spacer*3.5;\n+ @include media-breakpoint-up(xw) {\n+ grid-column-gap: 3rem;\n+ padding: $spacer $spacer*3 $spacer $spacer*3; //do not just change this as it's tied to the main grid and other paddings/gutters\n}\n&--has-sidebar {\n"
},
{
"change_type": "MODIFY",
"old_path": "assets/scss/modules/admin/_header.scss",
"new_path": "assets/scss/modules/admin/_header.scss",
"diff": "justify-content: space-between;\nalign-items: center;\nheight: 100%;\n- padding: $spacer $spacer*0.625 0;\n+ padding: $spacer $spacer*0.625 0; //do not just change this as it's tied to the main grid and other paddings/gutters\nposition: relative;\n@include media-breakpoint-up(sm) {\n- padding: $spacer*1 $spacer*1 0;\n+ padding: $spacer*1 $spacer*1 0; //do not just change this as it's tied to the main grid and other paddings/gutters\n}\n@include media-breakpoint-up(md) {\n- padding: $spacer*1.25 $spacer*1.25 0 $spacer*2.5;\n+ padding: $spacer*1.25 $spacer*1.25 0 $spacer*1.25; //do not just change this as it's tied to the main grid and other paddings/gutters\n+ }\n+\n+ @include media-breakpoint-up(xl) {\n+ padding: $spacer*1.25 $spacer*1.25 0 $spacer*2; //do not just change this as it's tied to the main grid and other paddings/gutters\n}\n@include media-breakpoint-up(wd) {\n- padding: $spacer*1.25 $spacer*2 1rem $spacer*3.5;\n+ padding: $spacer*1.25 $spacer*2 1rem $spacer*2; //do not just change this as it's tied to the main grid and other paddings/gutters\n+ }\n+\n+ @include media-breakpoint-up(xw) {\n+ padding: $spacer*1.25 $spacer*3 1rem $spacer*3; //do not just change this as it's tied to the main grid and other paddings/gutters\n}\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
fix aligment main container and grid gutter on breakpoints
|
95,192 |
04.10.2019 16:54:08
| -7,200 |
c6242a24abf0128ff77e016c24161b93b6118463
|
redo some menu label logic to incororate sr-only content in the label and fix not showing label by default
|
[
{
"change_type": "MODIFY",
"old_path": "templates/_base/layout.html.twig",
"new_path": "templates/_base/layout.html.twig",
"diff": "</h1>\n<button class=\"admin-sidebar-toggler btn btn-md\">\n- <span class=\"sr-only\">{{ 'admin_sidebar_toggler.toggle'|trans }}</span>\n+ <span class=\"admin-sidebar-toggler_icon\"></span>{{ 'admin_sidebar_toggler.toggle'|trans|raw }}\n</button>\n</div>\n"
},
{
"change_type": "MODIFY",
"old_path": "translations/messages.en.xlf",
"new_path": "translations/messages.en.xlf",
"diff": "<unit id=\"jXAelLe\" name=\"admin_sidebar_toggler.toggle\">\n<segment>\n<source>admin_sidebar_toggler.toggle</source>\n- <target>Toggle menu</target>\n+ <target><![CDATA[<span class=\"sr-only\">Toggle </span>menu]]></target>\n</segment>\n</unit>\n<unit id=\"BINgtmK\" name=\"editor_date.toggle\">\n"
},
{
"change_type": "MODIFY",
"old_path": "translations/messages.nl.xlf",
"new_path": "translations/messages.nl.xlf",
"diff": "<unit id=\"jXAelLe\" name=\"admin_sidebar_toggler.toggle\">\n<segment>\n<source>admin_sidebar_toggler.toggle</source>\n- <target>Klap zijbalk uit of in</target>\n+ <target><![CDATA[<span class='sr-only'>Klap </span>menu<span class='sr-only'> in of uit</span>]]></target>\n</segment>\n</unit>\n<unit id=\"Gabafxx\" name=\"admin_sidebar.toggler\">\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
redo some menu label logic to incororate sr-only content in the label and fix not showing label by default
|
95,144 |
04.10.2019 17:06:17
| -7,200 |
00d789352ad31824312e70989ba2f55c9c4f0d28
|
Fix setcontent when trying to order on the same non-standard column twice
|
[
{
"change_type": "MODIFY",
"old_path": "config/bolt/contenttypes.yaml",
"new_path": "config/bolt/contenttypes.yaml",
"diff": "@@ -292,6 +292,7 @@ blocks:\nsearchable: false\nicon_many: \"fa:cubes\"\nicon_one: \"fa:cube\"\n+ sort: title\n# This contenttype is here to use for (automated) tests.\ntests:\n"
},
{
"change_type": "MODIFY",
"old_path": "public/theme/skeleton/custom/setcontent_1.twig",
"new_path": "public/theme/skeleton/custom/setcontent_1.twig",
"diff": "</ul>\n<section>\n+ <section id=\"seven\">\n+ <h1>Seven</h1>\n+ {% setcontent blocks = \"blocks\" order \"title\" printquery %}\n+ Results: <span id=\"results-six\">{{ blocks|length > 0 ? 'yes' }}</span>\n+ <ul>\n+ {% for block in blocks %}\n+ <li>\n+ {{ block.contenttype }} {{ block.id }} . {{ block|title }}\n+ </li>\n+ {% endfor %}\n+ </ul>\n+ <section>\n+\n{% endblock main %}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Storage/Directive/OrderDirective.php",
"new_path": "src/Storage/Directive/OrderDirective.php",
"diff": "@@ -33,24 +33,15 @@ class OrderDirective\n$query->getQueryBuilder()->resetDQLPart('orderBy');\n$separatedOrders = $this->getOrderBys($order);\n- $index = 1;\n+\nforeach ($separatedOrders as $order) {\n- $order = trim($order);\n- if (mb_strpos($order, '-') === 0) {\n- $direction = 'DESC';\n- $order = mb_substr($order, 1);\n- } elseif (mb_strpos($order, ' DESC') !== false) {\n- $direction = 'DESC';\n- $order = str_replace(' DESC', '', $order);\n- } else {\n- $direction = null;\n- }\n+ [ $order, $direction ] = $this->createSortBy($order);\nif (in_array($order, $this->coreFields, true)) {\n$query->getQueryBuilder()->addOrderBy('content.' . $order, $direction);\n} else {\n- $fieldsAlias = 'fields_order_' . $index;\n- $fieldAlias = 'order_' . $index;\n+ $fieldsAlias = 'fields_order_' . $query->getIndex();\n+ $fieldAlias = 'order_' . $query->getIndex();\n$query\n->getQueryBuilder()\n->leftJoin('content.fields', $fieldsAlias)\n@@ -58,11 +49,30 @@ class OrderDirective\n->addOrderBy($fieldsAlias . '.value', $direction)\n->setParameter($fieldAlias, $order);\n- ++$index;\n+ $query->incrementIndex();\n}\n}\n}\n+ /**\n+ * Cobble together the sorting order, and whether or not it's a column in `content` or `fields`.\n+ */\n+ private function createSortBy(string $order): array\n+ {\n+ if (mb_strpos($order, '-') === 0) {\n+ $direction = 'DESC';\n+ $order = mb_substr($order, 1);\n+ } elseif (mb_strpos($order, ' DESC') !== false) {\n+ $direction = 'DESC';\n+ $order = str_replace(' DESC', '', $order);\n+ } else {\n+ $order = str_replace(' ASC', '', $order);\n+ $direction = 'ASC';\n+ }\n+\n+ return [$order, $direction];\n+ }\n+\nprotected function getOrderBys(string $order): array\n{\n$separatedOrders = [$order];\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Storage/QueryInterface.php",
"new_path": "src/Storage/QueryInterface.php",
"diff": "@@ -25,4 +25,8 @@ interface QueryInterface\npublic function getQueryBuilder(): QueryBuilder;\npublic function __toString(): string;\n+\n+ public function getIndex(): int;\n+\n+ public function incrementIndex(): void;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Storage/SelectQuery.php",
"new_path": "src/Storage/SelectQuery.php",
"diff": "@@ -44,6 +44,9 @@ class SelectQuery implements ContentQueryInterface\n/** @var bool */\nprotected $singleFetchMode = false;\n+ /** @var int */\n+ protected $index = 1;\n+\n/** @var array */\nprotected $coreFields = [\n'id',\n@@ -366,4 +369,14 @@ class SelectQuery implements ContentQueryInterface\n$this->qb->andWhere(implode(' OR ', $where));\n}\n+\n+ public function getIndex(): int\n+ {\n+ return $this->index;\n+ }\n+\n+ public function incrementIndex(): void\n+ {\n+ $this->index++;\n+ }\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Fix setcontent when trying to order on the same non-standard column twice
|
95,144 |
05.10.2019 09:48:15
| -7,200 |
a9ce7c083909172a46b7675e6f470107fb0c7f68
|
[chore] Updating NPM deps
|
[
{
"change_type": "MODIFY",
"old_path": "package-lock.json",
"new_path": "package-lock.json",
"diff": "\"integrity\": \"sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==\"\n},\n\"autoprefixer\": {\n- \"version\": \"9.6.1\",\n- \"resolved\": \"https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.6.1.tgz\",\n- \"integrity\": \"sha512-aVo5WxR3VyvyJxcJC3h4FKfwCQvQWb1tSI5VHNibddCVWrcD1NvlxEweg3TSgiPztMnWfjpy2FURKA2kvDE+Tw==\",\n+ \"version\": \"9.6.2\",\n+ \"resolved\": \"https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.6.2.tgz\",\n+ \"integrity\": \"sha512-0hXVBruiJrTMJprJYwdWuIg87R8MJ/Yfrt85XgOgRwyC0mpBIyDdGZhSf+AEh6lAA+R/70Y+89G6YSXsCnnrEw==\",\n\"requires\": {\n- \"browserslist\": \"^4.6.3\",\n- \"caniuse-lite\": \"^1.0.30000980\",\n+ \"browserslist\": \"^4.7.0\",\n+ \"caniuse-lite\": \"^1.0.30000998\",\n\"chalk\": \"^2.4.2\",\n\"normalize-range\": \"^0.1.2\",\n\"num2fraction\": \"^1.2.2\",\n- \"postcss\": \"^7.0.17\",\n- \"postcss-value-parser\": \"^4.0.0\"\n+ \"postcss\": \"^7.0.18\",\n+ \"postcss-value-parser\": \"^4.0.2\"\n},\n\"dependencies\": {\n+ \"browserslist\": {\n+ \"version\": \"4.7.0\",\n+ \"resolved\": \"https://registry.npmjs.org/browserslist/-/browserslist-4.7.0.tgz\",\n+ \"integrity\": \"sha512-9rGNDtnj+HaahxiVV38Gn8n8Lr8REKsel68v1sPFfIGEK6uSXTY3h9acgiT1dZVtOOUtifo/Dn8daDQ5dUgVsA==\",\n+ \"requires\": {\n+ \"caniuse-lite\": \"^1.0.30000989\",\n+ \"electron-to-chromium\": \"^1.3.247\",\n+ \"node-releases\": \"^1.1.29\"\n+ }\n+ },\n+ \"caniuse-lite\": {\n+ \"version\": \"1.0.30000998\",\n+ \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000998.tgz\",\n+ \"integrity\": \"sha512-8Tj5sPZR9kMHeDD9SZXIVr5m9ofufLLCG2Y4QwQrH18GIwG+kCc+zYdlR036ZRkuKjVVetyxeAgGA1xF7XdmzQ==\"\n+ },\n+ \"electron-to-chromium\": {\n+ \"version\": \"1.3.274\",\n+ \"resolved\": \"https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.274.tgz\",\n+ \"integrity\": \"sha512-9bWkiXxGylowqMXoF1ec7k6akmsL2nOa1kzZ4CKzBuwK9WVz0VauE1w/RVyYraE1LpJM7+8fNCsW9b7ZSoxWIg==\"\n+ },\n+ \"node-releases\": {\n+ \"version\": \"1.1.34\",\n+ \"resolved\": \"https://registry.npmjs.org/node-releases/-/node-releases-1.1.34.tgz\",\n+ \"integrity\": \"sha512-fNn12JTEfniTuCqo0r9jXgl44+KxRH/huV7zM/KAGOKxDKrHr6EbT7SSs4B+DNxyBE2mks28AD+Jw6PkfY5uwA==\",\n+ \"requires\": {\n+ \"semver\": \"^6.3.0\"\n+ }\n+ },\n+ \"postcss\": {\n+ \"version\": \"7.0.18\",\n+ \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-7.0.18.tgz\",\n+ \"integrity\": \"sha512-/7g1QXXgegpF+9GJj4iN7ChGF40sYuGYJ8WZu8DZWnmhQ/G36hfdk3q9LBJmoK+lZ+yzZ5KYpOoxq7LF1BxE8g==\",\n+ \"requires\": {\n+ \"chalk\": \"^2.4.2\",\n+ \"source-map\": \"^0.6.1\",\n+ \"supports-color\": \"^6.1.0\"\n+ }\n+ },\n\"postcss-value-parser\": {\n- \"version\": \"4.0.1\",\n- \"resolved\": \"https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.1.tgz\",\n- \"integrity\": \"sha512-3Jk+/CVH0HBfgSSFWALKm9Hyzf4kumPjZfUxkRYZNcqFztELb2APKxv0nlX8HCdc1/ymePmT/nFf1ST6fjWH2A==\"\n+ \"version\": \"4.0.2\",\n+ \"resolved\": \"https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.2.tgz\",\n+ \"integrity\": \"sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ==\"\n}\n}\n},\n}\n},\n\"eslint\": {\n- \"version\": \"6.4.0\",\n- \"resolved\": \"https://registry.npmjs.org/eslint/-/eslint-6.4.0.tgz\",\n- \"integrity\": \"sha512-WTVEzK3lSFoXUovDHEbkJqCVPEPwbhCq4trDktNI6ygs7aO41d4cDT0JFAT5MivzZeVLWlg7vHL+bgrQv/t3vA==\",\n+ \"version\": \"6.5.1\",\n+ \"resolved\": \"https://registry.npmjs.org/eslint/-/eslint-6.5.1.tgz\",\n+ \"integrity\": \"sha512-32h99BoLYStT1iq1v2P9uwpyznQ4M2jRiFB6acitKz52Gqn+vPaMDUTB1bYi1WN4Nquj2w+t+bimYUG83DC55A==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/code-frame\": \"^7.0.0\",\n\"dev\": true\n},\n\"glob-parent\": {\n- \"version\": \"5.0.0\",\n- \"resolved\": \"https://registry.npmjs.org/glob-parent/-/glob-parent-5.0.0.tgz\",\n- \"integrity\": \"sha512-Z2RwiujPRGluePM6j699ktJYxmPpJKCfpGA13jz2hmFZC7gKetzrWvg5KN3+OsIFmydGyZ1AVwERCq1w/ZZwRg==\",\n+ \"version\": \"5.1.0\",\n+ \"resolved\": \"https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz\",\n+ \"integrity\": \"sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==\",\n\"dev\": true,\n\"requires\": {\n\"is-glob\": \"^4.0.1\"\n},\n\"dependencies\": {\n\"acorn\": {\n- \"version\": \"7.0.0\",\n- \"resolved\": \"https://registry.npmjs.org/acorn/-/acorn-7.0.0.tgz\",\n- \"integrity\": \"sha512-PaF/MduxijYYt7unVGRuds1vBC9bFxbNf+VWqhOClfdgy7RlVkQqt610ig1/yxTgsDIfW1cWDel5EBbOy3jdtQ==\",\n+ \"version\": \"7.1.0\",\n+ \"resolved\": \"https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz\",\n+ \"integrity\": \"sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==\",\n\"dev\": true\n},\n\"acorn-jsx\": {\n\"integrity\": \"sha512-d4sze1JNC454Wdo2fkuyzCr6aHcbL6PGGuFAz0Li/NcOm1tCHGnWDRmJP85dh9IhQErTc2svWFEX5xHIOo//kQ==\"\n},\n\"handlebars\": {\n- \"version\": \"4.1.2\",\n- \"resolved\": \"https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz\",\n- \"integrity\": \"sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==\",\n+ \"version\": \"4.4.2\",\n+ \"resolved\": \"https://registry.npmjs.org/handlebars/-/handlebars-4.4.2.tgz\",\n+ \"integrity\": \"sha512-cIv17+GhL8pHHnRJzGu2wwcthL5sb8uDKBHvZ2Dtu5s1YNt0ljbzKbamnc+gr69y7bzwQiBdr5+hOpRd5pnOdg==\",\n\"dev\": true,\n\"requires\": {\n\"neo-async\": \"^2.6.0\",\n}\n},\n\"sortablejs\": {\n- \"version\": \"1.10.0\",\n- \"resolved\": \"https://registry.npmjs.org/sortablejs/-/sortablejs-1.10.0.tgz\",\n- \"integrity\": \"sha512-+e0YakK1BxgEZpf9l9UiFaiQ8ZOBn1p/4qkkXr8QDVmYyCrUDTyDRRGm0AgW4E4cD0wtgxJ6yzIRkSPUwqhuhg==\"\n+ \"version\": \"1.10.1\",\n+ \"resolved\": \"https://registry.npmjs.org/sortablejs/-/sortablejs-1.10.1.tgz\",\n+ \"integrity\": \"sha512-N6r7GrVmO8RW1rn0cTdvK3JR0BcqecAJ0PmYMCL3ZuqTH3pY+9QyqkmJSkkLyyDvd+AJnwaxTP22Ybr/83V9hQ==\"\n},\n\"source-list-map\": {\n\"version\": \"2.0.1\",\n}\n},\n\"stylelint-config-recommended\": {\n- \"version\": \"2.2.0\",\n- \"resolved\": \"https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-2.2.0.tgz\",\n- \"integrity\": \"sha512-bZ+d4RiNEfmoR74KZtCKmsABdBJr4iXRiCso+6LtMJPw5rd/KnxUWTxht7TbafrTJK1YRjNgnN0iVZaJfc3xJA==\"\n+ \"version\": \"3.0.0\",\n+ \"resolved\": \"https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-3.0.0.tgz\",\n+ \"integrity\": \"sha512-F6yTRuc06xr1h5Qw/ykb2LuFynJ2IxkKfCMf+1xqPffkxh0S09Zc902XCffcsw/XMFq/OzQ1w54fLIDtmRNHnQ==\"\n},\n\"stylelint-config-recommended-scss\": {\n- \"version\": \"3.3.0\",\n- \"resolved\": \"https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-3.3.0.tgz\",\n- \"integrity\": \"sha512-BvuuLYwoet8JutOP7K1a8YaiENN+0HQn390eDi0SWe1h7Uhx6O3GUQ6Ubgie9b/AmHX4Btmp+ZzVGbzriFTBcA==\",\n+ \"version\": \"4.0.0\",\n+ \"resolved\": \"https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-4.0.0.tgz\",\n+ \"integrity\": \"sha512-aEy0ENUrH4ASgFCu2mMcqBUAX0l4CPXg0XucJXdW+I7mdqJ7ICddkxP1eamBNBZ1QToc/wsuLmTQcalk3qYpsw==\",\n\"requires\": {\n- \"stylelint-config-recommended\": \"^2.2.0\"\n+ \"stylelint-config-recommended\": \"^3.0.0\"\n}\n},\n\"stylelint-config-standard\": {\n}\n},\n\"terser\": {\n- \"version\": \"4.3.3\",\n- \"resolved\": \"https://registry.npmjs.org/terser/-/terser-4.3.3.tgz\",\n- \"integrity\": \"sha512-Nzr7dpRjSzMEUS+z2UYQBtzE0LDm5k0Yy8RgLRPy85QUo1TjU5lIOBwzS5/FVAMaVyHZ3WTTU2BuQcMn8KXnNQ==\",\n+ \"version\": \"4.3.6\",\n+ \"resolved\": \"https://registry.npmjs.org/terser/-/terser-4.3.6.tgz\",\n+ \"integrity\": \"sha512-QQXGTgXT7zET9IbGSdRvExcL+rFZGiOxMDbPg1W0tc5gqbX6m7J6Eu0W3fQ2bK5Dks1WSvC2xAKOH+mzAuMLcg==\",\n\"requires\": {\n\"commander\": \"^2.20.0\",\n\"source-map\": \"~0.6.1\",\n},\n\"dependencies\": {\n\"commander\": {\n- \"version\": \"2.20.0\",\n- \"resolved\": \"https://registry.npmjs.org/commander/-/commander-2.20.0.tgz\",\n- \"integrity\": \"sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==\"\n+ \"version\": \"2.20.1\",\n+ \"resolved\": \"https://registry.npmjs.org/commander/-/commander-2.20.1.tgz\",\n+ \"integrity\": \"sha512-cCuLsMhJeWQ/ZpsFTbE765kvVfoeSddc4nU3up4fV+fDBcfUXnbITJ+JzhkdjzOqhURjZgujxaioam4RM9yGUg==\"\n}\n}\n},\n}\n},\n\"vuedraggable\": {\n- \"version\": \"2.23.1\",\n- \"resolved\": \"https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.23.1.tgz\",\n- \"integrity\": \"sha512-YgWnG7RC/V+nPksueT9cUGzvj7gBYqpEomazuAK5bBcImuPAeLsq0hwE5kSGItbHQpVnYdT/QX1kRR1XsjNeqw==\",\n+ \"version\": \"2.23.2\",\n+ \"resolved\": \"https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.23.2.tgz\",\n+ \"integrity\": \"sha512-PgHCjUpxEAEZJq36ys49HfQmXglattf/7ofOzUrW2/rRdG7tu6fK84ir14t1jYv4kdXewTEa2ieKEAhhEMdwkQ==\",\n\"requires\": {\n- \"sortablejs\": \"^1.10.0\"\n+ \"sortablejs\": \"^1.10.1\"\n}\n},\n\"vuex\": {\n"
},
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "\"register-service-worker\": \"^1.6.2\",\n\"selectize\": \"^0.12.6\",\n\"simplemde\": \"^1.11.2\",\n- \"stylelint-config-recommended-scss\": \"^3.3.0\",\n+ \"stylelint-config-recommended-scss\": \"^4.0.0\",\n\"stylelint-scss\": \"^3.11.1\",\n- \"terser\": \"^4.3.3\",\n+ \"terser\": \"^4.3.6\",\n\"tinycolor2\": \"^1.4.1\",\n\"vue\": \"^2.6.10\",\n\"vue-flatpickr-component\": \"^8.1.3\",\n\"vue-multiselect\": \"^2.1.6\",\n\"vue-simplemde\": \"^1.0.0\",\n\"vue-trumbowyg\": \"^3.4.2\",\n- \"vuedraggable\": \"^2.23.1\",\n+ \"vuedraggable\": \"^2.23.2\",\n\"vuex\": \"^3.1.1\",\n\"zxcvbn\": \"^4.4.2\"\n},\n\"@symfony/webpack-encore\": \"^0.28.0\",\n\"@vue/test-utils\": \"^1.0.0-beta.29\",\n\"ajv-keywords\": \"^3.4.1\",\n- \"autoprefixer\": \"^9.6.1\",\n+ \"autoprefixer\": \"^9.6.2\",\n\"babel-core\": \"^7.0.0-bridge.0\",\n\"babel-eslint\": \"^10.0.3\",\n\"babel-jest\": \"^24.9.0\",\n- \"eslint\": \"^6.4.0\",\n+ \"eslint\": \"^6.5.1\",\n\"eslint-config-prettier\": \"^6.3.0\",\n\"eslint-plugin-prettier\": \"^3.1.1\",\n\"eslint-plugin-standard\": \"^4.0.1\",\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
[chore] Updating NPM deps
|
95,176 |
05.10.2019 22:47:47
| -7,200 |
a6d2b99ab73cf234f5baa4568417fd9128c2e8d6
|
Fix singleton contentType menu bug when no record exists
|
[
{
"change_type": "MODIFY",
"old_path": "assets/js/app/sidebar/Components/Menu/index.vue",
"new_path": "assets/js/app/sidebar/Components/Menu/index.vue",
"diff": "@@ -40,7 +40,7 @@ export default {\nprops: ['menu'],\nmethods: {\nsingleton(item) {\n- if (item.submenu !== null) {\n+ if (item.submenu.lenght && item.submenu !== null) {\nreturn item.submenu[0].editLink;\n} else {\nreturn item.link_new;\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Fix singleton contentType menu bug when no record exists
|
95,176 |
06.10.2019 11:03:03
| -7,200 |
197be30feda7af4bb0428230b968acba956a3298
|
Fixed typo in property length
|
[
{
"change_type": "MODIFY",
"old_path": "assets/js/app/sidebar/Components/Menu/index.vue",
"new_path": "assets/js/app/sidebar/Components/Menu/index.vue",
"diff": "@@ -40,7 +40,7 @@ export default {\nprops: ['menu'],\nmethods: {\nsingleton(item) {\n- if (item.submenu.lenght && item.submenu !== null) {\n+ if (item.submenu.length && item.submenu !== null) {\nreturn item.submenu[0].editLink;\n} else {\nreturn item.link_new;\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Fixed typo in property length
|
95,144 |
06.10.2019 15:14:57
| -7,200 |
98b92c0715cda5c768006fb2a3a708320c0c8f91
|
Update ContentRepository to use JSON functions
|
[
{
"change_type": "MODIFY",
"old_path": "src/Repository/ContentRepository.php",
"new_path": "src/Repository/ContentRepository.php",
"diff": "@@ -6,6 +6,7 @@ namespace Bolt\\Repository;\nuse Bolt\\Common\\Json;\nuse Bolt\\Configuration\\Content\\ContentType;\n+use Bolt\\Doctrine\\Version;\nuse Bolt\\Entity\\Content;\nuse Bolt\\Enum\\Statuses;\nuse Doctrine\\Bundle\\DoctrineBundle\\Repository\\ServiceEntityRepository;\n@@ -222,7 +223,18 @@ class ContentRepository extends ServiceEntityRepository\npublic function findOneBySlug(string $slug): ?Content\n{\n- return $this->getQueryBuilder()\n+ $qb = $this->getQueryBuilder();\n+\n+ // Because Mysql 5.6 and Sqlite handle values in JSON differently, we\n+ // need to adapt the query.\n+ if (Version::useJsonFunction($qb)) {\n+ $where = \"JSON_EXTRACT(slug.value, '$[0]')\";\n+ } else {\n+ $where = 'slug.value';\n+ $value = Json::json_encode([$slug]);\n+ }\n+\n+ return $qb()\n->innerJoin('content.fields', 'field')\n->innerJoin(\n\\Bolt\\Entity\\Field\\SlugField::class,\n@@ -230,8 +242,8 @@ class ContentRepository extends ServiceEntityRepository\n'WITH',\n'field.id = slug.id'\n)\n- ->andWhere('slug.value = :slug')\n- ->setParameter('slug', Json::json_encode([$slug]))\n+ ->andWhere($where . ' = :slug')\n+ ->setParameter('slug', $value)\n->setMaxResults(1)\n->getQuery()\n->getOneOrNullResult();\n@@ -239,10 +251,21 @@ class ContentRepository extends ServiceEntityRepository\npublic function findOneByFieldValue(string $fieldName, $value): ?Content\n{\n- return $this->getQueryBuilder()\n+ $qb = $this->getQueryBuilder();\n+\n+ // Because Mysql 5.6 and Sqlite handle values in JSON differently, we\n+ // need to adapt the query.\n+ if (Version::useJsonFunction($qb)) {\n+ $where = \"JSON_EXTRACT(field.value, '$[0]')\";\n+ } else {\n+ $where = 'field.value';\n+ $value = Json::json_encode([$value]);\n+ }\n+\n+ return $qb\n->innerJoin('content.fields', 'field')\n- ->andWhere('field.value = :value')\n- ->setParameter('value', Json::json_encode([$value]))\n+ ->andWhere($where . ' = :value')\n+ ->setParameter('value', $value)\n->setMaxResults(1)\n->getQuery()\n->getOneOrNullResult();\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Update ContentRepository to use JSON functions
|
95,144 |
08.10.2019 16:58:30
| -7,200 |
9930ad4249085b5a93b004e5361c8436833f0d6e
|
Handling JSON in doctrine queries slightly nicer
|
[
{
"change_type": "ADD",
"old_path": null,
"new_path": "src/Doctrine/JsonHelper.php",
"diff": "+<?php\n+\n+declare(strict_types=1);\n+\n+namespace Bolt\\Doctrine;\n+\n+use Bolt\\Common\\Json;\n+use Doctrine\\DBAL\\Platforms\\MariaDb1027Platform;\n+use Doctrine\\DBAL\\Platforms\\MySQL57Platform;\n+use Doctrine\\DBAL\\Platforms\\MySQL80Platform;\n+use Doctrine\\DBAL\\Platforms\\SqlitePlatform;\n+use Doctrine\\ORM\\QueryBuilder;\n+\n+class JsonHelper\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+ */\n+ public static function useJsonFunction(QueryBuilder $qb): bool\n+ {\n+ $platform = $qb->getEntityManager()->getConnection()->getDatabasePlatform();\n+\n+ if ($platform instanceof SqlitePlatform) {\n+ // @todo We need to determine somehow if SQLite was loaded with the JSON1 extension.\n+ return false;\n+ }\n+\n+ if ($platform instanceof MySQL57Platform || $platform instanceof MySQL80Platform || $platform instanceof MariaDb1027Platform) {\n+ return true;\n+ }\n+\n+ return false;\n+ }\n+\n+ /**\n+ * Prepare a given $where and $slug to be used in a query, depending on\n+ * whether or not the current platform supports JSON functions\n+ *\n+ * For example, wrapJsonFunction('foo', 'bar') gives:\n+ *\n+ * Sqlite, Mysql 5.6 -> [ 'foo', '[\"bar\"]' ]\n+ * Mysql 5.7 -> [ \"JSON_EXTRACT(foo, '$[0]')\", 'bar' ]\n+ */\n+ public static function wrapJsonFunction(string $where, string $slug, QueryBuilder $qb): array\n+ {\n+ if (self::useJsonFunction($qb)) {\n+ $where = 'JSON_EXTRACT(' . $where . \", '$[0]')\";\n+ } else {\n+ $slug = Json::json_encode([$slug]);\n+ }\n+\n+ return [$where, $slug];\n+ }\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Doctrine/Version.php",
"new_path": "src/Doctrine/Version.php",
"diff": "@@ -6,11 +6,6 @@ namespace Bolt\\Doctrine;\nuse Doctrine\\DBAL\\Connection;\nuse Doctrine\\DBAL\\Driver\\PDOConnection;\n-use Doctrine\\DBAL\\Platforms\\MariaDb1027Platform;\n-use Doctrine\\DBAL\\Platforms\\MySQL57Platform;\n-use Doctrine\\DBAL\\Platforms\\MySQL80Platform;\n-use Doctrine\\DBAL\\Platforms\\SqlitePlatform;\n-use Doctrine\\ORM\\QueryBuilder;\nclass Version\n{\n@@ -22,26 +17,6 @@ class Version\n$this->connection = $connection;\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- */\n- public static function useJsonFunction(QueryBuilder $qb): bool\n- {\n- $platform = $qb->getEntityManager()->getConnection()->getDatabasePlatform();\n-\n- if ($platform instanceof SqlitePlatform) {\n- // @todo We need to determine somehow if SQLite was loaded with the JSON1 extension.\n- return false;\n- }\n-\n- if ($platform instanceof MySQL57Platform || $platform instanceof MySQL80Platform || $platform instanceof MariaDb1027Platform) {\n- return true;\n- }\n-\n- return false;\n- }\n-\npublic function getPlatform(): array\n{\n/** @var PDOConnection $wrapped */\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Repository/ContentRepository.php",
"new_path": "src/Repository/ContentRepository.php",
"diff": "@@ -4,9 +4,8 @@ declare(strict_types=1);\nnamespace Bolt\\Repository;\n-use Bolt\\Common\\Json;\nuse Bolt\\Configuration\\Content\\ContentType;\n-use Bolt\\Doctrine\\Version;\n+use Bolt\\Doctrine\\JsonHelper;\nuse Bolt\\Entity\\Content;\nuse Bolt\\Enum\\Statuses;\nuse Doctrine\\Bundle\\DoctrineBundle\\Repository\\ServiceEntityRepository;\n@@ -225,14 +224,7 @@ class ContentRepository extends ServiceEntityRepository\n{\n$qb = $this->getQueryBuilder();\n- // Because Mysql 5.6 and Sqlite handle values in JSON differently, we\n- // need to adapt the query.\n- if (Version::useJsonFunction($qb)) {\n- $where = \"JSON_EXTRACT(slug.value, '$[0]')\";\n- } else {\n- $where = 'slug.value';\n- $slug = Json::json_encode([$slug]);\n- }\n+ [$where, $slug] = JsonHelper::wrapJsonFunction('slug.value', $slug, $qb);\nreturn $qb\n->innerJoin('content.fields', 'field')\n@@ -253,14 +245,7 @@ class ContentRepository extends ServiceEntityRepository\n{\n$qb = $this->getQueryBuilder();\n- // Because Mysql 5.6 and Sqlite handle values in JSON differently, we\n- // need to adapt the query.\n- if (Version::useJsonFunction($qb)) {\n- $where = \"JSON_EXTRACT(field.value, '$[0]')\";\n- } else {\n- $where = 'field.value';\n- $value = Json::json_encode([$value]);\n- }\n+ [$where, $value] = JsonHelper::wrapJsonFunction('field.value', $value, $qb);\nreturn $qb\n->innerJoin('content.fields', 'field')\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Repository/FieldRepository.php",
"new_path": "src/Repository/FieldRepository.php",
"diff": "@@ -4,8 +4,7 @@ declare(strict_types=1);\nnamespace Bolt\\Repository;\n-use Bolt\\Common\\Json;\n-use Bolt\\Doctrine\\Version;\n+use Bolt\\Doctrine\\JsonHelper;\nuse Bolt\\Entity\\Field;\nuse Doctrine\\Bundle\\DoctrineBundle\\Repository\\ServiceEntityRepository;\nuse Doctrine\\ORM\\QueryBuilder;\n@@ -33,14 +32,7 @@ class FieldRepository extends ServiceEntityRepository\n{\n$qb = $this->getQueryBuilder();\n- // Because Mysql 5.6 and Sqlite handle values in JSON differently, we\n- // need to adapt the query.\n- if (Version::useJsonFunction($qb)) {\n- $where = \"JSON_EXTRACT(field.value, '$[0]')\";\n- } else {\n- $where = 'field.value';\n- $slug = Json::json_encode([$slug]);\n- }\n+ [$where, $slug] = JsonHelper::wrapJsonFunction('field.value', $slug, $qb);\nreturn $qb\n->andWhere($where . ' = :slug')\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Storage/SelectQuery.php",
"new_path": "src/Storage/SelectQuery.php",
"diff": "@@ -4,8 +4,7 @@ declare(strict_types=1);\nnamespace Bolt\\Storage;\n-use Bolt\\Common\\Json;\n-use Bolt\\Doctrine\\Version;\n+use Bolt\\Doctrine\\JsonHelper;\nuse Doctrine\\ORM\\Query\\Expr\\Base;\nuse Doctrine\\ORM\\Query\\ParameterTypeInferer;\nuse Doctrine\\ORM\\QueryBuilder;\n@@ -319,13 +318,7 @@ class SelectQuery implements ContentQueryInterface\n$originalLeftExpression = 'content.' . $key;\n- // Because Mysql 5.6 and Sqlite handle values in JSON differently,\n- // we need to adapt the query.\n- if (Version::useJsonFunction($this->qb)) {\n- $newLeftExpression = sprintf(\"JSON_EXTRACT(%s.value, '$[0]')\", $fieldsAlias);\n- } else {\n- $newLeftExpression = sprintf('%s.value', $fieldsAlias);\n- }\n+ [$newLeftExpression, $value] = JsonHelper::wrapJsonFunction($fieldsAlias . '.value', '', $this->qb);\n$where = $filter->getExpression();\n$where = str_replace($originalLeftExpression, $newLeftExpression, $where);\n@@ -347,12 +340,11 @@ class SelectQuery implements ContentQueryInterface\n)\n)\n->setParameter($keyParam, $key);\n+\nforeach ($filter->getParameters() as $key => $value) {\n- if (Version::useJsonFunction($this->qb)) {\n+ [$newLeftExpression, $value] = JsonHelper::wrapJsonFunction('', $value, $this->qb);\n+\n$this->qb->setParameter($key, $value);\n- } else {\n- $this->qb->setParameter($key, Json::json_encode([$value]));\n- }\n}\n}\n}\n"
}
] |
PHP
|
MIT License
|
bolt/core
|
Handling JSON in doctrine queries slightly nicer
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.