Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e2b45f5
feat: php >= 8.1, node 20 or 22, be 5
didoda Dec 3, 2024
7d96a26
chore doc: update README.md
didoda Dec 3, 2024
03b0ffe
feat: php 8.4
didoda Dec 3, 2024
511decf
fix: remove php 8.4 support
didoda Dec 3, 2024
c9e7456
feat: php 8.1
didoda Dec 3, 2024
1c0cb4b
feat: update dependencies
didoda Dec 3, 2024
7d9f7c5
feat: webtools 5.0.1
didoda Dec 3, 2024
f519f80
refactor: clone
didoda Dec 3, 2024
ebdb69e
chore refactor: uname function
didoda Dec 3, 2024
3586178
tests: testClone
didoda Dec 3, 2024
f9693cc
feat: add dist branch 4.x
didoda Dec 4, 2024
ea5b4e6
refactor: rename query string
didoda Dec 4, 2024
ada1d3d
tests: testClone query
didoda Dec 4, 2024
1156d42
chore fix: update .gitignore
didoda Dec 4, 2024
061f290
feat: bump dotenv to v4
didoda Dec 5, 2024
93d2f13
fix: bootstrap order
didoda Dec 5, 2024
e486afe
tests: ModulesController testDeleteError
didoda Dec 5, 2024
57b429e
chore refactor: delete redirect on error
didoda Dec 5, 2024
448279c
refactor: remove streams + tests
didoda Dec 5, 2024
a1ed0fa
feat: bump league flysystem to 3.16
didoda Dec 5, 2024
a939283
feat: update js libs
didoda Dec 5, 2024
e15c9b3
fix: dist branches master and 4.x
didoda Dec 5, 2024
44fe6d9
fix: allowed minimum API 5.36.0
didoda Dec 5, 2024
bc91763
chore fix: remove unused import
didoda Dec 5, 2024
25456c9
feat: php 8.3
didoda Dec 5, 2024
ba305d1
tests: fix be 4 not available
didoda Dec 5, 2024
1b0ed79
fix: scrutinizer php 8.2
didoda Dec 5, 2024
81e702b
fix: scrutinizer php 8.3.3
didoda Dec 5, 2024
a6c69c5
test: tuning scrutinizer
didoda Dec 5, 2024
974994b
test: tuning scrutinizer
didoda Dec 5, 2024
037ede1
test: tuning scrutinizer
didoda Dec 5, 2024
58138e7
test: tuning scrutinizer
didoda Dec 5, 2024
178c429
feat: tree show number of checked parents
didoda Dec 6, 2024
37c7094
feat: bump i18n and web-tools
didoda Dec 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x, 22.x]
node-version: [20.x, 22.x]

steps:
- name: Checkout current revision
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
paths:
- '**/*.php'
- '.github/workflows/php.yml'
- '.scrutinizer.yml'
- 'composer.json'
- 'phpcs.xml.dist'
- 'phpstan.neon.dist'
Expand All @@ -13,6 +14,7 @@ on:
paths:
- '**/*.php'
- '.github/workflows/php.yml'
- '.scrutinizer.yml'
- 'composer.json'
- 'phpcs.xml.dist'
- 'phpstan.neon.dist'
Expand All @@ -34,16 +36,9 @@ jobs:
with:
php_versions: '["8.3"]'

unit-4:
uses: bedita/github-workflows/.github/workflows/php-unit.yml@v2
with:
php_versions: '["7.4", "8.1", "8.2", "8.3"]'
bedita_version: '4'
coverage_min_percentage: 98

