Download the PHP package kaliop/ezloremipsumbundle without Composer

On this page you can find all versions of the php package kaliop/ezloremipsumbundle. 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 ezloremipsumbundle

Kaliop eZ-LoremIpsum Bundle

A bundle for eZPublish5 / eZPlatform dedicated to mass-creation of sample/test content.

How it works, in 30 lines of yaml

    -
        type: loop
        repeat: 5
        steps:
            -
                type: content
                mode: create
                content_type: folder
                parent_location: 2
                attributes:
                    name: "Folder [loop:iteration] - [faker:sentence(3)]"
                references:
                    -
                        attribute: location_id
                        identifier: parent_folder_loc
                        overwrite: true
            -
                type: loop
                repeat: 3
                steps:
                    -
                        type: content
                        mode: create
                        content_type: folder
                        parent_location: reference:parent_folder_loc
                        attributes:
                            name: "Folder [faker:unixTime]"

As you can probably guess from the above, this code will create a total of 20 contents of type 'Folder', nested in 2 levels, with each top-level folder having 3 children. The names of the top-level folders include 3 random latin words each.

Requirements

(all of the above are handled automatically using composer)

Installation

  1. get the bundle via composer

  2. activate it in your Kernel's registerBundles() method

Usage

All this bundle does is to make available to the Kaliop Migration Bundle a new reference resolver, called faker.

This means that in order to create massive amounts of contents, you will just need to set up and run a 'migration'. Migrations are fully documented at: https://github.com/kaliop-uk/ezmigrationbundle/ and https://github.com/kaliop-uk/ezmigrationbundle/tree/master/Resources/doc/DSL

The 'faker' reference resolver is designed generated random pieces of data. It purposes to support all of the features of the Faker library. In no particular order, it can be used to generate:

The full list of supported data is documented at https://fakerphp.github.io/

A more detailed description of the supported syntax is given in the DSL Language description.

Further usage examples can be found in the migration used to run CI tests.

NB there is a known bug when using the image provider and there is a problem downloading an image file from the remote service. The recommended workaround is to use the picture provider instead.

Running tests

The bundle uses PHPUnit to run functional tests.

Running tests in a working eZPublish / eZPlatform installation

To run the tests:

export KERNEL_DIR=app (or 'ezpublish' for ezpublish 5.4/cp setups)
export SYMFONY_ENV=behat (or whatever your environment is)

bin/phpunit --stderr -c vendor/kaliop/ezworkflowenginebundle/phpunit.xml.dist

NB the tests do not mock interaction with the database, but create/modify/delete many types of data in it. As such, there are good chances that running tests will leave stale/broken data. It is recommended to run the tests suite using a dedicated eZPublish installation or at least a dedicated database.

Setting up a dedicated test environment for the bundle

A safer choice to run the tests of the bundle is to set up a dedicated environment, similar to the one used when the test suite is run on GitHub Actions. The advantages are multiple: on one hand you can start with any version of eZPublish you want; on the other you will be more confident that any tests you add or modify will also pass on GitHub. The disadvantages are that you will need Docker and Docker-compose, and that the environment you will use will look quite unlike a standard eZPublish setup! Also, it will take a considerable amount of disk space and time to build.

Steps to set up a dedicated test environment and run the tests in it:

git clone --depth 1 https://github.com/tanoconsulting/euts.git teststack
# if you have a github auth token, it is a good idea to copy it now to teststack/docker/data/.composer/auth.json

# this config sets up a test environment with eZPlatform 2.5 running on php 7.4 / debian bullseye
export TESTSTACK_CONFIG_FILE=Tests/environment/.euts.2.5.env

./teststack/teststack build
./teststack/teststack runtests
./teststack/teststack.sh stop

You can also run a single test case:

./teststack/teststack runtests ./Tests/phpunit/01_CommandsTest.php

Note: this will take some time the 1st time your run it, but it will be quicker on subsequent runs. Note: make sure to have enough disk space available.

In case you want to run manually commands, such as the symfony console:

./teststack/teststack console cache:clear

Or easily get to a database shell prompt:

./teststack/teststack dbconsole

Or command-line shell prompt to the Docker container where tests are run:

./teststack/teststack shell

The tests in the Docker container run using the version of debian/php/eZPlatform kernel specified in the file Tests/environment/.euts.2.5.env, as specified in env var TESTSTACK_CONFIG_FILE. If no value is set for that environment variable, a file named .euts.env is looked for. If no such file is present, some defaults are used, you can check the documentation in ./teststack/README.md to find out what they are. If you want to test against a different version of eZ/php/debian, feel free to:

You can even keep multiple test stacks available in parallel, by using different env files, eg:

Thanks

Many thanks to Crevillo for the suggestion to look at AliceBundle and to FZaninotto for all the heavy lifting

License Latest Stable Version Total Downloads

Build Status Scrutinizer Code Quality Code Coverage


All versions of ezloremipsumbundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
kaliop/ezmigrationbundle Version ^5.1.1 || ^6.0
fakerphp/faker Version ^1.9.1
tecnickcom/tcpdf Version *
symfony/expression-language Version *
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 kaliop/ezloremipsumbundle contains the following files

Loading the files please wait ....