diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index 844c67dbd..000000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,89 +0,0 @@ -# https://mcr.microsoft.com/v2/vscode/devcontainers/php/tags/list -ARG VARIANT=8.1-apache-bookworm -# https://github.com/devcontainers/images/blob/main/src/php/.devcontainer/Dockerfile -FROM mcr.microsoft.com/vscode/devcontainers/php:${VARIANT} - -ENV LANG=C.UTF-8 -# Disable remote database security requirements. -ENV JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK=1 - -# install MariaDB client -RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ - && apt-get install -y mariadb-client \ - && apt-get clean -y && rm -rf /var/lib/apt/lists/* - -# enable Apache2 modules -RUN a2enmod rewrite expires include deflate remoteip headers; - -# install the PHP extensions we need. -RUN set -eux; \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - libfreetype6-dev libicu-dev libjpeg62-turbo-dev \ - libpng-dev libxslt1-dev libzip-dev libwebp-dev libxml2-dev \ - ${PHP_EXTRA_BUILD_DEPS:-}; \ - # https://www.php.net/manual/en/image.installation.php - docker-php-ext-configure gd --enable-gd --with-freetype --with-jpeg --with-webp; \ - docker-php-ext-install -j$(nproc) opcache soap \ - intl gd mysqli pcntl pdo_mysql xsl zip; \ - # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies - apt-mark auto '.*' > /dev/null; \ - [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ - find /usr/local -type f -executable -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ - | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ - | sort -u \ - | xargs -r apt-mark manual; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; - -# set recommended PHP.ini settings -# see https://secure.php.net/manual/en/opcache.installation.php -RUN set -eux; \ - docker-php-ext-enable opcache; \ - { \ - echo 'opcache.memory_consumption=128'; \ - echo 'opcache.interned_strings_buffer=8'; \ - echo 'opcache.max_accelerated_files=4000'; \ - echo 'opcache.revalidate_freq=2'; \ - echo 'opcache.fast_shutdown=1'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini -# set recommended error logging -RUN { \ -# https://www.php.net/manual/en/errorfunc.constants.php - echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ - echo 'display_errors = Off'; \ - echo 'display_startup_errors = Off'; \ - echo 'log_errors = On'; \ - echo 'error_log = /dev/stderr'; \ - echo 'log_errors_max_len = 1024'; \ - echo 'ignore_repeated_errors = On'; \ - echo 'ignore_repeated_source = Off'; \ - echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini - -# Xdebug's default debugging port has changed from 9000 to 9003 since v3 -RUN sed -i 's/9000/9003/' /usr/local/etc/php/conf.d/xdebug.ini -# Reset step debugging activation from yes to default (trigger) -RUN sed -i '/xdebug.start_with_request/d' /usr/local/etc/php/conf.d/xdebug.ini - -# https://hub.docker.com/_/joomla -ARG JOOMLA_VERSION=3.10.12 -# Download package and extract to web volume -RUN set -ex; \ - curl -o joomla.tar.bz2 -SL https://github.com/joomla/joomla-cms/releases/download/${JOOMLA_VERSION}/Joomla_${JOOMLA_VERSION}-Stable-Full_Package.tar.bz2; \ - mkdir /usr/src/joomla; \ - tar -xf joomla.tar.bz2 -C /usr/src/joomla; \ - rm joomla.tar.bz2; \ - chown -R www-data:www-data /usr/src/joomla; \ - chmod -R g+w /usr/src/joomla; - -COPY --from=joomla:3.10.12 /entrypoint.sh /entrypoint.sh -COPY --from=joomla:3.10.12 /makedb.php /makedb.php - -EXPOSE 8080 -ENTRYPOINT ["/entrypoint.sh"] -CMD ["apache2-foreground"] \ No newline at end of file diff --git a/.devcontainer/README.md b/.devcontainer/README.md new file mode 100644 index 000000000..d36f07d9c --- /dev/null +++ b/.devcontainer/README.md @@ -0,0 +1,40 @@ +# Dev Containers + +## Requirements + +- [Docker Engine](https://docs.docker.com/install/) +- [Docker Compose V2](https://docs.docker.com/compose/cli-command/) +- [mkcert](https://github.com/FiloSottile/mkcert) +- [Visual Studio Code](https://code.visualstudio.com/) +- Bash + +## Getting Start + +```sh +# set up TLS certs and hosts in Host +./init.sh www.dev.local store.dev.local + +# start containers +docker compose up -d + +# install OpenMage +./openmage/install.sh + +# install the Joomla! (requires Joomla! version >= 4.3) +./joomla/install.sh +``` + +## Admin URLs + +- [OpenMage](https://store.dev.local/admin/) +- [Joomla!](https://www.dev.local/administrator/) + +## Credentials + +- Username: `admin` +- Password: `ChangeTheP@ssw0rd` + +## Setup + +- [OpenMage](./openmage/) +- [Joomla!](./joomla/) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 87f8f70a0..30622a4e9 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,12 +1,11 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: // https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/php-mariadb -// Update the VARIANT arg in docker-compose.yml to pick a PHP version +// Update the PHP_VERSION arg in docker-compose.yml to pick a PHP version { "name": "Joomla", "dockerComposeFile": "docker-compose.yml", "service": "joomla", "workspaceFolder": "/workspace", - "overrideCommand": false, "customizations": { "vscode": { "extensions": [ @@ -15,6 +14,5 @@ "redhat.vscode-xml" ] } - }, - "forwardPorts": [8080, 3306] + } } diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 1efd851e6..8c4ca3b31 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -2,30 +2,99 @@ version: '2' services: joomla: + container_name: magebridge-joomla build: - context: . - dockerfile: Dockerfile + context: ./joomla args: - VARIANT: "8.1-apache-bookworm" - JOOMLA_VERSION: "3.10.12" + JOOMLA_VERSION: '4.4.0' + PHP_VERSION: '8.2' + image: joomla:magebridge volumes: - - ..:/workspace:cached - joomla-data:/var/www/html + - ..:/workspace:cached + - ./php.ini:/usr/local/etc/php/php.ini:ro + - ./joomla/log:/var/www/html/administrator/logs + environment: + JOOMLA_DB_HOST: ${JOOMLA_DB_HOST:-mysql} + JOOMLA_DB_PASSWORD: ${JOOMLA_DB_PASSWORD:-${MYSQL_ROOT_PASSWORD:-secret}} + # https://xdebug.org/docs/all_settings + XDEBUG_CONFIG: 'client_host=localhost log=/tmp/xdebug.log' + XDEBUG_MODE: develop,debug + external_links: + - traefik:store.dev.local + labels: + - traefik.enable=true + - traefik.http.routers.joomla.entrypoints=websecure + - traefik.http.routers.joomla.rule=Host(`www.dev.local`) + depends_on: + - mysql + - traefik + + openmage: + container_name: magebridge-openmage + build: + context: ./openmage + args: + OPENMAGE_VERSION: '20.2.0' + PHP_VERSION: '8.2' + image: openmage:magebridge + volumes: + - openmage-data:/var/www/html + - ..:/var/www/html/.modman/MageBridge:cached + - ./php.ini:/usr/local/etc/php/php.ini:ro + - ./openmage/log:/var/www/html/var/log environment: - JOOMLA_DB_HOST: mysql - JOOMLA_DB_PASSWORD: secret + # https://github.com/OpenMage/magento-lts/blob/32773dd4f82bb44bac89e8eca97379dad2a10af5/app/Mage.php#L22 + # MAGE_IS_DEVELOPER_MODE: '1' + # https://xdebug.org/docs/all_settings + XDEBUG_CONFIG: 'client_host=localhost log=/tmp/xdebug.log' + XDEBUG_MODE: develop,debug + external_links: + - traefik:www.dev.local + labels: + - traefik.enable=true + - traefik.http.routers.openmage.entrypoints=websecure + - traefik.http.routers.openmage.rule=Host(`store.dev.local`) depends_on: - mysql + - traefik mysql: + container_name: magebridge-mysql # https://hub.docker.com/_/mysql image: mysql volumes: - mysql-data:/var/lib/mysql environment: - MYSQL_ROOT_PASSWORD: secret - MYSQL_DATABASE: joomla + MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-secret} + MYSQL_DATABASE: ${MYSQL_DATABASE:-openmage} + ports: + - 127.0.0.1:3306:3306 + + traefik: + # https://hub.docker.com/_/traefik + image: traefik + volumes: + - /var/run/docker.sock:/var/run/docker.sock:ro + - ./traefik/etc:/etc/traefik + - ./certs:/etc/traefik/certs + command: + - --api.insecure=true + - --api.dashboard=true + - --entrypoints.web.address=:80 + - --entrypoints.web.http.redirections.entryPoint.to=websecure + - --entrypoints.web.http.redirections.entryPoint.scheme=https + - --entrypoints.websecure.address=:443 + - --entrypoints.websecure.http.tls=true + - --providers.docker=true + - --providers.docker.exposedByDefault=false + - --providers.file.directory=/etc/traefik/dynamic/ + ports: + - 127.0.0.1:80:80 + - 127.0.0.1:443:443 + - 127.0.0.1:9090:8080 volumes: joomla-data: null - mysql-data: null \ No newline at end of file + mysql-data: null + openmage-data: null \ No newline at end of file diff --git a/.devcontainer/init.sh b/.devcontainer/init.sh new file mode 100755 index 000000000..1dea1aa7c --- /dev/null +++ b/.devcontainer/init.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +set -euo pipefail + +if [ $# -le 0 ] || [ "$1" == "--help" ] || [ "$1" == "-h" ]; then + echo "Usage: $0 [...]" + exit 1 +fi + +for host in "$@"; do + if ! grep -q "${host}" /etc/hosts; then + echo "127.0.0.1 ${host}" | sudo tee -a /etc/hosts + fi +done + +CURRENTDIR=$(dirname "$0") +CERT_FILE="${CURRENTDIR}/certs/cert.pem" +KEY_FILE="${CURRENTDIR}/certs/key.pem" + +if [ -e "${KEY_FILE}" ] && [ -e "${CERT_FILE}" ]; then + echo "Certificate already exists" + exit 0 +fi + +if [ -z "$(command -v mkcert)" ]; then + echo "mkcert is not installed, try 'brew install mkcert'" + exit 1 +fi + +mkcert -install +mkdir -vp $(dirname "$CERT_FILE") +mkcert -cert-file "$CERT_FILE" -key-file "$KEY_FILE" $@ \ No newline at end of file diff --git a/.devcontainer/joomla/Dockerfile b/.devcontainer/joomla/Dockerfile new file mode 100644 index 000000000..4fe6072a1 --- /dev/null +++ b/.devcontainer/joomla/Dockerfile @@ -0,0 +1,78 @@ +# https://mcr.microsoft.com/v2/vscode/devcontainers/php/tags/list +ARG PHP_VERSION=8.2 +# https://hub.docker.com/_/joomla +ARG JOOMLA_VERSION=4.4.0 + +FROM joomla:${JOOMLA_VERSION}-apache AS joomla + +# https://hub.docker.com/_/php +FROM php:${PHP_VERSION}-apache-bookworm + +ENV LANG=en_US.UTF-8 + +# install MySQL client +RUN apt-get update \ + && apt-get install -y --no-install-recommends default-mysql-client \ + && apt-get clean -y && rm -rf /var/lib/apt/lists/* + +# install pickle +# https://github.com/FriendsOfPHP/pickle +RUN set -eux; \ + curl -Lo /usr/local/bin/pickle https://github.com/FriendsOfPHP/pickle/releases/latest/download/pickle.phar && \ + chmod +x /usr/local/bin/pickle; + +# install the PHP extensions we need +RUN set -eux; \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + libfreetype6-dev libicu-dev libjpeg62-turbo-dev \ + libpng-dev libxml2-dev libxslt1-dev libzip-dev libwebp-dev \ + ${PHP_EXTRA_BUILD_DEPS:-}; \ + # https://www.php.net/manual/en/image.installation.php + docker-php-ext-configure gd --enable-gd --with-freetype --with-jpeg --with-webp; \ + docker-php-ext-install -j$(nproc) opcache \ + intl gd mysqli pcntl pdo_mysql soap xsl zip; \ + pickle install --no-interaction apcu; \ + pickle install --no-interaction redis; \ + pickle install --no-interaction xdebug; \ + docker-php-ext-enable apcu opcache redis xdebug; \ + # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ + find /usr/local -type f -executable -exec ldd '{}' ';' \ + | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ + | sort -u \ + | xargs -r dpkg-query --search \ + | cut -d: -f1 \ + | sort -u \ + | xargs -r apt-mark manual; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + rm -rf /var/lib/apt/lists/*; + +# set up Apache2 +RUN set -eux; \ + # enable Apache2 modules + a2enmod rewrite expires include deflate remoteip headers; \ + # disable Apache2 server signature + echo 'ServerSignature Off' >> /etc/apache2/apache2.conf; \ + echo 'ServerTokens Prod' >> /etc/apache2/apache2.conf; \ + # enable support for TLS termination + echo 'SetEnvIf X-Forwarded-Proto https HTTPS=on' >> /etc/apache2/apache2.conf; + +# install composer +# https://hub.docker.com/_/composer +COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer + +# set up Joomla! +# Disable remote database security requirements. +ENV JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK=1 +COPY --from=joomla /entrypoint.sh / +COPY --from=joomla /makedb.php / +COPY --from=joomla --chown=www-data:www-data /usr/src/joomla /usr/src/joomla +RUN set -eux; \ + chown -R www-data:www-data /usr/src/joomla; \ + chmod -R g+w /usr/src/joomla; + +ENTRYPOINT ["/entrypoint.sh"] +CMD ["apache2-foreground"] \ No newline at end of file diff --git a/.devcontainer/joomla/README.md b/.devcontainer/joomla/README.md new file mode 100644 index 000000000..dae46ca6b --- /dev/null +++ b/.devcontainer/joomla/README.md @@ -0,0 +1,66 @@ +# Joomla Setup + +## Extension Installation + +> System->Install->Extensions + +Upload Package File: `pkg_magebridge.zip` + +## Enable Extensions + +> System->Manage->Extensions + +- Plugin: `Authentication - MageBridge` +- Plugin: `Content - MageBridge` +- Plugin: `MageBridge - Core` +- Plugin: `Magento - MageBridge` +- Plugin: `System - MageBridge` +- Plugin: `User - MageBridge` + +## Configuration + +> Components->`MageBridge`->Configuration + +### API + +- Hostname: `store.dev.local` +- API User: `magebridge_api` +- API Key: `ChangeTheAp1K3y` + +### Bridge + +- Protocol: `HTTPS` +- Enforce SSL: `Entire site` + +### Users + +User synchronization + +- Magento Customer Group: `General` +- Joomla! Usergroup: `Registered` +- Username from Email: `Yes` + +User importing and exporting + +- Website: `Main Website (1)` +- Customer Group: `General` + +## Add Root item + +> Menus->`Main Menu`->`Add New Menu Item` + +### Details + +- Title: `Store` +- Alias: `store` +- Menu Item Type: `MageBridge`->`Root` + +### Magento Scope + +- Store/Store View: `English(default)` + +## System Check + +> Components->`MageBridge`->`System Check` + +Ensure all necessary checks have passed! diff --git a/.devcontainer/joomla/install.sh b/.devcontainer/joomla/install.sh new file mode 100755 index 000000000..4e13aa356 --- /dev/null +++ b/.devcontainer/joomla/install.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash + +docker exec -it magebridge-joomla test -f configuration.php +if [ "$?" -eq "0" ]; then + echo "Joomla! already installed!" + exit 0 +fi + +[ -f .env ] && source .env + +for i in $(seq 1 20); do + docker exec -it magebridge-mysql sh -c "mysql -u${JOOMLA_DB_USER:-root} -p${JOOMLA_DB_PASSWORD:-${MYSQL_ROOT_PASSWORD:-secret}} -e 'show databases;' 2>/dev/null" | grep -qF 'joomla' && break + sleep 1 +done + +docker exec -it magebridge-joomla test -f installation/joomla.php +if [ "$?" -ne "0" ]; then + echo "Joomla! CLI installer not found! (requires Joomla! version >= 4.3)" + exit 1 +fi + +# https://docs.joomla.org/J4.x:Joomla_CLI_Installation +docker exec -it --user www-data magebridge-joomla php installation/joomla.php install \ + --site-name DEMO \ + --admin-user ADMIN \ + --admin-username "${ADMIN_USERNAME:-admin}" \ + --admin-password "${ADMIN_PASSWORD:-ChangeTheP@ssw0rd}" \ + --admin-email "${ADMIN_EMAIL:-admin@example.com}" \ + --db-host "${JOOMLA_DB_HOST:-mysql}" \ + --db-name "${JOOMLA_DB_NAME:-joomla}" \ + --db-user "${JOOMLA_DB_USER:-root}" \ + --db-pass "${JOOMLA_DB_PASSWORD:-${MYSQL_ROOT_PASSWORD:-secret}}" \ + --db-prefix "${JOOMLA_DB_PREFIX:-vlqhe_}" \ + --no-interaction + +echo "Fixing permissions ..." +docker exec -it magebridge-joomla chown -R www-data:www-data /var/www/html \ No newline at end of file diff --git a/.devcontainer/openmage/Dockerfile b/.devcontainer/openmage/Dockerfile new file mode 100644 index 000000000..65bed45ee --- /dev/null +++ b/.devcontainer/openmage/Dockerfile @@ -0,0 +1,102 @@ +# https://github.com/colinmollenhour/docker-openmage/blob/main/8.2/apache/Dockerfile +# https://github.com/OpenMage/magento-lts/tree/main/dev/openmage +ARG PHP_VERSION=8.2 +ARG OPENMAGE_VERSION=20.2.0 + +FROM alpine as unzipper +ARG OPENMAGE_VERSION +RUN set -eux; \ + apk add curl unzip; \ + mkdir -p /usr/src/openmage; \ + curl -Lo /tmp/openmage.zip https://github.com/OpenMage/magento-lts/releases/download/v${OPENMAGE_VERSION}/openmage-v${OPENMAGE_VERSION}.zip; \ + unzip /tmp/openmage.zip -d /usr/src/openmage; \ + rm /tmp/openmage.zip; + +# https://hub.docker.com/_/php +FROM php:${PHP_VERSION}-apache-bookworm + +ENV LANG=en_US.UTF-8 + +# install MySQL client +RUN apt-get update && \ + apt-get install -y --no-install-recommends default-mysql-client && \ + apt-get clean -y && rm -rf /var/lib/apt/lists/* + +# install pickle +# https://github.com/FriendsOfPHP/pickle +RUN set -eux; \ + curl -Lo /usr/local/bin/pickle https://github.com/FriendsOfPHP/pickle/releases/latest/download/pickle.phar && \ + chmod +x /usr/local/bin/pickle; + +# install the PHP extensions we need +RUN set -eux; \ + # https://github.com/colinmollenhour/modman + curl -fSL -o /usr/local/bin/modman https://raw.githubusercontent.com/colinmollenhour/modman/master/modman && \ + chmod +x /usr/local/bin/modman; \ + # https://github.com/netz98/n98-magerun + curl -fSL -o /usr/local/bin/n98-magerun https://files.magerun.net/n98-magerun.phar && \ + chmod +x /usr/local/bin/n98-magerun; \ + # install the PHP extensions we need + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends default-mysql-client \ + libfreetype6-dev libicu-dev libjpeg62-turbo-dev libonig-dev \ + libpng-dev libxml2-dev libxslt1-dev libzip-dev libwebp-dev \ + ${PHP_EXTRA_BUILD_DEPS:-}; \ + # https://www.php.net/manual/en/image.installation.php + docker-php-ext-configure gd --enable-gd --with-freetype --with-jpeg --with-webp; \ + docker-php-ext-install -j$(nproc) opcache \ + intl gd mysqli pcntl pdo_mysql soap xsl zip; \ + pickle install --no-interaction apcu; \ + pickle install --no-interaction redis; \ + pickle install --no-interaction xdebug; \ + docker-php-ext-enable apcu opcache redis xdebug; \ + # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ + find /usr/local -type f -executable -exec ldd '{}' ';' \ + | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ + | sort -u \ + | xargs -r dpkg-query --search \ + | cut -d: -f1 \ + | sort -u \ + | xargs -r apt-mark manual; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + rm -rf /var/lib/apt/lists/*; + +# set up Apache2 +RUN set -eux; \ + # enable Apache2 modules + a2enmod rewrite expires include deflate remoteip headers; \ + # disable Apache2 server signature + echo 'ServerSignature Off' >> /etc/apache2/apache2.conf; \ + echo 'ServerTokens Prod' >> /etc/apache2/apache2.conf; \ + # enable support for TLS termination + echo 'SetEnvIf X-Forwarded-Proto https HTTPS=on' >> /etc/apache2/apache2.conf; + +# install composer +# https://hub.docker.com/_/composer +COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer + +# install modman +# https://github.com/colinmollenhour/modman +RUN set -eux; \ + curl -fSL -o /usr/local/bin/modman https://raw.githubusercontent.com/colinmollenhour/modman/master/modman && \ + chmod +x /usr/local/bin/modman; + +# install n98-magerun +# https://github.com/netz98/n98-magerun +RUN set -eux; \ + curl -fSL -o /usr/local/bin/n98-magerun https://files.magerun.net/n98-magerun.phar && \ + chmod +x /usr/local/bin/n98-magerun; + +# set up OpenMage +COPY ./docker-entrypoint.sh / +COPY --from=unzipper --chown=www-data:www-data /usr/src/openmage /usr/src/openmage +RUN set -eux; \ + chmod +x /docker-entrypoint.sh; \ + chown -R www-data:www-data /usr/src/openmage; \ + chmod -R g+w /usr/src/openmage; + +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "apache2-foreground" ] \ No newline at end of file diff --git a/.devcontainer/openmage/README.md b/.devcontainer/openmage/README.md new file mode 100644 index 000000000..1ed9baf45 --- /dev/null +++ b/.devcontainer/openmage/README.md @@ -0,0 +1,43 @@ +# OpenMage Setup + +## Create API Role + +> System->`Web Services`->`SOAP/XML-RPC Users`->`Add New Role` + +- Role Name: `MageBridge` +- Resource Access: `All` + +## Create API User + +> System->`Web Services`->`SOAP/XML-RPC Users`->`Add New User` + +- User Name: `magebridge_api` +- First Name: `Mage` +- Last Name: `Bridge` +- Email: `magebridge@example.com` +- API Key: `ChangeTheAp1K3y` +- User Role: `MageBridge` + +## Configuration + +> System->Configuration->Services->`MageBridge` + +### MageBridge Core - API + +> Once Joomla! accesses MageBridge, the API configuration is automatically configured + +- Joomla! API auto-detect: `Yes` +- Auto-configure allowed IPs: `No` + +### MageBridge Core - Debugging + +> once you needs debug problems + +- Debug Log: `Yes` +- Print errors: `Yes` + +## System Check + +> CMS->`MageBridge`->`System Check` + +Ensure all necessary checks have passed! diff --git a/.devcontainer/openmage/docker-entrypoint.sh b/.devcontainer/openmage/docker-entrypoint.sh new file mode 100755 index 000000000..7546ce158 --- /dev/null +++ b/.devcontainer/openmage/docker-entrypoint.sh @@ -0,0 +1,64 @@ +#!/bin/env bash +set -e + +if [[ "$1" == apache2* ]]; then + uid="$(id -u)" + gid="$(id -g)" + if [ "$uid" = '0' ]; then + case "$1" in + apache2*) + user="${APACHE_RUN_USER:-www-data}" + group="${APACHE_RUN_GROUP:-www-data}" + + # strip off any '#' symbol ('#1000' is valid syntax for Apache) + pound='#' + user="${user#$pound}" + group="${group#$pound}" + + # set user if not exist + if ! id "$user" &>/dev/null; then + # get the user name + : "${USER_NAME:=www-data}" + # change the user name + [[ "$USER_NAME" != "www-data" ]] && + usermod -l "$USER_NAME" www-data && + groupmod -n "$USER_NAME" www-data + # update the user ID + groupmod -o -g "$user" "$USER_NAME" + # update the user-group ID + usermod -o -u "$group" "$USER_NAME" + fi + ;; + *) + user='www-data' + group='www-data' + ;; + esac + else + user="$uid" + group="$gid" + fi + if [ ! -e '/var/www/html/app/etc/config.xml' ]; then + sourceTarArgs=( + --create + --file - + --directory /usr/src/openmage + --one-file-system + --owner "$user" --group "$group" + ) + targetTarArgs=( + --extract + --file - + --directory /var/www/html + ) + if [ "$uid" != '0' ]; then + # avoid "tar: .: Cannot utime: Operation not permitted" and "tar: .: Cannot change mode to rwxr-xr-x: Operation not permitted" + targetTarArgs+=(--no-overwrite-dir) + fi + + tar "${sourceTarArgs[@]}" . | tar "${targetTarArgs[@]}" + echo >&2 "OpenMage has been successfully copied to /var/www/html" + fi +fi + +exec "$@" diff --git a/.devcontainer/openmage/install.sh b/.devcontainer/openmage/install.sh new file mode 100755 index 000000000..a1a0d7153 --- /dev/null +++ b/.devcontainer/openmage/install.sh @@ -0,0 +1,85 @@ +#!/usr/bin/env bash +# https://github.com/OpenMage/magento-lts/blob/main/dev/openmage/install.sh + +[ -f .env ] && source .env + +docker exec -it magebridge-openmage test -f app/etc/local.xml +if [ "$?" -eq "0" ]; then + echo "OpenMage already installed!" + exit 0 +fi + +echo "Checking database ..." +for i in $(seq 1 20); do + docker exec -it magebridge-mysql sh -c "mysql -uroot -p${MYSQL_ROOT_PASSWORD:-secret} -e 'show databases;' 2>/dev/null" | grep -qF 'openmage' && break + sleep 1 +done + +INSTALL_SAMPLE_DATA="${INSTALL_SAMPLE_DATA:-true}" + +if [ "${INSTALL_SAMPLE_DATA}" = "true" ]; then + SAMPLE_DATA_DIR="${SAMPLE_DATA_DIR:-magento-sample-data-1.9.2.4}" + SAMPLE_DATA_SQL="${SAMPLE_DATA_SQL:-magento_sample_data_for_1.9.2.4.sql}" + docker exec -it magebridge-openmage test -d /tmp/${SAMPLE_DATA_DIR} + if [ "$?" -ne "0" ]; then + echo "Downloading Sample Data ..." + docker exec -it --user www-data magebridge-openmage curl -Lo /tmp/sample_data.tgz "${SAMPLE_DATA_URL:-https://github.com/Vinai/compressed-magento-sample-data/raw/master/compressed-magento-sample-data-1.9.2.4.tgz}" + + echo "Uncompressing Sample Data ..." + docker exec -it --user www-data magebridge-openmage tar zxf /tmp/sample_data.tgz -C /tmp/ + + echo "Copying Sample Data into the OpenMage directory..." + docker exec -it --user www-data magebridge-openmage sh -c "cp -r /tmp/${SAMPLE_DATA_DIR}/* /var/www/html/" + + echo "Importing Sample Data into the database..." + docker exec -it --user www-data magebridge-openmage sh -c "mysql -h ${OPENMAGE_DB_HOST:-mysql} -u${OPENMAGE_DB_USER:-root} -p${OPENMAGE_DB_PASSWORD:-${MYSQL_ROOT_PASSWORD:-secret}} ${OPENMAGE_DB_NAME:-openmage} < /tmp/${SAMPLE_DATA_DIR}/${SAMPLE_DATA_SQL}" + + echo "Cleaning up ..." + docker exec -it --user www-data magebridge-openmage rm /tmp/sample_data.tgz + docker exec -it --user www-data magebridge-openmage rm "/var/www/html/${SAMPLE_DATA_SQL}" + fi +fi + +echo "Installing OpenMage ..." +docker exec -it --user www-data magebridge-openmage php install.php \ + --admin_firstname OpenMage \ + --admin_lastname Admin \ + --admin_username "${ADMIN_USERNAME:-admin}" \ + --admin_password "${ADMIN_PASSWORD:-ChangeTheP@ssw0rd}" \ + --admin_email "${ADMIN_EMAIL:-admin@example.com}" \ + --db_host "${OPENMAGE_DB_HOST:-mysql}" \ + --db_name "${OPENMAGE_DB_NAME:-openmage}" \ + --db_user "${OPENMAGE_DB_USER:-root}" \ + --db_pass "${OPENMAGE_DB_PASSWORD:-${MYSQL_ROOT_PASSWORD:-secret}}" \ + --locale "${LOCALE:-en_US}" \ + --timezone "${TIMEZONE:-America/New_York}" \ + --default_currency "${CURRENCY:-USD}" \ + --url "$(echo ${BASE_URL:-"https://store.dev.local"} | sed -e 's/^https:/http:/')" \ + --secure_base_url "$(echo ${BASE_URL:-"https://store.dev.local"} | sed -e 's/^http:/https:/')" \ + --skip_url_validation \ + --license_agreement_accepted yes \ + --use_rewrites yes \ + --use_secure yes \ + --use_secure_admin yes \ + --encryption_key "${ENCRYPTION_KEY:-}" + +echo "Installing MageBridge module ..." +docker exec -it --user www-data magebridge-openmage modman deploy MageBridge + +echo "Configuring MageBridge module ..." +docker exec -it --user www-data magebridge-openmage n98-magerun config:set 'magebridge/joomla/autoadd_allowed_ips' 0 + +echo "Disable auto-redirect to base URL ..." +docker exec -it --user www-data magebridge-openmage n98-magerun config:set 'web/url/redirect_to_base' 0 + +echo "Clear catalog product URL suffix ..." +docker exec -it --user www-data magebridge-openmage n98-magerun config:set 'catalog/seo/category_url_suffix' '' + +echo "Clear catalog product URL suffix ..." +docker exec -it --user www-data magebridge-openmage n98-magerun config:set 'catalog/seo/product_url_suffix' '' + +echo "Refreshing cache ..." +docker exec -it --user www-data magebridge-openmage n98-magerun cache:flush + +echo "Fixing permissions ..." +docker exec -it magebridge-openmage chown -R www-data:www-data /var/www/html \ No newline at end of file diff --git a/.devcontainer/php.ini b/.devcontainer/php.ini new file mode 100644 index 000000000..0b20022d2 --- /dev/null +++ b/.devcontainer/php.ini @@ -0,0 +1,23 @@ +expose_php=Off +memory_limit=512M +upload_max_filesize=256M +post_max_size=256M +max_execution_time=600 +; https://www.php.net/manual/en/errorfunc.constants.php +error_reporting=E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED +display_errors=Off +display_startup_errors=Off +log_errors=On +error_log=/dev/stderr +log_errors_max_len=1024 +ignore_repeated_errors=On +ignore_repeated_source=Off +html_errors=Off +; https://secure.php.net/manual/en/opcache.installation.php +opcache.memory_consumption=128 +opcache.interned_strings_buffer=8 +opcache.max_accelerated_files=4000 +opcache.revalidate_freq=2 +opcache.fast_shutdown=1 +; https://www.php.net/manual/en/apcu.configuration.php +apc.enable_cli=1 \ No newline at end of file diff --git a/.devcontainer/traefik/etc/dynamic/tls.yml b/.devcontainer/traefik/etc/dynamic/tls.yml new file mode 100644 index 000000000..e0581b3fb --- /dev/null +++ b/.devcontainer/traefik/etc/dynamic/tls.yml @@ -0,0 +1,9 @@ +tls: + options: + default: + minVersion: VersionTLS12 + stores: + default: + defaultCertificate: + certFile: /etc/traefik/certs/cert.pem + keyFile: /etc/traefik/certs/key.pem diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 1f5dc1301..527df2b38 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - name: Build assets - run: composer build + run: ./build.sh - name: Pre-release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') && (contains(github.ref,'dev') || contains(github.ref,'beta') || contains(github.ref,'alpha') || contains(github.ref,'rc')) @@ -23,11 +23,11 @@ jobs: prerelease: true generate_release_notes: true files: | - build/pkg_magebridge.zip + dist/pkg_magebridge.zip - name: Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') && !(contains(github.ref,'dev') || contains(github.ref,'beta') || contains(github.ref,'alpha') || contains(github.ref,'rc')) with: generate_release_notes: true files: | - build/pkg_magebridge.zip + dist/pkg_magebridge.zip diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 944a2eed4..6ca1b58f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: - name: Set up PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.1' + php-version: '8.2' extensions: ctype, curl, dom, gd, hash, iconv, intl, json, libxml, mbstring, pdo, simplexml, soap, zip coverage: none - name: Validate composer.json and composer.lock diff --git a/.gitignore b/.gitignore index ff44f01f5..e75f70b89 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,11 @@ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. -# dependencies +# dev containers +/.devcontainer/**/.env +/.devcontainer/**/*.pem +/.devcontainer/**/log/ + +# Composer dependencies /vendor/ # IDE - VSCode @@ -20,5 +25,5 @@ Thumbs.db tmp/ # misc -/build/ +/dist/ /magento/var \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index be893e615..9b3ea69f1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -13,6 +13,9 @@ "**/tmp/**" ], "cSpell.words": [ + "Authorise", + "behaviour", + "Initialise", "Joomla", "magebridge", "Magento", diff --git a/README.md b/README.md index dc585a051..342d2ab2a 100644 --- a/README.md +++ b/README.md @@ -11,5 +11,5 @@ This is the repository for the MageBridge Open Core. It includes the main Joomla - PHP >= 8.1 - [Composer](https://getcomposer.org/) -- [Joomla!](https://www.joomla.org/) 3.x -- [OpenMage](https://github.com/OpenMage/magento-lts) 19.x +- [Joomla!](https://www.joomla.org/) 3.10.x or 4.x +- [OpenMage](https://github.com/OpenMage/magento-lts) 19.x or 20.x diff --git a/build.sh b/build.sh new file mode 100755 index 000000000..a6e79ba98 --- /dev/null +++ b/build.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash + +set -euo pipefail + +pwd=$(dirname "$0") +output_file=${pwd}/dist/pkg_magebridge.zip + +php ${pwd}/bundle.php ${pwd}/joomla/libraries/yireo/yireo.xml ${pwd}/joomla/packages/lib_yireo.zip +php ${pwd}/bundle.php ${pwd}/joomla/com_magebridge.xml ${pwd}/joomla/packages/com_magebridge.zip +php ${pwd}/bundle.php ${pwd}/joomla/modules/mod_magebridge_block/mod_magebridge_block.xml ${pwd}/joomla/packages/mod_magebridge_block.zip +php ${pwd}/bundle.php ${pwd}/joomla/modules/mod_magebridge_cart/mod_magebridge_cart.xml ${pwd}/joomla/packages/mod_magebridge_cart.zip +php ${pwd}/bundle.php ${pwd}/joomla/modules/mod_magebridge_cms/mod_magebridge_cms.xml ${pwd}/joomla/packages/mod_magebridge_cms.zip +php ${pwd}/bundle.php ${pwd}/joomla/modules/mod_magebridge_login/mod_magebridge_login.xml ${pwd}/joomla/packages/mod_magebridge_login.zip +php ${pwd}/bundle.php ${pwd}/joomla/modules/mod_magebridge_menu/mod_magebridge_menu.xml ${pwd}/joomla/packages/mod_magebridge_menu.zip +php ${pwd}/bundle.php ${pwd}/joomla/modules/mod_magebridge_newsletter/mod_magebridge_newsletter.xml ${pwd}/joomla/packages/mod_magebridge_newsletter.zip +php ${pwd}/bundle.php ${pwd}/joomla/modules/mod_magebridge_progress/mod_magebridge_progress.xml ${pwd}/joomla/packages/mod_magebridge_progress.zip +php ${pwd}/bundle.php ${pwd}/joomla/modules/mod_magebridge_switcher/mod_magebridge_switcher.xml ${pwd}/joomla/packages/mod_magebridge_switcher.zip +php ${pwd}/bundle.php ${pwd}/joomla/modules/mod_magebridge_widget/mod_magebridge_widget.xml ${pwd}/joomla/packages/mod_magebridge_widget.zip +php ${pwd}/bundle.php ${pwd}/joomla/plugins/authentication/magebridge/magebridge.xml ${pwd}/joomla/packages/plg_authentication_magebridge.zip +php ${pwd}/bundle.php ${pwd}/joomla/plugins/community/magebridge/magebridge.xml ${pwd}/joomla/packages/plg_community_magebridge.zip +php ${pwd}/bundle.php ${pwd}/joomla/plugins/content/magebridge/magebridge.xml ${pwd}/joomla/packages/plg_content_magebridge.zip +php ${pwd}/bundle.php ${pwd}/joomla/plugins/finder/magebridge/magebridge.xml ${pwd}/joomla/packages/plg_finder_magebridge.zip +php ${pwd}/bundle.php ${pwd}/joomla/plugins/magebridge/magebridge/magebridge.xml ${pwd}/joomla/packages/plg_magebridge_magebridge.zip +php ${pwd}/bundle.php ${pwd}/joomla/plugins/magebridgenewsletter/example/example.xml ${pwd}/joomla/packages/plg_magebridgenewsletter_example.zip +php ${pwd}/bundle.php ${pwd}/joomla/plugins/magebridgeproduct/example/example.xml ${pwd}/joomla/packages/plg_magebridgeproduct_example.zip +php ${pwd}/bundle.php ${pwd}/joomla/plugins/magebridgestore/example/example.xml ${pwd}/joomla/packages/plg_magebridgestore_example.zip +php ${pwd}/bundle.php ${pwd}/joomla/plugins/magebridgestore/falang/falang.xml ${pwd}/joomla/packages/plg_magebridgestore_falang.zip +php ${pwd}/bundle.php ${pwd}/joomla/plugins/magebridgestore/joomfish/joomfish.xml ${pwd}/joomla/packages/plg_magebridgestore_joomfish.zip +php ${pwd}/bundle.php ${pwd}/joomla/plugins/magebridgestore/joomla/joomla.xml ${pwd}/joomla/packages/plg_magebridgestore_joomla.zip +php ${pwd}/bundle.php ${pwd}/joomla/plugins/magebridgestore/nooku/nooku.xml ${pwd}/joomla/packages/plg_magebridgestore_nooku.zip +php ${pwd}/bundle.php ${pwd}/joomla/plugins/magento/magebridge/magebridge.xml ${pwd}/joomla/packages/plg_magento_magebridge.zip +php ${pwd}/bundle.php ${pwd}/joomla/plugins/search/magebridge/magebridge.xml ${pwd}/joomla/packages/plg_search_magebridge.zip +php ${pwd}/bundle.php ${pwd}/joomla/plugins/system/magebridge/magebridge.xml ${pwd}/joomla/packages/plg_system_magebridge.zip +php ${pwd}/bundle.php ${pwd}/joomla/plugins/system/magebridgepositions/magebridgepositions.xml ${pwd}/joomla/packages/plg_system_magebridgepositions.zip +php ${pwd}/bundle.php ${pwd}/joomla/plugins/system/magebridgepre/magebridgepre.xml ${pwd}/joomla/packages/plg_system_magebridgepre.zip +php ${pwd}/bundle.php ${pwd}/joomla/plugins/system/magebridgert/magebridgert.xml ${pwd}/joomla/packages/plg_system_magebridgert.zip +php ${pwd}/bundle.php ${pwd}/joomla/plugins/system/magebridgesample/magebridgesample.xml ${pwd}/joomla/packages/plg_system_magebridgesample.zip +php ${pwd}/bundle.php ${pwd}/joomla/plugins/system/magebridget3/magebridget3.xml ${pwd}/joomla/packages/plg_system_magebridget3.zip +php ${pwd}/bundle.php ${pwd}/joomla/plugins/system/magebridgeyoo/magebridgeyoo.xml ${pwd}/joomla/packages/plg_system_magebridgeyoo.zip +php ${pwd}/bundle.php ${pwd}/joomla/plugins/system/magebridgezoo/magebridgezoo.xml ${pwd}/joomla/packages/plg_system_magebridgezoo.zip +php ${pwd}/bundle.php ${pwd}/joomla/plugins/user/magebridge/magebridge.xml ${pwd}/joomla/packages/plg_user_magebridge.zip +php ${pwd}/bundle.php ${pwd}/joomla/plugins/user/magebridgefirstlast/magebridgefirstlast.xml ${pwd}/joomla/packages/plg_user_magebridgefirstlast.zip +php ${pwd}/bundle.php ${pwd}/joomla/templates/magebridge_root/templateDetails.xml ${pwd}/joomla/packages/tpl_magebridge_root.zip +php ${pwd}/bundle.php ${pwd}/joomla/pkg_magebridge.xml ${output_file} + +rm -rf ${pwd}/joomla/packages + +echo "" +echo "Created ${output_file}" \ No newline at end of file diff --git a/composer.json b/composer.json index 4b521566d..2b8a1106e 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,8 @@ ], "config": { "allow-plugins": { - "magento-hackathon/magento-composer-installer": true + "magento-hackathon/magento-composer-installer": true, + "cweagans/composer-patches": true }, "preferred-install": "dist", "sort-packages": true @@ -25,15 +26,15 @@ "type": "package", "package": { "name": "joomla/joomla-cms", - "version": "3.10.12", + "version": "4.4.0", "dist": { - "url": "https://github.com/joomla/joomla-cms/releases/download/3.10.12/Joomla_3.10.12-Stable-Full_Package.zip", + "url": "https://github.com/joomla/joomla-cms/releases/download/4.4.0/Joomla_4.4.0-Stable-Full_Package.zip", "type": "zip" }, "source": { "url": "https://github.com/joomla/joomla-cms.git", "type": "git", - "reference": "tags/3.10.12" + "reference": "tags/4.4.0" } } }, @@ -52,14 +53,14 @@ ], "require": { "php": ">=8.1", - "magento-hackathon/magento-composer-installer": "^4.0" + "magento-hackathon/magento-composer-installer": "^4.0.2" }, "require-dev": { "akunzai/joomla-stubs": "dev-master", - "friendsofphp/php-cs-fixer": "^v3.21.2", - "joomla/joomla-cms": "3.10.12", - "openmage/magento-lts": "^v20.0.20", - "phpstan/phpstan": "^1.10.25" + "friendsofphp/php-cs-fixer": "v3.40.0", + "joomla/joomla-cms": "4.4.0", + "openmage/magento-lts": "v20.2.0", + "phpstan/phpstan": "^1.10.44" }, "extra": { "magento-root-dir": "vendor/openmage/magento-lts" @@ -79,44 +80,7 @@ "phpstan analyse --generate-baseline" ], "build": [ - "php ./bundle.php ./joomla/libraries/yireo/yireo.xml ./joomla/packages/lib_yireo.zip", - "php ./bundle.php ./joomla/com_magebridge.xml ./joomla/packages/com_magebridge.zip", - "php ./bundle.php ./joomla/modules/mod_magebridge_block/mod_magebridge_block.xml ./joomla/packages/mod_magebridge_block.zip", - "php ./bundle.php ./joomla/modules/mod_magebridge_cart/mod_magebridge_cart.xml ./joomla/packages/mod_magebridge_cart.zip", - "php ./bundle.php ./joomla/modules/mod_magebridge_cms/mod_magebridge_cms.xml ./joomla/packages/mod_magebridge_cms.zip", - "php ./bundle.php ./joomla/modules/mod_magebridge_login/mod_magebridge_login.xml ./joomla/packages/mod_magebridge_login.zip", - "php ./bundle.php ./joomla/modules/mod_magebridge_menu/mod_magebridge_menu.xml ./joomla/packages/mod_magebridge_menu.zip", - "php ./bundle.php ./joomla/modules/mod_magebridge_newsletter/mod_magebridge_newsletter.xml ./joomla/packages/mod_magebridge_newsletter.zip", - "php ./bundle.php ./joomla/modules/mod_magebridge_progress/mod_magebridge_progress.xml ./joomla/packages/mod_magebridge_progress.zip", - "php ./bundle.php ./joomla/modules/mod_magebridge_switcher/mod_magebridge_switcher.xml ./joomla/packages/mod_magebridge_switcher.zip", - "php ./bundle.php ./joomla/modules/mod_magebridge_widget/mod_magebridge_widget.xml ./joomla/packages/mod_magebridge_widget.zip", - "php ./bundle.php ./joomla/plugins/authentication/magebridge/magebridge.xml ./joomla/packages/plg_authentication_magebridge.zip", - "php ./bundle.php ./joomla/plugins/community/magebridge/magebridge.xml ./joomla/packages/plg_community_magebridge.zip", - "php ./bundle.php ./joomla/plugins/content/magebridge/magebridge.xml ./joomla/packages/plg_content_magebridge.zip", - "php ./bundle.php ./joomla/plugins/finder/magebridge/magebridge.xml ./joomla/packages/plg_finder_magebridge.zip", - "php ./bundle.php ./joomla/plugins/magebridge/magebridge/magebridge.xml ./joomla/packages/plg_magebridge_magebridge.zip", - "php ./bundle.php ./joomla/plugins/magebridgenewsletter/example/example.xml ./joomla/packages/plg_magebridgenewsletter_example.zip", - "php ./bundle.php ./joomla/plugins/magebridgeproduct/example/example.xml ./joomla/packages/plg_magebridgeproduct_example.zip", - "php ./bundle.php ./joomla/plugins/magebridgestore/example/example.xml ./joomla/packages/plg_magebridgestore_example.zip", - "php ./bundle.php ./joomla/plugins/magebridgestore/falang/falang.xml ./joomla/packages/plg_magebridgestore_falang.zip", - "php ./bundle.php ./joomla/plugins/magebridgestore/joomfish/joomfish.xml ./joomla/packages/plg_magebridgestore_joomfish.zip", - "php ./bundle.php ./joomla/plugins/magebridgestore/joomla/joomla.xml ./joomla/packages/plg_magebridgestore_joomla.zip", - "php ./bundle.php ./joomla/plugins/magebridgestore/nooku/nooku.xml ./joomla/packages/plg_magebridgestore_nooku.zip", - "php ./bundle.php ./joomla/plugins/magento/magebridge/magebridge.xml ./joomla/packages/plg_magento_magebridge.zip", - "php ./bundle.php ./joomla/plugins/search/magebridge/magebridge.xml ./joomla/packages/plg_search_magebridge.zip", - "php ./bundle.php ./joomla/plugins/system/magebridge/magebridge.xml ./joomla/packages/plg_system_magebridge.zip", - "php ./bundle.php ./joomla/plugins/system/magebridgepositions/magebridgepositions.xml ./joomla/packages/plg_system_magebridgepositions.zip", - "php ./bundle.php ./joomla/plugins/system/magebridgepre/magebridgepre.xml ./joomla/packages/plg_system_magebridgepre.zip", - "php ./bundle.php ./joomla/plugins/system/magebridgert/magebridgert.xml ./joomla/packages/plg_system_magebridgert.zip", - "php ./bundle.php ./joomla/plugins/system/magebridgesample/magebridgesample.xml ./joomla/packages/plg_system_magebridgesample.zip", - "php ./bundle.php ./joomla/plugins/system/magebridget3/magebridget3.xml ./joomla/packages/plg_system_magebridget3.zip", - "php ./bundle.php ./joomla/plugins/system/magebridgeyoo/magebridgeyoo.xml ./joomla/packages/plg_system_magebridgeyoo.zip", - "php ./bundle.php ./joomla/plugins/system/magebridgezoo/magebridgezoo.xml ./joomla/packages/plg_system_magebridgezoo.zip", - "php ./bundle.php ./joomla/plugins/user/magebridge/magebridge.xml ./joomla/packages/plg_user_magebridge.zip", - "php ./bundle.php ./joomla/plugins/user/magebridgefirstlast/magebridgefirstlast.xml ./joomla/packages/plg_user_magebridgefirstlast.zip", - "php ./bundle.php ./joomla/templates/magebridge_root/templateDetails.xml ./joomla/packages/tpl_magebridge_root.zip", - "php ./bundle.php ./joomla/pkg_magebridge.xml ./build/pkg_magebridge.zip", - "rm -rf ./joomla/packages" + "./build.sh" ] } } diff --git a/composer.lock b/composer.lock index 95ae3272b..90e2816ea 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9e718d0fad225a790d3d1a388e010211", + "content-hash": "566f92bcc0b1fcaa30588fe886aec565", "packages": [ { "name": "eloquent/enumeration", @@ -59,6 +59,7 @@ "issues": "https://github.com/eloquent/enumeration/issues", "source": "https://github.com/eloquent/enumeration/tree/master" }, + "abandoned": true, "time": "2015-11-03T22:21:38+00:00" }, { @@ -117,16 +118,16 @@ }, { "name": "justinrainbow/json-schema", - "version": "5.2.12", + "version": "v5.2.13", "source": { "type": "git", "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60" + "reference": "fbbe7e5d79f618997bc3332a6f49246036c45793" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", - "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/fbbe7e5d79f618997bc3332a6f49246036c45793", + "reference": "fbbe7e5d79f618997bc3332a6f49246036c45793", "shasum": "" }, "require": { @@ -181,16 +182,16 @@ ], "support": { "issues": "https://github.com/justinrainbow/json-schema/issues", - "source": "https://github.com/justinrainbow/json-schema/tree/5.2.12" + "source": "https://github.com/justinrainbow/json-schema/tree/v5.2.13" }, - "time": "2022-04-13T08:02:27+00:00" + "time": "2023-09-26T02:20:38+00:00" }, { "name": "magento-hackathon/magento-composer-installer", "version": "4.0.2", "source": { "type": "git", - "url": "https://github.com/Cotya/magento-composer-installer.git", + "url": "git@github.com:Cotya/magento-composer-installer.git", "reference": "ece5cc5bb2a0150a743619901543036597f9eb5b" }, "dist": { @@ -231,7 +232,17 @@ "MagentoHackathon\\Composer": "src/" } }, - "notification-url": "https://packagist.org/downloads/", + "autoload-dev": { + "psr-0": { + "MagentoHackathon\\Composer\\Magento": "tests/" + } + }, + "archive": { + "exclude": [ + "vendor", + "/tests/FullStackTest/" + ] + }, "license": [ "OSL-3.0" ], @@ -268,20 +279,6 @@ "magento", "openmage" ], - "support": { - "issues": "https://github.com/Cotya/magento-composer-installer/issues", - "source": "https://github.com/Cotya/magento-composer-installer/tree/4.0.2" - }, - "funding": [ - { - "url": "https://github.com/sponsors/Flyingmana", - "type": "github" - }, - { - "url": "https://www.patreon.com/Flyingmana", - "type": "patreon" - } - ], "time": "2022-04-20T19:23:22+00:00" }, { @@ -339,16 +336,16 @@ }, { "name": "symfony/console", - "version": "v5.4.24", + "version": "v5.4.31", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8" + "reference": "11ac5f154e0e5c4c77af83ad11ead9165280b92a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8", - "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8", + "url": "https://api.github.com/repos/symfony/console/zipball/11ac5f154e0e5c4c77af83ad11ead9165280b92a", + "reference": "11ac5f154e0e5c4c77af83ad11ead9165280b92a", "shasum": "" }, "require": { @@ -418,7 +415,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.24" + "source": "https://github.com/symfony/console/tree/v5.4.31" }, "funding": [ { @@ -434,11 +431,11 @@ "type": "tidelift" } ], - "time": "2023-05-26T05:13:16+00:00" + "time": "2023-10-31T07:58:33+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.3.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", @@ -485,7 +482,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" }, "funding": [ { @@ -505,16 +502,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", "shasum": "" }, "require": { @@ -529,7 +526,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -567,7 +564,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" }, "funding": [ { @@ -583,20 +580,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354" + "reference": "875e90aeea2777b6f135677f618529449334a612" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", + "reference": "875e90aeea2777b6f135677f618529449334a612", "shasum": "" }, "require": { @@ -608,7 +605,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -648,7 +645,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" }, "funding": [ { @@ -664,20 +661,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", "shasum": "" }, "require": { @@ -689,7 +686,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -732,7 +729,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" }, "funding": [ { @@ -748,20 +745,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + "reference": "42292d99c55abe617799667f454222c54c60e229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", + "reference": "42292d99c55abe617799667f454222c54c60e229", "shasum": "" }, "require": { @@ -776,7 +773,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -815,7 +812,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" }, "funding": [ { @@ -831,20 +828,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-07-28T09:04:16+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5", "shasum": "" }, "require": { @@ -853,7 +850,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -894,7 +891,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.28.0" }, "funding": [ { @@ -910,20 +907,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", "shasum": "" }, "require": { @@ -932,7 +929,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -977,7 +974,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" }, "funding": [ { @@ -993,20 +990,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.3.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4" + "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", - "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/b3313c2dbffaf71c8de2934e2ea56ed2291a3838", + "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838", "shasum": "" }, "require": { @@ -1059,7 +1056,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.4.0" }, "funding": [ { @@ -1075,20 +1072,20 @@ "type": "tidelift" } ], - "time": "2023-05-23T14:45:45+00:00" + "time": "2023-07-30T20:28:31+00:00" }, { "name": "symfony/string", - "version": "v6.3.0", + "version": "v6.3.8", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f" + "reference": "13880a87790c76ef994c91e87efb96134522577a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/f2e190ee75ff0f5eced645ec0be5c66fac81f51f", - "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f", + "url": "https://api.github.com/repos/symfony/string/zipball/13880a87790c76ef994c91e87efb96134522577a", + "reference": "13880a87790c76ef994c91e87efb96134522577a", "shasum": "" }, "require": { @@ -1145,7 +1142,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.3.0" + "source": "https://github.com/symfony/string/tree/v6.3.8" }, "funding": [ { @@ -1161,7 +1158,7 @@ "type": "tidelift" } ], - "time": "2023-03-21T21:06:29+00:00" + "time": "2023-11-09T08:28:21+00:00" } ], "packages-dev": [ @@ -1175,18 +1172,191 @@ }, "type": "library" }, + { + "name": "colinmollenhour/cache-backend-redis", + "version": "1.17.0", + "source": { + "type": "git", + "url": "git@github.com:colinmollenhour/Cm_Cache_Backend_Redis.git", + "reference": "dc2fd4fab8cb6b11e161f0eacdd5465c5b42b6f1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/colinmollenhour/Cm_Cache_Backend_Redis/zipball/dc2fd4fab8cb6b11e161f0eacdd5465c5b42b6f1", + "reference": "dc2fd4fab8cb6b11e161f0eacdd5465c5b42b6f1", + "shasum": "" + }, + "require": { + "colinmollenhour/credis": "^1.14" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.4", + "phpunit/phpunit": "^9", + "zf1s/zend-cache": "~1.15" + }, + "type": "magento-module", + "autoload": { + "classmap": [ + "Cm/Cache/Backend/Redis.php" + ] + }, + "scripts": { + "test": [ + "vendor/bin/phpunit tests" + ], + "php-cs-fixer": [ + "vendor/bin/php-cs-fixer fix --diff" + ] + }, + "license": [ + "BSD-3-Clause-Modification" + ], + "authors": [ + { + "name": "Colin Mollenhour" + } + ], + "description": "Zend_Cache backend using Redis with full support for tags.", + "homepage": "https://github.com/colinmollenhour/Cm_Cache_Backend_Redis", + "time": "2023-10-25T17:06:02+00:00" + }, + { + "name": "colinmollenhour/credis", + "version": "v1.16.0", + "source": { + "type": "git", + "url": "https://github.com/colinmollenhour/credis.git", + "reference": "5641140e14a9679f5a6f66c97268727f9558b881" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/5641140e14a9679f5a6f66c97268727f9558b881", + "reference": "5641140e14a9679f5a6f66c97268727f9558b881", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "suggest": { + "ext-redis": "Improved performance for communicating with redis" + }, + "type": "library", + "autoload": { + "classmap": [ + "Client.php", + "Cluster.php", + "Sentinel.php", + "Module.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Colin Mollenhour", + "email": "colin@mollenhour.com" + } + ], + "description": "Credis is a lightweight interface to the Redis key-value store which wraps the phpredis library when available for better performance.", + "homepage": "https://github.com/colinmollenhour/credis", + "support": { + "issues": "https://github.com/colinmollenhour/credis/issues", + "source": "https://github.com/colinmollenhour/credis/tree/v1.16.0" + }, + "time": "2023-10-26T17:02:51+00:00" + }, + { + "name": "colinmollenhour/magento-redis-session", + "version": "3.2.0", + "source": { + "type": "git", + "url": "git@github.com:colinmollenhour/Cm_RedisSession.git", + "reference": "4f10ca7b2370192f05d04d6e185cf2896b8a14aa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/colinmollenhour/Cm_RedisSession/zipball/4f10ca7b2370192f05d04d6e185cf2896b8a14aa", + "reference": "4f10ca7b2370192f05d04d6e185cf2896b8a14aa", + "shasum": "" + }, + "require": { + "colinmollenhour/credis": "*", + "colinmollenhour/php-redis-session-abstract": "~1.4" + }, + "suggest": { + "magento-hackathon/magento-composer-installer": "Makes it possible to manage this package as a dependency" + }, + "type": "magento-module", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin Mollenhour" + } + ], + "description": "A Redis-based session handler for Magento with optimistic locking.", + "homepage": "https://github.com/colinmollenhour/Cm_RedisSession", + "time": "2023-10-03T14:21:02+00:00" + }, + { + "name": "colinmollenhour/php-redis-session-abstract", + "version": "v1.5.2", + "source": { + "type": "git", + "url": "https://github.com/colinmollenhour/php-redis-session-abstract.git", + "reference": "3d3e497bcf2e6d032c5a8f86aa180d181ad65dd3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/colinmollenhour/php-redis-session-abstract/zipball/3d3e497bcf2e6d032c5a8f86aa180d181ad65dd3", + "reference": "3d3e497bcf2e6d032c5a8f86aa180d181ad65dd3", + "shasum": "" + }, + "require": { + "colinmollenhour/credis": "~1.6", + "php": "^5.5 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9" + }, + "type": "library", + "autoload": { + "psr-0": { + "Cm\\RedisSession\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin Mollenhour" + } + ], + "description": "A Redis-based session handler with optimistic locking", + "homepage": "https://github.com/colinmollenhour/php-redis-session-abstract", + "support": { + "issues": "https://github.com/colinmollenhour/php-redis-session-abstract/issues", + "source": "https://github.com/colinmollenhour/php-redis-session-abstract/tree/v1.5.2" + }, + "time": "2023-11-03T14:58:07+00:00" + }, { "name": "composer/pcre", - "version": "3.1.0", + "version": "3.1.1", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" + "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", - "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "url": "https://api.github.com/repos/composer/pcre/zipball/00104306927c7a0919b4ced2aaa6782c1e61a3c9", + "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9", "shasum": "" }, "require": { @@ -1228,7 +1398,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.1.0" + "source": "https://github.com/composer/pcre/tree/3.1.1" }, "funding": [ { @@ -1244,20 +1414,20 @@ "type": "tidelift" } ], - "time": "2022-11-17T09:50:14+00:00" + "time": "2023-10-11T07:11:09+00:00" }, { "name": "composer/semver", - "version": "3.3.2", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", + "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", "shasum": "" }, "require": { @@ -1307,9 +1477,9 @@ "versioning" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.3.2" + "source": "https://github.com/composer/semver/tree/3.4.0" }, "funding": [ { @@ -1325,7 +1495,7 @@ "type": "tidelift" } ], - "time": "2022-04-01T19:23:25+00:00" + "time": "2023-08-31T09:50:34+00:00" }, { "name": "composer/xdebug-handler", @@ -1394,208 +1564,99 @@ "time": "2022-02-25T21:32:43+00:00" }, { - "name": "doctrine/annotations", - "version": "2.0.1", + "name": "cweagans/composer-patches", + "version": "1.7.3", "source": { "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f" + "url": "https://github.com/cweagans/composer-patches.git", + "reference": "e190d4466fe2b103a55467dfa83fc2fecfcaf2db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", - "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", + "url": "https://api.github.com/repos/cweagans/composer-patches/zipball/e190d4466fe2b103a55467dfa83fc2fecfcaf2db", + "reference": "e190d4466fe2b103a55467dfa83fc2fecfcaf2db", "shasum": "" }, "require": { - "doctrine/lexer": "^2 || ^3", - "ext-tokenizer": "*", - "php": "^7.2 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.3.0" }, "require-dev": { - "doctrine/cache": "^2.0", - "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.8.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^5.4 || ^6", - "vimeo/psalm": "^4.10" - }, - "suggest": { - "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/2.0.1" - }, - "time": "2023-02-02T22:02:53+00:00" - }, - { - "name": "doctrine/lexer", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "84a527db05647743d50373e0ec53a152f2cde568" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/84a527db05647743d50373e0ec53a152f2cde568", - "reference": "84a527db05647743d50373e0ec53a152f2cde568", - "shasum": "" - }, - "require": { - "php": "^8.1" + "composer/composer": "~1.0 || ~2.0", + "phpunit/phpunit": "~4.6" }, - "require-dev": { - "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.9", - "phpunit/phpunit": "^9.5", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^5.0" + "type": "composer-plugin", + "extra": { + "class": "cweagans\\Composer\\Patches" }, - "type": "library", "autoload": { "psr-4": { - "Doctrine\\Common\\Lexer\\": "src" + "cweagans\\Composer\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" + "name": "Cameron Eagans", + "email": "me@cweagans.net" } ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], + "description": "Provides a way to patch Composer packages.", "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/3.0.0" + "issues": "https://github.com/cweagans/composer-patches/issues", + "source": "https://github.com/cweagans/composer-patches/tree/1.7.3" }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "time": "2022-12-15T16:57:16+00:00" + "time": "2022-12-20T22:53:13+00:00" }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.21.2", + "version": "v3.40.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "80f68059bd371cd42c7b03bb6caa6352faed5b8e" + "reference": "27d2b3265b5d550ec411b4319967ae7cfddfb2e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/80f68059bd371cd42c7b03bb6caa6352faed5b8e", - "reference": "80f68059bd371cd42c7b03bb6caa6352faed5b8e", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/27d2b3265b5d550ec411b4319967ae7cfddfb2e0", + "reference": "27d2b3265b5d550ec411b4319967ae7cfddfb2e0", "shasum": "" }, "require": { - "composer/semver": "^3.3", + "composer/semver": "^3.4", "composer/xdebug-handler": "^3.0.3", - "doctrine/annotations": "^2", - "doctrine/lexer": "^2 || ^3", "ext-json": "*", "ext-tokenizer": "*", "php": "^7.4 || ^8.0", "sebastian/diff": "^4.0 || ^5.0", - "symfony/console": "^5.4 || ^6.0", - "symfony/event-dispatcher": "^5.4 || ^6.0", - "symfony/filesystem": "^5.4 || ^6.0", - "symfony/finder": "^5.4 || ^6.0", - "symfony/options-resolver": "^5.4 || ^6.0", - "symfony/polyfill-mbstring": "^1.27", - "symfony/polyfill-php80": "^1.27", - "symfony/polyfill-php81": "^1.27", - "symfony/process": "^5.4 || ^6.0", - "symfony/stopwatch": "^5.4 || ^6.0" + "symfony/console": "^5.4 || ^6.0 || ^7.0", + "symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0", + "symfony/finder": "^5.4 || ^6.0 || ^7.0", + "symfony/options-resolver": "^5.4 || ^6.0 || ^7.0", + "symfony/polyfill-mbstring": "^1.28", + "symfony/polyfill-php80": "^1.28", + "symfony/polyfill-php81": "^1.28", + "symfony/process": "^5.4 || ^6.0 || ^7.0", + "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0" }, "require-dev": { "facile-it/paraunit": "^1.3 || ^2.0", "justinrainbow/json-schema": "^5.2", - "keradus/cli-executor": "^2.0", + "keradus/cli-executor": "^2.1", "mikey179/vfsstream": "^1.6.11", - "php-coveralls/php-coveralls": "^2.5.3", + "php-coveralls/php-coveralls": "^2.7", "php-cs-fixer/accessible-object": "^1.1", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", - "phpspec/prophecy": "^1.16", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.4", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.4", + "phpspec/prophecy": "^1.17", "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5", - "phpunitgoodpractices/polyfill": "^1.6", - "phpunitgoodpractices/traits": "^1.9.2", - "symfony/phpunit-bridge": "^6.2.3", - "symfony/yaml": "^5.4 || ^6.0" + "phpunit/phpunit": "^9.6", + "symfony/phpunit-bridge": "^6.3.8 || ^7.0", + "symfony/yaml": "^5.4 || ^6.0 || ^7.0" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -1633,7 +1694,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.21.2" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.40.0" }, "funding": [ { @@ -1641,37 +1702,40 @@ "type": "github" } ], - "time": "2023-07-16T09:28:11+00:00" + "time": "2023-11-26T09:25:53+00:00" }, { "name": "joomla/joomla-cms", - "version": "3.10.12", + "version": "4.4.0", "source": { "type": "git", "url": "https://github.com/joomla/joomla-cms.git", - "reference": "tags/3.10.12" + "reference": "tags/4.4.0" }, "dist": { "type": "zip", - "url": "https://github.com/joomla/joomla-cms/releases/download/3.10.12/Joomla_3.10.12-Stable-Full_Package.zip" + "url": "https://github.com/joomla/joomla-cms/releases/download/4.4.0/Joomla_4.4.0-Stable-Full_Package.zip" }, "type": "library" }, { "name": "openmage/magento-lts", - "version": "v20.0.20", + "version": "v20.2.0", "source": { "type": "git", "url": "https://github.com/OpenMage/magento-lts.git", - "reference": "5ae941972220c13d0df9cf0f2298c7be9c5e032f" + "reference": "c7d6d554841a6fad29e99b25f2989b2704cb457c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/OpenMage/magento-lts/zipball/5ae941972220c13d0df9cf0f2298c7be9c5e032f", - "reference": "5ae941972220c13d0df9cf0f2298c7be9c5e032f", + "url": "https://api.github.com/repos/OpenMage/magento-lts/zipball/c7d6d554841a6fad29e99b25f2989b2704cb457c", + "reference": "c7d6d554841a6fad29e99b25f2989b2704cb457c", "shasum": "" }, "require": { + "colinmollenhour/cache-backend-redis": "^1.14", + "colinmollenhour/magento-redis-session": "^3.2.0", + "cweagans/composer-patches": "^1.7", "ext-ctype": "*", "ext-curl": "*", "ext-dom": "*", @@ -1687,28 +1751,53 @@ "ext-soap": "*", "ext-zlib": "*", "magento-hackathon/magento-composer-installer": "^3.1 || ^2.1 || ^4.0", - "php": ">=7.3 <8.2" + "pelago/emogrifier": "^7.0", + "php": ">=7.4 <8.4", + "phpseclib/mcrypt_compat": "^2.0.3", + "phpseclib/phpseclib": "^3.0.14", + "shardj/zf1-future": "1.23.5", + "symfony/polyfill-php74": "^1.27", + "symfony/polyfill-php80": "^1.27", + "symfony/polyfill-php81": "^1.27" }, "conflict": { "n98/n98_layouthelper": "*" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.2", + "dealerdirect/phpcodesniffer-composer-installer": "^1.0.0", "friendsofphp/php-cs-fixer": "^3.4", - "macopedia/phpstan-magento1": "^1.0.4", + "macopedia/phpstan-magento1": "^1.0.5", "magento-ecg/coding-standard": "^4.5", + "openmage/dev-meta-package": "^1.0", "phpcompatibility/php-compatibility": "^9.3", "phpmd/phpmd": "^2.13", - "phpstan/phpstan": "^1.8.10", + "phpstan/phpstan": "^1.9.13", "phpunit/phpunit": "^9.5", - "squizlabs/php_codesniffer": "^3.7" + "squizlabs/php_codesniffer": "^3.7", + "symplify/vendor-patches": "^11.1" }, "type": "magento-source", "extra": { - "branch-alias": { - "dev-main": "1.9.4.x-dev" - }, - "magento-root-dir": "." + "magento-root-dir": ".", + "magento-deploystrategy": "copy", + "magento-deploystrategy-dev": "symlink", + "magento-deploystrategy-overwrite": { + "openmage/dev-copyright": "copy", + "openmage/dev-translations": "copy", + "openmage/legacy-frontend-themes": "copy" + }, + "magento-force": true, + "patches": { + "shardj/zf1-future": { + "MAG-1.1.1": "https://raw.githubusercontent.com/OpenMage/composer-patches/74862e7a9fa29dd62c5c02d585d931ce9e3c5815/patches/MAG-1.1.1.patch", + "MAG-1.9.3.0": "https://raw.githubusercontent.com/OpenMage/composer-patches/74862e7a9fa29dd62c5c02d585d931ce9e3c5815/patches/MAG-1.9.3.0.patch", + "MAG-1.9.3.7 - SUPEE-10415": "https://raw.githubusercontent.com/OpenMage/composer-patches/74862e7a9fa29dd62c5c02d585d931ce9e3c5815/patches/MAG-1.9.3.7.patch", + "OM-918 - Add runtime cache to Zend_Locale_Data": "https://raw.githubusercontent.com/OpenMage/composer-patches/74862e7a9fa29dd62c5c02d585d931ce9e3c5815/patches/OM-918.patch", + "OM-1081 - Not detecting HTTPS behind a proxy": "https://raw.githubusercontent.com/OpenMage/composer-patches/74862e7a9fa29dd62c5c02d585d931ce9e3c5815/patches/OM-1081.patch", + "OM-2047 - Pass delimiter char to preg_quote": "https://raw.githubusercontent.com/OpenMage/composer-patches/74862e7a9fa29dd62c5c02d585d931ce9e3c5815/patches/OM-2047.patch", + "OM-2050 - Prevent checking known date codes": "https://raw.githubusercontent.com/OpenMage/composer-patches/74862e7a9fa29dd62c5c02d585d931ce9e3c5815/patches/OM-2050.patch" + } + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1744,133 +1833,457 @@ "description": "A fork of Magento-1 that is accepting bug fixes (backward compatible, drop in replacement for official Magento)", "support": { "issues": "https://github.com/OpenMage/magento-lts/issues", - "source": "https://github.com/OpenMage/magento-lts/tree/v20.0.20" + "source": "https://github.com/OpenMage/magento-lts/tree/v20.2.0" }, - "time": "2023-02-02T11:03:42+00:00" + "time": "2023-10-27T10:18:52+00:00" }, { - "name": "phpstan/phpstan", - "version": "1.10.25", + "name": "paragonie/constant_time_encoding", + "version": "v2.6.3", "source": { "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "578f4e70d117f9a90699324c555922800ac38d8c" + "url": "https://github.com/paragonie/constant_time_encoding.git", + "reference": "58c3f47f650c94ec05a151692652a868995d2938" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/578f4e70d117f9a90699324c555922800ac38d8c", - "reference": "578f4e70d117f9a90699324c555922800ac38d8c", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/58c3f47f650c94ec05a151692652a868995d2938", + "reference": "58c3f47f650c94ec05a151692652a868995d2938", "shasum": "" }, "require": { - "php": "^7.2|^8.0" + "php": "^7|^8" }, - "conflict": { - "phpstan/phpstan-shim": "*" + "require-dev": { + "phpunit/phpunit": "^6|^7|^8|^9", + "vimeo/psalm": "^1|^2|^3|^4" }, - "bin": [ - "phpstan", - "phpstan.phar" - ], "type": "library", "autoload": { - "files": [ - "bootstrap.php" - ] + "psr-4": { + "ParagonIE\\ConstantTime\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "PHPStan - PHP Static Analysis Tool", - "keywords": [ - "dev", - "static analysis" - ], - "support": { - "docs": "https://phpstan.org/user-guide/getting-started", - "forum": "https://github.com/phpstan/phpstan/discussions", - "issues": "https://github.com/phpstan/phpstan/issues", - "security": "https://github.com/phpstan/phpstan/security/policy", - "source": "https://github.com/phpstan/phpstan-src" - }, - "funding": [ - { - "url": "https://github.com/ondrejmirtes", - "type": "github" - }, + "authors": [ { - "url": "https://github.com/phpstan", - "type": "github" + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com", + "role": "Maintainer" }, { - "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", - "type": "tidelift" + "name": "Steve 'Sc00bz' Thomas", + "email": "steve@tobtu.com", + "homepage": "https://www.tobtu.com", + "role": "Original Developer" } ], - "time": "2023-07-06T12:11:37+00:00" + "description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)", + "keywords": [ + "base16", + "base32", + "base32_decode", + "base32_encode", + "base64", + "base64_decode", + "base64_encode", + "bin2hex", + "encoding", + "hex", + "hex2bin", + "rfc4648" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/constant_time_encoding/issues", + "source": "https://github.com/paragonie/constant_time_encoding" + }, + "time": "2022-06-14T06:56:20+00:00" }, { - "name": "psr/cache", - "version": "3.0.0", + "name": "paragonie/random_compat", + "version": "v9.99.100", "source": { "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + "url": "https://github.com/paragonie/random_compat.git", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", "shasum": "" }, "require": { - "php": ">=8.0.0" + "php": ">= 7" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." }, + "type": "library", "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" } ], - "description": "Common interface for caching libraries", + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", "keywords": [ - "cache", - "psr", - "psr-6" + "csprng", + "polyfill", + "pseudorandom", + "random" ], "support": { - "source": "https://github.com/php-fig/cache/tree/3.0.0" + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/random_compat/issues", + "source": "https://github.com/paragonie/random_compat" }, - "time": "2021-02-03T23:26:27+00:00" + "time": "2020-10-15T08:29:30+00:00" }, { - "name": "psr/event-dispatcher", - "version": "1.0.0", + "name": "pelago/emogrifier", + "version": "v7.1.0", "source": { "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + "url": "https://github.com/MyIntervals/emogrifier.git", + "reference": "1945460af992d0c14ad08e7b4567d7d0dd3a2f94" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "url": "https://api.github.com/repos/MyIntervals/emogrifier/zipball/1945460af992d0c14ad08e7b4567d7d0dd3a2f94", + "reference": "1945460af992d0c14ad08e7b4567d7d0dd3a2f94", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "php": "~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", + "sabberworm/php-css-parser": "^8.4.0", + "symfony/css-selector": "^4.4.23 || ^5.4.0 || ^6.0.0" + }, + "require-dev": { + "php-parallel-lint/php-parallel-lint": "1.3.2", + "phpunit/phpunit": "9.6.11", + "rawr/cross-data-providers": "2.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "8.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Pelago\\Emogrifier\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Oliver Klee", + "email": "github@oliverklee.de" + }, + { + "name": "Zoli Szabó", + "email": "zoli.szabo+github@gmail.com" + }, + { + "name": "John Reeve", + "email": "jreeve@pelagodesign.com" + }, + { + "name": "Jake Hotson", + "email": "jake@qzdesign.co.uk" + }, + { + "name": "Cameron Brooks" + }, + { + "name": "Jaime Prado" + } + ], + "description": "Converts CSS styles into inline style attributes in your HTML code", + "homepage": "https://www.myintervals.com/emogrifier.php", + "keywords": [ + "css", + "email", + "pre-processing" + ], + "support": { + "issues": "https://github.com/MyIntervals/emogrifier/issues", + "source": "https://github.com/MyIntervals/emogrifier" + }, + "time": "2023-10-20T15:34:30+00:00" + }, + { + "name": "phpseclib/mcrypt_compat", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phpseclib/mcrypt_compat.git", + "reference": "6505669343743daf290b7d7b6b7105f85fd9988f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpseclib/mcrypt_compat/zipball/6505669343743daf290b7d7b6b7105f85fd9988f", + "reference": "6505669343743daf290b7d7b6b7105f85fd9988f", + "shasum": "" + }, + "require": { + "php": ">=5.6.1", + "phpseclib/phpseclib": ">=3.0.13 <4.0.0" + }, + "provide": { + "ext-mcrypt": "5.6.40" + }, + "require-dev": { + "phpunit/phpunit": "^5.7|^6.0|^9.4" + }, + "suggest": { + "ext-openssl": "Will enable faster cryptographic operations" + }, + "type": "library", + "autoload": { + "files": [ + "lib/mcrypt.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jim Wigginton", + "email": "terrafrost@php.net", + "homepage": "http://phpseclib.sourceforge.net" + } + ], + "description": "PHP 5.x-8.x polyfill for mcrypt extension", + "keywords": [ + "cryptograpy", + "encryption", + "mcrypt", + "polyfill" + ], + "support": { + "email": "terrafrost@php.net", + "issues": "https://github.com/phpseclib/mcrypt_compat/issues", + "source": "https://github.com/phpseclib/mcrypt_compat" + }, + "funding": [ + { + "url": "https://www.patreon.com/phpseclib", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpseclib/mcrypt_compat", + "type": "tidelift" + } + ], + "time": "2022-12-19T00:32:45+00:00" + }, + { + "name": "phpseclib/phpseclib", + "version": "3.0.33", + "source": { + "type": "git", + "url": "https://github.com/phpseclib/phpseclib.git", + "reference": "33fa69b2514a61138dd48e7a49f99445711e0ad0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/33fa69b2514a61138dd48e7a49f99445711e0ad0", + "reference": "33fa69b2514a61138dd48e7a49f99445711e0ad0", + "shasum": "" + }, + "require": { + "paragonie/constant_time_encoding": "^1|^2", + "paragonie/random_compat": "^1.4|^2.0|^9.99.99", + "php": ">=5.6.1" + }, + "require-dev": { + "phpunit/phpunit": "*" + }, + "suggest": { + "ext-dom": "Install the DOM extension to load XML formatted public keys.", + "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", + "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", + "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", + "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations." + }, + "type": "library", + "autoload": { + "files": [ + "phpseclib/bootstrap.php" + ], + "psr-4": { + "phpseclib3\\": "phpseclib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jim Wigginton", + "email": "terrafrost@php.net", + "role": "Lead Developer" + }, + { + "name": "Patrick Monnerat", + "email": "pm@datasphere.ch", + "role": "Developer" + }, + { + "name": "Andreas Fischer", + "email": "bantu@phpbb.com", + "role": "Developer" + }, + { + "name": "Hans-Jürgen Petrich", + "email": "petrich@tronic-media.com", + "role": "Developer" + }, + { + "name": "Graham Campbell", + "email": "graham@alt-three.com", + "role": "Developer" + } + ], + "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", + "homepage": "http://phpseclib.sourceforge.net", + "keywords": [ + "BigInteger", + "aes", + "asn.1", + "asn1", + "blowfish", + "crypto", + "cryptography", + "encryption", + "rsa", + "security", + "sftp", + "signature", + "signing", + "ssh", + "twofish", + "x.509", + "x509" + ], + "support": { + "issues": "https://github.com/phpseclib/phpseclib/issues", + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.33" + }, + "funding": [ + { + "url": "https://github.com/terrafrost", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpseclib", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib", + "type": "tidelift" + } + ], + "time": "2023-10-21T14:00:39+00:00" + }, + { + "name": "phpstan/phpstan", + "version": "1.10.44", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "bf84367c53a23f759513985c54ffe0d0c249825b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/bf84367c53a23f759513985c54ffe0d0c249825b", + "reference": "bf84367c53a23f759513985c54ffe0d0c249825b", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", + "issues": "https://github.com/phpstan/phpstan/issues", + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], + "time": "2023-11-21T16:30:46+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", "shasum": "" }, "require": { @@ -1959,6 +2372,59 @@ }, "time": "2021-07-14T16:41:46+00:00" }, + { + "name": "sabberworm/php-css-parser", + "version": "8.4.0", + "source": { + "type": "git", + "url": "https://github.com/sabberworm/PHP-CSS-Parser.git", + "reference": "e41d2140031d533348b2192a83f02d8dd8a71d30" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sabberworm/PHP-CSS-Parser/zipball/e41d2140031d533348b2192a83f02d8dd8a71d30", + "reference": "e41d2140031d533348b2192a83f02d8dd8a71d30", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "php": ">=5.6.20" + }, + "require-dev": { + "codacy/coverage": "^1.4", + "phpunit/phpunit": "^4.8.36" + }, + "suggest": { + "ext-mbstring": "for parsing UTF-8 CSS" + }, + "type": "library", + "autoload": { + "psr-4": { + "Sabberworm\\CSS\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Raphael Schweikert" + } + ], + "description": "Parser for CSS Files written in PHP", + "homepage": "https://www.sabberworm.com/blog/2010/6/10/php-css-parser", + "keywords": [ + "css", + "parser", + "stylesheet" + ], + "support": { + "issues": "https://github.com/sabberworm/PHP-CSS-Parser/issues", + "source": "https://github.com/sabberworm/PHP-CSS-Parser/tree/8.4.0" + }, + "time": "2021-12-11T13:40:54+00:00" + }, { "name": "sebastian/diff", "version": "5.0.3", @@ -2026,18 +2492,145 @@ ], "time": "2023-05-01T07:48:21+00:00" }, + { + "name": "shardj/zf1-future", + "version": "1.23.5", + "source": { + "type": "git", + "url": "https://github.com/Shardj/zf1-future.git", + "reference": "0464ee916ca73142ab733d80c83210d89cba3936" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Shardj/zf1-future/zipball/0464ee916ca73142ab733d80c83210d89cba3936", + "reference": "0464ee916ca73142ab733d80c83210d89cba3936", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "symfony/polyfill-ctype": "^1.27", + "symfony/polyfill-mbstring": "^1.26", + "symfony/polyfill-php81": "^1.24" + }, + "replace": { + "zendframework/zendframework1": ">=1.12.20" + }, + "require-dev": { + "php-parallel-lint/php-parallel-lint": "^1.3", + "phpunit/phpunit": "^7|^8|^9", + "rector/rector": "^0.12.19", + "yoast/phpunit-polyfills": "2.0" + }, + "suggest": { + "ext-mbstring": "Multibyte strings handling" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.12.x-dev" + } + }, + "autoload": { + "psr-0": { + "Zend_": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "library/" + ], + "license": [ + "BSD-3-Clause" + ], + "description": "Zend Framework 1. The aim is to keep ZF1 working with the latest PHP versions", + "homepage": "http://framework.zend.com/", + "keywords": [ + "ZF1", + "framework" + ], + "support": { + "issues": "https://github.com/Shardj/zf1-future/issues", + "source": "https://github.com/Shardj/zf1-future/tree/release-1.23.5" + }, + "time": "2023-08-24T14:07:53+00:00" + }, + { + "name": "symfony/css-selector", + "version": "v6.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/css-selector.git", + "reference": "883d961421ab1709877c10ac99451632a3d6fa57" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/883d961421ab1709877c10ac99451632a3d6fa57", + "reference": "883d961421ab1709877c10ac99451632a3d6fa57", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\CssSelector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Converts CSS selectors to XPath expressions", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/css-selector/tree/v6.3.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-07-12T16:00:22+00:00" + }, { "name": "symfony/event-dispatcher", - "version": "v6.3.0", + "version": "v6.3.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa" + "reference": "adb01fe097a4ee930db9258a3cc906b5beb5cf2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa", - "reference": "3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/adb01fe097a4ee930db9258a3cc906b5beb5cf2e", + "reference": "adb01fe097a4ee930db9258a3cc906b5beb5cf2e", "shasum": "" }, "require": { @@ -2088,7 +2681,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.3.0" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.3.2" }, "funding": [ { @@ -2104,11 +2697,11 @@ "type": "tidelift" } ], - "time": "2023-04-21T14:41:17+00:00" + "time": "2023-07-06T06:56:43+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.3.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", @@ -2164,7 +2757,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.4.0" }, "funding": [ { @@ -2247,16 +2840,16 @@ }, { "name": "symfony/finder", - "version": "v6.3.0", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "d9b01ba073c44cef617c7907ce2419f8d00d75e2" + "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/d9b01ba073c44cef617c7907ce2419f8d00d75e2", - "reference": "d9b01ba073c44cef617c7907ce2419f8d00d75e2", + "url": "https://api.github.com/repos/symfony/finder/zipball/a1b31d88c0e998168ca7792f222cbecee47428c4", + "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4", "shasum": "" }, "require": { @@ -2291,7 +2884,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.3.0" + "source": "https://github.com/symfony/finder/tree/v6.3.5" }, "funding": [ { @@ -2307,7 +2900,7 @@ "type": "tidelift" } ], - "time": "2023-04-02T01:25:41+00:00" + "time": "2023-09-26T12:56:25+00:00" }, { "name": "symfony/options-resolver", @@ -2376,18 +2969,98 @@ ], "time": "2023-05-12T14:21:09+00:00" }, + { + "name": "symfony/polyfill-php74", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php74.git", + "reference": "8b755b41a155c89f1af29cc33305538499fa05ea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php74/zipball/8b755b41a155c89f1af29cc33305538499fa05ea", + "reference": "8b755b41a155c89f1af29cc33305538499fa05ea", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php74\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.4+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php74/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, { "name": "symfony/polyfill-php81", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", "shasum": "" }, "require": { @@ -2396,7 +3069,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2437,7 +3110,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" }, "funding": [ { @@ -2453,20 +3126,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/process", - "version": "v6.3.0", + "version": "v6.3.4", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "8741e3ed7fe2e91ec099e02446fb86667a0f1628" + "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/8741e3ed7fe2e91ec099e02446fb86667a0f1628", - "reference": "8741e3ed7fe2e91ec099e02446fb86667a0f1628", + "url": "https://api.github.com/repos/symfony/process/zipball/0b5c29118f2e980d455d2e34a5659f4579847c54", + "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54", "shasum": "" }, "require": { @@ -2498,7 +3171,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.3.0" + "source": "https://github.com/symfony/process/tree/v6.3.4" }, "funding": [ { @@ -2514,7 +3187,7 @@ "type": "tidelift" } ], - "time": "2023-05-19T08:06:44+00:00" + "time": "2023-08-07T10:39:22+00:00" }, { "name": "symfony/stopwatch", diff --git a/joomla/administrator/components/com_magebridge/controller.php b/joomla/administrator/components/com_magebridge/controller.php index 95a1bdc6e..1873b56c2 100644 --- a/joomla/administrator/components/com_magebridge/controller.php +++ b/joomla/administrator/components/com_magebridge/controller.php @@ -1,4 +1,5 @@ setRedirect($link); } @@ -90,13 +97,11 @@ public function cache() } // Clean the backend cache - /** @var JCache $cache */ - $cache = JFactory::getCache('com_magebridge.admin'); + $cache = Factory::getCache('com_magebridge.admin'); $cache->clean(); // Clean the frontend cache - ///** @var JCache $cache */ - $cache = JFactory::getCache('com_magebridge'); + $cache = Factory::getCache('com_magebridge'); $cache->clean(); // Build the next URL @@ -158,17 +163,17 @@ public function delete() // Only clean items for the right view if ($this->app->input->getCmd('view') == 'logs') { // Clean up the database - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $db->setQuery('DELETE FROM #__magebridge_log WHERE 1 = 1'); $db->execute(); // Clean up the database - $file = JFactory::getConfig() - ->get('log_path') . '/magebridge.txt'; + $file = Factory::getConfig() + ->get('log_path') . '/magebridge.txt'; file_put_contents($file, null); // Redirect - $msg = JText::_('LIB_YIREO_CONTROLLER_LOGS_TRUNCATED'); + $msg = Text::_('LIB_YIREO_CONTROLLER_LOGS_TRUNCATED'); $link = 'index.php?option=com_magebridge&view=logs'; $this->setRedirect($link, $msg); @@ -224,17 +229,17 @@ public function check_product() // Validation checks if (!$user_id > 0) { $msgType = 'error'; - $msg = JText::_('COM_MAGEBRIDGE_CHECK_PRODUCT_POST_ERROR_NO_USER'); + $msg = Text::_('COM_MAGEBRIDGE_CHECK_PRODUCT_POST_ERROR_NO_USER'); } elseif (empty($product_sku)) { $msgType = 'error'; - $msg = JText::_('COM_MAGEBRIDGE_CHECK_PRODUCT_POST_ERROR_NO_PRODUCT'); + $msg = Text::_('COM_MAGEBRIDGE_CHECK_PRODUCT_POST_ERROR_NO_PRODUCT'); } else { - $user = JFactory::getUser($user_id); + $user = Factory::getUser($user_id); MageBridgeConnectorProduct::getInstance() ->runOnPurchase($product_sku, $count, $user, $status); $msgType = null; - $msg = JText::_('COM_MAGEBRIDGE_CHECK_PRODUCT_POST_SUCCESS'); + $msg = Text::_('COM_MAGEBRIDGE_CHECK_PRODUCT_POST_SUCCESS'); } $link = 'index.php?option=com_magebridge&view=check&layout=product'; @@ -247,14 +252,14 @@ public function check_product() public function ssoCheck() { $application = $this->app; - $user = JFactory::getUser(); + $user = Factory::getUser(); if (!$user->guest) { MageBridgeModelUserSSO::getInstance() ->checkSSOLogin(); $application->close(); } else { - $this->setRedirect(JUri::base()); + $this->setRedirect(Uri::base()); } } @@ -269,8 +274,8 @@ public function ssoCheck() protected function _validate($check_token = true, $check_demo = true) { // Check the token - if ($check_token == true && (JSession::checkToken('post') == false && JSession::checkToken('get') == false)) { - $msg = JText::_('JINVALID_TOKEN'); + if ($check_token == true && (Session::checkToken('post') == false && Session::checkToken('get') == false)) { + $msg = Text::_('JINVALID_TOKEN'); $link = 'index.php?option=com_magebridge&view=home'; $this->setRedirect($link, $msg); @@ -279,7 +284,7 @@ protected function _validate($check_token = true, $check_demo = true) // Check demo-access if ($check_demo == true && MageBridgeAclHelper::isDemo() == true) { - $msg = JText::_('LIB_YIREO_CONTROLLER_DEMO_NO_ACTION'); + $msg = Text::_('LIB_YIREO_CONTROLLER_DEMO_NO_ACTION'); $link = 'index.php?option=com_magebridge&view=home'; $this->setRedirect($link, $msg); diff --git a/joomla/administrator/components/com_magebridge/controllers/config.php b/joomla/administrator/components/com_magebridge/controllers/config.php index b678314e2..c5869eeb6 100644 --- a/joomla/administrator/components/com_magebridge/controllers/config.php +++ b/joomla/administrator/components/com_magebridge/controllers/config.php @@ -1,4 +1,5 @@ setRedirect(JRoute::_('index.php?option=com_magebridge'), $this->msg, $this->msg_type); + return $this->setRedirect(Route::_('index.php?option=com_magebridge'), $this->msg, $this->msg_type); } /** @@ -32,7 +37,7 @@ public function cancel() public function save() { // Security check - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or exit(Text::_('JINVALID_TOKEN')); // Validate whether this task is allowed if ($this->_validate(true, true) == false) { @@ -52,7 +57,7 @@ public function save() public function apply() { // Security check - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or exit(Text::_('JINVALID_TOKEN')); // Validate whether this task is allowed if ($this->_validate(true, true) == false) { @@ -76,7 +81,7 @@ public function apply() public function store($post = []) { // Security check - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or exit(Text::_('JINVALID_TOKEN')); // Validate whether this task is allowed if ($this->_validate(true, true) == false) { @@ -88,25 +93,27 @@ public function store($post = []) $post = $this->fixPost($post); // Get the model + /** @var MageBridgeModelConfig */ $model = $this->getModel('config'); - // Store these data with the model - if ($model->store($post)) { - $this->msg = JText::sprintf('LIB_YIREO_CONTROLLER_ITEM_SAVED', $this->app->input->getCmd('view')); + try { + // Store these data with the model + $model->store($post); + $this->msg = Text::sprintf('LIB_YIREO_CONTROLLER_ITEM_SAVED', $this->app->input->getCmd('view')); return true; - } - - $this->msg = JText::sprintf('LIB_YIREO_CONTROLLER_ITEM_NOT_SAVED', $this->app->input->getCmd('view')); - $error = $model->getError(); + } catch (Exception $e) { + $this->msg = Text::sprintf('LIB_YIREO_CONTROLLER_ITEM_NOT_SAVED', $this->app->input->getCmd('view')); + $error = $e->getMessage(); - if (!empty($error)) { - $this->msg .= ': ' . $error; - } + if (!empty($error)) { + $this->msg .= ': ' . $error; + } - $this->msg_type = 'error'; + $this->msg_type = 'error'; - return false; + return false; + } } /** @@ -203,7 +210,7 @@ public function upload() // Check whether this is a valid download if ($this->isValidUpload($upload) == false) { - $this->setRedirect('index.php?option=com_magebridge&view=config&task=import', JText::_('File upload failed on system level'), 'error'); + $this->setRedirect('index.php?option=com_magebridge&view=config&task=import', Text::_('File upload failed on system level'), 'error'); return false; } @@ -212,7 +219,7 @@ public function upload() $xmlString = @file_get_contents($upload['tmp_name']); if (empty($xmlString)) { - $this->setRedirect('index.php?option=com_magebridge&view=config&task=import', JText::_('Empty file upload'), 'error'); + $this->setRedirect('index.php?option=com_magebridge&view=config&task=import', Text::_('Empty file upload'), 'error'); return false; } @@ -220,7 +227,7 @@ public function upload() $xml = @simplexml_load_string($xmlString); if (!$xml) { - $this->setRedirect('index.php?option=com_magebridge&view=config&task=import', JText::_('Invalid XML-configuration'), 'error'); + $this->setRedirect('index.php?option=com_magebridge&view=config&task=import', Text::_('Invalid XML-configuration'), 'error'); return false; } @@ -236,13 +243,13 @@ public function upload() } if (empty($config)) { - $this->setRedirect('index.php?option=com_magebridge&view=config&task=import', JText::_('Nothing to import'), 'error'); + $this->setRedirect('index.php?option=com_magebridge&view=config&task=import', Text::_('Nothing to import'), 'error'); return false; } MageBridgeModelConfig::getSingleton()->store($config); - $this->setRedirect('index.php?option=com_magebridge&view=config', JText::_('Imported configuration succesfully')); + $this->setRedirect('index.php?option=com_magebridge&view=config', Text::_('Imported configuration successfully')); return true; } @@ -282,8 +289,8 @@ private function getOutput($config) protected function _validate($check_token = true, $check_demo = true) { // Check the token - if ($check_token == true && (JSession::checkToken('post') == false && JSession::checkToken('get') == false)) { - $msg = JText::_('JINVALID_TOKEN'); + if ($check_token == true && (Session::checkToken('post') == false && Session::checkToken('get') == false)) { + $msg = Text::_('JINVALID_TOKEN'); $link = 'index.php?option=com_magebridge&view=home'; $this->setRedirect($link, $msg); @@ -292,7 +299,7 @@ protected function _validate($check_token = true, $check_demo = true) // Check demo-access if ($check_demo == true && MageBridgeAclHelper::isDemo() == true) { - $msg = JText::_('LIB_YIREO_CONTROLLER_DEMO_NO_ACTION'); + $msg = Text::_('LIB_YIREO_CONTROLLER_DEMO_NO_ACTION'); $link = 'index.php?option=com_magebridge&view=config'; $this->setRedirect($link, $msg); diff --git a/joomla/administrator/components/com_magebridge/controllers/users.php b/joomla/administrator/components/com_magebridge/controllers/users.php index f9d486466..5be672fa0 100644 --- a/joomla/administrator/components/com_magebridge/controllers/users.php +++ b/joomla/administrator/components/com_magebridge/controllers/users.php @@ -1,4 +1,5 @@ setRedirect('index.php?option=com_magebridge&view=users', JText::_('No users found'), 'error'); + $this->setRedirect('index.php?option=com_magebridge&view=users', Text::_('No users found'), 'error'); return false; } if (empty($website_id)) { - $this->setRedirect('index.php?option=com_magebridge&view=users', JText::_('Website not configured in export parameters'), 'error'); + $this->setRedirect('index.php?option=com_magebridge&view=users', Text::_('Website not configured in export parameters'), 'error'); return false; } if (empty($group_id)) { - $this->setRedirect('index.php?option=com_magebridge&view=users', JText::_('Customer Group not configured in export parameters'), 'error'); + $this->setRedirect('index.php?option=com_magebridge&view=users', Text::_('Customer Group not configured in export parameters'), 'error'); return false; } @@ -77,7 +81,7 @@ public function export() print $output; // Close the application - $application = JFactory::getApplication(); + $application = Factory::getApplication(); $application->close(); } @@ -97,7 +101,7 @@ public function upload() // Check whether this is a valid download if (empty($upload) || empty($upload['name']) || empty($upload['tmp_name']) || empty($upload['size'])) { - $this->setRedirect('index.php?option=com_magebridge&view=users&task=import', JText::_('File upload failed on system level'), 'error'); + $this->setRedirect('index.php?option=com_magebridge&view=users&task=import', Text::_('File upload failed on system level'), 'error'); return false; } @@ -105,7 +109,7 @@ public function upload() // Check for empty content $csv = @file_get_contents($upload['tmp_name']); if (empty($csv)) { - $this->setRedirect('index.php?option=com_magebridge&view=users&task=import', JText::_('Empty file upload'), 'error'); + $this->setRedirect('index.php?option=com_magebridge&view=users&task=import', Text::_('Empty file upload'), 'error'); return false; } @@ -133,7 +137,8 @@ public function upload() $user = [ 'email' => $fields[$email], 'firstname' => $fields[$firstname], - 'lastname' => $fields[$lastname],]; + 'lastname' => $fields[$lastname], + ]; $user = MageBridgeUserHelper::convert($user); $rt = MageBridgeModelUser::getInstance()->create($user, true); @@ -145,7 +150,7 @@ public function upload() } } - $this->setRedirect('index.php?option=com_magebridge&view=users', JText::sprintf('Imported %d users succesfully, %d users failed', $user_records_ok, $user_records_fail)); + $this->setRedirect('index.php?option=com_magebridge&view=users', Text::sprintf('Imported %d users successfully, %d users failed', $user_records_ok, $user_records_fail)); return true; } @@ -159,7 +164,7 @@ public function upload() */ private function getUserList() { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $db->setQuery("SELECT u.* FROM #__users AS u"); return $db->loadObjectList(); diff --git a/joomla/administrator/components/com_magebridge/fields/abstract.php b/joomla/administrator/components/com_magebridge/fields/abstract.php index db13598df..f0e7be80e 100644 --- a/joomla/administrator/components/com_magebridge/fields/abstract.php +++ b/joomla/administrator/components/com_magebridge/fields/abstract.php @@ -15,15 +15,10 @@ // Import the MageBridge autoloader require_once JPATH_SITE . '/components/com_magebridge/helpers/loader.php'; -// Import required libraries -jimport('joomla.html.html'); -jimport('joomla.access.access'); -jimport('joomla.form.formfield'); - /** * Generic Form Field-class */ -abstract class MageBridgeFormFieldAbstract extends JFormField +abstract class MageBridgeFormFieldAbstract extends \Joomla\CMS\Form\FormField { /** @var MageBridgeModelBridge */ protected $bridge; diff --git a/joomla/administrator/components/com_magebridge/fields/article.php b/joomla/administrator/components/com_magebridge/fields/article.php index 5960f6a04..093952263 100644 --- a/joomla/administrator/components/com_magebridge/fields/article.php +++ b/joomla/administrator/components/com_magebridge/fields/article.php @@ -1,9 +1,15 @@ setArticleTitle(); // Load the modal behavior script. - JHtml::_('behavior.modal', 'a.modal'); + HTMLHelper::_('behavior.modal', 'a.modal'); $this->addScriptDeclaration(); // Load the article ID @@ -65,12 +71,12 @@ protected function getInput() protected function setArticleTitle() { // Load the article title - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $db->setQuery('SELECT title FROM #__content WHERE id = ' . (int) $this->value); $title = $db->loadResult(); if (empty($title)) { - $title = JText::_('COM_CONTENT_SELECT_AN_ARTICLE'); + $title = Text::_('COM_CONTENT_SELECT_AN_ARTICLE'); } $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8'); @@ -91,11 +97,11 @@ protected function addScriptDeclaration() $script[] = ' }'; $script[] = ' function jResetArticle_' . $this->id . '(id, title, catid, object) {'; $script[] = ' document.id("' . $this->id . '_id").value = 0;'; - $script[] = ' document.id("' . $this->id . '_name").value = "' . JText::_('COM_CONTENT_SELECT_AN_ARTICLE') . '";'; + $script[] = ' document.id("' . $this->id . '_name").value = "' . Text::_('COM_CONTENT_SELECT_AN_ARTICLE') . '";'; $script[] = ' }'; // Add the script to the document head. - $doc = JFactory::getDocument(); + $doc = Factory::getDocument(); $doc->addScriptDeclaration(implode("\n", $script)); } @@ -107,7 +113,7 @@ protected function getHtmlButton() $title = $this->title; // Setup variables for display. - $sessionToken = JSession::getFormToken(); + $sessionToken = Session::getFormToken(); $link = 'index.php?option=com_content&view=articles&layout=modal&tmpl=component&function=jSelectArticle_' . $this->id; $link .= '&' . $sessionToken . '=1'; @@ -115,10 +121,10 @@ protected function getHtmlButton() $html[] = ''; $html[] = ''; $html[] = ''; - $html[] = ' ' . JText::_('JSELECT'); + $html[] = ' ' . Text::_('JSELECT'); $html[] = ''; $html[] = ''; $html[] = ''; diff --git a/joomla/administrator/components/com_magebridge/fields/boolean.php b/joomla/administrator/components/com_magebridge/fields/boolean.php index 4ad00776c..01551c9ba 100644 --- a/joomla/administrator/components/com_magebridge/fields/boolean.php +++ b/joomla/administrator/components/com_magebridge/fields/boolean.php @@ -1,4 +1,5 @@ getConfig('api_widgets') == true) { // Load the javascript - JHtml::script('media/com_magebridge/js/backend-elements.js'); - JHtml::_('behavior.modal', 'a.modal'); + HTMLHelper::script('media/com_magebridge/js/backend-elements.js'); + HTMLHelper::_('behavior.modal', 'a.modal'); $returnType = (string) $this->element['return']; $allowRoot = (string) $this->element['allow_root']; @@ -55,7 +59,7 @@ protected function getInput() $html[] = ''; $html[] = ''; - $html[] = ' ' . JText::_('JSELECT') . ''; + $html[] = ' ' . Text::_('JSELECT') . ''; $html[] = ''; $html = implode("\n", $html); diff --git a/joomla/administrator/components/com_magebridge/fields/cmspage.php b/joomla/administrator/components/com_magebridge/fields/cmspage.php index 41ff35635..2734777fa 100644 --- a/joomla/administrator/components/com_magebridge/fields/cmspage.php +++ b/joomla/administrator/components/com_magebridge/fields/cmspage.php @@ -1,4 +1,5 @@ '', 'label' => '']); - return JHtml::_('select.genericlist', $options, $fieldName, null, 'value', 'label', $value); + return HTMLHelper::_('select.genericlist', $options, $fieldName, null, 'value', 'label', $value); } $this->debugger->warning('Unable to obtain MageBridge API Widget "cmspage"', $options); diff --git a/joomla/administrator/components/com_magebridge/fields/customer.php b/joomla/administrator/components/com_magebridge/fields/customer.php index a48192efe..17415b267 100644 --- a/joomla/administrator/components/com_magebridge/fields/customer.php +++ b/joomla/administrator/components/com_magebridge/fields/customer.php @@ -9,6 +9,9 @@ * @link https://www.yireo.com */ +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Language\Text; + // Check to ensure this file is included in Joomla! defined('JPATH_BASE') or die(); @@ -39,8 +42,8 @@ protected function getInput() // Are the API widgets enabled? if ($this->getConfig('api_widgets') == true) { // Load the javascript - JHtml::script('media/com_magebridge/js/backend-elements.js'); - JHtml::_('behavior.modal', 'a.modal'); + HTMLHelper::script('media/com_magebridge/js/backend-elements.js'); + HTMLHelper::_('behavior.modal', 'a.modal'); $returnType = (string) $this->element['return']; @@ -52,7 +55,7 @@ protected function getInput() $html .= ''; $html .= ''; $html .= '
'; - $html .= '' . JText::_('Select') . ''; + $html .= '' . Text::_('Select') . ''; $html .= '
' . "\n"; $html .= ''; diff --git a/joomla/administrator/components/com_magebridge/fields/customergroup.php b/joomla/administrator/components/com_magebridge/fields/customergroup.php index 8def92afc..82346b275 100644 --- a/joomla/administrator/components/com_magebridge/fields/customergroup.php +++ b/joomla/administrator/components/com_magebridge/fields/customergroup.php @@ -1,4 +1,5 @@ '', 'label' => '']); - return JHtml::_('select.genericlist', $options, $name, null, 'value', 'label', $value); + return HTMLHelper::_('select.genericlist', $options, $name, null, 'value', 'label', $value); // Fetching data from the bridge failed, so report a warning } diff --git a/joomla/administrator/components/com_magebridge/fields/disablejs.php b/joomla/administrator/components/com_magebridge/fields/disablejs.php index fa1b481a8..8e257320c 100644 --- a/joomla/administrator/components/com_magebridge/fields/disablejs.php +++ b/joomla/administrator/components/com_magebridge/fields/disablejs.php @@ -1,4 +1,5 @@ 0, 'text' => JText::_('JNO')], - ['value' => 1, 'text' => JText::_('JYES')], - ['value' => 2, 'text' => JText::_('JONLY')], - ['value' => 3, 'text' => JText::_('JALL_EXCEPT')], + ['value' => 0, 'text' => Text::_('JNO')], + ['value' => 1, 'text' => Text::_('JYES')], + ['value' => 2, 'text' => Text::_('JONLY')], + ['value' => 3, 'text' => Text::_('JALL_EXCEPT')], ]; foreach ($options as $index => $option) { @@ -56,7 +58,7 @@ protected function getInput() } $html = ''; - $html .= JHtml::_('select.radiolist', $options, 'disable_js_all', 'class="btn-group"', 'value', 'text', $current); + $html .= HTMLHelper::_('select.radiolist', $options, 'disable_js_all', 'class="btn-group"', 'value', 'text', $current); $html .= '

