Skip to content

Commit e3f3cc8

Browse files
Merge pull request #1090 from uasoft-indonesia/task/v2/laravel11
Task/v2/laravel11
2 parents 32b3ccc + b8fb10a commit e3f3cc8

File tree

81 files changed

+2192
-2427
lines changed

Some content is hidden

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

81 files changed

+2192
-2427
lines changed

phpstan-baseline.neon

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
parameters:
22
ignoreErrors:
3-
- '#Call to an undefined static method [a-zA-Z0-9-\(\)\\\\_]+::[a-zA-Z0-9-\(\)\\_]+.#'
4-
- '#Call to an undefined method [a-zA-Z0-9-()\\_]+::[a-zA-Z0-9-()\_]+.#'
5-
- '#Call to static method [a-zA-Z0-9-()\_]+ on an unknown class [a-zA-Z0-9-()\_]+.#'
6-
- '#Result of method [a-zA-Z0-9\\\\_]+::[a-zA-Z0-9-\(\)\\_]+ [a-zA-Z0-9-\(\)\\_]+ is used.#'
7-
- '#Method [a-zA-Z0-9\\_]+::[a-zA-Z0-9-()\_]+ should return int but return statement is missing.#'
3+
- '#Call to an undefined static method [a-zA-Z0-9\-\(\)\\\\_]+::[a-zA-Z0-9\-\(\)\\_]+.#'
4+
- '#Call to an undefined method [a-zA-Z0-9\-\(\)\\_]+::[a-zA-Z0-9\-\(\)\\_]+.#'
5+
- '#Call to static method [a-zA-Z0-9\-\(\)\\_]+ on an unknown class [a-zA-Z0-9\-\(\)\\_]+.#'
6+
- '#Result of method [a-zA-Z0-9\\\\_]+::[a-zA-Z0-9\-\(\)\\_]+ [a-zA-Z0-9\-\(\)\\_]+ is used.#'
7+
- '#Method [a-zA-Z0-9\\_]+::[a-zA-Z0-9\-\(\)\\_]+ should return int but return statement is missing.#'
88
- '#Call to sprintf contains 1 placeholder, 0 values given.#'
9-
- '#Function [a-zA-Z0-9-()\_]+ not found.#'
10-
- '#Variable \$[a-zA-Z0-9-()\_]+ in isset[()]+ always exists and is not nullable.#'
11-
- '#Access to an undefined property Uasoft\\Badaso\\Models\\MenuItem::\$[a-zA-Z0-9-()\_]+.#'
9+
- '#Function [a-zA-Z0-9\-\(\)\\_]+ not found.#'
10+
- '#Variable \$[a-zA-Z0-9\-\(\)\\_]+ in isset\(\)+ always exists and is not nullable.#'
11+
- '#Access to an undefined property Uasoft\\Badaso\\Models\\MenuItem::\$[a-zA-Z0-9\-\(\)\\_]+.#'
1212
- '#Instantiated class Database\\Seeders\\Badaso\\Exception not found.#'
13-
- '#Caught class [a-zA-Z0-9-()\\_]+ not found.#'
13+
- '#Caught class [a-zA-Z0-9\-\(\)\\_]+ not found.#'
1414
- '#Variable \$[a-zA-Z0-9\\_]+ might not be defined.#'
1515

src/Commands/BadasoSetup.php

Lines changed: 34 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -81,57 +81,51 @@ protected function updatePackageJson()
8181
$package_json = file_get_contents(base_path('package.json'));
8282
$decoded_json = json_decode($package_json, true);
8383

84-
$decoded_json['devDependencies']['axios'] = '^1.7.2';
85-
$decoded_json['devDependencies']['laravel-mix'] = '^6.0.49';
86-
$decoded_json['devDependencies']['lodash'] = '^4.17.21';
87-
$decoded_json['devDependencies']['postcss'] = '^8.4.39';
84+
$decoded_json['devDependencies']['axios'] = '^0.18';
85+
$decoded_json['devDependencies']['laravel-mix'] = '^6.0.19';
86+
$decoded_json['devDependencies']['lodash'] = '^4.17.4';
87+
$decoded_json['devDependencies']['postcss'] = '^8.1.14';
8888

