Skip to content

Commit

Permalink
Merge pull request #1 from biig-io/feature/prepare-release-v2
Browse files Browse the repository at this point in the history
Prepare v2 release
  • Loading branch information
babeou authored Dec 12, 2017
2 parents 3629574 + 25fb3aa commit 267bf6b
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 25 deletions.
15 changes: 5 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
language: php

php:
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2

cache:
directories:
Expand All @@ -17,21 +16,17 @@ cache:

matrix:
include:
- php: 5.4
env: 'COMPOSER_FLAGS="--prefer-lowest --prefer-stable"'
- php: 5.5
env: 'COMPOSER_FLAGS="--prefer-lowest --prefer-stable"'
- php: 5.6
env: 'COMPOSER_FLAGS="--prefer-lowest --prefer-stable"'
- php: 7.0
env: 'COMPOSER_FLAGS="--prefer-lowest --prefer-stable"'
- php: 7.1
env: 'COMPOSER_FLAGS="--prefer-lowest --prefer-stable"'

# branches:
# only:
# - master

branches:
only:
- master
- 1.x

before_script:
- composer update --prefer-source $COMPOSER_FLAGS
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Changelog
All notable changes to this project will be documented in this file.

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

## [Unreleased]

## [2.0.0] - 2017-12-12
### Added
- Add tag `knp_dictionary.factory` for DI services so you can add dictionary factories
- Add tag `knp_dictionary.dictionary` for DI services so you can add dictionary as service
- Add `knp_dictionary.data_collector.dictionary_data_collector` service so you can trace what dictionnary is available
- New factory interface `Knp\DictionaryBundle\Dictionary\Factory`
- New interface `Knp\DictionaryBundle\Dictionary`
- This changelog is also new :)

### Changed
- Some namespace changes for `SimpleDictionary` and `ValueTransformer`
- Add `add` method on `DictionaryRegistry`
- New view in the web profiler of Symfony

### Removed
- `service` and `method` nodes from configuration: dictionnaries are now loaded automatically by factories registered as it with the new tag
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM php:7.2.0-cli-stretch

RUN pecl install xdebug-2.6.0alpha1 && docker-php-ext-enable xdebug
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ fix:
bin/php-cs-fixer --diff -v fix

test:
echo "⚠ You need x-debug to run this test suite."
bin/phpspec run -fpretty
33 changes: 28 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,30 @@ DictionaryBundle

Are you often tired to repeat static choices like gender or civility in your apps ?


## This is a fork

This bundle is a fork. The motivation for forking it is the following:
- Getting a stable release (2.0)
- Adding Symfony 4 compatibility
- Ensure a future maintenance of the project

As today we still hope that the main project will reborn. There is also a lot of work to achieve
to release all unreleased features.

That's why to install this fork you need to add the following lines to your `composer.json` file.

```json
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/biig-io/DictionaryBundle"
}
]
}
```

## Requirements
- Symfony >= 2.8

Expand All @@ -30,9 +54,8 @@ $bundles = array(

You can ping us if need some reviews/comments/help:

- [@AntoineLelaisant](https://github.com/AntoineLelaisant)
- [@PedroTroller](https://github.com/PedroTroller)
- [@Shivoham](https://github.com/Shivoham)
- [@Nek-](https://github.com/Nek-)
- [@babeou](https://github.com/babeou)

## Basic usage
Define dictionaries in your config.yml file:
Expand All @@ -43,7 +66,7 @@ knp_dictionary:
- Foo # your dictionary content
- Bar
- Baz

```
You will be able to retreive it trough the dictionary registry service:
```php
Expand Down Expand Up @@ -172,7 +195,7 @@ The KnpDictionaryBundle comes with a [faker provider](https://github.com/fzanino

### Alice

To register the provider in [nelmio/alice](https://github.com/nelmio/alice), you can follow the [official documentation](https://github.com/nelmio/alice/blob/master/doc/customizing-data-generation.md#add-a-custom-faker-provider-class)
To register the provider in [nelmio/alice](https://github.com/nelmio/alice), you can follow the [official documentation](https://github.com/nelmio/alice/blob/master/doc/customizing-data-generation.md#add-a-custom-faker-provider-class)

or ...

Expand Down
23 changes: 14 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
"name": "Knplabs",
"homepage": "http://knplabs.com"
},
{
"name": "BiiG",
"homepage": "https://www.biig.fr"
},
{
"name": "Shivoham",
"homepage": "https://github.com/Shivoham"
Expand All @@ -21,20 +25,21 @@
"minimum-stability": "stable",
"require": {
"php": ">=5.4",
"symfony/http-kernel": "~2.8 || ~3.0",
"symfony/dependency-injection": "~2.8 || ~3.0",
"symfony/http-foundation": "~2.8 || ~3.0",
"symfony/config": "~2.8 || ~3.0",
"symfony/form": "~2.8 || ~3.0",
"symfony/validator": "~2.8 || ~3.0",
"symfony/http-kernel": "~2.8 || ~3.0 || ~4.0",
"symfony/dependency-injection": "~2.8 || ~3.0 || ~4.0",
"symfony/http-foundation": "~2.8 || ~3.0 || ~4.0",
"symfony/config": "~2.8 || ~3.0 || ~4.0",
"symfony/form": "~2.8 || ~3.0 || ~4.0",
"symfony/validator": "~2.8 || ~3.0 || ~4.0",
"twig/twig": "~1.12|~2.0",
"fzaninotto/faker": "^1.5"
},
"require-dev": {
"bossa/phpspec2-expect": "~1.0",
"henrikbjorn/phpspec-code-coverage": "^2.1",
"bossa/phpspec2-expect": "~2.0",
"henrikbjorn/phpspec-code-coverage": "dev-master",
"phpunit/php-code-coverage": "^5.0|^4.0",
"pedrotroller/php-cs-custom-fixer": "~1.4.0",
"phpspec/phpspec": "~2.5",
"phpspec/phpspec": "~3.0",
"phpspec/prophecy": "~1.6"
},
"config": {
Expand Down
2 changes: 1 addition & 1 deletion phpspec.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
formatter.name: pretty

extensions:
- PhpSpec\Extension\CodeCoverageExtension
PhpSpecCodeCoverage\CodeCoverageExtension: ~

code_coverage:
format:
Expand Down

0 comments on commit 267bf6b

Please sign in to comment.