'; $html .= ''; diff --git a/joomla/administrator/components/com_magebridge/fields/httpauth.php b/joomla/administrator/components/com_magebridge/fields/httpauth.php index 537b63cd4..47550742c 100644 --- a/joomla/administrator/components/com_magebridge/fields/httpauth.php +++ b/joomla/administrator/components/com_magebridge/fields/httpauth.php @@ -9,6 +9,8 @@ * @link https://www.yireo.com */ +use Joomla\CMS\HTML\HTMLHelper; + // Check to ensure this file is included in Joomla! defined('JPATH_BASE') or die(); @@ -38,6 +40,6 @@ protected function getInput() ['value' => CURLAUTH_NTLM, 'text' => 'CURLAUTH_HTLM'], ]; - return JHtml::_('select.genericlist', $options, 'http_authtype', null, 'value', 'text', $this->getConfig('http_authtype')); + return HTMLHelper::_('select.genericlist', $options, 'http_authtype', null, 'value', 'text', $this->getConfig('http_authtype')); } } diff --git a/joomla/administrator/components/com_magebridge/fields/ip.php b/joomla/administrator/components/com_magebridge/fields/ip.php index a6355d6e5..2c2ca885e 100644 --- a/joomla/administrator/components/com_magebridge/fields/ip.php +++ b/joomla/administrator/components/com_magebridge/fields/ip.php @@ -9,6 +9,8 @@ * @link https://www.yireo.com */ +use Joomla\CMS\Language\Text; + // Check to ensure this file is included in Joomla! defined('JPATH_BASE') or die(); @@ -38,7 +40,7 @@ protected function getInput() $html = null; $html .= ''; - $html .= ''; + $html .= ''; $html .= ''; return $html; diff --git a/joomla/administrator/components/com_magebridge/fields/product.php b/joomla/administrator/components/com_magebridge/fields/product.php index 5d95e377f..85c78b77a 100644 --- a/joomla/administrator/components/com_magebridge/fields/product.php +++ b/joomla/administrator/components/com_magebridge/fields/product.php @@ -9,6 +9,9 @@ * @link https://www.yireo.com */ +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Language\Text; + // Check to ensure this file is included in Joomla! defined('JPATH_BASE') or die(); @@ -39,8 +42,8 @@ protected function getInput() // Are the API widgets enabled? if ($this->getConfig('api_widgets') == true) { // Load the javascript - JHtml::script('media/com_magebridge/js/backend-elements.js'); - JHtml::_('behavior.modal', 'a.modal'); + HTMLHelper::script('media/com_magebridge/js/backend-elements.js'); + HTMLHelper::_('behavior.modal', 'a.modal'); $returnType = (string) $this->element['return']; @@ -56,7 +59,7 @@ protected function getInput() $html = []; $html[] = ''; $html[] = ''; - $html[] = ' ' . JText::_('JSELECT') . ''; + $html[] = ' ' . Text::_('JSELECT') . ''; $html[] = ''; $html = implode("\n", $html); diff --git a/joomla/administrator/components/com_magebridge/fields/scripts.php b/joomla/administrator/components/com_magebridge/fields/scripts.php index 6694879e4..3d7f71eb9 100644 --- a/joomla/administrator/components/com_magebridge/fields/scripts.php +++ b/joomla/administrator/components/com_magebridge/fields/scripts.php @@ -9,6 +9,10 @@ * @link https://www.yireo.com */ +use Joomla\CMS\Factory; +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Language\Text; + // Check to ensure this file is included in Joomla! defined('JPATH_BASE') or die(); @@ -36,17 +40,18 @@ protected function getInput() $value = $this->value; if ($this->getConfig('api_widgets') == true) { - $cache = JFactory::getCache('com_magebridge.admin'); - $options = $cache->call(['MagebridgeFormFieldScripts', 'getResult']); + /** @var CallbackController */ + $cache = Factory::getCache('com_magebridge.admin'); + $options = $cache->get(['MagebridgeFormFieldScripts', 'getResult']); // Parse the result into an HTML form-field if (!empty($options) && is_array($options)) { $current_options = MageBridgeHelper::getDisableJs(); $size = (count($options) > 10) ? 10 : count($options); - array_unshift($options, ['value' => '', 'label' => '- ' . JText::_('None') . ' -']); - array_unshift($options, ['value' => 'ALL', 'label' => '- ' . JText::_('JALL') . ' -']); + array_unshift($options, ['value' => '', 'label' => '- ' . Text::_('None') . ' -']); + array_unshift($options, ['value' => 'ALL', 'label' => '- ' . Text::_('JALL') . ' -']); - return JHtml::_('select.genericlist', $options, $name . '[]', 'multiple="multiple" size="' . $size . '"', 'value', 'label', $current_options); + return HTMLHelper::_('select.genericlist', $options, $name . '[]', 'multiple="multiple" size="' . $size . '"', 'value', 'label', $current_options); } $this->debugger->warning('Unable to obtain MageBridge API Widget "scripts"', $options); diff --git a/joomla/administrator/components/com_magebridge/fields/store.php b/joomla/administrator/components/com_magebridge/fields/store.php index 1c2f01c92..8127deee1 100644 --- a/joomla/administrator/components/com_magebridge/fields/store.php +++ b/joomla/administrator/components/com_magebridge/fields/store.php @@ -9,6 +9,8 @@ * @link https://www.yireo.com */ +use Joomla\CMS\HTML\HTMLHelper; + // Check to ensure this file is included in Joomla! defined('JPATH_BASE') or die(); @@ -70,7 +72,7 @@ protected function getInput() array_unshift($options, ['value' => '', 'label' => '-- Select --']); $extra = null; - return JHtml::_('select.genericlist', $options, $fieldName, $extra, 'value', 'label', $value); + return HTMLHelper::_('select.genericlist', $options, $fieldName, $extra, 'value', 'label', $value); } $this->debugger->warning('Unable to obtain MageBridge API Widget "store"', $options); diff --git a/joomla/administrator/components/com_magebridge/fields/storegroup.php b/joomla/administrator/components/com_magebridge/fields/storegroup.php index b36876039..25b25587e 100644 --- a/joomla/administrator/components/com_magebridge/fields/storegroup.php +++ b/joomla/administrator/components/com_magebridge/fields/storegroup.php @@ -1,4 +1,5 @@ getConfig('api_widgets') == true) { - $cache = JFactory::getCache('com_magebridge.admin'); - $options = $cache->call(['JFormFieldStoregroup', 'getResult']); + /** @var CallbackController */ + $cache = Factory::getCache('com_magebridge.admin'); + $options = $cache->get(['JFormFieldStoregroup', 'getResult']); // Parse the result into an HTML form-field if (!empty($options) && is_array($options)) { @@ -50,7 +55,7 @@ protected function getInput() array_unshift($options, ['value' => '', 'label' => '']); - return JHtml::_('select.genericlist', $options, $fieldName, null, 'value', 'label', $value); + return HTMLHelper::_('select.genericlist', $options, $fieldName, null, 'value', 'label', $value); } $this->debugger->warning('Unable to obtain MageBridge API Widget "storegroup"', $options); diff --git a/joomla/administrator/components/com_magebridge/fields/storeview.php b/joomla/administrator/components/com_magebridge/fields/storeview.php index 8bbae7f47..34efaf0c9 100644 --- a/joomla/administrator/components/com_magebridge/fields/storeview.php +++ b/joomla/administrator/components/com_magebridge/fields/storeview.php @@ -1,4 +1,5 @@ value; if ($this->getConfig('api_widgets') == true) { - $cache = JFactory::getCache('com_magebridge.admin'); - $options = $cache->call(['JElementStoreview', 'getResult']); + /** @var CallbackController */ + $cache = Factory::getCache('com_magebridge.admin'); + $options = $cache->get(['JElementStoreview', 'getResult']); // Parse the result into an HTML form-field if (!empty($options) && is_array($options)) { @@ -58,7 +63,7 @@ protected function getInput() array_unshift($options, ['value' => '', 'label' => '']); - return JHtml::_('select.genericlist', $options, $fieldName, null, 'value', 'label', $value); + return HTMLHelper::_('select.genericlist', $options, $fieldName, null, 'value', 'label', $value); } $this->debugger->warning('Unable to obtain MageBridge API Widget "storeview"', $options); diff --git a/joomla/administrator/components/com_magebridge/fields/stylesheets.php b/joomla/administrator/components/com_magebridge/fields/stylesheets.php index fc2147877..ebe8a39bc 100644 --- a/joomla/administrator/components/com_magebridge/fields/stylesheets.php +++ b/joomla/administrator/components/com_magebridge/fields/stylesheets.php @@ -1,4 +1,5 @@ getConfig('api_widgets') == true) { - $cache = JFactory::getCache('com_magebridge.admin'); - $options = $cache->call(['MagebridgeFormFieldStylesheets', 'getResult']); + /** @var CallbackController */ + $cache = Factory::getCache('com_magebridge.admin'); + $options = $cache->get(['MagebridgeFormFieldStylesheets', 'getResult']); if (empty($options) && !is_array($options)) { $this->debugger->warning('Unable to obtain MageBridge API Widget "stylesheets"', $options); @@ -48,7 +51,7 @@ protected function getInput() } MageBridgeTemplateHelper::load('jquery'); - JHtml::script('media/com_magebridge/js/backend-customoptions.js'); + HTMLHelper::script('media/com_magebridge/js/backend-customoptions.js'); $html = ''; $html .= $this->getRadioHTML(); @@ -76,13 +79,13 @@ public function getRadioHTML() ]; foreach ($options as $index => $option) { - $option['label'] = JText::_($option['label']); + $option['label'] = Text::_($option['label']); $options[$index] = ArrayHelper::toObject($option); } $attributes = null; - return JHtml::_('select.radiolist', $options, $name, $attributes, 'value', 'label', $value); + return HTMLHelper::_('select.radiolist', $options, $name, $attributes, 'value', 'label', $value); } /** @@ -106,9 +109,9 @@ public function getSelectHTML($options) if (!empty($options) && is_array($options)) { $size = (count($options) > 10) ? 10 : count($options); - array_unshift($options, ['value' => '', 'label' => '- ' . JText::_('JNONE') . ' -']); + array_unshift($options, ['value' => '', 'label' => '- ' . Text::_('JNONE') . ' -']); - return JHtml::_('select.genericlist', $options, $name . '[]', 'multiple="multiple" size="' . $size . '" ' . $disabled, 'value', 'label', $value); + return HTMLHelper::_('select.genericlist', $options, $name . '[]', 'multiple="multiple" size="' . $size . '" ' . $disabled, 'value', 'label', $value); } return ''; diff --git a/joomla/administrator/components/com_magebridge/fields/template.php b/joomla/administrator/components/com_magebridge/fields/template.php index d2ff3317b..a758a8ccf 100644 --- a/joomla/administrator/components/com_magebridge/fields/template.php +++ b/joomla/administrator/components/com_magebridge/fields/template.php @@ -9,6 +9,8 @@ * @link https://www.yireo.com */ +use Joomla\CMS\HTML\HTMLHelper; + // Check to ensure this file is included in Joomla! defined('JPATH_BASE') or die(); @@ -44,7 +46,7 @@ protected function getInput() if (!empty($options) && is_array($options)) { array_unshift($options, ['value' => '', 'text' => '']); - return JHtml::_('select.genericlist', $options, $fieldName, null, 'value', 'text', $this->getConfig($fieldName)); + return HTMLHelper::_('select.genericlist', $options, $fieldName, null, 'value', 'text', $this->getConfig($fieldName)); } return ''; diff --git a/joomla/administrator/components/com_magebridge/fields/theme.php b/joomla/administrator/components/com_magebridge/fields/theme.php index f627382da..55653dba7 100644 --- a/joomla/administrator/components/com_magebridge/fields/theme.php +++ b/joomla/administrator/components/com_magebridge/fields/theme.php @@ -9,6 +9,8 @@ * @link https://www.yireo.com */ +use Joomla\CMS\HTML\HTMLHelper; + // Check to ensure this file is included in Joomla! defined('JPATH_BASE') or die(); @@ -43,7 +45,7 @@ protected function getInput() if (!empty($options) && is_array($options)) { array_unshift($options, ['value' => '', 'label' => '']); - return JHtml::_('select.genericlist', $options, $name, null, 'value', 'label', $this->getConfig($fieldName)); + return HTMLHelper::_('select.genericlist', $options, $name, null, 'value', 'label', $this->getConfig($fieldName)); } } diff --git a/joomla/administrator/components/com_magebridge/fields/usergroup.php b/joomla/administrator/components/com_magebridge/fields/usergroup.php index 4f6546c27..a646b7a28 100644 --- a/joomla/administrator/components/com_magebridge/fields/usergroup.php +++ b/joomla/administrator/components/com_magebridge/fields/usergroup.php @@ -9,6 +9,8 @@ * @link https://www.yireo.com */ +use Joomla\CMS\HTML\HTMLHelper; + // Check to ensure this file is included in Joomla! defined('JPATH_BASE') or die(); @@ -52,6 +54,6 @@ protected function getInput() array_unshift($usergroups, ['value' => '', 'text' => '']); } - return JHtml::_('select.genericlist', $usergroups, $fieldName, $html, 'value', 'text', $value); + return HTMLHelper::_('select.genericlist', $usergroups, $fieldName, $html, 'value', 'text', $value); } } diff --git a/joomla/administrator/components/com_magebridge/fields/website.php b/joomla/administrator/components/com_magebridge/fields/website.php index 4cb02cf73..60351a420 100644 --- a/joomla/administrator/components/com_magebridge/fields/website.php +++ b/joomla/administrator/components/com_magebridge/fields/website.php @@ -1,4 +1,5 @@ element['access']; if (!empty($access)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); if ($user->authorise($access) == false) { return ''; @@ -74,7 +79,7 @@ protected function getInput() // Return a dropdown list array_unshift($options, ['value' => '', 'label' => '']); - return JHtml::_('select.genericlist', $options, $fieldName, null, 'value', 'label', $value); + return HTMLHelper::_('select.genericlist', $options, $fieldName, null, 'value', 'label', $value); } $this->debugger->warning('Unable to obtain MageBridge API Widget "website"', $options); diff --git a/joomla/administrator/components/com_magebridge/fields/widget.php b/joomla/administrator/components/com_magebridge/fields/widget.php index 5a5d78655..921f2b82b 100644 --- a/joomla/administrator/components/com_magebridge/fields/widget.php +++ b/joomla/administrator/components/com_magebridge/fields/widget.php @@ -9,6 +9,9 @@ * @link https://www.yireo.com */ +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Language\Text; + // Check to ensure this file is included in Joomla! defined('JPATH_BASE') or die(); @@ -41,8 +44,8 @@ protected function getInput() // Are the API widgets enabled? if ($this->getConfig('api_widgets') == true) { // Load the javascript - JHtml::script('media/com_magebridge/js/backend-elements.js'); - JHtml::_('behavior.modal', 'a.modal'); + HTMLHelper::script('media/com_magebridge/js/backend-elements.js'); + HTMLHelper::_('behavior.modal', 'a.modal'); $title = $value; $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8'); @@ -52,7 +55,7 @@ protected function getInput() $html .= ''; $html .= ''; $html .= '
'; - $html .= '' . JText::_('Select') . ''; + $html .= '' . Text::_('Select') . ''; $html .= '
' . "\n"; return $html; diff --git a/joomla/administrator/components/com_magebridge/helpers/acl.php b/joomla/administrator/components/com_magebridge/helpers/acl.php index 03f2033e5..43ebb1d86 100644 --- a/joomla/administrator/components/com_magebridge/helpers/acl.php +++ b/joomla/administrator/components/com_magebridge/helpers/acl.php @@ -1,4 +1,5 @@ input->getCmd('view'); + $view = $application->input->getCmd('view'); } - switch($view) { + switch ($view) { case 'config': $authorise = 'com_magebridge.config'; break; @@ -71,11 +75,11 @@ public static function isAuthorized($view = null, $redirect = true) if ($user->authorise($authorise, 'com_magebridge') == false && $user->authorise('com_magebridge.demo_ro', 'com_magebridge') == false) { if ($user->authorise('core.manage', 'com_magebridge')) { if ($redirect) { - $application->redirect('index.php?option=com_magebridge', JText::_('ALERTNOTAUTH')); + $application->redirect('index.php?option=com_magebridge', Text::_('ALERTNOTAUTH')); } } else { if ($redirect) { - $application->redirect('index.php', JText::_('ALERTNOTAUTH')); + $application->redirect('index.php', Text::_('ALERTNOTAUTH')); } } return false; @@ -90,7 +94,7 @@ public static function isAuthorized($view = null, $redirect = true) */ public static function isDemo() { - $user = JFactory::getUser(); + $user = Factory::getUser(); if ($user->authorise('com_magebridge.demo_ro', 'com_magebridge') == true && $user->authorise('com_magebridge.demo_rw', 'com_magebridge') == false) { return true; } diff --git a/joomla/administrator/components/com_magebridge/helpers/element.php b/joomla/administrator/components/com_magebridge/helpers/element.php index bd8f987c0..f1459a941 100644 --- a/joomla/administrator/components/com_magebridge/helpers/element.php +++ b/joomla/administrator/components/com_magebridge/helpers/element.php @@ -10,9 +10,13 @@ * @link https://www.yireo.com */ +use Joomla\CMS\Factory; +use Joomla\String\StringHelper; + // Check to ensure this file is included in Joomla! defined('_JEXEC') or die(); + include_once JPATH_ADMINISTRATOR . '/components/com_magebridge/libraries/loader.php'; /** @@ -88,11 +92,12 @@ public static function getProductList() $arguments = ['minimal_price' => 0]; // Fetch any current filters - $application = JFactory::getApplication(); + /** @var \Joomla\CMS\Application\CMSApplication */ + $application = Factory::getApplication(); $option = $application->input->getCmd('option') . '-element-products'; // Set the limits - $default_limit = JFactory::getConfig()->get('list_limit'); + $default_limit = Factory::getConfig()->get('list_limit'); if (empty($default_limit)) { $default_limit = 20; } @@ -101,7 +106,7 @@ public static function getProductList() // Add the search-filter $search = $application->getUserStateFromRequest($option . '.search', 'search', '', 'string'); - $search = Joomla\String\StringHelper::strtolower(trim($search)); + $search = StringHelper::strtolower(trim($search)); if (strlen($search) > 0) { $arguments['filters'] = [ 'name' => ['like' => ['%' . $search . '%']], @@ -132,12 +137,13 @@ public static function getProductList() public static function getCategoryTree($arguments = []) { // Initialize some important variables - $application = JFactory::getApplication(); - $option = JFactory::getApplication()->input->getCmd('option') . '-element-categories'; + /** @var \Joomla\CMS\Application\CMSApplication */ + $application = Factory::getApplication(); + $option = Factory::getApplication()->input->getCmd('option') . '-element-categories'; // Add the search-filter $search = $application->getUserStateFromRequest($option . '.search', 'search', '', 'string'); - $search = Joomla\String\StringHelper::strtolower(trim($search)); + $search = StringHelper::strtolower(trim($search)); if (strlen($search) > 0) { $arguments['filters'] = [ diff --git a/joomla/administrator/components/com_magebridge/helpers/form.php b/joomla/administrator/components/com_magebridge/helpers/form.php index 3684506c9..063119436 100644 --- a/joomla/administrator/components/com_magebridge/helpers/form.php +++ b/joomla/administrator/components/com_magebridge/helpers/form.php @@ -1,4 +1,5 @@ enqueueMessage($message, 'error'); + $message = Text::sprintf('COM_MAGEBRIDGE_UNKNOWN_FIELD', $type); + Factory::getApplication()->enqueueMessage($message, 'error'); return null; } @@ -54,7 +56,7 @@ public static function getField($type, $name, $value = null, $array = 'magebridg public static function getUsergroupOptions() { $query = 'SELECT `id` AS `value`, `title` AS `text` FROM `#__usergroups` WHERE `parent_id` > 0'; - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $db->setQuery($query); return $db->loadObjectList(); } diff --git a/joomla/administrator/components/com_magebridge/helpers/install.php b/joomla/administrator/components/com_magebridge/helpers/install.php index c76c00628..d1f93e167 100644 --- a/joomla/administrator/components/com_magebridge/helpers/install.php +++ b/joomla/administrator/components/com_magebridge/helpers/install.php @@ -1,4 +1,5 @@ setQuery($query); try { $db->execute(); - } catch(Exception $e) { + } catch (Exception $e) { } } } diff --git a/joomla/administrator/components/com_magebridge/helpers/update.php b/joomla/administrator/components/com_magebridge/helpers/update.php index 3137c344e..9cd3c623b 100644 --- a/joomla/administrator/components/com_magebridge/helpers/update.php +++ b/joomla/administrator/components/com_magebridge/helpers/update.php @@ -9,12 +9,12 @@ * @link https://www.yireo.com */ +use Joomla\CMS\Filesystem\File; +use Joomla\CMS\Installer\Installer; + // Check to ensure this file is included in Joomla! defined('_JEXEC') or die(); -// Include Joomla! libraries -jimport('joomla.filesystem.file'); - /** * MageBridge Controller */ @@ -70,13 +70,13 @@ public static function getCurrentVersion($package) break; } - if (JFile::exists($file) == false) { + if (File::exists($file) == false) { return false; } // @todo: Add a check whether this extension is actually installed (#__extensions) - $data = JInstaller::parseXMLInstallFile($file); + $data = Installer::parseXMLInstallFile($file); return $data['version']; } diff --git a/joomla/administrator/components/com_magebridge/helpers/view.php b/joomla/administrator/components/com_magebridge/helpers/view.php index 61c68bb82..042eac03b 100644 --- a/joomla/administrator/components/com_magebridge/helpers/view.php +++ b/joomla/administrator/components/com_magebridge/helpers/view.php @@ -10,6 +10,12 @@ * @link https://www.yireo.com */ +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Toolbar\Toolbar; +use Joomla\CMS\Toolbar\ToolbarHelper; +use Joomla\CMS\Uri\Uri; + // Check to ensure this file is included in Joomla! defined('_JEXEC') or die(); @@ -27,17 +33,17 @@ class MageBridgeViewHelper public static function initialize($title) { // Load important variables - $document = JFactory::getDocument(); - $view = JFactory::getApplication()->input->getCmd('view'); + $document = Factory::getDocument(); + $view = Factory::getApplication()->input->getCmd('view'); // Add CSS-code - $document->addStyleSheet(JUri::root() . 'media/com_magebridge/css/backend.css'); - $document->addStyleSheet(JUri::root() . 'media/com_magebridge/css/backend-view-' . $view . '.css'); - $document->addStyleSheet(JUri::root() . 'media/com_magebridge/css/backend-j35.css'); + $document->addStyleSheet(Uri::root() . 'media/com_magebridge/css/backend.css'); + $document->addStyleSheet(Uri::root() . 'media/com_magebridge/css/backend-view-' . $view . '.css'); + $document->addStyleSheet(Uri::root() . 'media/com_magebridge/css/backend-j35.css'); // Page title - $title = JText::_('COM_MAGEBRIDGE_VIEW_'.strtoupper(str_replace(' ', '_', $title))); - JToolbarHelper::title('MageBridge: '.$title, 'logo.png'); + $title = Text::_('COM_MAGEBRIDGE_VIEW_' . strtoupper(str_replace(' ', '_', $title))); + ToolbarHelper::title('MageBridge: ' . $title, 'logo.png'); // Add the menu self::addMenuItems(); @@ -51,7 +57,7 @@ public static function initialize($title) */ protected static function addMenuItems() { - $menu = JToolbar::getInstance('submenu'); + $menu = Toolbar::getInstance('submenu'); if (method_exists($menu, 'getItems')) { $currentItems = $menu->getItems(); } else { @@ -86,9 +92,9 @@ protected static function addMenuItems() } // Add the view - $active = (JFactory::getApplication()->input->getCmd('view') == $view) ? true : false; + $active = (Factory::getApplication()->input->getCmd('view') == $view) ? true : false; $url = 'index.php?option=com_magebridge&view=' . $view; - $title = JText::_('COM_MAGEBRIDGE_VIEW_' . $view); + $title = Text::_('COM_MAGEBRIDGE_VIEW_' . $view); $alreadySet = false; foreach ($currentItems as $currentItem) { diff --git a/joomla/administrator/components/com_magebridge/helpers/widget.php b/joomla/administrator/components/com_magebridge/helpers/widget.php index 40cba4424..80c525fdf 100644 --- a/joomla/administrator/components/com_magebridge/helpers/widget.php +++ b/joomla/administrator/components/com_magebridge/helpers/widget.php @@ -9,6 +9,8 @@ * @link https://www.yireo.com */ +use Joomla\CMS\Factory; + // Check to ensure this file is included in Joomla! defined('_JEXEC') or die(); @@ -51,9 +53,10 @@ public static function getWidgetData($name = null) return null; } - $cache = JFactory::getCache('com_magebridge.admin'); + /** @var CallbackController */ + $cache = Factory::getCache('com_magebridge.admin'); $cache->setCaching(0); - $result = $cache->call(['MageBridgeWidgetHelper', $function]); + $result = $cache->get(['MageBridgeWidgetHelper', $function]); return $result; } diff --git a/joomla/administrator/components/com_magebridge/magebridge.php b/joomla/administrator/components/com_magebridge/magebridge.php index dd0b19dec..dcd1ab13c 100644 --- a/joomla/administrator/components/com_magebridge/magebridge.php +++ b/joomla/administrator/components/com_magebridge/magebridge.php @@ -1,4 +1,5 @@ input->getCmd('view') == '') { diff --git a/joomla/administrator/components/com_magebridge/models/check.php b/joomla/administrator/components/com_magebridge/models/check.php index 976688c97..e9075efdc 100644 --- a/joomla/administrator/components/com_magebridge/models/check.php +++ b/joomla/administrator/components/com_magebridge/models/check.php @@ -1,4 +1,5 @@ _checks[$group][] = [ - 'text' => JText::_($check), + 'text' => Text::_($check), 'status' => $status, 'description' => $description, ]; @@ -113,26 +124,26 @@ public function doBridgeChecks() $magebridge_version_joomla = MageBridgeUpdateHelper::getComponentVersion(); if (empty($magebridge_version_magento)) { - $this->addResult('bridge', 'Bridge version', self::CHECK_WARNING, JText::_('COM_MAGEBRIDGE_CHECK_BRIDGE_NO_VERSION')); + $this->addResult('bridge', 'Bridge version', self::CHECK_WARNING, Text::_('COM_MAGEBRIDGE_CHECK_BRIDGE_NO_VERSION')); } else { $result = (version_compare($magebridge_version_magento, $magebridge_version_joomla, '=')) ? self::CHECK_OK : self::CHECK_ERROR; - $this->addResult('bridge', 'Bridge version', $result, JText::sprintf('COM_MAGEBRIDGE_CHECK_BRIDGE_VERSION', $magebridge_version_magento, $magebridge_version_joomla)); + $this->addResult('bridge', 'Bridge version', $result, Text::sprintf('COM_MAGEBRIDGE_CHECK_BRIDGE_VERSION', $magebridge_version_magento, $magebridge_version_joomla)); } $result = (MageBridgeModelConfig::load('modify_url') == 1) ? self::CHECK_OK : self::CHECK_WARNING; - $this->addResult('bridge', 'Modify URLs', $result, JText::_('COM_MAGEBRIDGE_CHECK_BRIDGE_MODIFY_URL')); + $this->addResult('bridge', 'Modify URLs', $result, Text::_('COM_MAGEBRIDGE_CHECK_BRIDGE_MODIFY_URL')); $result = (MageBridgeModelConfig::load('disable_js_mootools') == 1) ? self::CHECK_OK : self::CHECK_WARNING; - $this->addResult('bridge', 'Disable MooTools', $result, JText::_('COM_MAGEBRIDGE_CHECK_BRIDGE_DISABLE_MOOTOOLS')); + $this->addResult('bridge', 'Disable MooTools', $result, Text::_('COM_MAGEBRIDGE_CHECK_BRIDGE_DISABLE_MOOTOOLS')); $result = (MageBridgeModelConfig::load('link_to_magento') == 0) ? self::CHECK_OK : self::CHECK_WARNING; - $this->addResult('bridge', 'Link to Magento', $result, JText::_('COM_MAGEBRIDGE_CHECK_BRIDGE_LINK_TO_MAGENTO')); + $this->addResult('bridge', 'Link to Magento', $result, Text::_('COM_MAGEBRIDGE_CHECK_BRIDGE_LINK_TO_MAGENTO')); $result = $this->checkStoreRelations(); - $this->addResult('bridge', 'Store Relations', $result, JText::_('COM_MAGEBRIDGE_CHECK_BRIDGE_STORE_RELATIONS')); + $this->addResult('bridge', 'Store Relations', $result, Text::_('COM_MAGEBRIDGE_CHECK_BRIDGE_STORE_RELATIONS')); //$result = (defined('MAGEBRIDGE_MODULEHELPER_OVERRIDE') == true) ? self::CHECK_OK : self::CHECK_WARNING; - //$this->addResult('bridge', 'Modulehelper override', $result, JText::_('COM_MAGEBRIDGE_CHECK_BRIDGE_MODULEHELPER_OVERRIDE')); + //$this->addResult('bridge', 'Modulehelper override', $result, Text::_('COM_MAGEBRIDGE_CHECK_BRIDGE_MODULEHELPER_OVERRIDE')); return; } @@ -163,12 +174,12 @@ private function getBytesFromValue($val) public function doSystemChecks($installer = false) { $config = MageBridgeModelConfig::load(); - $joomlaConfig = JFactory::getConfig(); + $joomlaConfig = Factory::getConfig(); $server_software = (isset($_SERVER['software'])) ? $_SERVER['software'] : null; // System Compatibility - $result = (version_compare(phpversion(), '7.4.0', '>=')) ? self::CHECK_OK : self::CHECK_ERROR; - $this->addResult('compatibility', 'PHP version', $result, JText::sprintf('COM_MAGEBRIDGE_CHECK_PHP_VERSION', '7.4.0')); + $result = (version_compare(phpversion(), '8.1.0', '>=')) ? self::CHECK_OK : self::CHECK_ERROR; + $this->addResult('compatibility', 'PHP version', $result, Text::sprintf('COM_MAGEBRIDGE_CHECK_PHP_VERSION', '8.1.0')); $memoryLimit = $this->getBytesFromValue(ini_get('memory_limit')); $result = ($memoryLimit >= (32 * 1024 * 1024)) ? self::CHECK_OK : self::CHECK_ERROR; @@ -177,29 +188,23 @@ public function doSystemChecks($installer = false) $result = self::CHECK_OK; } - $this->addResult('compatibility', 'PHP memory', $result, JText::sprintf('COM_MAGEBRIDGE_CHECK_PHP_MEMORY', '32Mb', ini_get('memory_limit'))); + $this->addResult('compatibility', 'PHP memory', $result, Text::sprintf('COM_MAGEBRIDGE_CHECK_PHP_MEMORY', '32Mb', ini_get('memory_limit'))); - $jversion = new JVersion(); + $jversion = new Version(); $result = (version_compare($jversion->getShortVersion(), '3.0.0', '>=')) ? self::CHECK_OK : self::CHECK_ERROR; - $this->addResult('compatibility', 'Joomla! version', $result, JText::sprintf('COM_MAGEBRIDGE_CHECK_JOOMLA_VERSION', '3.0.0')); + $this->addResult('compatibility', 'Joomla! version', $result, Text::sprintf('COM_MAGEBRIDGE_CHECK_JOOMLA_VERSION', '3.0.0')); $result = (function_exists('simplexml_load_string')) ? self::CHECK_OK : self::CHECK_ERROR; - $this->addResult('compatibility', 'SimpleXML', $result, JText::_('COM_MAGEBRIDGE_CHECK_SIMPLEXML')); + $this->addResult('compatibility', 'SimpleXML', $result, Text::_('COM_MAGEBRIDGE_CHECK_SIMPLEXML')); $result = (in_array('ssl', stream_get_transports())) ? self::CHECK_OK : self::CHECK_ERROR; - $this->addResult('compatibility', 'OpenSSL', $result, JText::_('COM_MAGEBRIDGE_CHECK_OPENSSL')); + $this->addResult('compatibility', 'OpenSSL', $result, Text::_('COM_MAGEBRIDGE_CHECK_OPENSSL')); $result = (function_exists('json_decode')) ? self::CHECK_OK : self::CHECK_ERROR; - $this->addResult('compatibility', 'JSON', $result, JText::_('COM_MAGEBRIDGE_CHECK_JSON')); + $this->addResult('compatibility', 'JSON', $result, Text::_('COM_MAGEBRIDGE_CHECK_JSON')); $result = (function_exists('curl_init')) ? self::CHECK_OK : self::CHECK_ERROR; - $this->addResult('compatibility', 'CURL', $result, JText::_('COM_MAGEBRIDGE_CHECK_CURL')); - - $result = (ini_get('magic_quotes_gpc')) ? self::CHECK_ERROR : self::CHECK_OK; - $this->addResult('compatibility', 'magic_quotes_gpc', $result, JText::_('COM_MAGEBRIDGE_CHECK_MAGIC_QUOTES_GPC')); - - $result = (ini_get('safe_mode')) ? self::CHECK_ERROR : self::CHECK_OK; - $this->addResult('compatibility', 'safe_mode', $result, JText::_('COM_MAGEBRIDGE_CHECK_SAFE_MODE')); + $this->addResult('compatibility', 'CURL', $result, Text::_('COM_MAGEBRIDGE_CHECK_CURL')); if (stristr($server_software, 'apache')) { if (function_exists('apache_get_modules')) { @@ -208,44 +213,44 @@ public function doSystemChecks($installer = false) } else { $result = getenv('HTTP_MOD_REWRITE') == 'On' ? true : false; } - $this->addResult('compatibility', 'Apache mod_rewrite', $result, JText::_('COM_MAGEBRIDGE_CHECK_MOD_REWRITE')); + $this->addResult('compatibility', 'Apache mod_rewrite', $result, Text::_('COM_MAGEBRIDGE_CHECK_MOD_REWRITE')); } $result = $this->checkWebOwner(); - $this->addResult('compatibility', 'File Ownership', $result, JText::_('COM_MAGEBRIDGE_CHECK_FILE_OWNERSHIP')); + $this->addResult('compatibility', 'File Ownership', $result, Text::_('COM_MAGEBRIDGE_CHECK_FILE_OWNERSHIP')); // System Configuration if (stristr($server_software, 'apache')) { $result = (file_exists(JPATH_SITE . '/.htaccess')) ? self::CHECK_OK : self::CHECK_ERROR; - $this->addResult('system', 'htaccess', $result, JText::_('COM_MAGEBRIDGE_CHECK_HTACCESS')); + $this->addResult('system', 'htaccess', $result, Text::_('COM_MAGEBRIDGE_CHECK_HTACCESS')); } $result = ($joomlaConfig->get('sef') == 1) ? self::CHECK_OK : self::CHECK_ERROR; - $this->addResult('system', 'SEF', $result, JText::_('COM_MAGEBRIDGE_CHECK_SEF')); + $this->addResult('system', 'SEF', $result, Text::_('COM_MAGEBRIDGE_CHECK_SEF')); $result = ($joomlaConfig->get('sef_rewrite') == 1) ? self::CHECK_OK : self::CHECK_WARNING; - $this->addResult('system', 'SEF Rewrites', $result, JText::_('COM_MAGEBRIDGE_CHECK_SEF_REWRITE')); + $this->addResult('system', 'SEF Rewrites', $result, Text::_('COM_MAGEBRIDGE_CHECK_SEF_REWRITE')); $result = ($joomlaConfig->get('caching') == 0) ? self::CHECK_OK : self::CHECK_WARNING; - $this->addResult('system', 'Caching', $result, JText::_('COM_MAGEBRIDGE_CHECK_CACHING')); + $this->addResult('system', 'Caching', $result, Text::_('COM_MAGEBRIDGE_CHECK_CACHING')); - $cachePlugin = JPluginHelper::getPlugin('system', 'cache'); + $cachePlugin = PluginHelper::getPlugin('system', 'cache'); $result = (empty($cachePlugin)) ? self::CHECK_OK : self::CHECK_ERROR; - $this->addResult('system', 'Cache Plugin', $result, JText::_('COM_MAGEBRIDGE_CHECK_CACHEPLUGIN')); + $this->addResult('system', 'Cache Plugin', $result, Text::_('COM_MAGEBRIDGE_CHECK_CACHEPLUGIN')); if ($installer == false) { $result = ((bool) MageBridgeUrlHelper::getRootItem()) ? self::CHECK_OK : self::CHECK_WARNING; - $this->addResult('system', 'Root item', $result, JText::_('COM_MAGEBRIDGE_CHECK_ROOT_ITEM')); + $this->addResult('system', 'Root item', $result, Text::_('COM_MAGEBRIDGE_CHECK_ROOT_ITEM')); } $result = self::checkWritable($joomlaConfig->get('tmp_path')); - $this->addResult('system', 'Temporary path writable', $result, JText::_('COM_MAGEBRIDGE_CHECK_TMP')); + $this->addResult('system', 'Temporary path writable', $result, Text::_('COM_MAGEBRIDGE_CHECK_TMP')); $result = self::checkWritable($joomlaConfig->get('log_path')); - $this->addResult('system', 'Log path writable', $result, JText::_('COM_MAGEBRIDGE_CHECK_LOG')); + $this->addResult('system', 'Log path writable', $result, Text::_('COM_MAGEBRIDGE_CHECK_LOG')); $result = self::checkWritable(JPATH_SITE . '/cache'); - $this->addResult('system', 'Cache writable', $result, JText::_('COM_MAGEBRIDGE_CHECK_CACHE')); + $this->addResult('system', 'Cache writable', $result, Text::_('COM_MAGEBRIDGE_CHECK_CACHE')); return; } @@ -256,27 +261,27 @@ public function doSystemChecks($installer = false) public function doExtensionChecks() { if (file_exists(JPATH_SITE . '/plugins/system/rokmoduleorder.php')) { - $this->addResult('extension', 'RokModuleOrder', self::CHECK_ERROR, JText::_('COM_MAGEBRIDGE_CHECK_ROKMODULEORDER')); + $this->addResult('extension', 'RokModuleOrder', self::CHECK_ERROR, Text::_('COM_MAGEBRIDGE_CHECK_ROKMODULEORDER')); } if (file_exists(JPATH_SITE . '/plugins/system/rsform.php')) { - $this->addResult('extension', 'RSForm', self::CHECK_ERROR, JText::_('COM_MAGEBRIDGE_CHECK_RSFORM')); + $this->addResult('extension', 'RSForm', self::CHECK_ERROR, Text::_('COM_MAGEBRIDGE_CHECK_RSFORM')); } if (file_exists(JPATH_SITE . '/components/com_acesef/acesef.php')) { - $this->addResult('extension', 'AceSEF', self::CHECK_ERROR, JText::_('COM_MAGEBRIDGE_CHECK_ACESEF')); + $this->addResult('extension', 'AceSEF', self::CHECK_ERROR, Text::_('COM_MAGEBRIDGE_CHECK_ACESEF')); } if (file_exists(JPATH_SITE . '/components/com_sh404sef/sh404sef.php')) { - $this->addResult('extension', 'sh404SEF', self::CHECK_ERROR, JText::_('COM_MAGEBRIDGE_CHECK_SH404SEF')); + $this->addResult('extension', 'sh404SEF', self::CHECK_ERROR, Text::_('COM_MAGEBRIDGE_CHECK_SH404SEF')); } if (file_exists(JPATH_ADMINISTRATOR . '/components/com_sef/controller.php')) { - $this->addResult('extension', 'JoomSEF', self::CHECK_WARNING, JText::_('COM_MAGEBRIDGE_CHECK_JOOMSEF')); + $this->addResult('extension', 'JoomSEF', self::CHECK_WARNING, Text::_('COM_MAGEBRIDGE_CHECK_JOOMSEF')); } if (file_exists(JPATH_SITE . '/components/com_rsfirewall/rsfirewall.php')) { - $this->addResult('extension', 'RSFirewall', self::CHECK_WARNING, JText::_('COM_MAGEBRIDGE_CHECK_RSFIREWALL')); + $this->addResult('extension', 'RSFirewall', self::CHECK_WARNING, Text::_('COM_MAGEBRIDGE_CHECK_RSFIREWALL')); } return; @@ -287,7 +292,7 @@ public function doExtensionChecks() */ public function doPluginChecks() { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $plugins = [ [ @@ -312,28 +317,28 @@ public function doPluginChecks() $result = (file_exists(JPATH_SITE . '/plugins/' . $group . '/' . $name . '/' . $name . '.php')) ? self::CHECK_OK : self::CHECK_ERROR; if ($result == self::CHECK_ERROR) { - $description = JText::_('COM_MAGEBRIDGE_CHECK_PLUGIN_NOT_INSTALLED'); + $description = Text::_('COM_MAGEBRIDGE_CHECK_PLUGIN_NOT_INSTALLED'); $this->addResult('extensions', $title, self::CHECK_ERROR, $description); } else { - $pluginObject = JPluginHelper::getPlugin($group, 'magebridge'); + $pluginObject = PluginHelper::getPlugin($group, 'magebridge'); $db->setQuery('SELECT extension_id AS id,enabled FROM #__extensions WHERE `type`="plugin" AND `element`="magebridge" AND `folder`="' . $group . '" LIMIT 1'); $row = $db->loadObject(); if (empty($row)) { - $description = JText::_('COM_MAGEBRIDGE_CHECK_PLUGIN_NOT_INSTALLED'); + $description = Text::_('COM_MAGEBRIDGE_CHECK_PLUGIN_NOT_INSTALLED'); $this->addResult('extensions', $title, self::CHECK_ERROR, $description); continue; } $url = 'index.php?option=com_plugins'; if ($row->enabled == 0) { - $description = JText::sprintf('COM_MAGEBRIDGE_CHECK_PLUGIN_DISABLED', $url); + $description = Text::sprintf('COM_MAGEBRIDGE_CHECK_PLUGIN_DISABLED', $url); $this->addResult('extensions', $title, self::CHECK_ERROR, $description); continue; } - $this->addResult('extensions', $plugin[2], (bool) $pluginObject, JText::_('COM_MAGEBRIDGE_CHECK_PLUGIN_ENABLED')); + $this->addResult('extensions', $plugin[2], (bool) $pluginObject, Text::_('COM_MAGEBRIDGE_CHECK_PLUGIN_ENABLED')); } } @@ -376,7 +381,7 @@ public function checkWebOwner() */ public function checkWritable($path) { - $config = JFactory::getConfig(); + $config = Factory::getConfig(); // Return a warning because we can't check this with JFTP enabled if ($config->get('ftp_enable') == 1) { @@ -398,7 +403,7 @@ public function checkWritable($path) */ public function checkStoreRelations() { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // Count the languages $query = 'SELECT COUNT(*) FROM #__languages WHERE `published`=1'; diff --git a/joomla/administrator/components/com_magebridge/models/log.php b/joomla/administrator/components/com_magebridge/models/log.php index c58b3a12b..0fc00254c 100644 --- a/joomla/administrator/components/com_magebridge/models/log.php +++ b/joomla/administrator/components/com_magebridge/models/log.php @@ -9,12 +9,11 @@ * @link https://www.yireo.com */ +use Joomla\CMS\Date\Date; + // Check to ensure this file is included in Joomla! defined('_JEXEC') or die(); -// Import Joomla! libraries -jimport('joomla.utilities.date'); - /** * MageBridge Logs model */ @@ -56,7 +55,7 @@ public function add($message, $level = 0) public function store($data) { // Prepare the data - $now = new JDate('now'); + $now = new Date('now'); // Build the data $data['remote_addr'] = $_SERVER['REMOTE_ADDR']; diff --git a/joomla/administrator/components/com_magebridge/models/logs.php b/joomla/administrator/components/com_magebridge/models/logs.php index 1bbe2ac74..0e81c893c 100644 --- a/joomla/administrator/components/com_magebridge/models/logs.php +++ b/joomla/administrator/components/com_magebridge/models/logs.php @@ -29,9 +29,9 @@ public function __construct() } /** - * @param JDatabaseQuery $query + * @param \Joomla\Database\DatabaseQuery $query * - * @return JDatabaseQuery + * @return \Joomla\Database\DatabaseQuery */ public function onBuildQuery($query) { diff --git a/joomla/administrator/components/com_magebridge/models/product.php b/joomla/administrator/components/com_magebridge/models/product.php index dabedbc3c..fe7137fe7 100644 --- a/joomla/administrator/components/com_magebridge/models/product.php +++ b/joomla/administrator/components/com_magebridge/models/product.php @@ -1,4 +1,5 @@ setError(JText::_('COM_MAGEBRIDGE_MODEL_STORE_NO_STORE_SELECTED')); - - return false; + if (empty($data['store'])) { + throw new Exception(Text::_('COM_MAGEBRIDGE_MODEL_STORE_NO_STORE_SELECTED')); } + $values = explode(':', $data['store']); + $data['type'] = ($values[0] == 'g') ? 'storegroup' : 'storeview'; + $data['name'] = $values[1]; + $data['title'] = $values[2]; + unset($data['store']); + if (!empty($data['default']) && $data['default']) { $this->storeDefault($data['type'], $data['name']); - return true; } if (empty($data['name']) || empty($data['title'])) { - $this->setError(JText::_('COM_MAGEBRIDGE_MODEL_STORE_INVALID_STORE')); - - return false; + throw new Exception(Text::_('COM_MAGEBRIDGE_MODEL_STORE_INVALID_STORE')); } if (empty($data['label'])) { diff --git a/joomla/administrator/components/com_magebridge/models/url.php b/joomla/administrator/components/com_magebridge/models/url.php index 14c6a2fa8..a006da4cf 100644 --- a/joomla/administrator/components/com_magebridge/models/url.php +++ b/joomla/administrator/components/com_magebridge/models/url.php @@ -12,9 +12,6 @@ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die(); -// Import Joomla! libraries -jimport('joomla.utilities.date'); - /** * MageBridge URL model */ diff --git a/joomla/administrator/components/com_magebridge/models/usergroup.php b/joomla/administrator/components/com_magebridge/models/usergroup.php index 60f8a4763..093301b6b 100644 --- a/joomla/administrator/components/com_magebridge/models/usergroup.php +++ b/joomla/administrator/components/com_magebridge/models/usergroup.php @@ -12,9 +12,6 @@ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die(); -// Import Joomla! libraries -jimport('joomla.utilities.date'); - /** * MageBridge Usergroup model */ diff --git a/joomla/administrator/components/com_magebridge/models/users.php b/joomla/administrator/components/com_magebridge/models/users.php index ce977e02f..8df73d020 100644 --- a/joomla/administrator/components/com_magebridge/models/users.php +++ b/joomla/administrator/components/com_magebridge/models/users.php @@ -1,4 +1,5 @@ input->getCmd('option') . '-users'; + $option = $this->input->getCmd('option') . '-users'; // Get the pagination request variables - $limit = $application->getUserStateFromRequest('global.list.limit', 'limit', JFactory::getConfig() + $limit = $this->app->getUserStateFromRequest('global.list.limit', 'limit', Factory::getConfig() ->get('list_limit'), 'int'); - $limitstart = $application->getUserStateFromRequest($option . 'limitstart', 'limitstart', 0, 'int'); + $limitstart = $this->app->getUserStateFromRequest($option . 'limitstart', 'limitstart', 0, 'int'); $this->setState('limit', $limit); $this->setState('limitstart', $limitstart); @@ -92,14 +95,13 @@ public function getTotal() /** * Method to get a pagination object for the items * - * @return JPagination + * @return Pagination */ public function getPagination() { // Lets load the content if it doesn't already exist if (empty($this->_pagination)) { - jimport('joomla.html.pagination'); - $this->_pagination = new JPagination($this->getTotal(), $this->getState('limitstart'), $this->getState('limit')); + $this->_pagination = new Pagination($this->getTotal(), $this->getState('limitstart'), $this->getState('limit')); } return $this->_pagination; @@ -128,11 +130,10 @@ private function _buildQuery() */ private function _buildContentOrderBy() { - $application = JFactory::getApplication(); - $option = JFactory::getApplication()->input->getCmd('option') . '-users'; + $option = $this->input->getCmd('option') . '-users'; - $filter_order = $application->getUserStateFromRequest($option . 'filter_order', 'filter_order', 'u.username', 'cmd'); - $filter_order_Dir = $application->getUserStateFromRequest($option . 'filter_order_Dir', 'filter_order_Dir', '', 'word'); + $filter_order = $this->app->getUserStateFromRequest($option . 'filter_order', 'filter_order', 'u.username', 'cmd'); + $filter_order_Dir = $this->app->getUserStateFromRequest($option . 'filter_order_Dir', 'filter_order_Dir', '', 'word'); if ($filter_order && $filter_order_Dir) { $orderby = ' ORDER BY ' . $filter_order . ' ' . $filter_order_Dir; @@ -150,10 +151,9 @@ private function _buildContentOrderBy() */ private function _buildContentWhere() { - $application = JFactory::getApplication(); - $option = JFactory::getApplication()->input->getCmd('option') . '-users'; + $option = $this->input->getCmd('option') . '-users'; - $filter_state = $application->getUserStateFromRequest($option . 'filter_state', 'filter_state', '', 'word'); + $filter_state = $this->app->getUserStateFromRequest($option . 'filter_state', 'filter_state', '', 'word'); $where = []; diff --git a/joomla/administrator/components/com_magebridge/script.magebridge.php b/joomla/administrator/components/com_magebridge/script.magebridge.php index 75f6183a9..26d0703ab 100644 --- a/joomla/administrator/components/com_magebridge/script.magebridge.php +++ b/joomla/administrator/components/com_magebridge/script.magebridge.php @@ -1,4 +1,5 @@ splitSql($sqlcontent); @@ -57,7 +61,7 @@ public function doUpdate() $db->setQuery($query); try { $db->execute(); - } catch(Exception $e) { + } catch (Exception $e) { } } } @@ -75,10 +79,10 @@ public function doInstall() { // Try to include the file $file = 'administrator/components/com_magebridge/helpers/install.php'; - if (is_file(JPATH_ROOT.'/'.$file)) { - require_once JPATH_ROOT.'/'.$file; - } elseif (is_file(dirname(__FILE__).'/'.$file)) { - require_once dirname(__FILE__).'/'.$file; + if (is_file(JPATH_ROOT . '/' . $file)) { + require_once JPATH_ROOT . '/' . $file; + } elseif (is_file(dirname(__FILE__) . '/' . $file)) { + require_once dirname(__FILE__) . '/' . $file; } else { return true; } @@ -89,8 +93,7 @@ public function doInstall() } // Check for Joomla version - JLoader::import('joomla.version'); - $jversion = new JVersion(); + $jversion = new Version(); if (version_compare($jversion->RELEASE, '3.0.0', '<')) { return false; } @@ -105,11 +108,10 @@ public function doInstall() public function doUninstall() { // Initialize the Joomla! installer - jimport('joomla.installer.installer'); - $installer = JInstaller::getInstance(); + $installer = Installer::getInstance(); // Select all MageBridge modules and remove them - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = "SELECT `id`,`client_id` FROM #__modules WHERE `module` LIKE 'mod_magebridge%'"; $db->setQuery($query); $rows = $db->loadObjectList(); @@ -120,7 +122,7 @@ public function doUninstall() } // Select all MageBridge plugins and remove them - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = "SELECT `id`,`client_id` FROM #__plugins WHERE `element` LIKE 'magebridge%' OR `folder` = 'magento'"; $db->setQuery($query); $rows = $db->loadObjectList(); diff --git a/joomla/administrator/components/com_magebridge/sql/install.mysql.utf8.sql b/joomla/administrator/components/com_magebridge/sql/install.mysql.utf8.sql index 22d8aa2bd..387113876 100644 --- a/joomla/administrator/components/com_magebridge/sql/install.mysql.utf8.sql +++ b/joomla/administrator/components/com_magebridge/sql/install.mysql.utf8.sql @@ -1,7 +1,7 @@ CREATE TABLE IF NOT EXISTS `#__magebridge_config` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `name` VARCHAR(255) NOT NULL DEFAULT '', - `value` TEXT NOT NULL DEFAULT '', + `value` TEXT NOT NULL, PRIMARY KEY (`id`) ) DEFAULT CHARSET=utf8; @@ -11,7 +11,7 @@ DROP TABLE IF EXISTS `#__magebridge_log`; CREATE TABLE IF NOT EXISTS `#__magebridge_log` ( `id` INT(11) NOT NULL AUTO_INCREMENT, - `message` TEXT NOT NULL DEFAULT '', + `message` TEXT NOT NULL, `type` INT(2) NOT NULL DEFAULT 0 COMMENT 'Type that equals debugging level', `origin` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Which application', `section` VARCHAR(255) NOT NULL DEFAULT '', diff --git a/joomla/administrator/components/com_magebridge/tables/config.php b/joomla/administrator/components/com_magebridge/tables/config.php index 943004451..bfefc4af0 100644 --- a/joomla/administrator/components/com_magebridge/tables/config.php +++ b/joomla/administrator/components/com_magebridge/tables/config.php @@ -20,9 +20,9 @@ class MagebridgeTableConfig extends YireoTable /** * Constructor * - * @param JDatabase $db + * @param \Joomla\Database\DatabaseDriver $db */ - public function __construct(& $db) + public function __construct(&$db) { parent::__construct('#__magebridge_config', 'id', $db); } diff --git a/joomla/administrator/components/com_magebridge/tables/log.php b/joomla/administrator/components/com_magebridge/tables/log.php index a2d0cd3ce..7b63ba27b 100644 --- a/joomla/administrator/components/com_magebridge/tables/log.php +++ b/joomla/administrator/components/com_magebridge/tables/log.php @@ -20,9 +20,9 @@ class MagebridgeTableLog extends YireoTable /** * Constructor * - * @param JDatabase $db + * @param \Joomla\Database\DatabaseDriver $db */ - public function __construct(& $db) + public function __construct(&$db) { parent::__construct('#__magebridge_log', 'id', $db); } diff --git a/joomla/administrator/components/com_magebridge/tables/product.php b/joomla/administrator/components/com_magebridge/tables/product.php index 3095955f9..7d8fd6d8f 100644 --- a/joomla/administrator/components/com_magebridge/tables/product.php +++ b/joomla/administrator/components/com_magebridge/tables/product.php @@ -9,6 +9,8 @@ * @link https://www.yireo.com */ +use Joomla\Registry\Registry; + // no direct access defined('_JEXEC') or die('Restricted access'); @@ -20,9 +22,9 @@ class MagebridgeTableProduct extends YireoTable /** * Constructor * - * @param JDatabase $db + * @param \Joomla\Database\DatabaseDriver $db */ - public function __construct(& $db) + public function __construct(&$db) { $this->_required = ['sku']; parent::__construct('#__magebridge_products', 'id', $db); @@ -42,7 +44,7 @@ public function bind($array, $ignore = '') { // Convert the actions array to a flat string if (key_exists('actions', $array) && is_array($array['actions'])) { - $registry = new JRegistry(); + $registry = new Registry(); $registry->loadArray($array['actions']); $array['actions'] = $registry->toString(); } diff --git a/joomla/administrator/components/com_magebridge/tables/store.php b/joomla/administrator/components/com_magebridge/tables/store.php index f1b1459b7..f9ce8ff34 100644 --- a/joomla/administrator/components/com_magebridge/tables/store.php +++ b/joomla/administrator/components/com_magebridge/tables/store.php @@ -9,6 +9,8 @@ * @link https://www.yireo.com */ +use Joomla\Registry\Registry; + // no direct access defined('_JEXEC') or die('Restricted access'); @@ -20,9 +22,9 @@ class MagebridgeTableStore extends YireoTable /** * Constructor * - * @param JDatabase $db + * @param \Joomla\Database\DatabaseDriver $db */ - public function __construct(& $db) + public function __construct(&$db) { parent::__construct('#__magebridge_stores', 'id', $db); } @@ -40,7 +42,7 @@ public function bind($array, $ignore = '') { // Convert the actions array to a flat string if (key_exists('actions', $array) && is_array($array['actions'])) { - $registry = new JRegistry(); + $registry = new Registry(); $registry->loadArray($array['actions']); $array['actions'] = $registry->toString(); } diff --git a/joomla/administrator/components/com_magebridge/tables/url.php b/joomla/administrator/components/com_magebridge/tables/url.php index 113880a18..68dd5cd01 100644 --- a/joomla/administrator/components/com_magebridge/tables/url.php +++ b/joomla/administrator/components/com_magebridge/tables/url.php @@ -9,6 +9,8 @@ * @link https://www.yireo.com */ +use Joomla\CMS\Language\Text; + // no direct access defined('_JEXEC') or die('Restricted access'); @@ -20,9 +22,9 @@ class MagebridgeTableUrl extends YireoTable /** * Constructor * - * @param JDatabase $db + * @param \Joomla\Database\DatabaseDriver $db */ - public function __construct(& $db) + public function __construct(&$db) { parent::__construct('#__magebridge_urls', 'id', $db); } @@ -35,9 +37,7 @@ public function __construct(& $db) public function check() { if (empty($this->source) || empty($this->destination)) { - $this->setError(JText::_('Source and destination must be filled in.')); - - return false; + throw new Exception(Text::_('Source and destination must be filled in.')); } return true; diff --git a/joomla/administrator/components/com_magebridge/tables/usergroup.php b/joomla/administrator/components/com_magebridge/tables/usergroup.php index 252efd118..80a721871 100644 --- a/joomla/administrator/components/com_magebridge/tables/usergroup.php +++ b/joomla/administrator/components/com_magebridge/tables/usergroup.php @@ -19,12 +19,17 @@ */ class MagebridgeTableUsergroup extends YireoTable { + /** + * @var string[] + */ + protected $required; + /** * Constructor * - * @param JDatabase $db + * @param \Joomla\Database\DatabaseDriver $db */ - public function __construct(& $db) + public function __construct(&$db) { // List of required fields that can not be left empty $this->required = ['joomla_group', 'magento_group']; diff --git a/joomla/administrator/components/com_magebridge/uninstall.magebridge.php b/joomla/administrator/components/com_magebridge/uninstall.magebridge.php index 75affd340..dfa444ba9 100644 --- a/joomla/administrator/components/com_magebridge/uninstall.magebridge.php +++ b/joomla/administrator/components/com_magebridge/uninstall.magebridge.php @@ -1,4 +1,5 @@ setQuery($query); $rows = $db->loadObjectList(); @@ -33,7 +36,7 @@ function com_uninstall() } // Select all MageBridge plugins and remove them - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = "SELECT `id`,`client_id` FROM #__plugins WHERE `element` LIKE 'magebridge%' OR `folder` = 'magento'"; $db->setQuery($query); $rows = $db->loadObjectList(); diff --git a/joomla/administrator/components/com_magebridge/view.php b/joomla/administrator/components/com_magebridge/view.php index 8cc4d172e..ffb685c7c 100644 --- a/joomla/administrator/components/com_magebridge/view.php +++ b/joomla/administrator/components/com_magebridge/view.php @@ -1,4 +1,5 @@ getApiState())) { case 'EMPTY METADATA': - $message = JText::_('COM_MAGEBRIDGE_VIEW_API_ERROR_EMPTY_METADATA'); - break; - - case 'SUPPORTKEY FAILED': - $message = JText::sprintf('COM_MAGEBRIDGE_VIEW_API_ERROR_KEY_FAILED', $bridge->getApiExtra()); + $message = Text::_('COM_MAGEBRIDGE_VIEW_API_ERROR_EMPTY_METADATA'); break; case 'AUTHENTICATION FAILED': - $message = JText::_('COM_MAGEBRIDGE_VIEW_API_ERROR_AUTHENTICATION_FAILED'); + $message = Text::_('COM_MAGEBRIDGE_VIEW_API_ERROR_AUTHENTICATION_FAILED'); break; case 'INTERNAL ERROR': - $message = JText::sprintf('COM_MAGEBRIDGE_VIEW_API_ERROR_INTERNAL_ERROR', MageBridgeHelper::getHelpLink('troubleshooting')); + $message = Text::_('COM_MAGEBRIDGE_VIEW_API_ERROR_INTERNAL_ERROR'); break; case 'FAILED LOAD': - $message = JText::sprintf('COM_MAGEBRIDGE_VIEW_API_ERROR_FAILED_LOAD', MageBridgeHelper::getHelpLink('faq-troubleshooting:api-widgets')); + $message = Text::_('COM_MAGEBRIDGE_VIEW_API_ERROR_FAILED_LOAD'); break; default: - $message = JText::sprintf('COM_MAGEBRIDGE_VIEW_API_ERROR_GENERIC', $bridge->getApiState()); + $message = Text::sprintf('COM_MAGEBRIDGE_VIEW_API_ERROR_GENERIC', $bridge->getApiState()); break; } @@ -72,7 +71,8 @@ public function display($tpl = null) // If debugging is enabled report it $input = $this->app->input; - if (MageBridgeModelConfig::load('debug') == 1 && $input->getCmd('tmpl') != 'component' && in_array($input->getCmd('view'), [ + if ( + MageBridgeModelConfig::load('debug') == 1 && $input->getCmd('tmpl') != 'component' && in_array($input->getCmd('view'), [ 'config', 'home', ]) diff --git a/joomla/administrator/components/com_magebridge/views/check/tmpl/browser.php b/joomla/administrator/components/com_magebridge/views/check/tmpl/browser.php index 439a31e33..758c7b1fc 100644 --- a/joomla/administrator/components/com_magebridge/views/check/tmpl/browser.php +++ b/joomla/administrator/components/com_magebridge/views/check/tmpl/browser.php @@ -9,6 +9,9 @@ * @link https://www.yireo.com */ +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Language\Text; + defined('_JEXEC') or die('Restricted access'); ?> @@ -28,7 +31,7 @@
- +

