2017 © Pedro Peláez
 

library freezable-value-object

PHP Trait for creating freezable value objects

image

wmde/freezable-value-object

PHP Trait for creating freezable value objects

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 21 % Grown

The README.md

FreezableValueObject

Build Status Scrutinizer Code Quality Latest Stable Version Download count, (*1)

PHP Trait for creating freezable value objects., (*2)

For motivation and considerations, see Missing in PHP7: Value objects, (*3)

Installation

To use the FreezableValueObject library in your project, simply add a dependency on wmde/freezable-value-object to your project's composer.json file. Here is a minimal example of a composer.json file that just defines a dependency on FreezableValueObject 1.x:, (*4)

{
    "require": {
        "wmde/freezable-value-object": "~1.0"
    }
}

Development

For development you need to have Docker and Docker-compose installed. Local PHP and Composer are not needed., (*5)

sudo apt-get install docker docker-compose

Running Composer

To pull in the project dependencies via Composer, run:, (*6)

make composer install

You can run other Composer commands via make run, but at present this does not support argument flags. If you need to execute such a command, you can do so in this format:, (*7)

docker run --rm --interactive --tty --volume $PWD:/app -w /app\
 --volume ~/.composer:/composer --user $(id -u):$(id -g) composer composer install -vvv

Running the CI checks

To run all CI checks, which includes PHPUnit tests, PHPCS style checks and coverage tag validation, run:, (*8)

make

Running the tests

To run just the PHPUnit tests run, (*9)

make test

To run only a subset of PHPUnit tests or otherwise pass flags to PHPUnit, run, (*10)

docker-compose run --rm app ./vendor/bin/phpunit --filter SomeClassNameOrFilter

The Versions

03/02 2018

dev-master

9999999-dev

PHP Trait for creating freezable value objects

  Sources   Download

GPL-2.0+ GPL-2.0-or-later

The Requires

  • php >=7.1

 

The Development Requires