Skip to content

Commit

Permalink
Adjusting the files
Browse files Browse the repository at this point in the history
  • Loading branch information
lenadoc committed Dec 14, 2023
1 parent 9f81168 commit f079161
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 40 deletions.
2 changes: 0 additions & 2 deletions docs/acp/user/develop-an-app/code-snippets/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
title: Configuration Json
Descriptions: Configuration Json code snippet
template: howto-guide-template
redirect_from:
- /docs/acp/user/develop-an-app.html
---
To display the app you [developed with Spryker Mini-Framework](/docs/acp/user/develop-an-app/develop-an-app.html) in the App Store Catalog, the app needs to have the `configuration.json` file. This file contains all necessary form fields for inputs required by users of your app. Add this file to `config/app/configuration.json` in your app.

Expand Down
4 changes: 1 addition & 3 deletions docs/acp/user/develop-an-app/code-snippets/manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
title: Manifest Json
Descriptions: Manifest Json code snippet
template: howto-guide-template
redirect_from:
- /docs/acp/user/develop-an-app.html
---
To display the app you [developed with Spryker Mini-Framework](/docs/acp/user/develop-an-app/develop-an-app.html) in the App Store Catalog,, the app needs to have the manifest file. Add this file has to `config/app/manifest/en_US.json` in your App.
To display the app you [developed with Spryker Mini-Framework](/docs/acp/user/develop-an-app/develop-an-app.html) in the App Store Catalog,, the app needs to have the manifest file. Add this file to `config/app/manifest/en_US.json` in your App.

For more information about configuration of the manifest file, see [App manifest](https://docs.spryker.com/docs/acp/user/app-manifest.html).

Expand Down
4 changes: 1 addition & 3 deletions docs/acp/user/develop-an-app/code-snippets/translation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
title: Translation Json
Descriptions: Translation Json code snippet
template: howto-guide-template
redirect_from:
- /docs/acp/user/develop-an-app.html
---

The `translation.json` file contains translations of the form files which are defined in the `configuration.json` file of your app [developed with Spryker Mini-Framework](/docs/acp/user/develop-an-app/develop-an-app.html). Add this file to `config/app/translation.json`in your app.
Expand Down Expand Up @@ -43,4 +41,4 @@ Here is the example `translation.json` file for the Hello World app.
"de_DE": "Aktivieren"
}
}
```
```
28 changes: 14 additions & 14 deletions docs/acp/user/develop-an-app/debug-an-app-with-xdebug.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
---
title: Debugging Your App with Xdebug
Descriptions: Learn how to use Xdebug
title: Debug an app with Xdebug
Descriptions: Learn how to use Xdebug for your app
template: howto-guide-template
redirect_from:
- /docs/acp/user/develop-an-app.html
---

## Introduction
This document describes how to set up and use Xdebug to debug your app.

Debugging your application becomes a seamless process with the provided DockerSDK, which comes equipped with a configuration to effortlessly run your app with Xdebug. This guide will walk you through the steps to set up and use Xdebug for debugging purposes.
Keep in mind that the steps described here may vary slightly depending on your specific development environment; however, they should still assist you in setting up XDebug for debugging in most scenarios.

### Setting Up DockerSDK with XDebug
## Set up DockerSDK with XDebug

To start a testing container with XDebug enabled (disabled in the default container), execute the following command in your terminal:
To start a testing container with Xdebug enabled (disabled in the default container), execute the following command:

```bash
docker/sdk testing -x
```

### Configuring PHPStorm for XDebug
### Configure PHPStorm for XDebug

1. Open PHPStorm and navigate to Preferences → PHP → Servers.
2. Click the "+" sign to add a new configuration with the following details:
To configure PHPStorm for XDebug, do the following:

1. In PHPStorm, go to **Preferences → PHP → Servers**.
2. Click the `+` sign to add a new configuration with the following details:
- Name: spryker
- Host: spryker.local
3. Enable the Use path mappings option, selecting it based on whether the server is remote or if symlinks are used. For example, map the path from /path/to/root/of/the/app to /data.
3. Enable the *Use path mappings* option, selecting it based on whether the server is remote or if symlinks are used. For example, map the path from `/path/to/root/of/the/app` to `/data`.
4. Click `Apply` and then `OK` to save the configuration.

Now, PHPStorm is ready to accept XDebug connections, and you can efficiently debug your application using Xdebug.
PHPStorm is now ready to accept XDebug connections, allowing you to debug your app using XDebug.


Remember that these steps may vary slightly depending on your specific development environment, but this general guide should help you set up Xdebug for debugging in most scenarios.

15 changes: 7 additions & 8 deletions docs/acp/user/develop-an-app/develop-an-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Before you begin, ensure that you have the following prerequisites in place:

