Adobe Commerce and Magento Open Source Developer Documentation

repository·master·Indexed 20 days ago

https://github.com/magento/devdocs

Source code and build instructions for the Adobe Commerce and Magento Open Source developer documentation website, specifically for the 2.3 release line. Built using Jekyll, the repository includes guides for local setup via Ruby or Docker Compose, Rake tasks for site generation, and detailed backward-incompatible change logs for the transition from Magento 2.3.0 to 2.4.0, including removed classes, method return typing changes, and new API additions.

Tokens
306.7K
Snippets
754
Records
1.1K
Agent score
71%

What's inside magento-devdocs

  1. View and manage logs in Adobe Commerce Cloud

    master

    Logs for Adobe Commerce Cloud projects can be accessed via three primary methods:

    1. File system: Use an SSH connection to access /var/log (system logs) or var/log/ (app-specific logs). Note that in Pro Production and Staging environments, logs are not shared between nodes in a cluster; you must check the logs on each node individually.
    2. Project web UI: View build and post-deploy log information within the environment messages list.
    3. Magento Cloud CLI: Use the magento-cloud log command to view logs directly from your terminal.

    For Pro environments, automatic log rotation, compression, and removal are enabled for log files with fixed names. Rotation configurations can be found in /etc/logrotate.conf and /etc/logrotate.d/.

  2. Understand the Adobe Commerce Cloud deployment process

    master

    Build and deploy scripts are triggered when code is merged into a remote environment. These scripts use environment configuration files and application code to provision Cloud infrastructure and install/update the application and its extensions.

    Deployment behavior depends on your plan:

    • Starter plans: Every active branch builds and deploys to a full environment for testing. To launch, push the staging branch to master (Production).
    • Pro plans: Every active branch builds and deploys to a full environment. You must follow a specific merge path: integration branch $\rightarrow$ Staging environment $\rightarrow$ Production environment.
  3. Available New Relic services in Adobe Commerce Cloud

    master

    Adobe Commerce Cloud projects include access to specific New Relic services depending on your account type and environment:

    • New Relic APM: Available to all projects (Pro and Starter). Used for application performance management, database query monitoring, App Map, and Apdex scores.
    • New Relic Infrastructure (NRI): Available to Pro projects only. Provides dynamic server monitoring and is available on Production and Staging environments.
    • New Relic Logs: Available to Pro projects on Production and Staging environments. Aggregates logs from ~/var/log, cloud service logs (var/log/platform/<project-ID>), and Fastly CDN/WAF logs.
  4. Live Search Package Components

    master

    Live Search consists of several standalone meta packages that replace standard search capabilities:

    PackageDescription
    module-live-searchConfigures search settings (faceting, synonyms, query rules) and provides a read-only GraphQL playground in the Admin.
    module-live-search-adapterRoutes storefront requests (Category browse and Global search) to the Live Search service.
    module-live-search-storefront-popoverProvides a "search as you type" popover with dynamic product suggestions and thumbnails.

    Requirements:

    • Adobe Commerce 2.4.x
    • PHP 7.3 / 7.4
    • Composer
  5. Overview of the Technical Review process

    master

    The Technical Review for Adobe Commerce Marketplace extensions involves several automated and manual stages to ensure security, quality, and compliance:

    • Malware Scan: Ensures no viruses or malware are present.
    • Extension Package Verification: Validates Composer packaging and format.
    • Code Sniffer: Checks code quality and syntax against Magento coding standards.
    • Copy Paste Detector: Checks for plagiarism. Note: Code from Open Source Edition must be licensed under Open Source License v. 3.0 and properly credit Adobe, Inc.
    • Installation and Varnish Tests: Verifies installation with Varnish Cache enabled and ensures pages are correctly cached in production mode.
    • MFTF Tests: Executes Magento Functional Testing Framework tests (both Magento-supplied and Vendor-supplied).
  6. What is Two-Factor Authentication (2FA) in Magento?

    master

    Two-Factor Authentication (2FA) improves security by requiring two-step authentication to access the Admin UI from all devices. It applies exclusively to Admin UI users and does not affect storefront customer accounts.

    Key capabilities include:

    • Enabling authenticator support for the Admin.
    • Managing and configuring authenticator settings globally or per user account.
    • Resetting authenticators and managing trusted devices for users.

    In version 2.3.X, 2FA is installed as a Core Bundled Extension (CBE).

  7. Overview of Docker container architecture for Adobe Commerce Cloud

    master

    The Adobe Commerce Cloud Docker environment is composed of CLI containers and service containers. The build configuration creates a Docker instance that allows you to run Adobe Commerce (ECE) in a local environment.

    mcd-prod is used to generate the docker-compose.yml file according to required specifications. Once generated, you use docker-compose to create container instances, build, and deploy your site.

  8. Understand the Complexity Score

    master

    The complexity score represents the difficulty of upgrading from the current version to a new version.

    • Range: 0 to ∞.
    • Interpretation: Lower numbers indicate easier upgrades.
    • Calculation Factors: The score is derived from the number and severity of issues identified during analysis.

    Complexity Score Formula

    Complexity Score = (Critical issues * 3) + (Errors * 2) + Warnings

    Note: All values used in the formula are absolute values.

  9. How Magento application bootstrapping works

    master

    Magento application initialization follows a specific sequence to ensure the environment is correctly set up before handling requests. The process is typically orchestrated via index.php and app/bootstrap.php.

    The Bootstrapping Sequence

    1. Initialization: app/bootstrap.php is included to perform essential routines like error handling, autoloader initialization, setting the default timezone, and configuring profiling options.
    2. Bootstrap Instance: An instance of \Magento\Framework\App\Bootstrap is created. This object requires initialization parameters (typically the $_SERVER super-global).
    3. Application Instance: A Magento application instance (implementing \Magento\Framework\App\AppInterface) is created using the bootstrap object.
    4. Execution: The bootstrap object runs the application and sends the resulting response.

    Bootstrap Run Logic

    The \Magento\Framework\App\Bootstrap object follows this internal algorithm:

    1. Initializes the error handler.
    2. Creates the Object Manager and basic shared services, injecting environment parameters.
    3. Asserts that maintenance mode is not enabled (terminates if it is).
    4. Asserts that the Magento application is installed (terminates if it is not).
    5. Starts the application.
    6. Sends the response.

    If an uncaught exception occurs during launch, it is passed to the catchException() method. If this method returns true, Magento has handled the exception; if it returns false or nothing, the bootstrap object performs default exception handling.

    <?php
    use Magento\Framework\App\Bootstrap;
    use Magento\Framework\App\Http;
    
    require __DIR__ . '/app/bootstrap.php';
    
    $params = $_SERVER;
    $params[Bootstrap::PARAM_REQUIRE_MAINTENANCE] = true; // default false
    $params[Bootstrap::PARAM_REQUIRE_IS_INSTALLED] = false; // default true
    $bootstrap = Bootstrap::create(BP, $params);
    
    /** @var Http $app */
    $app = $bootstrap->createApplication(Http::class);
    $bootstrap->run($app);
  10. Importing websites, stores, and store groups

    master

    Configurations located under the scopes array in config.php are imported using the following logic:

    • websites: Website-related configuration.
    • groups: Store-related configuration.
    • stores: Store view-related configuration.

    Import Modes:

    • create: Creates entities (websites, groups, stores) present in config.php but missing from the production environment.
    • update: Updates existing entities that differ between config.php and the production environment.
    • delete: Removes entities present on production that are no longer present in config.php.

    Note: The root category associated with stores is not imported. You must associate a root category with a store using the Magento Admin.

  11. Monitor performance with Managed Alerts

    master

    Adobe provides a Managed alerts for Adobe Commerce policy to track performance metrics on Production environments. This policy uses industry best practices to trigger warning and critical notifications when thresholds are met.

    Supported Metrics by Environment

    MetricData collectionAvailability
    Apdex scoreAPMPro and Starter
    error rateAPMPro and Starter
    disk spaceNRIPro
    CPU usageNRIPro
    memory usageNRIPro
    RedisNRIPro
    MariaDBNRIPro

    Note: For Pro Staging/Integration and Starter environments, use Health notifications to monitor disk space.

    Prerequisites

    • New Relic credentials for your Cloud project.
    • Cloud environment must be connected to New Relic.
    • At least one notification channel must be configured and mapped to the alert policy.