janisbiz/heredoc

A helper for outputting values to PHP heredoc

v1.0.1 2019-05-27 17:23 UTC

This package is auto-updated.

Last update: 2024-04-28 04:57:02 UTC


README

Latest Stable Version codecov Build Status Total Downloads Deps

A helper for outputting values to PHP heredoc

Installing

composer require janisbiz/heredoc

Getting started

These instructions will help you set up this helper, so you can use it. As well, there are provided instructions to run tests for the extension.

Using extension

To use helper:

  • your class should use trait HeredocTrait
  • you should call global function ´heredoc()´

Running tests

There are two ways to run tests:

  1. By using docker containers:
    • Copy .env.dist to .env and adjust defined values for your needs
    • Execute docker-compose up -d --build
    • Execute docker-compose exec php-cli composer install
    • Execute docker-compose exec php-cli vendor/bin/phpunit -c phpunit.xml
  2. By using your local php and mysql database environment:
    • Ensure, that your php version is 5.6+
    • Execute composer install
    • Execute vendor/bin/phpunit -c phpunit.xml