Skip to content

Commit 6a4a839

Browse files
authored
Releasing 2.0.0 into master (manually) (#859)
* Apply fixes from StyleCI * remove extra spaces from Response Content-Type * enhanced only call server when using expression in row. * code review review hasExpression function * First scratch for multiline Documentation * add semantic-ui-vue in atkjs bundle * update webpack configuration * Better draft, formatting and Screenshots follow * Add some formatting * Update Formatting * Add Multiline Screenshots * Fix Link to Screenshot * Add ability to customize CSS of 'content' div * Add Documentation for addContentCss() feature * Added Expressions, onLineChange() * Chapter "Changing appearance" * Improve formatting * update doc * add "Is Not" for TableColumn::FilterModel::TypeString * StyleCI * changed Css to CSS (similarly how we use e.g. renderJS) * add demo * Apply fixes from StyleCI * Add a Scrolling Modal * minor fix change function name. * remove useSuiVue Now include in Bundle * fix/CaughException Layout - When children App is created * Bump eslint-utils from 1.4.0 to 1.4.2 in /js Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.4.0 to 1.4.2. - [Release notes](https://github.com/mysticatea/eslint-utils/releases) - [Commits](mysticatea/eslint-utils@v1.4.0...v1.4.2) Signed-off-by: dependabot[bot] <support@github.com> * Update to changes in Modal.php * add ignore E_DEPRECATED & E_USER_DEPRECATED * add App->catch_error_types to define error types in set_error_handler * fix/#802 Array fields error in form * Apply fixes from StyleCI * Fix #8ß5 * Allow to add Attributes to <input> tag New property added: $this->inputAttr in which additional attributes are stored New function added: setInputAttr() which is a clone of View->setAttr() which fills the $this->inputAttr array Can also be used to overwrite existing attributes as $this->inputAttr is passed as second param to array_merge (at $this->app->getTag()) * update to use inputAttr * update to use inputAttr * update to use inputAttr * update to use inputAttr * style CI fixes * styleCI fixes * Add demo for custom <input> Attributes * add another demo field which uses array definition * Update TypeText.php to pass check * Fix autocomplete.html * Fix lookup.html * Fix autocomplete.pug * Fix lookup.pug * init - add jsCallback when adding or deleting a row. * feature/TreeItemSelector Form Field Initial commit * Apply fixes from StyleCI * Make Escape key clear Grid Search * feature/MultiLine Enhancement - Ability to run js when adding or deleting row. - Add new line of record when tabbing out of the last row/column * Apply fixes from StyleCI * start implementation * Apply fixes from StyleCI * remove test * changed example for ibelar * Apply fixes from StyleCI * some more notes wip * Apply fixes from StyleCI * test * Mutliline: Improve inline docs and comments (#811) * Improve inline docs and comments * Update MultiLine.php * initial testing * Fix #814 - useless code in Form.php (#818) * Fix #814 - useless code in Form.php * Update Form.php * Add Locale class * Apply fixes from StyleCI * add LocaleTest * Apply fixes from StyleCI * Update LocaleTest.php * Add credits to Lokalize services * Create .empty * Delete .empty * Fix Locale.php * refactor * code review and refactor * Apply fixes from StyleCI * updare demo * type hint and cleanup * Apply fixes from StyleCI * js cleanup and comment * add more demo * Typo. * update userAction move loader set function to jsRender so we could apply afterSuccess or jsSuccess after setAction is done. Add jsSuccess and stateContext * Apply fixes from StyleCI * fix * Feature/fix textarea (#822) * fix TextArea and DropDown zero and empty values * Apply fixes from StyleCI * Enhance Form Testing suite * Apply fixes from StyleCI * fix * fix * #823: Fix a few phpDoc comments. (#824) * #823: Fix a few phpDoc comments. * #824: Lowercase @inheritdoc . * update - include web storage for ajaxexec - code refactoring * fix modal service * update modal service * fix/DropDown unnecessary property Remove unneccessary property isValueRequired for dropdown formfield and rely on field property required instead. * update ajaexec.plugin add demos/test to gitignore * remove unused comment * update button placement and state * remove jsEvent executor from UserAction Action that required an event must be expicitly set using jsEvent * Apply fixes from StyleCI * add exception handler * Apply fixes from StyleCI * update demos * added jsExecute() * Apply fixes from StyleCI * cleanup * check for exception in each jsSubmit step * Apply fixes from StyleCI * Feature/Refactor On method Allow for on method to receive a Model UserAction as second arguments. * Apply fixes from StyleCI * Table columns support user action now * Apply fixes from StyleCI * forgot the demo * Apply fixes from StyleCI * update - Create new Class jsUserAction based on existing jsCallback - remove jsEvent executor from demos - set demos using new jsUserAction - update View method to use new jsUserAction * Apply fixes from StyleCI * Code review Add comments clean up. * Apply fixes from StyleCI * update comment * test * fix test uri for jsactions.php demo * init * merge changed * Apply fixes from StyleCI * update View::on() Add ability to setup apiConfig for jsCallback. * updated Fix dropdown when place inside a column table. * Apply fixes from StyleCI * fix typo * update method name * improve functionality and demos * Apply fixes from StyleCI * improve demo * Apply fixes from StyleCI * improve demo * improve demo * making crud work * fixes * integrated crud into actions * Apply fixes from StyleCI * Code review Add comments clean up. * Apply fixes from StyleCI * update comment * test * fix test uri for jsactions.php demo * init * merge changed * Apply fixes from StyleCI * update View::on() Add ability to setup apiConfig for jsCallback. * merge * updated Fix dropdown when place inside a column table. * Apply fixes from StyleCI * fix typo * update method name * improve functionality and demos * Apply fixes from StyleCI * improve demo * Apply fixes from StyleCI * improve demo * improve demo * crud improvements * wip * wip * Apply fixes from StyleCI * action test * Apply fixes from StyleCI * test with getting action * Apply fixes from StyleCI * change property name * setup executor from action * Apply fixes from StyleCI * Addesd public property currency_decimals in Persistence/UI * Using property currency_decimals in FormField/Money * Apply fixes from StyleCI * code cleanup * refactor and review * Apply fixes from StyleCI * clean up * add hook callback to crud * Apply fixes from StyleCI * adding native action dropdown support into crud * Apply fixes from StyleCI * update demo to contain example of redefining action executor * Apply fixes from StyleCI * Added two really nice demo pages (index and actions) * Apply fixes from StyleCI * fixed and enhancement - fixed table border - fixed js when table dropdown menu appear near end of window - Delete action should be fixed in atk4\data remove floating css class to table dropdown menu View::On method now check for action confirmation property and apply it by default * fix action in wizrd * add action to menu item * add UserConfirmation * Apply fixes from StyleCI * Add SSE operation with user confirmation example This adds an example for triggering an SSE operation after asking confirmation from the user. * Apply fixes from StyleCI * hide modal content while reloading * refactor make it more generic by applying class to loader instead of moda. * apply sorting when using action * Apply fixes from StyleCI * remove previous test * remove tutorial from actions page Added to a new page tutorial_actions for test to work again * fix double factory * Fix few bugs and add comments (#847) * add some comments while reviewing * fix action->fields bug * cleanup * CRUD refactoring * Apply fixes from StyleCI * change method name * minor fix * notify refactor * more refactoring * Apply fixes from StyleCI * more cleanup * fix comment * more cleanup * Apply fixes from StyleCI * fix actions test * fix lookup test * temp fix for lookup Seem like db value is not available. * Feature/Code Highlight (#849) * Feature/Code Highlight Display code in tutorial using Highlight.js * Apply fixes from StyleCI * add lang selection * fix * nothing * Feature/Card Deck using model action (#846) * init * Apply fixes from StyleCI * fix demo * enhancement add menu bar improve jsNotify setup * Apply fixes from StyleCI * add ability to pass View::on() defaults * add some comments while reviewing * fix action->fields bug * cleanup * CRUD refactoring * Apply fixes from StyleCI * change method name * minor fix * notify refactor * more refactoring * Apply fixes from StyleCI * more cleanup * fix comment * more cleanup * Apply fixes from StyleCI * fix actions test * fix lookup test * temp fix for lookup Seem like db value is not available. * deck refactoring * Apply fixes from StyleCI * update demo * Apply fixes from StyleCI * typo * Apply fixes from StyleCI * enhancement card template refactoring add itemSearch to deck * Apply fixes from StyleCI * add empty view when no record to show * Apply fixes from StyleCI * update * Apply fixes from StyleCI * apply partial reload on card when possible * Apply fixes from StyleCI * remove test argument * Code review * Apply fixes from StyleCI * create view from seed * nothing really * Add Github workflows (actions) (#848) * workflow * Setting current dependencies * wip * wip * wip * wip * wip * wip * wip * wip * fix * Fix unit test on Windows paths * Remove file db.github.php from Demo functional test check. * Apply fixes from StyleCI * Fix some Type Hints * Apply fixes from StyleCI * Feature/input action (#845) * Feature/Input Action * Apply fixes from StyleCI * Change in demo : exit() to $app->callExit() (#854) * Change exit() to $app->callExit() * Change direct exit call to $app->callExit(). * Change all deprecated Persistence_* to correct Persistence\* * badge * fix release bundler * fix release bundler * wip * fix release bundler * fix release bundler * fix release bundler * Setting current dependencies
1 parent 042d3b4 commit 6a4a839

File tree

510 files changed

+42729
-3903
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

510 files changed

+42729
-3903
lines changed

.codeclimate.yml

+118-63
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,120 @@
1-
engines:
2-
duplication:
3-
enabled: true
1+
version: "2"
2+
plugins:
3+
# Disabling plugins until there is a reasonable way to sanitize their output
4+
phpcodesniffer:
5+
enabled: false
46
config:
5-
languages:
6-
php:
7-
mass_threshold: 50
8-
fixme:
9-
enabled: true
7+
standard: "PSR1,PSR2"
8+
ignore_warnings: true
9+
encoding: utf-8
1010
phpmd:
11-
enabled: true
12-
exclude_fingerprints:
13-
- 908ad3f93985ff14c44615cee6966c72 # View have a lot of public methods. Deal with it.
14-
- 81ca5382dedb709060ec70ffea74e157 # allow exit in a call-back inside app constructor
15-
- 409aa7b6ded69296360c17d5c267c8dc # Grid::renderView iterates method
16-
- a4801fad2cfbf1b485de61cca855955d # Grid calls View::renderView() bypassing Lister.
17-
- 5030329ed016f46a2791c854caacb39c # Grid::getHTMLTags passes $row / $field, but $row is not used by money column
18-
- 113c8195220e554776225802db7021d6 # Persistence_Faker: Allow static access to class Faker\Factory in __construct
19-
checks:
20-
CleanCode/ElseExpression:
21-
enabled: false # gives many incorrect suggestions
22-
Controversial/CamelCaseClassName:
23-
enabled: false # because jQuery.php and similar class names
24-
Controversial/CamelCaseMethodName:
25-
enabled: false # methods start with _xx for private methods (that must remain public)
26-
Controversial/CamelCaseParameterName:
27-
enabled: false # allow parameter names to not use camelCase notation
28-
Controversial/CamelCasePropertyName:
29-
enabled: false # becasue we use _xx for private properties (that must remain public)
30-
Controversial/CamelCaseVariableName:
31-
enabled: false # because we call variables $f_login, $m_user for better readability.
32-
Controversial/Superglobals:
33-
enabled: false # yes we use superglobals and that's OK
34-
CyclomaticComplexity:
35-
enabled: false # our code is complex so that your code wouldn't be!
36-
CleanCode/BooleanArgumentFlag:
37-
enabled: false # sometimes it is meaningful to pass boolean arguments to methods
38-
Design/CouplingBetweenObjects:
39-
enabled: false # because we always allow to inject overrides!
40-
Design/LongMethod:
41-
enabled: false # our code is long so that your code wouldn't be!
42-
Design/NpathComplexity:
43-
enabled: false # our code is complex so that your code wouldn't be!
44-
Design/TooManyMethods:
45-
enabled: false # methods never should be to many
46-
Design/TooManyPublicMethods:
47-
enabled: false # it is OK that some classes have more than 12 public methods
48-
Design/WeightedMethodCount:
49-
enabled: false # because we solve complex task, our classes may be complex
50-
Naming/ShortMethodName:
51-
enabled: false # because of on() and js() and $ui
52-
Naming/ShortVariable:
53-
enabled: false # because of on() and js() and $ui
54-
# THERE IS MUCH TO MUCH OF THESE ERRORS - TEMPORARILY DISABLE THIS CHECK
55-
UnusedFormalParameter:
56-
enabled: false
57-
radon:
58-
enabled: true
59-
ratings:
60-
paths:
61-
- "src/**"
62-
exclude_paths:
63-
- "docs/**"
64-
- "tests/**"
65-
- "vendor/**"
11+
enabled: false
12+
sonar-php:
13+
enabled: false
14+
15+
checks:
16+
argument-count:
17+
config:
18+
threshold: 5
19+
complex-logic:
20+
config:
21+
threshold: 4
22+
file-lines:
23+
config:
24+
threshold: 1000
25+
method-complexity:
26+
config:
27+
threshold: 50
28+
method-count:
29+
config:
30+
threshold: 40
31+
method-lines:
32+
config:
33+
threshold: 100
34+
nested-control-flow:
35+
config:
36+
threshold: 4
37+
return-statements:
38+
config:
39+
threshold: 7
40+
similar-code:
41+
config:
42+
threshold: 100
43+
identical-code:
44+
config:
45+
threshold: 150
46+
47+
48+
#engines:
49+
# duplication:
50+
# enabled: true
51+
# config:
52+
# languages:
53+
# php:
54+
# mass_threshold: 50
55+
# fixme:
56+
# enabled: true
57+
# phpmd:
58+
# enabled: true
59+
# exclude_fingerprints:
60+
# - 9d462b7c90c564bf28007ee399340fad # table() NPath is too complex.
61+
# - 7c90035f65bb3bdbd2c03c648a705aac # we use static for factory, so it's good
62+
# - 80ef7f404dd4f054ca51d9ee12d9e9dd # we exit from toStrign() because it can't throw exceptions
63+
# - ae61f5e0cda0328c140f3b7298dbb8af # don't complain about call to static connection, as it's a fallback
64+
# - e71149b967391adfaf3347a53d3c0023 # don't complain about $junk used in foreach when we only need keys
65+
# checks:
66+
# CyclomaticComplexity: # because we solve complex stuff
67+
# enabled: false
68+
# Naming/LongVariable: # because we have variable naming patterns
69+
# enabled: false
70+
# UnusedFormalParameter: # because when we extend methods/hooks we wish to keep unified method call interface
71+
# enabled: false
72+
# Design/TooManyPublicMethods: # because we follow our internal design patters
73+
# enabled: false
74+
# Design/TooManyMethods: # because we solve complex stuff
75+
# enabled: false
76+
# Design/LongMethod: # because methods are as long as we need them to be
77+
# enabled: false
78+
# ExcessivePublicCount: # because Model has too many public methods
79+
# enabled: false
80+
# Design/TooManyFields: # because we solve complex things
81+
# enabled: false
82+
# Design/NpathComplexity: # because splitting up complex stuff into methods makes things even more complex
83+
# enabled: false
84+
# Design/WeightedMethodCount: # because we we solve complex stuff
85+
# enabled: false
86+
# Design/LongClass: # because we design carefully what is native and what is extension
87+
# enabled: false
88+
# Controversial/CamelCaseMethodName: # because we need certain method naming patterns, render_blah for rendering [blah]
89+
# enabled: false
90+
# Controversial/CamelCaseParameterName: #
91+
# enabled: false
92+
# Controversial/CamelCasePropertyName: # because we use _better_dont_change properties
93+
# enabled: false
94+
# Controversial/CamelCaseVariableName: #
95+
# enabled: false
96+
# Controversial/CamelCaseClassName: # Because we use Join_SQL where we specifically include _
97+
# enabled: false
98+
# Naming/ShortVariable: # because sometimes variables should be short
99+
# enabled: false
100+
# CleanCode/ElseExpression: # because following this makes code more complex
101+
# enabled: false
102+
#
103+
# radon:
104+
# enabled: true
105+
#ratings:
106+
# paths:
107+
# - "src/**"
108+
#exclude_paths:
109+
#- "docs/**"
110+
#- "tests/**"
111+
#- "vendor/**"
112+
## exclude obsolete classes
113+
#- "src/Field_Many.php"
114+
#- "src/Field_One.php"
115+
#- "src/Field_SQL_One.php"
116+
#- "src/Relation_Many.php"
117+
#- "src/Relation_One.php"
118+
#- "src/Relation_SQL_One.php"
119+
## exclude classes completely inherited from other repos
120+
#- "src/Exception.php"

.github/workflows/bundler.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Bundler
2+
3+
on: create
4+
5+
jobs:
6+
autocommit:
7+
name: Update to stable dependencies
8+
if: startsWith(github.ref, 'refs/heads/release/')
9+
runs-on: ubuntu-latest
10+
container:
11+
image: atk4/image:latest # https://github.com/atk4/image
12+
steps:
13+
- uses: actions/checkout@master
14+
- name: Hack around git branches
15+
run: |
16+
v=$(echo ${{ github.ref }} | cut -d / -f 4)
17+
echo $v
18+
git branch
19+
- name: Update to stable dependencies
20+
run: |
21+
jq 'del(."minimum-stability")|del(.require["atk4/data"])' < composer.json > tmp && mv tmp composer.json
22+
composer require atk4/data
23+
composer update
24+
25+
- uses: teaminkling/autocommit@master
26+
with:
27+
commit-message: Setting current dependencies
28+
- uses: ad-m/github-push-action@master
29+
with:
30+
branch: ${{ github.ref }}
31+
github_token: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: pull-request
34+
uses: repo-sync/pull-request@v2
35+
with:
36+
source_branch: "" # If blank, default: triggered branch
37+
destination_branch: "master" # If blank, default: master
38+
pr_title: "Releasing ${{ github.ref }} into master"
39+
pr_body: |
40+
- [ ] Review changes (must include stable dependencies)
41+
- [ ] Merge this PR into master (will delete ${{ github.ref }})
42+
- [ ] Go to Releases and create TAG from master
43+
Do not merge master into develop
44+
pr_reviewer: "romaninsh"
45+
pr_assignee: "romaninsh"
46+
github_token: ${{ secrets.GITHUB_TOKEN }}
47+

.github/workflows/release-drafter.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
# branches to consider in the event; optional, defaults to all
6+
branches:
7+
- develop
8+
9+
jobs:
10+
update_release_draft:
11+
runs-on: ubuntu-latest
12+
steps:
13+
# Drafts your next Release notes as Pull Requests are merged into "master"
14+
- uses: toolmantim/release-drafter@v5.2.0
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/unit-tests.yml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Unit Testing
2+
3+
on:
4+
pull_request
5+
6+
jobs:
7+
unit-test:
8+
name: Unit Testing
9+
runs-on: ubuntu-latest
10+
container:
11+
image: atk4/image:latest # https://github.com/atk4/image
12+
strategy:
13+
matrix:
14+
php: ['7.2', '7.3', 'latest']
15+
services:
16+
mysql:
17+
image: mysql:5.7
18+
env:
19+
MYSQL_ROOT_PASSWORD: password
20+
DB_DATABASE: db
21+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
22+
steps:
23+
- uses: actions/checkout@v1
24+
- name: Get Composer Cache Directory
25+
id: composer-cache
26+
run: |
27+
echo "::set-output name=dir::$(composer config cache-files-dir)"
28+
- uses: actions/cache@v1
29+
with:
30+
path: ${{ steps.composer-cache.outputs.dir }}
31+
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}
32+
restore-keys: |
33+
${{ runner.os }}-composer-
34+
35+
- run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
36+
37+
- name: Install dependencies and SQL
38+
run: |
39+
mkdir -p coverage
40+
apk add npm
41+
npm install -g less clean-css uglify-js
42+
mysql -uroot -ppassword -h mysql -e 'CREATE DATABASE atk4;'
43+
mysql -uroot -ppassword -h mysql atk4 < demos/atk4.sql
44+
45+
mv demos/db.github.php demos/db.php
46+
(cd js; npm install; npm run build)
47+
#lessc public/agileui.less public/agileui.css --clean-css="--s1 --advanced --compatibility=ie8" --source-map
48+
#uglifyjs --compress -- public/agileui.js > public/agileui.min.js
49+
50+
- name: Unit Testing
51+
run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml
52+
53+
# - name: Merge coverage logs
54+
# run: vendor/bin/phpcov merge build/logs/ --clover build/logs/cc.xml;
55+
56+
- uses: codecov/codecov-action@v1
57+
with:
58+
token: ${{ secrets.CODECOV_TOKEN }}
59+
file: covearge.xml
60+
61+

.github_changelog_generator

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
unreleased-only=true
2+
since-tag=1.5.7
3+
usernames-as-github-logins=true
4+
base=CHANGELOG.md

.gitignore

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1+
/behat.yml
12
/config.codekit
23
/phpunit.xml
4+
*.bak
35
/.idea
46
/public/semantic
57
/public/jquery
68
/vendor
79
docs/build
810
/composer.lock
11+
/demos/db.php
912
/build
1013
.DS_Store
1114
*.codekit3
12-
15+
yarn.lock
1316
run_local.sh
17+
/coverage
18+
/demos/test/
19+
package-lock.json

0 commit comments

Comments
 (0)