Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/coverage_report.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Run coverage report and upload it to CodeClimate
name: Coverage
on:
on:
push:
branches: [master]
jobs:
Expand All @@ -19,9 +19,10 @@ jobs:
uses: ramsey/composer-install@v3
with:
composer-options: "--prefer-dist --optimize-autoloader"
- name: Test & publish code coverage
uses: paambaati/codeclimate-action@v8.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
- name: Build the code coverage report
run: composer coverage:clover
- name: Upload code coverage report
uses: qltysh/qlty-action/coverage@v1
with:
coverageCommand: "composer coverage:clover"
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
files: clover.xml
8 changes: 4 additions & 4 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
architecture: 'x64'
python-version: "3.x"
architecture: "x64"
- name: Install dependencies
run: python -m pip install --upgrade pip mkdocs mkdocs-material
- name: Upload artifacts
Expand All @@ -29,7 +29,7 @@ jobs:
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
php-version: "8.3"
coverage: none
- name: Install composer dependencies
uses: ramsey/composer-install@v3
Expand All @@ -45,7 +45,7 @@ jobs:
name: api-artifact
path: _site/api/
deploy_documentation:
needs: [build_documentation,build_api]
needs: [build_documentation, build_api]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
php-versions: ['8.3', '8.4']
symfony-version: ['6.4', '7.1']
php-versions: ["8.3", "8.4"]
symfony-version: ["6.4", "7.1"]
runs-on: ${{ matrix.operating-system }}
steps:
- name: Set autocrlf on windows
Expand Down
96 changes: 96 additions & 0 deletions .qlty/qlty.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# This file was automatically generated by `qlty init`.
# You can modify it to suit your needs.
# We recommend you to commit this file to your repository.
#
# This configuration is used by both Qlty CLI and Qlty Cloud.
#
# Qlty CLI -- Code quality toolkit for developers
# Qlty Cloud -- Fully automated Code Health Platform
#
# Try Qlty Cloud: https://qlty.sh
#
# For a guide to configuration, visit https://qlty.sh/d/config
# Or for a full reference, visit https://qlty.sh/d/qlty-toml
config_version = "0"

exclude_patterns = [
"*_min.*",
"*-min.*",
"*.min.*",
"**/*.d.ts",
"**/.yarn/**",
"**/bower_components/**",
"**/build/**",
"**/cache/**",
"**/config/**",
"**/db/**",
"**/deps/**",
"**/dist/**",
"**/extern/**",
"**/external/**",
"**/generated/**",
"**/Godeps/**",
"**/gradlew/**",
"**/mvnw/**",
"**/node_modules/**",
"**/protos/**",
"**/seed/**",
"**/target/**",
"**/testdata/**",
"**/vendor/**",
"**/assets/**",
]

test_patterns = [
"**/test/**",
"**/tests/**",
"**/spec/**",
"**/*.test.*",
"**/*.spec.*",
"**/*_test.*",
"**/*_spec.*",
"**/test_*.*",
"**/spec_*.*",
]

[smells]
mode = "comment"

[[source]]
name = "default"
default = true

[[plugin]]
name = "golangci-lint"
mode = "comment"

[[plugin]]
name = "markdownlint"
mode = "comment"

[[plugin]]
name = "php-codesniffer"
mode = "comment"

[[plugin]]
name = "php-cs-fixer"

[[plugin]]
name = "prettier"

[[plugin]]
name = "radarlint-php"

[[plugin]]
name = "ripgrep"
mode = "comment"

[[plugin]]
name = "trivy"
drivers = [
"config",
"fs-vuln",
]

[[plugin]]
name = "trufflehog"
36 changes: 30 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,71 @@
# Changelog

All notable changes to `susina/config-builder` project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### [1.1] - 2025-05-22
### [1.1] - 2025-05-28

### Added

