Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade version #39784

Open
wants to merge 77 commits into
base: 2.4-develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
d8137ca
add module and init project
caothu159 May 28, 2024
1860410
ISSUES - package is not present in the lock file
caothu159 May 28, 2024
a7eebe8
Update build.yml
caothu159 May 28, 2024
4134415
Update build.yml
caothu159 May 28, 2024
b9246a5
add module and init project
caothu159 May 28, 2024
fa1e15c
ISSUES - package is not present in the lock file
caothu159 May 28, 2024
a46cb04
Update build.yml
caothu159 May 28, 2024
01d1cc8
Update build.yml
caothu159 May 28, 2024
5c0d6e6
Merge branch 'main' of github.com:diepxuan/diepxuan.com into main
caothu159 May 28, 2024
96a9ece
Update build.yml
caothu159 May 31, 2024
35affbb
Update build.yml
caothu159 May 31, 2024
a34161e
add diepxuan packages
caothu159 May 31, 2024
b05d2fc
Merge branch 'main' of github.com:diepxuan/diepxuan.com into main
caothu159 May 31, 2024
b82258a
add opensearch docker
caothu159 Jun 22, 2024
803b316
create module githubaction
caothu159 Jun 28, 2024
5cef791
add module source
caothu159 Jun 28, 2024
505bf3a
allow permissions
caothu159 Jun 28, 2024
933e429
ISSUES required authentication
caothu159 Jun 29, 2024
c78c5e8
ISSUES required authentication
caothu159 Jun 29, 2024
fe08072
ISSUES required authentication
caothu159 Jun 29, 2024
c7ba527
ISSUES required authentication
caothu159 Jun 29, 2024
f7b90d0
module require for magento
caothu159 Jun 29, 2024
f5c02b6
Using inputs and secrets in a reusable workflow
caothu159 Jun 29, 2024
c3cdf88
git config ssh
caothu159 Jun 29, 2024
b2516bb
FEATURE 404 redirect to home
caothu159 Jun 29, 2024
e2af22c
new module for multi store
caothu159 Jun 29, 2024
cedf360
add gitignore
caothu159 Jun 29, 2024
cc1fbbc
detect the target website or storeview by domain
caothu159 Jun 29, 2024
35bd641
allow both non-www and www
caothu159 Jun 29, 2024
a9bb880
- cleanup
caothu159 Jun 29, 2024
43d36de
cleanup
caothu159 Jun 29, 2024
5ef1689
Update test.yml
caothu159 Jun 29, 2024
4a582a8
Merge branch 'magento:2.4-develop' into main
caothu159 Jun 30, 2024
1b131ef
detect domain www/none-www
caothu159 Jun 30, 2024
8f85b11
Merge branch 'main' of github.com:diepxuan/diepxuan.com into main
caothu159 Jun 30, 2024
d2b2a6d
cleanup
caothu159 Jul 2, 2024
62b5057
performance
caothu159 Jul 5, 2024
c555b4f
mix var store type
caothu159 Jul 7, 2024
dd7e7b0
add footer links
caothu159 Jul 30, 2024
070f430
update preview image
caothu159 Jul 30, 2024
0193758
create module google map widgets
caothu159 Aug 18, 2024
35dc2df
clear
caothu159 Aug 20, 2024
67563db
Missing required argument $data
caothu159 Dec 4, 2024
d0bc931
cleanup code
caothu159 Dec 4, 2024
1b2f38f
cleanup submodule
caothu159 Dec 4, 2024
fad2bba
add module to allow unsupport version
caothu159 Dec 4, 2024
24fdffe
ISSUES | preg_match(): Compilation failed: range out of order in char…
caothu159 Dec 4, 2024
35c5770
update psr-4 path
caothu159 Dec 4, 2024
3054251
update ReadMe link
caothu159 Dec 4, 2024
648cf6d
module theme update
caothu159 Dec 5, 2024
8f5931b
create style and modify static block class
caothu159 Dec 5, 2024
8b29e12
fix workflows indent
caothu159 Dec 5, 2024
9c5ab99
add theme package
caothu159 Dec 5, 2024
01d402b
theme path update
caothu159 Dec 6, 2024
7e49b9c
update theme with magento 2.4.3
caothu159 Dec 6, 2024
c52d969
update theme style
caothu159 Dec 7, 2024
a83c7da
update .gitignore and add setup.css.map; refactor UpdateMediaAttribut…
caothu159 Mar 31, 2025
7378572
add SyncCRM module for product synchronization from CRM
caothu159 Mar 31, 2025
c919241
add composer.json for SyncCRM module integration
caothu159 Mar 31, 2025
ff947f9
add ProductSync command and cron job for CRM product synchronization
caothu159 Mar 31, 2025
7f37615
add configuration files and helper class for SyncCRM module
caothu159 Apr 1, 2025
cbc1ebf
add Auto Login and SyncCRM module configurations and dependencies
caothu159 Apr 1, 2025
ed2d6a8
refactor Auth model for improved readability and consistency; update …
caothu159 Apr 1, 2025
bedad4e
update SyncCRM configuration to include API URL and improve field lab…
caothu159 Apr 1, 2025
ce6b3f5
add CategorySync command and related classes for CRM category synchro…
caothu159 Apr 1, 2025
4508c11
add CategorySync class and enhance API URL handling in Config; refact…
caothu159 Apr 1, 2025
762bb5d
add CategorySyncCron class for scheduled category synchronization; up…
caothu159 Apr 1, 2025
a446fba
add CategorySimbaAttribute data patch and UI component for new catego…
caothu159 Apr 1, 2025
3b0e3f2
refactor CategorySync class to use CategoryRepositoryInterface and en…
caothu159 Apr 2, 2025
f1d1249
add CreateCategorySimbaAttribute data patch to define 'simba_category…
caothu159 Apr 2, 2025
68c5bb0
enhance ProductSync class with category handling and product synchron…
caothu159 Apr 2, 2025
b81eaca
fix(CategorySync): correct category activation and menu inclusion logic
caothu159 Apr 2, 2025
c860006
fix(CategorySync): correct logic for setting category active status a…
caothu159 Apr 2, 2025
1381365
fix(ProductSync): improve product status handling and merge category …
caothu159 Apr 2, 2025
ee15656
fix(ProductSync): update last update timestamp and clean up comments …
caothu159 Apr 2, 2025
9200632
fix(composer): update PHP and package dependencies for compatibility …
caothu159 Apr 2, 2025
fb2776c
Merge branch '2.4-develop' into main
caothu159 Apr 2, 2025
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
78 changes: 78 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Runs tests and verifies that the package can be built.
name: Build

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [main]
paths-ignore:
- "**.md"
pull_request:
branches: [main]
paths-ignore:
- "**.md"
schedule:
- cron: "30 0 * * *"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
runs-on: ${{matrix.operating-system}}
strategy:
fail-fast: false
matrix:
# operating-system: [ubuntu-latest]
operating-system: [ubuntu-22.04, ubuntu-20.04]
# php-versions: ['5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.3']
php-versions: ['8.1', '8.2', '8.3']
name: build and test using PHP ${{ matrix.php-versions }} with ${{ matrix.operating-system }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: intl #optional
ini-values: "post_max_size=256M" #optional

- name: Install dependencies
run: |
rm composer.lock || true
composer install

- name: Setup Node.js
if: false
uses: actions/setup-node@v3
with:
node-version: '16'
check-latest: true

- name: Install NPM dependencies
if: false
run: npm install

- name: Compile assets for production
if: false
run: npm run build

- name: Push to repository
if: false
run: |
if [ "$(git status --porcelain=v1 2>/dev/null | wc -l)" != "0" ]; then
# git add src/debian/control
git commit -m "Update packages from ${{ matrix.operating-system }} at $(date +'%d-%m-%y')" &&
git push ||
git stash &&
git pull --rebase &&
git stash apply &&
git push || true
fi
42 changes: 42 additions & 0 deletions .github/workflows/module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Runs tests and verifies that the package can be built.
name: Module

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [main]
paths-ignore:
- "**.md"
pull_request:
branches: [main]
paths-ignore:
- "**.md"
# schedule:
# - cron: "30 * * * 0" # run every @hourly

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
module:
permissions:
contents: write
uses: diepxuan/.github/.github/workflows/magento-module-update.yml@main
secrets:
GPG_KEY: ${{ secrets.GPG_KEY }}
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }}
SSH_ID_RSA: ${{ secrets.SSH_ID_RSA }}
theme:
permissions:
contents: write
uses: diepxuan/.github/.github/workflows/magento-theme-update.yml@main
secrets:
GPG_KEY: ${{ secrets.GPG_KEY }}
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }}
SSH_ID_RSA: ${{ secrets.SSH_ID_RSA }}

