author
int64
658
755k
date
stringlengths
19
19
timezone
int64
-46,800
43.2k
hash
stringlengths
40
40
message
stringlengths
5
490
mods
list
language
stringclasses
20 values
license
stringclasses
3 values
repo
stringlengths
5
68
original_message
stringlengths
12
491
95,144
19.08.2020 16:38:28
-7,200
2de73c6776ecdc26798b14bc27961b15d677d7b6
Update src/Controller/TwigAwareController.php
[ { "change_type": "MODIFY", "old_path": "src/Controller/TwigAwareController.php", "new_path": "src/Controller/TwigAwareController.php", "diff": "@@ -62,7 +62,7 @@ class TwigAwareController extends AbstractController\n}\n/**\n- * @deprecated since Bolt 4.0, use \"renderTemplate()\" instead\n+ * @deprecated since Bolt 4.0, use \"render()\" instead\n*/\npublic function renderTemplate($template, array $parameters = [], ?Response $response = null): Response\n{\n" } ]
PHP
MIT License
bolt/core
Update src/Controller/TwigAwareController.php
95,144
20.08.2020 20:59:45
-7,200
e732645d31d496eee5b929fc755846fa2abfc239
Add "Number" and "Date" fields
[ { "change_type": "MODIFY", "old_path": "templates/helpers/_field_blocks.twig", "new_path": "templates/helpers/_field_blocks.twig", "diff": "{{ field.value.responsive_inline|raw }}\n{% endif %}\n+ {# Number fields #}\n+ {% if type == \"number\" %}\n+ <p><strong>{{ field|label }}</strong>: <code>{{ field }}</code></p>\n+ {% endif %}\n+\n+ {# Date / Datetime fields #}\n+ {% if type == \"date\" %}\n+ <p>\n+ <strong>{{ field|label }}</strong>: {{ field|localedatetime(\"%A %B %e, %Y\") }}\n+ {%- if field.definition.mode == 'datetime' %}, {{ field|localedatetime(\"%H:%M:%S\") }}{% endif %}\n+ </p>\n+ {% endif %}\n+\n{# No special cases defined for other fieldtypes. We just output them if\nthey're a simple scalar, and 'dump' them otherwise. #}\n{% if type not in allfields and field is not empty %}\n" } ]
PHP
MIT License
bolt/core
Add "Number" and "Date" fields
95,144
22.08.2020 11:13:46
-7,200
bf535c9c79d62f86a4127f4fd5d256d579b8e2d3
Make "required" for Date fields work
[ { "change_type": "MODIFY", "old_path": "assets/js/app/editor/Components/Date.vue", "new_path": "assets/js/app/editor/Components/Date.vue", "diff": "<script>\nimport value from '../mixins/value';\nimport flatPickr from 'vue-flatpickr-component';\n+import $ from 'jquery';\nexport default {\nname: 'EditorDate',\n@@ -120,6 +121,14 @@ export default {\n}\n},\n- mounted() {},\n+ mounted() {\n+ // Standard HTML validation doesn't work for fields that are 'readonly'. We\n+ // this hack makes the field \"editable\" but have it lose focus if focused.\n+ // @see https://github.com/flatpickr/flatpickr/issues/892\n+ $('#datetimepicker').on('focus', ({ currentTarget }) =>\n+ $(currentTarget).blur(),\n+ );\n+ $('#datetimepicker').prop('readonly', false);\n+ },\n};\n</script>\n" } ]
PHP
MIT License
bolt/core
Make "required" for Date fields work
95,144
22.08.2020 11:37:46
-7,200
2bee3fe3cca7e8fe4fac1f175508d6e2cce8e95a
Make relative dates work for fields that have an underscore in their name
[ { "change_type": "MODIFY", "old_path": "src/Storage/SelectQuery.php", "new_path": "src/Storage/SelectQuery.php", "diff": "@@ -269,7 +269,7 @@ class SelectQuery implements QueryInterface\n}\nforeach ($this->getWhereParameters() as $key => $param) {\n- $fieldName = current(explode('_', $key));\n+ $fieldName = preg_replace('/(_[0-9]+)$/', '', $key);\n// Use strtotime on 'date' fields to allow selections like \"today\", \"in 3 weeks\" or \"this year\"\nif (in_array($fieldName, $dateFields, true) && (strtotime($param) !== false)) {\n$param = date('c', strtotime($param));\n" } ]
PHP
MIT License
bolt/core
Make relative dates work for fields that have an underscore in their name
95,144
22.08.2020 12:15:34
-7,200
15299511097df72109a9245fc9fca44d1349a31a
Remove the hover on the left-hand side logo
[ { "change_type": "MODIFY", "old_path": "assets/scss/modules/admin/_toolbar.scss", "new_path": "assets/scss/modules/admin/_toolbar.scss", "diff": "}\n&__brand {\n+\n+ justify-content: left;\n+ padding-left: 2rem;\n+\n@include media-breakpoint-up(lg) {\nflex: 0 1 $admin-sidebar-width;\n}\nmargin-right: 0.25rem;\n}\n- .dropdown-toggle {\n- padding: 0 0.8125rem;\n- width: 45px;\n- overflow: hidden;\n-\n- @include media-breakpoint-up(sm) {\n- width: auto;\n- overflow: auto;\n- padding: 0 1rem;\n- }\n-\n- @include media-breakpoint-up(lg) {\n+ div {\ntext-align: left;\n}\n- &::after {\n- vertical-align: middle;\n- }\n- }\n-\n- .dropdown-menu {\n- @include media-breakpoint-up(wd) {\n- min-width: 251px;\n- }\n- }\n-\n&__new {\n.fas {\nposition: relative;\n" } ]
PHP
MIT License
bolt/core
Remove the hover on the left-hand side logo
95,144
22.08.2020 12:25:37
-7,200
c2e67efb1cc21cfc2426a3ba4ab8ad18ef9ba148
Tweaking default Skeleton theme
[ { "change_type": "MODIFY", "old_path": "public/theme/skeleton/css/new.css", "new_path": "public/theme/skeleton/css/new.css", "diff": "@@ -545,3 +545,43 @@ code {\npadding: 3px 3px;\nfont-size: 0.9rem;\n}\n+\n+\n+/* Default grid, as used by the Article field type */\n+.article-grid {\n+ display: grid;\n+ grid-template-columns: repeat(12, 1fr);\n+ grid-column-gap: 2rem;\n+ grid-row-gap: 1rem;\n+}\n+\n+.article-grid + .article-grid {\n+ margin-top: 1rem;\n+}\n+\n+.article-grid figure, .article-grid img {\n+ margin: 0;\n+}\n+\n+.article-grid .col-1 { grid-column: span 1; }\n+.article-grid .col-2 { grid-column: span 2; }\n+.article-grid .col-3 { grid-column: span 3; }\n+.article-grid .col-4 { grid-column: span 4; }\n+.article-grid .col-5 { grid-column: span 5; }\n+.article-grid .col-6 { grid-column: span 6; }\n+.article-grid .col-7 { grid-column: span 7; }\n+.article-grid .col-8 { grid-column: span 8; }\n+.article-grid .col-9 { grid-column: span 9; }\n+.article-grid .col-10 { grid-column: span 10; }\n+.article-grid .col-11 { grid-column: span 11; }\n+.article-grid .col-12 { grid-column: span 12; }\n+\n+@media only screen and (max-width: 600px) {\n+ .article-grid {\n+ grid-template-columns: repeat(1, 1fr);\n+ }\n+ .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {\n+ grid-column: span 1;\n+ margin-bottom: 1rem;\n+ }\n+}\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "public/theme/skeleton/partials/_aside.twig", "new_path": "public/theme/skeleton/partials/_aside.twig", "diff": "</div>\n- {# The next section iterates over all of the content types, and prints a list\n- of the three latest records of each of them. The 'magic' happens in the\n- setcontent tag.. 'ct.slug latest limit 3' fetches 3 records with the given\n- ContentType, ordered by their descending id.\n- The 'else' in the inner for-loop is only used if there are no 'records',\n+ {# The next section iterates over all of the ContentTypes, and prints a\n+ list of the three latest records of each of them. The 'magic' happens in\n+ the setcontent tag: `ct.slug latest limit 3` fetches 3 records from the\n+ given ContentType, ordered by their descending id.\n+ The `else` in the inner for-loop is only used if there are no 'records',\nso we can use it to print a helpful message.\n- Lastly, \"path('listing', {'contentTypeSlug': ct.slug})\" will output something like '/pages',\n- effectively creating a working link to that contenttype's listing page. #}\n+ Lastly, `path('listing', {'contentTypeSlug': ct.slug})` will output\n+ something like '/pages', effectively creating a working link to that\n+ ContentTypes's listing page. #}\n{% for ct in config.get('contenttypes')|filter(ct => not ct.viewless) %}\n" }, { "change_type": "MODIFY", "old_path": "public/theme/skeleton/partials/_image.twig", "new_path": "public/theme/skeleton/partials/_image.twig", "diff": "{% if image %}\n<div class=\"imageholder\">\n<a href=\"{{ record|image }}\">\n- <img src=\"{{ thumbnail(image, 1368, 1026) }}\" alt=\"{{ image.alt|default(record|title) }}\">\n+ <img src=\"{{ thumbnail(record, 1368, 1026) }}\" alt=\"{{ (record|image).alt|default(record|title) }}\">\n</a>\n{% if image.alt %}\n<small>{{ image.alt }}</small>\n" }, { "change_type": "MODIFY", "old_path": "public/theme/skeleton/partials/_sub_menu.twig", "new_path": "public/theme/skeleton/partials/_sub_menu.twig", "diff": "{{ item|current ? ' active' }}\">\n<a href=\"{{ item.uri }}\" title='{{ item.title }}' class='{{ item.class }}'>\n- {{- item.label -}}\n+ {{- item.label|default(item.title) -}}\n</a>\n{% if with_submenu %}\n" } ]
PHP
MIT License
bolt/core
Tweaking default Skeleton theme
95,144
22.08.2020 12:34:50
-7,200
8c97dd544d9a94bf1593c7b2f849c87596384da1
Prepare release 4.0.0-rc.36
[ { "change_type": "MODIFY", "old_path": "package-lock.json", "new_path": "package-lock.json", "diff": "}\n},\n\"@babel/core\": {\n- \"version\": \"7.11.1\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/core/-/core-7.11.1.tgz\",\n- \"integrity\": \"sha512-XqF7F6FWQdKGGWAzGELL+aCO1p+lRY5Tj5/tbT3St1G8NaH70jhhDIKknIZaDans0OQBG5wRAldROLHSt44BgQ==\",\n+ \"version\": \"7.11.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/core/-/core-7.11.4.tgz\",\n+ \"integrity\": \"sha512-5deljj5HlqRXN+5oJTY7Zs37iH3z3b++KjiKtIsJy1NrjOOVSEaJHEetLBhyu0aQOSNNZ/0IuEAan9GzRuDXHg==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/code-frame\": \"^7.10.4\",\n- \"@babel/generator\": \"^7.11.0\",\n+ \"@babel/generator\": \"^7.11.4\",\n\"@babel/helper-module-transforms\": \"^7.11.0\",\n\"@babel/helpers\": \"^7.10.4\",\n- \"@babel/parser\": \"^7.11.1\",\n+ \"@babel/parser\": \"^7.11.4\",\n\"@babel/template\": \"^7.10.4\",\n\"@babel/traverse\": \"^7.11.0\",\n\"@babel/types\": \"^7.11.0\",\n}\n},\n\"@babel/generator\": {\n- \"version\": \"7.11.0\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.11.0.tgz\",\n- \"integrity\": \"sha512-fEm3Uzw7Mc9Xi//qU20cBKatTfs2aOtKqmvy/Vm7RkJEGFQ4xc9myCfbXxqK//ZS8MR/ciOHw6meGASJuKmDfQ==\",\n+ \"version\": \"7.11.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.11.4.tgz\",\n+ \"integrity\": \"sha512-Rn26vueFx0eOoz7iifCN2UHT6rGtnkSGWSoDRIy8jZN3B91PzeSULbswfLoOWuTuAcNwpG/mxy+uCTDnZ9Mp1g==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/types\": \"^7.11.0\",\n}\n},\n\"@babel/parser\": {\n- \"version\": \"7.11.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.11.3.tgz\",\n- \"integrity\": \"sha512-REo8xv7+sDxkKvoxEywIdsNFiZLybwdI7hcT5uEPyQrSMB4YQ973BfC9OOrD/81MaIjh6UxdulIQXkjmiH3PcA==\",\n+ \"version\": \"7.11.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.11.4.tgz\",\n+ \"integrity\": \"sha512-MggwidiH+E9j5Sh8pbrX5sJvMcsqS5o+7iB42M9/k0CD63MjYbdP4nhSh7uB5wnv2/RVzTZFTxzF/kIa5mrCqA==\",\n\"dev\": true\n},\n\"@babel/template\": {\n}\n},\n\"lodash\": {\n- \"version\": \"4.17.19\",\n- \"resolved\": \"https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz\",\n- \"integrity\": \"sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==\",\n+ \"version\": \"4.17.20\",\n+ \"resolved\": \"https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz\",\n+ \"integrity\": \"sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==\",\n\"dev\": true\n},\n\"semver\": {\n}\n},\n\"@babel/generator\": {\n- \"version\": \"7.11.0\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.11.0.tgz\",\n- \"integrity\": \"sha512-fEm3Uzw7Mc9Xi//qU20cBKatTfs2aOtKqmvy/Vm7RkJEGFQ4xc9myCfbXxqK//ZS8MR/ciOHw6meGASJuKmDfQ==\",\n+ \"version\": \"7.11.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.11.4.tgz\",\n+ \"integrity\": \"sha512-Rn26vueFx0eOoz7iifCN2UHT6rGtnkSGWSoDRIy8jZN3B91PzeSULbswfLoOWuTuAcNwpG/mxy+uCTDnZ9Mp1g==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/types\": \"^7.11.0\",\n}\n},\n\"@babel/parser\": {\n- \"version\": \"7.11.3\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.11.3.tgz\",\n- \"integrity\": \"sha512-REo8xv7+sDxkKvoxEywIdsNFiZLybwdI7hcT5uEPyQrSMB4YQ973BfC9OOrD/81MaIjh6UxdulIQXkjmiH3PcA==\",\n+ \"version\": \"7.11.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.11.4.tgz\",\n+ \"integrity\": \"sha512-MggwidiH+E9j5Sh8pbrX5sJvMcsqS5o+7iB42M9/k0CD63MjYbdP4nhSh7uB5wnv2/RVzTZFTxzF/kIa5mrCqA==\",\n\"dev\": true\n},\n\"@babel/template\": {\n}\n},\n\"lodash\": {\n- \"version\": \"4.17.19\",\n- \"resolved\": \"https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz\",\n- \"integrity\": \"sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==\",\n+ \"version\": \"4.17.20\",\n+ \"resolved\": \"https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz\",\n+ \"integrity\": \"sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==\",\n\"dev\": true\n},\n\"source-map\": {\n\"dev\": true\n},\n\"@vue/cli-overlay\": {\n- \"version\": \"4.5.3\",\n- \"resolved\": \"https://registry.npmjs.org/@vue/cli-overlay/-/cli-overlay-4.5.3.tgz\",\n- \"integrity\": \"sha512-CHIiZEZlcb2HlZNIU6ZgNfTysNZWokQGzStfrCrQMXUXG0ffBRoi8K/kXNox2HxSfrT1Swi4NqREdPXefZJgNQ==\"\n+ \"version\": \"4.5.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@vue/cli-overlay/-/cli-overlay-4.5.4.tgz\",\n+ \"integrity\": \"sha512-nthli1n7rXaqaMZsH0KNdFqeYJxDOQNeaobp9SjeSdrpD1xAj/B0+RJMWQWIFsfdQn1AQP1UVMnkfdakTiLgxA==\"\n},\n\"@vue/cli-plugin-router\": {\n- \"version\": \"4.5.3\",\n- \"resolved\": \"https://registry.npmjs.org/@vue/cli-plugin-router/-/cli-plugin-router-4.5.3.tgz\",\n- \"integrity\": \"sha512-e0EqfwY4AGar1SX3rqD58QMoMYIxRD0AUauNiwSmuGjyA0Fr4Lfl1gBEPDCMZ5jIsO/4QNBateQGUy1S/GlxAw==\",\n+ \"version\": \"4.5.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@vue/cli-plugin-router/-/cli-plugin-router-4.5.4.tgz\",\n+ \"integrity\": \"sha512-9/qRICZbq1qucq9M9z6jYT5UWNvcTu9BgHtXgsaK9gJsdmpxDIfD0SvW9nzZaHb8xxixvDRotMM/0Juw2oCsKQ==\",\n\"requires\": {\n- \"@vue/cli-shared-utils\": \"^4.5.3\"\n+ \"@vue/cli-shared-utils\": \"^4.5.4\"\n}\n},\n\"@vue/cli-plugin-vuex\": {\n- \"version\": \"4.5.3\",\n- \"resolved\": \"https://registry.npmjs.org/@vue/cli-plugin-vuex/-/cli-plugin-vuex-4.5.3.tgz\",\n- \"integrity\": \"sha512-23AAuaVbng6OUc5l7VHEGqCNiL1g1BsZL99X1rvKRttjDpdIYHtQAFsXjcTFitGpHRWoA9dgeujj/MkBPa1TcA==\"\n+ \"version\": \"4.5.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@vue/cli-plugin-vuex/-/cli-plugin-vuex-4.5.4.tgz\",\n+ \"integrity\": \"sha512-X/F4E/dIRdiogKCdO4VGjUy5f4Fbxs7mu/gSi6Ubltle0eNE+tbBgLPH4r2g7GmHKNph4k39ikvfOMpXZcTFZg==\"\n},\n\"@vue/cli-service\": {\n- \"version\": \"4.5.3\",\n- \"resolved\": \"https://registry.npmjs.org/@vue/cli-service/-/cli-service-4.5.3.tgz\",\n- \"integrity\": \"sha512-AufXUW+n8Wh9pqJu1v9Uh+6Sx6HdDrRopHMhUB/FrXhLFFPXRDo+s9zFC5QuJSt+roR0oBwmAp/x6KvBFQosIQ==\",\n+ \"version\": \"4.5.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@vue/cli-service/-/cli-service-4.5.4.tgz\",\n+ \"integrity\": \"sha512-30zcebYno9tMvGsvZsnSPtieBvU5H3CkRW1JgiBmPG3Fcxp3BGSAy82Dl1gOUEj1VsAUqXWKMWX6frkYldi8UA==\",\n\"requires\": {\n\"@intervolga/optimize-cssnano-plugin\": \"^1.0.5\",\n\"@soda/friendly-errors-webpack-plugin\": \"^1.7.1\",\n\"@types/minimist\": \"^1.2.0\",\n\"@types/webpack\": \"^4.0.0\",\n\"@types/webpack-dev-server\": \"^3.11.0\",\n- \"@vue/cli-overlay\": \"^4.5.3\",\n- \"@vue/cli-plugin-router\": \"^4.5.3\",\n- \"@vue/cli-plugin-vuex\": \"^4.5.3\",\n- \"@vue/cli-shared-utils\": \"^4.5.3\",\n+ \"@vue/cli-overlay\": \"^4.5.4\",\n+ \"@vue/cli-plugin-router\": \"^4.5.4\",\n+ \"@vue/cli-plugin-vuex\": \"^4.5.4\",\n+ \"@vue/cli-shared-utils\": \"^4.5.4\",\n\"@vue/component-compiler-utils\": \"^3.1.2\",\n\"@vue/preload-webpack-plugin\": \"^1.1.0\",\n\"@vue/web-component-wrapper\": \"^1.2.0\",\n\"integrity\": \"sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==\"\n},\n\"ajv\": {\n- \"version\": \"6.12.3\",\n- \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz\",\n- \"integrity\": \"sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==\",\n+ \"version\": \"6.12.4\",\n+ \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz\",\n+ \"integrity\": \"sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==\",\n\"requires\": {\n\"fast-deep-equal\": \"^3.1.1\",\n\"fast-json-stable-stringify\": \"^2.0.0\",\n}\n},\n\"@vue/cli-shared-utils\": {\n- \"version\": \"4.5.3\",\n- \"resolved\": \"https://registry.npmjs.org/@vue/cli-shared-utils/-/cli-shared-utils-4.5.3.tgz\",\n- \"integrity\": \"sha512-AjXSll67gpYWyjGOyHrwofLuxa7vL8KM6aUQCII+cHlFQey6oLS5bAWq9qcIM0P2ZyD+6i0fooNCihIuNrX4yg==\",\n+ \"version\": \"4.5.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@vue/cli-shared-utils/-/cli-shared-utils-4.5.4.tgz\",\n+ \"integrity\": \"sha512-7ZwAvGxl5szGuaJCc4jdPy/2Lb7oJvG847MDF+7pZ7FVl6bURwbUJjiUwL6DTxvpC4vch6B4tXfVvZFjzVP/bw==\",\n\"requires\": {\n\"@hapi/joi\": \"^15.0.1\",\n\"chalk\": \"^2.4.2\",\n\"integrity\": \"sha512-LIZMuJk38pk9U9Ur4YzHjlIyMuxPlACdBIHH9/nGYVTsaGKOSnSuELiE8vS9wa+dJpIYspYUOqk+L1Q4pgHQHQ==\"\n},\n\"@vue/test-utils\": {\n- \"version\": \"1.0.3\",\n- \"resolved\": \"https://registry.npmjs.org/@vue/test-utils/-/test-utils-1.0.3.tgz\",\n- \"integrity\": \"sha512-mmsKXZSGfvd0bH05l4SNuczZ2MqlJH2DWhiul5wJXFxbf/gRRd2UL4QZgozEMQ30mRi9i4/+p4JJat8S4Js64Q==\",\n+ \"version\": \"1.0.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@vue/test-utils/-/test-utils-1.0.4.tgz\",\n+ \"integrity\": \"sha512-uIdDqFauzNJWlhltLSZU+P3uHEgUQczklSv2b1EKC7JzxBg9OY/5sx8UyuJwBD+zuxidhFZ4SjTuPgr8cdf63w==\",\n\"dev\": true,\n\"requires\": {\n\"dom-event-types\": \"^1.0.0\",\n}\n},\n\"aggregate-error\": {\n- \"version\": \"3.0.1\",\n- \"resolved\": \"https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz\",\n- \"integrity\": \"sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==\",\n+ \"version\": \"3.1.0\",\n+ \"resolved\": \"https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz\",\n+ \"integrity\": \"sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==\",\n\"requires\": {\n\"clean-stack\": \"^2.0.0\",\n\"indent-string\": \"^4.0.0\"\n},\n\"dependencies\": {\n\"ajv\": {\n- \"version\": \"6.12.3\",\n- \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz\",\n- \"integrity\": \"sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==\",\n+ \"version\": \"6.12.4\",\n+ \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz\",\n+ \"integrity\": \"sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==\",\n\"requires\": {\n\"fast-deep-equal\": \"^3.1.1\",\n\"fast-json-stable-stringify\": \"^2.0.0\",\n}\n},\n\"caniuse-lite\": {\n- \"version\": \"1.0.30001114\",\n- \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001114.tgz\",\n- \"integrity\": \"sha512-ml/zTsfNBM+T1+mjglWRPgVsu2L76GAaADKX5f4t0pbhttEp0WMawJsHDYlFkVZkoA+89uvBRrVrEE4oqenzXQ==\"\n+ \"version\": \"1.0.30001117\",\n+ \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001117.tgz\",\n+ \"integrity\": \"sha512-4tY0Fatzdx59kYjQs+bNxUwZB03ZEBgVmJ1UkFPz/Q8OLiUUbjct2EdpnXj0fvFTPej2EkbPIG0w8BWsjAyk1Q==\"\n},\n\"capture-exit\": {\n\"version\": \"2.0.0\",\n\"dev\": true\n},\n\"codemirror\": {\n- \"version\": \"5.56.0\",\n- \"resolved\": \"https://registry.npmjs.org/codemirror/-/codemirror-5.56.0.tgz\",\n- \"integrity\": \"sha512-MfKVmYgifXjQpLSgpETuih7A7WTTIsxvKfSLGseTY5+qt0E1UD1wblZGM6WLenORo8sgmf+3X+WTe2WF7mufyw==\"\n+ \"version\": \"5.57.0\",\n+ \"resolved\": \"https://registry.npmjs.org/codemirror/-/codemirror-5.57.0.tgz\",\n+ \"integrity\": \"sha512-WGc6UL7Hqt+8a6ZAsj/f1ApQl3NPvHY/UQSzG6fB6l4BjExgVdhFaxd7mRTw1UCiYe/6q86zHP+kfvBQcZGvUg==\"\n},\n\"codemirror-spell-checker\": {\n\"version\": \"1.1.2\",\n},\n\"dependencies\": {\n\"ajv\": {\n- \"version\": \"6.12.3\",\n- \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz\",\n- \"integrity\": \"sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==\",\n+ \"version\": \"6.12.4\",\n+ \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz\",\n+ \"integrity\": \"sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==\",\n\"requires\": {\n\"fast-deep-equal\": \"^3.1.1\",\n\"fast-json-stable-stringify\": \"^2.0.0\",\n},\n\"dependencies\": {\n\"ajv\": {\n- \"version\": \"6.12.3\",\n- \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz\",\n- \"integrity\": \"sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==\",\n+ \"version\": \"6.12.4\",\n+ \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz\",\n+ \"integrity\": \"sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==\",\n\"requires\": {\n\"fast-deep-equal\": \"^3.1.1\",\n\"fast-json-stable-stringify\": \"^2.0.0\",\n},\n\"is-obj\": {\n\"version\": \"1.0.1\",\n- \"resolved\": \"http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz\",\n\"integrity\": \"sha1-PkcprB9f3gJc19g6iW2rn09n2w8=\"\n},\n\"is-path-cwd\": {\n},\n\"load-json-file\": {\n\"version\": \"1.1.0\",\n- \"resolved\": \"http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz\",\n\"integrity\": \"sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=\",\n\"dev\": true,\n\"requires\": {\n},\n\"semver\": {\n\"version\": \"5.3.0\",\n- \"resolved\": \"http://registry.npmjs.org/semver/-/semver-5.3.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/semver/-/semver-5.3.0.tgz\",\n\"integrity\": \"sha1-myzl094C0XxgEq0yaqa00M9U+U8=\",\n\"dev\": true\n}\n},\n\"safe-regex\": {\n\"version\": \"1.1.0\",\n- \"resolved\": \"http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz\",\n\"integrity\": \"sha1-QKNmnzsHfR6UPURinhV91IAjvy4=\",\n\"requires\": {\n\"ret\": \"~0.1.10\"\n},\n\"strip-ansi\": {\n\"version\": \"3.0.1\",\n- \"resolved\": \"http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz\",\n\"integrity\": \"sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=\",\n\"requires\": {\n\"ansi-regex\": \"^2.0.0\"\n},\n\"strip-eof\": {\n\"version\": \"1.0.0\",\n- \"resolved\": \"http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz\",\n\"integrity\": \"sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=\"\n},\n\"strip-final-newline\": {\n},\n\"dependencies\": {\n\"ajv\": {\n- \"version\": \"6.12.3\",\n- \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz\",\n- \"integrity\": \"sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==\",\n+ \"version\": \"6.12.4\",\n+ \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz\",\n+ \"integrity\": \"sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==\",\n\"requires\": {\n\"fast-deep-equal\": \"^3.1.1\",\n\"fast-json-stable-stringify\": \"^2.0.0\",\n\"integrity\": \"sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==\"\n},\n\"vue\": {\n- \"version\": \"2.6.11\",\n- \"resolved\": \"https://registry.npmjs.org/vue/-/vue-2.6.11.tgz\",\n- \"integrity\": \"sha512-VfPwgcGABbGAue9+sfrD4PuwFar7gPb1yl1UK1MwXoQPAw0BKSqWfoYCT/ThFrdEVWoI51dBuyCoiNU9bZDZxQ==\"\n+ \"version\": \"2.6.12\",\n+ \"resolved\": \"https://registry.npmjs.org/vue/-/vue-2.6.12.tgz\",\n+ \"integrity\": \"sha512-uhmLFETqPPNyuLLbsKz6ioJ4q7AZHzD8ZVFNATNyICSZouqP2Sz0rotWQC8UNBF6VGSCs5abnKJoStA6JbCbfg==\"\n},\n\"vue-eslint-parser\": {\n\"version\": \"7.0.0\",\n\"integrity\": \"sha512-s7jmZPlm9FeueJg1RwJtnE9KNPtME/7C8uRWSfp9/yEN4M8XcS/d+bddoyVwVnvFyRh9msFo0HWeW0vTL8Qv+w==\"\n},\n\"vue-router\": {\n- \"version\": \"3.4.2\",\n- \"resolved\": \"https://registry.npmjs.org/vue-router/-/vue-router-3.4.2.tgz\",\n- \"integrity\": \"sha512-n3Ok70hW0EpcJF4lcWIwSHAQbFTnIOLl/fhO8+oTs4jHNtBNsovcVvPZeTOyKEd8C3xF1Crft2ASuOiVT5K1mw==\",\n+ \"version\": \"3.4.3\",\n+ \"resolved\": \"https://registry.npmjs.org/vue-router/-/vue-router-3.4.3.tgz\",\n+ \"integrity\": \"sha512-BADg1mjGWX18Dpmy6bOGzGNnk7B/ZA0RxuA6qedY/YJwirMfKXIDzcccmHbQI0A6k5PzMdMloc0ElHfyOoX35A==\",\n\"dev\": true\n},\n\"vue-simplemde\": {\n}\n},\n\"vue-template-compiler\": {\n- \"version\": \"2.6.11\",\n- \"resolved\": \"https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.6.11.tgz\",\n- \"integrity\": \"sha512-KIq15bvQDrcCjpGjrAhx4mUlyyHfdmTaoNfeoATHLAiWB+MU3cx4lOzMwrnUh9cCxy0Lt1T11hAFY6TQgroUAA==\",\n+ \"version\": \"2.6.12\",\n+ \"resolved\": \"https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.6.12.tgz\",\n+ \"integrity\": \"sha512-OzzZ52zS41YUbkCBfdXShQTe69j1gQDZ9HIX8miuC9C3rBCk9wIRjLiZZLrmX9V+Ftq/YEyv1JaVr5Y/hNtByg==\",\n\"dev\": true,\n\"requires\": {\n\"de-indent\": \"^1.0.2\",\n}\n},\n\"vuedraggable\": {\n- \"version\": \"2.24.0\",\n- \"resolved\": \"https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.24.0.tgz\",\n- \"integrity\": \"sha512-IlslPpc+iZ2zPNSJbydFZIDrE+don5u+Nc/bjT2YaF+Azidc+wxxJKfKT0NwE68AKk0syb0YbZneAcnynqREZQ==\",\n+ \"version\": \"2.24.1\",\n+ \"resolved\": \"https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.24.1.tgz\",\n+ \"integrity\": \"sha512-G1fxO1oshx+WLdieSGl6jSJdlHOQFga1FpjuUpgXldbpKNzxpjsGn4xYNnRHVrOAqm8aG5FfpdQlh5LHesxCeA==\",\n\"requires\": {\n\"sortablejs\": \"^1.10.1\"\n}\n" }, { "change_type": "MODIFY", "old_path": "package.json", "new_path": "package.json", "diff": "{\n\"name\": \"bolt\",\n- \"version\": \"4.0.0-rc.35\",\n+ \"version\": \"4.0.0-rc.36\",\n\"homepage\": \"https://boltcms.io\",\n\"author\": \"Bob den Otter <bob@twokings.nl> (https://boltcms.io)\",\n\"license\": \"MIT\",\n\"bootbox\": \"^5.4.0\",\n\"bootstrap\": \"^4.5.2\",\n\"browserslist\": \"^4.14.0\",\n- \"caniuse-lite\": \"^1.0.30001112\",\n- \"codemirror\": \"^5.56.0\",\n+ \"caniuse-lite\": \"^1.0.30001117\",\n+ \"codemirror\": \"^5.57.0\",\n\"dropzone\": \"^5.7.2\",\n\"flagpack\": \"^1.0.5\",\n\"hotkeys-js\": \"^3.8.1\",\n\"stylelint-scss\": \"^3.18.0\",\n\"terser\": \"^4.8.0\",\n\"tinycolor2\": \"^1.4.1\",\n- \"vue\": \"^2.6.11\",\n+ \"vue\": \"^2.6.12\",\n\"vue-flatpickr-component\": \"^8.1.5\",\n\"vue-multiselect\": \"^2.1.6\",\n\"vue-simplemde\": \"^1.1.2\",\n\"vue-trumbowyg\": \"^3.6.0\",\n- \"vuedraggable\": \"^2.24.0\",\n+ \"vuedraggable\": \"^2.24.1\",\n\"vuex\": \"^3.5.1\",\n\"zxcvbn\": \"^4.4.2\"\n},\n\"devDependencies\": {\n- \"@babel/core\": \"^7.11.1\",\n+ \"@babel/core\": \"^7.11.4\",\n\"@babel/plugin-transform-regenerator\": \"^7.10.4\",\n\"@babel/plugin-transform-runtime\": \"^7.11.0\",\n\"@babel/polyfill\": \"^7.10.4\",\n\"@babel/preset-env\": \"^7.11.0\",\n\"@fortawesome/fontawesome-free\": \"^5.14.0\",\n\"@symfony/webpack-encore\": \"^0.30.2\",\n- \"@vue/test-utils\": \"^1.0.3\",\n+ \"@vue/test-utils\": \"^1.0.4\",\n\"ajv-keywords\": \"^3.5.2\",\n\"autoprefixer\": \"^9.8.6\",\n\"babel-core\": \"^7.0.0-bridge.0\",\n\"stylelint-config-standard\": \"^19.0.0\",\n\"vue-jest\": \"^3.0.6\",\n\"vue-loader\": \"^15.9.3\",\n- \"vue-router\": \"^3.4.2\",\n- \"vue-template-compiler\": \"^2.6.11\",\n+ \"vue-router\": \"^3.4.3\",\n+ \"vue-template-compiler\": \"^2.6.12\",\n\"webpackbar\": \"^4.0.0\",\n\"workbox-webpack-plugin\": \"^4.3.1\"\n},\n" } ]
PHP
MIT License
bolt/core
Prepare release 4.0.0-rc.36
95,144
23.08.2020 16:38:43
-7,200
18ea29efa642b35feec09bd362ae13f35e79f50d
Add "Article" and "Redactor" to contentfixtures
[ { "change_type": "MODIFY", "old_path": "src/DataFixtures/ContentFixtures.php", "new_path": "src/DataFixtures/ContentFixtures.php", "diff": "@@ -218,8 +218,13 @@ class ContentFixtures extends BaseFixture implements DependentFixtureInterface,\nswitch ($field['type']) {\ncase 'html':\n+ case 'redactor':\n$data = [FakeContent::generateHTML($nb)];\n+ break;\n+ case 'article':\n+ $data = [FakeContent::generateHTML(12)];\n+\nbreak;\ncase 'markdown':\n$data = [FakeContent::generateMarkdown($nb)];\n" } ]
PHP
MIT License
bolt/core
Add "Article" and "Redactor" to contentfixtures
95,144
23.08.2020 17:33:18
-7,200
d2bda72a7e3cbb87b33fedfee7722aa591dbf915
Prevent breakage when trying to excerpt a Field
[ { "change_type": "MODIFY", "old_path": "src/Twig/ContentExtension.php", "new_path": "src/Twig/ContentExtension.php", "diff": "@@ -8,6 +8,7 @@ use Bolt\\Canonical;\nuse Bolt\\Configuration\\Config;\nuse Bolt\\Configuration\\Content\\ContentType;\nuse Bolt\\Entity\\Content;\n+use Bolt\\Entity\\Field;\nuse Bolt\\Entity\\Field\\Excerptable;\nuse Bolt\\Entity\\Field\\ImageField;\nuse Bolt\\Entity\\Field\\ImagelistField;\n@@ -242,7 +243,7 @@ class ContentExtension extends AbstractExtension\n*/\npublic function getExcerpt($content, int $length = 280, bool $includeTitle = false, $focus = null): string\n{\n- if (is_string($content) || $content instanceof Markup) {\n+ if (is_string($content) || $content instanceof Markup || $content instanceof Field) {\nreturn Excerpt::getExcerpt((string) $content, $length, $focus);\n}\n" } ]
PHP
MIT License
bolt/core
Prevent breakage when trying to excerpt a Field
95,144
24.08.2020 15:13:13
-7,200
f18a4fc249a3bc1e86eb7b4cb6d90d4a75be84d9
Prepare release 4.0.0-rc.37
[ { "change_type": "MODIFY", "old_path": "package-lock.json", "new_path": "package-lock.json", "diff": "{\n\"name\": \"bolt\",\n- \"version\": \"4.0.0-rc.35\",\n+ \"version\": \"4.0.0-rc.37\",\n\"lockfileVersion\": 1,\n\"requires\": true,\n\"dependencies\": {\n},\n\"is-obj\": {\n\"version\": \"1.0.1\",\n- \"resolved\": \"https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz\",\n+ \"resolved\": \"http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz\",\n\"integrity\": \"sha1-PkcprB9f3gJc19g6iW2rn09n2w8=\"\n},\n\"is-path-cwd\": {\n}\n},\n\"luxon\": {\n- \"version\": \"1.24.1\",\n- \"resolved\": \"https://registry.npmjs.org/luxon/-/luxon-1.24.1.tgz\",\n- \"integrity\": \"sha512-CgnIMKAWT0ghcuWFfCWBnWGOddM0zu6c4wZAWmD0NN7MZTnro0+833DF6tJep+xlxRPg4KtsYEHYLfTMBQKwYg==\"\n+ \"version\": \"1.25.0\",\n+ \"resolved\": \"https://registry.npmjs.org/luxon/-/luxon-1.25.0.tgz\",\n+ \"integrity\": \"sha512-hEgLurSH8kQRjY6i4YLey+mcKVAWXbDNlZRmM6AgWDJ1cY3atl8Ztf5wEY7VBReFbmGnwQPz7KYJblL8B2k0jQ==\"\n},\n\"make-dir\": {\n\"version\": \"3.1.0\",\n},\n\"load-json-file\": {\n\"version\": \"1.1.0\",\n- \"resolved\": \"https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz\",\n+ \"resolved\": \"http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz\",\n\"integrity\": \"sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=\",\n\"dev\": true,\n\"requires\": {\n},\n\"semver\": {\n\"version\": \"5.3.0\",\n- \"resolved\": \"https://registry.npmjs.org/semver/-/semver-5.3.0.tgz\",\n+ \"resolved\": \"http://registry.npmjs.org/semver/-/semver-5.3.0.tgz\",\n\"integrity\": \"sha1-myzl094C0XxgEq0yaqa00M9U+U8=\",\n\"dev\": true\n}\n},\n\"safe-regex\": {\n\"version\": \"1.1.0\",\n- \"resolved\": \"https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz\",\n+ \"resolved\": \"http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz\",\n\"integrity\": \"sha1-QKNmnzsHfR6UPURinhV91IAjvy4=\",\n\"requires\": {\n\"ret\": \"~0.1.10\"\n},\n\"strip-ansi\": {\n\"version\": \"3.0.1\",\n- \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz\",\n+ \"resolved\": \"http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz\",\n\"integrity\": \"sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=\",\n\"requires\": {\n\"ansi-regex\": \"^2.0.0\"\n},\n\"strip-eof\": {\n\"version\": \"1.0.0\",\n- \"resolved\": \"https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz\",\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" }, { "change_type": "MODIFY", "old_path": "package.json", "new_path": "package.json", "diff": "{\n\"name\": \"bolt\",\n- \"version\": \"4.0.0-rc.36\",\n+ \"version\": \"4.0.0-rc.37\",\n\"homepage\": \"https://boltcms.io\",\n\"author\": \"Bob den Otter <bob@twokings.nl> (https://boltcms.io)\",\n\"license\": \"MIT\",\n\"url\": \"git://github.com/bolt/core.git\"\n},\n\"dependencies\": {\n- \"@vue/cli-service\": \"^4.5.3\",\n+ \"@vue/cli-service\": \"^4.5.4\",\n\"axios\": \"^0.19.2\",\n\"baguettebox.js\": \"^1.11.1\",\n\"bootbox\": \"^5.4.0\",\n\"hotkeys-js\": \"^3.8.1\",\n\"jquery\": \"^3.5.1\",\n\"locutus\": \"^2.0.11\",\n- \"luxon\": \"^1.24.1\",\n+ \"luxon\": \"^1.25.0\",\n\"no-scroll\": \"^2.1.1\",\n\"node-vibrant\": \"^3.1.5\",\n\"popper.js\": \"^1.16.1\",\n" } ]
PHP
MIT License
bolt/core
Prepare release 4.0.0-rc.37
95,144
24.08.2020 16:11:16
-7,200
0932a981f24082ac6f7f3db9ab20e33c2df2909e
Update the README, because people can't read.
[ { "change_type": "MODIFY", "old_path": "README.md", "new_path": "README.md", "diff": "----\n+Bolt 4 - beta\n+=============\n+\n+Bolt CMS is an open source, adaptable platform for building and running modern\n+websites. Built on PHP, Symfony and more. [Read the site](https://boltcms.io)\n+for more info.\n-**If you want to check out Bolt, the `composer create-project` method is recommended. See here: https://github.com/bolt/project/ . This repository should be used to work _<ins>on</ins>_ Bolt. Not _<ins>with</ins>_ Bolt.**\n+To check out Bolt and set up your first Bolt installation, read\n+[Installing Bolt 4][installation].\n---\n-Bolt 4 - beta\n-=============\n+**This repository should be used to work _<ins>on</ins>_ Bolt. Not\n+_<ins>with</ins>_ Bolt. If you want to check out Bolt, the\n+`composer create-project` method is recommended. See here:\n+https://github.com/bolt/project/ .**\n+---\n> Cleanse this world with flame\n> End this, cleanse this\n> **Rebuild and start again**\n@@ -206,6 +215,7 @@ Sponsors:\n[fowler]: https://martinfowler.com/articles/practical-test-pyramid.html\n[translations]: https://github.com/bolt/core/wiki/Contribute-on-translations\n[hatebreed]: https://www.youtube.com/watch?v=DBwgX8yBqsw\n+[installation]: https://docs.bolt.cm/4.0/installation/installation\n--------\n" } ]
PHP
MIT License
bolt/core
Update the README, because people can't read.
95,144
24.08.2020 20:35:57
-7,200
0fc32e9a7da018735f5f6bfab9f1a33ac1e62b1f
Fall back to "dumb" numeric sorting for older SQLite versions
[ { "change_type": "MODIFY", "old_path": "src/Storage/Directive/OrderDirective.php", "new_path": "src/Storage/Directive/OrderDirective.php", "diff": "@@ -4,6 +4,7 @@ declare(strict_types=1);\nnamespace Bolt\\Storage\\Directive;\n+use Bolt\\Doctrine\\Version;\nuse Bolt\\Entity\\Field\\NumberField;\nuse Bolt\\Storage\\QueryInterface;\nuse Bolt\\Twig\\Notifications;\n@@ -170,6 +171,17 @@ class OrderDirective\nprivate function orderByNumericField(QueryInterface $query, string $translationsAlias, string $direction): void\n{\n$qb = $query->getQueryBuilder();\n+\n+ // For older bundled SQLite in PHP 7.2 that do not have `INSTR` and `CAST` built in, we fall back to the\n+ // \"dumb\" sorting instead. For this we use the same criteria as to check whether we have JSON. C'est la vie.\n+ $doctrineVersion = new Version($query->getQueryBuilder()->getEntityManager()->getConnection());\n+\n+ if (! $doctrineVersion->hasJson()) {\n+ $qb->addOrderBy($translationsAlias . '.value', $direction);\n+\n+ return;\n+ }\n+\n$qb->addSelect('INSTR(' . $translationsAlias . '.value, \\'%[0-9]%\\') as HIDDEN instr');\n$innerSubstring = $qb\n->expr()\n" } ]
PHP
MIT License
bolt/core
Fall back to "dumb" numeric sorting for older SQLite versions
95,144
24.08.2020 21:29:05
-7,200
29d4f1c07ce57309ac89211fc9e9441c4c60242e
Fix: Correctly exclude fields that are used in the slug by default
[ { "change_type": "MODIFY", "old_path": "templates/helpers/_fields.twig", "new_path": "templates/helpers/_fields.twig", "diff": "{# Skip over the fields that are used in the slug, unless explicitly told not to,\nusing 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+ {% if (record.definition.fields.slug.uses|default(null) is iterable) and skip_uses|default(true) %}\n+ {% set omittedkeys = omittedkeys|merge(record.definition.fields.slug.uses) %}\n{% endif %}\n{# We also skip over the fields that are explicitly excluded. #}\n" } ]
PHP
MIT License
bolt/core
Fix: Correctly exclude fields that are used in the slug by default
95,144
26.08.2020 10:59:10
-7,200
b139decd38ac07915b3b47d7b27bab45bd784157
Better check for `INSTR` and `CAST`
[ { "change_type": "MODIFY", "old_path": "public/theme/skeleton/custom/setcontent_1.twig", "new_path": "public/theme/skeleton/custom/setcontent_1.twig", "diff": "<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+ Results: <span id=\"results-seven\">{{ blocks|length > 0 ? 'yes' }}</span>\n<ul>\n{% for block in blocks %}\n<li>\n<section id=\"eight\">\n<h1>Eight</h1>\n{% setcontent entries = \"entries,blocks,showcases\" where {'title': '%voluptat% || %porro%' } printquery %}\n- Results: <span id=\"results-six\">{{ entries|length > 0 ? 'yes' }}</span>\n+ Results: <span id=\"results-eight\">{{ entries|length > 0 ? 'yes' }}</span>\n<ul>\n{% for entry in entries %}\n<li>\n<section id=\"nine\">\n<h1>Nine</h1>\n{% setcontent showcases = 'showcases' orderby '-floatfield' printquery %}\n- Results: <span id=\"results-six\">{{ showcases|length > 0 ? 'yes' }}</span>\n+\n+ Results: <span id=\"results-nine\">{{ showcases|length > 0 ? 'yes' }}</span>\n<ul>\n{% for showcase in showcases %}\n<li>showcase {{ showcase.id }}: {{ showcase.floatfield }}\n<section id=\"eleven\">\n<h1>Eleven</h1>\n{% setcontent entries = 'entries' order 'categories' printquery %}\n- Results: <span id=\"results-six\">{{ entries|length > 0 ? 'yes' }}</span>\n+ Results: <span id=\"results-eleven\">{{ entries|length > 0 ? 'yes' }}</span>\n<ul>\n{% for entry in entries %}\n<li>\n" }, { "change_type": "MODIFY", "old_path": "src/Doctrine/Version.php", "new_path": "src/Doctrine/Version.php", "diff": "@@ -90,6 +90,21 @@ class Version\nreturn false;\n}\n+ public function hasInstrAndCast(): bool\n+ {\n+ try {\n+ $query = $this->connection->createQueryBuilder();\n+ $query\n+ ->select('CAST (1.1 AS int), INSTR(\"Bolt\", \"o\")');\n+ $query->execute();\n+ } catch (\\Throwable $e) {\n+ return false;\n+ }\n+\n+ return true;\n+ }\n+\n+\nprivate function checkSqliteVersion(): bool\n{\n/** @var PDOConnection $wrapped */\n" }, { "change_type": "MODIFY", "old_path": "src/Storage/Directive/OrderDirective.php", "new_path": "src/Storage/Directive/OrderDirective.php", "diff": "@@ -172,11 +172,11 @@ class OrderDirective\n{\n$qb = $query->getQueryBuilder();\n- // For older bundled SQLite in PHP 7.2 that do not have `INSTR` and `CAST` built in, we fall back to the\n- // \"dumb\" sorting instead. For this we use the same criteria as to check whether we have JSON. C'est la vie.\n+ // For older bundled SQLite in PHP 7.2 that do not have `INSTR` and `CAST` built in, we fall\n+ // back to the \"dumb\" sorting instead. C'est la vie.\n$doctrineVersion = new Version($query->getQueryBuilder()->getEntityManager()->getConnection());\n- if (! $doctrineVersion->hasJson()) {\n+ if (! $doctrineVersion->hasInstrAndCast()) {\n$qb->addOrderBy($translationsAlias . '.value', $direction);\nreturn;\n" } ]
PHP
MIT License
bolt/core
Better check for `INSTR` and `CAST`
95,144
26.08.2020 12:35:09
-7,200
5d92640062a61efb4905a5067b13dd552d6fdb0f
Localehelper shouldn't break on CLI commands
[ { "change_type": "MODIFY", "old_path": "src/Utils/LocaleHelper.php", "new_path": "src/Utils/LocaleHelper.php", "diff": "@@ -74,6 +74,12 @@ class LocaleHelper\n/** @var Request $request */\n$request = $globals['app']->getRequest();\n+\n+ // In case we're on the CLI, the request is undefined so we create one on the fly\n+ if (! $request instanceof Request) {\n+ $request = Request::createFromGlobals();\n+ }\n+\n$locales = new Collection();\n$route = $request->attributes->get('_route');\n" } ]
PHP
MIT License
bolt/core
Localehelper shouldn't break on CLI commands
95,144
26.08.2020 14:03:37
-7,200
ff879163ee4303b773786124adfdbb5bd04ffde1
Prepare release 4.0.0-rc.38
[ { "change_type": "MODIFY", "old_path": "package-lock.json", "new_path": "package-lock.json", "diff": "{\n\"name\": \"bolt\",\n- \"version\": \"4.0.0-rc.37\",\n+ \"version\": \"4.0.0-rc.38\",\n\"lockfileVersion\": 1,\n\"requires\": true,\n\"dependencies\": {\n}\n},\n\"caniuse-lite\": {\n- \"version\": \"1.0.30001117\",\n- \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001117.tgz\",\n- \"integrity\": \"sha512-4tY0Fatzdx59kYjQs+bNxUwZB03ZEBgVmJ1UkFPz/Q8OLiUUbjct2EdpnXj0fvFTPej2EkbPIG0w8BWsjAyk1Q==\"\n+ \"version\": \"1.0.30001118\",\n+ \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001118.tgz\",\n+ \"integrity\": \"sha512-RNKPLojZo74a0cP7jFMidQI7nvLER40HgNfgKQEJ2PFm225L0ectUungNQoK3Xk3StQcFbpBPNEvoWD59436Hg==\"\n},\n\"capture-exit\": {\n\"version\": \"2.0.0\",\n" }, { "change_type": "MODIFY", "old_path": "package.json", "new_path": "package.json", "diff": "{\n\"name\": \"bolt\",\n- \"version\": \"4.0.0-rc.37\",\n+ \"version\": \"4.0.0-rc.38\",\n\"homepage\": \"https://boltcms.io\",\n\"author\": \"Bob den Otter <bob@twokings.nl> (https://boltcms.io)\",\n\"license\": \"MIT\",\n\"bootbox\": \"^5.4.0\",\n\"bootstrap\": \"^4.5.2\",\n\"browserslist\": \"^4.14.0\",\n- \"caniuse-lite\": \"^1.0.30001117\",\n+ \"caniuse-lite\": \"^1.0.30001118\",\n\"codemirror\": \"^5.57.0\",\n\"dropzone\": \"^5.7.2\",\n\"flagpack\": \"^1.0.5\",\n" } ]
PHP
MIT License
bolt/core
Prepare release 4.0.0-rc.38
95,144
26.08.2020 17:11:13
-7,200
eb3d64ae6256e567aa2a93016eec95a6587dfaa2
Prepare release 4.0.0-rc.39
[ { "change_type": "MODIFY", "old_path": "config/bolt/config.yaml", "new_path": "config/bolt/config.yaml", "diff": "@@ -95,12 +95,7 @@ record_template: record.twig\n#\n# Can be overridden for each content type.\n#\n-# Note 1: Sorting on TAXONOMY-pages will give unexpected results, if it has a\n-# pager.\n-# If you need sorting on those, make sure you display all the records on one\n-# page.\n-#\n-# Note 2: If you've changed the filename, and your changes do not show up on the\n+# Note: If you've changed the filename, and your changes do not show up on the\n# website, be sure to check for a config.yaml file in your themes\n# folder. If a template is set there, it will override the setting here.\nlisting_template: listing.twig\n" }, { "change_type": "MODIFY", "old_path": "package-lock.json", "new_path": "package-lock.json", "diff": "{\n\"name\": \"bolt\",\n- \"version\": \"4.0.0-rc.38\",\n+ \"version\": \"4.0.0-rc.39\",\n\"lockfileVersion\": 1,\n\"requires\": true,\n\"dependencies\": {\n" }, { "change_type": "MODIFY", "old_path": "package.json", "new_path": "package.json", "diff": "{\n\"name\": \"bolt\",\n- \"version\": \"4.0.0-rc.38\",\n+ \"version\": \"4.0.0-rc.39\",\n\"homepage\": \"https://boltcms.io\",\n\"author\": \"Bob den Otter <bob@twokings.nl> (https://boltcms.io)\",\n\"license\": \"MIT\",\n" } ]
PHP
MIT License
bolt/core
Prepare release 4.0.0-rc.39
95,181
30.08.2020 17:17:13
-7,200
ea6f64b8b7b6f6138e2ab8cb0e91d6a571923a55
Init cs locale
[ { "change_type": "MODIFY", "old_path": "config/services.yaml", "new_path": "config/services.yaml", "diff": "parameters:\nlocale: 'en'\n# This parameter defines the codes of the locales (languages) enabled in the application\n- app_locales: en|nl|es|fr|de|pl|it|hu|pt_BR|ja|nb|nn|nl_NL|nl_BE|is|ru\n+ app_locales: en|nl|es|fr|de|pl|it|hu|pt_BR|ja|nb|nn|nl_NL|nl_BE|is|ru|cs\napp.notifications.email_sender: anonymous@example.com\n# Default table prefix for Bolt database\nbolt.table_prefix: bolt_\n" } ]
PHP
MIT License
bolt/core
Init cs locale
95,144
31.08.2020 19:54:34
-7,200
cd22ed78012555bf957a0775149c04774c88c7b4
Updating dependencies, Fix CS findings
[ { "change_type": "MODIFY", "old_path": "composer.json", "new_path": "composer.json", "diff": "\"ext-mbstring\": \"*\",\n\"ext-pdo\": \"*\",\n\"api-platform/core\": \"^2.5\",\n- \"babdev/pagerfanta-bundle\": \"^2.4\",\n- \"beberlei/doctrineextensions\": \"^1.0\",\n+ \"babdev/pagerfanta-bundle\": \"^2.5\",\n+ \"beberlei/doctrineextensions\": \"^1.2\",\n\"bolt/common\": \"^2.1.6\",\n\"cocur/slugify\": \"^4.0\",\n\"composer/composer\": \"^1.10\",\n- \"composer/package-versions-deprecated\": \"^1.8\",\n- \"doctrine/doctrine-bundle\": \"^2.0\",\n+ \"composer/package-versions-deprecated\": \"^1.11\",\n+ \"doctrine/doctrine-bundle\": \"^2.1\",\n\"doctrine/doctrine-fixtures-bundle\": \"^3.3\",\n\"doctrine/orm\": \"^2.7\",\n\"drupol/composer-packages\": \"^1.1\",\n\"knplabs/knp-menu-bundle\": \"^3.0\",\n\"league/glide-symfony\": \"^1.0\",\n\"miljar/php-exif\": \"^0.6.4\",\n- \"nelmio/cors-bundle\": \"^2.0\",\n- \"nesbot/carbon\": \"^2.28\",\n+ \"nelmio/cors-bundle\": \"^2.1\",\n+ \"nesbot/carbon\": \"^2.39\",\n\"peterkahl/country-code-to-emoji-flag\": \"^1.2\",\n\"php-translation/symfony-bundle\": \"^0.12\",\n\"phpdocumentor/reflection-docblock\": \"^4.3\",\n\"psr/event-dispatcher\": \"^1.0\",\n\"psr/simple-cache\": \"^1.0\",\n\"scienta/doctrine-json-functions\": \"^4.1\",\n- \"sensio/framework-extra-bundle\": \"^5.5\",\n+ \"sensio/framework-extra-bundle\": \"^5.6\",\n\"sensiolabs/security-checker\": \"^6.0\",\n\"siriusphp/upload\": \"^3.0.1\",\n\"squirrelphp/twig-php-syntax\": \"^1.5\",\n\"symfony/dependency-injection\": \"^4.4 | ^5.1\",\n\"symfony/dotenv\": \"^4.4 | ^5.1\",\n\"symfony/expression-language\": \"^4.4 | ^5.1\",\n- \"symfony/flex\": \"^1.6\",\n+ \"symfony/flex\": \"^1.9\",\n\"symfony/form\": \"^4.4 | ^5.1\",\n\"symfony/framework-bundle\": \"^4.4 | ^5.1\",\n\"symfony/http-client\": \"^4.4 | ^5.1\",\n\"symfony/web-server-bundle\": \"^4.4\",\n\"symfony/webpack-encore-bundle\": \"^1.7\",\n\"symfony/yaml\": \"^4.4 | ^5.1\",\n- \"tightenco/collect\": \"^7.4\",\n+ \"tightenco/collect\": \"^7.25\",\n\"twig/twig\": \"^3.0\",\n\"ua-parser/uap-php\": \"^3.9\",\n- \"webimpress/safe-writer\": \"^2.0\",\n+ \"webimpress/safe-writer\": \"^2.1\",\n\"webmozart/path-util\": \"^2.3\",\n\"webonyx/graphql-php\": \"^0.13\",\n\"xemlock/htmlpurifier-html5\": \"^0.1.11\"\n\"require-dev\": {\n\"ext-curl\": \"*\",\n\"ext-pdo_sqlite\": \"*\",\n- \"acmecorp/reference-extension\": \"^1.0\",\n+ \"acmecorp/reference-extension\": \"^1.2\",\n\"behat/mink-goutte-driver\": \"^1.2\",\n\"behat/mink-selenium2-driver\": \"^1.4\",\n- \"behatch/contexts\": \"^3.2\",\n- \"bobdenotter/configuration-notices\": \"^1.0\",\n+ \"behatch/contexts\": \"^3.3\",\n+ \"bobdenotter/configuration-notices\": \"^1.1\",\n\"bobdenotter/weatherwidget\": \"^1.1\",\n- \"bolt/newswidget\": \"^1.1\",\n+ \"bolt/newswidget\": \"^1.2\",\n\"coduo/php-matcher\": \"^4.0\",\n\"dama/doctrine-test-bundle\": \"^6.2.0\",\n- \"doctrine/doctrine-migrations-bundle\": \"^2.1\",\n+ \"doctrine/doctrine-migrations-bundle\": \"^2.2\",\n\"friends-of-behat/mink\": \"^1.8\",\n\"friends-of-behat/mink-browserkit-driver\": \"^1.4\",\n\"friends-of-behat/symfony-extension\": \"^2.1\",\n\"lakion/mink-debug-extension\": \"^1.2\",\n\"php-http/httplug-pack\": \"^1.2\",\n\"php-translation/loco-adapter\": \"^0.11\",\n- \"phpspec/phpspec\": \"^6.1.1\",\n+ \"phpspec/phpspec\": \"^6.2.1\",\n\"phpspec/prophecy\": \"^1.10\",\n\"phpstan/phpstan\": \"^0.12\",\n\"phpstan/phpstan-doctrine\": \"^0.12\",\n" }, { "change_type": "MODIFY", "old_path": "src/Configuration/Content/FieldType.php", "new_path": "src/Configuration/Content/FieldType.php", "diff": "@@ -49,7 +49,8 @@ class FieldType extends Collection\n'pattern' => false,\n'hidden' => false,\n'default_locale' => 'en',\n- 'height' => '10', // 10 rows by default\n+ // 10 rows by default\n+ 'height' => '10',\n]);\n}\n" }, { "change_type": "MODIFY", "old_path": "src/Event/Listener/ContentFillListener.php", "new_path": "src/Event/Listener/ContentFillListener.php", "diff": "@@ -25,18 +25,14 @@ class ContentFillListener\n/** @var UserRepository */\nprivate $users;\n- /** @var string */\n- private $defaultLocale;\n-\n/** @var FieldRepository */\nprivate $fieldRepository;\n- public function __construct(Config $config, ContentExtension $contentExtension, UserRepository $users, string $defaultLocale, FieldRepository $fieldRepository)\n+ public function __construct(Config $config, ContentExtension $contentExtension, UserRepository $users, FieldRepository $fieldRepository)\n{\n$this->config = $config;\n$this->contentExtension = $contentExtension;\n$this->users = $users;\n- $this->defaultLocale = $defaultLocale;\n$this->fieldRepository = $fieldRepository;\n}\n" }, { "change_type": "MODIFY", "old_path": "src/Storage/Handler/SelectQueryHandler.php", "new_path": "src/Storage/Handler/SelectQueryHandler.php", "diff": "@@ -71,7 +71,7 @@ class SelectQueryHandler\nreturn $this->createPaginator($request, $query, $amountPerPage, $page);\n}\n- private function createPaginator(?Request $request, Query $query, int $amountPerPage, int $page = null): Pagerfanta\n+ private function createPaginator(?Request $request, Query $query, int $amountPerPage, ?int $page = null): Pagerfanta\n{\n$paginator = new Pagerfanta(new DoctrineORMAdapter($query, true, true));\n$paginator->setMaxPerPage($amountPerPage);\n" }, { "change_type": "MODIFY", "old_path": "src/Storage/SelectQuery.php", "new_path": "src/Storage/SelectQuery.php", "diff": "@@ -380,7 +380,7 @@ class SelectQuery implements QueryInterface\n*/\npublic function doFieldJoins(): void\n{\n- foreach ($this->fieldJoins as $key => $filter) {\n+ foreach (array_keys($this->fieldJoins) as $key) {\n$contentAlias = 'content';\n$fieldsAlias = 'fields_' . $key;\n$translationsAlias = 'translations_' . $key;\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/ContentExtension.php", "new_path": "src/Twig/ContentExtension.php", "diff": "@@ -480,7 +480,7 @@ class ContentExtension extends AbstractExtension\nreturn new LaravelCollection($options);\n}\n- public function pager(Environment $twig, Pagerfanta $records = null, string $template = '@bolt/helpers/_pager_basic.html.twig', string $class = 'pagination', int $surround = 3)\n+ public function pager(Environment $twig, ?Pagerfanta $records = null, string $template = '@bolt/helpers/_pager_basic.html.twig', string $class = 'pagination', int $surround = 3)\n{\n$params = array_merge(\n$this->request->get('_route_params'),\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/FieldExtension.php", "new_path": "src/Twig/FieldExtension.php", "diff": "@@ -96,7 +96,8 @@ class FieldExtension extends AbstractExtension\n}\n$ids = $field->getValue();\n- $records = $this->contentRepository->findBy(['id' => $ids]); // Find records by their respective ids\n+ // Find records by their respective ids\n+ $records = $this->contentRepository->findBy(['id' => $ids]);\nif ($returnsingle || (! $returnarray && $definition->get('multiple') === false)) {\nreturn current($records);\n" }, { "change_type": "MODIFY", "old_path": "symfony.lock", "new_path": "symfony.lock", "diff": "\"config/packages/test/dama_doctrine_test_bundle.yaml\"\n]\n},\n+ \"dealerdirect/phpcodesniffer-composer-installer\": {\n+ \"version\": \"v0.7.0\"\n+ },\n\"doctrine/annotations\": {\n\"version\": \"1.0\",\n\"recipe\": {\n\"phpspec/prophecy\": {\n\"version\": \"v1.10.2\"\n},\n+ \"phpstan/phpdoc-parser\": {\n+ \"version\": \"0.4.9\"\n+ },\n\"phpstan/phpstan\": {\n\"version\": \"0.12.11\"\n},\n\"siriusphp/validation\": {\n\"version\": \"2.3.0\"\n},\n+ \"slevomat/coding-standard\": {\n+ \"version\": \"6.4.0\"\n+ },\n\"squirrelphp/twig-php-syntax\": {\n\"version\": \"v1.5\"\n},\n" } ]
PHP
MIT License
bolt/core
Updating dependencies, Fix CS findings
95,144
31.08.2020 19:56:38
-7,200
5901145eb180017b61b5743f77474c4bd8015828
Fix widgets: Only setRendered if widget didn't return `null`
[ { "change_type": "MODIFY", "old_path": "src/Widgets.php", "new_path": "src/Widgets.php", "diff": "@@ -128,13 +128,18 @@ class Widgets\n}\n// Call the magic `__invoke` method on the $widget object\n+ // It can return a string (even an empty one) or `null`\n$output = $widget($params);\nif ($widget instanceof StopwatchAwareInterface) {\n$widget->stopStopwatch();\n}\n+ // Set the output as rendered for this Request, unless invoking it\n+ // returned `null`\n+ if ($output !== null) {\n$this->setRendered($widget, $output);\n+ }\nreturn $output;\n}\n" } ]
PHP
MIT License
bolt/core
Fix widgets: Only setRendered if widget didn't return `null`
95,144
31.08.2020 20:37:58
-7,200
9defedf88bc39f61216ae19269a6901943b5c493
Update _label.scss
[ { "change_type": "MODIFY", "old_path": "assets/scss/modules/editor/_label.scss", "new_path": "assets/scss/modules/editor/_label.scss", "diff": "max-width: $popover-max-width;\n// Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.\n// So reset our font and text properties to avoid inheriting weird values.\n+\n@include reset-text();\n// Allow breaking very long words so they don't overflow the popover's bounds\nword-wrap: break-word;\n" } ]
PHP
MIT License
bolt/core
Update _label.scss
95,144
01.09.2020 10:12:22
-7,200
85c5d844b0f335f0d285a4010e72fbfbdaf0ce9b
Allow `contenttype` in title formatting (For "Select" fields)
[ { "change_type": "MODIFY", "old_path": "src/Utils/ContentHelper.php", "new_path": "src/Utils/ContentHelper.php", "diff": "@@ -161,6 +161,10 @@ class ContentHelper\nreturn $this->localeExtension->localdate($record->getDepublishedAt(), null, $locale);\n}\n+ if ($match[1] === 'contenttype') {\n+ return $record->getDefinition()['singular_name'];\n+ }\n+\nif ($record->hasField($match[1])) {\n$field = $record->getField($match[1]);\n" } ]
PHP
MIT License
bolt/core
Allow `contenttype` in title formatting (For "Select" fields)
95,144
01.09.2020 13:08:21
-7,200
2d53e76168abfda684416856e7871477fb4c48d6
Version bump in `doctrine/common` broke this
[ { "change_type": "MODIFY", "old_path": "src/Event/Listener/FieldDiscriminatorListener.php", "new_path": "src/Event/Listener/FieldDiscriminatorListener.php", "diff": "@@ -5,10 +5,10 @@ declare(strict_types=1);\nnamespace Bolt\\Event\\Listener;\nuse Bolt\\Entity\\FieldInterface;\n-use Doctrine\\Common\\Persistence\\Mapping\\Driver\\MappingDriver;\nuse Doctrine\\ORM\\EntityManagerInterface;\nuse Doctrine\\ORM\\Event\\LoadClassMetadataEventArgs;\nuse Doctrine\\ORM\\ORMException;\n+use Doctrine\\Persistence\\Mapping\\Driver\\MappingDriver;\n/**\n* Greatly inspired by:\n" } ]
PHP
MIT License
bolt/core
Version bump in `doctrine/common` broke this
95,144
01.09.2020 12:10:05
-7,200
328aafb8f6c19ca1c28f84144f53bff99ec6af99
Minor fix: Set database path correctly
[ { "change_type": "MODIFY", "old_path": "src/Configuration/PathResolver.php", "new_path": "src/Configuration/PathResolver.php", "diff": "@@ -33,7 +33,7 @@ class PathResolver\n'var' => '%site%/var',\n'cache' => '%var%/cache',\n'config' => '%site%/config',\n- 'database' => '%var%/database',\n+ 'database' => '%var%/data',\n'extensions' => '%site%/extensions',\n'extensions_config' => '%config%/extensions',\n'web' => '%site%/' . $public,\n" } ]
PHP
MIT License
bolt/core
Minor fix: Set database path correctly
95,144
01.09.2020 11:42:26
-7,200
3e17133c903d852ba114bab1307779aec6f9a1dd
Fix breakage in PROD for `type: select` fields
[ { "change_type": "MODIFY", "old_path": "src/Controller/Backend/ContentEditController.php", "new_path": "src/Controller/Backend/ContentEditController.php", "diff": "@@ -26,6 +26,7 @@ use Bolt\\Repository\\TaxonomyRepository;\nuse Bolt\\Utils\\TranslationsManager;\nuse Carbon\\Carbon;\nuse Doctrine\\ORM\\EntityManagerInterface;\n+use Doctrine\\ORM\\ORMInvalidArgumentException;\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Security;\nuse Symfony\\Component\\HttpFoundation\\RedirectResponse;\nuse Symfony\\Component\\HttpFoundation\\Response;\n@@ -400,7 +401,11 @@ class ContentEditController extends TwigAwareController implements BackendZoneIn\n// If the Field exists, but it has the wrong type, we'll remove the existing one.\nif (($field !== null) && ! $content->hasField($fieldName, true)) {\n$content->removeField($field);\n+ try {\n$this->em->remove($field);\n+ } catch (ORMInvalidArgumentException $e) {\n+ // Suppress \"Detached entity Array cannot be removed\", because it'd break the Request\n+ }\n$this->em->flush();\n$field = null;\n}\n" }, { "change_type": "MODIFY", "old_path": "src/Entity/Content.php", "new_path": "src/Entity/Content.php", "diff": "@@ -336,7 +336,7 @@ class Content\n$this->author = $author;\n}\n- public function getStatus(): string\n+ public function getStatus(): ?string\n{\nif (Statuses::isValid($this->status) === false) {\n$this->status = $this->getDefinition()->get('default_status');\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/ContentExtension.php", "new_path": "src/Twig/ContentExtension.php", "diff": "@@ -502,7 +502,7 @@ class ContentExtension extends AbstractExtension\nreturn $twig->render($template, $context);\n}\n- public function selectOptions(SelectField $field): LaravelCollection\n+ public function selectOptions(Field $field): LaravelCollection\n{\n$values = $field->getDefinition()->get('values');\n@@ -513,7 +513,7 @@ class ContentExtension extends AbstractExtension\nreturn $this->selectOptionsContentType($field);\n}\n- private function selectOptionsArray(SelectField $field): LaravelCollection\n+ private function selectOptionsArray(Field $field): LaravelCollection\n{\n$values = $field->getDefinition()->get('values');\n$currentValues = $field->getValue();\n" } ]
PHP
MIT License
bolt/core
Fix breakage in PROD for `type: select` fields
95,144
01.09.2020 12:22:25
-7,200
90ac3590ecca5fa8c30c2dfe8fe08abeccb6e1ac
Update _sub_taxonomylinks.twig
[ { "change_type": "MODIFY", "old_path": "public/theme/skeleton/partials/_sub_taxonomylinks.twig", "new_path": "public/theme/skeleton/partials/_sub_taxonomylinks.twig", "diff": "{% for type, taxonomies in record|taxonomies %}\n<em>\n- {% if taxonomies|length < 2 %}\n+ {% if taxonomies|length == 1 %}\n{{ config.get('taxonomies')[type].singular_name }}:\n- {% else %}\n+ {% elseif taxonomies|length > 1 %}\n{{ config.get('taxonomies')[type].name }}:\n{% endif %}\n</em>\n" } ]
PHP
MIT License
bolt/core
Update _sub_taxonomylinks.twig
95,144
02.09.2020 07:05:56
-7,200
c772789178967185a61d0e1238a2cf43cdf0fdfe
Allow for more control over formatting of prefix and postfix
[ { "change_type": "MODIFY", "old_path": "assets/scss/modules/editor/fields/_pre_postfix.scss", "new_path": "assets/scss/modules/editor/fields/_pre_postfix.scss", "diff": "color: #666;\ndisplay: block;\nmargin: 0.5rem 0;\n+\n+ p {\n+ max-width: 40em;\n+ }\n}\n" }, { "change_type": "MODIFY", "old_path": "config/bolt/contenttypes.yaml", "new_path": "config/bolt/contenttypes.yaml", "diff": "@@ -174,6 +174,13 @@ showcases:\nerror: \"The Title field is required, and must contain at least 2 characters\"\nplaceholder: \"Placeholder for the title\"\ngroup: Text\n+ postfix: |\n+ This is an example of a longer \"postfix\". Simple text is capped at a reasonable width\n+ to enhance legibility. Necessitatibus dolor corrupti assumenda placeat quia occati\n+ aut. Facere porro placeat molestiae fuga. Laboriosam et asperiores atque impedit\n+ dolorem dicta aut. Harum inventore ipsa voluptas consectetur quaerat eius ad.\n+ <div class=\"alert alert-secondary\" role=\"alert\"><strong>Tip:</strong> You can even\n+ use HTML in a prefix! Note that this one does take the full available width.</div>\nslug:\ntype: slug\nuses: [ title ]\n" }, { "change_type": "MODIFY", "old_path": "templates/_partials/fields/_base.html.twig", "new_path": "templates/_partials/fields/_base.html.twig", "diff": "{# Set the prefix and postfix attributes #}\n{% set prefix = prefix|default(field.definition.prefix|default) %}\n-{% if prefix and not ('<p' in prefix or '<span' in prefix or '<div' in prefix) %}\n- {% set prefix = '<span id=\"' ~ id ~ '_prefix\" class=\"form--helper\">' ~ prefix ~ '</span>' %}\n+{% if prefix and not (prefix starts with '<p' or prefix starts with '<span' or prefix starts with '<div') %}\n+ {% set prefix = '<div id=\"' ~ id ~ '_prefix\" class=\"form--helper\">' ~ prefix|markdown ~ '</div>' %}\n{% endif %}\n{% set postfix = postfix|default(field.definition.postfix|default) %}\n-{% if postfix and not ('<p' in postfix or '<span' in postfix or '<div' in postfix) %}\n- {% set postfix = '<span id=\"' ~ id ~ '_postfix\" class=\"form--helper\">' ~ postfix ~ '</span>' %}\n+{% if postfix and not (postfix starts with '<p' or postfix starts with '<span' or postfix starts with '<div') %}\n+ {% set postfix = '<div id=\"' ~ id ~ '_postfix\" class=\"form--helper\">' ~ postfix|markdown ~ '</div>' %}\n{% endif %}\n{%- endapply -%}\n" } ]
PHP
MIT License
bolt/core
Allow for more control over formatting of prefix and postfix
95,144
02.09.2020 07:28:40
-7,200
276d86f73c4030f9fdd508029317b34558a4f719
Show appropriate `displayTitle` for new "Singleton" Record
[ { "change_type": "MODIFY", "old_path": "templates/content/edit.html.twig", "new_path": "templates/content/edit.html.twig", "diff": "{% for key, fielddefinition in record.definition.fields %}\n{% set alltypes = alltypes|merge([fielddefinition.type]) %}\n{% endfor %}\n-{% set displayTitle = record|title(currentlocale)|default(record.id ?\n- __('caption.untitled_contenttype', {'%contenttype%': record.definition.singular_name}) :\n- __('caption.new_contenttype', {'%contenttype%': record.definition.singular_name}) ) %}\n+\n+{# Set the displayTitle, according to the record being new or not, whether it has a title set and if it's a singleton #}\n+{% if record|title(currentlocale) %}\n+ {% set displayTitle = record|title(currentlocale) %}\n+{% elseif record.id %}\n+ {% set displayTitle = __('caption.untitled_contenttype', {'%contenttype%': record.definition.singular_name}) %}\n+{% elseif record.definition.singleton %}\n+ {% set displayTitle = record.definition.singular_name %}\n+{% else %}\n+ {% set displayTitle = __('caption.new_contenttype', {'%contenttype%': record.definition.singular_name}) %}\n+{% endif %}\n{# The 'title' and 'shoulder' blocks are the main heading of the page. #}\n{% block shoulder %}\n" } ]
PHP
MIT License
bolt/core
Show appropriate `displayTitle` for new "Singleton" Record
95,144
02.09.2020 11:27:19
-7,200
ee88a1d2d1c9ec7b9c6ce9e5229f7b1d7e5c0b3a
Fix `Notice: Array to string conversion` in `Field.php` by ensuring the array is one level deep.
[ { "change_type": "MODIFY", "old_path": "src/Entity/Field.php", "new_path": "src/Entity/Field.php", "diff": "@@ -7,6 +7,7 @@ namespace Bolt\\Entity;\nuse ApiPlatform\\Core\\Annotation\\ApiFilter;\nuse ApiPlatform\\Core\\Annotation\\ApiResource;\nuse ApiPlatform\\Core\\Bridge\\Doctrine\\Orm\\Filter\\SearchFilter;\n+use Bolt\\Common\\Arr;\nuse Bolt\\Configuration\\Content\\FieldType;\nuse Doctrine\\ORM\\Mapping as ORM;\nuse Knp\\DoctrineBehaviors\\Contract\\Entity\\TranslatableInterface;\n@@ -79,7 +80,7 @@ class Field implements FieldInterface, TranslatableInterface\n$value = $this->getTwigValue();\nif (is_array($value)) {\n- $value = implode('', $value);\n+ $value = implode('', Arr::flatten($value, INF));\n}\nreturn (string) $value;\n" } ]
PHP
MIT License
bolt/core
Fix `Notice: Array to string conversion` in `Field.php` by ensuring the array is one level deep.
95,144
02.09.2020 11:54:24
-7,200
602d48ff934cc119531c1bcdd6e0e985051a8d3f
Update src/Entity/Field.php
[ { "change_type": "MODIFY", "old_path": "src/Entity/Field.php", "new_path": "src/Entity/Field.php", "diff": "@@ -80,7 +80,7 @@ class Field implements FieldInterface, TranslatableInterface\n$value = $this->getTwigValue();\nif (is_array($value)) {\n- $value = implode('', Arr::flatten($value, INF));\n+ $value = implode('', Arr::flatten($value, PHP_INT_MAX));\n}\nreturn (string) $value;\n" } ]
PHP
MIT License
bolt/core
Update src/Entity/Field.php
95,144
02.09.2020 15:21:55
-7,200
f4adcd498c5bdcabe8fe09beb9e201a7eef08835
Fall back to `DetailController` when trying to "list" a Singleton ContentType
[ { "change_type": "MODIFY", "old_path": "src/Controller/Frontend/ListingController.php", "new_path": "src/Controller/Frontend/ListingController.php", "diff": "@@ -6,8 +6,10 @@ namespace Bolt\\Controller\\Frontend;\nuse Bolt\\Configuration\\Content\\ContentType;\nuse Bolt\\Controller\\TwigAwareController;\n+use Bolt\\Entity\\Content;\nuse Bolt\\Repository\\ContentRepository;\nuse Bolt\\Storage\\Query;\n+use Pagerfanta\\Pagerfanta;\nuse Symfony\\Component\\HttpFoundation\\Response;\nuse Symfony\\Component\\Routing\\Annotation\\Route;\n@@ -47,8 +49,15 @@ class ListingController extends TwigAwareController implements FrontendZoneInter\n'order' => $order,\n]);\n- $records = $this->query->getContent($contentTypeSlug, $params)\n- ->setMaxPerPage($amountPerPage)\n+ /** @var Content|Pagerfanta $content */\n+ $content = $this->query->getContent($contentTypeSlug, $params);\n+\n+ // If we're foolishly trying to \"list\" a singleton, we're getting a single Content here\n+ if ($content instanceof Content) {\n+ return $this->forward('Bolt\\Controller\\Frontend\\DetailController::record', ['slugOrId' => $content->getId()]);\n+ }\n+\n+ $records = $content->setMaxPerPage($amountPerPage)\n->setCurrentPage($page);\n$templates = $this->templateChooser->forListing($contentType);\n" } ]
PHP
MIT License
bolt/core
Fall back to `DetailController` when trying to "list" a Singleton ContentType
95,144
02.09.2020 15:24:37
-7,200
227b8d3b7f082a6234e9fe97c5470341973e0f14
Don't list singletons in Aside
[ { "change_type": "MODIFY", "old_path": "public/theme/skeleton/partials/_aside.twig", "new_path": "public/theme/skeleton/partials/_aside.twig", "diff": "something like '/pages', effectively creating a working link to that\nContentTypes's listing page. #}\n- {% for ct in config.get('contenttypes')|filter(ct => not ct.viewless) %}\n+ {% for ct in config.get('contenttypes')|filter(ct => not ct.viewless and not ct.singleton) %}\n{% setcontent records = ct.slug latest limit 3 %}\n" } ]
PHP
MIT License
bolt/core
Don't list singletons in Aside
95,144
02.09.2020 17:03:06
-7,200
40c8d7ce279a69d913858dbed77687f1db71c9c7
Fix deprecation in RouteCollectionBuilder
[ { "change_type": "MODIFY", "old_path": "src/Kernel.php", "new_path": "src/Kernel.php", "diff": "@@ -14,7 +14,7 @@ use Symfony\\Component\\Config\\Loader\\LoaderInterface;\nuse Symfony\\Component\\Config\\Resource\\FileResource;\nuse Symfony\\Component\\DependencyInjection\\ContainerBuilder;\nuse Symfony\\Component\\HttpKernel\\Kernel as BaseKernel;\n-use Symfony\\Component\\Routing\\RouteCollectionBuilder;\n+use Symfony\\Component\\Routing\\Loader\\Configurator\\RoutingConfigurator;\nuse Symfony\\Component\\Yaml\\Yaml;\nuse Tightenco\\Collect\\Support\\Collection;\n@@ -75,13 +75,13 @@ class Kernel extends BaseKernel\n$this->setTaxonomyRequirements($container);\n}\n- protected function configureRoutes(RouteCollectionBuilder $routes): void\n+ protected function configureRoutes(RoutingConfigurator $routes): void\n{\n$confDir = $this->getProjectDir() . '/config';\n- $routes->import($confDir . '/{routes}/*' . self::CONFIG_EXTS, '/', 'glob');\n- $routes->import($confDir . '/{routes}/' . $this->environment . '/**/*' . self::CONFIG_EXTS, '/', 'glob');\n- $routes->import($confDir . '/{routes}' . self::CONFIG_EXTS, '/', 'glob');\n+ $routes->import($confDir . '/{routes}/*' . self::CONFIG_EXTS);\n+ $routes->import($confDir . '/{routes}/' . $this->environment . '/**/*' . self::CONFIG_EXTS);\n+ $routes->import($confDir . '/{routes}' . self::CONFIG_EXTS);\n}\nprivate function setBoltParameters(ContainerBuilder $container, string $confDir): void\n" } ]
PHP
MIT License
bolt/core
Fix deprecation in RouteCollectionBuilder
95,144
03.09.2020 10:42:23
-7,200
2c5e238b7e7f39550f793766865356e9378cf413
Don't break if we're trying to get content for "no ContentTypes"
[ { "change_type": "MODIFY", "old_path": "src/Storage/Query.php", "new_path": "src/Storage/Query.php", "diff": "@@ -5,6 +5,7 @@ declare(strict_types=1);\nnamespace Bolt\\Storage;\nuse Bolt\\Entity\\Content;\n+use Pagerfanta\\Adapter\\ArrayAdapter;\nuse Pagerfanta\\Pagerfanta;\nclass Query\n@@ -73,9 +74,15 @@ class Query\n*\n* @param string $textQuery The base part like `pages` or `pages/1`\n* @param array $parameters Parameters like `printquery` and `paging`, but also `where` parameters taken from `... where { foo: bar } ...`\n+ *\n+ * @return Pagerfanta|Content|null\n*/\npublic function getContentForTwig(string $textQuery, array $parameters = [])\n{\n+ if (empty($textQuery)) {\n+ return new Pagerfanta(new ArrayAdapter([]));\n+ }\n+\nreturn $this->getContentByScope('frontend', $textQuery, $parameters);\n}\n}\n" } ]
PHP
MIT License
bolt/core
Don't break if we're trying to get content for "no ContentTypes"
95,144
03.09.2020 13:00:08
-7,200
2171833a09abe9295b331f655a55c39e7b8edc80
Prevent recursion in `title_format`
[ { "change_type": "MODIFY", "old_path": "src/Utils/ContentHelper.php", "new_path": "src/Utils/ContentHelper.php", "diff": "@@ -175,6 +175,13 @@ class ContentHelper\nreturn $field;\n}\n+ // We must ensure this method is not called recursively. For example\n+ // `title_format: {title}` would otherwise result in an endless loop\n+ // @see https://github.com/bolt/core/issues/1825\n+ if (Recursion::detect()) {\n+ return '(recursion)';\n+ }\n+\nif (array_key_exists($match[1], $record->getExtras())) {\n// If it's the icon, return an html element\nif ($match[1] === 'icon') {\n" }, { "change_type": "ADD", "old_path": null, "new_path": "src/Utils/Recursion.php", "diff": "+<?php\n+\n+declare(strict_types=1);\n+\n+namespace Bolt\\Utils;\n+\n+class Recursion\n+{\n+ public static function detect(): bool\n+ {\n+ $backtrace = [];\n+\n+ foreach (debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS) as $call) {\n+ if (array_key_exists('class', $call)) {\n+ $backtrace[] = $call['class'] . $call['type'] . $call['function'];\n+ } else {\n+ $backtrace[] = basename($call['file']) . '::' . $call['function'];\n+ }\n+ }\n+\n+ // The one we called from is [1]\n+ $callee = $backtrace[1];\n+\n+ $count = count(array_filter($backtrace, function ($a) use ($callee) {\n+ return $a === $callee;\n+ }));\n+\n+ return $count > 1;\n+ }\n+}\n" } ]
PHP
MIT License
bolt/core
Prevent recursion in `title_format`
95,144
03.09.2020 13:36:42
-7,200
45c05342117dbe9a518992e4d1daea514e0845b8
Update src/Event/Subscriber/ContentSaveSubscriber.php
[ { "change_type": "MODIFY", "old_path": "src/Event/Subscriber/ContentSaveSubscriber.php", "new_path": "src/Event/Subscriber/ContentSaveSubscriber.php", "diff": "@@ -55,7 +55,7 @@ class ContentSaveSubscriber implements EventSubscriberInterface\npublic function postDelete(ContentEvent $event): ContentEvent\n{\n- // Make sure we flush the cache for the menu's\n+ // Make sure we flush the cache for the menus\n$this->cache->invalidateTags(['backendmenu', 'frontendmenu']);\nreturn $event;\n" } ]
PHP
MIT License
bolt/core
Update src/Event/Subscriber/ContentSaveSubscriber.php
95,144
05.09.2020 08:09:10
-7,200
36fab1663b396909221c26fce5817516457247da
Update _taxonomylinks.html.twig
[ { "change_type": "MODIFY", "old_path": "templates/helpers/_taxonomylinks.html.twig", "new_path": "templates/helpers/_taxonomylinks.html.twig", "diff": "{% 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+ <a href=\"{{ taxonomy|link }}\" class=\"taxonomy-{{ type }}\">{{ taxonomy.name }}</a>{% if not loop.last %}, {% endif %}\n{% else %}\n{{ __('general.phrase.none') }}\n{% endfor %}\n" } ]
PHP
MIT License
bolt/core
Update _taxonomylinks.html.twig
95,144
07.09.2020 16:49:51
-7,200
5c4c8fbd48429b08fc7eb881499bf06d62fd65b7
Use configured `upload_location` for images and files in ContentTypes
[ { "change_type": "MODIFY", "old_path": "config/bolt/config.yaml", "new_path": "config/bolt/config.yaml", "diff": "@@ -180,6 +180,8 @@ accept_media_types: [ gif, jpg, jpeg, png, svg, pdf, mp3, tiff ]\n#`post_max_size` and `upload_max_filesize` in `php.ini`.\naccept_upload_size: 8M\n+upload_location: \"{year}/{month}/{contenttype}/\"\n+\n# Options to use with curl requests.\n# For all options, check the official curl documentation here https://curl.haxx.se/libcurl/c/curl_easy_setopt.html\ncurl_options:\n" }, { "change_type": "MODIFY", "old_path": "src/Configuration/Parser/ContentTypesParser.php", "new_path": "src/Configuration/Parser/ContentTypesParser.php", "diff": "@@ -274,23 +274,28 @@ class ContentTypesParser extends BaseParser\nthrow new ConfigurationException($error);\n}\n- // If field is a \"file\" type, make sure the 'extensions' are set, and it's an array.\n+ // If field is a \"file\" type, make sure the 'extensions' are set.\nif ($field['type'] === 'file' || $field['type'] === 'filelist') {\nif (empty($field['extensions'])) {\n$field['extensions'] = $acceptFileTypes;\n}\n-\n- $field['extensions'] = (array) $field['extensions'];\n}\n- // If field is an \"image\" type, make sure the 'extensions' are set, and it's an array.\n+ // If field is an \"image\" type, make sure the 'extensions' are set.\nif ($field['type'] === 'image' || $field['type'] === 'imagelist') {\nif (empty($field['extensions'])) {\n$extensions = new Collection(['gif', 'jpg', 'jpeg', 'png', 'svg']);\n$field['extensions'] = $extensions->intersect($acceptFileTypes)->toArray();\n}\n+ }\n+ // Image and File fields should have 'extensions' as an array, and a defined upload location\n+ if (in_array($field['type'], ['file', 'filelist', 'image', 'imagelist'], true)) {\n$field['extensions'] = (array) $field['extensions'];\n+\n+ if (empty($field['upload'])) {\n+ $field['upload'] = $this->generalConfig->get('upload_location');\n+ }\n}\n// Make indexed arrays into associative for select fields\n" }, { "change_type": "MODIFY", "old_path": "src/Configuration/Parser/GeneralParser.php", "new_path": "src/Configuration/Parser/GeneralParser.php", "diff": "@@ -132,6 +132,7 @@ class GeneralParser extends BaseParser\n'accept_file_types' => explode(',', 'twig,html,js,css,scss,gif,jpg,jpeg,png,ico,zip,tgz,txt,md,doc,docx,pdf,epub,xls,xlsx,csv,ppt,pptx,mp3,ogg,wav,m4a,mp4,m4v,ogv,wmv,avi,webm,svg'),\n'accept_media_types' => explode(',', 'gif,jpg,jpeg,png,svg,pdf,mp3,tiff'),\n'accept_upload_size' => '8M',\n+ 'upload_location' => '{year}/{month}/{contenttype}/',\n'branding' => [\n'name' => 'Bolt',\n'path' => '/bolt',\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/Backend/Async/UploadController.php", "new_path": "src/Controller/Backend/Async/UploadController.php", "diff": "@@ -76,7 +76,7 @@ class UploadController implements AsyncZoneInterface\n$uploadHandler = new Handler($target, [\nHandler::OPTION_AUTOCONFIRM => true,\n- Handler::OPTION_OVERWRITE => true,\n+ Handler::OPTION_OVERWRITE => false,\n]);\n$acceptedFileTypes = array_merge($this->config->getMediaTypes()->toArray(), $this->config->getFileTypes()->toArray());\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/HtmlExtension.php", "new_path": "src/Twig/HtmlExtension.php", "diff": "@@ -58,6 +58,7 @@ class HtmlExtension extends AbstractExtension\nreturn [\nnew TwigFilter('markdown', [$this, 'markdown'], $safe),\nnew TwigFilter('shy', [$this, 'shy'], $safe),\n+ new TwigFilter('placeholders', [$this, 'placeholders'], $safe),\n];\n}\n@@ -101,4 +102,19 @@ class HtmlExtension extends AbstractExtension\n{\nreturn Html::makeAbsoluteLink($link);\n}\n+\n+ public function placeholders(string $string, array $replacements = []): string\n+ {\n+ $baseReplacements = [\n+ 'year' => date('Y'),\n+ 'month' => date('m'),\n+ 'day' => date('D'),\n+ 'date' => date('Y-m-D'),\n+ 'random' => bin2hex(random_bytes(4)),\n+ ];\n+\n+ $replacements = array_merge($baseReplacements, $replacements);\n+\n+ return Str::placeholders($string, $replacements, true);\n+ }\n}\n" }, { "change_type": "MODIFY", "old_path": "templates/_partials/fields/file.html.twig", "new_path": "templates/_partials/fields/file.html.twig", "diff": "{% endset %}\n{% block field %}\n- {% set setPath = field.definition.get('upload')|default('') %}\n+ {% set setPath = field.definition.get('upload')|placeholders({'random': 4, 'contenttype': record.contenttype}) %}\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" }, { "change_type": "MODIFY", "old_path": "templates/_partials/fields/filelist.html.twig", "new_path": "templates/_partials/fields/filelist.html.twig", "diff": "{% endset %}\n{% block field %}\n- {% set setPath = field.definition.get('upload')|default('') %}\n+ {% set setPath = field.definition.get('upload')|placeholders({'random': 4, 'contenttype': record.contenttype}) %}\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" }, { "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 setPath = field.definition.get('upload')|placeholders({'random': 4, 'contenttype': record.contenttype}) %}\n{% set directory = path('bolt_async_upload', {'location': location|default('files'), 'path': setPath}) %}\n{% set filelist = path('bolt_async_filelisting', {'location': location|default('files'), 'type': 'images' }) %}\n{% set labels = {\n" }, { "change_type": "MODIFY", "old_path": "templates/_partials/fields/imagelist.html.twig", "new_path": "templates/_partials/fields/imagelist.html.twig", "diff": "{% endset %}\n{% block field %}\n-\n- {% set setPath = field.definition.get('upload')|default('') %}\n+ {% set setPath = field.definition.get('upload')|placeholders({'random': 4, 'contenttype': record.contenttype}) %}\n{% set directory = path('bolt_async_upload', {'location': location|default('files'), 'path': setPath}) %}\n{% set filelist = path('bolt_async_filelisting', {'location': location|default('files'), 'type': 'images' }) %}\n{% set labels = {\n" } ]
PHP
MIT License
bolt/core
Use configured `upload_location` for images and files in ContentTypes
95,144
07.09.2020 17:39:32
-7,200
c88ab67325c5c7969944695c2ab53d2cc1d17cac
Ensure record is set in collections
[ { "change_type": "MODIFY", "old_path": "templates/_macro/_macro.html.twig", "new_path": "templates/_macro/_macro.html.twig", "diff": "{% endapply %}{% endmacro %}\n-{% macro generate_collection_fields(collectionField, fields, compileTemplates) %}{% apply spaceless %}\n+{% macro generate_collection_fields(collectionField, fields, record, compileTemplates) %}{% apply spaceless %}\n{% set fieldsHtml = [] %}\n{% for item_field in fields %}\n{% set collectionItemName = 'collections[' ~ collectionField.name ~ '][' ~ item_field.definition.name ~ ']' %}\n'collection_name': collectionField.name,\n'collection_label': collectionField.definition.label,\n'hash': hash,\n+ 'record': record\n} %}\n{% if item_field.type != 'set' %}\n" }, { "change_type": "MODIFY", "old_path": "templates/_partials/fields/collection.html.twig", "new_path": "templates/_partials/fields/collection.html.twig", "diff": "{% set limit = field.definition.get('limit')|default(200) %}\n{# get the html for all collection field already in the database #}\n- {% set existing_fields %}{{ macro.generate_collection_fields(field, field.value, false) }}{% endset %}\n+ {% set existing_fields %}{{ macro.generate_collection_fields(field, field.value, record, false) }}{% endset %}\n{# get the html template for the collection fields defined in the field definition #}\n{% set templated_fields = \"\" %}\n{% if field.templates is defined %}\n- {% set templated_fields %}{{ macro.generate_collection_fields(field, field.templates, true) }}{% endset %}\n+ {% set templated_fields %}{{ macro.generate_collection_fields(field, field.templates, record, true) }}{% endset %}\n{% endif %}\n<editor-collection\n" } ]
PHP
MIT License
bolt/core
Ensure record is set in collections
95,144
08.09.2020 17:52:59
-7,200
14e46fb4dc518bc87b4c31d8fe44d6972655abd5
Update top toolbar. Kill your darlings!
[ { "change_type": "MODIFY", "old_path": "assets/scss/modules/admin/_toolbar.scss", "new_path": "assets/scss/modules/admin/_toolbar.scss", "diff": "align-items: center;\njustify-content: center;\nfont-size: 0.875rem;\n- padding: 0;\na {\nfont-size: 0.9375rem;\n&__brand {\njustify-content: left;\n- padding-left: 2rem;\n-\n- @include media-breakpoint-up(lg) {\n- flex: 0 1 $admin-sidebar-width;\n- }\n-\n- @include media-breakpoint-up(wd) {\n- flex: 0 1 $admin-sidebar-width-wide;\n- }\n+ padding: 0 2rem;\nsvg,\nimg {\n@include media-breakpoint-up(sm) {\ndisplay: block;\n+ padding-top: 0.1rem;\n}\na {\n" }, { "change_type": "MODIFY", "old_path": "package-lock.json", "new_path": "package-lock.json", "diff": "}\n},\n\"@babel/core\": {\n- \"version\": \"7.11.5\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/core/-/core-7.11.5.tgz\",\n- \"integrity\": \"sha512-fsEANVOcZHzrsV6dMVWqpSeXClq3lNbYrfFGme6DE25FQWe7pyeYpXyx9guqUnpy466JLzZ8z4uwSr2iv60V5Q==\",\n+ \"version\": \"7.11.6\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/core/-/core-7.11.6.tgz\",\n+ \"integrity\": \"sha512-Wpcv03AGnmkgm6uS6k8iwhIwTrcP0m17TL1n1sy7qD0qelDu4XNeW0dN0mHfa+Gei211yDaLoEe/VlbXQzM4Bg==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/code-frame\": \"^7.10.4\",\n- \"@babel/generator\": \"^7.11.5\",\n+ \"@babel/generator\": \"^7.11.6\",\n\"@babel/helper-module-transforms\": \"^7.11.0\",\n\"@babel/helpers\": \"^7.10.4\",\n\"@babel/parser\": \"^7.11.5\",\n\"lodash\": \"^4.17.19\",\n\"resolve\": \"^1.3.2\",\n\"semver\": \"^5.4.1\",\n- \"source-map\": \"^0.6.1\"\n+ \"source-map\": \"^0.5.0\"\n},\n\"dependencies\": {\n\"@babel/code-frame\": {\n}\n},\n\"@babel/generator\": {\n- \"version\": \"7.11.5\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.11.5.tgz\",\n- \"integrity\": \"sha512-9UqHWJ4IwRTy4l0o8gq2ef8ws8UPzvtMkVKjTLAiRmza9p9V6Z+OfuNd9fB1j5Q67F+dVJtPC2sZXI8NM9br4g==\",\n+ \"version\": \"7.11.6\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.11.6.tgz\",\n+ \"integrity\": \"sha512-DWtQ1PV3r+cLbySoHrwn9RWEgKMBLLma4OBQloPRyDYvc5msJM9kvTLo1YnlJd1P/ZuKbdli3ijr5q3FvAF3uA==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/types\": \"^7.11.5\",\n\"jsesc\": \"^2.5.1\",\n- \"source-map\": \"^0.6.1\"\n+ \"source-map\": \"^0.5.0\"\n}\n},\n\"@babel/helper-function-name\": {\n\"resolved\": \"https://registry.npmjs.org/semver/-/semver-5.7.1.tgz\",\n\"integrity\": \"sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==\",\n\"dev\": true\n+ },\n+ \"source-map\": {\n+ \"version\": \"0.5.7\",\n+ \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n+ \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\",\n+ \"dev\": true\n}\n}\n},\n}\n},\n\"@babel/generator\": {\n- \"version\": \"7.11.5\",\n- \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.11.5.tgz\",\n- \"integrity\": \"sha512-9UqHWJ4IwRTy4l0o8gq2ef8ws8UPzvtMkVKjTLAiRmza9p9V6Z+OfuNd9fB1j5Q67F+dVJtPC2sZXI8NM9br4g==\",\n+ \"version\": \"7.11.6\",\n+ \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.11.6.tgz\",\n+ \"integrity\": \"sha512-DWtQ1PV3r+cLbySoHrwn9RWEgKMBLLma4OBQloPRyDYvc5msJM9kvTLo1YnlJd1P/ZuKbdli3ijr5q3FvAF3uA==\",\n\"dev\": true,\n\"requires\": {\n\"@babel/types\": \"^7.11.5\",\n\"jsesc\": \"^2.5.1\",\n- \"source-map\": \"^0.6.1\"\n+ \"source-map\": \"^0.5.0\"\n}\n},\n\"@babel/helper-function-name\": {\n\"lodash\": \"^4.17.19\",\n\"to-fast-properties\": \"^2.0.0\"\n}\n+ },\n+ \"source-map\": {\n+ \"version\": \"0.5.7\",\n+ \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n+ \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\",\n+ \"dev\": true\n}\n}\n},\n}\n},\n\"browserslist\": {\n- \"version\": \"4.14.0\",\n- \"resolved\": \"https://registry.npmjs.org/browserslist/-/browserslist-4.14.0.tgz\",\n- \"integrity\": \"sha512-pUsXKAF2lVwhmtpeA3LJrZ76jXuusrNyhduuQs7CDFf9foT4Y38aQOserd2lMe5DSSrjf3fx34oHwryuvxAUgQ==\",\n+ \"version\": \"4.14.1\",\n+ \"resolved\": \"https://registry.npmjs.org/browserslist/-/browserslist-4.14.1.tgz\",\n+ \"integrity\": \"sha512-zyBTIHydW37pnb63c7fHFXUG6EcqWOqoMdDx6cdyaDFriZ20EoVxcE95S54N+heRqY8m8IUgB5zYta/gCwSaaA==\",\n\"requires\": {\n- \"caniuse-lite\": \"^1.0.30001111\",\n- \"electron-to-chromium\": \"^1.3.523\",\n+ \"caniuse-lite\": \"^1.0.30001124\",\n+ \"electron-to-chromium\": \"^1.3.562\",\n\"escalade\": \"^3.0.2\",\n\"node-releases\": \"^1.1.60\"\n}\n}\n},\n\"caniuse-lite\": {\n- \"version\": \"1.0.30001122\",\n- \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001122.tgz\",\n- \"integrity\": \"sha512-pxjw28CThdrqfz06nJkpAc5SXM404TXB/h5f4UJX+rrXJKE/1bu/KAILc2AY+O6cQIFtRjV9qOR2vaEp9LDGUA==\"\n+ \"version\": \"1.0.30001124\",\n+ \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001124.tgz\",\n+ \"integrity\": \"sha512-zQW8V3CdND7GHRH6rxm6s59Ww4g/qGWTheoboW9nfeMg7sUoopIfKCcNZUjwYRCOrvereh3kwDpZj4VLQ7zGtA==\"\n},\n\"capture-exit\": {\n\"version\": \"2.0.0\",\n\"integrity\": \"sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==\"\n},\n\"electron-to-chromium\": {\n- \"version\": \"1.3.533\",\n- \"resolved\": \"https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.533.tgz\",\n- \"integrity\": \"sha512-YqAL+NXOzjBnpY+dcOKDlZybJDCOzgsq4koW3fvyty/ldTmsb4QazZpOWmVvZ2m0t5jbBf7L0lIGU3BUipwG+A==\"\n+ \"version\": \"1.3.564\",\n+ \"resolved\": \"https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.564.tgz\",\n+ \"integrity\": \"sha512-fNaYN3EtKQWLQsrKXui8mzcryJXuA0LbCLoizeX6oayG2emBaS5MauKjCPAvc29NEY4FpLHIUWiP+Y0Bfrs5dg==\"\n},\n\"elliptic\": {\n\"version\": \"6.5.3\",\n}\n},\n\"locutus\": {\n- \"version\": \"2.0.11\",\n- \"resolved\": \"https://registry.npmjs.org/locutus/-/locutus-2.0.11.tgz\",\n- \"integrity\": \"sha512-C0q1L38lK5q1t+wE0KY21/9szrBHxye6o2z5EJzU+5B79tubNOC+nLAEzTTn1vPUGoUuehKh8kYKqiVUTWRyaQ==\",\n+ \"version\": \"2.0.12\",\n+ \"resolved\": \"https://registry.npmjs.org/locutus/-/locutus-2.0.12.tgz\",\n+ \"integrity\": \"sha512-wnzhY9xOdDb2djr17kQhTh9oZgEfp78zI27KRRiiV1GnPXWA2xfVODbpH3QgpIuUMLupM02+6X/rJXvktTpnoA==\",\n\"requires\": {\n\"es6-promise\": \"^4.2.5\"\n}\n" }, { "change_type": "MODIFY", "old_path": "package.json", "new_path": "package.json", "diff": "\"baguettebox.js\": \"^1.11.1\",\n\"bootbox\": \"^5.4.0\",\n\"bootstrap\": \"^4.5.2\",\n- \"browserslist\": \"^4.14.0\",\n- \"caniuse-lite\": \"^1.0.30001122\",\n+ \"browserslist\": \"^4.14.1\",\n+ \"caniuse-lite\": \"^1.0.30001124\",\n\"codemirror\": \"^5.57.0\",\n\"dropzone\": \"^5.7.2\",\n\"flagpack\": \"^1.0.5\",\n\"hotkeys-js\": \"^3.8.1\",\n\"jquery\": \"^3.5.1\",\n- \"locutus\": \"^2.0.11\",\n+ \"locutus\": \"^2.0.12\",\n\"luxon\": \"^1.25.0\",\n\"no-scroll\": \"^2.1.1\",\n\"node-vibrant\": \"^3.1.5\",\n\"zxcvbn\": \"^4.4.2\"\n},\n\"devDependencies\": {\n- \"@babel/core\": \"^7.11.5\",\n+ \"@babel/core\": \"^7.11.6\",\n\"@babel/plugin-transform-regenerator\": \"^7.10.4\",\n\"@babel/plugin-transform-runtime\": \"^7.11.5\",\n\"@babel/polyfill\": \"^7.11.5\",\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_site'|trans,\n- 'action.create_new': 'action.create_new'|trans,\n+ 'action.view_site': config.get('general/sitename'),\n'general.greeting': 'general.greeting'|trans({'%name%': user_display_name}),\n'action.logout': 'action.logout'|trans,\n'action.edit_profile': 'action.edit_profile'|trans,\n" } ]
PHP
MIT License
bolt/core
Update top toolbar. Kill your darlings!
95,144
08.09.2020 19:46:09
-7,200
c71e700c47def4b47cab5c4ccbe80c23dd6daa48
Let's put back the "Hey, Admin!"
[ { "change_type": "MODIFY", "old_path": "assets/js/app/toolbar/Components/Toolbar.vue", "new_path": "assets/js/app/toolbar/Components/Toolbar.vue", "diff": "aria-haspopup=\"true\"\naria-expanded=\"false\"\n>\n- <i class=\"fas fa-user\" :title=\"labels['general.greeting']\"></i>\n+ <i class=\"fas fa-user\"></i>{{ labels['general.greeting'] }}\n</button>\n<div class=\"profile__dropdown dropdown-menu dropdown-menu-right\">\n<ul>\n" }, { "change_type": "MODIFY", "old_path": "package-lock.json", "new_path": "package-lock.json", "diff": "},\n\"is-obj\": {\n\"version\": \"1.0.1\",\n- \"resolved\": \"http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz\",\n\"integrity\": \"sha1-PkcprB9f3gJc19g6iW2rn09n2w8=\"\n},\n\"is-path-cwd\": {\n},\n\"load-json-file\": {\n\"version\": \"1.1.0\",\n- \"resolved\": \"http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz\",\n\"integrity\": \"sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=\",\n\"dev\": true,\n\"requires\": {\n},\n\"semver\": {\n\"version\": \"5.3.0\",\n- \"resolved\": \"http://registry.npmjs.org/semver/-/semver-5.3.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/semver/-/semver-5.3.0.tgz\",\n\"integrity\": \"sha1-myzl094C0XxgEq0yaqa00M9U+U8=\",\n\"dev\": true\n}\n},\n\"safe-regex\": {\n\"version\": \"1.1.0\",\n- \"resolved\": \"http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz\",\n\"integrity\": \"sha1-QKNmnzsHfR6UPURinhV91IAjvy4=\",\n\"requires\": {\n\"ret\": \"~0.1.10\"\n},\n\"strip-ansi\": {\n\"version\": \"3.0.1\",\n- \"resolved\": \"http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz\",\n\"integrity\": \"sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=\",\n\"requires\": {\n\"ansi-regex\": \"^2.0.0\"\n},\n\"strip-eof\": {\n\"version\": \"1.0.0\",\n- \"resolved\": \"http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz\",\n\"integrity\": \"sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=\"\n},\n\"strip-final-newline\": {\n" } ]
PHP
MIT License
bolt/core
Let's put back the "Hey, Admin!"
95,144
09.09.2020 16:06:03
-7,200
9e73151f169218f9baabc1a7ffa6a491e3d3a149
Support taxonomies in `title_format` and `excerpt_format`
[ { "change_type": "MODIFY", "old_path": "src/Utils/ContentHelper.php", "new_path": "src/Utils/ContentHelper.php", "diff": "@@ -175,6 +175,15 @@ class ContentHelper\nreturn $field;\n}\n+ if ($record->hasTaxonomyDefined($match[1])) {\n+ $result = [];\n+ foreach ($record->getTaxonomies($match[1]) as $item) {\n+ $result[] = $item->getName();\n+ }\n+\n+ return implode(', ', $result);\n+ }\n+\n// We must ensure this method is not called recursively. For example\n// `title_format: {title}` would otherwise result in an endless loop\n// @see https://github.com/bolt/core/issues/1825\n" } ]
PHP
MIT License
bolt/core
Support taxonomies in `title_format` and `excerpt_format`
95,144
10.09.2020 12:33:08
-7,200
ce8f73c773e37c642e7eb80e0b4f111821ad3912
Make `placeholders()` accept `null` for robustness
[ { "change_type": "MODIFY", "old_path": "src/Twig/HtmlExtension.php", "new_path": "src/Twig/HtmlExtension.php", "diff": "@@ -103,7 +103,7 @@ class HtmlExtension extends AbstractExtension\nreturn Html::makeAbsoluteLink($link);\n}\n- public function placeholders(string $string, array $replacements = []): string\n+ public function placeholders(?string $string = null, array $replacements = []): string\n{\n$baseReplacements = [\n'year' => date('Y'),\n@@ -115,6 +115,6 @@ class HtmlExtension extends AbstractExtension\n$replacements = array_merge($baseReplacements, $replacements);\n- return Str::placeholders($string, $replacements, true);\n+ return Str::placeholders((string) $string, $replacements, true);\n}\n}\n" } ]
PHP
MIT License
bolt/core
Make `placeholders()` accept `null` for robustness
95,144
11.09.2020 06:29:32
-7,200
8d659a69e59b9ea21a132b77e18424ee0089eab9
Pass in `record` with Set partial
[ { "change_type": "MODIFY", "old_path": "templates/_partials/fields/set.html.twig", "new_path": "templates/_partials/fields/set.html.twig", "diff": "{% if in_collection is defined %}\n{% set setChildName = name ~ '[' ~ setChild.name ~ ']' %}\n{% set setChildId = id ~ '-' ~ setChild.name|default('unnamed') %}\n- {% include includeLookup with {'id': setChildId, 'field' : setChild, 'name' : setChildName, 'include_id': true} only %}\n+ {% include includeLookup with {'id': setChildId, 'field' : setChild, 'name' : setChildName, 'record': record, 'include_id': true} only %}\n{% else %}\n{% set setChildName = 'sets[' ~ field.name ~ ']' ~ '[' ~ setChild.name ~ ']' %}\n{% set setChildId = 'field-' ~ field.name|default(name)|default('unnamed') ~ '-' ~ setChild.name|default('unnamed') %}\n- {% include includeLookup with {'field' : setChild, 'name' : setChildName, 'id': setChildId} only %}\n+ {% include includeLookup with {'id': setChildId, 'field' : setChild, 'name' : setChildName, 'record': record} only %}\n{% endif %}\n{% endfor %}\n{% endblock %}\n" } ]
PHP
MIT License
bolt/core
Pass in `record` with Set partial
95,144
11.09.2020 06:44:44
-7,200
fa1d1b142074040e4710d57f322ec0c0dc74d300
Prepare release 4.0.0-rc.42
[ { "change_type": "MODIFY", "old_path": "package-lock.json", "new_path": "package-lock.json", "diff": "{\n\"name\": \"bolt\",\n- \"version\": \"4.0.0-rc.41\",\n+ \"version\": \"4.0.0-rc.42\",\n\"lockfileVersion\": 1,\n\"requires\": true,\n\"dependencies\": {\n\"integrity\": \"sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==\"\n},\n\"@types/express\": {\n- \"version\": \"4.17.7\",\n- \"resolved\": \"https://registry.npmjs.org/@types/express/-/express-4.17.7.tgz\",\n- \"integrity\": \"sha512-dCOT5lcmV/uC2J9k0rPafATeeyz+99xTt54ReX11/LObZgfzJqZNcW27zGhYyX+9iSEGXGt5qLPwRSvBZcLvtQ==\",\n+ \"version\": \"4.17.8\",\n+ \"resolved\": \"https://registry.npmjs.org/@types/express/-/express-4.17.8.tgz\",\n+ \"integrity\": \"sha512-wLhcKh3PMlyA2cNAB9sjM1BntnhPMiM0JOBwPBqttjHev2428MLEB4AYVN+d8s2iyCVZac+o41Pflm/ZH5vLXQ==\",\n\"requires\": {\n\"@types/body-parser\": \"*\",\n\"@types/express-serve-static-core\": \"*\",\n}\n},\n\"@types/express-serve-static-core\": {\n- \"version\": \"4.17.9\",\n- \"resolved\": \"https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.9.tgz\",\n- \"integrity\": \"sha512-DG0BYg6yO+ePW+XoDENYz8zhNGC3jDDEpComMYn7WJc4mY1Us8Rw9ax2YhJXxpyk2SF47PQAoQ0YyVT1a0bEkA==\",\n+ \"version\": \"4.17.12\",\n+ \"resolved\": \"https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.12.tgz\",\n+ \"integrity\": \"sha512-EaEdY+Dty1jEU7U6J4CUWwxL+hyEGMkO5jan5gplfegUgCUsIUWqXxqw47uGjimeT4Qgkz/XUfwoau08+fgvKA==\",\n\"requires\": {\n\"@types/node\": \"*\",\n\"@types/qs\": \"*\",\n}\n},\n\"@types/json-schema\": {\n- \"version\": \"7.0.5\",\n- \"resolved\": \"https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.5.tgz\",\n- \"integrity\": \"sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ==\"\n+ \"version\": \"7.0.6\",\n+ \"resolved\": \"https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.6.tgz\",\n+ \"integrity\": \"sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==\"\n},\n\"@types/lodash\": {\n\"version\": \"4.14.149\",\n\"dev\": true\n},\n\"@vue/cli-overlay\": {\n- \"version\": \"4.5.4\",\n- \"resolved\": \"https://registry.npmjs.org/@vue/cli-overlay/-/cli-overlay-4.5.4.tgz\",\n- \"integrity\": \"sha512-nthli1n7rXaqaMZsH0KNdFqeYJxDOQNeaobp9SjeSdrpD1xAj/B0+RJMWQWIFsfdQn1AQP1UVMnkfdakTiLgxA==\"\n+ \"version\": \"4.5.6\",\n+ \"resolved\": \"https://registry.npmjs.org/@vue/cli-overlay/-/cli-overlay-4.5.6.tgz\",\n+ \"integrity\": \"sha512-8kFIdiErtGRlvKWJV0AcF6SXakQDxeuqqcMhWt3qIJxRH6aD33RTC37Q3KWuMsYryBZpEY3tNWGhS1d4spQu0g==\"\n},\n\"@vue/cli-plugin-router\": {\n- \"version\": \"4.5.4\",\n- \"resolved\": \"https://registry.npmjs.org/@vue/cli-plugin-router/-/cli-plugin-router-4.5.4.tgz\",\n- \"integrity\": \"sha512-9/qRICZbq1qucq9M9z6jYT5UWNvcTu9BgHtXgsaK9gJsdmpxDIfD0SvW9nzZaHb8xxixvDRotMM/0Juw2oCsKQ==\",\n+ \"version\": \"4.5.6\",\n+ \"resolved\": \"https://registry.npmjs.org/@vue/cli-plugin-router/-/cli-plugin-router-4.5.6.tgz\",\n+ \"integrity\": \"sha512-QEqOGglg0JEKddZPuyiSnAzAVK7IzLrdTPCUegigzGSbUXDW4gQiltY3/2nij2q538YvdIM7JXtW1sUfy4MgHQ==\",\n\"requires\": {\n- \"@vue/cli-shared-utils\": \"^4.5.4\"\n+ \"@vue/cli-shared-utils\": \"^4.5.6\"\n}\n},\n\"@vue/cli-plugin-vuex\": {\n- \"version\": \"4.5.4\",\n- \"resolved\": \"https://registry.npmjs.org/@vue/cli-plugin-vuex/-/cli-plugin-vuex-4.5.4.tgz\",\n- \"integrity\": \"sha512-X/F4E/dIRdiogKCdO4VGjUy5f4Fbxs7mu/gSi6Ubltle0eNE+tbBgLPH4r2g7GmHKNph4k39ikvfOMpXZcTFZg==\"\n+ \"version\": \"4.5.6\",\n+ \"resolved\": \"https://registry.npmjs.org/@vue/cli-plugin-vuex/-/cli-plugin-vuex-4.5.6.tgz\",\n+ \"integrity\": \"sha512-cWxj0jIhhupU+oFl0mc1St3ig9iF5F01XKwAhKEbvvuHR97zHxLd29My/vvcRwojZMy4aY320oJ+0ljoCIbueQ==\"\n},\n\"@vue/cli-service\": {\n- \"version\": \"4.5.4\",\n- \"resolved\": \"https://registry.npmjs.org/@vue/cli-service/-/cli-service-4.5.4.tgz\",\n- \"integrity\": \"sha512-30zcebYno9tMvGsvZsnSPtieBvU5H3CkRW1JgiBmPG3Fcxp3BGSAy82Dl1gOUEj1VsAUqXWKMWX6frkYldi8UA==\",\n+ \"version\": \"4.5.6\",\n+ \"resolved\": \"https://registry.npmjs.org/@vue/cli-service/-/cli-service-4.5.6.tgz\",\n+ \"integrity\": \"sha512-wl0rhjHSpy2Mc2zNU6sfhaUVNNaRzgXNfZMIpTZMO3wJalPMLuvGC3KLMaXcpvuI01zeQBmkEocAdhzay4lQ0w==\",\n\"requires\": {\n\"@intervolga/optimize-cssnano-plugin\": \"^1.0.5\",\n\"@soda/friendly-errors-webpack-plugin\": \"^1.7.1\",\n\"@types/minimist\": \"^1.2.0\",\n\"@types/webpack\": \"^4.0.0\",\n\"@types/webpack-dev-server\": \"^3.11.0\",\n- \"@vue/cli-overlay\": \"^4.5.4\",\n- \"@vue/cli-plugin-router\": \"^4.5.4\",\n- \"@vue/cli-plugin-vuex\": \"^4.5.4\",\n- \"@vue/cli-shared-utils\": \"^4.5.4\",\n+ \"@vue/cli-overlay\": \"^4.5.6\",\n+ \"@vue/cli-plugin-router\": \"^4.5.6\",\n+ \"@vue/cli-plugin-vuex\": \"^4.5.6\",\n+ \"@vue/cli-shared-utils\": \"^4.5.6\",\n\"@vue/component-compiler-utils\": \"^3.1.2\",\n\"@vue/preload-webpack-plugin\": \"^1.1.0\",\n\"@vue/web-component-wrapper\": \"^1.2.0\",\n\"thread-loader\": \"^2.1.3\",\n\"url-loader\": \"^2.2.0\",\n\"vue-loader\": \"^15.9.2\",\n- \"vue-loader-v16\": \"npm:vue-loader@^16.0.0-beta.3\",\n+ \"vue-loader-v16\": \"npm:vue-loader@^16.0.0-beta.7\",\n\"vue-style-loader\": \"^4.1.2\",\n\"webpack\": \"^4.0.0\",\n\"webpack-bundle-analyzer\": \"^3.8.0\",\n}\n},\n\"schema-utils\": {\n- \"version\": \"2.7.0\",\n- \"resolved\": \"https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz\",\n- \"integrity\": \"sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==\",\n- \"requires\": {\n- \"@types/json-schema\": \"^7.0.4\",\n- \"ajv\": \"^6.12.2\",\n- \"ajv-keywords\": \"^3.4.1\"\n- }\n- },\n- \"serialize-javascript\": {\n- \"version\": \"4.0.0\",\n- \"resolved\": \"https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz\",\n- \"integrity\": \"sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==\",\n+ \"version\": \"2.7.1\",\n+ \"resolved\": \"https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz\",\n+ \"integrity\": \"sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==\",\n\"requires\": {\n- \"randombytes\": \"^2.1.0\"\n+ \"@types/json-schema\": \"^7.0.5\",\n+ \"ajv\": \"^6.12.4\",\n+ \"ajv-keywords\": \"^3.5.2\"\n}\n},\n\"ssri\": {\n}\n},\n\"supports-color\": {\n- \"version\": \"7.1.0\",\n- \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz\",\n- \"integrity\": \"sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==\",\n+ \"version\": \"7.2.0\",\n+ \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz\",\n+ \"integrity\": \"sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==\",\n\"optional\": true,\n\"requires\": {\n\"has-flag\": \"^4.0.0\"\n}\n},\n\"vue-loader-v16\": {\n- \"version\": \"npm:vue-loader@16.0.0-beta.5\",\n- \"resolved\": \"https://registry.npmjs.org/vue-loader/-/vue-loader-16.0.0-beta.5.tgz\",\n- \"integrity\": \"sha512-ciWfzNefqWlmzKznCWY9hl+fPP4KlQ0A9MtHbJ/8DpyY+dAM8gDrjufIdxwTgC4szE4EZC3A6ip/BbrqM84GqA==\",\n+ \"version\": \"npm:vue-loader@16.0.0-beta.7\",\n+ \"resolved\": \"https://registry.npmjs.org/vue-loader/-/vue-loader-16.0.0-beta.7.tgz\",\n+ \"integrity\": \"sha512-xQ8/GZmRPdQ3EinnE0IXwdVoDzh7Dowo0MowoyBuScEBXrRabw6At5/IdtD3waKklKW5PGokPsm8KRN6rvQ1cw==\",\n\"optional\": true,\n\"requires\": {\n\"@types/mini-css-extract-plugin\": \"^0.9.1\",\n}\n},\n\"@vue/cli-shared-utils\": {\n- \"version\": \"4.5.4\",\n- \"resolved\": \"https://registry.npmjs.org/@vue/cli-shared-utils/-/cli-shared-utils-4.5.4.tgz\",\n- \"integrity\": \"sha512-7ZwAvGxl5szGuaJCc4jdPy/2Lb7oJvG847MDF+7pZ7FVl6bURwbUJjiUwL6DTxvpC4vch6B4tXfVvZFjzVP/bw==\",\n+ \"version\": \"4.5.6\",\n+ \"resolved\": \"https://registry.npmjs.org/@vue/cli-shared-utils/-/cli-shared-utils-4.5.6.tgz\",\n+ \"integrity\": \"sha512-p6ePDlEa7Xc0GEt99KDOCwPZtR7UnoEaZLMfwPYU5LAWkdCmtAw8HPAY/WWcjtoiaAkY4k9tz7ZehQasZ9mJxg==\",\n\"requires\": {\n\"@hapi/joi\": \"^15.0.1\",\n\"chalk\": \"^2.4.2\",\n\"integrity\": \"sha512-LIZMuJk38pk9U9Ur4YzHjlIyMuxPlACdBIHH9/nGYVTsaGKOSnSuELiE8vS9wa+dJpIYspYUOqk+L1Q4pgHQHQ==\"\n},\n\"@vue/test-utils\": {\n- \"version\": \"1.0.5\",\n- \"resolved\": \"https://registry.npmjs.org/@vue/test-utils/-/test-utils-1.0.5.tgz\",\n- \"integrity\": \"sha512-P2x8kXwqfTXesAdfJQN146V1S3QD3Xv9wYZ1B09Oecmg7I3Fpqqo1CwfIn5ivwuXyBPQWFDH4vyBHynnYjIkRg==\",\n+ \"version\": \"1.1.0\",\n+ \"resolved\": \"https://registry.npmjs.org/@vue/test-utils/-/test-utils-1.1.0.tgz\",\n+ \"integrity\": \"sha512-M+3jtVqNYIrvzO5gaxogre5a5+96h0hN/dXw+5Lj0t+dp6fAhYcUjpLrC9j9cEEkl2Rcuh/gKYRUmR5N4vcqPw==\",\n\"dev\": true,\n\"requires\": {\n\"dom-event-types\": \"^1.0.0\",\n}\n},\n\"browserslist\": {\n- \"version\": \"4.14.1\",\n- \"resolved\": \"https://registry.npmjs.org/browserslist/-/browserslist-4.14.1.tgz\",\n- \"integrity\": \"sha512-zyBTIHydW37pnb63c7fHFXUG6EcqWOqoMdDx6cdyaDFriZ20EoVxcE95S54N+heRqY8m8IUgB5zYta/gCwSaaA==\",\n+ \"version\": \"4.14.2\",\n+ \"resolved\": \"https://registry.npmjs.org/browserslist/-/browserslist-4.14.2.tgz\",\n+ \"integrity\": \"sha512-HI4lPveGKUR0x2StIz+2FXfDk9SfVMrxn6PLh1JeGUwcuoDkdKZebWiyLRJ68iIPDpMI4JLVDf7S7XzslgWOhw==\",\n\"requires\": {\n- \"caniuse-lite\": \"^1.0.30001124\",\n- \"electron-to-chromium\": \"^1.3.562\",\n+ \"caniuse-lite\": \"^1.0.30001125\",\n+ \"electron-to-chromium\": \"^1.3.564\",\n\"escalade\": \"^3.0.2\",\n- \"node-releases\": \"^1.1.60\"\n+ \"node-releases\": \"^1.1.61\"\n}\n},\n\"bser\": {\n\"integrity\": \"sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==\"\n},\n\"schema-utils\": {\n- \"version\": \"2.7.0\",\n- \"resolved\": \"https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz\",\n- \"integrity\": \"sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==\",\n+ \"version\": \"2.7.1\",\n+ \"resolved\": \"https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz\",\n+ \"integrity\": \"sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==\",\n\"requires\": {\n- \"@types/json-schema\": \"^7.0.4\",\n- \"ajv\": \"^6.12.2\",\n- \"ajv-keywords\": \"^3.4.1\"\n+ \"@types/json-schema\": \"^7.0.5\",\n+ \"ajv\": \"^6.12.4\",\n+ \"ajv-keywords\": \"^3.5.2\"\n}\n}\n}\n}\n},\n\"caniuse-lite\": {\n- \"version\": \"1.0.30001124\",\n- \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001124.tgz\",\n- \"integrity\": \"sha512-zQW8V3CdND7GHRH6rxm6s59Ww4g/qGWTheoboW9nfeMg7sUoopIfKCcNZUjwYRCOrvereh3kwDpZj4VLQ7zGtA==\"\n+ \"version\": \"1.0.30001125\",\n+ \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001125.tgz\",\n+ \"integrity\": \"sha512-9f+r7BW8Qli917mU3j0fUaTweT3f3vnX/Lcs+1C73V+RADmFme+Ih0Br8vONQi3X0lseOe6ZHfsZLCA8MSjxUA==\"\n},\n\"capture-exit\": {\n\"version\": \"2.0.0\",\n\"integrity\": \"sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==\"\n},\n\"supports-color\": {\n- \"version\": \"7.1.0\",\n- \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz\",\n- \"integrity\": \"sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==\",\n+ \"version\": \"7.2.0\",\n+ \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz\",\n+ \"integrity\": \"sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==\",\n\"requires\": {\n\"has-flag\": \"^4.0.0\"\n}\n\"integrity\": \"sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==\"\n},\n\"schema-utils\": {\n- \"version\": \"2.7.0\",\n- \"resolved\": \"https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz\",\n- \"integrity\": \"sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==\",\n+ \"version\": \"2.7.1\",\n+ \"resolved\": \"https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz\",\n+ \"integrity\": \"sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==\",\n\"requires\": {\n- \"@types/json-schema\": \"^7.0.4\",\n- \"ajv\": \"^6.12.2\",\n- \"ajv-keywords\": \"^3.4.1\"\n+ \"@types/json-schema\": \"^7.0.5\",\n+ \"ajv\": \"^6.12.4\",\n+ \"ajv-keywords\": \"^3.5.2\"\n}\n}\n}\n\"integrity\": \"sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==\"\n},\n\"electron-to-chromium\": {\n- \"version\": \"1.3.564\",\n- \"resolved\": \"https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.564.tgz\",\n- \"integrity\": \"sha512-fNaYN3EtKQWLQsrKXui8mzcryJXuA0LbCLoizeX6oayG2emBaS5MauKjCPAvc29NEY4FpLHIUWiP+Y0Bfrs5dg==\"\n+ \"version\": \"1.3.565\",\n+ \"resolved\": \"https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.565.tgz\",\n+ \"integrity\": \"sha512-me5dGlHFd8Q7mKhqbWRLIYnKjw4i0fO6hmW0JBxa7tM87fBfNEjWokRnDF7V+Qme/9IYpwhfMn+soWs40tXWqg==\"\n},\n\"elliptic\": {\n\"version\": \"6.5.3\",\n\"integrity\": \"sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==\"\n},\n\"schema-utils\": {\n- \"version\": \"2.7.0\",\n- \"resolved\": \"https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz\",\n- \"integrity\": \"sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==\",\n+ \"version\": \"2.7.1\",\n+ \"resolved\": \"https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz\",\n+ \"integrity\": \"sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==\",\n\"requires\": {\n- \"@types/json-schema\": \"^7.0.4\",\n- \"ajv\": \"^6.12.2\",\n- \"ajv-keywords\": \"^3.4.1\"\n+ \"@types/json-schema\": \"^7.0.5\",\n+ \"ajv\": \"^6.12.4\",\n+ \"ajv-keywords\": \"^3.5.2\"\n}\n}\n}\n}\n},\n\"node-releases\": {\n- \"version\": \"1.1.60\",\n- \"resolved\": \"https://registry.npmjs.org/node-releases/-/node-releases-1.1.60.tgz\",\n- \"integrity\": \"sha512-gsO4vjEdQaTusZAEebUWp2a5d7dF5DYoIpDG7WySnk7BuZDW+GPpHXoXXuYawRBr/9t5q54tirPz79kFIWg4dA==\"\n+ \"version\": \"1.1.61\",\n+ \"resolved\": \"https://registry.npmjs.org/node-releases/-/node-releases-1.1.61.tgz\",\n+ \"integrity\": \"sha512-DD5vebQLg8jLCOzwupn954fbIiZht05DAZs0k2u8NStSe6h9XdsuIQL8hSRKYiU8WUQRznmSDrKGbv3ObOmC7g==\"\n},\n\"node-sass\": {\n\"version\": \"4.14.1\",\n}\n},\n\"opener\": {\n- \"version\": \"1.5.1\",\n- \"resolved\": \"https://registry.npmjs.org/opener/-/opener-1.5.1.tgz\",\n- \"integrity\": \"sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==\"\n+ \"version\": \"1.5.2\",\n+ \"resolved\": \"https://registry.npmjs.org/opener/-/opener-1.5.2.tgz\",\n+ \"integrity\": \"sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==\"\n},\n\"opn\": {\n\"version\": \"5.5.0\",\n\"integrity\": \"sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==\"\n},\n\"schema-utils\": {\n- \"version\": \"2.7.0\",\n- \"resolved\": \"https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz\",\n- \"integrity\": \"sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==\",\n+ \"version\": \"2.7.1\",\n+ \"resolved\": \"https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz\",\n+ \"integrity\": \"sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==\",\n\"requires\": {\n- \"@types/json-schema\": \"^7.0.4\",\n- \"ajv\": \"^6.12.2\",\n- \"ajv-keywords\": \"^3.4.1\"\n+ \"@types/json-schema\": \"^7.0.5\",\n+ \"ajv\": \"^6.12.4\",\n+ \"ajv-keywords\": \"^3.5.2\"\n}\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "package.json", "new_path": "package.json", "diff": "{\n\"name\": \"bolt\",\n- \"version\": \"4.0.0-rc.41\",\n+ \"version\": \"4.0.0-rc.42\",\n\"homepage\": \"https://boltcms.io\",\n\"author\": \"Bob den Otter <bob@twokings.nl> (https://boltcms.io)\",\n\"license\": \"MIT\",\n\"url\": \"git://github.com/bolt/core.git\"\n},\n\"dependencies\": {\n- \"@vue/cli-service\": \"^4.5.4\",\n+ \"@vue/cli-service\": \"^4.5.6\",\n\"axios\": \"^0.19.2\",\n\"baguettebox.js\": \"^1.11.1\",\n\"bootbox\": \"^5.4.0\",\n\"bootstrap\": \"^4.5.2\",\n- \"browserslist\": \"^4.14.1\",\n- \"caniuse-lite\": \"^1.0.30001124\",\n+ \"browserslist\": \"^4.14.2\",\n+ \"caniuse-lite\": \"^1.0.30001125\",\n\"codemirror\": \"^5.57.0\",\n\"dropzone\": \"^5.7.2\",\n\"flagpack\": \"^1.0.5\",\n\"@babel/preset-env\": \"^7.11.5\",\n\"@fortawesome/fontawesome-free\": \"^5.14.0\",\n\"@symfony/webpack-encore\": \"^0.30.2\",\n- \"@vue/test-utils\": \"^1.0.5\",\n+ \"@vue/test-utils\": \"^1.1.0\",\n\"ajv-keywords\": \"^3.5.2\",\n\"autoprefixer\": \"^9.8.6\",\n\"babel-core\": \"^7.0.0-bridge.0\",\n" } ]
PHP
MIT License
bolt/core
Prepare release 4.0.0-rc.42
95,144
13.09.2020 17:39:45
-7,200
506d747d16a07d317a4f4ec04913c7d6b78061e0
Make possible to check if an extension is present, directly in Twig
[ { "change_type": "MODIFY", "old_path": "src/Command/ExtensionsListCommand.php", "new_path": "src/Command/ExtensionsListCommand.php", "diff": "@@ -37,14 +37,14 @@ class ExtensionsListCommand extends Command\n$rows = [];\nforeach ($extensions as $extension) {\n- $rows[] = [$extension->getClass(), $extension->getName()];\n+ $rows[] = [$extension->getComposerPackage()->getName(), $extension->getClass(), $extension->getName()];\n}\n$io = new SymfonyStyle($input, $output);\nif (! empty($rows)) {\n$io->text('Currently installed extensions:');\n- $io->table(['Class', 'Extension name'], $rows);\n+ $io->table(['Package name', 'Class', 'Extension name'], $rows);\n} else {\n$io->caution('No installed extensions could be found');\n}\n" }, { "change_type": "ADD", "old_path": null, "new_path": "src/Twig/ExtensionExtension.php", "diff": "+<?php\n+\n+declare(strict_types=1);\n+\n+namespace Bolt\\Twig;\n+\n+use Bolt\\Extension\\ExtensionRegistry;\n+use Tightenco\\Collect\\Support\\Collection;\n+use Twig\\Extension\\AbstractExtension;\n+use Twig\\TwigFunction;\n+\n+/**\n+ * Widget functionality Twig extension.\n+ */\n+class ExtensionExtension extends AbstractExtension\n+{\n+ /** @var ExtensionRegistry */\n+ private $registry;\n+\n+ public function __construct(ExtensionRegistry $registry)\n+ {\n+ $this->registry = $registry;\n+ }\n+\n+ /**\n+ * {@inheritdoc}\n+ */\n+ public function getFunctions(): array\n+ {\n+ return [\n+ new TwigFunction('extension_exists', [$this, 'extensionExists']),\n+ new TwigFunction('extensions', [$this, 'getExtensions']),\n+ ];\n+ }\n+\n+ public function getExtensions(): Collection\n+ {\n+ $extensions = $this->registry->getExtensions();\n+\n+ $rows = [];\n+\n+ foreach ($extensions as $extension) {\n+ $rows[] = [\n+ 'package' => $extension->getComposerPackage()->getName(),\n+ 'class' => $extension->getClass(),\n+ 'name' => $extension->getName(),\n+ ];\n+ }\n+\n+ return new Collection($rows);\n+ }\n+\n+ public function extensionExists(string $name): bool\n+ {\n+ $extensions = $this->getExtensions();\n+\n+ return $extensions->where('package', $name)->isNotEmpty() ||\n+ $extensions->where('class', $name)->isNotEmpty() ||\n+ $extensions->where('name', $name)->isNotEmpty();\n+ }\n+}\n" } ]
PHP
MIT License
bolt/core
Make possible to check if an extension is present, directly in Twig
95,144
13.09.2020 17:42:30
-7,200
518ff2830623939c53f42828a761df8f7d6ca2f0
Add optional parameter to `excerpt` to wrap output in `<p>`
[ { "change_type": "MODIFY", "old_path": "src/Twig/ContentExtension.php", "new_path": "src/Twig/ContentExtension.php", "diff": "@@ -238,9 +238,8 @@ class ContentExtension extends AbstractExtension\n/**\n* @param string|Markup|Content|Field $content\n- * @param string|array|null $focus\n*/\n- public function getExcerpt($content, int $length = 280, bool $includeTitle = false, $focus = null): string\n+ public function getExcerpt($content, int $length = 280, bool $includeTitle = false, ?string $focus = null, bool $wrap = false): string\n{\nif (is_string($content) || $content instanceof Markup || $content instanceof Field) {\nreturn Excerpt::getExcerpt((string) $content, $length, $focus);\n@@ -252,7 +251,15 @@ class ContentExtension extends AbstractExtension\n$excerpt = $this->getFieldBasedExcerpt($content, $length, $includeTitle);\n}\n- return Excerpt::getExcerpt(rtrim($excerpt, '. '), $length, $focus);\n+ if ($wrap) {\n+ $pre = '<p>';\n+ $post = '</p>';\n+ } else {\n+ $pre = '';\n+ $post = '';\n+ }\n+\n+ return $pre . Excerpt::getExcerpt(rtrim($excerpt, '. '), $length, $focus) . $post;\n}\nprivate function getFieldBasedExcerpt(Content $content, int $length, bool $includeTitle = false): string\n" } ]
PHP
MIT License
bolt/core
Add optional parameter to `excerpt` to wrap output in `<p>`
95,144
13.09.2020 17:46:05
-7,200
a77e66aea5c016dadcc2d37750b78a7d2183e4b0
Updating Fixtures for impending release
[ { "change_type": "MODIFY", "old_path": "config/bolt/config.yaml", "new_path": "config/bolt/config.yaml", "diff": "@@ -180,6 +180,7 @@ accept_media_types: [ gif, jpg, jpeg, png, svg, pdf, mp3, tiff ]\n#`post_max_size` and `upload_max_filesize` in `php.ini`.\naccept_upload_size: 8M\n+# Default location for uploading files.\nupload_location: \"{year}/{month}/{contenttype}/\"\n# Options to use with curl requests.\n" }, { "change_type": "MODIFY", "old_path": "src/DataFixtures/ContentFixtures.php", "new_path": "src/DataFixtures/ContentFixtures.php", "diff": "@@ -363,6 +363,26 @@ class ContentFixtures extends BaseFixture implements DependentFixtureInterface,\n'title' => 'Search',\n'slug' => 'search',\n];\n+ $records['blocks'][] = [\n+ 'title' => 'Our People',\n+ 'slug' => 'people',\n+ ];\n+ $records['blocks'][] = [\n+ 'title' => 'Call to Action',\n+ 'slug' => 'call-to-action',\n+ ];\n+ $records['blocks'][] = [\n+ 'title' => 'Hero Section',\n+ 'slug' => 'hero-section',\n+ ];\n+ $records['blocks'][] = [\n+ 'title' => 'Introduction',\n+ 'slug' => 'introduction',\n+ ];\n+ $records['blocks'][] = [\n+ 'title' => 'Newsletter',\n+ 'slug' => 'newsletter',\n+ ];\n$records['blocks'][] = [\n'title' => '404 Page not found',\n'slug' => '404-not-found',\n" }, { "change_type": "MODIFY", "old_path": "src/DataFixtures/ImageFetchFixtures.php", "new_path": "src/DataFixtures/ImageFetchFixtures.php", "diff": "@@ -21,7 +21,7 @@ class ImageFetchFixtures extends BaseFixture implements FixtureGroupInterface\n/** @var FileLocations */\nprivate $fileLocations;\n- private const AMOUNT = 10;\n+ private const AMOUNT = 20;\nprivate const MAX_AMOUNT = 50;\n/** @var array */\n@@ -30,10 +30,12 @@ class ImageFetchFixtures extends BaseFixture implements FixtureGroupInterface\npublic function __construct(FileLocations $fileLocations, Config $config)\n{\n$this->urls = new Collection([\n- 'https://source.unsplash.com/1280x1024/?business,workspace,interior/',\n- 'https://source.unsplash.com/1280x1024/?cityscape,landscape,nature/',\n- 'https://source.unsplash.com/1280x1024/?animal,kitten,puppy,cute/',\n- 'https://source.unsplash.com/1280x1024/?technology/',\n+ ['stock', 'https://source.unsplash.com/1280x1024/?business,workspace,interior/'],\n+ ['stock', 'https://source.unsplash.com/1280x1024/?cityscape,landscape,nature/'],\n+ ['stock', 'https://source.unsplash.com/1280x1024/?technology,product/'],\n+ ['animal', 'https://source.unsplash.com/1280x1024/?animal,kitten,puppy,cute/'],\n+ ['people', 'https://source.unsplash.com/1280x1024/?portrait,face,headshot/'],\n+ ['people', 'https://source.unsplash.com/1280x1024/?portrait,face,headshot/'],\n]);\n$this->curlOptions = $config->get('general/curl_options')->all();\n@@ -58,23 +60,18 @@ class ImageFetchFixtures extends BaseFixture implements FixtureGroupInterface\nprivate function fetchImages(): void\n{\n- $outputPath = $this->fileLocations->get('files')->getBasepath() . '/stock/';\n-\n- if (! is_dir($outputPath)) {\n- mkdir($outputPath);\n- }\n-\n$output = new ConsoleOutput();\n$progressBar = new ProgressBar($output, self::AMOUNT);\n$progressBar->start();\nfor ($i = 1; $i <= self::AMOUNT; $i++) {\n- $url = $this->urls->random() . random_int(10000, 99999);\n+ $random = $this->urls->random();\n+ $url = $random[1] . random_int(10000, 99999);\n$filename = 'image_' . random_int(10000, 99999) . '.jpg';\n$client = HttpClient::create();\n- $resource = fopen($outputPath . $filename, 'w');\n+ $resource = fopen($this->getOutputPath($random[0]) . $filename, 'w');\n$image = $client->request('GET', $url, $this->curlOptions)->getContent();\n@@ -87,4 +84,15 @@ class ImageFetchFixtures extends BaseFixture implements FixtureGroupInterface\n$progressBar->finish();\n$output->writeln('');\n}\n+\n+ private function getOutputPath(string $sub): string\n+ {\n+ $outputPath = $this->fileLocations->get('files')->getBasepath() . '/' . $sub . '/';\n+\n+ if (! is_dir($outputPath)) {\n+ mkdir($outputPath);\n+ }\n+\n+ return $outputPath;\n+ }\n}\n" } ]
PHP
MIT License
bolt/core
Updating Fixtures for impending release
95,144
14.09.2020 10:12:13
-7,200
9b647c6eee8e4ac4dfc1fd1868afc7d73a09e645
Make Frontend output a bit more robust by catching common pitfalls (non-existing content, etc)
[ { "change_type": "MODIFY", "old_path": "src/Twig/ContentExtension.php", "new_path": "src/Twig/ContentExtension.php", "diff": "@@ -164,7 +164,7 @@ class ContentExtension extends AbstractExtension\n];\n}\n- public function getAnyTitle(Content $content, int $length = 120): string\n+ public function getAnyTitle(?Content $content, int $length = 120): string\n{\n$title = $this->getTitle($content, '', $length);\n@@ -187,8 +187,12 @@ class ContentExtension extends AbstractExtension\nreturn '(untitled)';\n}\n- public function getTitle(Content $content, string $locale = '', int $length = 120): string\n+ public function getTitle(?Content $content, string $locale = '', int $length = 120): string\n{\n+ if (! $content instanceof Content) {\n+ return '<mark>No content given</mark>';\n+ }\n+\nif (empty($locale)) {\n$locale = $this->request->getLocale();\n}\n@@ -245,6 +249,10 @@ class ContentExtension extends AbstractExtension\nreturn Excerpt::getExcerpt((string) $content, $length, $focus);\n}\n+ if (! $content instanceof Content) {\n+ return '<mark>No content given</mark>';\n+ }\n+\nif (ContentHelper::isSuitable($content, 'excerpt_format')) {\n$excerpt = $this->contentHelper->get($content, $content->getDefinition()->get('excerpt_format'));\n} else {\n@@ -298,13 +306,21 @@ class ContentExtension extends AbstractExtension\nreturn rtrim($excerpt, '. ');\n}\n- public function getPreviousContent(Content $content, string $byColumn = 'id', bool $sameContentType = true): ?Content\n+ public function getPreviousContent(?Content $content, string $byColumn = 'id', bool $sameContentType = true): ?Content\n{\n+ if (! $content instanceof Content) {\n+ return null;\n+ }\n+\nreturn $this->getAdjacentContent($content, 'previous', $byColumn, $sameContentType);\n}\n- public function getNextContent(Content $content, string $byColumn = 'id', bool $sameContentType = true): ?Content\n+ public function getNextContent(?Content $content, string $byColumn = 'id', bool $sameContentType = true): ?Content\n{\n+ if (! $content instanceof Content) {\n+ return null;\n+ }\n+\nreturn $this->getAdjacentContent($content, 'next', $byColumn, $sameContentType);\n}\n@@ -321,8 +337,12 @@ class ContentExtension extends AbstractExtension\nreturn $this->contentRepository->findAdjacentBy($byColumn, $direction, $content->getId(), $contentType);\n}\n- public function isCurrent(Environment $env, Content $content): bool\n+ public function isCurrent(Environment $env, ?Content $content): bool\n{\n+ if (! $content instanceof Content) {\n+ return false;\n+ }\n+\n// If we have a $record set in the Global Twig env, we can simply\n// compare that to what's passed in.\nif (array_key_exists('record', $env->getGlobals())) {\n@@ -375,18 +395,18 @@ class ContentExtension extends AbstractExtension\nreturn null;\n}\n- public function getEditLink(Content $content): ?string\n+ public function getEditLink(?Content $content): ?string\n{\n- if ($content->getId() === null || ! $this->security->getUser() || ! $this->security->isGranted('ROLE_ADMIN')) {\n+ if (! $content instanceof Content || $content->getId() === null || ! $this->security->getUser() || ! $this->security->isGranted('ROLE_ADMIN')) {\nreturn null;\n}\nreturn $this->generateLink('bolt_content_edit', ['id' => $content->getId()]);\n}\n- public function getDeleteLink(Content $content, bool $absolute = false): ?string\n+ public function getDeleteLink(?Content $content, bool $absolute = false): ?string\n{\n- if ($content->getId() === null || ! $this->security->getUser() || ! $this->security->isGranted('ROLE_ADMIN')) {\n+ if (! $content instanceof Content || $content->getId() === null || ! $this->security->getUser() || ! $this->security->isGranted('ROLE_ADMIN')) {\nreturn null;\n}\n@@ -398,18 +418,18 @@ class ContentExtension extends AbstractExtension\nreturn $this->generateLink('bolt_content_delete', $params, $absolute);\n}\n- public function getDuplicateLink(Content $content, bool $absolute = false): ?string\n+ public function getDuplicateLink(?Content $content, bool $absolute = false): ?string\n{\n- if ($content->getId() === null || ! $this->security->getUser() || ! $this->security->isGranted('ROLE_ADMIN')) {\n+ if (! $content instanceof Content || $content->getId() === null || ! $this->security->getUser() || ! $this->security->isGranted('ROLE_ADMIN')) {\nreturn null;\n}\nreturn $this->generateLink('bolt_content_duplicate', ['id' => $content->getId()], $absolute);\n}\n- public function getStatusLink(Content $content, bool $absolute = false): ?string\n+ public function getStatusLink(?Content $content, bool $absolute = false): ?string\n{\n- if ($content->getId() === null || ! $this->security->getUser() || ! $this->security->isGranted('ROLE_ADMIN')) {\n+ if (! $content instanceof Content || $content->getId() === null || ! $this->security->getUser() || ! $this->security->isGranted('ROLE_ADMIN')) {\nreturn null;\n}\n@@ -433,8 +453,13 @@ class ContentExtension extends AbstractExtension\nreturn $link;\n}\n- public function getTaxonomies(Content $content): Collection\n+ public function getTaxonomies(?Content $content): Collection\n{\n+ if (! $content instanceof Content) {\n+ $body = sprintf(\"You have called the <code>|taxonomies</code> filter with a parameter of type '%s', but <code>|taxonomies</code> accepts record (Content).\", gettype($content));\n+ $this->notifications->warning('Incorrect use of <code>|taxonomies</code> filter', $body);\n+ }\n+\n$taxonomies = [];\n$definition = $content->getDefinition();\n" } ]
PHP
MIT License
bolt/core
Make Frontend output a bit more robust by catching common pitfalls (non-existing content, etc)
95,197
15.09.2020 02:15:44
25,200
c163a84c7b0fb662dec93792a5bd4008ebb6b449
Update config.yaml {contenttype}/{year}/{month}/ instead of year/month/contenttype
[ { "change_type": "MODIFY", "old_path": "config/bolt/config.yaml", "new_path": "config/bolt/config.yaml", "diff": "@@ -181,7 +181,7 @@ accept_media_types: [ gif, jpg, jpeg, png, svg, pdf, mp3, tiff ]\naccept_upload_size: 8M\n# Default location for uploading files.\n-upload_location: \"{year}/{month}/{contenttype}/\"\n+upload_location: \"{contenttype}/{year}/{month}/\"\n# Options to use with curl requests.\n# For all options, check the official curl documentation here https://curl.haxx.se/libcurl/c/curl_easy_setopt.html\n" } ]
PHP
MIT License
bolt/core
Update config.yaml {contenttype}/{year}/{month}/ instead of year/month/contenttype
95,144
15.09.2020 11:21:32
-7,200
3e452c0b5996514024bae0f613603b1c657e29cb
Fix ECS by explicitly skipping `UnaryOperatorSpacesFixer`
[ { "change_type": "MODIFY", "old_path": "ecs.php", "new_path": "ecs.php", "diff": "@@ -29,6 +29,7 @@ use PhpCsFixer\\Fixer\\Operator\\ConcatSpaceFixer;\nuse PhpCsFixer\\Fixer\\Operator\\IncrementStyleFixer;\nuse PhpCsFixer\\Fixer\\Operator\\NewWithBracesFixer;\nuse PhpCsFixer\\Fixer\\Operator\\TernaryOperatorSpacesFixer;\n+use PhpCsFixer\\Fixer\\Operator\\UnaryOperatorSpacesFixer;\nuse PhpCsFixer\\Fixer\\Phpdoc\\NoSuperfluousPhpdocTagsFixer;\nuse PhpCsFixer\\Fixer\\Phpdoc\\PhpdocAlignFixer;\nuse PhpCsFixer\\Fixer\\Phpdoc\\PhpdocAnnotationWithoutDotFixer;\n@@ -64,6 +65,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {\nPhpdocAlignFixer::class => null,\nNativeConstantInvocationFixer::class => null,\nNativeFunctionInvocationFixer::class => null,\n+ UnaryOperatorSpacesFixer::class => null,\n]);\n$services = $containerConfigurator->services();\n" } ]
PHP
MIT License
bolt/core
Fix ECS by explicitly skipping `UnaryOperatorSpacesFixer`
95,144
15.09.2020 14:28:16
-7,200
3a4d854afd997f8a74c509459298970fd16287ef
Fix default locations for image uploads
[ { "change_type": "MODIFY", "old_path": "config/bolt/contenttypes.yaml", "new_path": "config/bolt/contenttypes.yaml", "diff": "@@ -133,7 +133,7 @@ entries:\nimage:\ntype: image\ngroup: media\n- upload: entries\n+ upload: \"{random}/{contenttype}/{date}\"\nvideo:\ntype: embed\nrelations:\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/HtmlExtension.php", "new_path": "src/Twig/HtmlExtension.php", "diff": "@@ -108,8 +108,8 @@ class HtmlExtension extends AbstractExtension\n$baseReplacements = [\n'year' => date('Y'),\n'month' => date('m'),\n- 'day' => date('D'),\n- 'date' => date('Y-m-D'),\n+ 'day' => date('d'),\n+ 'date' => date('Y-m-d'),\n'random' => bin2hex(random_bytes(4)),\n];\n" }, { "change_type": "MODIFY", "old_path": "templates/_partials/fields/file.html.twig", "new_path": "templates/_partials/fields/file.html.twig", "diff": "{% endset %}\n{% block field %}\n- {% set setPath = field.definition.get('upload')|placeholders({'random': 4, 'contenttype': record.contenttype}) %}\n+ {% set setPath = field.definition.get('upload')|placeholders({'contenttype': record.contenttype}) %}\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" }, { "change_type": "MODIFY", "old_path": "templates/_partials/fields/filelist.html.twig", "new_path": "templates/_partials/fields/filelist.html.twig", "diff": "{% endset %}\n{% block field %}\n- {% set setPath = field.definition.get('upload')|placeholders({'random': 4, 'contenttype': record.contenttype}) %}\n+ {% set setPath = field.definition.get('upload')|placeholders({'contenttype': record.contenttype}) %}\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" }, { "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')|placeholders({'random': 4, 'contenttype': record.contenttype}) %}\n+ {% set setPath = field.definition.get('upload')|placeholders({'contenttype': record.contenttype}) %}\n+ {{ dump(field.definition.get('upload')) }}\n+ {{ dump(setPath) }}\n{% set directory = path('bolt_async_upload', {'location': location|default('files'), 'path': setPath}) %}\n{% set filelist = path('bolt_async_filelisting', {'location': location|default('files'), 'type': 'images' }) %}\n{% set labels = {\n" }, { "change_type": "MODIFY", "old_path": "templates/_partials/fields/imagelist.html.twig", "new_path": "templates/_partials/fields/imagelist.html.twig", "diff": "{% endset %}\n{% block field %}\n- {% set setPath = field.definition.get('upload')|placeholders({'random': 4, 'contenttype': record.contenttype}) %}\n+ {% set setPath = field.definition.get('upload')|placeholders({'contenttype': record.contenttype}) %}\n{% set directory = path('bolt_async_upload', {'location': location|default('files'), 'path': setPath}) %}\n{% set filelist = path('bolt_async_filelisting', {'location': location|default('files'), 'type': 'images' }) %}\n{% set labels = {\n" } ]
PHP
MIT License
bolt/core
Fix default locations for image uploads
95,144
15.09.2020 15:15:59
-7,200
82338062e65073e53fa7936fb8b3e811d718a2c4
Update `upload_location` in GeneralParser.php, followup to
[ { "change_type": "MODIFY", "old_path": "src/Configuration/Parser/GeneralParser.php", "new_path": "src/Configuration/Parser/GeneralParser.php", "diff": "@@ -132,7 +132,7 @@ class GeneralParser extends BaseParser\n'accept_file_types' => explode(',', 'twig,html,js,css,scss,gif,jpg,jpeg,png,ico,zip,tgz,txt,md,doc,docx,pdf,epub,xls,xlsx,csv,ppt,pptx,mp3,ogg,wav,m4a,mp4,m4v,ogv,wmv,avi,webm,svg'),\n'accept_media_types' => explode(',', 'gif,jpg,jpeg,png,svg,pdf,mp3,tiff'),\n'accept_upload_size' => '8M',\n- 'upload_location' => '{year}/{month}/{contenttype}/',\n+ 'upload_location' => '{contenttype}/{year}/{month}/',\n'branding' => [\n'name' => 'Bolt',\n'path' => '/bolt',\n" } ]
PHP
MIT License
bolt/core
Update `upload_location` in GeneralParser.php, followup to #1850
95,144
15.09.2020 15:18:25
-7,200
7c618b6fe32ce500f540aa93762f394849a0f339
Update image.html.twig
[ { "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')|placeholders({'contenttype': record.contenttype}) %}\n- {{ dump(field.definition.get('upload')) }}\n- {{ dump(setPath) }}\n{% set directory = path('bolt_async_upload', {'location': location|default('files'), 'path': setPath}) %}\n{% set filelist = path('bolt_async_filelisting', {'location': location|default('files'), 'type': 'images' }) %}\n{% set labels = {\n" } ]
PHP
MIT License
bolt/core
Update image.html.twig
95,144
16.09.2020 15:56:59
-7,200
7342e1261a904974589cc0050365f8c778cd8932
Ensure config for `not_found` etc. are arrays. (and some cleanup of old, deprecrated stuff)
[ { "change_type": "MODIFY", "old_path": "config/bolt/config.yaml", "new_path": "config/bolt/config.yaml", "diff": "@@ -22,12 +22,6 @@ theme: skeleton\n# format settings, see: https://www.php.net/manual/en/function.date.php\ndate_format: 'F j, Y H:i'\n-# The hour of the day for the internal cron task scheduler to run daily, weekly,\n-# monthly and yearly jobs.\n-#\n-# Default: 3 (3 am)\n-cron_hour: 3\n-\n# You can set a preference to omit background images on the login screen.\nomit_backgrounds: true\n" }, { "change_type": "MODIFY", "old_path": "src/Configuration/Parser/GeneralParser.php", "new_path": "src/Configuration/Parser/GeneralParser.php", "diff": "@@ -5,8 +5,6 @@ declare(strict_types=1);\nnamespace Bolt\\Configuration\\Parser;\nuse Bolt\\Common\\Arr;\n-use Bolt\\Common\\Str;\n-use Bolt\\Utils\\Html;\nuse Tightenco\\Collect\\Support\\Collection;\nuse Webmozart\\PathUtil\\Path;\n@@ -27,22 +25,6 @@ class GeneralParser extends BaseParser\n$tempconfiglocal = $this->parseConfigYaml($this->getFilenameLocalOverrides(), true);\n$general = Arr::replaceRecursive($defaultconfig, Arr::replaceRecursive($tempconfig, $tempconfiglocal));\n- // Make sure Bolt's mount point is OK:\n- $path = $general['branding']['path'];\n- if (is_string($path)) {\n- $path = '/' . Str::makeSafe($path);\n- } else {\n- $path = '/';\n- }\n- $general['branding']['path'] = $path;\n-\n- // Set the link in branding, if provided_by is set.\n- $general['branding']['provided_link'] = Html::providerLink(\n- $general['branding']['provided_by']\n- );\n-\n- $general['database'] = $this->parseDatabase($general['database']);\n-\nif (! isset($general['date_format'])) {\n$general['date_format'] = 'F j, Y H:i';\n}\n@@ -57,6 +39,19 @@ class GeneralParser extends BaseParser\n$general['query_search'] = true;\n}\n+ if (! is_array($general['notfound'])) {\n+ $general['notfound'] = [$general['notfound']];\n+ }\n+ if (! is_array($general['maintenance'])) {\n+ $general['maintenance'] = [$general['maintenance']];\n+ }\n+ if (! is_array($general['forbidden'])) {\n+ $general['forbidden'] = [$general['forbidden']];\n+ }\n+ if (! is_array($general['internal_server_error'])) {\n+ $general['internal_server_error'] = [$general['internal_server_error']];\n+ }\n+\nreturn new Collection($general);\n}\n@@ -66,59 +61,13 @@ class GeneralParser extends BaseParser\nprotected function getDefaultConfig(): array\n{\nreturn [\n- 'database' => [\n- 'driver' => 'sqlite',\n- 'host' => 'localhost',\n- 'slaves' => [],\n- 'dbname' => 'bolt',\n- 'prefix' => 'bolt_',\n- 'charset' => 'utf8',\n- 'collate' => 'utf8_unicode_ci',\n- 'randomfunction' => '',\n- ],\n'sitename' => 'Default Bolt site',\n- 'locale' => null,\n'records_per_page' => 10,\n'records_on_dashboard' => 5,\n- 'debug' => null,\n- 'debug_show_loggedoff' => false,\n- 'debug_error_level' => null,\n- 'production_error_level' => null,\n- 'strict_variables' => null,\n'theme' => 'base-2019',\n'listing_template' => 'listing.html.twig',\n'listing_records' => '5',\n'listing_sort' => 'datepublish DESC',\n- 'caching' => [\n- 'config' => true,\n- 'templates' => true,\n- 'request' => false,\n- 'duration' => 10,\n- ],\n- 'wysiwyg' => [\n- 'images' => false,\n- 'tables' => false,\n- 'fontcolor' => false,\n- 'align' => false,\n- 'subsuper' => false,\n- 'embed' => false,\n- 'anchor' => false,\n- 'underline' => false,\n- 'strike' => false,\n- 'blockquote' => false,\n- 'codesnippet' => false,\n- 'specialchar' => false,\n- 'styles' => false,\n- 'ck' => [\n- 'autoParagraph' => true,\n- 'contentsCss' => [\n- ['css/ckeditor-contents.css', 'bolt'],\n- ['css/ckeditor.css', 'bolt'],\n- ],\n- 'filebrowserWindowWidth' => 640,\n- 'filebrowserWindowHeight' => 480,\n- ],\n- ],\n'enforce_ssl' => false,\n'thumbnails' => [\n'default_thumbnail' => [160, 120],\n@@ -133,29 +82,17 @@ class GeneralParser extends BaseParser\n'accept_media_types' => explode(',', 'gif,jpg,jpeg,png,svg,pdf,mp3,tiff'),\n'accept_upload_size' => '8M',\n'upload_location' => '{contenttype}/{year}/{month}/',\n- 'branding' => [\n- 'name' => 'Bolt',\n- 'path' => '/bolt',\n- 'provided_by' => [],\n- ],\n'maintenance_mode' => false,\n- 'headers' => [\n- 'x_frame_options' => true,\n- ],\n'htmlcleaner' => [\n'allowed_tags' => explode(',', 'div,span,p,br,hr,s,u,strong,em,i,b,li,ul,ol,mark,blockquote,pre,code,tt,h1,h2,h3,h4,h5,h6,dd,dl,dh,table,tbody,thead,tfoot,th,td,tr,a,img,address,abbr,iframe'),\n'allowed_attributes' => explode(',', 'id,class,style,name,value,href,Bolt,alt,title,width,height,frameborder,allowfullscreen,scrolling'),\n'allowed_frame_targets' => explode(',', '_blank,_self,_parent,_top'),\n],\n- 'performance' => [\n- 'http_cache' => [\n- 'options' => [],\n- ],\n- 'timed_records' => [\n- 'interval' => 3600,\n- 'use_cron' => false,\n- ],\n- ],\n+ 'notfound' => 'helpers/page_404.html.twig',\n+ 'maintenance' => 'helpers/page_503.html.twig',\n+ 'forbidden' => 'helpers/page_403.html.twig',\n+ 'internal_server_error' => 'helpers/page_500.html.twig',\n+ 'omit_backgrounds' => false,\n];\n}\n" }, { "change_type": "MODIFY", "old_path": "src/Utils/Html.php", "new_path": "src/Utils/Html.php", "diff": "@@ -95,46 +95,6 @@ class Html\nreturn parse_url($url, PHP_URL_SCHEME) === null ? $scheme . $url : $url;\n}\n- /**\n- * Create 'provider' link, as used in the footer, to link to either an\n- * email address or website URL.\n- *\n- * @param array $providedby\n- */\n- public static function providerLink($providedby): string\n- {\n- // If nothing is provided, we don't make a link.\n- if (empty($providedby) || ! is_array($providedby)) {\n- return '';\n- }\n-\n- // If we forgot the second element in the array, substitute the first for it.\n- if (empty($providedby[1]) || empty(strip_tags($providedby[1]))) {\n- $providedby[1] = $providedby[0];\n- }\n-\n- $scheme = parse_url($providedby[0], PHP_URL_SCHEME);\n-\n- if ($scheme === 'http' || $scheme === 'https') {\n- // Link is OK, just add a target\n- $link = sprintf('<a href=\"%s\" target=\"_blank\">', $providedby[0]);\n- } elseif ($scheme === 'mailto') {\n- // Already a `mailto:` include.\n- $link = sprintf('<a href=\"%s\">', $providedby[0]);\n- } elseif (self::isURL($providedby[0])) {\n- // An URL, without a scheme\n- $link = sprintf('<a href=\"http://%s\" target=\"_blank\">', $providedby[0]);\n- } else {\n- // Fall back to old behaviour, assume an e-mail address\n- $link = sprintf('<a href=\"mailto:%s\">', $providedby[0]);\n- }\n-\n- // Add the label and closing tag.\n- $link .= strip_tags($providedby[1]) . '</a>';\n-\n- return $link;\n- }\n-\npublic static function makeAbsoluteLink(string $link): string\n{\nif (mb_strpos($link, '://') !== false || mb_substr($link, 0, 2) === '//') {\n" } ]
PHP
MIT License
bolt/core
Ensure config for `not_found` etc. are arrays. (and some cleanup of old, deprecrated stuff)
95,144
16.09.2020 16:19:48
-7,200
271ddf7f327a2ca92cd3abc379053a1134c6a03d
Prepare release 4.0.0-rc.43
[ { "change_type": "MODIFY", "old_path": "package-lock.json", "new_path": "package-lock.json", "diff": "{\n\"name\": \"bolt\",\n- \"version\": \"4.0.0-rc.42\",\n+ \"version\": \"4.0.0-rc.43\",\n\"lockfileVersion\": 1,\n\"requires\": true,\n\"dependencies\": {\n\"integrity\": \"sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==\"\n},\n\"ajv\": {\n- \"version\": \"6.12.4\",\n- \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz\",\n- \"integrity\": \"sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==\",\n+ \"version\": \"6.12.5\",\n+ \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.12.5.tgz\",\n+ \"integrity\": \"sha512-lRF8RORchjpKG50/WFf8xmg7sgCLFiYNNnqdKflk63whMQcWR5ngGjiSXkL9bjxy6B2npOK2HSMN49jEBMSkag==\",\n\"requires\": {\n\"fast-deep-equal\": \"^3.1.1\",\n\"fast-json-stable-stringify\": \"^2.0.0\",\n},\n\"dependencies\": {\n\"ajv\": {\n- \"version\": \"6.12.4\",\n- \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz\",\n- \"integrity\": \"sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==\",\n+ \"version\": \"6.12.5\",\n+ \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.12.5.tgz\",\n+ \"integrity\": \"sha512-lRF8RORchjpKG50/WFf8xmg7sgCLFiYNNnqdKflk63whMQcWR5ngGjiSXkL9bjxy6B2npOK2HSMN49jEBMSkag==\",\n\"requires\": {\n\"fast-deep-equal\": \"^3.1.1\",\n\"fast-json-stable-stringify\": \"^2.0.0\",\n}\n},\n\"caniuse-lite\": {\n- \"version\": \"1.0.30001125\",\n- \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001125.tgz\",\n- \"integrity\": \"sha512-9f+r7BW8Qli917mU3j0fUaTweT3f3vnX/Lcs+1C73V+RADmFme+Ih0Br8vONQi3X0lseOe6ZHfsZLCA8MSjxUA==\"\n+ \"version\": \"1.0.30001131\",\n+ \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001131.tgz\",\n+ \"integrity\": \"sha512-4QYi6Mal4MMfQMSqGIRPGbKIbZygeN83QsWq1ixpUwvtfgAZot5BrCKzGygvZaV+CnELdTwD0S4cqUNozq7/Cw==\"\n},\n\"capture-exit\": {\n\"version\": \"2.0.0\",\n},\n\"dependencies\": {\n\"ajv\": {\n- \"version\": \"6.12.4\",\n- \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz\",\n- \"integrity\": \"sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==\",\n+ \"version\": \"6.12.5\",\n+ \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.12.5.tgz\",\n+ \"integrity\": \"sha512-lRF8RORchjpKG50/WFf8xmg7sgCLFiYNNnqdKflk63whMQcWR5ngGjiSXkL9bjxy6B2npOK2HSMN49jEBMSkag==\",\n\"requires\": {\n\"fast-deep-equal\": \"^3.1.1\",\n\"fast-json-stable-stringify\": \"^2.0.0\",\n\"integrity\": \"sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==\"\n},\n\"electron-to-chromium\": {\n- \"version\": \"1.3.565\",\n- \"resolved\": \"https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.565.tgz\",\n- \"integrity\": \"sha512-me5dGlHFd8Q7mKhqbWRLIYnKjw4i0fO6hmW0JBxa7tM87fBfNEjWokRnDF7V+Qme/9IYpwhfMn+soWs40tXWqg==\"\n+ \"version\": \"1.3.570\",\n+ \"resolved\": \"https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.570.tgz\",\n+ \"integrity\": \"sha512-Y6OCoVQgFQBP5py6A/06+yWxUZHDlNr/gNDGatjH8AZqXl8X0tE4LfjLJsXGz/JmWJz8a6K7bR1k+QzZ+k//fg==\"\n},\n\"elliptic\": {\n\"version\": \"6.5.3\",\n}\n},\n\"escalade\": {\n- \"version\": \"3.0.2\",\n- \"resolved\": \"https://registry.npmjs.org/escalade/-/escalade-3.0.2.tgz\",\n- \"integrity\": \"sha512-gPYAU37hYCUhW5euPeR+Y74F7BL+IBsV93j5cvGriSaD1aG6MGsqsV1yamRdrWrb2j3aiZvb0X+UBOWpx3JWtQ==\"\n+ \"version\": \"3.1.0\",\n+ \"resolved\": \"https://registry.npmjs.org/escalade/-/escalade-3.1.0.tgz\",\n+ \"integrity\": \"sha512-mAk+hPSO8fLDkhV7V0dXazH5pDc6MrjBTPyD3VeKzxnVFjH1MIxbCdqGZB9O8+EwWakZs3ZCbDS4IpRt79V1ig==\"\n},\n\"escape-html\": {\n\"version\": \"1.0.3\",\n},\n\"dependencies\": {\n\"ajv\": {\n- \"version\": \"6.12.4\",\n- \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz\",\n- \"integrity\": \"sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==\",\n+ \"version\": \"6.12.5\",\n+ \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.12.5.tgz\",\n+ \"integrity\": \"sha512-lRF8RORchjpKG50/WFf8xmg7sgCLFiYNNnqdKflk63whMQcWR5ngGjiSXkL9bjxy6B2npOK2HSMN49jEBMSkag==\",\n\"requires\": {\n\"fast-deep-equal\": \"^3.1.1\",\n\"fast-json-stable-stringify\": \"^2.0.0\",\n},\n\"is-obj\": {\n\"version\": \"1.0.1\",\n- \"resolved\": \"https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz\",\n+ \"resolved\": \"http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz\",\n\"integrity\": \"sha1-PkcprB9f3gJc19g6iW2rn09n2w8=\"\n},\n\"is-path-cwd\": {\n\"integrity\": \"sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==\"\n},\n\"json-parse-even-better-errors\": {\n- \"version\": \"2.3.0\",\n- \"resolved\": \"https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.0.tgz\",\n- \"integrity\": \"sha512-o3aP+RsWDJZayj1SbHNQAI8x0v3T3SKiGoZlNYfbUP1S3omJQ6i9CnqADqkSPaOAxwua4/1YWx5CM7oiChJt2Q==\",\n+ \"version\": \"2.3.1\",\n+ \"resolved\": \"https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz\",\n+ \"integrity\": \"sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==\",\n\"dev\": true\n},\n\"json-schema\": {\n},\n\"load-json-file\": {\n\"version\": \"1.1.0\",\n- \"resolved\": \"https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz\",\n+ \"resolved\": \"http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz\",\n\"integrity\": \"sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=\",\n\"dev\": true,\n\"requires\": {\n},\n\"semver\": {\n\"version\": \"5.3.0\",\n- \"resolved\": \"https://registry.npmjs.org/semver/-/semver-5.3.0.tgz\",\n+ \"resolved\": \"http://registry.npmjs.org/semver/-/semver-5.3.0.tgz\",\n\"integrity\": \"sha1-myzl094C0XxgEq0yaqa00M9U+U8=\",\n\"dev\": true\n}\n},\n\"safe-regex\": {\n\"version\": \"1.1.0\",\n- \"resolved\": \"https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz\",\n+ \"resolved\": \"http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz\",\n\"integrity\": \"sha1-QKNmnzsHfR6UPURinhV91IAjvy4=\",\n\"requires\": {\n\"ret\": \"~0.1.10\"\n},\n\"strip-ansi\": {\n\"version\": \"3.0.1\",\n- \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz\",\n+ \"resolved\": \"http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz\",\n\"integrity\": \"sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=\",\n\"requires\": {\n\"ansi-regex\": \"^2.0.0\"\n},\n\"strip-eof\": {\n\"version\": \"1.0.0\",\n- \"resolved\": \"https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz\",\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}\n},\n\"stylelint\": {\n- \"version\": \"13.7.0\",\n- \"resolved\": \"https://registry.npmjs.org/stylelint/-/stylelint-13.7.0.tgz\",\n- \"integrity\": \"sha512-1wStd4zVetnlHO98VjcHQbjSDmvcA39smkZQMct2cf+hom40H0xlQNdzzbswoG/jGBh61/Ue9m7Lu99PY51O6A==\",\n+ \"version\": \"13.7.1\",\n+ \"resolved\": \"https://registry.npmjs.org/stylelint/-/stylelint-13.7.1.tgz\",\n+ \"integrity\": \"sha512-qzqazcyRxrSRdmFuO0/SZOJ+LyCxYy0pwcvaOBBnl8/2VfHSMrtNIE+AnyJoyq6uKb+mt+hlgmVrvVi6G6XHfQ==\",\n\"dev\": true,\n\"requires\": {\n\"@stylelint/postcss-css-in-js\": \"^0.37.2\",\n\"dev\": true\n},\n\"ajv\": {\n- \"version\": \"6.12.4\",\n- \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz\",\n- \"integrity\": \"sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==\",\n+ \"version\": \"6.12.5\",\n+ \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.12.5.tgz\",\n+ \"integrity\": \"sha512-lRF8RORchjpKG50/WFf8xmg7sgCLFiYNNnqdKflk63whMQcWR5ngGjiSXkL9bjxy6B2npOK2HSMN49jEBMSkag==\",\n\"dev\": true,\n\"requires\": {\n\"fast-deep-equal\": \"^3.1.1\",\n\"integrity\": \"sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==\",\n\"dev\": true\n},\n- \"lodash\": {\n- \"version\": \"4.17.20\",\n- \"resolved\": \"https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz\",\n- \"integrity\": \"sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==\",\n- \"dev\": true\n- },\n\"log-symbols\": {\n\"version\": \"4.0.0\",\n\"resolved\": \"https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz\",\n}\n},\n\"table\": {\n- \"version\": \"6.0.1\",\n- \"resolved\": \"https://registry.npmjs.org/table/-/table-6.0.1.tgz\",\n- \"integrity\": \"sha512-fmr6168splcy/3XIvhSm5w6hYYOqyr3plAsd7OqoerzyoMnIpoxYuwrpdO2Cm22dh6KCnvirvigPrFZp+tdWFA==\",\n+ \"version\": \"6.0.3\",\n+ \"resolved\": \"https://registry.npmjs.org/table/-/table-6.0.3.tgz\",\n+ \"integrity\": \"sha512-8321ZMcf1B9HvVX/btKv8mMZahCjn2aYrDlpqHaBFCfnox64edeH9kEid0vTLTRR8gWR2A20aDgeuTTea4sVtw==\",\n\"dev\": true,\n\"requires\": {\n\"ajv\": \"^6.12.4\",\n},\n\"dependencies\": {\n\"ajv\": {\n- \"version\": \"6.12.4\",\n- \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz\",\n- \"integrity\": \"sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==\",\n+ \"version\": \"6.12.5\",\n+ \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.12.5.tgz\",\n+ \"integrity\": \"sha512-lRF8RORchjpKG50/WFf8xmg7sgCLFiYNNnqdKflk63whMQcWR5ngGjiSXkL9bjxy6B2npOK2HSMN49jEBMSkag==\",\n\"requires\": {\n\"fast-deep-equal\": \"^3.1.1\",\n\"fast-json-stable-stringify\": \"^2.0.0\",\n\"integrity\": \"sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==\"\n},\n\"vue-jest\": {\n- \"version\": \"3.0.6\",\n- \"resolved\": \"https://registry.npmjs.org/vue-jest/-/vue-jest-3.0.6.tgz\",\n- \"integrity\": \"sha512-VyuM8wR0vAlYCbPRY+PhIqRU5yUyBnUmwYTo4IFScs2+tiuis5VBItU0PGC8Wcx6qJwKB5jq5p7WFhabzMFMgQ==\",\n+ \"version\": \"3.0.7\",\n+ \"resolved\": \"https://registry.npmjs.org/vue-jest/-/vue-jest-3.0.7.tgz\",\n+ \"integrity\": \"sha512-PIOxFM+wsBMry26ZpfBvUQ/DGH2hvp5khDQ1n51g3bN0TwFwTy4J85XVfxTRMukqHji/GnAoGUnlZ5Ao73K62w==\",\n\"dev\": true,\n\"requires\": {\n\"babel-plugin-transform-es2015-modules-commonjs\": \"^6.26.0\",\n\"integrity\": \"sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==\"\n},\n\"vue-trumbowyg\": {\n- \"version\": \"3.6.0\",\n- \"resolved\": \"https://registry.npmjs.org/vue-trumbowyg/-/vue-trumbowyg-3.6.0.tgz\",\n- \"integrity\": \"sha512-QK5M2fqNRA9p39mCDVByw+SCgfArVylNNryr8eDZHE1mn0y2SXYVK/yHHPhzOckjpbBV/sy2pdsEisAAARtKJQ==\",\n+ \"version\": \"3.6.2\",\n+ \"resolved\": \"https://registry.npmjs.org/vue-trumbowyg/-/vue-trumbowyg-3.6.2.tgz\",\n+ \"integrity\": \"sha512-L2GYJun9is9rGhRSqxo3B4xrHJIDTS1Bre4Vo7inu/3qDfUB4JJz1L4x/GvKX3d8zGsWltpNbeSYOGnrOEOYmQ==\",\n\"requires\": {\n\"jquery\": \">=1.8\",\n\"trumbowyg\": \"^2.21.0\"\n" }, { "change_type": "MODIFY", "old_path": "package.json", "new_path": "package.json", "diff": "{\n\"name\": \"bolt\",\n- \"version\": \"4.0.0-rc.42\",\n+ \"version\": \"4.0.0-rc.43\",\n\"homepage\": \"https://boltcms.io\",\n\"author\": \"Bob den Otter <bob@twokings.nl> (https://boltcms.io)\",\n\"license\": \"MIT\",\n\"vue-flatpickr-component\": \"^8.1.6\",\n\"vue-multiselect\": \"^2.1.6\",\n\"vue-simplemde\": \"^1.1.2\",\n- \"vue-trumbowyg\": \"^3.6.0\",\n+ \"vue-trumbowyg\": \"^3.6.2\",\n\"vuedraggable\": \"^2.24.1\",\n\"vuex\": \"^3.5.1\",\n\"zxcvbn\": \"^4.4.2\"\n\"regenerator-runtime\": \"^0.13.7\",\n\"sass-loader\": \"^8.0\",\n\"source-sans-pro\": \"^3.6.0\",\n- \"stylelint\": \"^13.7.0\",\n+ \"stylelint\": \"^13.7.1\",\n\"stylelint-config-standard\": \"^19.0.0\",\n- \"vue-jest\": \"^3.0.6\",\n+ \"vue-jest\": \"^3.0.7\",\n\"vue-loader\": \"^15.9.3\",\n\"vue-router\": \"^3.4.3\",\n\"vue-template-compiler\": \"^2.6.12\",\n" } ]
PHP
MIT License
bolt/core
Prepare release 4.0.0-rc.43
95,144
18.09.2020 13:06:55
-7,200
c8820863ea6aafd5b9bc3f13250e4e83052d5ff8
Allow uploading of Avif and Webp images, for the hip kids.
[ { "change_type": "MODIFY", "old_path": "config/bolt/config.yaml", "new_path": "config/bolt/config.yaml", "diff": "@@ -162,13 +162,13 @@ htmlcleaner:\n# Define the file types (extensions to be exact) that are acceptable for upload\n# in either file fields or through the files screen.\n-accept_file_types: [ twig, html, js, css, scss, gif, jpg, jpeg, png, ico, zip, tgz, txt, md, doc, docx, pdf, epub, xls, xlsx, ppt, pptx, mp3, ogg, wav, m4a, mp4, m4v, ogv, wmv, avi, webm, svg]\n+accept_file_types: [ twig, html, js, css, scss, gif, jpg, jpeg, png, ico, zip, tgz, txt, md, doc, docx, pdf, epub, xls, xlsx, ppt, pptx, mp3, ogg, wav, m4a, mp4, m4v, ogv, wmv, avi, webm, svg, webp, avif]\n# Alternatively, if you wish to limit these, uncomment the following list\n# instead. It just includes file types / extensions that are harder to exploit.\n-# accept_file_types: [ gif, jpg, jpeg, png, txt, md, pdf, epub, mp3, svg ]\n+# accept_file_types: [ gif, jpg, jpeg, png, txt, md, pdf, epub, mp3 ]\n-accept_media_types: [ gif, jpg, jpeg, png, svg, pdf, mp3, tiff ]\n+accept_media_types: [ gif, jpg, jpeg, png, svg, pdf, mp3, tiff, avif, webp ]\n# Set the maximum upload size. Note, this can never exceed the settings for\n#`post_max_size` and `upload_max_filesize` in `php.ini`.\n" }, { "change_type": "MODIFY", "old_path": "src/Configuration/Parser/ContentTypesParser.php", "new_path": "src/Configuration/Parser/ContentTypesParser.php", "diff": "@@ -284,7 +284,7 @@ class ContentTypesParser extends BaseParser\n// If field is an \"image\" type, make sure the 'extensions' are set.\nif ($field['type'] === 'image' || $field['type'] === 'imagelist') {\nif (empty($field['extensions'])) {\n- $extensions = new Collection(['gif', 'jpg', 'jpeg', 'png', 'svg']);\n+ $extensions = new Collection(['gif', 'jpg', 'jpeg', 'png', 'svg', 'avif', 'webp']);\n$field['extensions'] = $extensions->intersect($acceptFileTypes)->toArray();\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "src/Configuration/Parser/GeneralParser.php", "new_path": "src/Configuration/Parser/GeneralParser.php", "diff": "@@ -78,8 +78,8 @@ class GeneralParser extends BaseParser\n'error_image' => 'bolt_assets://img/default_error.png',\n'only_aliases' => false,\n],\n- 'accept_file_types' => explode(',', 'twig,html,js,css,scss,gif,jpg,jpeg,png,ico,zip,tgz,txt,md,doc,docx,pdf,epub,xls,xlsx,csv,ppt,pptx,mp3,ogg,wav,m4a,mp4,m4v,ogv,wmv,avi,webm,svg'),\n- 'accept_media_types' => explode(',', 'gif,jpg,jpeg,png,svg,pdf,mp3,tiff'),\n+ 'accept_file_types' => explode(',', 'twig,html,js,css,scss,gif,jpg,jpeg,png,ico,zip,tgz,txt,md,doc,docx,pdf,epub,xls,xlsx,csv,ppt,pptx,mp3,ogg,wav,m4a,mp4,m4v,ogv,wmv,avi,webm,svg,avif,webp'),\n+ 'accept_media_types' => explode(',', 'gif,jpg,jpeg,png,svg,pdf,mp3,tiff,avif,webp'),\n'accept_upload_size' => '8M',\n'upload_location' => '{contenttype}/{year}/{month}/',\n'maintenance_mode' => false,\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/Backend/Async/FileListingController.php", "new_path": "src/Controller/Backend/Async/FileListingController.php", "diff": "@@ -48,7 +48,7 @@ class FileListingController implements AsyncZoneInterface\nprivate function getFilesIndex(string $path, string $type): Collection\n{\nif ($type === 'images') {\n- $glob = '*.{jpg,png,gif,jpeg}';\n+ $glob = '*.{jpg,png,gif,jpeg,avif,webp}';\n} else {\n$glob = null;\n}\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/ImageController.php", "new_path": "src/Controller/ImageController.php", "diff": "@@ -166,7 +166,7 @@ class ImageController\n{\n$pathinfo = pathinfo($filename);\n- $imageExtensions = ['gif', 'png', 'jpg', 'jpeg', 'svg', 'webp'];\n+ $imageExtensions = ['gif', 'png', 'jpg', 'jpeg', 'svg', 'avif', 'webp'];\nreturn array_key_exists('extension', $pathinfo) && in_array($pathinfo['extension'], $imageExtensions, true);\n}\n" }, { "change_type": "MODIFY", "old_path": "src/DataFixtures/BaseFixture.php", "new_path": "src/DataFixtures/BaseFixture.php", "diff": "@@ -83,7 +83,7 @@ abstract class BaseFixture extends Fixture\n{\n$fullpath = Path::canonicalize($base);\n- $glob = '*.{jpg,png,gif,jpeg}';\n+ $glob = '*.{jpg,png,gif,jpeg,webp,avif}';\n$finder = new Finder();\n$finder->in($fullpath)->depth('< 2')->sortByName()->name($glob)->files();\n" }, { "change_type": "MODIFY", "old_path": "src/Factory/MediaFactory.php", "new_path": "src/Factory/MediaFactory.php", "diff": "@@ -106,7 +106,7 @@ class MediaFactory\nprivate function isImage(Media $media): bool\n{\n- return in_array($media->getType(), ['gif', 'png', 'jpg', 'jpeg', 'svg', 'webp'], true);\n+ return in_array($media->getType(), ['gif', 'png', 'jpg', 'jpeg', 'svg', 'webp', 'avif'], true);\n}\npublic function createFromFilename(string $locationName, string $path, string $filename): Media\n" } ]
PHP
MIT License
bolt/core
Allow uploading of Avif and Webp images, for the hip kids.
95,144
18.09.2020 15:20:04
-7,200
8cc173b0958d256561aa1d026b907b0d6d33e14e
Make z-index of `<select>` a bit higher
[ { "change_type": "MODIFY", "old_path": "assets/js/app/editor/Components/Select.vue", "new_path": "assets/js/app/editor/Components/Select.vue", "diff": "<template>\n- <div :id=\"`multiselect-${id}`\" :class=\"classname\">\n+ <div :id=\"`multiselect-${id}`\" :class=\"classname\" class=\"multiselect-bolt-wrapper\">\n<multiselect\nref=\"vselect\"\nv-model=\"selected\"\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/vendor/multiselect.scss", "new_path": "assets/scss/vendor/multiselect.scss", "diff": "@@ -46,7 +46,7 @@ $vue-multiselect-spinner-color : $dark !default;\n.wide-options .multiselect__tag {\nwidth: 100%;\n}\n-\n+r\n// --------------------------------\n// Select field\n//--\n@@ -55,6 +55,11 @@ fieldset[disabled] .multiselect {\npointer-events: none;\n}\n+.multiselect-bolt-wrapper {\n+ position: relative;\n+ z-index: 110;\n+}\n+\n.multiselect,\n.multiselect__input,\n.multiselect__single {\n@@ -277,7 +282,7 @@ fieldset[disabled] .multiselect {\nborder-top: none;\nborder-bottom-left-radius: $vue-multiselect-border-radius;\nborder-bottom-right-radius: $vue-multiselect-border-radius;\n- z-index: 50;\n+ z-index: 110;\n-webkit-overflow-scrolling: touch;\n}\n" } ]
PHP
MIT License
bolt/core
Make z-index of `<select>` a bit higher
95,144
18.09.2020 17:20:23
-7,200
53873f578bf7fa68e68eb9077b6e858a7a7b9567
Styling Collections more nice-like
[ { "change_type": "MODIFY", "old_path": "assets/js/app/editor/Components/Collection.vue", "new_path": "assets/js/app/editor/Components/Collection.vue", "diff": "</div>\n</div>\n- <div v-for=\"element in elements\" :key=\"element.hash\" class=\"collection-item\">\n+ <div v-for=\"element in elements\" :key=\"element.hash\" class=\"card collection-item\">\n<details :open=\"state === 'expanded'\">\n- <summary>\n+ <summary class=\"card-header d-flex align-items-center\">\n<!-- Initial title. This is replaced by dynamic title in JS below. -->\n<div class=\"collection-item-title\" :data-label=\"element.label\">\n<i :class=\"[element.icon, 'fas fa-fw']\" />\n</summary>\n<!-- The actual field -->\n- <div :is=\"compile(element.content)\"></div>\n+ <div :is=\"compile(element.content)\" class=\"card-body\"></div>\n+\n</details>\n</div>\n+ <div class=\"row\">\n+ <div class=\"my-auto\" style=\"margin: 1rem;\">\n+ {{ labels.add_collection_item }}:\n+ </div>\n<div v-if=\"templates.length > 1\" class=\"dropdown\">\n<button\nid=\"dropdownMenuButton\"\naria-haspopup=\"true\"\naria-expanded=\"false\"\n>\n- <i class=\"fas fa-fw fa-plus\"></i> {{ labels.add_collection_item }}\n+ <i class=\"fas fa-fw fa-plus\"></i> {{ labels.select }}\n</button>\n<div class=\"dropdown-menu\" aria-labelledby=\"dropdownMenuButton\">\n<a\n{{ labels.add_collection_item }}\n</button>\n</div>\n+ </div>\n</template>\n<script>\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/init/_base.scss", "new_path": "assets/scss/init/_base.scss", "diff": "@@ -42,7 +42,7 @@ small {\n.card {\nbox-shadow: $card-box-shadow;\nbackground: #fff;\n- border: 1px solid var(--very-light-border) !important;\n+ border: 1px solid $card-border-color !important;\n.card-header {\nfont-weight: $font-weight-bold;\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/init/_variables.scss", "new_path": "assets/scss/init/_variables.scss", "diff": "@@ -58,9 +58,10 @@ $input-btn-focus-box-shadow: 0 0 0 $input-btn-focus-width var(--prima\n// Cards\n$card-border-width: 0;\n$card-border-radius: $border-radius;\n-$card-border-color: transparent;\n+$card-border-color: var(--very-light-border);\n$card-bg: var(--foreground);\n-$card-box-shadow: 0 7.5px 15px -5px rgba(0, 0, 0, 0.08);\n+$card-box-shadow: 0 7.5px 15px -5px rgba(0, 0, 0, 0.12);\n+$card-cap-bg: rgba(0, 0, 0, .06);\n// Buttons\n$btn-border-radius: 0.2rem;\n@@ -122,7 +123,7 @@ $yiq-contrasted-threshold: 150;\n--admin-toolbar: #4c6e91;\n--admin-toolbar-text-light: #fff;\n--admin-toolbar-text-dark: #0c223b;\n- --very-light-border: #f0f0f0;\n+ --very-light-border: #e8e8e8;\n--light-border: #e0e0e0;\n@each $bp, $value in $grid-breakpoints {\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/modules/base/_buttons.scss", "new_path": "assets/scss/modules/base/_buttons.scss", "diff": "@include button-variant($tertiary, $tertiary, darken($danger, 7.5%), darken($danger, 10%), darken($danger, 10%), darken($danger, 12.5%));\n}\n+.btn-light-danger {\n+ @include button-variant($light, $light, darken($danger, 7.5%), darken($danger, 10%), darken($danger, 10%), darken($danger, 12.5%));\n+}\n+\n$theme-colors: (\n\"primary\": $primary,\n\"secondary\": $secondary,\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/modules/editor/_forms.scss", "new_path": "assets/scss/modules/editor/_forms.scss", "diff": "}\n}\n-.form-collection {\n- border-left: 0.35rem solid #ddd;\n- padding-left: 1rem;\n- padding-bottom: 1rem;\n-}\n-\n-.form-set {\n- border-left: 0.25rem solid #d8d8d8;\n- padding-left: 1rem;\n- padding-bottom: 0.1rem;\n-}\n-\n.form-control {\nborder: 1px solid var(--light-border);\n}\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/modules/editor/fields/_collection.scss", "new_path": "assets/scss/modules/editor/fields/_collection.scss", "diff": "}\n.collection-item {\n- summary {\n+\nmargin-bottom: 1rem;\n+ summary {\n+ padding: 0.3rem 0.3rem 0.3rem 1rem;\n+ background: $light;\n+\n&::-webkit-details-marker {\ndisplay: none;\n}\n.collection-item-title {\ndisplay: inline-block;\n- max-width: 40%;\n+ //max-width: 40%;\ntext-overflow: ellipsis;\nwhite-space: nowrap;\noverflow: hidden;\n}\n+\n+ .card-body {\n+ background: var(--background);\n+ padding-bottom: 0;\n+\n+ }\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "templates/_partials/fields/_collection_buttons.html.twig", "new_path": "templates/_partials/fields/_collection_buttons.html.twig", "diff": "{% if in_collection is defined %}\n- <div class=\"float-right btn-group\" role=\"group\" aria-label=\"Collection buttons\">\n- <button class='action-move-up-collection-item btn btn-secondary btn-sm' {% if is_first is defined and is_first %} disabled {% endif %}>\n+ <div class=\"btn-group ml-auto mr-2\" role=\"group\" aria-label=\"Collection buttons\">\n+ <button class='action-move-up-collection-item btn btn-light btn-sm' style=\"white-space: nowrap\" {% if is_first is defined and is_first %} disabled {% endif %}>\n<i class=\"fas fa-fw fa-chevron-up\"></i>\n{{ 'collection.move_item_up'|trans }}\n</button>\n- <button class='action-move-down-collection-item btn btn-secondary btn-sm' {% if is_last is defined and is_last %} disabled {% endif %}>\n+ <button class='action-move-down-collection-item btn btn-light btn-sm' style=\"white-space: nowrap\" {% if is_last is defined and is_last %} disabled {% endif %}>\n<i class=\"fas fa-fw fa-chevron-down\"></i>\n{{ 'collection.move_item_down'|trans }}\n</button>\n- <button class='action-remove-collection-item btn btn-hidden-danger btn-sm' data-confirmation=\"{{ 'collection.confirm_delete'|trans }}\">\n+ <button class='action-remove-collection-item btn btn-light-danger btn-sm' style=\"white-space: nowrap\" data-confirmation=\"{{ 'collection.confirm_delete'|trans }}\">\n<i class=\"fas fa-fw fa-trash\"></i>\n{{ 'collection.remove_item'|trans }}\n</button>\n" }, { "change_type": "MODIFY", "old_path": "templates/_partials/fields/collection.html.twig", "new_path": "templates/_partials/fields/collection.html.twig", "diff": "'expand_all': 'collection.expand_all'|trans,\n'collapse_all': 'collection.collapse_all'|trans,\n'field_label': label,\n+ 'select': 'collection.select'|trans,\n} %}\n{% set limit = field.definition.get('limit')|default(200) %}\n" }, { "change_type": "MODIFY", "old_path": "templates/_partials/fields/set.html.twig", "new_path": "templates/_partials/fields/set.html.twig", "diff": "{% extends '@bolt/_partials/fields/_base.html.twig' %}\n+{% block label %}{% endblock %}\n+\n{% block field %}\n{% for setChild in field.valueForEditor %}\n{% set includeLookup = [\n" } ]
PHP
MIT License
bolt/core
Styling Collections more nice-like
95,144
19.09.2020 12:24:23
-7,200
657f309ba1b94ded15c694b7366e8a4a95c28f39
finetuning, cleaning up
[ { "change_type": "MODIFY", "old_path": "assets/scss/init/_variables.scss", "new_path": "assets/scss/init/_variables.scss", "diff": "@@ -61,7 +61,7 @@ $card-border-radius: $border-radius;\n$card-border-color: var(--very-light-border);\n$card-bg: var(--foreground);\n$card-box-shadow: 0 7.5px 15px -5px rgba(0, 0, 0, 0.12);\n-$card-cap-bg: rgba(0, 0, 0, .06);\n+$card-cap-bg: rgba(0, 0, 0, 0.06);\n// Buttons\n$btn-border-radius: 0.2rem;\n" }, { "change_type": "MODIFY", "old_path": "assets/scss/modules/editor/fields/_collection.scss", "new_path": "assets/scss/modules/editor/fields/_collection.scss", "diff": "}\n.collection-item {\n-\nmargin-bottom: 1rem;\nsummary {\n.card-body {\nbackground: var(--background);\npadding-bottom: 0;\n-\n}\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "config/bolt/contenttypes.yaml", "new_path": "config/bolt/contenttypes.yaml", "diff": "@@ -255,6 +255,7 @@ showcases:\nset:\ntype: set\ngroup: Sets\n+ label: This is my set\nfields:\ntitle:\ntype: text\n@@ -263,10 +264,12 @@ showcases:\ncollection:\ntype: collection\ngroup: Collections\n+ label: This is my Collection\ndefault_state: expanded\nfields:\nset:\ntype: set\n+ label: Set inside Collection\nfields:\ntitle:\ntype: text\n" }, { "change_type": "MODIFY", "old_path": "package-lock.json", "new_path": "package-lock.json", "diff": "}\n},\n\"browserslist\": {\n- \"version\": \"4.14.2\",\n- \"resolved\": \"https://registry.npmjs.org/browserslist/-/browserslist-4.14.2.tgz\",\n- \"integrity\": \"sha512-HI4lPveGKUR0x2StIz+2FXfDk9SfVMrxn6PLh1JeGUwcuoDkdKZebWiyLRJ68iIPDpMI4JLVDf7S7XzslgWOhw==\",\n+ \"version\": \"4.14.3\",\n+ \"resolved\": \"https://registry.npmjs.org/browserslist/-/browserslist-4.14.3.tgz\",\n+ \"integrity\": \"sha512-GcZPC5+YqyPO4SFnz48/B0YaCwS47Q9iPChRGi6t7HhflKBcINzFrJvRfC+jp30sRMKxF+d4EHGs27Z0XP1NaQ==\",\n\"requires\": {\n- \"caniuse-lite\": \"^1.0.30001125\",\n- \"electron-to-chromium\": \"^1.3.564\",\n- \"escalade\": \"^3.0.2\",\n+ \"caniuse-lite\": \"^1.0.30001131\",\n+ \"electron-to-chromium\": \"^1.3.570\",\n+ \"escalade\": \"^3.1.0\",\n\"node-releases\": \"^1.1.61\"\n}\n},\n}\n},\n\"caniuse-lite\": {\n- \"version\": \"1.0.30001131\",\n- \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001131.tgz\",\n- \"integrity\": \"sha512-4QYi6Mal4MMfQMSqGIRPGbKIbZygeN83QsWq1ixpUwvtfgAZot5BrCKzGygvZaV+CnELdTwD0S4cqUNozq7/Cw==\"\n+ \"version\": \"1.0.30001132\",\n+ \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001132.tgz\",\n+ \"integrity\": \"sha512-zk5FXbnsmHa0Ktc/NOZJRr+ilXva+2KFJuRiQfnjkxJfV/7DYP5C27lSQF++/veCUzVWE5xecZnSBJjf6fSwJA==\"\n},\n\"capture-exit\": {\n\"version\": \"2.0.0\",\n},\n\"is-obj\": {\n\"version\": \"1.0.1\",\n- \"resolved\": \"http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz\",\n\"integrity\": \"sha1-PkcprB9f3gJc19g6iW2rn09n2w8=\"\n},\n\"is-path-cwd\": {\n},\n\"load-json-file\": {\n\"version\": \"1.1.0\",\n- \"resolved\": \"http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz\",\n\"integrity\": \"sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=\",\n\"dev\": true,\n\"requires\": {\n},\n\"semver\": {\n\"version\": \"5.3.0\",\n- \"resolved\": \"http://registry.npmjs.org/semver/-/semver-5.3.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/semver/-/semver-5.3.0.tgz\",\n\"integrity\": \"sha1-myzl094C0XxgEq0yaqa00M9U+U8=\",\n\"dev\": true\n}\n},\n\"safe-regex\": {\n\"version\": \"1.1.0\",\n- \"resolved\": \"http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz\",\n\"integrity\": \"sha1-QKNmnzsHfR6UPURinhV91IAjvy4=\",\n\"requires\": {\n\"ret\": \"~0.1.10\"\n},\n\"strip-ansi\": {\n\"version\": \"3.0.1\",\n- \"resolved\": \"http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz\",\n\"integrity\": \"sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=\",\n\"requires\": {\n\"ansi-regex\": \"^2.0.0\"\n},\n\"strip-eof\": {\n\"version\": \"1.0.0\",\n- \"resolved\": \"http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz\",\n+ \"resolved\": \"https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz\",\n\"integrity\": \"sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=\"\n},\n\"strip-final-newline\": {\n" }, { "change_type": "MODIFY", "old_path": "package.json", "new_path": "package.json", "diff": "\"baguettebox.js\": \"^1.11.1\",\n\"bootbox\": \"^5.4.0\",\n\"bootstrap\": \"^4.5.2\",\n- \"browserslist\": \"^4.14.2\",\n- \"caniuse-lite\": \"^1.0.30001125\",\n+ \"browserslist\": \"^4.14.3\",\n+ \"caniuse-lite\": \"^1.0.30001132\",\n\"codemirror\": \"^5.57.0\",\n\"dropzone\": \"^5.7.2\",\n\"flagpack\": \"^1.0.5\",\n" }, { "change_type": "MODIFY", "old_path": "templates/_macro/_macro.html.twig", "new_path": "templates/_macro/_macro.html.twig", "diff": "{% set context = {\n'field': item_field,\n'id': id,\n- 'in_collection': true,\n+ 'in_compound': true,\n'is_first': loop.index0 == 0,\n'is_last': loop.index == fields|length,\n'name': collectionItemName,\n- 'collection_name': collectionField.name,\n- 'collection_label': collectionField.definition.label,\n+ 'compound_label': collectionField.definition.label,\n'hash': hash,\n'record': record\n} %}\n{% endset %}\n{# Set the buttons #}\n- {% set buttons %}{% include '@bolt/_partials/fields/_collection_buttons.html.twig' with { in_collection: true, 'hash': hash } %}{% endset %}\n+ {% set buttons %}{% include '@bolt/_partials/fields/_collection_buttons.html.twig' with { in_compound: true, 'hash': hash } %}{% endset %}\n{# Set the icon #}\n{% set icon = item_field.definition.icon %}\n" }, { "change_type": "MODIFY", "old_path": "templates/_partials/fields/_collection_buttons.html.twig", "new_path": "templates/_partials/fields/_collection_buttons.html.twig", "diff": "-{% if in_collection is defined %}\n+{% if in_compound is defined %}\n<div class=\"btn-group ml-auto mr-2\" role=\"group\" aria-label=\"Collection buttons\">\n<button class='action-move-up-collection-item btn btn-light btn-sm' style=\"white-space: nowrap\" {% if is_first is defined and is_first %} disabled {% endif %}>\n<i class=\"fas fa-fw fa-chevron-up\"></i>\n" }, { "change_type": "MODIFY", "old_path": "templates/_partials/fields/_label.html.twig", "new_path": "templates/_partials/fields/_label.html.twig", "diff": "<label for=\"{{ id }}\" class=\"editor--label{% if type|default() == 'collection' %} sr-only{% endif %}\">\n- {% if in_collection is defined %}\n- <span style=\"font-weight: normal;\">{{ collection_label }} &raquo;</span>\n+ {% if in_compound is defined %}\n+ <span style=\"font-weight: normal;\">{{ compound_label }} &raquo;</span>\n{% endif %}\n{{- label -}}:\n" }, { "change_type": "MODIFY", "old_path": "templates/_partials/fields/set.html.twig", "new_path": "templates/_partials/fields/set.html.twig", "diff": "'@' ~ setChild.type ~ '/' ~ setChild.type ~ '.html.twig',\n'@bolt/_partials/fields/generic.html.twig'\n] %}\n- {% if in_collection is defined %}\n- {% set setChildName = name ~ '[' ~ setChild.name ~ ']' %}\n- {% set setChildId = id ~ '-' ~ setChild.name|default('unnamed') %}\n- {% include includeLookup with {'id': setChildId, 'field' : setChild, 'name' : setChildName, 'record': record, 'include_id': true} only %}\n+ {% if in_compound is defined %}\n+ {% set context = {\n+ 'in_compound': true,\n+ 'compound_label': label,\n+ 'id': id ~ '-' ~ setChild.name|default('unnamed'),\n+ 'field' : setChild,\n+ 'name' : name ~ '[' ~ setChild.name ~ ']',\n+ 'record': record,\n+ 'include_id': true\n+ } %}\n+\n+ {% include includeLookup with context only %}\n{% else %}\n- {% set setChildName = 'sets[' ~ field.name ~ ']' ~ '[' ~ setChild.name ~ ']' %}\n- {% set setChildId = 'field-' ~ field.name|default(name)|default('unnamed') ~ '-' ~ setChild.name|default('unnamed') %}\n- {% include includeLookup with {'id': setChildId, 'field' : setChild, 'name' : setChildName, 'record': record} only %}\n+ {% set context = {\n+ 'in_compound': true,\n+ 'compound_label': label,\n+ 'id': 'field-' ~ field.name|default(name)|default('unnamed') ~ '-' ~ setChild.name|default('unnamed'),\n+ 'field' : setChild,\n+ 'name' : 'sets[' ~ field.name ~ ']' ~ '[' ~ setChild.name ~ ']',\n+ 'record': record\n+ } %}\n+\n+ {% include includeLookup with context only %}\n{% endif %}\n{% endfor %}\n{% endblock %}\n" }, { "change_type": "MODIFY", "old_path": "tests/e2e/edit_record_1.feature", "new_path": "tests/e2e/edit_record_1.feature", "diff": "@@ -188,7 +188,7 @@ Feature: Edit record\nWhen I follow \"Sets\"\nThen I should be on \"/bolt/edit/43#sets\"\n- And I should see \"Set\" in the \"#sets label[for='field-set']\" element\n+ And I should see \"This is my set\" in the \"#sets label[for='field-set-title']\" element\nAnd I should see \"Title\" in the \"#sets label[for='field-set-title']\" element\nAnd I should see exactly one \"sets[set][title]\" element\n" }, { "change_type": "MODIFY", "old_path": "translations/messages.en.xlf", "new_path": "translations/messages.en.xlf", "diff": "<unit id=\"0C9.Vmh\" name=\"collection.add_item\">\n<segment>\n<source>collection.add_item</source>\n- <target>Add a new item to %name%</target>\n+ <target>Add a new item to '%name%'</target>\n</segment>\n</unit>\n<unit id=\"ApPu4P_\" name=\"collection.move_item_up\">\n" } ]
PHP
MIT License
bolt/core
finetuning, cleaning up
95,144
20.09.2020 10:41:32
-7,200
761f7a9cf9eb06ea0a0d5a1867597d8cac265eda
Prepare release 4.0.0-rc.44
[ { "change_type": "MODIFY", "old_path": "package-lock.json", "new_path": "package-lock.json", "diff": "}\n},\n\"caniuse-lite\": {\n- \"version\": \"1.0.30001132\",\n- \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001132.tgz\",\n- \"integrity\": \"sha512-zk5FXbnsmHa0Ktc/NOZJRr+ilXva+2KFJuRiQfnjkxJfV/7DYP5C27lSQF++/veCUzVWE5xecZnSBJjf6fSwJA==\"\n+ \"version\": \"1.0.30001133\",\n+ \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001133.tgz\",\n+ \"integrity\": \"sha512-s3XAUFaC/ntDb1O3lcw9K8MPeOW7KO3z9+GzAoBxfz1B0VdacXPMKgFUtG4KIsgmnbexmi013s9miVu4h+qMHw==\"\n},\n\"capture-exit\": {\n\"version\": \"2.0.0\",\n" }, { "change_type": "MODIFY", "old_path": "package.json", "new_path": "package.json", "diff": "{\n\"name\": \"bolt\",\n- \"version\": \"4.0.0-rc.43\",\n+ \"version\": \"4.0.0-rc.44\",\n\"homepage\": \"https://boltcms.io\",\n\"author\": \"Bob den Otter <bob@twokings.nl> (https://boltcms.io)\",\n\"license\": \"MIT\",\n\"bootbox\": \"^5.4.0\",\n\"bootstrap\": \"^4.5.2\",\n\"browserslist\": \"^4.14.3\",\n- \"caniuse-lite\": \"^1.0.30001132\",\n+ \"caniuse-lite\": \"^1.0.30001133\",\n\"codemirror\": \"^5.57.0\",\n\"dropzone\": \"^5.7.2\",\n\"flagpack\": \"^1.0.5\",\n" } ]
PHP
MIT License
bolt/core
Prepare release 4.0.0-rc.44
95,144
20.09.2020 12:38:59
-7,200
c66d0270161f3b66bce480570a1a0bf7fd7b906a
Adding `base-2021` to `CopyThemesCommand`
[ { "change_type": "MODIFY", "old_path": "src/Command/CopyThemesCommand.php", "new_path": "src/Command/CopyThemesCommand.php", "diff": "@@ -55,6 +55,7 @@ class CopyThemesCommand extends Command\nif (file_exists(dirname(dirname(dirname(__DIR__))) . '/themes')) {\n$baseDir = dirname(dirname(dirname(__DIR__))) . '/themes';\n$dirs = [\n+ $baseDir . '/base-2021' => $publicDir . '/theme/base-2021',\n$baseDir . '/base-2018' => $publicDir . '/theme/base-2018',\n$baseDir . '/skeleton' => $publicDir . '/theme/skeleton',\n];\n" } ]
PHP
MIT License
bolt/core
Adding `base-2021` to `CopyThemesCommand`
95,197
20.09.2020 23:36:59
25,200
f37ed8a45f20fbfbd784e9603e62825a4f24ec09
Update hidden.html.twig Fixes typo in pattern Adds prefix/postfix
[ { "change_type": "MODIFY", "old_path": "templates/_partials/fields/hidden.html.twig", "new_path": "templates/_partials/fields/hidden.html.twig", "diff": "{% set value = field.value|json_encode %}\n{% set required = field.definition.required ? 1 : 0 %}\n{% set readonly = field.definition.readonly ? true : false %}\n-{% set pattern = fie.d.definition.get('pattern')|default(false) %}\n+{% set pattern = field.definition.get('pattern')|default(false) %}\n+{% set prefix = prefix|default(field.definition.prefix|default) %}\n+{% if prefix and not (prefix starts with '<p' or prefix starts with '<span' or prefix starts with '<div') %}\n+ {% set prefix = '<div id=\"' ~ id ~ '_prefix\" class=\"form--helper\">' ~ prefix|markdown ~ '</div>' %}\n+{% endif %}\n+\n+{% set postfix = postfix|default(field.definition.postfix|default) %}\n+{% if postfix and not (postfix starts with '<p' or postfix starts with '<span' or postfix starts with '<div') %}\n+ {% set postfix = '<div id=\"' ~ id ~ '_postfix\" class=\"form--helper\">' ~ postfix|markdown ~ '</div>' %}\n+{% endif %}\n+\n+{{ prefix|raw }}\n<input type=\"hidden\" id=\"{{ id }}\" name=\"{{ name }}\" value=\"{{ value }}\"\n{% if required == 1 %}required {% endif %}\n{% if readonly %}readonly {% endif %}\n{% if pattern %}pattern=\"{{ pattern }}\" {% endif %}\n/>\n+{{ postfix|raw }}\n" } ]
PHP
MIT License
bolt/core
Update hidden.html.twig - Fixes typo in pattern - Adds prefix/postfix
95,197
21.09.2020 02:04:52
25,200
9564b2c9f3086c5e513806b80eff957179bd4798
Update Collection.vue Also adds a line break between the label and button for 'Add new Set' at the end of a collection
[ { "change_type": "MODIFY", "old_path": "assets/js/app/editor/Components/Collection.vue", "new_path": "assets/js/app/editor/Components/Collection.vue", "diff": "</div>\n<div class=\"row\">\n- <span class=\"my-auto\" style=\"margin: 1rem;\">{{ labels.add_collection_item }}:</span>\n+ <div class=\"col-12\">\n+ <p class=\"mt-4 mb-1\">{{ labels.add_collection_item }}:</p>\n<div v-if=\"templates.length > 1\" class=\"dropdown\">\n<button\nid=\"dropdownMenuButton\"\n</button>\n</div>\n</div>\n+ </div>\n</template>\n<script>\n" } ]
PHP
MIT License
bolt/core
Update Collection.vue Also adds a line break between the label and button for 'Add new Set' at the end of a collection
95,144
21.09.2020 14:12:30
-7,200
fb9f91c0c15c3bcec9f6ea197c21aa93c60fd904
Finetuning CSS
[ { "change_type": "MODIFY", "old_path": "assets/js/app/editor/Components/Collection.vue", "new_path": "assets/js/app/editor/Components/Collection.vue", "diff": "<div v-for=\"element in elements\" :key=\"element.hash\" class=\"collection-item\">\n<details :open=\"state === 'expanded'\" class=\"card\">\n- <summary class=\"d-block\"\n+ <summary class=\"d-block\">\n<div class=\"card-header d-flex align-items-center\">\n<!-- Initial title. This is replaced by dynamic title in JS below. -->\n<i class=\"card-marker-caret fa fa-caret-right\"></i>\nimport Vue from 'vue';\nimport $ from 'jquery';\nvar uniqid = require('locutus/php/misc/uniqid');\n-\nexport default {\nname: 'EditorCollection',\nprops: {\n@@ -113,7 +112,6 @@ export default {\n},\ndata() {\nlet templateSelectOptions = [];\n-\nreturn {\nelements: this.existingFields,\ncounter: this.existingFields.length,\n@@ -142,7 +140,6 @@ export default {\nmounted() {\nthis.setAllButtonsStates(window.$(this.$refs.collectionContainer));\nlet vueThis = this;\n-\n/**\n* Event listeners on collection items buttons\n* This is a jQuery event listener, because Vue cannot handle an event emitted by a non-vue element.\n@@ -155,39 +152,32 @@ export default {\nvueThis.setAllButtonsStates(collectionContainer);\nvueThis.counter--;\n});\n-\nwindow.$(document).on('click', vueThis.selector.collectionContainer + vueThis.selector.moveUp, function(e) {\ne.preventDefault();\nlet thisCollectionItem = vueThis.getCollectionItemFromPressedButton(this);\nlet prevCollectionitem = vueThis.getPreviousCollectionItem(thisCollectionItem);\nwindow.$(thisCollectionItem).after(prevCollectionitem);\n-\nvueThis.setButtonsState(thisCollectionItem);\nvueThis.setButtonsState(prevCollectionitem);\n});\n-\nwindow.$(document).on('click', vueThis.selector.collectionContainer + vueThis.selector.moveDown, function(e) {\ne.preventDefault();\nlet thisCollectionItem = vueThis.getCollectionItemFromPressedButton(this);\nlet nextCollectionItem = vueThis.getNextCollectionItem(thisCollectionItem);\nwindow.$(thisCollectionItem).before(nextCollectionItem);\n-\nvueThis.setButtonsState(thisCollectionItem);\nvueThis.setButtonsState(nextCollectionItem);\n});\n-\nwindow.$(document).on('click', vueThis.selector.collectionContainer + vueThis.selector.expandAll, function(e) {\ne.preventDefault();\nconst collection = $(e.target).closest(vueThis.selector.collectionContainer);\ncollection.find('details').attr('open', '');\n});\n-\nwindow.$(document).on('click', vueThis.selector.collectionContainer + vueThis.selector.collapseAll, function(e) {\ne.preventDefault();\nconst collection = $(e.target).closest(vueThis.selector.collectionContainer);\ncollection.find('details').removeAttr('open');\n});\n-\n/**\n* Update the title dynamically.\n*/\n@@ -195,12 +185,10 @@ export default {\n$.each(window.$(vueThis.selector.collectionContainer + vueThis.selector.item), function() {\nupdateTitle(this);\n});\n-\nwindow.$(vueThis.selector.collectionContainer).on('keyup change', vueThis.selector.item, function() {\nupdateTitle(this);\n});\n});\n-\n/**\n* Pass a .collection-item element to update the title\n* with the value of the first text-based field.\n@@ -219,7 +207,6 @@ export default {\nconst title = $(input).val() ? $(input).val() : label.attr('data-label');\nlabel.html(icon + title);\n}\n-\n/**\n* Open newly inserted collection items.\n*/\n@@ -255,7 +242,6 @@ export default {\n.find(this.selector.moveDown)\n.first()\n.removeAttr('disabled');\n-\nif (!this.getPreviousCollectionItem(item)) {\n// first in collection\nitem\n@@ -263,7 +249,6 @@ export default {\n.first()\n.attr('disabled', 'disabled');\n}\n-\nif (!this.getNextCollectionItem(item)) {\n// last in collection\nitem\n@@ -287,13 +272,9 @@ export default {\naddCollectionItem(event) {\n// duplicate template without reference\nlet template = $.extend(true, {}, this.getSelectedTemplate(event));\n-\nconst realhash = uniqid();\n-\ntemplate.content = template.content.replace(new RegExp(template.hash, 'g'), realhash);\n-\ntemplate.hash = realhash;\n-\nthis.elements.push(template);\nthis.counter++;\n},\n@@ -302,7 +283,6 @@ export default {\n? $(event.target)\n: $(event.target).closest('[data-template]');\nlet selectValue = target.attr('data-template');\n-\nreturn this.templates.find(template => template.label === selectValue);\n},\n},\n" } ]
PHP
MIT License
bolt/core
Finetuning CSS
95,144
21.09.2020 16:40:36
-7,200
018bbdd01d0714554bdc61f5a4c2e9b6a7cae14e
Allow numeric slugs with `allow_numeric` attribute in ContentType
[ { "change_type": "MODIFY", "old_path": "config/bolt/contenttypes.yaml", "new_path": "config/bolt/contenttypes.yaml", "diff": "@@ -124,6 +124,7 @@ entries:\nslug:\ntype: slug\nuses: title\n+ allow_numeric: true\nteaser:\ntype: html\nheight: 150px\n" }, { "change_type": "MODIFY", "old_path": "src/Controller/Frontend/DetailController.php", "new_path": "src/Controller/Frontend/DetailController.php", "diff": "@@ -41,12 +41,13 @@ class DetailController extends TwigAwareController implements FrontendZoneInterf\n*/\npublic function record($slugOrId, ?string $contentTypeSlug = null, bool $requirePublished = true): Response\n{\n- // @todo should we check content type?\n- if (is_numeric($slugOrId)) {\n- $record = $this->contentRepository->findOneBy(['id' => (int) $slugOrId]);\n- } else {\n+ // Check if there's a record with given `$slugOrId` as slug (might be a numeric slug)\n$contentType = ContentType::factory($contentTypeSlug, $this->config->get('contenttypes'));\n$record = $this->contentRepository->findOneBySlug($slugOrId, $contentType);\n+\n+ // If we're given a number `$slugOrId`, like `page/100`, check if there's a record with that number as ID.\n+ if (! $record && is_numeric($slugOrId)) {\n+ $record = $this->contentRepository->findOneBy(['id' => (int) $slugOrId]);\n}\n$this->contentHelper->setCanonicalPath($record);\n@@ -54,7 +55,7 @@ class DetailController extends TwigAwareController implements FrontendZoneInterf\nreturn $this->renderSingle($record, $requirePublished);\n}\n- public function contentByFieldValue(string $contentTypeSlug, string $field, string $value): Response\n+ public function contentByFieldValue(string $contentTypeSlug, string $field, string $value, bool $requirePublished = true): Response\n{\n$contentType = ContentType::factory($contentTypeSlug, $this->config->get('contenttypes'));\n$record = $this->contentRepository->findOneByFieldValue($field, $value, $contentType);\n" }, { "change_type": "MODIFY", "old_path": "src/Entity/Field/SlugField.php", "new_path": "src/Entity/Field/SlugField.php", "diff": "@@ -23,7 +23,7 @@ class SlugField extends Field implements FieldInterface, ScalarCastable\n}\n$value = Str::slug($value);\n- if (is_numeric($value)) {\n+ if (is_numeric($value) && $this->getDefinition()->get('allow_numeric') !== true) {\n$slug = $this->getContent()->getDefinition()->get('singular_slug');\n$value = $slug . '-' . $value;\n}\n" } ]
PHP
MIT License
bolt/core
Allow numeric slugs with `allow_numeric` attribute in ContentType
95,144
21.09.2020 20:36:58
-7,200
a83c27ad3604a43deb66bca35f7e6780d8bfac2a
Minor fix: Check if `Content` is set in preview mode.
[ { "change_type": "MODIFY", "old_path": "src/Entity/Field.php", "new_path": "src/Entity/Field.php", "diff": "@@ -231,7 +231,7 @@ class Field implements FieldInterface, TranslatableInterface\n{\n$value = $this->getParsedValue();\n- if (is_string($value) && $this->getDefinition()->get('sanitise')) {\n+ if (is_string($value) && $this->getContent() && $this->getDefinition()->get('sanitise')) {\n$value = $this->getContent()->sanitise($value);\n}\n" } ]
PHP
MIT License
bolt/core
Minor fix: Check if `Content` is set in preview mode.
95,144
22.09.2020 09:14:42
-7,200
1c779057dd9674995df69f35762b0d4ce51861df
Add pedantic notice to installation on this page, reminding people to use instead
[ { "change_type": "MODIFY", "old_path": "README.md", "new_path": "README.md", "diff": "@@ -8,13 +8,16 @@ for more info.\nTo check out Bolt and set up your first Bolt installation, read\n[Installing Bolt 4][installation].\n+\n---\n+\n**This repository should be used to work _<ins>on</ins>_ Bolt. Not\n_<ins>with</ins>_ Bolt. If you want to check out Bolt, the\n`composer create-project` method is recommended. See here:\nhttps://github.com/bolt/project/ .**\n+\n---\n> Cleanse this world with flame\n> End this, cleanse this\n@@ -37,12 +40,20 @@ To set up a running **development** environment of Bolt 4 please perform the fol\n1 Install\n---------\n-To install a development version of Bolt 4:\n+To install a _**development**_ version of Bolt 4:\n- Check out this git repository\n- Then run:\n+<!-- If you're reading this, and you're curious about the echo statement below:\n+We've found that people are _really_ terrible at reading. There's a big notice\n+on the top of this page, telling people the purpose of this repository, but\n+they miss it, and just paste the following on the CLI, assuming it's what they\n+need. -->\n+\n```bash\n+echo \"\\n\\nAre you sure you shouldn't use https://docs.bolt.cm/installation instead?\\n\\n\"\n+sleep 5\ncomposer install\nnpm install && npm run build\n```\n@@ -56,12 +67,14 @@ composer update\n### Or install with Docker\n-To install Bolt 4 with Docker (for now, on a UNIX-like system):\n+To install a _**development**_ version of Bolt 4 with Docker:\n- Check out the git repo\n- Then run:\n```bash\n+echo \"\\n\\nAre you sure you shouldn't use https://docs.bolt.cm/installation instead?\\n\\n\"\n+sleep 5\nmake docker-install\n```\n@@ -213,7 +226,7 @@ Sponsors:\n[fowler]: https://martinfowler.com/articles/practical-test-pyramid.html\n[translations]: https://github.com/bolt/core/wiki/Contribute-on-translations\n[hatebreed]: https://www.youtube.com/watch?v=DBwgX8yBqsw\n-[installation]: https://docs.bolt.cm/4.0/installation/installation\n+[installation]: https://docs.bolt.cm/installation\n--------\n" } ]
PHP
MIT License
bolt/core
Add pedantic notice to installation on this page, reminding people to use https://docs.bolt.cm/installation instead
95,144
22.09.2020 14:54:13
-7,200
3e03ca7f71472787cc95e8c4d15af008539c3956
Fix Z-index, attempt 2
[ { "change_type": "MODIFY", "old_path": "assets/scss/vendor/multiselect.scss", "new_path": "assets/scss/vendor/multiselect.scss", "diff": "@@ -55,11 +55,6 @@ fieldset[disabled] .multiselect {\npointer-events: none;\n}\n-.multiselect-bolt-wrapper {\n- position: relative;\n- z-index: 110;\n-}\n-\n.multiselect,\n.multiselect__input,\n.multiselect__single {\n@@ -268,7 +263,7 @@ fieldset[disabled] .multiselect {\n}\n.multiselect--active .multiselect__placeholder {\n- display: none;\n+ visibility: hidden;\n}\n.multiselect__content-wrapper {\n@@ -282,7 +277,7 @@ fieldset[disabled] .multiselect {\nborder-top: none;\nborder-bottom-left-radius: $vue-multiselect-border-radius;\nborder-bottom-right-radius: $vue-multiselect-border-radius;\n- z-index: 110;\n+ z-index: 50;\n-webkit-overflow-scrolling: touch;\n}\n" } ]
PHP
MIT License
bolt/core
Fix Z-index, attempt 2
95,144
23.09.2020 12:23:14
-7,200
26cdfcffe938333704e61a2800c2cfadb3f9c042
Fix "zero width spaces" and Twigified titles in backend.
[ { "change_type": "MODIFY", "old_path": "src/Twig/ContentExtension.php", "new_path": "src/Twig/ContentExtension.php", "diff": "@@ -23,6 +23,7 @@ use Bolt\\Utils\\ContentHelper;\nuse Bolt\\Utils\\Excerpt;\nuse Bolt\\Utils\\Html;\nuse Bolt\\Utils\\Sanitiser;\n+use Bolt\\Widget\\Injector\\RequestZone;\nuse Pagerfanta\\Pagerfanta;\nuse Symfony\\Component\\Finder\\Finder;\nuse Symfony\\Component\\HttpFoundation\\Request;\n@@ -197,7 +198,7 @@ class ContentExtension extends AbstractExtension\n$locale = $this->request->getLocale();\n}\n- if (ContentHelper::isSuitable($content)) {\n+ if (RequestZone::isForFrontend($this->request) && ContentHelper::isSuitable($content)) {\n$title = $this->contentHelper->get($content, $content->getDefinition()->get('title_format'), $locale);\n} else {\n$title = ContentHelper::getFieldBasedTitle($content, $locale);\n" }, { "change_type": "MODIFY", "old_path": "templates/_partials/fields/_base.html.twig", "new_path": "templates/_partials/fields/_base.html.twig", "diff": "{% set value = value|first %}\n{% endif %}\n- {# We're adding zero width spaces in `{{` and `}}`, to ensure Vue doesn't get its grubby paws on it. #}\n+ {# We're adding zero width spaces (`\\xE2\\x80\\x8B`) in `{{` and `}}`, to ensure Vue doesn't get its grubby paws on it. #}\n{% if value is string %}\n- {% set value = value|replace({'{{': '{&ZeroWidthSpace;{', '}}': '}&ZeroWidthSpace;}'}) %}\n+ {% set value = value|replace({'{{': \"{\\xE2\\x80\\x8B{\", '}}': \"}\\xE2\\x80\\x8B}\" }) %}\n{% endif %}\n{% endif %}\n" } ]
PHP
MIT License
bolt/core
Fix "zero width spaces" and Twigified titles in backend.
95,144
23.09.2020 13:09:06
-7,200
91096e547fb29596510f6ee697b51360f83484d3
Let's fix this differently
[ { "change_type": "MODIFY", "old_path": "src/Entity/Field.php", "new_path": "src/Entity/Field.php", "diff": "@@ -9,9 +9,11 @@ use ApiPlatform\\Core\\Annotation\\ApiResource;\nuse ApiPlatform\\Core\\Bridge\\Doctrine\\Orm\\Filter\\SearchFilter;\nuse Bolt\\Common\\Arr;\nuse Bolt\\Configuration\\Content\\FieldType;\n+use Bolt\\Widget\\Injector\\RequestZone;\nuse Doctrine\\ORM\\Mapping as ORM;\nuse Knp\\DoctrineBehaviors\\Contract\\Entity\\TranslatableInterface;\nuse Knp\\DoctrineBehaviors\\Model\\Translatable\\TranslatableTrait;\n+use Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\Serializer\\Annotation\\Groups;\nuse Symfony\\Component\\Serializer\\Annotation\\SerializedName;\nuse Tightenco\\Collect\\Support\\Collection as LaravelCollection;\n@@ -258,7 +260,7 @@ class Field implements FieldInterface, TranslatableInterface\nprivate function shouldBeRenderedAsTwig($value): bool\n{\n- return is_string($value) && $this->getDefinition()->get('allow_twig') && preg_match('/{[{%#]/', $value);\n+ return RequestZone::isForFrontend(Request::createFromGlobals()) && is_string($value) && $this->getDefinition()->get('allow_twig') && preg_match('/{[{%#]/', $value);\n}\npublic function set(string $key, $value): self\n" }, { "change_type": "MODIFY", "old_path": "src/Twig/ContentExtension.php", "new_path": "src/Twig/ContentExtension.php", "diff": "@@ -23,7 +23,6 @@ use Bolt\\Utils\\ContentHelper;\nuse Bolt\\Utils\\Excerpt;\nuse Bolt\\Utils\\Html;\nuse Bolt\\Utils\\Sanitiser;\n-use Bolt\\Widget\\Injector\\RequestZone;\nuse Pagerfanta\\Pagerfanta;\nuse Symfony\\Component\\Finder\\Finder;\nuse Symfony\\Component\\HttpFoundation\\Request;\n@@ -198,7 +197,7 @@ class ContentExtension extends AbstractExtension\n$locale = $this->request->getLocale();\n}\n- if (RequestZone::isForFrontend($this->request) && ContentHelper::isSuitable($content)) {\n+ if (ContentHelper::isSuitable($content)) {\n$title = $this->contentHelper->get($content, $content->getDefinition()->get('title_format'), $locale);\n} else {\n$title = ContentHelper::getFieldBasedTitle($content, $locale);\n" } ]
PHP
MIT License
bolt/core
Let's fix this differently
95,144
23.09.2020 18:55:52
-7,200
246ce3a60217b3227df4b447c0963876a15a0525
Only show "Preview" button if ContentType is not Viewless
[ { "change_type": "MODIFY", "old_path": "templates/content/_buttons.html.twig", "new_path": "templates/content/_buttons.html.twig", "diff": "{{ macro.button('action.save', 'fa-save', 'success', {'type': 'submit', 'form': 'editcontent', 'data-patience': 'virtue', 'name': 'save'}) }}\n{% if record.id %}\n+ {% if not record.definition.get('viewless') %}\n<div class=\"btn-group\">\n{{ macro.button(\n'action.preview',\n{ 'type': 'submit',\n'form': 'editcontent',\n'formtarget': '_blank',\n- 'formaction': path('bolt_content_edit_preview', {'id': record.id })\n+ 'formaction': path('bolt_content_edit_preview', {'id': record.id|default(0) })\n}) }}\n</div>\n+ {% endif %}\n{% if status|default() %}\n<p>\n" } ]
PHP
MIT License
bolt/core
Only show "Preview" button if ContentType is not Viewless
95,171
24.09.2020 14:53:09
25,200
199703e7884f9a2a7b43502571859465b4b0d718
Remove "Set >> Label" from Sets, as the 'Set >>' portion is not relevant to editors
[ { "change_type": "MODIFY", "old_path": "templates/_partials/fields/_label.html.twig", "new_path": "templates/_partials/fields/_label.html.twig", "diff": "<label for=\"{{ id }}\" class=\"editor--label{% if type|default() == 'collection' %} sr-only{% endif %}\">\n- {% if in_compound is defined %}\n- <span style=\"font-weight: normal;\">{{ compound_label }} &raquo;</span>\n- {% endif %}\n-\n{{- label -}}:\n{% if required %} <span class=\"required-label\"></span> {% endif %}\n" } ]
PHP
MIT License
bolt/core
Remove "Set >> Label" from Sets, as the 'Set >>' portion is not relevant to editors
95,144
26.09.2020 09:28:50
-7,200
a2e6254b2f260c5aa0bcb1c1ee3ec3f58f0bec0c
Cleanup, this is handled in ENV / Doctrine
[ { "change_type": "MODIFY", "old_path": "src/Configuration/Parser/GeneralParser.php", "new_path": "src/Configuration/Parser/GeneralParser.php", "diff": "@@ -6,7 +6,6 @@ namespace Bolt\\Configuration\\Parser;\nuse Bolt\\Common\\Arr;\nuse Tightenco\\Collect\\Support\\Collection;\n-use Webmozart\\PathUtil\\Path;\nclass GeneralParser extends BaseParser\n{\n@@ -98,152 +97,4 @@ class GeneralParser extends BaseParser\n'omit_backgrounds' => false,\n];\n}\n-\n- /**\n- * Parse and fine-tune the database configuration.\n- */\n- protected function parseDatabase(array $options): Collection\n- {\n- // Make sure prefix ends with underscore\n- if (mb_substr($options['prefix'], mb_strlen($options['prefix']) - 1) !== '_') {\n- $options['prefix'] .= '_';\n- }\n-\n- // Parse master connection parameters\n- $master = $this->parseConnectionParams($options);\n- // Merge master connection into options\n- $options = (new Collection($options))->merge($master);\n-\n- // Add platform specific random functions\n- $driver = \\Bolt\\Common\\Str::replaceFirst($options['driver'], 'pdo_', '');\n- if ($driver === 'sqlite') {\n- $options['driver'] = 'pdo_sqlite';\n- $options['randomfunction'] = 'RANDOM()';\n- } elseif (in_array($driver, ['mysql', 'mysqli'], true)) {\n- $options['driver'] = 'pdo_mysql';\n- $options['randomfunction'] = 'RAND()';\n- } elseif (in_array($driver, ['pgsql', 'postgres', 'postgresql'], true)) {\n- $options['driver'] = 'pdo_pgsql';\n- $options['randomfunction'] = 'RANDOM()';\n- }\n-\n- // Specify the wrapper class for the connection\n- // $options['wrapperClass'] = Database\\Connection::class;\n-\n- // Parse SQLite separately since it has to figure out database path\n- if ($driver === 'sqlite') {\n- return $this->parseSqliteOptions($options);\n- }\n-\n- // If no slaves return with single connection\n- if (empty($options['slaves'])) {\n- return $options;\n- }\n-\n- // Specify we want a master slave connection\n- // $options['wrapperClass'] = Database\\MasterSlaveConnection::class;\n-\n- // Add master connection where MasterSlaveConnection looks for it.\n- $options['master'] = $master;\n-\n- // Parse each slave connection parameters\n- foreach ($options['slaves'] as $name => $slave) {\n- $options['slaves'][$name] = $this->parseConnectionParams($slave, $master);\n- }\n-\n- return $options;\n- }\n-\n- /**\n- * Parses params to valid connection parameters.\n- *\n- * - Defaults are merged into the params\n- * - Bolt keys are converted to Doctrine keys\n- * - Invalid keys are filtered out\n- *\n- * @param array|string $params\n- */\n- protected function parseConnectionParams($params, ?Collection $defaults = null): Collection\n- {\n- // Handle host shortcut\n- if (is_string($params)) {\n- $params = ['host' => $params];\n- }\n-\n- $params = new Collection($params);\n-\n- // Convert keys from Bolt\n- $replacements = [\n- 'databasename' => 'dbname',\n- 'username' => 'user',\n- ];\n- foreach ($replacements as $old => $new) {\n- if (isset($params[$old])) {\n- $params[$new] = $params[$old];\n- unset($params[$old]);\n- }\n- }\n-\n- // Merge with defaults\n- if ($defaults !== null) {\n- $params = $defaults->merge($params);\n- }\n-\n- // Filter out invalid keys\n- $validKeys = [\n- // common\n- 'user', 'password', 'host', 'port', 'dbname', 'charset',\n- // Qqlite\n- 'path', 'memory',\n- // MySql\n- 'unix_socket', 'driverOptions', 'collate',\n- // PostgreSQL\n- 'sslmode',\n- // Oracle\n- 'servicename', 'service', 'pooled', 'instancename', 'server',\n- // SQL Anywhere\n- 'persistent',\n- ];\n-\n- return $params->intersectByKeys($validKeys);\n- }\n-\n- /**\n- * Fine-tune Sqlite configuration parameters.\n- */\n- protected function parseSqliteOptions(Collection $config): Collection\n- {\n- if (isset($config['memory']) && $config['memory']) {\n- // If in-memory, no need to parse paths\n- unset($config['path']);\n-\n- return $config;\n- }\n- // Prevent SQLite driver from trying to use in-memory connection\n- unset($config['memory']);\n-\n- // Get path from config or use database path\n- $path = $config['path'] ?? $this->pathResolver->resolve('database');\n- if (Path::isRelative($path)) {\n- $path = $this->pathResolver->resolve($path);\n- }\n-\n- // If path has filename with extension, use that\n- if (Path::hasExtension($path)) {\n- $config['path'] = $path;\n-\n- return $config;\n- }\n-\n- // Use database name for filename\n- $filename = basename($config['dbname']);\n- if (! Path::hasExtension($filename)) {\n- $filename .= '.db';\n- }\n-\n- // Join filename with database path\n- $config['path'] = Path::join($path, $filename);\n-\n- return $config;\n- }\n}\n" } ]
PHP
MIT License
bolt/core
Cleanup, this is handled in ENV / Doctrine
95,189
27.09.2020 11:38:21
-28,800
810ba5de90128ae5325aa640f74a79feb98fd843
try and resolve the extension class from the DI container
[ { "change_type": "MODIFY", "old_path": "src/Extension/ExtensionRegistry.php", "new_path": "src/Extension/ExtensionRegistry.php", "diff": "@@ -92,7 +92,11 @@ class ExtensionRegistry\n$this->addComposerPackages();\nforeach ($this->getExtensionClasses() as $extensionClass) {\n- $extension = new $extensionClass();\n+ // If the container has a public entry then resolve from there\n+ $extension = $objects['container']->has($extensionClass)\n+ ? $objects['container']->get($extensionClass)\n+ : new $extensionClass();\n+\n$extension->injectObjects($objects);\nif (! $runCli && method_exists($extension, 'initialize')) {\n" } ]
PHP
MIT License
bolt/core
try and resolve the extension class from the DI container
95,144
27.09.2020 09:23:45
-7,200
86efffe67ddbc419a9f560877fb361520e040566
Setting a "default", but more than `0`.
[ { "change_type": "MODIFY", "old_path": "assets/scss/modules/editor/fields/_collection.scss", "new_path": "assets/scss/modules/editor/fields/_collection.scss", "diff": ".card-body {\nbackground: var(--background);\n+ // 1px solves the ghosted whitespace\n+ // @see https://github.com/bolt/core/pull/1904\n+ padding-bottom: 1px;\n}\n}\n}\n" } ]
PHP
MIT License
bolt/core
Setting a "default", but more than `0`.
95,144
27.09.2020 09:25:07
-7,200
a256eb5ed330feb4b268ac5e5fadbe004161e660
Update behaviour test
[ { "change_type": "MODIFY", "old_path": "tests/e2e/edit_record_1.feature", "new_path": "tests/e2e/edit_record_1.feature", "diff": "@@ -188,7 +188,6 @@ Feature: Edit record\nWhen I follow \"Sets\"\nThen I should be on \"/bolt/edit/43#sets\"\n- And I should see \"This is my set\" in the \"#sets label[for='field-set-title']\" element\nAnd I should see \"Title\" in the \"#sets label[for='field-set-title']\" element\nAnd I should see exactly one \"sets[set][title]\" element\n" } ]
PHP
MIT License
bolt/core
Update behaviour test
95,193
28.09.2020 11:13:31
-25,200
29ec0748d8e547c93ac595fc65747a4e6e6e646e
add config media types to files list in dropdown
[ { "change_type": "MODIFY", "old_path": "src/Controller/Backend/Async/FileListingController.php", "new_path": "src/Controller/Backend/Async/FileListingController.php", "diff": "@@ -48,7 +48,7 @@ class FileListingController implements AsyncZoneInterface\nprivate function getFilesIndex(string $path, string $type): Collection\n{\nif ($type === 'images') {\n- $glob = '*.{jpg,png,gif,jpeg,avif,webp}';\n+ $glob = sprintf('*.{%s}', $this->config->getMediaTypes()->implode(','));\n} else {\n$glob = null;\n}\n" } ]
PHP
MIT License
bolt/core
add config media types to files list in dropdown
95,193
28.09.2020 12:09:48
-25,200
092a5214392bac62425cb15f97aad3993ecf6774
fix edit file in File management subfolders
[ { "change_type": "MODIFY", "old_path": "src/Controller/Backend/FileEditController.php", "new_path": "src/Controller/Backend/FileEditController.php", "diff": "@@ -149,7 +149,8 @@ class FileEditController extends TwigAwareController implements BackendZoneInter\n$this->addFlash('success', 'file.delete_success');\n- return $this->redirectToRoute('bolt_filemanager', ['location' => $locationName]);\n+ $folder = pathinfo($path, PATHINFO_DIRNAME);\n+ return $this->redirectToRoute('bolt_filemanager', ['location' => $locationName, 'path' => $folder]);\n}\n/**\n@@ -181,9 +182,9 @@ class FileEditController extends TwigAwareController implements BackendZoneInter\nthrow $e;\n}\n- $this->addFlash('success', 'file.delete_success');\n-\n- return $this->redirectToRoute('bolt_filemanager', ['location' => $locationName]);\n+ $this->addFlash('success', 'file.duplicate_success');\n+ $folder = pathinfo($path, PATHINFO_DIRNAME);\n+ return $this->redirectToRoute('bolt_filemanager', ['location' => $locationName, 'path' => $folder]);\n}\n/**\n" }, { "change_type": "MODIFY", "old_path": "templates/finder/_files_actions.html.twig", "new_path": "templates/finder/_files_actions.html.twig", "diff": "</a>\n<a class=\"dropdown-item\"\nhref=\"{{ path('bolt_file_duplicate',\n- {'location': location.key|default('files'), 'path': file.getRelativePathname, '_csrf_token': csrf_token('file-duplicate')}) }}\">\n+ {'location': location.key|default('files'), 'path': path ~ file.getRelativePathname, '_csrf_token': csrf_token('file-duplicate')}) }}\">\n<i class=\"far fa-w fa-copy\"></i>\n{{ 'files_cards.action_duplicate'|trans }} {{ file.getRelativePathname|excerpt(22) }}\n</a>\n<a class=\"dropdown-item delete\" ,\nhref=\"{{ path('bolt_file_delete',\n- {'location': location.key|default('files'), 'path': file.getRelativePathname, '_csrf_token': csrf_token('file-delete')}) }}\"\n+ {'location': location.key|default('files'), 'path': path ~ file.getRelativePathname, '_csrf_token': csrf_token('file-delete')}) }}\"\ndata-confirmation=\"{{ 'file.delete_confirm'|trans }}\">\n<i class=\"fas fa-w fa-trash\"></i>\n{{ 'files_cards.action_delete'|trans }} {{ file.getRelativePathname|excerpt(22) }}\n" } ]
PHP
MIT License
bolt/core
fix edit file in File management subfolders
95,144
29.09.2020 10:24:04
-7,200
99398ee99431e4deb0914904643e108148776003
Fix: Don't break when passing in params for "Search Query"
[ { "change_type": "MODIFY", "old_path": "src/Storage/SelectQuery.php", "new_path": "src/Storage/SelectQuery.php", "diff": "@@ -4,6 +4,7 @@ declare(strict_types=1);\nnamespace Bolt\\Storage;\n+use Bolt\\Common\\Arr;\nuse Bolt\\Configuration\\Config;\nuse Bolt\\Configuration\\Content\\ContentType;\nuse Bolt\\Doctrine\\JsonHelper;\n@@ -175,8 +176,11 @@ class SelectQuery implements QueryInterface\n*/\npublic function setParameters(array $params): void\n{\n- // array_map('strtolower', $params) to change all params to lowercase.\n- $this->params = array_filter(array_map('strtolower', $params));\n+ // Change all params to lowercase, filter out empty ones\n+ $this->params = array_filter(Arr::mapRecursive($params, function ($a) {\n+ return mb_strtolower($a, 'utf-8');\n+ }));\n+\n$this->processFilters();\n}\n" } ]
PHP
MIT License
bolt/core
Fix: Don't break when passing in params for "Search Query"
95,190
29.09.2020 14:15:23
-7,200
16ef7562b65524a554adab8c1d6f1fd8014cf4ba
Fixtures can be loaded (fix of
[ { "change_type": "MODIFY", "old_path": ".env.dist", "new_path": ".env.dist", "diff": "@@ -24,7 +24,7 @@ DATABASE_URL=sqlite:///%kernel.project_dir%/var/data/bolt.sqlite\n#DATABASE_URL=mysql://db_user:\"db_password\"@localhost:3306/db_name\n# Postgres\n-#DATABASE_URL=postgresql://db_user:\"db_password\"@localhost:5432/db_name?serverVersion=11\"\n+#DATABASE_URL=postgresql://db_user:\"db_password\"@localhost:5432/db_name?serverVersion=11&charset=utf8\"\n# MYSQL / MariaDB (additional settings, needed for Docker)\n#DATABASE_USER=db_user\n" }, { "change_type": "MODIFY", "old_path": "src/Entity/FieldTranslation.php", "new_path": "src/Entity/FieldTranslation.php", "diff": "@@ -21,7 +21,7 @@ class FieldTranslation implements TranslationInterface\n*/\nprivate $id;\n- /** @ORM\\Column(type=\"json\") */\n+ /** @ORM\\Column(type=\"json\", options={\"jsonb\": true}) */\nprotected $value = [];\npublic function getId(): ?int\n" } ]
PHP
MIT License
bolt/core
Fixtures can be loaded (fix of #1905)
95,190
29.09.2020 14:32:44
-7,200
22dafbae72c62c9fe9e9068955b40f14ff7d5a28
Bypassing lower-case search bug: BUG SQLSTATE[42883]: Undefined function: 7 ERROR: function lower(jsonb) does not exist
[ { "change_type": "MODIFY", "old_path": "src/Storage/SelectQuery.php", "new_path": "src/Storage/SelectQuery.php", "diff": "@@ -533,11 +533,15 @@ class SelectQuery implements QueryInterface\n$originalLeftExpression = 'content.' . $filter->getKey();\n// LOWER() added to query to enable case insensitive search of JSON values. Used in conjunction with converting $params of setParameter() to lowercase.\n- $newLeftExpression = JsonHelper::wrapJsonFunction('LOWER(' . $valueAlias . ')', null, $em->getConnection());\n+ // BUG SQLSTATE[42883]: Undefined function: 7 ERROR: function lower(jsonb) does not exist\n+ // I dont care about case-insensitive search at this point, just fixing this by removing this method\n+ //$newLeftExpression = JsonHelper::wrapJsonFunction('LOWER(' . $valueAlias . ')', null, $em->getConnection());\n+ $newLeftExpression = JsonHelper::wrapJsonFunction($valueAlias, null, $em->getConnection());\n$valueWhere = $filter->getExpression();\n$valueWhere = str_replace($originalLeftExpression, $newLeftExpression, $valueWhere);\n$expr->add($valueWhere);\n+\n// @todo: Filter non-standalone fields (i.e. fields with parents)\n$null = $this->qb->expr()->isNull(sprintf('fields_%s.parent', $filter->getKey()));\n$expr->add($null);\n" } ]
PHP
MIT License
bolt/core
Bypassing lower-case search bug: BUG SQLSTATE[42883]: Undefined function: 7 ERROR: function lower(jsonb) does not exist
95,190
29.09.2020 15:11:05
-7,200
b9934e6fc8e336d1b60e93df651b9c3f6bd48117
Missing assets due to wrong order in README
[ { "change_type": "MODIFY", "old_path": "README.md", "new_path": "README.md", "diff": "@@ -117,7 +117,19 @@ bin/console doctrine:fixtures:load -n\nAlternatively, run `make db-reset`, on a UNIX-like system.\n-4 Run the prototype\n+4 How to build assets\n+-------------------\n+\n+To set up initially, run `npm install` to get the required dependencies /\n+`node_modules`. Alternatively give the path to the python executable (`npm install --python=\"/usr/local/bin/python3.7\"`) Then:\n+ - Prepare directory structure `mkdir -p node_modules/node-sass/vendor`\n+ - Rebuild npm environment for current OS `npm rebuild node-sass`\n+ - Run `npm run start` (alternatively `npm run start --python=\"/usr/local/bin/python3.7\"`)\n+\n+See the other options by running `npm run`.\n+(Note: as I'm testing this as well remotely, I copied all assets from the released composer installation by `cp -r ../www_backup/public/assets/* public/assets/`)\n+\n+5 Run the prototype\n-------------------\n- Using the Symfony CLI tool, just run `symfony server:start`.\n@@ -134,17 +146,6 @@ You can log on, using the default user & pass:\n- pass: `admin%1`\n-How to build assets\n--------------------\n-\n-To set up initially, run `npm install` to get the required dependencies /\n-`node_modules`. Then:\n-\n- - Run `npm run start`\n-\n-See the other options by running `npm run`.\n-\n-\nCode Style checking / Static Analysis\n----------------------------\n" } ]
PHP
MIT License
bolt/core
Missing assets due to wrong order in README
95,190
29.09.2020 15:15:35
-7,200
b070b4a0e05624b79df62a75983c11fd417b32e4
Bugfix for admin login to log. SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near user - user is a protected name and need quotation!
[ { "change_type": "MODIFY", "old_path": "src/Entity/Log.php", "new_path": "src/Entity/Log.php", "diff": "@@ -38,7 +38,7 @@ class Log\n/** @ORM\\Column(name=\"extra\", type=\"array\", nullable=true) */\nprivate $extra;\n- /** @ORM\\Column(name=\"user\", type=\"array\", nullable=true) */\n+ /** @ORM\\Column(name=\"`user`\", type=\"array\", nullable=true) */\nprivate $user;\n/** @ORM\\Column(type=\"content\", type=\"integer\", nullable=true) */\n" } ]
PHP
MIT License
bolt/core
Bugfix for admin login to log. SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near user - user is a protected name and need quotation!
95,190
29.09.2020 16:57:06
-7,200
ed7396db4d1ec512f3c33f462fcfaee4769d5830
Fixed RandomSelect for records in PostgreSQL
[ { "change_type": "MODIFY", "old_path": "src/Doctrine/Functions/Rand.php", "new_path": "src/Doctrine/Functions/Rand.php", "diff": "@@ -19,6 +19,11 @@ class Rand extends FunctionNode\nif (property_exists($this->expression, 'value') && $this->expression->value === '1') {\nreturn 'random()';\n}\n+ // value is two if PostgreSQL. See Bolt\\Storage\\Directive\\RandomDirectiveHandler\n+ if (property_exists($this->expression, 'value') && $this->expression->value === '2') {\n+ return 'RANDOM()';\n+ }\n+\nreturn 'RAND()';\n}\n" }, { "change_type": "MODIFY", "old_path": "src/Storage/Directive/RandomDirectiveHandler.php", "new_path": "src/Storage/Directive/RandomDirectiveHandler.php", "diff": "@@ -29,6 +29,11 @@ class RandomDirectiveHandler\nif ($this->version->getPlatform()['driver_name'] === 'sqlite') {\n$query->getQueryBuilder()->addSelect('RAND(1) as HIDDEN rand')->orderBy('rand');\n+ return;\n+ } if ($this->version->getPlatform()['driver_name'] === 'pgsql') {\n+ $query->getQueryBuilder()->addSelect('RAND(2) as HIDDEN rand')->orderBy('rand');\n+ //$debug_msg = $query->getQueryBuilder()->getQuery()->getSQL();\n+ //throw new Exception($debug_msg);\nreturn;\n}\n" } ]
PHP
MIT License
bolt/core
Fixed RandomSelect for records in PostgreSQL
95,190
29.09.2020 17:04:19
-7,200
ad555b253eaf76534d981d3401adc9081f9a771d
Ran Code Style checking / Static Analysis
[ { "change_type": "ADD", "old_path": null, "new_path": "config/extensions/acmecorp-referenceextension.yaml", "diff": "+# Reference extension configuration file\n+\n+foo: Bar\n" }, { "change_type": "ADD", "old_path": null, "new_path": "src/.preload.php", "diff": "+<?php\n+\n+if (file_exists(__DIR__.'/../var/cache/dev/Bolt_KernelDevDebugContainer.preload.php')) {\n+ require __DIR__.'/../var/cache/dev/Bolt_KernelDevDebugContainer.preload.php';\n+}\n" }, { "change_type": "MODIFY", "old_path": "src/Doctrine/Functions/Rand.php", "new_path": "src/Doctrine/Functions/Rand.php", "diff": "@@ -24,7 +24,6 @@ class Rand extends FunctionNode\nreturn 'RANDOM()';\n}\n-\nreturn 'RAND()';\n}\n" }, { "change_type": "MODIFY", "old_path": "src/Storage/Directive/RandomDirectiveHandler.php", "new_path": "src/Storage/Directive/RandomDirectiveHandler.php", "diff": "@@ -30,7 +30,8 @@ class RandomDirectiveHandler\n$query->getQueryBuilder()->addSelect('RAND(1) as HIDDEN rand')->orderBy('rand');\nreturn;\n- } if ($this->version->getPlatform()['driver_name'] === 'pgsql') {\n+ }\n+ if ($this->version->getPlatform()['driver_name'] === 'pgsql') {\n$query->getQueryBuilder()->addSelect('RAND(2) as HIDDEN rand')->orderBy('rand');\n//$debug_msg = $query->getQueryBuilder()->getQuery()->getSQL();\n//throw new Exception($debug_msg);\n" }, { "change_type": "MODIFY", "old_path": "src/Storage/SelectQuery.php", "new_path": "src/Storage/SelectQuery.php", "diff": "@@ -541,7 +541,6 @@ class SelectQuery implements QueryInterface\n$valueWhere = str_replace($originalLeftExpression, $newLeftExpression, $valueWhere);\n$expr->add($valueWhere);\n-\n// @todo: Filter non-standalone fields (i.e. fields with parents)\n$null = $this->qb->expr()->isNull(sprintf('fields_%s.parent', $filter->getKey()));\n$expr->add($null);\n" } ]
PHP
MIT License
bolt/core
Ran Code Style checking / Static Analysis
95,190
29.09.2020 18:49:24
-7,200
f85fd41a68b0de71db602d7070f74beb6aeb6652
Fixed search function for PostgreSQL and jsonb
[ { "change_type": "MODIFY", "old_path": "src/Repository/ContentRepository.php", "new_path": "src/Repository/ContentRepository.php", "diff": "@@ -97,7 +97,7 @@ class ContentRepository extends ServiceEntityRepository\n$qb->addSelect('f')\n->innerJoin('content.fields', 'f')\n->innerJoin('f.translations', 't')\n- ->andWhere($qb->expr()->like('t.value', ':search'))\n+ ->andWhere($qb->expr()->like('CAST(t.value AS TEXT)', ':search'))\n->setParameter('search', '%' . $searchTerm . '%');\n// These are the ID's of content we need.\n" }, { "change_type": "MODIFY", "old_path": "src/Storage/SelectQuery.php", "new_path": "src/Storage/SelectQuery.php", "diff": "@@ -534,8 +534,8 @@ class SelectQuery implements QueryInterface\n$originalLeftExpression = 'content.' . $filter->getKey();\n// LOWER() added to query to enable case insensitive search of JSON values. Used in conjunction with converting $params of setParameter() to lowercase.\n// BUG SQLSTATE[42883]: Undefined function: 7 ERROR: function lower(jsonb) does not exist\n- // I dont care about case-insensitive search at this point, just fixing this by removing this method\n- //$newLeftExpression = JsonHelper::wrapJsonFunction('LOWER(' . $valueAlias . ')', null, $em->getConnection());\n+ // We want to be able to search case-insensitive, database-agnostic\n+ $valueAlias = mb_strtolower($valueAlias);\n$newLeftExpression = JsonHelper::wrapJsonFunction($valueAlias, null, $em->getConnection());\n$valueWhere = $filter->getExpression();\n$valueWhere = str_replace($originalLeftExpression, $newLeftExpression, $valueWhere);\n" } ]
PHP
MIT License
bolt/core
Fixed search function for PostgreSQL and jsonb
95,144
30.09.2020 08:43:35
-7,200
da86ad0b3a9887fd92ebc61ffd46847cf9e7491c
Fix another instance of breakage
[ { "change_type": "MODIFY", "old_path": "config/bolt/config.yaml", "new_path": "config/bolt/config.yaml", "diff": "@@ -96,8 +96,8 @@ listing_template: listing.twig\nlisting_records: 6\nlisting_sort: datepublish DESC\n-# Allow filtering on listing pages using query parameters, much like you\n-# would with {% setcontent %}. E.g. /pages?order=id and /pages?title=%voluptat%\n+# Allow filtering on listing pages using query parameters, much like you would\n+# with {% setcontent %}. E.g. /pages?order=id and /pages?title--like=voluptat\n# Useful for search.\nquery_search: true\n" }, { "change_type": "MODIFY", "old_path": "src/Storage/SelectQuery.php", "new_path": "src/Storage/SelectQuery.php", "diff": "@@ -178,7 +178,7 @@ class SelectQuery implements QueryInterface\n{\n// Change all params to lowercase, filter out empty ones\n$this->params = array_filter(Arr::mapRecursive($params, function ($a) {\n- return mb_strtolower($a, 'utf-8');\n+ return mb_strtolower((string) $a, 'utf-8');\n}));\n$this->processFilters();\n" } ]
PHP
MIT License
bolt/core
Fix another instance of breakage
95,144
30.09.2020 15:50:54
-7,200
ff9cb8e3268622cc9f2ddde25f185509c488efd8
Empty image Field should return `null` instead of `files/`
[ { "change_type": "MODIFY", "old_path": "src/Entity/Field/FileExtrasTrait.php", "new_path": "src/Entity/Field/FileExtrasTrait.php", "diff": "@@ -10,8 +10,12 @@ use Symfony\\Component\\HttpFoundation\\Request;\ntrait FileExtrasTrait\n{\n- private function getPath(): string\n+ private function getPath(): ?string\n{\n+ if (empty($this->get('filename'))) {\n+ return null;\n+ }\n+\n$filesPackage = new PathPackage('/files/', new EmptyVersionStrategy());\nreturn $filesPackage->getUrl((string) $this->get('filename'));\n" }, { "change_type": "MODIFY", "old_path": "src/Entity/Field/ImageField.php", "new_path": "src/Entity/Field/ImageField.php", "diff": "@@ -39,7 +39,7 @@ class ImageField extends Field implements FieldInterface, MediaAwareInterface, C\npublic function __toString(): string\n{\n- return $this->getPath();\n+ return (string) $this->getPath();\n}\npublic function getValue(): array\n" } ]
PHP
MIT License
bolt/core
Empty image Field should return `null` instead of `files/`
95,190
01.10.2020 00:10:26
-7,200
2707e714f340cd533314d033c6fbfa526884ea63
Fixed the search/CAST for MySQL - JSON is already considered TEXT in MySQL
[ { "change_type": "MODIFY", "old_path": "config/packages/doctrine.yaml", "new_path": "config/packages/doctrine.yaml", "diff": "@@ -32,7 +32,8 @@ doctrine:\ndql:\nstring_functions:\nJSON_EXTRACT: Bolt\\Doctrine\\Functions\\JsonExtract\n- CAST: DoctrineExtensions\\Query\\Mysql\\Cast\n+ # CAST: DoctrineExtensions\\Query\\Mysql\\Cast\n+ CAST: Bolt\\Doctrine\\Query\\Cast\nnumeric_functions:\nRAND: Bolt\\Doctrine\\Functions\\Rand\n" }, { "change_type": "ADD", "old_path": null, "new_path": "src/Doctrine/Query/Cast.php", "diff": "+<?php\n+\n+// some hints from\n+// https://stackoverflow.com/questions/7405342/casting-attributes-for-ordering-on-a-doctrine2-dql-query\n+// dig into https://www.doctrine-project.org/projects/doctrine-orm/en/2.7/cookbook/advanced-field-value-conversion-using-custom-mapping-types.html\n+declare(strict_types=1);\n+\n+namespace Bolt\\Doctrine\\Query;\n+\n+use Doctrine\\ORM\\Query\\AST\\Functions\\FunctionNode;\n+use Doctrine\\ORM\\Query\\Lexer;\n+use Doctrine\\ORM\\Query\\Parser;\n+use Doctrine\\ORM\\Query\\SqlWalker;\n+\n+class Cast extends FunctionNode\n+{\n+ /** @var \\Doctrine\\ORM\\Query\\AST\\PathExpression */\n+ protected $first;\n+ /** @var string */\n+ protected $second;\n+ /** @var string */\n+ protected $backend_driver;\n+\n+ public function getSql(SqlWalker $sqlWalker): string\n+ {\n+ $backend_driver = $sqlWalker->getConnection()->getDriver()->getName();\n+ // test if we are using MySQL\n+ if (mb_strpos($backend_driver, 'mysql') !== false) {\n+ // how do we know what type $this->first is? For now hardcoding\n+ // type(t.value) = JSON for MySQL. JSONB for others.\n+ // alternatively, test if true: $this->first->dispatch($sqlWalker)==='b2_.value'\n+ if ($this->first->identificationVariable === 't' && $this->first->field === 'value' && $this->second === 'TEXT') {\n+ return $this->first->dispatch($sqlWalker);\n+ }\n+ }\n+\n+ return sprintf('CAST(%s AS %s)',\n+ $this->first->dispatch($sqlWalker),\n+ $this->second\n+ );\n+ }\n+\n+ public function parse(Parser $parser): void\n+ {\n+ $parser->match(Lexer::T_IDENTIFIER);\n+ $parser->match(Lexer::T_OPEN_PARENTHESIS);\n+ $this->first = $parser->ArithmeticPrimary();\n+ $parser->match(Lexer::T_AS);\n+ $parser->match(Lexer::T_IDENTIFIER);\n+ $this->second = $parser->getLexer()->token['value'];\n+ $parser->match(Lexer::T_CLOSE_PARENTHESIS);\n+ }\n+}\n" }, { "change_type": "MODIFY", "old_path": "src/Repository/ContentRepository.php", "new_path": "src/Repository/ContentRepository.php", "diff": "@@ -94,6 +94,10 @@ class ContentRepository extends ServiceEntityRepository\n$qb = $this->getQueryBuilder()\n->select('partial content.{id}');\n+ // For PostgreSQL we need to CAST the jsonb to text. For SQLite this is not required but also works\n+ // For mysql however, an error is thrown. the JSON can be directly searched without CAST.\n+ // So, there is need for a custom CAST function, which reacts when json/b is casted to text\n+ // this can probably be more efficient by a seperate ->Cast implementation\n$qb->addSelect('f')\n->innerJoin('content.fields', 'f')\n->innerJoin('f.translations', 't')\n" } ]
PHP
MIT License
bolt/core
Fixed the search/CAST for MySQL - JSON is already considered TEXT in MySQL
95,190
01.10.2020 00:56:23
-7,200
c68e6d5516077587f69185ef18be8af3a71cb240
found strange bug, partial fix
[ { "change_type": "MODIFY", "old_path": "templates/helpers/_field_blocks.twig", "new_path": "templates/helpers/_field_blocks.twig", "diff": "{% block extended_fields %}\n{# Special case for 'select' fields: if it's a multiple select, the field is an array. #}\n+ {# I dont know what is going on here, but field.selectedIds for pgsql showcase/mr-jean-feeney (and others) #}\n+ {# yield field values, NOT integer IDs.. Also, selectedIds does not exists (try dump(field) ) #}\n+ {# TODO: FIX IT, bypassing for now by setting field.id #}\n{% if type == \"select\" and field is not empty %}\n<p><strong>{{ field|label }}: </strong></p>\n<ul>\n{% if field.contentSelect %}\n- {% setcontent selected = field.contentType where {'id': field.selectedIds} %}\n+ {% setcontent selected = field.contentType where {'id': field.id} %}\n{% for record in selected %}\n<li><a href=\"{{ record|link }}\">{{ record|title }}</a></li>\n{% endfor %}\n" } ]
PHP
MIT License
bolt/core
found strange bug, partial fix
95,190
02.10.2020 12:54:55
-7,200
4ac9bb8653093984e956d5bc6d6995f18db10e04
Lower is breaking more than gaining
[ { "change_type": "MODIFY", "old_path": "src/Storage/SelectQuery.php", "new_path": "src/Storage/SelectQuery.php", "diff": "@@ -535,7 +535,10 @@ class SelectQuery implements QueryInterface\n// LOWER() added to query to enable case insensitive search of JSON values. Used in conjunction with converting $params of setParameter() to lowercase.\n// BUG SQLSTATE[42883]: Undefined function: 7 ERROR: function lower(jsonb) does not exist\n// We want to be able to search case-insensitive, database-agnostic\n- $valueAlias = mb_strtolower($valueAlias);\n+ // NO, this causes another problems:\n+ // [Semantical Error] line 0, col 373 near 'translations_anyfield.value': Error: 'translations_anyfield' is not defined.\n+ // --> should be: translations_anyField! capital F. (while searching in https://../bolt/?filter=css)\n+ // $valueAlias = mb_strtolower($valueAlias);\n$newLeftExpression = JsonHelper::wrapJsonFunction($valueAlias, null, $em->getConnection());\n$valueWhere = $filter->getExpression();\n$valueWhere = str_replace($originalLeftExpression, $newLeftExpression, $valueWhere);\n" } ]
PHP
MIT License
bolt/core
Lower is breaking more than gaining
95,144
02.10.2020 16:37:57
-7,200
82578dc9f7074b1f5bd150356957505af6025ba4
Better feedback when `|related` and their ilk fail
[ { "change_type": "MODIFY", "old_path": "src/Twig/RelatedExtension.php", "new_path": "src/Twig/RelatedExtension.php", "diff": "@@ -29,12 +29,16 @@ class RelatedExtension extends AbstractExtension\n/** @var ContentHelper */\nprivate $contentHelper;\n- public function __construct(RelationRepository $relationRepository, Config $config, Query $query, ContentHelper $contentHelper)\n+ /** @var Notifications */\n+ private $notifications;\n+\n+ public function __construct(RelationRepository $relationRepository, Config $config, Query $query, ContentHelper $contentHelper, Notifications $notifications)\n{\n$this->relationRepository = $relationRepository;\n$this->config = $config;\n$this->query = $query;\n$this->contentHelper = $contentHelper;\n+ $this->notifications = $notifications;\n}\n/**\n@@ -70,6 +74,10 @@ class RelatedExtension extends AbstractExtension\n*/\npublic function getRelatedContentByType(Content $content, bool $bidirectional = true, ?int $limit = null, bool $publishedOnly = true): array\n{\n+ if (! $this->checkforContent($content, 'related_by_type')) {\n+ return [];\n+ }\n+\n$relations = $this->relationRepository->findRelations($content, null, $bidirectional, $limit, $publishedOnly);\nreturn (new Collection($relations))\n@@ -89,8 +97,12 @@ class RelatedExtension extends AbstractExtension\n/**\n* @return Content[]\n*/\n- public function getRelatedContent(Content $content, ?string $name = null, bool $bidirectional = true, ?int $limit = null, bool $publishedOnly = true): array\n+ public function getRelatedContent($content, ?string $name = null, bool $bidirectional = true, ?int $limit = null, bool $publishedOnly = true): array\n{\n+ if (! $this->checkforContent($content, 'related')) {\n+ return [];\n+ }\n+\n$relations = $this->relationRepository->findRelations($content, $name, $bidirectional, $limit, $publishedOnly);\nreturn (new Collection($relations))\n@@ -101,8 +113,12 @@ class RelatedExtension extends AbstractExtension\n->toArray();\n}\n- public function getFirstRelatedContent(Content $content, ?string $name = null, bool $bidirectional = true, bool $publishedOnly = true): ?Content\n+ public function getFirstRelatedContent($content, ?string $name = null, bool $bidirectional = true, bool $publishedOnly = true): ?Content\n{\n+ if (! $this->checkforContent($content, 'related_first')) {\n+ return null;\n+ }\n+\n$relation = $this->relationRepository->findFirstRelation($content, $name, $bidirectional, $publishedOnly);\nif ($relation === null) {\n@@ -164,6 +180,10 @@ class RelatedExtension extends AbstractExtension\npublic function getRelatedValues(Content $source, string $contentType): Collection\n{\n+ if (! $this->checkforContent($source, 'related_values')) {\n+ return new Collection([]);\n+ }\n+\nif ($source->getId() === null) {\nreturn new Collection([]);\n}\n@@ -179,4 +199,18 @@ class RelatedExtension extends AbstractExtension\nreturn new Collection($values);\n}\n+\n+ private function checkforContent($content, string $keyword): bool\n+ {\n+ if (! $content instanceof Content) {\n+ $this->notifications->warning(\n+ 'Incorrect usage of `' . $keyword . '`-filter or function',\n+ 'The `' . $keyword . '`-filter or function can only be applied to a single Record.'\n+ );\n+\n+ return false;\n+ }\n+\n+ return true;\n+ }\n}\n" } ]
PHP
MIT License
bolt/core
Better feedback when `|related` and their ilk fail
95,144
02.10.2020 16:42:28
-7,200
77ba879f868379e593bd89f757ff725df739788d
Update notification.html.twig
[ { "change_type": "MODIFY", "old_path": "templates/_partials/notification.html.twig", "new_path": "templates/_partials/notification.html.twig", "diff": "<abbr title=\"{{ frame.class }}\">\n{{- frame.class|split('\\\\')|last()|excerpt(24) -}}</abbr>{{- frame.type -}}\n{%- endif -%}\n- <strong>{{- frame.function -}}()</strong></code>{% if frame.line|default() %} - line {{ frame.line }}{% endif %}\n+ <strong>{{- frame.function -}}()</strong>\n+ </code>{% if prevline|default() %} - line {{ prevline }}{% endif %}\n+ {% set prevline = frame.line|default() %}\n</li>\n{% endfor %}\n</ul>\n" } ]
PHP
MIT License
bolt/core
Update notification.html.twig
95,115
03.10.2020 15:32:50
-7,200
d571d729213ea39c0d56bce64abc2721c04dd5ef
reset password command is in the documentation (https://github.com/bolt/docs/blob/4.0/docs/howto/resetting-a-password.md), but not in the code. This is a simple version. Differences to the documentation: you have to specify the username (e-mail not possible) and you get the option of specifying a password yourself.
[ { "change_type": "ADD", "old_path": null, "new_path": "src/Command/ResetPasswordCommand.php", "diff": "+<?php\n+\n+namespace App\\Command;\n+\n+use Bolt\\Common\\Str;\n+use Bolt\\Entity\\User;\n+use Bolt\\Repository\\UserRepository;\n+use Doctrine\\ORM\\EntityManagerInterface;\n+use Symfony\\Component\\Console\\Command\\Command;\n+use Symfony\\Component\\Console\\Exception\\InvalidArgumentException;\n+use Symfony\\Component\\Console\\Input\\InputArgument;\n+use Symfony\\Component\\Console\\Input\\InputInterface;\n+use Symfony\\Component\\Console\\Input\\InputOption;\n+use Symfony\\Component\\Console\\Output\\OutputInterface;\n+use Symfony\\Component\\Console\\Question\\Question;\n+use Symfony\\Component\\Console\\Style\\SymfonyStyle;\n+use Symfony\\Component\\Security\\Core\\Encoder\\UserPasswordEncoderInterface;\n+use Symfony\\Component\\Validator\\Validator\\ValidatorInterface;\n+\n+/**\n+ * Resets password for the user with the specified username.\n+ *\n+ * @package App\\Command\n+ */\n+class ResetPasswordCommand extends Command\n+{\n+ protected static $defaultName = 'bolt:reset-password';\n+\n+ /** @var EntityManagerInterface */\n+ private $entityManager;\n+\n+ /** @var UserPasswordEncoderInterface */\n+ private $passwordEncoder;\n+\n+ /** @var ValidatorInterface */\n+ private $validator;\n+\n+ /** @var UserRepository */\n+ private $userRepository;\n+\n+ public function __construct(EntityManagerInterface $em, UserPasswordEncoderInterface $encoder,\n+ UserRepository $userRepository, ValidatorInterface $validator)\n+ {\n+ parent::__construct();\n+\n+ $this->entityManager = $em;\n+ $this->passwordEncoder = $encoder;\n+ $this->validator = $validator;\n+ $this->userRepository = $userRepository;\n+ }\n+\n+ protected function configure()\n+ {\n+ $this\n+ ->setDescription('Reset password for a user.')\n+ ->addArgument('username', InputArgument::REQUIRED, 'User name')\n+ ;\n+ }\n+\n+ protected function execute(InputInterface $input, OutputInterface $output): int\n+ {\n+ $io = new SymfonyStyle($input, $output);\n+ $username = $input->getArgument('username');\n+\n+ /** @var User $user */\n+ $user = $this->userRepository->findOneBy(['username' => $username]);\n+\n+ if (!$user) {\n+ $io->error(sprintf('No user found with username: %s', $username));\n+ return Command::FAILURE;\n+ }\n+\n+ $io->note(sprintf('Changing password for user: %s', $username));\n+\n+ $passwordQuestion = new Question('Password (input is hidden)', Str::generatePassword());\n+ $passwordQuestion->setHidden(true);\n+ $passwordQuestion->setValidator(function (?string $password) {\n+ $errors = $this->validator->validatePropertyValue(User::class, 'plainPassword', $password);\n+ if ($errors->count() > 0) {\n+ throw new InvalidArgumentException($errors->get(0)->getMessage());\n+ }\n+\n+ return $password;\n+ });\n+\n+ $plainPassword = $io->askQuestion($passwordQuestion);\n+\n+ $user->setPlainPassword($plainPassword);\n+\n+ // See https://symfony.com/doc/current/book/security.html#security-encoding-password\n+ $encodedPassword = $this->passwordEncoder->encodePassword($user, $user->getPlainPassword());\n+ $user->setPassword($encodedPassword);\n+ $user->eraseCredentials();\n+\n+ $this->entityManager->persist($user);\n+ $this->entityManager->flush();\n+\n+ $io->success('Updated password.');\n+\n+ return Command::SUCCESS;\n+ }\n+}\n" } ]
PHP
MIT License
bolt/core
reset password command is in the documentation (https://github.com/bolt/docs/blob/4.0/docs/howto/resetting-a-password.md), but not in the code. This is a simple version. Differences to the documentation: you have to specify the username (e-mail not possible) and you get the option of specifying a password yourself.
95,115
03.10.2020 17:54:11
-7,200
eca804da4b90ef8c26118ca3688a4c541b0c0875
Small updates based on review and code analysis.
[ { "change_type": "MODIFY", "old_path": "src/Command/ResetPasswordCommand.php", "new_path": "src/Command/ResetPasswordCommand.php", "diff": "<?php\n+declare(strict_types=1);\n+\nnamespace Bolt\\Command;\nuse Bolt\\Common\\Str;\n@@ -10,7 +12,6 @@ use Symfony\\Component\\Console\\Command\\Command;\nuse Symfony\\Component\\Console\\Exception\\InvalidArgumentException;\nuse Symfony\\Component\\Console\\Input\\InputArgument;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\n-use Symfony\\Component\\Console\\Input\\InputOption;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\nuse Symfony\\Component\\Console\\Question\\Question;\nuse Symfony\\Component\\Console\\Style\\SymfonyStyle;\n@@ -19,8 +20,6 @@ use Symfony\\Component\\Validator\\Validator\\ValidatorInterface;\n/**\n* Resets password for the user with the specified username.\n- *\n- * @package App\\Command\n*/\nclass ResetPasswordCommand extends Command\n{\n@@ -49,11 +48,11 @@ class ResetPasswordCommand extends Command\n$this->userRepository = $userRepository;\n}\n- protected function configure()\n+ protected function configure(): void\n{\n$this\n->setDescription('Reset password for a user.')\n- ->addArgument('username', InputArgument::REQUIRED, 'User name')\n+ ->addArgument('username', InputArgument::REQUIRED, 'Username of the user')\n;\n}\n@@ -65,7 +64,7 @@ class ResetPasswordCommand extends Command\n/** @var User $user */\n$user = $this->userRepository->findOneBy(['username' => $username]);\n- if (!$user) {\n+ if ($user === null) {\n$io->error(sprintf('No user found with username: %s', $username));\nreturn Command::FAILURE;\n}\n" } ]
PHP
MIT License
bolt/core
Small updates based on review and code analysis.
95,170
03.10.2020 12:46:02
18,000
8f0ee432a8be8b7d68433f90d2e3257f78240326
Fixing Coding Standard issues for previous commit
[ { "change_type": "MODIFY", "old_path": "src/Controller/ImageController.php", "new_path": "src/Controller/ImageController.php", "diff": "@@ -174,7 +174,8 @@ class ImageController\nreturn array_key_exists('extension', $pathinfo) && in_array($pathinfo['extension'], $imageExtensions, true);\n}\n- private function testFit(string $fit): bool {\n+ private function testFit(string $fit): bool\n+ {\nreturn (bool) preg_match('/^(contain|max|fill|stretch|crop)(-.+)?/', $fit);\n}\n" } ]
PHP
MIT License
bolt/core
Fixing Coding Standard issues for previous commit
95,115
03.10.2020 19:47:26
-7,200
31119721b226832cfacc6b8a763c342ce7ef2b03
fix annotation to hint that 'null' is a possible value
[ { "change_type": "MODIFY", "old_path": "src/Command/ResetPasswordCommand.php", "new_path": "src/Command/ResetPasswordCommand.php", "diff": "@@ -61,7 +61,7 @@ class ResetPasswordCommand extends Command\n$io = new SymfonyStyle($input, $output);\n$username = $input->getArgument('username');\n- /** @var User $user */\n+ /** @var User|null */\n$user = $this->userRepository->findOneBy(['username' => $username]);\nif ($user === null) {\n" } ]
PHP
MIT License
bolt/core
fix @var annotation to hint that 'null' is a possible value
95,170
03.10.2020 13:15:20
18,000
a9f486d32506aacb6a678f6117d6dd13eea0d89a
Fixing Coding Standard issues
[ { "change_type": "MODIFY", "old_path": "src/Controller/ImageController.php", "new_path": "src/Controller/ImageController.php", "diff": "@@ -146,7 +146,6 @@ class ImageController\nif (isset($raw[3])) {\n$this->parameters['fit'] = $this->parseFit($raw[2]);\n$this->parameters['location'] = $raw[3];\n-\n} elseif (isset($raw[2])) {\n$posible_fit = $this->parseFit($raw[2]);\n" } ]
PHP
MIT License
bolt/core
Fixing Coding Standard issues
95,115
03.10.2020 20:25:30
-7,200
c027191895c2b67561f86334538a014ebc8c2819
insert blank line before return to make cscheck happy :-)
[ { "change_type": "MODIFY", "old_path": "src/Command/ResetPasswordCommand.php", "new_path": "src/Command/ResetPasswordCommand.php", "diff": "@@ -66,6 +66,7 @@ class ResetPasswordCommand extends Command\nif ($user === null) {\n$io->error(sprintf('No user found with username: %s', $username));\n+\nreturn Command::FAILURE;\n}\n" } ]
PHP
MIT License
bolt/core
insert blank line before return to make cscheck happy :-)