Download the PHP package spryker/app-kernel without Composer
On this page you can find all versions of the php package spryker/app-kernel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package app-kernel
AppKernel Module
Provides SyncAPI and AsyncAPI schema files and the needed code to make the Mini-Framework an App.
Installation
Configure
App Identifier
config/Shared/config_default.php
Validating Requests against the OpenAPI Schema
Low level validation can be done by using the Spryker\Zed\AppKernel\Communication\Plugin\OpenApiSchemaValidatorPlugin
plugin. When this plugin is added to the GlueApplicationDependencyProvider all API requests against this App will be validated against the defined OpenAPI schema.
To enable this, you need to have a well-defined OpenAPI schema file, and you need to add the OpenApiSchemaValidatorPlugin
plugin to the getRestApplicationPlugins
method in your GlueApplicationDependencyProvider.
Pay intention that this will be a hard validation that gets executed before any other code from your App gets executed. If the validation fails, the request will be rejected with a 400 Bad Request response with a proper message that explains what exactly is wrong in the request.
Make sure you have tests for your API.
Testing the AppKernel
You can test the AppKernel as usual with Codeception. Before that you need to run some commands:
With these commands you've set up the AppKernel and can start the tests
Documentation
Configuration
AppIdentifier
Every App needs a unique App Identifier which needs to be configured in the config/Shared/config_default.php
file after installation.
High-Level Architecture
Features
Encryption
This package comes with a built-in Encryption for data that gets persisted. By default, the encryption is disabled but can be easily enabled. After installation and setup, you can configure the encryption of sensitive data.
Enable Plugin
The encryption will be done with the help of a plugin. You can add the required plugin to the \Pyz\Client\SecretsManager\SecretsManagerDependencyProvider::getSecretsManagerProviderPlugin()
method on the project level.
Currently, we have an AWS Plugin available for you \Spryker\Client\SecretsManagerAws\Plugin\SecretsManager\SecretsManagerAwsProviderPlugin
for any other encryption you need to create your own plugin.
You can install the package that contains the plugin with
Extend the Propel schema
Add a spy_app_kernel.schema.xml
on the project level to src/Pyz/AppKernel/Zed/Persistence/Propel/schema
and update the columns you want to be encrypted.
Example
Next, execute the migrations by running the docker/sdk console propel:install
command, then these columns will be encrypted.
Plugins
This package provides the following plugins
Glue
\Spryker\Glue\AppKernel\Plugin\RouteProvider\AppKernelRouteProviderPlugin
AppKernelRouteProviderPlugin
This plugin must be added to the \Pyz\Glue\GlueBackendApiApplication\GlueBackendApiApplicationDependencyProvider::getRouteProviderPlugins()
.
Extension
In most cases, the default behavior of the AppKernel will be enough. When you need to add or change behavior we provide extension points you can use to change the AppKernel.
This package provides the following extensions.
Glue
- Configuration validation plugins
- Disconnect validation plugins
Configuration validation plugins
This plugin stack can be used to add your own validators for the configuration of the App. This will most likely be useful when you need to validate the passed configuration from the App Store Catalog e.g. checking against the implemented provider if credentials are valid.
You can add your own plugins to the \Pyz\Glue\AppKernel\AppKernelDependencyProvider::getRequestConfigureValidatorPlugins()
method on the project level.
Disconnect validation plugins
This plugin stack can be used to add your own validators for the disconnect of the App. This can be used e.g. for validating if the App can be disconnected or not.
You can add your own plugins to the \Pyz\Glue\AppKernel\AppKernelDependencyProvider::getRequestDisconnectValidatorPlugins()
method on the project level.
Zed
Zed offers the following extension points
\Spryker\Zed\AppKernelExtension\Dependency\Plugin\AppKernelPlatformPluginInterface
\Spryker\Zed\AppKernelExtension\Dependency\Plugin\ConfigurationBeforeSavePluginInterface
\Spryker\Zed\AppKernelExtension\Dependency\Plugin\ConfigurationAfterSavePluginInterface
\Spryker\Zed\AppKernelExtension\Dependency\Plugin\ConfigurationBeforeDeletePluginInterface
\Spryker\Zed\AppKernelExtension\Dependency\Plugin\ConfigurationAfterDeletePluginInterface
Both save and delete actions can be extended with a plugin that needs to be executed before and after the AppKernel code is executed.
AppKernelPlatformPluginInterface
You can implement this plugin in the Apps PlatformPlugin. It enables the validation of the configuration that gets passed from the AppStoreCatalog.
ConfigurationBeforeSavePluginInterface
You can add your plugins to the \Pyz\Zed\AppKernel\AppKernelDependencyProvider::getConfigurationBeforeSavePlugins()
method on the project level.
ConfigurationAfterSavePluginInterface
You can add your plugins to the \Pyz\Zed\AppKernel\AppKernelDependencyProvider::getConfigurationAfterSavePlugins()
method on the project level.
ConfigurationBeforeDeletePluginInterface
You can add your plugins to the \Pyz\Zed\AppKernel\AppKernelDependencyProvider::getConfigurationBeforeDeletePlugins()
method on the project level.
ConfigurationAfterDeletePluginInterface
You can add your plugins to the \Pyz\Zed\AppKernel\AppKernelDependencyProvider::getConfigurationAfterDeletePlugins()
method on the project level.
All versions of app-kernel with dependencies
guzzlehttp/psr7 Version ^2.7
league/openapi-psr7-validator Version ^0.22.0
spryker/app-kernel-extension Version ^1.0.0
spryker/glue-application-extension Version ^1.0.0
spryker/kernel Version ^3.30.0
spryker/log Version ^3.0.0
spryker/message-broker Version ^1.11.0
spryker/propel-encryption-behavior Version ^0.1.1
spryker/secrets-manager Version ^1.0.0
spryker/secrets-manager-extension Version ^1.0.0
spryker/symfony Version ^3.0.0
spryker/transfer Version ^3.33.0
spryker/translator Version ^1.13.0
spryker/util-encoding Version ^2.0.0
spryker/util-text Version ^1.0.0