10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ atlassian*
/lib/internal/flex/varien/.settings
/node_modules
/.grunt
/composer.lock
/Gruntfile.js
/package.json
/package-lock.json
/.php_cs
/.php_cs.cache
/.php-cs-fixer.php
Expand Down Expand Up @@ -64,6 +66,8 @@ atlassian*
!/pub/media/sitemap/.htaccess
/pub/static/*
!/pub/static/.htaccess
/pub/media/email/*
!/pub/media/email/.htaccess

/var/*
!/var/.htaccess
Expand All @@ -72,3 +76,9 @@ atlassian*
/generated/*
!/generated/.htaccess
.DS_Store

auth.json
magento.code-workspace
bin/magerun2
.m2config
.phpactor.json
148 changes: 105 additions & 43 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,47 +1,109 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

/**
* PHP Coding Standards fixer configuration
declare(strict_types=1);

/*
* @copyright © 2019 Dxvn, Inc.
*
* @author Tran Ngoc Duc <[email protected]>
* @author Tran Ngoc Duc <[email protected]>
*
* @lastupdate 2025-03-31 12:41:27
*/

$finder = PhpCsFixer\Finder::create()
->name('*.phtml')
->exclude('dev/tests/integration/tmp')
->exclude('dev/tests/integration/var')
->exclude('lib/internal/Cm')
->exclude('lib/internal/Credis')
->exclude('lib/internal/Less')
->exclude('lib/internal/LinLibertineFont')
->exclude('pub/media')
->exclude('pub/static')
->exclude('setup/vendor')
->exclude('var');

