PHPackages                             gfreeau/custom-validation-path-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. gfreeau/custom-validation-path-bundle

ActiveSymfony-bundle

gfreeau/custom-validation-path-bundle
=====================================

This Symfony2 bundle provides a method for adding custom validation directories

11861PHP

Since Oct 4Pushed 9y ago1 watchersCompare

[ Source](https://github.com/gfreeau/GfreeauCustomValidationPathBundle)[ Packagist](https://packagist.org/packages/gfreeau/custom-validation-path-bundle)[ RSS](/packages/gfreeau-custom-validation-path-bundle/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

GfreeauCustomValidationPathBundle
=================================

[](#gfreeaucustomvalidationpathbundle)

This symfony2 bundle is still under development, it allows you to define custom directories for storing validation files.

This is useful if you store entities and models outside of bundles. Doctrine and JMSSerializer already allow this, but by default symfony only loads xml and yml validation configuration from within bundles.

Here is an example project structure where our non-framework code does not exist in bundles:

```
src
    Vendor
        Bundle
            AcmeBlogBundle
        Service
        Entity
        Resources
            config
                doctrine
                serializer
                validation

```

Here is an example config:

```
gfreeau_custom_validation_path:
    directories:
        -
            path: %kernel.root_dir%/../src/Vendor/Resources/config/validation
            type: xml
            recursive: true
        -
            path: %kernel.root_dir%/../src/Vendor/Resources/config/validation
            type: yml
            recursive: false

```

You will know if your validation files have been included by running:

```
./app/console container:debug --format=json --parameters

```

look for the key `validator.mapping.loader.xml_files_loader.mapping_files` or `validator.mapping.loader.yml_files_loader.mapping_files`

Here is the example config for orm and serializer to go along with custom validation directories:

```
doctrine:
    orm:
        auto_mapping: true
        mappings:
            mymodel:
                type: xml
                dir: %kernel.root_dir%/../src/Vendor/Resources/config/doctrine
                prefix: Vendor\Entity
                alias: VendorEntity
                is_bundle: false

jms_serializer:
    metadata:
        directories:
            myvendor:
                namespace_prefix: "Vendor\\"
                path: %kernel.root_dir%/../src/Vendor/Resources/config/serializer

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c3cd1d6e23ffc4682338abb6d5834b483f93702553cafb629b5a3542bd256add?d=identicon)[gfreeau](/maintainers/gfreeau)

---

Top Contributors

[![gfreeau](https://avatars.githubusercontent.com/u/1403669?v=4)](https://github.com/gfreeau "gfreeau (12 commits)")[![qtsd](https://avatars.githubusercontent.com/u/10633476?v=4)](https://github.com/qtsd "qtsd (1 commits)")

### Embed Badge

![Health badge](/badges/gfreeau-custom-validation-path-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/gfreeau-custom-validation-path-bundle/health.svg)](https://phpackages.com/packages/gfreeau-custom-validation-path-bundle)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