- Add `replaces` option to inject an external parameter to resolve. Useful, i.e. to pass
`kernel_dir` or other parameters.
`kernel_dir` or other parameters.
- Add [phpdocumentor](https://phpdoc.org/) to generate the documentation api

### Changed

- Update the documentation

## [1.0.1] - 2024-11-30

### Fixed

- Remove PHP 8.4 deprecations

## [1.0] - 2024-09-16

### Added

- Introduce `susina/param-resolver` library
- Introduce `susina/xml-to-array` library

### Changed

- Bump dependencies
- Update Github Actions
- Update documentation

### Removed

- Remove `.ini` support since it's not suited for complex nested configurations

## [0.4] - 2023-02-16

### Added
- `ConfigBuilder::keepFirstXmlTag` method, to include into the configuration array also the first xml tag

- `ConfigBuilder::keepFirstXmlTag` method, to include into the configuration array also the first xml tag

### Changed
- Introduce [Pest](https://www.pest.com) testing tool. Since Pest is built on top of Phpunit, this change doesn't break backward compatibility

- Introduce [Pest](https://www.pest.com) testing tool. Since Pest is built on top of Phpunit, this change doesn't break backward compatibility

### Fixed
- Fixed Github Actions warning by update our workflows dependencies

- Fixed Github Actions warning by update our workflows dependencies

## [0.3] - 2023-01-07

### Added

- `ConfigBuilder::populateContainer` method, to populate a dependency injection container with the loaded parameters.

## [0.2] - 2021-12-29

### Added
- Support for Symfony 6 libraries

- Support for Symfony 6 libraries

## [0.1] - 2021-12-16

First release: fully functional library.
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
# Configuration Builder

![Tests](https://github.com/susina/config-builder/actions/workflows/test.yml/badge.svg)
[![Maintainability](https://api.codeclimate.com/v1/badges/df031168e25a1206df64/maintainability)](https://codeclimate.com/github/susina/config-builder/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/df031168e25a1206df64/test_coverage)](https://codeclimate.com/github/susina/config-builder/test_coverage)
[![Maintainability](https://qlty.sh/badges/689d9c9a-29ce-4e10-93ea-21ccba522cf3/maintainability.svg)](https://qlty.sh/gh/susina/projects/config-builder)
[![Maintainability](https://qlty.sh/badges/689d9c9a-29ce-4e10-93ea-21ccba522cf3/maintainability.svg)](https://qlty.sh/gh/susina/projects/config-builder)
![GitHub](https://img.shields.io/github/license/susina/config-builder)

Susina Configuration Builder is a library to load parameters, from configuration files, and build configuration objects
or arrays. It's based on [Symfony Config](https://symfony.com/doc/current/components/config.html) and
or arrays. It's based on [Symfony Config](https://symfony.com/doc/current/components/config.html) and
[Propel configuration sub-system](https://github.com/propelorm/Propel2/tree/master/src/Propel/Common/Config).

Supported configuration file formats are:

- __.json__ via PHP json extension
- __.neon__ via [Nette Neon](https://github.com/nette/neon) library
- __.php__
- __.xml__ via PHP SimpleXml, Xml and Dom extensions
- __.yml__ via [Symfony Yaml](https://symfony.com/doc/current/components/yaml.html) component

- **.json** via PHP json extension
- **.neon** via [Nette Neon](https://github.com/nette/neon) library
- **.php**
- **.xml** via PHP SimpleXml, Xml and Dom extensions
- **.yml** via [Symfony Yaml](https://symfony.com/doc/current/components/yaml.html) component

## Installation

Expand All @@ -25,6 +24,7 @@ You can install the library via [composer](http://getcomposer.org):
```bash
composer require susina/config-builder
```

then you should install the library you need to load your preferred configuration file format:

```bash
Expand All @@ -36,7 +36,6 @@ composer require symfony/yaml

See the [documentation site](https://susina.github.io/config-builder).


## Issues

Please, open an issue on [Github repository](https://github.com/susina/config-builder/issues).
Expand All @@ -47,4 +46,4 @@ Fork the repository and submit a pull request. For further information see the [

## Licensing

This library is released under [Apache 2.0 license](LICENSE)
This library is released under [Apache 2.0 license](LICENSE)
Loading