2017 © Pedro Peláez
 

symfony-bundle normalizer-bundle

Normalizer for objects.

image

bowlofsoup/normalizer-bundle

Normalizer for objects.

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 7 Open issues
  • 14 Versions
  • 15 % Grown

The README.md

Bowl Of Soup Normalizer

Build Status codecov PHP Version Symfony Version, (*1)

Installation

composer require bowlofsoup/normalizer-bundle

Add the bundle to your config/bundles.php file, (*2)

BowlOfSoup\NormalizerBundle\BowlOfSoupNormalizerBundle::class => ['all' => true],

Quick feature overview

  • It's a Symfony bundle!
  • Normalizes class properties and methods (public, protected, private)
  • Can Serialize normalized content
  • Works with Symfony and Doctrine as its ORM. Can handle Doctrine proxies
  • Circular reference check: Handles circular reference by detecting it and returning content of the objects getId() method
  • Object caching: If a getId() method is implemented for an object it will cache the normalized object per normalize command
  • Annotation caching, this means speed!
    • The annotations for an object are cached. This means not parsing annotations multiple times for the same object. per flow (per normalize command)
    • In Symfony prod mode, annotations are cached completely (after first run)
  • Symfony translations
    • Indicate domain (translation filename) and locale in annotations
    • Does not support formatting with ICU MessageFormat (yet), so no parameters

The main features are described in the documentation., (*3)

Documentation

Documentation on the usage and all supported options can be found in the wiki., (*4)

  1. What is serialization and normalization?
  2. Installation
  3. Serializing
    1. Serialize annotations
  4. Normalizing
    1. Normalize annotations
  5. Translate a value
    1. Translate annotations

Why use this normalizer and not ...

  • The Bowl Of Soup Normalizer uses an opt-in mechanism by default. You have to indicate which properties must be normalized
  • You can indicate a context group, how is the value to be normalized, in which context?
  • It's designed with speed in mind. Not packed with features for which you don't use half of it
  • It has proven itself in a complex application with 15.000+ daily end users

Development

The following CI tools can be used to check for code quality before pushing code:, (*5)

Rector

Rector can be used to automated code upgrades and refactoring. Try a dry-run first!, (*6)

vendor/bin/rector process --dry-run --no-progress-bar --ansi

PHPStan

PHPStan is a static code analysis tool that focuses on finding errors in the code. Fixing the outcome of PHPStan prevents possible bugs and errors., (*7)

vendor/bin/phpstan

PHPUnit

Speaks for itself, code should be tested. Run with coverage (output = tests/coverage):, (*8)

XDEBUG_MODE=coverage php -dzend_extension=xdebug.so vendor/bin/phpunit 

Or without coverage:, (*9)

vendor/bin/phpunit

Code coverage master:, (*10)

, (*11)

Code style fixer

Have php-cs-fixer automatically fix styling., (*12)

vendor/bin/php-cs-fixer fix

The Versions

20/07 2017

dev-master

9999999-dev

Normalizer for objects.

  Sources   Download

MIT

The Requires

 

The Development Requires

array object representation normalizer

20/07 2017

1.1.x-dev

1.1.9999999.9999999-dev

Normalizer for objects.

  Sources   Download

MIT

The Requires

 

The Development Requires

array object representation normalizer

20/07 2017
20/07 2017

1.0.x-dev

1.0.9999999.9999999-dev

Normalizer for objects.

  Sources   Download

MIT

The Requires

 

The Development Requires

array object representation normalizer

20/07 2017
03/07 2017
29/03 2017

dev-serializer

dev-serializer

Normalizer for objects.

  Sources   Download

MIT

The Requires

 

The Development Requires

array object representation normalizer

29/03 2017
02/02 2017

1.0.4

1.0.4.0

Normalizer for objects.

  Sources   Download

MIT

The Requires

 

The Development Requires

array object representation normalizer

02/02 2017

1.0.3

1.0.3.0

Normalizer for objects.

  Sources   Download

MIT

The Requires

 

The Development Requires

array object representation normalizer

22/11 2016

1.0.2

1.0.2.0

Normalizer for objects.

  Sources   Download

MIT

The Requires

 

The Development Requires

array object representation normalizer

05/11 2016

1.0.1

1.0.1.0

Normalizer for objects.

  Sources   Download

MIT

The Requires

 

The Development Requires

array object representation normalizer

09/09 2016

1.0

1.0.0.0

Normalizer for objects.

  Sources   Download

MIT

The Requires

 

The Development Requires

array object representation normalizer

09/09 2016

1.0.0

1.0.0.0

Normalizer for objects.

  Sources   Download

MIT

The Requires

 

The Development Requires

array object representation normalizer