Step 1: From Joomla! to Magento

@@ -39,7 +42,7 @@ + lists['order_Dir'], $this->lists['order']); ?> + \ No newline at end of file diff --git a/joomla/administrator/components/com_magebridge/views/logs/view.csv.php b/joomla/administrator/components/com_magebridge/views/logs/view.csv.php index 3e556faa8..a5d815b85 100644 --- a/joomla/administrator/components/com_magebridge/views/logs/view.csv.php +++ b/joomla/administrator/components/com_magebridge/views/logs/view.csv.php @@ -9,6 +9,9 @@ * @link https://www.yireo.com */ +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; + // Check to ensure this file is included in Joomla! defined('_JEXEC') or die(); @@ -31,7 +34,7 @@ class MageBridgeViewLogs extends MageBridgeView */ public function display($tpl = null) { - $filename = 'magebridge-debug-'.MageBridgeModelConfig::load('supportkey').'.csv'; + $filename = 'magebridge-debug.csv'; header('Expires: 0'); header('Cache-control: private'); @@ -40,7 +43,7 @@ public function display($tpl = null) header('Content-Type: application/octet-stream'); header('Content-disposition: attachment; filename='.$filename); - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $db->setQuery('SELECT * FROM #__magebridge_log WHERE 1=1'); $rows = $db->loadObjectList(); @@ -92,7 +95,7 @@ public function printType($type) $types = $this->getTypes(); foreach ($types as $name => $value) { if ($type == $value) { - return JText::_($name); + return Text::_($name); } } return ''; diff --git a/joomla/administrator/components/com_magebridge/views/logs/view.html.php b/joomla/administrator/components/com_magebridge/views/logs/view.html.php index 5fab81550..27f1fb8de 100644 --- a/joomla/administrator/components/com_magebridge/views/logs/view.html.php +++ b/joomla/administrator/components/com_magebridge/views/logs/view.html.php @@ -10,6 +10,11 @@ * @link https://www.yireo.com */ +use Joomla\CMS\Factory; +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Toolbar\ToolbarHelper; + // Check to ensure this file is included in Joomla! defined('_JEXEC') or die(); @@ -36,9 +41,9 @@ public function display($tpl = null) // Toolbar options $this->loadToolbarEdit = false; $this->loadToolbarDelete = false; - JToolbarHelper::custom('delete', 'delete', null, 'COM_MAGEBRIDGE_VIEW_LOGS_TOOLBAR_TRUNCATE', false); - JToolbarHelper::custom('refresh', 'refresh', null, 'COM_MAGEBRIDGE_VIEW_LOGS_TOOLBAR_REFRESH', false); - JToolbarHelper::custom('export', 'archive', null, 'COM_MAGEBRIDGE_VIEW_LOGS_TOOLBAR_EXPORT', false); + ToolbarHelper::custom('delete', 'delete', null, 'COM_MAGEBRIDGE_VIEW_LOGS_TOOLBAR_TRUNCATE', false); + ToolbarHelper::custom('refresh', 'refresh', null, 'COM_MAGEBRIDGE_VIEW_LOGS_TOOLBAR_REFRESH', false); + ToolbarHelper::custom('export', 'archive', null, 'COM_MAGEBRIDGE_VIEW_LOGS_TOOLBAR_EXPORT', false); // Custom filters $this->lists['remote_addr'] = $this->selectRemoteAddress($this->getFilter('remote_addr')); @@ -48,7 +53,7 @@ public function display($tpl = null) // If debugging is enabled report it if ($this->countLogs() > 1000) { MageBridgeModelDebug::getInstance() - ->feedback(JText::sprintf('COM_MAGEBRIDGE_VIEW_LOGS_FLOOD_WARNING', (int) $this->countLogs())); + ->feedback(Text::sprintf('COM_MAGEBRIDGE_VIEW_LOGS_FLOOD_WARNING', (int) $this->countLogs())); } parent::display($tpl); @@ -63,22 +68,22 @@ public function display($tpl = null) */ public function selectOrigin($current) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $db->setQuery('SELECT DISTINCT(origin) AS value FROM #__magebridge_log'); $rows = $db->loadObjectList(); $options = []; - $options[] = JHtml::_('select.option', '', '- ' . JText::_('COM_MAGEBRIDGE_VIEW_LOGS_SELECT_ORIGIN') . ' -', 'id', 'title'); + $options[] = HTMLHelper::_('select.option', '', '- ' . Text::_('COM_MAGEBRIDGE_VIEW_LOGS_SELECT_ORIGIN') . ' -', 'id', 'title'); if (!empty($rows)) { foreach ($rows as $row) { - $options[] = JHtml::_('select.option', $row->value, JText::_($row->value), 'id', 'title'); + $options[] = HTMLHelper::_('select.option', $row->value, Text::_($row->value), 'id', 'title'); } } $javascript = 'onchange="document.adminForm.submit();"'; - return JHtml::_('select.genericlist', $options, 'filter_origin', $javascript, 'id', 'title', $current); + return HTMLHelper::_('select.genericlist', $options, 'filter_origin', $javascript, 'id', 'title', $current); } /** @@ -90,22 +95,22 @@ public function selectOrigin($current) */ public function selectRemoteAddress($current) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $db->setQuery('SELECT DISTINCT(remote_addr) AS value FROM #__magebridge_log'); $rows = $db->loadObjectList(); $options = []; - $options[] = JHtml::_('select.option', '', '- ' . JText::_('COM_MAGEBRIDGE_VIEW_LOGS_SELECT_ADDRESS') . ' -', 'id', 'title'); + $options[] = HTMLHelper::_('select.option', '', '- ' . Text::_('COM_MAGEBRIDGE_VIEW_LOGS_SELECT_ADDRESS') . ' -', 'id', 'title'); if (!empty($rows)) { foreach ($rows as $row) { - $options[] = JHtml::_('select.option', $row->value, $row->value, 'id', 'title'); + $options[] = HTMLHelper::_('select.option', $row->value, $row->value, 'id', 'title'); } } $javascript = 'onchange="document.adminForm.submit();"'; - return JHtml::_('select.genericlist', $options, 'filter_remote_addr', $javascript, 'id', 'title', $current); + return HTMLHelper::_('select.genericlist', $options, 'filter_remote_addr', $javascript, 'id', 'title', $current); } /** @@ -140,14 +145,14 @@ public function selectType($current) { $options = []; - $options[] = JHtml::_('select.option', '', '- ' . JText::_('COM_MAGEBRIDGE_VIEW_LOGS_SELECT_TYPE') . ' -', 'id', 'title'); + $options[] = HTMLHelper::_('select.option', '', '- ' . Text::_('COM_MAGEBRIDGE_VIEW_LOGS_SELECT_TYPE') . ' -', 'id', 'title'); foreach ($this->getTypes() as $title => $id) { - $options[] = JHtml::_('select.option', $id, $title, 'id', 'title'); + $options[] = HTMLHelper::_('select.option', $id, $title, 'id', 'title'); } $javascript = 'onchange="document.adminForm.submit();"'; - return JHtml::_('select.genericlist', $options, 'filter_type', $javascript, 'id', 'title', $current); + return HTMLHelper::_('select.genericlist', $options, 'filter_type', $javascript, 'id', 'title', $current); } /** @@ -162,7 +167,7 @@ public function printType($type) $types = $this->getTypes(); foreach ($types as $name => $value) { if ($type == $value) { - return JText::_($name); + return Text::_($name); } } @@ -178,7 +183,7 @@ public function printType($type) */ public function countLogs() { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $db->setQuery("SELECT COUNT(*) AS count FROM #__magebridge_log"); $result = $db->loadObject(); diff --git a/joomla/administrator/components/com_magebridge/views/product/tmpl/actions.php b/joomla/administrator/components/com_magebridge/views/product/tmpl/actions.php index fa3c6b3aa..90e0a7d60 100644 --- a/joomla/administrator/components/com_magebridge/views/product/tmpl/actions.php +++ b/joomla/administrator/components/com_magebridge/views/product/tmpl/actions.php @@ -9,6 +9,8 @@ * @link https://www.yireo.com */ +use Joomla\CMS\Language\Text; + defined('_JEXEC') or die('Restricted access'); $form = $this->actions_form; @@ -22,8 +24,8 @@ } ?>
- : - label)) ? JText::_($fieldset->label) : $fieldset->name; ?> + : + label)) ? Text::_($fieldset->label) : $fieldset->name; ?> getFieldset($fieldset->name) as $field): ?>
@@ -38,7 +40,7 @@
-

