2017 © Pedro PelĂĄez
 

symfony-bundle dev-bundle

Throws exception on translation not found and invalid doctrine schema.

image

steevanb/dev-bundle

Throws exception on translation not found and invalid doctrine schema.

  • Tuesday, August 8, 2017
  • by kujaff
  • Repository
  • 1 Watchers
  • 0 Stars
  • 564 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 14 Versions
  • 1 % Grown

The README.md

version symfony symfony Lines Total Downloads Scrutinizer Code Quality, (*1)

dev-bundle

Bundle for dev environment, to help you find missing translations, validate your Doctrine schema automatically and show what is loaded (classes, services etc)., (*2)

For Symfony ^2.6 and ^3.0, see steevan/dev-bundle ^4.1., (*3)

Changelog, (*4)

Installation

composer require steevanb/dev-bundle ^5.0.1

Or add it manually, and then execute composer update steevanb/dev-bundle :, (*5)

# composer.json
{
    "require": {
        "steevanb/dev-bundle": "^5.0.1"
    }
}

Add bundle to your AppKernel :, (*6)

# app/AppKernel.php
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        if ($this->getEnvironment() == 'dev') {
            $bundles[] = new steevanb\DevBundle\DevBundle();
        }
    }
}

Configuration

# app/config/config.yml
dev:
    # throws steevanb\DevBundle\Exception\TranslationsNotFoundException on translations not found
    translation_not_found:
        enabled: [TRUE|false]
        # allow Translator to search your translation in fallbacks, or not
        allow_fallbacks: [true|FALSE]
    # validate Doctrine schema
    validate_schema:
        enabled: [TRUE|false]
        disabled_urls:
            - /_wdt
            - /_profiler/
            - /_errors
        event: [KERNEL.REQUEST|kernel.response]
        excludes:
            - Foo\Bar\Entity
            - Foo\Bar\Entity#property
        bundles:
            # enable scan of Resources/config/doctrine dir of bundles
            enabled: [TRUE|false]
            # bundles to scan. if empty or not specified, will add all installed bundles
            bundles:
                - FooBundle
                - BarBundle

Translation not found exception

Throws steevanb\Exception\TranslationsNotFoundException at kernel.response event when at least one translation is not found., (*7)

All translations not found throws this exception, especially when fallbacks are used., (*8)

For example, if you have a messages.fr.yml in your bundle, and you try to translate a string with fr_FR locale, exception will be throwned. You can allow this with translation.allow_fallbacks configuration., (*9)

Validate Doctrine mapping

Same as calling doctrine:schema:validate on each request, with a cache to not recall it if nothing has changed., (*10)

Throws steevanb\Exception\InvalidMappingException when mapping informations are invalid., (*11)

Doctrine schema validation will be executed on each request (_kernel.request_ or kernel.response event, depends on configuration), only for main request., (*12)

You can exclude entities or properties validation, by adding values in dev.validate_schema.excludes configuration., (*13)

If value is a fully classified entity, all validation errors on this entity will be ignored., (*14)

If value if a fully qualifier entity, plus a property (ex : Foo\Bar\Entity#property), only validation errors on this property will be ignored., (*15)

List loaded classes, services etc

Add Symfony WebProfilter panel, with informations about what is loaded : classes, traits, interfaces, services, container parameters, etc., (*16)

Loaded, (*17)

The Versions

08/08 2017

dev-master

9999999-dev

Throws exception on translation not found and invalid doctrine schema.

  Sources   Download

MIT

The Requires

 

08/08 2017

4.1.0

4.1.0.0

Throws exception on translation not found and invalid doctrine schema.

  Sources   Download

MIT

The Requires

 

27/09 2016

4.0.0

4.0.0.0

Throws exception on translation not found and invalid doctrine schema.

  Sources   Download

MIT

The Requires

 

17/06 2016

3.0.0

3.0.0.0

Throws exception on translation not found and invalid doctrine schema.

  Sources   Download

MIT

The Requires

 

11/06 2016

2.1.1

2.1.1.0

Throws exception on translation not found and invalid doctrine schema.

  Sources   Download

MIT

The Requires

 

19/01 2016

2.1.0

2.1.0.0

Throws exception on translation not found, deprecated logs, etc

  Sources   Download

MIT

The Requires

 

09/12 2015

2.0.0

2.0.0.0

Throws exception on translation not found, deprecated logs, etc

  Sources   Download

MIT

The Requires

 

04/12 2015

1.1.5

1.1.5.0

Throws exception on translation not found, deprecated logs, etc

  Sources   Download

MIT

The Requires

 

26/10 2015

1.1.4

1.1.4.0

Throws exception on translation not found, deprecated logs, etc

  Sources   Download

MIT

The Requires

 

05/10 2015

1.1.3

1.1.3.0

Throws exception on translation not found, deprecated logs, etc

  Sources   Download

MIT

The Requires

 

02/10 2015

1.1.2

1.1.2.0

Throws exception on translation not found, deprecated logs, etc

  Sources   Download

MIT

The Requires

 

01/10 2015

1.1.1

1.1.1.0

Throws exception on translation not found, deprecated logs, etc

  Sources   Download

MIT

The Requires

 

21/09 2015

1.1.0

1.1.0.0

Throws exception on translation not found, deprecated logs, etc

  Sources   Download

MIT

The Requires

 

21/09 2015

1.0.0

1.0.0.0

Throws exception on translation not found, deprecated logs, etc

  Sources   Download

MIT

The Requires