89-
$decoded_json['dependencies']['copy-files-from-to'] = '^3.11.0';
89+
$decoded_json['dependencies']['copy-files-from-to'] = '^3.2.0';
9090
$decoded_json['dependencies']['popper.js'] = '^1.12';
91-
$decoded_json['dependencies']['cross-env'] = '^7.0.3';
92-
$decoded_json['dependencies']['vue'] = '^3.4.31';
93-
$decoded_json['dependencies']['@vue/compat'] = '^3.4.31';
94-
$decoded_json['dependencies']['vue-loader'] = '^17.4.2';
95-
$decoded_json['dependencies']['@vue/compiler-sfc'] = '^3.1.0';
96-
$decoded_json['dependencies']['@vuelidate/core'] = '^2.0.3';
97-
$decoded_json['dependencies']['@vuelidate/validators'] = '^2.0.4';
98-
$decoded_json['dependencies']['sass'] = '^1.77.7';
99-
$decoded_json['dependencies']['sass-loader'] = '^14.2.1';
100-
$decoded_json['dependencies']['resolve-url-loader'] = '^5.0.0';
101-
$decoded_json['dependencies']['dompurify'] = '^3.2.4';
102-
103-
$decoded_json['dependencies']['@tinymce/tinymce-vue'] = '^4.0.7';
91+
$decoded_json['dependencies']['cross-env'] = '^5.1';
92+
$decoded_json['dependencies']['vue'] = '^2.5.7';
93+
$decoded_json['dependencies']['vue-loader'] = '^15.9.5';
94+
$decoded_json['dependencies']['vue-template-compiler'] = '^2.6.14';
95+
$decoded_json['dependencies']['sass'] = '^1.32.11';
96+
$decoded_json['dependencies']['sass-loader'] = '^11.0.1';
97+
$decoded_json['dependencies']['resolve-url-loader'] = '^4.0.0';
98+
$decoded_json['dependencies']['dompurify'] = '^3.0.5';
99+
100+
$decoded_json['dependencies']['@johmun/vue-tags-input'] = '^2.1.0';
101+
$decoded_json['dependencies']['@tinymce/tinymce-vue'] = '^3';
104102
$decoded_json['dependencies']['body-scroll-lock'] = '^4.0.0-beta.0';
105-
$decoded_json['dependencies']['chart.js'] = '^4.4.3';
103+
$decoded_json['dependencies']['chart.js'] = '^2.8.0';
106104
$decoded_json['dependencies']['firebase'] = '^8.4.2';
107105
$decoded_json['dependencies']['jspdf'] = '^2.3.1';
108-
$decoded_json['dependencies']['jspdf-autotable'] = '^3.8.2';
109-
$decoded_json['dependencies']['luxon'] = '^3.4.4';
110-
$decoded_json['dependencies']['material-icons'] = '^1.13.12';
111-
$decoded_json['dependencies']['moment'] = '^2.30.1';
112-
$decoded_json['dependencies']['prismjs'] = '^1.29.0';
106+
$decoded_json['dependencies']['jspdf-autotable'] = '^3.5.14';
107+
$decoded_json['dependencies']['luxon'] = '^1.25.0';
108+
$decoded_json['dependencies']['material-icons'] = '^0.3.1';
109+
$decoded_json['dependencies']['moment'] = '^2.29.1';
110+
$decoded_json['dependencies']['prismjs'] = '^1.17.1';
113111
$decoded_json['dependencies']['tinymce'] = '^5.7.1';
114-
$decoded_json['dependencies']['uuid'] = '^10.0.0';
115-
$decoded_json['dependencies']['vue-chartjs'] = '^5.3.1';
116-
$decoded_json['dependencies']['vue3-colorpicker'] = '^2.3.0';
112+
$decoded_json['dependencies']['uuid'] = '^8.3.2';
113+
$decoded_json['dependencies']['vue-chartjs'] = '^3.4.2';
114+
$decoded_json['dependencies']['vue-color'] = '^2.7.1';
117115
$decoded_json['dependencies']['vue-datetime'] = '^1.0.0-beta.14';
118-
$decoded_json['dependencies']['vue-datetime3'] = '^1.0.16';
119116
$decoded_json['dependencies']['vue-draggable-nested-tree'] = '^3.0.0-beta2';
120-
$decoded_json['dependencies']['vue3-draggable'] = '^2.0.9';
121-
$decoded_json['dependencies']['vue-gtag-next'] = '^1.14.0';
122-
$decoded_json['dependencies']['vue-i18n'] = '^9.13.1';
117+
$decoded_json['dependencies']['vue-gtag'] = '^1.16.1';
118+
$decoded_json['dependencies']['vue-i18n'] = '^8.22.4';
123119
$decoded_json['dependencies']['vue-json-excel'] = '^0.3.0';
124-
$decoded_json['dependencies']['vue-prism-editor'] = '^2.0.0-alpha.2';
125-
$decoded_json['dependencies']['vue-router'] = '^4.4.0';
126-
$decoded_json['dependencies']['vue3-editor'] = '^0.1.1';
127-
$decoded_json['dependencies']['vue3-tags-input'] = '^1.0.12';
120+
$decoded_json['dependencies']['vue-prism-editor'] = '^1.2.2';
121+
$decoded_json['dependencies']['vue-router'] = '^3.1.3';
122+
$decoded_json['dependencies']['vue2-editor'] = '^2.10.2';
128123
$decoded_json['dependencies']['vuedraggable'] = '^2.24.3';
129-
$decoded_json['dependencies']['vue-draggable-next'] = '^2.2.1';
130-
$decoded_json['dependencies']['vuelidate'] = '^0.7.7';
131-
$decoded_json['dependencies']['vuesax3'] = '^4.2.1';
132-
$decoded_json['dependencies']['vuex'] = '^4.1.0';
124+
$decoded_json['dependencies']['vuelidate'] = '^0.7.6';
125+
$decoded_json['dependencies']['vuesax'] = '^3.12.2';
126+
$decoded_json['dependencies']['vuex'] = '^3.1.1';
133127
$decoded_json['dependencies']['vuex-persistedstate'] = '^4.0.0-beta.1';
134-
$decoded_json['dependencies']['weekstart'] = '^2.0.0';
128+
$decoded_json['dependencies']['weekstart'] = '^1.0.1';
135129

