Skip to content

Commit

Permalink
DevKit updates
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI authored and jordisala1991 committed Oct 12, 2017
1 parent 3869601 commit 55d9cae
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 38 deletions.
2 changes: 0 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
-->
I am targeting this branch, because {reason}.

In case of bug fix, `3.x` **MUST** be targeted.

<!--
Specify which issues will be fixed/closed.
Remove it if this is not related.
Expand Down
3 changes: 1 addition & 2 deletions .styleci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
preset: symfony

enabled:
- class_keyword_remove
- combine_consecutive_unsets
- long_array_syntax
- short_array_syntax
- newline_after_open_tag
- no_php4_constructor
- no_useless_else
Expand Down
11 changes: 1 addition & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ branches:
language: php

php:
- '5.3'
- '5.4'
- '5.5'
- '5.6'
- '7.0'
- '7.1'
- nightly

Expand Down Expand Up @@ -44,12 +39,8 @@ matrix:
env: TARGET=docs
- php: '7.1'
env: TARGET=lint
- php: '5.3'
env: COMPOSER_FLAGS="--prefer-lowest"
- php: '7.1'
env: SYMFONY=2.3.*
- php: '7.1'
env: SYMFONY=2.7.*
env: COMPOSER_FLAGS="--prefer-lowest"
- php: '7.1'
env: SYMFONY=2.8.*
- php: '7.1'
Expand Down
6 changes: 0 additions & 6 deletions .travis/before_install_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ if [ "${TRAVIS_PHP_VERSION}" != "hhvm" ]; then
TRAVIS_INI_FILE="$PHP_INI_DIR/travis.ini"
echo "memory_limit=3072M" >> "$TRAVIS_INI_FILE"

if [ "$TRAVIS_PHP_VERSION" '<' '5.4' ]; then
XDEBUG_INI_FILE="$PHP_INI_DIR/xdebug.ini"
if [ -f "$XDEBUG_INI_FILE" ]; then
mv "$XDEBUG_INI_FILE" /tmp
fi
fi

if [ "$TRAVIS_PHP_VERSION" '<' '7.0' ]; then
echo "extension=mongo.so" >> "$TRAVIS_INI_FILE"
Expand Down
7 changes: 0 additions & 7 deletions .travis/before_script_test.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
#!/usr/bin/env bash
set -ev