- Completed the [thought process](#thought-process) for your app.
- An empty GitHub repository.
- A local project directory for your app (e.g., `/www/my-app`).
- A local project directory for your app (for example, `/www/my-app`).
- [DockerSDK](https://github.com/spryker/docker-sdk) installed globally.

Make sure you have the Spryker Docker SDK, Git, and an empty repository for your app code.
Expand All @@ -30,7 +30,7 @@ First, think about what your app should be capable of: what features it will bri
### API-first
It's strongly recommended that apps follow the API-first approach.
API-first means that your app is centered on the API. It should be possible to perform every action via the scripting language, and every piece of functionality should be available for other systems to leverage. For more information on the API-first approach, see [this blog post](https://www.algolia.com/blog/product/the-5-principles-of-api-first-development-and-what-does-api-first-even-mean/).
You need to have a clear understanding of what your app API will provide to others and always keep that in mind when designing your app.
You need to have a clear understanding of what your app API will provide to others, and always keep that in mind when designing your app.

### Schema-first

Expand Down Expand Up @@ -60,7 +60,7 @@ git commit -m "first commit"

After running these commands, you will have a new local repository that needs to be linked with your remote one.

If not done yet, create a new remote repository by opening your [Github account](https://github.com/newConnect). After you created a new repository, GitHub shows you instructions on how to continue. You should follow the list below as you don’t need some of the first steps proposed by GitHub as we’ve already initialized Git and we already have the `README.md` file from the cloned repository.
If not done yet, create a new remote repository by opening your [Github account](https://github.com/newConnect). After you created a new repository, GitHub shows you instructions on how to continue. Follow the list below, as you don’t need some of the first steps proposed by GitHub since you’ve already initialized Git and you already have the `README.md` file from the cloned repository.

```bash
git branch -M main
Expand Down Expand Up @@ -102,17 +102,17 @@ Before your app can be listed in the App Store Catalog, you need to add the foll

### Manifest

The manifest file is the most important one for the App. It contains data that will be displayed in the App Store Catalog. You can use the [manifest code snippet](/docs/acp/user/develop-an-app/code-snippets/manifest.html) and update it to your needs. Add the manifest file to `config/app/manifest/en_US.json` of your app.
The manifest file is the most important one for the app. It contains data that will be displayed in the App Store Catalog. You can use the [manifest code snippet](/docs/acp/user/develop-an-app/code-snippets/manifest.html) and update it to your needs. Add the manifest file to `config/app/manifest/en_US.json` of your app.

Manifest files must have the local name as the filename, for example, `en_US.json`, and should be placed inside the `config/app/manifest` directory.

### Configuration

The configuration file contains all necessary form fields for inputs required by the user of your app, to be displayed in the App Store Catalog. You can use the [configuration code snippet](/docs/acp/user/develop-an-app/code-snippets/configuration.html) and update it to your needs. Add this file to `config/app/configuration.json` of your App.
The configuration file contains all necessary form fields for inputs required by the user of your app, to be displayed in the App Store Catalog. You can use the [configuration code snippet](/docs/acp/user/develop-an-app/code-snippets/configuration.html) and update it to your needs. Add this file to `config/app/configuration.json` of your app.

### Translation

The translation file contains all translations for the form fields you’ve previously defined. You can use the Hello World [example translation file](/docs/acp/user/develop-an-app/code-snippets/translation.html) and update it to your needs. Add this file to `config/app/translation.json` of your App.
The translation file contains all translations for the form fields you’ve previously defined. You can use the Hello World [example translation file](/docs/acp/user/develop-an-app/code-snippets/translation.html) and update it to your needs. Add this file to `config/app/translation.json` of your app.

## Add the registry (code)

Expand Down Expand Up @@ -241,5 +241,4 @@ If you want to understand what is happening in the code, you can [debug your app

Entry points for setting breakpoints are the following:
- `Spryker\Glue\App\Controller\AppConfigController`
- `\Spryker\Glue\App\Controller\AppDisconnectController`

- `\Spryker\Glue\App\Controller\AppDisconnectController`
24 changes: 14 additions & 10 deletions docs/acp/user/develop-an-app/set-up-the-message-broker.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
---
title: Set up the message broker
Descriptions: Learn how to develop an app
Descriptions: Learn how to set up the message broker
template: howto-guide-template
redirect_from:
- /docs/acp/user/develop-an-app.html
---
This document describes how to set up the message broker for your app.

## 1. Enable the message broker

To enable the message broker for your app, install the specific branch of the `spryker/message-broker` by running the following command:

To enable the message broker functionality, you must install a special branch of the `spryker/message-broker` by running the following command:
```bash
docker/sdk cli composer require "spryker/message-broker:dev-beta/localstack-replacement as 1.8.0"
```

## Update the Code
## 2. Update the code

For testing the application, update or add the `MessageBrokerDependencyProvider` as shown in the code snippet below.
To test the app, update or add `MessageBrokerDependencyProvider` as shown in the following example:

```php
<?php
Expand Down Expand Up @@ -47,9 +49,9 @@ class MessageBrokerDependencyProvider extends SprykerMessageBrokerDependencyProv
}
```

## Update the configuration
## 3. Update the configuration

Open your `config/Shared/config_local.php` file and add the following snippet:
In `config/Shared/config_local.php` file, add the following snippet:

```php
use Spryker\Shared\MessageBroker\MessageBrokerConstants;
Expand All @@ -65,6 +67,8 @@ $config[MessageBrokerConstants::CHANNEL_TO_TRANSPORT_MAP] = [
];
```

## Add the Worker Console
## 4. Add the worker console

Add the `\Spryker\Zed\MessageBroker\Communication\Plugin\Console\MessageBrokerWorkerConsole` console to the `\Pyz\Zed\Console\ConsoleDependencyProvider::getConsoleCommands()` method.

The final step is to add the `\Spryker\Zed\MessageBroker\Communication\Plugin\Console\MessageBrokerWorkerConsole` console to the `\Pyz\Zed\Console\ConsoleDependencyProvider::getConsoleCommands()` method. With these changes, your Message Broker is now set up and ready to use.
Now, the message broker is set up and ready to use.

0 comments on commit f079161

Please sign in to comment.