PHPackages                             zol/fixed-column-width-parser-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. zol/fixed-column-width-parser-bundle

AbandonedLibrary

zol/fixed-column-width-parser-bundle
====================================

Provide Symfony integration for fixed-column-width-parser

0.1.0(11y ago)026MITPHP

Since Jul 9Pushed 11y ago1 watchersCompare

[ Source](https://github.com/t-geindre/fixed-column-width-parser-bundle)[ Packagist](https://packagist.org/packages/zol/fixed-column-width-parser-bundle)[ RSS](/packages/zol-fixed-column-width-parser-bundle/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Fixed column width parser bundle [![Build Status](https://camo.githubusercontent.com/25d1b0858dab8c487559220c00c537781438c3eee4de8a4ce3ac82fd08620fc4/68747470733a2f2f7472617669732d63692e6f72672f742d6765696e6472652f66697865642d636f6c756d6e2d77696474682d7061727365722d62756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/t-geindre/fixed-column-width-parser-bundle)
==============================================================================================================================================================================================================================================================================================================================================================================================

[](#fixed-column-width-parser-bundle-)

Provide Symfony integration for [fixed-column-width-parser library](https://github.com/t-geindre/fixed-column-width-parser).

Installation
------------

[](#installation)

Via [Composer](https://getcomposer.org/) :

```
$ composer install zol/fixed-column-width-parser-bundle
```

Then, enable the bundle in your AppKernel :

```
public function registerBundles()
{
    $bundles = array(
        // [...]
        new Zol\Bundle\FixedColumnWidthParserBundle\ZolFixedColumnWidthParserBundle()
    );

    return $bundles;
}
```

Configuration
-------------

[](#configuration)

Bundle configuration is optionnal. Each defined schema will be read and validated to create a parser service with pre configured schema.

```
zol_fixed_column_width_parser:
    # An array of schemas
    schemas:
        # If it's a directory, bundle will load all YAML files found in this directory
        -  %kernel.root_dir%/../src/Zol/MyBundle/Resources/config/schemas/
        -  %kernel.root_dir%/../src/Zol/OtherBundle/Resources/config/schemas/Item.yml
```

Schema reference
----------------

[](#schema-reference)

At the moment, this bundle only support YAML schema format. This schema reference might be outdated, see [library schema reference](https://github.com/t-geindre/fixed-column-width-parser#schema-reference) for updated informations.

```
# The following key will be used to define the parser service name
# Here, the service name will be : zol.parser.fixed_column_width.item
item:
    # Ignored lines, null if none
    # First line is indexed by 1
    # Optionnal, null by default
    ignore: [1, 8 , 9]

    # Header line, null if missing
    # Optionnal, null by default
    header:
        field-name: length
        field-name: length

    # Define entry schema
    # Required
    entry:
        field-name: length
        field-name: length

    # Use header values as entry field names
    # If true, entry field names will be replaced with header values
    # Optionnal, false by default
    header-as-field-name: false

    # Ignore empty line
    # Optionnal, true by default
    ignore-empty-lines: true

    # Multiple files in one
    # If true, you must define separator
    # Optionnal, default false,
    multiple: false

    # Separator, only used if multiple is true
    # Define files separator
    separator:
        field: length # Separator field
        values: [ 'value', 'value'] # Field values considered as separator
        ignore: true # Ignore separation line
```

Usage
-----

[](#usage)

### Schema validation

[](#schema-validation)

This bundle provide a schema validation service : `zol.schema_validator.fixed_column_width`.

```
$validator = $container->get('zol.schema_validator.fixed_column_width');

// Throw \Zol\Parser\FixedColumnWidth\SchemaValidationException
$validator->validateSchema([], true);

// Return false
$validator->validateSchema([], false);

// Return true
$validator->validateSchema(['entry' => [1]], true);
```

### Parser

[](#parser)

This bundle provide a generic parser service : `zol.parser.fixed_column_width`. But you can also use a pre configured parser service which will be named according to your YAML schema definition : `zol.parser.fixed_column_width.item` for instance.

```
// Generic parser
$genericParser = $container->get('zol.parser.fixed_column_width');
$genericParser->parse('file.dat', ['entry' => [1]]); // return array file content

// Configuration defined parser
$itemParser = $container->get('zol.parser.fixed_column_width.item');
$itemParser->parse('item.dat'); // return array file content
```

Tests
-----

[](#tests)

```
$ ./vendor/bin/atoum
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4331d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fb515089cd636a34989412e0cd5b6b91f0f519807df80de6f7bf12b613f792ce?d=identicon)[t-geindre](/maintainers/t-geindre)

---

Top Contributors

[![dwogsi](https://avatars.githubusercontent.com/u/849612?v=4)](https://github.com/dwogsi "dwogsi (12 commits)")

### Embed Badge

![Health badge](/badges/zol-fixed-column-width-parser-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/zol-fixed-column-width-parser-bundle/health.svg)](https://phpackages.com/packages/zol-fixed-column-width-parser-bundle)
```

###  Alternatives

[ed/blog-bundle

Symfony EDBlogBundle

348.4k](/packages/ed-blog-bundle)[ecentria/ecentria-rest-bundle

Goal of this bundle is to simplify process of creating APIs with Symfony. We use already well-coded libraries, combine them together to simplify process and not to re-invent the wheel. We've chose REST and HATEOS to have unified standards of API requests and responses.

142.4k](/packages/ecentria-ecentria-rest-bundle)

PHPackages © 2026

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