unit-5:
uses: bedita/github-workflows/.github/workflows/php-unit.yml@v2
with:
php_versions: '["7.4", "8.1", "8.2", "8.3"]'
php_versions: '["8.3"]'
bedita_version: '5'
coverage_min_percentage: 98
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: bedita/github-workflows/.github/workflows/release.yml@v2
with:
main_branch: 'master'
dist_branches: '["master", "3.x"]'
dist_branches: '["master", "4.x"]'
version_bump: ${{ inputs.releaseType }}
version_ini_path: config/version.ini
version_ini_prefix: "[Manager]\nversion="
Expand Down
42 changes: 3 additions & 39 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,45 +66,9 @@ bundle-report.*.html
# bundle files
/webroot/bundle-report
/webroot/*.hot-update.*
/webroot/vendors/async/*.hot-update.*
/webroot/css/admin-index*
/webroot/css/admin-statistics*
/webroot/css/app*
/webroot/css/category*
/webroot/css/date-range*
/webroot/css/date-input*
/webroot/css/edit-children-params*
/webroot/css/email-input*
/webroot/css/flash-message*
/webroot/css/folder-picker*
/webroot/css/import-result*
/webroot/css/index-cell*
/webroot/css/labels-form*
/webroot/css/map-view*
/webroot/css/menu*
/webroot/css/object-categories*
/webroot/css/object-nav*
/webroot/css/object-captions*
/webroot/css/object-property*
/webroot/css/objects-history*
/webroot/css/permission*
/webroot/css/placeholder-list*
/webroot/css/property-view*
/webroot/css/roles-list-view*
/webroot/css/secret*
/webroot/css/show-hide*
/webroot/css/string-list*
/webroot/css/system-info*
/webroot/css/tag-form*
/webroot/css/tag-picker*
/webroot/css/thumbnail*
/webroot/css/trash-view*
/webroot/css/uri-input*
/webroot/css/user-accesses*
/webroot/css/vendors*
/webroot/css/*.lazy.css
/webroot/css/**/*.map
/webroot/css/vendors/async
/webroot/css/*
!/webroot/css/be-icons-codes.css
!/webroot/css/be-icons-font.css
/webroot/js/*.js
/webroot/js/vendors
/webroot/manifest.json
6 changes: 2 additions & 4 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ filter:
build:
image: default-jammy
environment:
node: v18
node: v22
nodes:
analysis:
environment:
php:
version: 8.2
pecl_extensions:
- zip
version: 8.3.3
tests:
override:
- php-scrutinizer-run
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PHP_VERSION=8.1
ARG PHP_VERSION=8.3
FROM chialab/php:${PHP_VERSION}-apache

# Install Wait-for-it and configure PHP
Expand All @@ -10,9 +10,9 @@
COPY . /var/www/html

# Set APP_NAME to avoid .env load
ENV APP_NAME BE-MANAGER

Check warning on line 13 in Dockerfile

View workflow job for this annotation

GitHub Actions / docker_push

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ARG DEBUG
ENV DEBUG ${DEBUG:-false}

Check warning on line 15 in Dockerfile

View workflow job for this annotation

GitHub Actions / docker_push

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

# Install libraries
WORKDIR /var/www/html
Expand All @@ -26,7 +26,7 @@
USER root:root

# Install node and yarn
ENV NODE_VERSION=18.12.0
ENV NODE_VERSION=22.11.0
RUN apt install -y curl
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
ENV NVM_DIR=/root/.nvm
Expand Down
40 changes: 2 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Backend Manager for [BEdita API](https://gihub.com/bedita/bedita).

## Prerequisites

* [PHP](https://www.php.net/) 7.4, 8.0, 8.1, 8.2 and 8.3 supported
* [PHP](https://www.php.net/) >= 8.3
* [Composer](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx)
* [Node](https://nodejs.org) >= 16
* [Node](https://nodejs.org) >= 20
* [Yarn](https://yarnpkg.com) >= 1.15

## Install
Expand Down Expand Up @@ -62,42 +62,6 @@ You can further configure your BEdita Manager instance in `config/app_local.php`

Have look at the main [Manager configuration wiki page](https://github.com/bedita/manager/wiki/Manager-App-Configuration) on how to customize your Manager instance.

## Docker

### Pull official image

Get latest offical image build from Docker Hub

```bash
docker pull bedita/manager:4
```

### Build image

If you want to build an image from local sources you can do it like this from root folder:

```bash

docker build -t manager-local .

```

You may of course choose whatever name you like for the generated image instead of `manager-local`.

### Run

Run a Docker image setting API base url and API KEY like this:

```bash

docker run -p 8080:80 \
--env BEDITA_API={bedita-api-url} --env BEDITA_API_KEY={bedita-api-key} \
bedita/manager:latest

```

Replace `bedita/manager:latest` with `manager-local` (or other chosen name) to lanch a local built image.

## JS Development with webpack

### Using .env
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
}
],
"require": {
"php": ">=7.4",
"bedita/i18n": "^4.4.3",
"bedita/web-tools": "^4.0.2",
"php": ">=8.3",
"bedita/i18n": "^5.1.0",
"bedita/web-tools": "^5.1.0",
"cakephp/authentication": "^2.9",
"cakephp/cakephp": "~4.5.0",
"cakephp/plugin-installer": "^1.3",
"josegonzalez/dotenv": "^3.2",
"league/flysystem": "^2.5",
"josegonzalez/dotenv": "^4.0",
"league/flysystem": "^3.16",
"league/oauth2-github": "^3.0",
"league/oauth2-google": "^4.0",
"mobiledetect/mobiledetectlib": "^2.8",
Expand All @@ -44,9 +44,9 @@
"cakephp/repl": "^0.1",
"dereuromark/cakephp-ide-helper": "~1.17.0",
"phpstan/extension-installer": "^1.2",
"phpstan/phpstan": "^1.8.2",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpunit/phpunit": "^9.5",
"phpunit/phpunit": "^9.6",
"vimeo/psalm": "^5.18"
},
"autoload": {
Expand Down
9 changes: 1 addition & 8 deletions config/app_local.example.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,29 +72,22 @@
* Rules are defined as `object type name` => ['reset' => [], 'unique' => []]
* where:
* - `reset` is an array of fields to reset => unset
* - `unique` is an array of fields that must be unique => add `-<timestamp>` to val
* Example:
* 'users' => [
* 'reset' => [
* 'name', 'surname', 'address',
* ],
* 'unique' => [
* 'email',
* ],
* ],
* will reset `name`, `surname` and `address` fields and add `-<timestamp>` to `email` field
* when cloning a user object.
* Note: `reset` and `unique` are optional.
* Note: `reset` is optional.
*/
// 'Clone' => [
// // ...
// 'users' => [
// 'reset' => [
// 'name', 'surname', 'address',
// ],
// 'unique' => [
// 'email',
// ],
// ],
// // ...
// ],
Expand Down
3 changes: 1 addition & 2 deletions config/bedita-api-version.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
[BEditaAPI]
versions[]=4.13.0
versions[]=5.13.0
versions[]=5.36.0
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
"@chialab/typos": "^0.1.1",
"@riophae/vue-treeselect": "^0.4.0",
"@trevoreyre/autocomplete-vue": "^2.4.1",
"abortcontroller-polyfill": "^1.7.1",
"abortcontroller-polyfill": "^1.7.6",
"autosize": "^5.0.1",
"axios": "^1.7.4",
"chart.js": "^4.4.4",
"axios": "^1.7.9",
"chart.js": "^4.4.7",
"codemirror": "^5.63.3",
"deepmerge": "^4.3.0",
"dotenv-webpack": "^8.0.1",
Expand All @@ -45,34 +45,34 @@
"ttag": "^1.7.24",
"vanilla-jsoneditor": "^0.14.4",
"vue": "^2.5.16",
"vue-chartjs": "^5.3.1",
"vue-chartjs": "^5.3.2",
"vuejs-title": "^1.0.16",
"webpack-manifest-plugin": "^5.0.0",
"webvtt-parser": "^2.2.0"
},
"devDependencies": {
"@babel/core": "^7.20.12",
"@babel/core": "^7.26.0",
"@babel/plugin-syntax-dynamic-import": "^7.7.4",
"@babel/preset-env": "^7.15.8",
"@babel/preset-env": "^7.26.0",
"@iconify/vue2": "^2.1.0",
"babel-loader": "^8.0.6",
"browser-sync": "^2.27.10",
"browser-sync-webpack-plugin": "^2.3.0",
"css-loader": "^6.4.0",
"css-minimizer-webpack-plugin": "^3.1.1",
"eslint-plugin-vue": "^9.12.0",
"eslint-plugin-vue": "^9.32.0",
"gettext-parser": "^4.0.2",
"json-loader": "^0.5.7",
"mini-css-extract-plugin": "^2.4.2",
"mini-css-extract-plugin": "^2.9.2",
"moment-locales-webpack-plugin": "^1.0.7",
"sass": "^1.58.0",
"sass": "^1.82.0",
"sass-loader": "^12.2.0",
"svg-url-loader": "^7.1.1",
"ttag-cli": "^1.9.2",
"vue-loader": "^15.10.1",
"vue-template-compiler": "^2.5.16",
"webpack": "^5.94.0",
"webpack": "^5.97.0",
"webpack-cli": "^4.9.0",
"webpack-watch-files-plugin": "^1.2.0"
}
}
}
4 changes: 2 additions & 2 deletions resources/js/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ const _vueInstance = new Vue({
for (const uitem of options?.unique || []) {
query += `&${uitem.field}=${uitem.value}`;
}
query += `&cloneRelations=${options?.relations || false}`;
query += `&cloneTranslations=${options?.translations || false}`;
query += `&relationships=${options?.relations || false}`;
query += `&translations=${options?.translations || false}`;
const origin = window.location.origin;
const path = window.location.pathname.replace('/view/', '/clone/');
const url = `${origin}${path}${query}`;
Expand Down
6 changes: 6 additions & 0 deletions resources/js/app/components/property-view/property-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export default {
fileChanged: false,
searchInPosition: '',
searchInPositionActive: false,
positions: [],
}
},

Expand Down Expand Up @@ -255,5 +256,10 @@ export default {
onSearchInPositionActive(e) {
this.searchInPositionActive = e.target.checked ? true : false;
},

updatePositions(n) {
this.positions = n;
this.$forceUpdate();
},
}
}
2 changes: 2 additions & 0 deletions resources/js/app/components/tree-view/tree-view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ export default {
this.loadingCounter++;
this.loadingMainMessage = this.msgLoadingBranchesForPosition + `: ${this.loadingCounter} / ${this.totalCounter}`;
}
this.$emit('changed-parents', this.parents);