136130
$encoded_json = json_encode($decoded_json, JSON_PRETTY_PRINT);
137131
file_put_contents(base_path('package.json'), $encoded_json);

src/Commands/BadasoTestSetup.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function handle()
5353
<directory suffix="Test.php">./vendor/badaso/core/tests/Feature</directory>
5454
</testsuite>
5555
</testsuites>
56-
<coverage processUncoveredFiles="true">
56+
<coverage>
5757
<include>
5858
<!-- <directory suffix=".php">./app</directory> -->
5959
<directory suffix=".php">./vendor/badaso/core/src/Commands</directory>
@@ -73,10 +73,10 @@ public function handle()
7373
<directory suffix=".php">./vendor/badaso/core/src/Widgets</directory>
7474
<directory suffix=".php">./vendor/badaso/core/src/Badaso.php</directory>
7575
</include>
76+
<report>
77+
<clover outputFile="clover.xml"/>
78+
</report>
7679
</coverage>
77-
<logging>
78-
<log type="coverage-clover" target="clover.xml"/>
79-
</logging>
8080
<php>
8181
<server name="APP_ENV" value="testing"/>
8282
<server name="BCRYPT_ROUNDS" value="4"/>

src/Config/lfm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
*/
120120

121121
// If true, image thumbnails would be created during upload
122-
'should_create_thumbnails' => true,
122+
'should_create_thumbnails' => false,
123123

124124
'thumb_folder_name' => 'thumbs',
125125

src/ContentManager/FileGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ public function deleteMigrationFiles(string $file_name)
331331
/**
332332
* Generate Badaso Alter Migration File.
333333
*/
334-
public function generateBDOAlterMigrationFile(array $table, array $rows = null, string $prefix, array $relations = []): string
334+
public function generateBDOAlterMigrationFile(array $table, string $prefix, ?array $rows = null, array $relations = []): string
335335
{
336336
$migration_class_name = $this->file_system->generateAlterMigrationClassName($table, $prefix);
337337

src/Database/Schema/Column.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
abstract class Column
1010
{
11-
public static function make(array $column, string $table_name = null)
11+
public static function make(array $column, ?string $table_name = null)
1212
{
1313
$name = Identifier::validate($column['name'], 'Column');
1414
$type = $column['type'];

src/Exceptions/OrchestratorHandlerNotFoundException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
class OrchestratorHandlerNotFoundException extends Exception
99
{
10-
public function __construct(string $message = '', int $code = 0, Throwable $previous = null)
10+
public function __construct(string $message = '', int $code = 0, ?Throwable $previous = null)
1111
{
1212
parent::__construct($message, $code, $previous);
1313
}

src/Helpers/Firebase/FCMNotification.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ protected function notificationEvent(string $active_event, string $table_name, s
125125
* @param string $body
126126
* @param array $data
127127
*/
128-
public static function notification(string $active_event, string $table_name, string $title = null, string $body = null, $data = [])
128+
public static function notification(string $active_event, string $table_name, ?string $title = null, ?string $body = null, $data = [])
129129
{
130130
try {
131131
$user_name = 'user';

src/Helpers/GetData.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ public static function clientSideWithQueryBuilder($data_type, $builder_params, $
432432
$upload_image_multiples = json_decode($record->{$data_row->field}, true);
433433
if (isset($upload_image_multiples)) {
434434
$upload_image_multiples = collect($upload_image_multiples)->map(function ($upload_image_multiple) {
435-
if (config('lfm.should_create_thumbnails') == true) {
435+
if (config('lfm.should_create_thumbnails') == false) {
436436
$put_thumbs = config('lfm.thumb_folder_name');
437437
$upload_image_multiple = explode('/', $upload_image_multiple);
438438
$file_name = $upload_image_multiple[count($upload_image_multiple) - 1];
@@ -456,7 +456,7 @@ public static function clientSideWithQueryBuilder($data_type, $builder_params, $
456456
if (str_contains($upload_image, 'http')) {
457457
$upload_image = $upload_image;
458458
} else {
459-
if (config('lfm.should_create_thumbnails') == true) {
459+
if (config('lfm.should_create_thumbnails') == false) {
460460
$put_thumbs = config('lfm.thumb_folder_name');
461461
$upload_image = explode('/', $upload_image);
462462
$file_name = $upload_image[count($upload_image) - 1];

0 commit comments

Comments
 (0)