if [ "$TRAVIS_PHP_VERSION" != "hhvm" ] && [ "$TRAVIS_PHP_VERSION" '<' '5.4' ]; then
PHP_INI_DIR="$HOME/.phpenv/versions/$(phpenv version-name)/etc/conf.d/"
XDEBUG_INI_FILE="/tmp/xdebug.ini"
if [ -f "$XDEBUG_INI_FILE" ]; then
mv "$XDEBUG_INI_FILE" "$PHP_INI_DIR"
fi
fi
39 changes: 33 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,20 +191,15 @@ Here is a short table resuming on which you have to start:
Kind of modification | Backward Compatible (BC) | Type of release | Branch to target | Label |
-------------------- | ------------------------ | --------------- | ----------------------- | ----- |
Bug fixes | Yes | Patch | `3.x` | |
Bug fixes | Not on legacy | Patch | `3.x` | |
Bug fixes | No (Only if no choice) | Major | `master` | |
Feature | Yes | Minor | `3.x` | |
Feature | No (Only if no choice) | Major | `master` | |
Deprecation | Yes (Have to) | Minor | `3.x` | |
Deprecation removal | No (Can't be) | Major | `master` | |

Notes:
* Branch `3.x` is the branch of the **latest stable** patch releases and
has to be used for Backward Compatible bug fixes only.
* Branch `3.x` is the branch of the **latest stable** minor release and
has to be used for Backward compatible enhancement PRs.
**No bug fix will be accepted here**, except if the bug fix concerns `3.x` and **only this one**.
Bug fixes merged on `3.x` will be ported on other branches by fallback merging.
has to be used for Backward compatible PRs.
* If you PR is not **Backward Compatible** but can be, it **must** be:
* Changing a function/method signature? Prefer create a new one and deprecate the old one.
* Code deletion? Don't. Please deprecate it instead.
Expand Down Expand Up @@ -276,6 +271,25 @@ or postponed to next major release if BC is not possible.

If you are not sure what should be done, don't hesitate to open an issue about your PR project.

##### Dependency changes

If you want to change some dependencies, here are the rules:

- Don't add support for a version lower than the current one.
- Don't change the highest supported version to a lower one.
- Lower version dropping is accepted as a Backward Compatible change according to [semver][semver_dependencies_update],
but some extra rules must be respected here:
- PHP versions that are under the [green zone][php_supported_versions] (actively maintained) **MUST NO** be dropped, even on master.
- If it's a Symfony package, at least the last LTS version **MUST** be supported, even on master.
- Generally, don't drop dependency version it it doesn't have a big impact on the code.

##### Legacy branches

Legacy branches are **NOT** supported at all. Any submitted Pull Request will be immediately closed.

Core team members *may* cherry-pick some fixes from the stable branch to the legacy one if it's really needed
and if the legacy one is not too old (~less than one month).

#### The commit message

Sonata is a big project with many contributors, and a big part of the job is
Expand Down Expand Up @@ -421,6 +435,17 @@ use the "Rebase and merge" feature.
And finally, use your common sense : if you see a PR about a typo,
or if there is a situation (faulty commit, revert needed) maybe you can merge it directly.

#### Dependencies version dropping

Do not merge any merge request dropping a dependency version support.
To achieve that, mark them as `RTM`, and mention then on Slack when asking for a release.

This rule should be applied for these reasons:

- Even if it's semver compatible, we don't maintain minor branches.
So it's preferable to give priority to bugfixes over version-dropping PRs.
- Some dependencies need a dev-kit update. By the way, you can make a PR on dev-kit and link it to your own.

### Be nice to the contributor

Thank them for contributing. Encourage them if you feel this is going to be long.
Expand All @@ -430,3 +455,5 @@ code yourself, or ping someone who can help.
[sphinx_install]: http://www.sphinx-doc.org/en/stable/
[pip_install]: https://pip.pypa.io/en/stable/installing/
[sf_docs_standards]: https://symfony.com/doc/current/contributing/documentation/standards.html
[semver_dependencies_update]: http://semver.org/#what-should-i-do-if-i-update-my-own-dependencies-without-changing-the-public-api
[php_supported_versions]: http://php.net/supported-versions.php
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Symfony SonataMediaBundle

Branch | Travis | Coveralls |
------ | ------ | --------- |
3.x | [![Build Status][travis_legacy_badge]][travis_legacy_link] | [![Coverage Status][coveralls_legacy_badge]][coveralls_legacy_link] |
3.x | [![Build Status][travis_stable_badge]][travis_stable_link] | [![Coverage Status][coveralls_stable_badge]][coveralls_stable_link] |
master | [![Build Status][travis_unstable_badge]][travis_unstable_link] | [![Coverage Status][coveralls_unstable_badge]][coveralls_unstable_link] |

Expand All @@ -31,15 +30,11 @@ If you think you found a bug or you have a feature idea to propose, feel free to

This package is available under the [MIT license](LICENSE).

[travis_legacy_badge]: https://travis-ci.org/sonata-project/SonataMediaBundle.svg?branch=3.x
[travis_legacy_link]: https://travis-ci.org/sonata-project/SonataMediaBundle
[travis_stable_badge]: https://travis-ci.org/sonata-project/SonataMediaBundle.svg?branch=3.x
[travis_stable_link]: https://travis-ci.org/sonata-project/SonataMediaBundle
[travis_unstable_badge]: https://travis-ci.org/sonata-project/SonataMediaBundle.svg?branch=master
[travis_unstable_link]: https://travis-ci.org/sonata-project/SonataMediaBundle

[coveralls_legacy_badge]: https://coveralls.io/repos/github/sonata-project/SonataMediaBundle/badge.svg?branch=3.x
[coveralls_legacy_link]: https://coveralls.io/github/sonata-project/SonataMediaBundle?branch=3.x
[coveralls_stable_badge]: https://coveralls.io/repos/github/sonata-project/SonataMediaBundle/badge.svg?branch=3.x
[coveralls_stable_link]: https://coveralls.io/github/sonata-project/SonataMediaBundle?branch=3.x
[coveralls_unstable_badge]: https://coveralls.io/repos/github/sonata-project/SonataMediaBundle/badge.svg?branch=master
Expand Down

0 comments on commit 55d9cae

Please sign in to comment.