return Promise.all(included);
},
Expand Down Expand Up @@ -611,6 +612,7 @@ export default {
arr.push(folderId);
}
document.getElementById('changedParents').value = arr.join(',');
this.$emit('changed-parents', this.parents);
},

foundIn(item) {
Expand Down
1 change: 1 addition & 0 deletions src/Command/TranslateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public function execute(Arguments $args, ConsoleIo $io): int

return self::CODE_ERROR;
}
// debug
$o = (string)($args->getOption('output') ?? $args->getOption('o'));
$f = (string)($args->getOption('from') ?? $args->getOption('f'));
$t = (string)($args->getOption('to') ?? $args->getOption('t'));
Expand Down
8 changes: 1 addition & 7 deletions src/Controller/Component/CategoriesComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
namespace App\Controller\Component;

use App\Utility\CacheTools;
use App\Utility\System;
use BEdita\WebTools\ApiClientProvider;
use Cake\Cache\Cache;
use Cake\Controller\Component;
Expand Down Expand Up @@ -160,12 +159,7 @@ protected function fillRoots(array &$roots, $category): void
public function getAllAvailableRoots(): array
{
$roots = ['' => ['id' => 0, 'label' => '-', 'name' => '', 'object_type_name' => '']];
$options = ['page_size' => self::DEFAULT_PAGE_SIZE];
$actualApiVersion = Hash::get((array)$this->getController()->viewBuilder()->getVar('project'), 'version');
// BE APIs provide roots filter from version 5.27.0
if (System::compareBEditaApiVersion($actualApiVersion, '5.27.0')) {
$options['filter']['roots'] = 1;
}
$options = ['page_size' => self::DEFAULT_PAGE_SIZE, 'filter' => ['roots' => 1]];
$pageCount = $page = 1;
$endpoint = '/model/categories';
while ($page <= $pageCount) {
Expand Down
Loading
Loading