+

- -
- -
-getMenu(); ?> -
- -
-
- -
-
- +
@@ -49,21 +52,21 @@ - +
- + - host; ?> (: host); ?>) + host; ?> (: host); ?>)
- + @@ -89,8 +92,5 @@
  • If you receive a 404-error in Step 1 but NOT Step 2, something lacks in the webserver configuration: You should contact the system administrator of this webserver to fix this problem.
  • -

    -Refer to the for more information. -

    diff --git a/joomla/administrator/components/com_magebridge/views/check/tmpl/default.php b/joomla/administrator/components/com_magebridge/views/check/tmpl/default.php index 80e5fbd6b..ea2150fd0 100644 --- a/joomla/administrator/components/com_magebridge/views/check/tmpl/default.php +++ b/joomla/administrator/components/com_magebridge/views/check/tmpl/default.php @@ -9,6 +9,9 @@ * @link https://www.yireo.com */ +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Language\Text; + defined('_JEXEC') or die('Restricted access'); ?>
    @@ -17,29 +20,25 @@
    - + - - - - - - + + - - + + - - + +
    - + checks['compatibility'] as $result) { ?> @@ -56,7 +55,7 @@
    - +
    checks['extension'])) { ?> checks['extension'] as $result) { ?> @@ -77,7 +76,7 @@ @@ -85,7 +84,7 @@
    - +
    - +
    checks['bridge'] as $result) { ?> @@ -102,7 +101,7 @@
    - +
    checks['system'] as $result) { ?> @@ -119,7 +118,7 @@
    - +
    checks['extensions'] as $result) { ?> @@ -140,5 +139,5 @@ - + diff --git a/joomla/administrator/components/com_magebridge/views/check/tmpl/product.php b/joomla/administrator/components/com_magebridge/views/check/tmpl/product.php index d91552a79..ce4367ad2 100644 --- a/joomla/administrator/components/com_magebridge/views/check/tmpl/product.php +++ b/joomla/administrator/components/com_magebridge/views/check/tmpl/product.php @@ -9,6 +9,8 @@ * @link https://www.yireo.com */ +use Joomla\CMS\Language\Text; + defined('_JEXEC') or die('Restricted access'); ?> @@ -17,7 +19,7 @@
    - + loadTemplate('fieldset', ['fieldset' => 'basic']); ?> loadTemplate('formend'); ?>
    diff --git a/joomla/administrator/components/com_magebridge/views/check/view.html.php b/joomla/administrator/components/com_magebridge/views/check/view.html.php index d670d98c0..2e9b9874e 100644 --- a/joomla/administrator/components/com_magebridge/views/check/view.html.php +++ b/joomla/administrator/components/com_magebridge/views/check/view.html.php @@ -10,6 +10,9 @@ * @link https://www.yireo.com */ +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Toolbar\ToolbarHelper; + // Check to ensure this file is included in Joomla! defined('_JEXEC') or die(); @@ -31,6 +34,21 @@ class MageBridgeViewCheck extends YireoCommonView */ public $checks = []; + /** + * @var \Joomla\CMS\Form\Form + */ + protected $form; + + /** + * @var string + */ + protected $url; + + /** + * @var string + */ + protected $host; + /** * Display method * @@ -42,21 +60,19 @@ public function display($tpl = null) { $this->setMenu(); - $input = JFactory::getApplication()->input; - - if ($input->getCmd('layout') == 'browser') { + if ($this->input->getCmd('layout') == 'browser') { $this->displayBrowser($tpl); return; } - if ($input->getCmd('layout') == 'product') { + if ($this->input->getCmd('layout') == 'product') { $this->displayProduct($tpl); return; } - if ($input->getCmd('layout') == 'result') { + if ($this->input->getCmd('layout') == 'result') { $this->displayResult($tpl); return; @@ -78,8 +94,10 @@ public function displayDefault($tpl) MageBridgeViewHelper::initialize('Check'); // Load libraries - JHtml::_('behavior.tooltip'); - JToolbarHelper::custom('refresh', 'refresh', null, 'Refresh', false); + if (version_compare(JVERSION, '4.0.0', '<')) { + HTMLHelper::_('behavior.tooltip'); + } + ToolbarHelper::custom('refresh', 'refresh', null, 'Refresh', false); $this->checks = $this->get('checks'); @@ -94,8 +112,9 @@ public function displayDefault($tpl) public function displayProduct($tpl) { // Load the form if it's there - $this->getModel() - ->setFormName('check_product'); + /** @var MagebridgeModelCheck */ + $model = $this->getModel(); + $model->setConfig('form_name', 'check_product'); $this->_viewParent = 'form'; $this->form = $this->get('Form'); @@ -103,7 +122,7 @@ public function displayProduct($tpl) // Initialize common elements MageBridgeViewHelper::initialize('PRODUCT_RELATION_TEST'); - JToolbarHelper::custom('check_product', 'refresh', null, 'Run', false); + ToolbarHelper::custom('check_product', 'refresh', null, 'Run', false); parent::display('product'); } @@ -118,7 +137,7 @@ public function displayBrowser($tpl) // Initialize common elements MageBridgeViewHelper::initialize('Internal Browse Test'); - JToolbarHelper::custom('refresh', 'refresh', null, 'Browse', false); + ToolbarHelper::custom('refresh', 'refresh', null, 'Browse', false); $this->url = MageBridgeModelConfig::load('url') . 'magebridge.php'; $this->host = MageBridgeModelConfig::load('host'); diff --git a/joomla/administrator/components/com_magebridge/views/config/tmpl/default.php b/joomla/administrator/components/com_magebridge/views/config/tmpl/default.php index fad149fc2..4fa1a74a3 100644 --- a/joomla/administrator/components/com_magebridge/views/config/tmpl/default.php +++ b/joomla/administrator/components/com_magebridge/views/config/tmpl/default.php @@ -1,4 +1,5 @@ form; +$fieldSets = $form->getFieldsets(); +$activeTabName = array_key_first($fieldSets); ?> - - - -
    -
    - getFieldsets() as $fieldset): ?> - printFieldset($form, $fieldset); ?> - + $activeTabName]); ?> + + name, Text::_($fieldSet->label)); ?> +
    + printFieldset($form, $fieldSet); ?>
    -
    - - - - - - + + - + + + + + \ No newline at end of file diff --git a/joomla/administrator/components/com_magebridge/views/config/tmpl/field.php b/joomla/administrator/components/com_magebridge/views/config/tmpl/field.php index 6c9425ce5..d40e6b4cf 100644 --- a/joomla/administrator/components/com_magebridge/views/config/tmpl/field.php +++ b/joomla/administrator/components/com_magebridge/views/config/tmpl/field.php @@ -8,15 +8,18 @@ * @license GNU Public License * @link https://www.yireo.com */ + +use Joomla\CMS\Language\Text; + ?> type) == 'spacer') : ?> -

    fieldname); ?>

    +

    fieldname); ?>

    fieldname.'_DESC'); + $fieldDescription = Text::_('COM_MAGEBRIDGE_MODEL_CONFIG_FIELD_'.$field->fieldname.'_DESC'); $fieldTooltip = '['.$field->fieldname.'] '.$fieldDescription; $oldFieldLabel = $field->label; - $fieldLabel = JText::_('COM_MAGEBRIDGE_MODEL_CONFIG_FIELD_'.$field->fieldname); + $fieldLabel = Text::_('COM_MAGEBRIDGE_MODEL_CONFIG_FIELD_'.$field->fieldname); ?>
    diff --git a/joomla/administrator/components/com_magebridge/views/config/tmpl/import.php b/joomla/administrator/components/com_magebridge/views/config/tmpl/import.php index 71ccf918d..711966630 100644 --- a/joomla/administrator/components/com_magebridge/views/config/tmpl/import.php +++ b/joomla/administrator/components/com_magebridge/views/config/tmpl/import.php @@ -9,6 +9,8 @@ * @link https://www.yireo.com */ +use Joomla\CMS\HTML\HTMLHelper; + defined('_JEXEC') or die('Restricted access'); ?> @@ -28,5 +30,5 @@ - + diff --git a/joomla/administrator/components/com_magebridge/views/config/view.html.php b/joomla/administrator/components/com_magebridge/views/config/view.html.php index e343888c8..1f15b31a6 100644 --- a/joomla/administrator/components/com_magebridge/views/config/view.html.php +++ b/joomla/administrator/components/com_magebridge/views/config/view.html.php @@ -10,6 +10,12 @@ * @link https://www.yireo.com */ +use Joomla\CMS\Factory; +use Joomla\CMS\Form\Form; +use Joomla\CMS\Form\FormHelper; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Toolbar\ToolbarHelper; + // Check to ensure this file is included in Joomla! defined('_JEXEC') or die(); @@ -21,39 +27,50 @@ */ class MageBridgeViewConfig extends YireoCommonView { + /** + * @var \Joomla\CMS\Form\Form + */ + protected $form; + + /** + * @var mixed + */ + protected $configData; + /** * Display method * * @param string $tpl * - * @return null + * @return void */ public function display($tpl = null) { // Load important variables - $layout = $this->app->input->getCmd('layout'); + $layout = $this->input->getCmd('layout'); - // Initalize common elements + // initialize common elements MageBridgeViewHelper::initialize('CONFIG'); // Load the import-layout directly if ($layout == 'import') { - return parent::display($layout); + parent::display($layout); + return; } // Toolbar options if (MageBridgeAclHelper::isDemo() == false) { - JToolbarHelper::custom('export', 'download', null, 'Export', false); + ToolbarHelper::custom('export', 'download', null, 'Export', false); } if (MageBridgeAclHelper::isDemo() == false) { - JToolbarHelper::custom('import', 'upload', null, 'Import', false); + ToolbarHelper::custom('import', 'upload', null, 'Import', false); } - JToolbarHelper::preferences('com_magebridge'); - JToolbarHelper::save(); - JToolbarHelper::apply(); - JToolbarHelper::cancel(); + ToolbarHelper::preferences('com_magebridge'); + ToolbarHelper::save(); + ToolbarHelper::apply(); + ToolbarHelper::cancel(); // Extra scripts MageBridgeTemplateHelper::load('jquery'); @@ -68,7 +85,7 @@ public function display($tpl = null) // Make sure demo-users are not seeing any sensitive data if (MageBridgeAclHelper::isDemo() == true) { - $censored_values = ['supportkey', 'api_user', 'api_key']; + $censored_values = ['api_user', 'api_key']; foreach ($censored_values as $censored_value) { $config[$censored_value]['value'] = str_repeat('*', strlen($config[$censored_value]['value'])); @@ -83,7 +100,7 @@ public function display($tpl = null) } $formFile = JPATH_SITE . '/components/com_magebridge/models/config.xml'; - $form = JForm::getInstance('config', $formFile); + $form = Form::getInstance('config', $formFile); $form->bind($configData); $this->form = $form; @@ -103,7 +120,7 @@ public function checkConfig() { // Check if the settings are all empty if (MageBridgeModelConfig::allEmpty() == true) { - JFactory::getApplication()->enqueueMessage(JText::sprintf('Check the online %s for more information.', MageBridgeHelper::getHelpText('quickstart')), 'warning'); + $this->app->enqueueMessage(Text::sprintf('Check the online %s for more information.', MageBridgeHelper::getHelpText('quickstart')), 'warning'); return; } @@ -114,7 +131,7 @@ public function checkConfig() isset($c['name']) && isset($c['value']) && $message = MageBridge::getConfig() ->check($c['name'], $c['value']) ) { - JFactory::getApplication()->enqueueMessage($message, 'warning'); + $this->app->enqueueMessage($message, 'warning'); } } @@ -132,9 +149,9 @@ public function checkConfig() protected function getCustomField($type, $name) { require_once JPATH_COMPONENT . '/fields/' . $type . '.php'; - jimport('joomla.form.helper'); - $field = JFormHelper::loadFieldType($type); + /** @var MagebridgeFormFieldStore */ + $field = FormHelper::loadFieldType($type); $field->setName($name); $field->setValue(MageBridgeModelConfig::load($name)); diff --git a/joomla/administrator/components/com_magebridge/views/element/tmpl/category.php b/joomla/administrator/components/com_magebridge/views/element/tmpl/category.php index b864e153a..07e41f57a 100644 --- a/joomla/administrator/components/com_magebridge/views/element/tmpl/category.php +++ b/joomla/administrator/components/com_magebridge/views/element/tmpl/category.php @@ -1,4 +1,5 @@ input; +$input = Factory::getApplication()->input; $allowRoot = ($input->getCmd('allow_root') === 1) ? true : false; ?> -

    +

    - : - lists['store']; ?> - : - - - + : + lists['store']; ?> + : + + + - input->get('object') . "');"; ?> - + get('object') . "');"; ?> +
    - - - - - - - + + + + + + + - - - + + + - categories)) { - $i = 0; - foreach ($this->categories as $category) { - $return = 'category_id'; + categories)) { + $i = 0; + foreach ($this->categories as $category) { + $return = 'category_id'; - if (!empty($category['url'])) { - $return = 'url'; - } + if (!empty($category['url'])) { + $return = 'url'; + } - if ($input->getCmd('return') === 'id') { - $return = 'category_id'; - } + if ($input->getCmd('return') === 'id') { + $return = 'category_id'; + } - if ($input->getCmd('return') === 'url_key') { - $return = 'url_key'; - } + if ($input->getCmd('return') === 'url_key') { + $return = 'url_key'; + } - $css = []; - if (isset($category[$return]) && JFactory::getApplication()->input->getCmd('current') == $category[$return]) { - $css[] = 'current'; - } + $css = []; + if (isset($category[$return]) && $input->getCmd('current') == $category[$return]) { + $css[] = 'current'; + } - if (isset($category['status']) && $category['status'] == 0) { - $css[] = 'inactive'; - } else { - $css[] = 'active'; - } + if (isset($category['status']) && $category['status'] == 0) { + $css[] = 'inactive'; + } else { + $css[] = 'active'; + } - $category_name = htmlspecialchars(str_replace("'", '', $category['name'])); - $jsDefault = "window.parent.jSelectCategory('" . $category[$return] . "', '$category_name', '" . JFactory::getApplication()->input->get('object') . "');"; - $jsUrl = "window.parent.jSelectCategory('" . $category['url'] . "', '$category_name', '" . JFactory::getApplication()->input->get('object') . "');"; - $jsId = "window.parent.jSelectCategory('" . $category['category_id'] . "', '$category_name', '" . JFactory::getApplication()->input->get('object') . "');"; + $category_name = htmlspecialchars(str_replace("'", '', $category['name'])); + $jsDefault = "window.parent.jSelectCategory('" . $category[$return] . "', '$category_name', '" . $input->get('object') . "');"; + $jsUrl = "window.parent.jSelectCategory('" . $category['url'] . "', '$category_name', '" . $input->get('object') . "');"; + $jsId = "window.parent.jSelectCategory('" . $category['category_id'] . "', '$category_name', '" . $input->get('object') . "');"; + ?> + + + + + + + + - - - - - - + + - - - - -
    - - - - - - - - - -
    + + + + + + + + + +
    - pagination->getListFooter(); ?> -
    + pagination->getListFooter(); ?> +
    + pagination->getRowOffset($i); ?> + +     + 1) { ?> + + + + + + + + + + + + + + + + + + +
    - pagination->getRowOffset($i); ?> - -     - 1) { ?> - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/joomla/administrator/components/com_magebridge/views/element/tmpl/customer.php b/joomla/administrator/components/com_magebridge/views/element/tmpl/customer.php index 578be8386..d47f061db 100644 --- a/joomla/administrator/components/com_magebridge/views/element/tmpl/customer.php +++ b/joomla/administrator/components/com_magebridge/views/element/tmpl/customer.php @@ -1,4 +1,5 @@ input; ?>
    - : - - - + : + + +
    - - - - - - - + + + + + + + - - - + + + - customers)) { - $i = 0; - foreach ($this->customers as $customer) { - $css = []; + customers)) { + $i = 0; + foreach ($this->customers as $customer) { + $css = []; - if (JFactory::getApplication()->input->getCmd('return') == 'id') { - $return = $customer['customer_id']; - } else { - $return = $customer['email']; - } + if ($input->getCmd('return') == 'id') { + $return = $customer['customer_id']; + } else { + $return = $customer['email']; + } - if (JFactory::getApplication()->input->getCmd('current') == $return) { - $css[] = 'current'; - } + if ($input->getCmd('current') == $return) { + $css[] = 'current'; + } - if ($customer['is_active'] == 1) { - $css[] = 'active'; - } else { - $css[] = 'inactive'; - } + if ($customer['is_active'] == 1) { + $css[] = 'active'; + } else { + $css[] = 'inactive'; + } - $js = "window.parent.jSelectCustomer('$return', '$return', '" . JFactory::getApplication()->input->get('object') . "');"; + $js = "window.parent.jSelectCustomer('$return', '$return', '" . $input->get('object') . "');"; + ?> + + + + + + + + - - - - - - + + - - - -
    - - - - - - - - - -
    + + + + + + + + + +
    - pagination->getListFooter(); ?> -
    + pagination->getListFooter(); ?> +
    + pagination->getRowOffset($i); ?> + +     + + + + + + + + + +
    - pagination->getRowOffset($i); ?> - -     - - - - - - - - - -
    - - - - - - - - -
    + + + + + + + + + \ No newline at end of file diff --git a/joomla/administrator/components/com_magebridge/views/element/tmpl/product.php b/joomla/administrator/components/com_magebridge/views/element/tmpl/product.php index 2bd0e2c4f..49805aa3d 100644 --- a/joomla/administrator/components/com_magebridge/views/element/tmpl/product.php +++ b/joomla/administrator/components/com_magebridge/views/element/tmpl/product.php @@ -1,4 +1,5 @@ input; ?> -

    +

    - : - - - + : + + + - input->get('object') . "');"; ?> - + get('object') . "');"; ?> +
    - - - - - - - - + + + + + + + + - - - + + + - products)) { - $i = 0; - foreach ($this->products as $product) { - if (JFactory::getApplication()->input->getCmd('return') == 'id' || JFactory::getApplication()->input->getCmd('return') == 'product_id') { - $return = $product['product_id']; - } else { - if (JFactory::getApplication()->input->getCmd('return') == 'sku' && !empty($product['sku'])) { - $return = $product['sku']; + products)) { + $i = 0; + foreach ($this->products as $product) { + if ($input->getCmd('return') == 'id' || $input->getCmd('return') == 'product_id') { + $return = $product['product_id']; } else { - if (!empty($product['url_key'])) { - $return = $product['url_key']; + if ($input->getCmd('return') == 'sku' && !empty($product['sku'])) { + $return = $product['sku']; } else { - $return = $product['product_id']; + if (!empty($product['url_key'])) { + $return = $product['url_key']; + } else { + $return = $product['product_id']; + } } } - } - if (JFactory::getApplication()->input->getCmd('current') == $return) { - $css[] = 'current'; - } + if ($input->getCmd('current') == $return) { + $css[] = 'current'; + } - $css = []; - if (isset($product['status']) && $product['status'] == 1) { - $css[] = 'active'; - } else { - $css[] = 'inactive'; - } + $css = []; + if (isset($product['status']) && $product['status'] == 1) { + $css[] = 'active'; + } else { + $css[] = 'inactive'; + } - if (strlen($product['name']) > 50) { - $product['name'] = substr($product['name'], 0, 47) . '...'; - } + if (strlen($product['name']) > 50) { + $product['name'] = substr($product['name'], 0, 47) . '...'; + } - if (strlen($product['url_key']) > 30) { - $product['url_key'] = substr($product['url_key'], 0, 27) . '...'; - } + if (strlen($product['url_key']) > 30) { + $product['url_key'] = substr($product['url_key'], 0, 27) . '...'; + } - $product_name = htmlspecialchars(str_replace("'", '', $product['name'])); - $jsDefault = "window.parent.jSelectProduct('$return', '$product_name', '" . JFactory::getApplication()->input->get('object') . "');"; + $product_name = htmlspecialchars(str_replace("'", '', $product['name'])); + $jsDefault = "window.parent.jSelectProduct('$return', '$product_name', '" . $input->get('object') . "');"; + ?> + + + + + + + + + - - - - - - - + + - - - -
    - - - - - - - - - - - -
    + + + + + + + + + + + +
    - pagination->getListFooter(); ?> -
    + pagination->getListFooter(); ?> +
    + pagination->getRowOffset($i); ?> + + + + + + + + + + + + + + + + + + +
    - pagination->getRowOffset($i); ?> - - - - - - - - - - - - - - - - - - -
    - - - - - - - - -
    + + + + + + + + + \ No newline at end of file diff --git a/joomla/administrator/components/com_magebridge/views/element/tmpl/widget.php b/joomla/administrator/components/com_magebridge/views/element/tmpl/widget.php index 5f8041015..634f4eef4 100644 --- a/joomla/administrator/components/com_magebridge/views/element/tmpl/widget.php +++ b/joomla/administrator/components/com_magebridge/views/element/tmpl/widget.php @@ -1,4 +1,5 @@ input; ?>
    - : - - - + : + + +
    - - - - - - + + + + + + - - - + + + - widgets)) { - $i = 0; - foreach ($this->widgets as $widget) { - $css = []; - $return = $widget['id']; + widgets)) { + $i = 0; + foreach ($this->widgets as $widget) { + $css = []; + $return = $widget['id']; - if (JFactory::getApplication()->input->getCmd('current') == $return) { - $css[] = 'current'; - } + if ($input->getCmd('current') == $return) { + $css[] = 'current'; + } - $js = "window.parent.jSelectWidget('$return', '$return', '" . JFactory::getApplication()->input->get('object') . "');"; + $js = "window.parent.jSelectWidget('$return', '$return', '" . $input->get('object') . "');"; + ?> + + + + + + + - - - - - + + - - - -
    - - - - - - - -
    + + + + + + + +
    - pagination->getListFooter(); ?> -
    + pagination->getListFooter(); ?> +
    + pagination->getRowOffset($i); ?> + + + + + + + + +
    - pagination->getRowOffset($i); ?> - - - - - - - - -
    - - - - - - - - -
    + + + + + + + + + \ No newline at end of file diff --git a/joomla/administrator/components/com_magebridge/views/element/view.common.php b/joomla/administrator/components/com_magebridge/views/element/view.common.php index c0530e009..336fc7c72 100644 --- a/joomla/administrator/components/com_magebridge/views/element/view.common.php +++ b/joomla/administrator/components/com_magebridge/views/element/view.common.php @@ -1,4 +1,5 @@ current = JFactory::getApplication()->input->get('current'); - $this->object = JFactory::getApplication()->input->get('object'); + $this->current = $this->input->get('current'); + $this->object = $this->input->get('object'); parent::display($tpl); } @@ -56,7 +102,7 @@ public function doAjaxLayout() $request = []; // Get the current request-options - $get = JFactory::getApplication()->input->get->getArray(); + $get = $this->input->get->getArray(); if (!empty($get)) { foreach ($get as $name => $value) { @@ -65,7 +111,7 @@ public function doAjaxLayout() } // Merge the POST if it is there - $post = JFactory::getApplication()->input->post->getArray(); + $post = $this->input->post->getArray(); if (!empty($post)) { foreach ($post as $name => $value) { @@ -93,20 +139,19 @@ public function doAjaxLayout() public function doCategoryLayout() { // Initialize some important variables - $application = JFactory::getApplication(); - $option = $application->input->getCmd('option') . '-element-categories'; + $option = $this->input->getCmd('option') . '-element-categories'; // Set common options $this->setTitle('Category'); $this->setLayout('category'); // Initialize search - $search = $application->getUserStateFromRequest($option . '.search', 'search', '', 'string'); + $search = $this->app->getUserStateFromRequest($option . '.search', 'search', '', 'string'); $search = strtolower($search); - /** @var JCache $cache */ - $cache = JFactory::getCache('com_magebridge.admin'); - $tree = $cache->call(['MageBridgeElementHelper', 'getCategoryTree']); + /** @var CallbackController */ + $cache = Factory::getCache('com_magebridge.admin'); + $tree = $cache->get(['MageBridgeElementHelper', 'getCategoryTree']); // If search is active, we use a flat list instead of a tree if (empty($search)) { @@ -119,11 +164,12 @@ public function doCategoryLayout() $this->categories = $this->initPagination('categories', $categories); // Add a dropdown list for Store Views - $current_store = $application->getUserStateFromRequest($option . '.store', 'store'); + $current_store = $this->app->getUserStateFromRequest($option . '.store', 'store'); require_once JPATH_COMPONENT . '/fields/store.php'; - $field = JFormHelper::loadFieldType('magebridge.store'); + /** @var MagebridgeFormFieldStore */ + $field = FormHelper::loadFieldType('magebridge.store'); $field->setName('store'); $field->setValue($current_store); $store = $field->getHtmlInput(); @@ -145,18 +191,17 @@ public function doWidgetLayout() $this->setTitle('Widget'); $this->setLayout('widget'); - /** @var JCache $cache */ - $cache = JFactory::getCache('com_magebridge.admin'); + /** @var CallbackController */ + $cache = Factory::getCache('com_magebridge.admin'); $cache->setCaching(0); - $widgets = $cache->call(['MageBridgeElementHelper', 'getWidgetList']); + $widgets = $cache->get(['MageBridgeElementHelper', 'getWidgetList']); // Initialize pagination $this->widgets = $this->initPagination('widgets', $widgets); // Initialize search - $application = JFactory::getApplication(); - $option = JFactory::getApplication()->input->getCmd('option') . '-element-widgets'; - $search = $application->getUserStateFromRequest($option . '.search', 'search', '', 'string'); + $option = $this->input->getCmd('option') . '-element-widgets'; + $search = $this->app->getUserStateFromRequest($option . '.search', 'search', '', 'string'); $search = strtolower($search); // Build the lists @@ -174,18 +219,17 @@ public function doCustomerLayout() $this->setTitle('Customer'); $this->setLayout('customer'); - /** @var JCache $cache */ - $cache = JFactory::getCache('com_magebridge.admin'); + /** @var CallbackController */ + $cache = Factory::getCache('com_magebridge.admin'); $cache->setCaching(0); - $customers = $cache->call(['MageBridgeElementHelper', 'getCustomerList']); + $customers = $cache->get(['MageBridgeElementHelper', 'getCustomerList']); // Initialize pagination $this->customers = $this->initPagination('customers', $customers); // Initialize search - $application = JFactory::getApplication(); - $option = JFactory::getApplication()->input->getCmd('option') . '-element-customers'; - $search = $application->getUserStateFromRequest($option . '.search', 'search', '', 'string'); + $option = $this->input->getCmd('option') . '-element-customers'; + $search = $this->app->getUserStateFromRequest($option . '.search', 'search', '', 'string'); $search = strtolower($search); // Build the lists @@ -203,18 +247,17 @@ public function doProductLayout() $this->setTitle('Product'); $this->setLayout('product'); - /** @var JCache $cache */ - $cache = JFactory::getCache('com_magebridge.admin'); + /** @var CallbackController */ + $cache = Factory::getCache('com_magebridge.admin'); $cache->setCaching(0); - $products = $cache->call(['MageBridgeElementHelper', 'getProductList']); + $products = $cache->get(['MageBridgeElementHelper', 'getProductList']); // Initialize pagination $this->products = $this->initPagination('products', $products); // Initialize search - $application = JFactory::getApplication(); - $option = JFactory::getApplication()->input->getCmd('option') . '-element-products'; - $search = $application->getUserStateFromRequest($option . '.search', 'search', '', 'string'); + $option = $this->input->getCmd('option') . '-element-products'; + $search = $this->app->getUserStateFromRequest($option . '.search', 'search', '', 'string'); $search = strtolower($search); // Build the lists @@ -234,13 +277,12 @@ public function doProductLayout() public function initPagination($type = '', $items = []) { // Get the limit & limitstart - $application = JFactory::getApplication(); - $option = $application->input->getCmd('option') . '-element-' . $type; - $limit = (int) $application->getUserStateFromRequest($option . '.limit', 'limit', JFactory::getConfig()->get('list_limit'), 'int'); - $limitstart = (int) $application->getUserStateFromRequest($option . '.limitstart', 'limitstart', 0, 'int'); + $option = $this->input->getCmd('option') . '-element-' . $type; + $limit = (int) $this->app->getUserStateFromRequest($option . '.limit', 'limit', Factory::getConfig()->get('list_limit'), 'int'); + $limitstart = (int) $this->app->getUserStateFromRequest($option . '.limitstart', 'limitstart', 0, 'int'); // Set the pagination - $this->pagination = new JPagination(count($items), $limitstart, $limit); + $this->pagination = new Pagination(count($items), $limitstart, $limit); // Do not do anything when using a limit of 0 if ($limit == 0) { diff --git a/joomla/administrator/components/com_magebridge/views/element/view.html.php b/joomla/administrator/components/com_magebridge/views/element/view.html.php index d19d444e5..bf4e58638 100644 --- a/joomla/administrator/components/com_magebridge/views/element/view.html.php +++ b/joomla/administrator/components/com_magebridge/views/element/view.html.php @@ -1,4 +1,5 @@ false, 'relative' => true]); // Check for AJAX - if (JFactory::getApplication()->input->getInt('ajax') == 1) { + if ($this->input->getInt('ajax') == 1) { $this->doAjaxLayout(); $tpl = 'ajax'; @@ -47,7 +51,7 @@ public function display($tpl = null) } // Determine the layout and data - switch (JFactory::getApplication()->input->getCmd('type')) { + switch ($this->input->getCmd('type')) { case 'product': $this->doProductLayout(); break; diff --git a/joomla/administrator/components/com_magebridge/views/home/view.html.php b/joomla/administrator/components/com_magebridge/views/home/view.html.php index 176acd3c3..06b93a657 100644 --- a/joomla/administrator/components/com_magebridge/views/home/view.html.php +++ b/joomla/administrator/components/com_magebridge/views/home/view.html.php @@ -20,6 +20,16 @@ */ class MageBridgeViewHome extends YireoViewHome { + /** + * @var string[] + */ + protected $icons; + + /** + * @var array + */ + protected $urls; + /** * Display method * @@ -40,8 +50,8 @@ public function display($tpl = null) $this->icons = $icons; $urls = []; - $urls['twitter'] ='http://twitter.com/yireo'; - $urls['facebook'] ='http://www.facebook.com/yireo'; + $urls['twitter'] = 'http://twitter.com/yireo'; + $urls['facebook'] = 'http://www.facebook.com/yireo'; $this->urls = $urls; parent::display($tpl); diff --git a/joomla/administrator/components/com_magebridge/views/logs/tmpl/tbody.php b/joomla/administrator/components/com_magebridge/views/logs/tmpl/tbody.php index e69f502f3..3879db45a 100644 --- a/joomla/administrator/components/com_magebridge/views/logs/tmpl/tbody.php +++ b/joomla/administrator/components/com_magebridge/views/logs/tmpl/tbody.php @@ -9,6 +9,8 @@ * @link https://www.yireo.com */ +use Joomla\CMS\Language\Text; + defined('_JEXEC') or die('Restricted access'); $message = $item->message; @@ -25,7 +27,7 @@ printType($item->type); ?>
    - origin); ?> + origin); ?> remote_addr; ?> diff --git a/joomla/administrator/components/com_magebridge/views/logs/tmpl/thead.php b/joomla/administrator/components/com_magebridge/views/logs/tmpl/thead.php index 5c17cf12a..8ac778a27 100644 --- a/joomla/administrator/components/com_magebridge/views/logs/tmpl/thead.php +++ b/joomla/administrator/components/com_magebridge/views/logs/tmpl/thead.php @@ -1,4 +1,5 @@ - lists['order_Dir'], $this->lists['order']); ?> + lists['order_Dir'], $this->lists['order']); ?> - lists['order_Dir'], $this->lists['order']); ?> + lists['order_Dir'], $this->lists['order']); ?> - lists['order_Dir'], $this->lists['order']); ?> + lists['order_Dir'], $this->lists['order']); ?> - lists['order_Dir'], $this->lists['order']); ?> + lists['order_Dir'], $this->lists['order']); ?> - lists['order_Dir'], $this->lists['order']); ?> + lists['order_Dir'], $this->lists['order']); ?> - lists['order_Dir'], $this->lists['order']); ?> -
    - - - - -

    getHeader('Update'); ?>

    - upgradeNeeded() == true) { ?> - - - __('No update needed'); ?> - -
    -

    - -
    - -
    -

    __('Version check'); ?>

    -
    - -
    -
    - - - - - - - getNewVersion(); if(preg_match('/^ERROR/', $newversion)) { ?> - - - - - - -
    __('Current version'); ?>getCurrentVersion(); ?>
    __('New version'); ?>
    -
    -
    -
    -Debug update - - - - - diff --git a/magento/lib/Yireo/MageBridge/Utilities/StringValue.php b/magento/lib/Yireo/MageBridge/Utilities/StringValue.php index ebc167620..4bc952de6 100644 --- a/magento/lib/Yireo/MageBridge/Utilities/StringValue.php +++ b/magento/lib/Yireo/MageBridge/Utilities/StringValue.php @@ -1,4 +1,5 @@ getMeta('supportkey') != $bridge->getLicenseKey() && $this->getMeta('license') != $bridge->getLicenseKey()) { - yireo_benchmark('MageBridge supportkey failed'); - $bridge->setMetaData('state', 'supportkey failed'); - $bridge->setMetaData('extra', $bridge->getLicenseKey()); - print $bridge->output(false); - exit; - } - // Authorize this request using the API credentials (set in the meta-data) if ($this->authenticate() == false) { yireo_benchmark('MageBridge authentication failed'); @@ -501,7 +492,7 @@ public function dispatch($data) foreach ($data as $index => $segment) { switch ($segment['type']) { case 'version': - $segment['data'] = Mage::getSingleton('magebridge/update')->getCurrentVersion(); + $segment['data'] = Mage::getSingleton('magebridge/core')->getCurrentVersion(); break; case 'authenticate': @@ -567,7 +558,9 @@ public function dispatch($data) $profiler['data'] = Mage::getSingleton('magebridge/block')->getOutput($profiler['name'], $profiler['arguments']); $profiler['meta'] = Mage::getSingleton('magebridge/block')->getMeta($profiler['name']); //echo Mage::helper('magebridge/encryption')->base64_decode($profiler['data']);exit; - $data[$profilerId] = $profiler; + if (isset($profilerId)) { + $data[$profilerId] = $profiler; + } } return $data; diff --git a/manifest.xml b/manifest.xml index 5f1269b16..51b1f0524 100644 --- a/manifest.xml +++ b/manifest.xml @@ -19,10 +19,10 @@ pkg_magebridge package site - 2.0.0-dev - https://github.com/akunzai/MageBridgeCore/releases/2.0.0-dev + 2.0.0-beta1 + https://github.com/akunzai/MageBridgeCore/releases/2.0.0-beta1 - https://github.com/akunzai/MageBridgeCore/releases/download/2.0.0-dev/pkg_magebridge.zip + https://github.com/akunzai/MageBridgeCore/releases/download/2.0.0-beta1/pkg_magebridge.zip diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 3f300c436..335db3bf2 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,125 +1,5 @@ parameters: ignoreErrors: - - - message: "#^Access to an undefined property MagebridgeModelCheck\\:\\:\\$_checks\\.$#" - count: 2 - path: joomla/administrator/components/com_magebridge/models/check.php - - - - message: "#^Access to an undefined property MagebridgeModelUrl\\:\\:\\$_orderby_title\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/models/url.php - - - - message: "#^Access to an undefined property MagebridgeTableUsergroup\\:\\:\\$required\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/tables/usergroup.php - - - - message: "#^Access to an undefined property MageBridgeViewCheck\\:\\:\\$form\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/views/check/view.html.php - - - - message: "#^Access to an undefined property MageBridgeViewCheck\\:\\:\\$host\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/views/check/view.html.php - - - - message: "#^Access to an undefined property MageBridgeViewCheck\\:\\:\\$url\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/views/check/view.html.php - - - - message: "#^Access to an undefined property MageBridgeViewConfig\\:\\:\\$configData\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/views/config/view.html.php - - - - message: "#^Access to an undefined property MageBridgeViewConfig\\:\\:\\$form\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/views/config/view.html.php - - - - message: "#^Access to an undefined property object\\:\\:\\$pagination\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/views/element/tmpl/category.php - - - - message: "#^Access to an undefined property object\\:\\:\\$pagination\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/views/element/tmpl/customer.php - - - - message: "#^Access to an undefined property object\\:\\:\\$pagination\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/views/element/tmpl/product.php - - - - message: "#^Access to an undefined property object\\:\\:\\$pagination\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/views/element/tmpl/widget.php - - - - message: "#^Access to an undefined property MageBridgeViewCommon\\:\\:\\$categories\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/views/element/view.common.php - - - - message: "#^Access to an undefined property MageBridgeViewCommon\\:\\:\\$current\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/views/element/view.common.php - - - - message: "#^Access to an undefined property MageBridgeViewCommon\\:\\:\\$customers\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/views/element/view.common.php - - - - message: "#^Access to an undefined property MageBridgeViewCommon\\:\\:\\$lists\\.$#" - count: 4 - path: joomla/administrator/components/com_magebridge/views/element/view.common.php - - - - message: "#^Access to an undefined property MageBridgeViewCommon\\:\\:\\$object\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/views/element/view.common.php - - - - message: "#^Access to an undefined property MageBridgeViewCommon\\:\\:\\$pagination\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/views/element/view.common.php - - - - message: "#^Access to an undefined property MageBridgeViewCommon\\:\\:\\$products\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/views/element/view.common.php - - - - message: "#^Access to an undefined property MageBridgeViewCommon\\:\\:\\$widgets\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/views/element/view.common.php - - - - message: "#^Access to an undefined property MageBridgeViewHome\\:\\:\\$icons\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/views/home/view.html.php - - - - message: "#^Access to an undefined property MageBridgeViewHome\\:\\:\\$urls\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/views/home/view.html.php - - - - message: "#^Access to an undefined property MageBridgeViewProduct\\:\\:\\$actions_form\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/views/product/view.html.php - - - - message: "#^Access to an undefined property MageBridgeViewProduct\\:\\:\\$params_form\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/views/product/view.html.php - - message: "#^Call to an undefined method MageBridgeViewRoot\\:\\:build\\(\\)\\.$#" count: 1 @@ -130,81 +10,6 @@ parameters: count: 1 path: joomla/administrator/components/com_magebridge/views/root/view.raw.php - - - message: "#^Access to an undefined property MageBridgeViewStore\\:\\:\\$actions_form\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/views/store/view.html.php - - - - message: "#^Access to an undefined property MageBridgeViewStore\\:\\:\\$params_form\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/views/store/view.html.php - - - - message: "#^Access to an undefined property MageBridgeViewUsergroup\\:\\:\\$fields\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/views/usergroup/view.html.php - - - - message: "#^Access to an undefined property MageBridgeViewUsergroup\\:\\:\\$params_form\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/views/usergroup/view.html.php - - - - message: "#^Access to an undefined property MageBridgeViewUsers\\:\\:\\$items\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/views/users/view.html.php - - - - message: "#^Access to an undefined property MageBridgeViewUsers\\:\\:\\$lists\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/views/users/view.html.php - - - - message: "#^Access to an undefined property MageBridgeViewUsers\\:\\:\\$pagination\\.$#" - count: 1 - path: joomla/administrator/components/com_magebridge/views/users/view.html.php - - - - message: "#^Access to an undefined property MageBridgeControllerJsonrpc\\:\\:\\$app\\.$#" - count: 2 - path: joomla/components/com_magebridge/controllers/default.jsonrpc.php - - - - message: "#^Access to an undefined property MageBridgeControllerJsonrpc\\:\\:\\$debug\\.$#" - count: 5 - path: joomla/components/com_magebridge/controllers/default.jsonrpc.php - - - - message: "#^Access to an undefined property MageBridgeDebugHelper\\:\\:\\$app\\.$#" - count: 2 - path: joomla/components/com_magebridge/helpers/debug.php - - - - message: "#^Access to an undefined property MageBridgeDebugHelper\\:\\:\\$bridge\\.$#" - count: 10 - path: joomla/components/com_magebridge/helpers/debug.php - - - - message: "#^Access to an undefined property MageBridgeDebugHelper\\:\\:\\$register\\.$#" - count: 2 - path: joomla/components/com_magebridge/helpers/debug.php - - - - message: "#^Access to an undefined property MageBridgeDebugHelper\\:\\:\\$request\\.$#" - count: 2 - path: joomla/components/com_magebridge/helpers/debug.php - - - - message: "#^Access to an undefined property MageBridgeStoreHelper\\:\\:\\$app_type\\.$#" - count: 12 - path: joomla/components/com_magebridge/helpers/store.php - - - - message: "#^Access to an undefined property MageBridgeStoreHelper\\:\\:\\$app_value\\.$#" - count: 12 - path: joomla/components/com_magebridge/helpers/store.php - - message: "#^Function shAddSefURLToCache not found\\.$#" count: 1 @@ -216,62 +21,7 @@ parameters: path: joomla/components/com_magebridge/helpers/url.php - - message: "#^Access to an undefined property Zend_Json_Decoder\\:\\:\\$_tokenValue\\.$#" - count: 3 - path: joomla/components/com_magebridge/libraries/Zend/Json/Decoder.php - - - - message: "#^Access to an undefined property Zend_Json_Server_Response\\:\\:\\$_args\\.$#" - count: 2 - path: joomla/components/com_magebridge/libraries/Zend/Json/Server/Response.php - - - - message: "#^Access to an undefined property Zend_Server_Reflection_Prototype\\:\\:\\$_params\\.$#" - count: 2 - path: joomla/components/com_magebridge/libraries/Zend/Server/Reflection/Prototype.php - - - - message: "#^Access to an undefined property Zend_Server_Reflection_Prototype\\:\\:\\$_return\\.$#" - count: 3 - path: joomla/components/com_magebridge/libraries/Zend/Server/Reflection/Prototype.php - - - - message: "#^Access to an undefined property MageBridgeApi\\:\\:\\$app\\.$#" - count: 2 - path: joomla/components/com_magebridge/libraries/api.php - - - - message: "#^Access to an undefined property MageBridgeApi\\:\\:\\$debug\\.$#" - count: 5 - path: joomla/components/com_magebridge/libraries/api.php - - - - message: "#^Access to an undefined property MageBridgePluginProfile\\:\\:\\$db\\.$#" - count: 1 - path: joomla/components/com_magebridge/libraries/plugin/profile.php - - - - message: "#^Access to an undefined property MageBridgePluginStore\\:\\:\\$db\\.$#" - count: 1 - path: joomla/components/com_magebridge/libraries/plugin/store.php - - - - message: "#^Access to an undefined property MageBridgeModelBridgeMeta\\:\\:\\$_meta_data\\.$#" - count: 2 - path: joomla/components/com_magebridge/models/bridge/meta.php - - - - message: "#^Access to an undefined property MageBridgeModelCache\\:\\:\\$request\\.$#" - count: 2 - path: joomla/components/com_magebridge/models/cache.php - - - - message: "#^Access to an undefined property MagebridgeModelConfigValue\\:\\:\\$app\\.$#" - count: 2 - path: joomla/components/com_magebridge/models/config/value.php - - - - message: "#^Access to an undefined property MageBridgeModelProxy\\:\\:\\$redirectUrl\\.$#" + message: "#^Instantiated class Joomla\\\\CMS\\\\Crypt\\\\Key not found\\.$#" count: 1 path: joomla/components/com_magebridge/models/proxy.php @@ -335,16 +85,6 @@ parameters: count: 1 path: joomla/components/com_magebridge/views/cms/view.html.php - - - message: "#^Access to an undefined property MageBridgeViewContent\\:\\:\\$logout_url\\.$#" - count: 1 - path: joomla/components/com_magebridge/views/content/view.html.php - - - - message: "#^Access to an undefined property MageBridgeViewContent\\:\\:\\$params\\.$#" - count: 1 - path: joomla/components/com_magebridge/views/content/view.html.php - - message: "#^Call to an undefined method MageBridgeViewContent\\:\\:setBlock\\(\\)\\.$#" count: 1 @@ -365,11 +105,6 @@ parameters: count: 1 path: joomla/components/com_magebridge/views/custom/view.html.php - - - message: "#^Access to an undefined property MageBridgeViewOffline\\:\\:\\$offline_message\\.$#" - count: 1 - path: joomla/components/com_magebridge/views/offline/view.html.php - - message: "#^Call to an undefined method MageBridgeViewOffline\\:\\:getOfflineMessage\\(\\)\\.$#" count: 1 @@ -395,91 +130,6 @@ parameters: count: 1 path: joomla/components/com_magebridge/views/root/view.html.php - - - message: "#^Access to an undefined property YireoModel\\:\\:\\$_table\\.$#" - count: 1 - path: joomla/libraries/yireo/model.php - - - - message: "#^Access to an undefined property YireoModel\\:\\:\\$search\\.$#" - count: 1 - path: joomla/libraries/yireo/model.php - - - - message: "#^Access to an undefined property YireoCommonModel\\:\\:\\$params\\.$#" - count: 2 - path: joomla/libraries/yireo/model/common.php - - - - message: "#^Access to an undefined property YireoModelDataQuery\\:\\:\\$data\\.$#" - count: 1 - path: joomla/libraries/yireo/model/data/query.php - - - - message: "#^Access to an undefined property YireoModelDataQuerytext\\:\\:\\$data\\.$#" - count: 1 - path: joomla/libraries/yireo/model/data/querytext.php - - - - message: "#^Access to an undefined property YireoModelItems\\:\\:\\$_orderby\\.$#" - count: 1 - path: joomla/libraries/yireo/model/items.php - - - - message: "#^Access to an undefined property YireoModelItems\\:\\:\\$where\\.$#" - count: 1 - path: joomla/libraries/yireo/model/items.php - - - - message: "#^Access to an undefined property YireoTable\\:\\:\\$_error\\.$#" - count: 3 - path: joomla/libraries/yireo/table.php - - - - message: "#^Access to an undefined property YireoView\\:\\:\\$form\\.$#" - count: 1 - path: joomla/libraries/yireo/view.php - - - - message: "#^Access to an undefined property YireoView\\:\\:\\$items\\.$#" - count: 2 - path: joomla/libraries/yireo/view.php - - - - message: "#^Access to an undefined property YireoView\\:\\:\\$pagination\\.$#" - count: 3 - path: joomla/libraries/yireo/view.php - - - - message: "#^Access to an undefined property YireoView\\:\\:\\$total\\.$#" - count: 1 - path: joomla/libraries/yireo/view.php - - - - message: "#^Access to an undefined property YireoCommonView\\:\\:\\$uri\\.$#" - count: 1 - path: joomla/libraries/yireo/view/common.php - - - - message: "#^Access to an undefined property YireoViewHome\\:\\:\\$current_version\\.$#" - count: 1 - path: joomla/libraries/yireo/view/home.php - - - - message: "#^Access to an undefined property YireoViewList\\:\\:\\$fields\\.$#" - count: 1 - path: joomla/libraries/yireo/view/list.php - - - - message: "#^Access to an undefined property object\\:\\:\\$fields\\.$#" - count: 2 - path: joomla/libraries/yireo/view/list/default.php - - - - message: "#^Access to an undefined property object\\:\\:\\$lists\\.$#" - count: 3 - path: joomla/libraries/yireo/view/list/default.php - - message: "#^Call to an undefined method object\\:\\:checkbox\\(\\)\\.$#" count: 1 @@ -524,8 +174,3 @@ parameters: message: "#^Access to an undefined property Yireo_MageBridge_Model_Client\\:\\:\\$coreModel\\.$#" count: 2 path: magento/app/code/community/Yireo/MageBridge/Model/Client.php - - - - message: "#^Access to an undefined property Yireo\\\\MageBridge\\\\Utilities\\\\StringValue\\:\\:\\$string\\.$#" - count: 2 - path: magento/lib/Yireo/MageBridge/Utilities/StringValue.php diff --git a/phpstan.neon b/phpstan.neon index 4838186e8..dc7563139 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -28,3 +28,7 @@ parameters: - vendor/openmage/magento-lts/lib - vendor/openmage/magento-lts/app/code tmpDir: tmp + ignoreErrors: + - '#Call to an undefined static method Joomla\\CMS\\Language\\Text::_\(\).#' + - '#Access to an undefined property object::\$pagination.#' + - '#Access to protected property MageBridgeController::\$app.#'