diff --git a/.github/workflows/coding-standard.yml b/.github/workflows/coding-standard.yml.disable similarity index 100% rename from .github/workflows/coding-standard.yml rename to .github/workflows/coding-standard.yml.disable diff --git a/.github/workflows/merge-upstream-changes.yml b/.github/workflows/merge-upstream-changes.yml.disable similarity index 100% rename from .github/workflows/merge-upstream-changes.yml rename to .github/workflows/merge-upstream-changes.yml.disable diff --git a/.github/workflows/semantic-checker.yml b/.github/workflows/semantic-checker.yml.disable similarity index 100% rename from .github/workflows/semantic-checker.yml rename to .github/workflows/semantic-checker.yml.disable diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml new file mode 100644 index 0000000000000..3fa7fc00eaf83 --- /dev/null +++ b/.github/workflows/unit-tests.yml @@ -0,0 +1,136 @@ +name: Unit Tests +run-name: ${{ github.actor }} is running Unit Tests +on: + pull_request: + branches: + - 2.4-develop + - nx-work + +permissions: + contents: write + +jobs: + run-unit-tests: + uses: adamzero1/mage-os-infrastructure/.github/workflows/unit-tests.yml@nx-unit-testing + +# name: Unit Tests +# run-name: ${{ github.actor }} is running Unit Tests +# on: +# pull_request: +# branches: +# - 2.4-develop +# - nx-work + +# permissions: +# contents: write + +# jobs: +# unit-tests: +# strategy: +# fail-fast: false +# matrix: +# php_version: [8.1,8.2] +# runs-on: ubuntu-latest +# steps: +# - name: Checkout PR commit +# uses: actions/checkout@v3 +# with: +# ref: ${{ github.event.pull_request.head.sha }} +# path: main +# # Need to do this otherwise Nx cant determine diff +# fetch-depth: 0 + +# - name: Fetch base +# working-directory: ./main +# run: git fetch origin ${{ github.event.pull_request.base.ref }} + +# - name: Install Composer +# uses: php-actions/composer@v6 +# with: +# # Run the dummy help command after installing Composer (otherwise defaults to install) +# command: help + +# - name: Get Composer Cache Directory +# id: composer-cache +# working-directory: ./main +# run: echo "composer_cache_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + +# - name: Install Composer Cache +# uses: actions/cache@v3 +# with: +# path: ${{ steps.composer-cache.outputs.composer_cache_dir }} +# key: ${{ runner.os }}-composer-${{ hashFiles('**/main/composer.lock') }} +# restore-keys: | +# ${{ runner.os }}-composer- +# - name: Install Composer Dependencies +# working-directory: ./main +# run: composer install + +# - name: Checkout Nx Repo +# uses: actions/checkout@v3 +# with: +# repository: adamzero1/nx-for-php +# ref: docker-wrapper +# path: nx + +# - name: Install / setup Nx +# working-directory: ./main +# run: | +# npm install -g nx@15.4.1 +# NXDIR="../nx" +# cp -r ${NXDIR}/nx ./ +# cp ${NXDIR}/nx.json ./ +# cp ${NXDIR}/package.json ./ +# cp ${NXDIR}/package-lock.json ./ +# npm ci +# npm run generate-workspace +# - name: Print Affected +# working-directory: ./main +# run: | +# AFFECTED_OUTPUT=/tmp/affect.json +# nx print-affected --head=HEAD --base=remotes/origin/${{ github.event.pull_request.base.ref }} > ${AFFECTED_OUTPUT} +# echo "Affected Projects: $(jq .projects ${AFFECTED_OUTPUT})" + +# # Warden / Den stuff +# - name: Checkout Den Repo +# uses: actions/checkout@v3 +# with: +# repository: swiftotter/den +# path: den + +# - name: Init / Configure Den +# working-directory: ./main +# run: | +# DEN=/home/runner/work/magento2/magento2/den/bin/den +# ${DEN} env-init magento2 magento2 +# sed -i 's/WARDEN_DB=.*/WARDEN_DB=0/g' .env +# sed -i 's/WARDEN_TEST_DB=.*/WARDEN_TEST_DB=0/g' .env +# sed -i 's/WARDEN_ELASTICSEARCH=.*/WARDEN_ELASTICSEARCH=0/g' .env +# sed -i 's/WARDEN_OPENSEARCH=.*/WARDEN_OPENSEARCH=0/g' .env +# sed -i 's/WARDEN_ELASTICHQ=.*/WARDEN_ELASTICHQ=0/g' .env +# sed -i 's/WARDEN_VARNISH=.*/WARDEN_VARNISH=0/g' .env +# sed -i 's/WARDEN_RABBITMQ=.*/WARDEN_RABBITMQ=0/g' .env +# sed -i 's/WARDEN_REDIS=.*/WARDEN_REDIS=0/g' .env +# sed -i 's/PHP_VERSION=.*/PHP_VERSION=${{ matrix.php_version }}/g' .env +# ${DEN} env up +# echo ${{secrets.DEPLOY_PASSWORD}} | sudo -S chmod -R a+rw . +# # # Unit test command test +# # - name: Run PHPUnit +# # working-directory: ./main +# # run: | +# # DEN=/home/runner/work/magento2/magento2/den/bin/den +# # ${DEN} env exec -T php-fpm ./vendor/bin/phpunit --help +# # ${DEN} env exec -T php-fpm whoami +# # ${DEN} env exec -T php-fpm ls -lath + +# - name: Configure PHPUnit +# working-directory: ./main +# run: | +# cp dev/tests/unit/phpunit.xml.dist dev/tests/unit/phpunit.xml +# sed -i '//,/<\/extensions>/d' dev/tests/unit/phpunit.xml + +# - name: Run PHPUnit Nx +# working-directory: ./main +# run: | +# export DEN=/home/runner/work/magento2/magento2/den/bin/den +# nx affected --target=test:unit --head=HEAD --base=remotes/origin/${{ github.event.pull_request.base.ref }} \ No newline at end of file diff --git a/app/code/Magento/AdminAnalytics/Model/Condition/CanViewNotification.php b/app/code/Magento/AdminAnalytics/Model/Condition/CanViewNotification.php index 222261d4abfb5..469540aee928a 100644 --- a/app/code/Magento/AdminAnalytics/Model/Condition/CanViewNotification.php +++ b/app/code/Magento/AdminAnalytics/Model/Condition/CanViewNotification.php @@ -31,6 +31,7 @@ class CanViewNotification implements VisibilityConditionInterface private static $cachePrefix = 'admin-usage-notification-popup'; /** + * aaaaaa * @var Logger */ private $viewerLogger; diff --git a/app/code/Magento/Directory/Test/Unit/Model/CurrencyTest.php b/app/code/Magento/Directory/Test/Unit/Model/CurrencyTest.php index a3a6b6826366f..7fdafafe2d7fb 100644 --- a/app/code/Magento/Directory/Test/Unit/Model/CurrencyTest.php +++ b/app/code/Magento/Directory/Test/Unit/Model/CurrencyTest.php @@ -143,11 +143,11 @@ public function getOutputFormatDataProvider(): array 'en_US:PLN' => ['en_US', 'PLN', "PLN\u{00A0}%s"], 'en_US:PKR' => ['en_US', 'PKR', "PKR\u{00A0}%s"], 'af_ZA:VND' => ['af_ZA', 'VND', "\u{20AB}%s"], - 'ar_DZ:EGP' => ['ar_DZ', 'EGP', "\u{062C}.\u{0645}.\u{200F}\u{00A0}%s"], - 'ar_SA:USD' => ['ar_SA', 'USD', "%s\u{00A0}US$"], - 'ar_SA:LBP' => ['ar_SA', 'LBP', "%s\u{00A0}\u{0644}.\u{0644}.\u{200F}"], + 'ar_DZ:EGP' => ['ar_DZ', 'EGP', "\u{200F}%s\u{00A0}\u{062C}.\u{0645}.\u{200F}"], + 'ar_SA:USD' => ['ar_SA', 'USD', "\u{200F}%s\u{00A0}US$"], + 'ar_SA:LBP' => ['ar_SA', 'LBP', "\u{200F}%s\u{00A0}\u{0644}.\u{0644}.\u{200F}"], 'fa_IR:USD' => ['fa_IR', 'USD', "\u{200E}$%s"], - 'ar_KW:USD' => ['ar_KW', 'USD', "%s\u{00A0}US$"], + 'ar_KW:USD' => ['ar_KW', 'USD', "\u{200F}%s\u{00A0}US$"], 'bn_BD:IQD' => ['bn_BD', 'IQD', "%s\u{00A0}IQD"], 'ca_ES:VND' => ['ca_ES', 'VND', "%s\u{00A0}\u{20AB}"], 'de_DE:USD' => ['de_DE', 'USD', "%s\u{00A0}$"], @@ -205,8 +205,8 @@ public function getFormatTxtNumberFormatterDataProvider(): array ['en_US', 'USD', '9999', [], '$9,999.00'], ['en_US', 'EUR', '9999', [], '€9,999.00'], ['en_US', 'LBP', '9999', [], "LBP\u{00A0}9,999"], - ['ar_SA', 'USD', '9', [], "\u{0669}\u{066B}\u{0660}\u{0660}\u{00A0}US$"], - ['ar_SA', 'AED', '9', [], "\u{0669}\u{066B}\u{0660}\u{0660}\u{00A0}\u{062F}.\u{0625}.\u{200F}"], + ['ar_SA', 'USD', '9', [], "\u{200F}\u{0669}\u{066B}\u{0660}\u{0660}\u{00A0}US$"], + ['ar_SA', 'AED', '9', [], "\u{200F}\u{0669}\u{066B}\u{0660}\u{0660}\u{00A0}\u{062F}.\u{0625}.\u{200F}"], ['de_DE', 'USD', '9999', [], "9.999,00\u{00A0}$"], ['de_DE', 'EUR', '9999', [], "9.999,00\u{00A0}€"], ['en_US', 'USD', '9999', ['display' => CurrencyData::NO_SYMBOL, 'precision' => 2], '9,999.00'], @@ -218,14 +218,14 @@ public function getFormatTxtNumberFormatterDataProvider(): array 'USD', '9999', ['display' => CurrencyData::NO_SYMBOL], - "\u{0669}\u{066C}\u{0669}\u{0669}\u{0669}\u{066B}\u{0660}\u{0660}" + "\u{200F}\u{0669}\u{066C}\u{0669}\u{0669}\u{0669}\u{066B}\u{0660}\u{0660}" ], [ 'ar_SA', 'AED', '9999', ['display' => CurrencyData::NO_SYMBOL], - "\u{0669}\u{066C}\u{0669}\u{0669}\u{0669}\u{066B}\u{0660}\u{0660}" + "\u{200F}\u{0669}\u{066C}\u{0669}\u{0669}\u{0669}\u{066B}\u{0660}\u{0660}" ], ['en_US', 'USD', ' 9999', ['display' => CurrencyData::NO_SYMBOL], '9,999.00'], ['en_US', 'USD', '9999', ['precision' => 1], '$9,999.0'], diff --git a/supported-services.json b/supported-services.json new file mode 100644 index 0000000000000..db11fc5c68800 --- /dev/null +++ b/supported-services.json @@ -0,0 +1,8 @@ +{ + "services": { + "php": [ + 8.1, + 8.2 + ] + } +} \ No newline at end of file