Download the PHP package solutiondrive/sd-test-environment-shopware without Composer

On this page you can find all versions of the php package solutiondrive/sd-test-environment-shopware. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sd-test-environment-shopware

Docker based Shopware Testing Environment

For easier testing with different shopware- and/or php-versions we use a docker based environment. There are some docker containers providing MySQL, PHP and so on. The local filesystem is mapped into the containers that need them.

NOTE on this README This file assumes that bin-scripts are installed to (as composer does by default). If your changed this behaviour in your you have to adjust the commands written in this file accordingly.

Installation

To use the testing environment in a project, add the following dependency to your project's composer.json's require-dev section:

"require-dev": {
    "solutiondrive/sd-test-environment-shopware": "*"
}

Then do a composer update or use composer require --dev instead.

To initialize the testing environment, e.g. for Shopware 5.7.x simply run the following:

vendor/bin/sdTest.sh init 57

This will create some files:

/README.TESTING.md              # This README.md in your project for other developers
/etc/test/docker-compose.yml    # A docker-compose file which can be modified for special needs

Usage / First steps

First you should start the testing docker containers (see also next section of this README):

vendor/bin/sdTest.sh start SHOPWARE_VERSION

Handle plugin

For all following commands you must pass a php and shopware version, e.g. 74 for PHP 7.4 container and 57 for Shopware 5.7 :

For adding the plugin run:

vendor/bin/sdPlugin.sh 74 57 add

For removing the plugin run:

vendor/bin/sdPlugin.sh 74 57 remove

For activating the plugin run:

vendor/bin/sdPlugin.sh 74 57 activate    

For deactivating the plugin run:

vendor/bin/sdPlugin.sh 74 57 deactivate

Controlling the testing environment

List of SHOPWARE_VERSION:

To start the containers e.g. with shopware 5.7 and get back your local shell just run:

vendor/bin/sdTest.sh start 57

To stop the containers run:

vendor/bin/sdTest.sh stop SHOPWARE_VERSION

In stopped state the containers data is saved.

To destroy your containers you can run:

vendor/bin/sdTest.sh remove SHOPWARE_VERSION

To restart your containers without loosing data you can run:

vendor/bin/sdTest.sh restart SHOPWARE_VERSION

Can can also run the containers in foreground to monitor the log output of the containers:

vendor/bin/sdTest.sh run SHOPWARE_VERSION

Then you can stop the execution by pressing CTRL+C. The containers will exit cleanly.

If you started the container in background using , you can view the logs by running:

vendor/bin/sdTest.sh logs SHOPWARE_VERSION

You can follow the logs (as known from or ):

vendor/bin/sdTest.sh logs SHOPWARE_VERSION -f

To connect to the mysql server use as host with port (default: 10331) configured in .

Less frequently needed

To force a rebuild of the containers you can run:

vendor/bin/sdTest.sh build --no-cache

To be sure that you have the latest version of the (base) containers you can force pulling newer images:

vendor/bin/sdTest.sh build --no-cache --pull

To be sure to use the newest containers (not only build based containers):

vendor/bin/sdTest.sh pull SHOPWARE_VERSION

To destroy and restart your containers in one step without rebuilding images run:

vendor/bin/sdTest.sh reset SHOPWARE_VERSION

Executing a command in the testing environment

Commands (for example to clear the cache or to run the setup) can be executed inside the container. You must give a version of php and shopware to execute command on, e.g. 74 for PHP 7.4 container and 57 for Shopware 5.7.x:

vendor/bin/sdRunInTest.sh 74 57 ./app/install.sh

If you want to you can even get a shell inside the PHP container:

vendor/bin/sdRunInTest.sh 74 57 /bin/bash

All versions of sd-test-environment-shopware with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package solutiondrive/sd-test-environment-shopware contains the following files

Loading the files please wait ....