### Initialize Sylius Docker environment and open localhost Source: https://docs.sylius.com/public/getting-started/sylius-ce-installation-with-docker.md Run `make init` to build and start the Docker containers for Sylius Standard. Then open `http://localhost/` in your browser. Requires Docker and make to be installed. ```bash make init open http://localhost/ ``` -------------------------------- ### Run the Sylius interactive installer Source: https://docs.sylius.com/public/getting-started/sylius-ce-installation.md Execute the interactive installer from the project root. It checks system requirements, sets up the database, optionally installs demo data, configures the shop, generates API tokens, and installs assets. ```bash bin/console sylius:install ``` -------------------------------- ### Build front-end with npm Source: https://docs.sylius.com/public/getting-started/sylius-ce-installation.md Install front-end dependencies and build assets using npm. This is required before running the Sylius installer. ```bash npm install npm run build ``` -------------------------------- ### Query documentation with ask and goal parameters Source: https://docs.sylius.com/public/getting-started/basic-configuration.md Perform an HTTP GET request to the documentation URL with ask and goal query parameters. ask is the immediate question, goal is the user's ultimate objective. Use when the answer is not on the current page. ```http GET https://docs.sylius.com/public/getting-started/basic-configuration.md?ask=&goal= ``` -------------------------------- ### Interactive rebase to squash commits Source: https://docs.sylius.com/public/open-source/contributing/contributing-code/submitting-a-patch.md Starts an interactive rebase to squash commits. ```bash git rebase -i upstream/2.2 ``` -------------------------------- ### Build front-end with yarn Source: https://docs.sylius.com/public/getting-started/sylius-ce-installation.md Install front-end dependencies and build assets using yarn. This is an alternative to npm and is often preferred for its features like workspaces and offline caching. ```bash yarn install yarn build ``` -------------------------------- ### HTTP GET request to query documentation Source: https://docs.sylius.com/public/getting-started/first-product.md Use this HTTP GET request to query the Sylius documentation. The 'ask' parameter is the immediate question, and 'goal' describes the user's ultimate objective. The response contains a direct answer and relevant excerpts. ```http GET https://docs.sylius.com/public/getting-started/first-product.md?ask=&goal= ``` -------------------------------- ### Clone Sylius-Standard repository Source: https://docs.sylius.com/public/getting-started/sylius-ce-installation-with-docker.md Use this command to clone the Sylius-Standard repository into a new project directory. Replace 'your_project_name' with your desired project name. This is the first step in the Docker installation process. ```bash git clone git@github.com:Sylius/Sylius-Standard.git your_project_name ``` -------------------------------- ### Create a new Sylius project with Composer Source: https://docs.sylius.com/public/getting-started/sylius-ce-installation.md Use the Sylius Standard template to create a new project in a directory named AcmeStore. This command downloads the latest Sylius Standard and installs its dependencies. ```bash composer create-project sylius/sylius-standard AcmeStore ``` -------------------------------- ### Query the documentation with GitBook ask endpoint Source: https://docs.sylius.com/public/open-source/contributing/contributing-code.md Perform an HTTP GET request to the documentation URL with 'ask' and 'goal' query parameters to retrieve a direct answer and relevant excerpts. The 'ask' parameter should be a specific, self-contained question, while 'goal' describes the user's ultimate objective. ```http GET https://docs.sylius.com/public/open-source/contributing/contributing-code.md?ask=&goal= ``` -------------------------------- ### Set Symfony 7.0 requirement Source: https://docs.sylius.com/public/getting-started/sylius-ce-installation.md Ensure Symfony 7.0 is installed by setting the extra.symfony.require config and updating dependencies. This prevents installing Symfony components in the wrong version. ```bash composer config extra.symfony.require "^7.0" composer update ``` -------------------------------- ### Change default port mappings in compose.override.yml Source: https://docs.sylius.com/public/getting-started/sylius-ce-installation-with-docker.md Example YAML configuration to change the default host ports for nginx and mysql services in `compose.override.yml` to avoid conflicts. ```yaml # examples nginx: ports: - "8080:80" mysql: ports: - "3307:3306" ``` -------------------------------- ### Query Sylius documentation with GitBook API Source: https://docs.sylius.com/public/getting-started/before-you-begin.md Perform an HTTP GET request to the documentation URL with 'ask' and 'goal' query parameters. 'ask' is the immediate question, 'goal' describes the user's ultimate objective. Use when the answer is not on the current page. ```http GET https://docs.sylius.com/public/getting-started/before-you-begin.md?ask=&goal= ``` -------------------------------- ### Triggering a PHP deprecation with trigger_deprecation Source: https://docs.sylius.com/public/open-source/release-cycle/backwards-compatibility-promise.md Example of using the trigger_deprecation function to emit a deprecation notice, specifying the package name, version, and message. ```php trigger_deprecation( 'sylius/some-package', // package name '1.x', // package version 'A is deprecated and will be removed in Sylius 2.0. Use B instead.', // message ); ``` -------------------------------- ### Configure MAILER_URL for SwiftMailer Source: https://docs.sylius.com/public/getting-started/sylius-ce-installation.md Deprecated SwiftMailer configuration. Set the MAILER_URL variable in your .env file to use a mailing service. Example uses Gmail with username and password. ```bash MAILER_URL=gmail://username:password@local ``` -------------------------------- ### Enter the project directory Source: https://docs.sylius.com/public/getting-started/sylius-ce-installation.md Navigate into the newly created AcmeStore directory before proceeding with further steps. ```bash cd AcmeStore ``` -------------------------------- ### Configure PostgreSQL database connection in .env.local Source: https://docs.sylius.com/public/getting-started/sylius-ce-installation.md Create a .env.local file with the PostgreSQL DATABASE_URL. Replace placeholders with your credentials, host, database name, and server version. ```sh DATABASE_URL=pgsql://:@/_%kernel.environment%?serverVersion=&charset=utf8 ``` -------------------------------- ### Configure MySQL database connection in .env.local Source: https://docs.sylius.com/public/getting-started/sylius-ce-installation.md Create a .env.local file with the MySQL DATABASE_URL. Replace placeholders with your credentials, host, database name, and server version. ```sh DATABASE_URL=mysql://:@/_%kernel.environment%?serverVersion=&charset=utf8 ``` -------------------------------- ### Configure MariaDB database connection in .env.local Source: https://docs.sylius.com/public/getting-started/sylius-ce-installation.md Create a .env.local file with the MariaDB DATABASE_URL. Replace placeholders with your credentials, host, database name, and server version. ```sh DATABASE_URL=mysql://:@/_%kernel.environment%?serverVersion=mariadb-&charset=utf8 ``` -------------------------------- ### Create a topic branch from upstream/2.2 Source: https://docs.sylius.com/public/open-source/contributing/contributing-code/submitting-a-patch.md Creates and switches to a new branch based on the chosen base branch. ```bash git switch upstream/2.2 -c feature_branch ``` -------------------------------- ### Rebase and push after feedback Source: https://docs.sylius.com/public/open-source/contributing/contributing-code/submitting-a-patch.md Rebases with force and pushes again after receiving feedback. ```bash git rebase -f upstream/2.2 git push --force-with-lease origin feature_branch ``` -------------------------------- ### Check ports in use with lsof Source: https://docs.sylius.com/public/getting-started/sylius-ce-installation-with-docker.md Use `lsof` to check if ports 80 and 3306 are already in use, which can cause conflicts when running `make init`. ```bash lsof -i :80 lsof -i :3306 ``` -------------------------------- ### Run messenger consumer for asynchronous tasks Source: https://docs.sylius.com/public/getting-started/sylius-ce-installation.md Command to run the messenger consumer in a separate process, required for asynchronous tasks like Catalog Promotions. For production, consider using Supervisor. ```bash php bin/console messenger:consume main ``` -------------------------------- ### Configure Git user name and email Source: https://docs.sylius.com/public/open-source/contributing/contributing-code/submitting-a-patch Sets the global Git user name and email for commits. ```bash git config --global user.name "Your Name" git config --global user.email "you@example.com" ``` -------------------------------- ### Resolve conflicts and continue rebase Source: https://docs.sylius.com/public/open-source/contributing/contributing-code/submitting-a-patch.md Stages resolved files and continues the rebase process. ```bash git add resolved_file git rebase --continue ``` -------------------------------- ### Push feature branch to fork Source: https://docs.sylius.com/public/open-source/contributing/contributing-code/submitting-a-patch.md Pushes the feature branch to your fork with force-with-lease. ```bash git push --force-with-lease origin feature_branch ``` -------------------------------- ### Open localhost with changed nginx port Source: https://docs.sylius.com/public/getting-started/sylius-ce-installation-with-docker.md After changing the nginx port to 8080, use this command to open the correct address in your browser. ```bash open http://localhost:8080 # for the example above ``` -------------------------------- ### Pull request checklist table Source: https://docs.sylius.com/public/open-source/contributing/contributing-code/submitting-a-patch.md Markdown table to include in the pull request description. ```markdown | Q | A | --------------- | ----- | Branch? | {lowest_bugfix_version} or {future_version} | Bug fix? | no/yes | New feature? | no/yes | BC breaks? | no/yes | Deprecations? | no/yes | Related tickets | fixes #X, partially #Y, mentioned in #Z | License | MIT ``` -------------------------------- ### Set Git line endings to input (Windows) Source: https://docs.sylius.com/public/open-source/contributing/contributing-code/submitting-a-patch Sets the core.autocrlf option to 'input' to avoid line ending issues on Windows. ```bash git config core.autocrlf input ``` -------------------------------- ### Clone Sylius fork and add upstream remote Source: https://docs.sylius.com/public/open-source/contributing/contributing-code/submitting-a-patch Clones your forked Sylius repository and adds the main Sylius repository as an upstream remote. ```bash git clone git@github.com:YOUR_USERNAME/Sylius.git ``` ```bash cd Sylius git remote add upstream git://github.com/Sylius/Sylius.git ``` -------------------------------- ### Set Symfony version requirement Source: https://docs.sylius.com/public/getting-started/sylius-ce-installation.md Configure the Symfony version constraint in composer.json and update dependencies. Replace with a version like "6.3.*". ```bash composer config extra.symfony.require "" # e.g. "6.3.*" composer update ``` -------------------------------- ### Clone forked Sylius repository Source: https://docs.sylius.com/public/open-source/contributing/contributing-code/submitting-a-patch.md Clones your fork of the Sylius repository from GitHub. ```bash git clone git@github.com:YOUR_USERNAME/Sylius.git ``` -------------------------------- ### Run ECS check on src and tests Source: https://docs.sylius.com/public/open-source/contributing/contributing-code/coding-standards Use this command to check your code for Sylius coding standard violations. It runs the ECS tool on the 'src' and 'tests' directories. ```bash vendor/bin/ecs check src tests ``` -------------------------------- ### Run ECS check with --fix on src and tests Source: https://docs.sylius.com/public/open-source/contributing/contributing-code/coding-standards Use this command to automatically fix violations detected by ECS. It runs the same check as above but with the '--fix' suffix to apply fixes. ```bash vendor/bin/ecs check src tests --fix ``` -------------------------------- ### Add upstream remote for Sylius Source: https://docs.sylius.com/public/open-source/contributing/contributing-code/submitting-a-patch.md Adds the main Sylius repository as an upstream remote. ```bash cd Sylius git remote add upstream git://github.com/Sylius/Sylius.git ``` -------------------------------- ### Deprecation PHPDoc annotation Source: https://docs.sylius.com/public/open-source/release-cycle/backwards-compatibility-promise.md Shows the standard PHPDoc format for marking code as deprecated, including the version and replacement information. ```php /** * @deprecated Deprecated since version 1.X. Use XXX instead. */ ``` -------------------------------- ### Rebase feature branch onto upstream/2.2 Source: https://docs.sylius.com/public/open-source/contributing/contributing-code/submitting-a-patch.md Updates the feature branch with the latest changes from the base branch. ```bash git checkout feature_branch git rebase upstream/2.2 # or upstream/2.1 for bug fixes ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.