Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/2.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
greg0ire committed Jan 19, 2019
2 parents 43a9317 + d11546d commit efaf084
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .gitattributes
@@ -1,4 +1,4 @@
.* export-ignore
*.md export-ignore
tests/* export-ignore
docs/* export-ignore
tests export-ignore
docs export-ignore
1 change: 1 addition & 0 deletions .php_cs.dist
Expand Up @@ -42,6 +42,7 @@ $rules = [
'@PHP71Migration' => true,
'@PHP71Migration:risky' => true,
'compact_nullable_typehint' => true,
'void_return' => null,
// To be tested before insertion:
// 'strict_comparison' => true,
// 'strict_param' => true,
Expand Down
4 changes: 4 additions & 0 deletions .travis/before_script_test.sh
@@ -1,3 +1,7 @@
#!/usr/bin/env bash
set -ev

if [ -f before_script_test.local.sh ]
then
./before_script_test.local.sh
fi
18 changes: 18 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -516,6 +516,24 @@ Thank them for contributing. Encourage them if you feel this is going to be long
In short, try to make them want to contribute again. If they are stuck, try to provide them with
code yourself, or ping someone who can help.

## Manual merges

Thanks to dev-kit, stable branches are regularly merged into master branches.
It is great when it works, but often, there will be git conflicts and a human
intervention will be needed. Let us assume we are working on a repository where
the stable branch is 42.x. To do the merge manually, follow these steps:
1. Fetch the latest commits: `git fetch --all`
2. Checkout the master branch, and make sure it is up to date:
`git checkout -B master origin/master`
3. Proceed with the merge: `git merge origin/42.x`
4. Fix the conflicts (if you are doing this, it is because of conflicts,
right?) `git mergetool`
5. Create a merge commit `git commit`
6. Push the result to your fork: `git push fork 42.x`
7. Create a pull request from `fork/42.x` to `origin/42.x`
8. When the PR can be merged, do not merge it. Instead, use
`git push origin 42.x`.

## Releases

### Limitations and requests
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -44,7 +44,7 @@
"sonata-project/doctrine-orm-admin-bundle": "^3.2",
"stof/doctrine-extensions-bundle": "^1.1",
"symfony/framework-bundle": "^3.2.5 || ^4.0",
"symfony/phpunit-bridge": "^4.1"
"symfony/phpunit-bridge": "^4.2"
},
"suggest": {
"doctrine/phpcr-odm": "if you translate odm documents",
Expand Down
20 changes: 18 additions & 2 deletions docs/conf.py
Expand Up @@ -18,6 +18,10 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))

# adding PhpLexer
from sphinx.highlighting import lexers
from pygments.lexers.web import PhpLexer

# -- General configuration -----------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
Expand All @@ -40,8 +44,8 @@
master_doc = 'index'

# General information about the project.
project = u'Sonata ~ TranslationBundle'
copyright = u'2010-2015, Thomas Rabaix'
project = u''
copyright = u'2010-2019, Thomas Rabaix'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -83,9 +87,18 @@
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

# This will be used when using the shorthand notation
highlight_language = 'php'

# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []

# -- Settings for symfony doc extension ---------------------------------------------------

# enable highlighting for PHP code not between ``<?php ... ?>`` by default
lexers['php'] = PhpLexer(startinline=True)
lexers['php-annotations'] = PhpLexer(startinline=True)
lexers['php-standalone'] = PhpLexer(startinline=True)

# -- Options for HTML output ---------------------------------------------------
import sphinx_rtd_theme
Expand Down Expand Up @@ -241,3 +254,6 @@

# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'

# Use PHP syntax highlighting in code examples by default
highlight_language='php'
2 changes: 1 addition & 1 deletion src/Filter/TranslationFieldFilter.php
Expand Up @@ -26,7 +26,7 @@ final class TranslationFieldFilter extends Filter
*/
public function filter(ProxyQueryInterface $queryBuilder, $alias, $field, $data): void
{
if (!$data || !\is_array($data) || !array_key_exists('value', $data)) {
if (!$data || !\is_array($data) || !array_key_exists('value', $data) || null == $data['value']) {
return;
}

Expand Down

0 comments on commit efaf084

Please sign in to comment.