$config = new PhpCsFixer\Config();
$config->setFinder($finder)
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'concat_space' => ['spacing' => 'one'],
'include' => true,
'new_with_braces' => true,
'no_empty_statement' => true,
'no_extra_blank_lines' => true,
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_multiline_whitespace_around_double_arrow' => true,
'multiline_whitespace_before_semicolons' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_unused_imports' => true,
'no_whitespace_in_blank_line' => true,
'object_operator_without_whitespace' => true,
'ordered_imports' => true,
'standardize_not_equals' => true,
'ternary_operator_spaces' => true,
]);
return $config;
use PhpCsFixer\Config;
use PhpCsFixer\Finder;

if (!function_exists('import_url')) {
function import_url($url)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, 0);
$data = curl_exec($ch);
curl_close($ch);

return $data;
}
}

date_default_timezone_set('Asia/Ho_Chi_Minh');

try {
$configPath = 'https://raw.githubusercontent.com/diepxuan/php/main/.php-cs-fixer.dist.php';
$configContent = import_url($configPath);
$tempFile = sys_get_temp_dir() . '/.php-cs-fixer.dist.php';
file_put_contents($tempFile, $configContent);
return require $tempFile;
// $config = import_url($configPath);
// $config = str_replace('<?php', '', $config);
} catch (Throwable $e) {
return (new Config())
->setRiskyAllowed(true)
->setRules([
'@PHP74Migration' => true,
'@PHP74Migration:risky' => true,
'@PHPUnit100Migration:risky' => true,
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
// '@PER-CS2.0' => true,
'general_phpdoc_annotation_remove' => ['annotations' => ['expectedDeprecation']], // one should use PHPUnit built-in method instead
'header_comment' => ['header' => sprintf(<<<'EOF'
@copyright © 2019 Dxvn, Inc.

@author Tran Ngoc Duc <[email protected]>
@author Tran Ngoc Duc <[email protected]>

@lastupdate %s
EOF, date('Y-m-d H:i:s'))],

'modernize_strpos' => true, // needs PHP 8+ or polyfill
'no_useless_concat_operator' => false, // TODO switch back on when the `src/Console/Application.php` no longer needs the concat
'numeric_literal_separator' => true,
'string_implicit_backslashes' => true, // https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7786

'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'concat_space' => ['spacing' => 'one'],
'include' => true,
'new_with_braces' => true,
'no_empty_statement' => true,
// 'no_extra_consecutive_blank_lines' => true,
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_multiline_whitespace_around_double_arrow' => true,
// 'multiline_whitespace_before_semicolons' => false,
'no_singleline_whitespace_before_semicolons' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_alias_language_construct_call' => true,
'assign_null_coalescing_to_coalesce_equal' => true,
'no_unused_imports' => true,
'no_whitespace_in_blank_line' => true,
'object_operator_without_whitespace' => true,
'ordered_imports' => true,
'standardize_not_equals' => true,
'ternary_operator_spaces' => true,
'binary_operator_spaces' => [
'default' => 'at_least_single_space',
'operators' => [
'=>' => 'align_single_space_minimal',
'=' => 'align_single_space_minimal',
]],
'operator_linebreak' => ['only_booleans' => true],
])
->setFinder(
(new Finder())
->ignoreDotFiles(false)
->ignoreVCSIgnored(true)
->exclude([
'dev-tools/phpstan',
'tests/Fixtures',
'lib/internal/Magento/Framework',
'app/code/Magento',
])
->in(__DIR__)
)
;
}
24 changes: 24 additions & 0 deletions app/code/Diepxuan/Autologin/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[docker-compose.yml]
indent_size = 4

[changelog]
indent_size = 2

[CHANGELOG.md]
indent_size = 2

[*.{yml,yaml,json}]
indent_size = 2
31 changes: 31 additions & 0 deletions app/code/Diepxuan/Autologin/.php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

declare(strict_types=1);

/*
* Copyright © 2019 Dxvn, Inc. All rights reserved.
*
* © Tran Ngoc Duc <[email protected]>
* Tran Ngoc Duc <[email protected]>
*/

if (!function_exists('import_url')) {
function import_url($url)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, 0);
$data = curl_exec($ch);
curl_close($ch);

return $data;
}
}

date_default_timezone_set('Asia/Ho_Chi_Minh');
$config = import_url('https://raw.githubusercontent.com/diepxuan/php/main/.php-cs-fixer.dist.php');
$config = str_replace('<?php', '', $config);

return eval($config);
21 changes: 21 additions & 0 deletions app/code/Diepxuan/Autologin/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 DXVN

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading