Skip to content

Commit

Permalink
Master dev kit (#204)
Browse files Browse the repository at this point in the history
DevKit updates
  • Loading branch information
ElectricMaxxx authored and dbu committed Oct 23, 2017
1 parent 145993b commit f683e81
Show file tree
Hide file tree
Showing 14 changed files with 245 additions and 36 deletions.
23 changes: 23 additions & 0 deletions .editorconfig
@@ -0,0 +1,23 @@
root = true

[*]
end_of_line = lf
indent_style = space
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true

[*.{yml,twig,php}]
indent_size = 4

[*.{js,json,scss,css}]
indent_size = 2

[.travis.yml]
indent_size = 2

[composer.json]
indent_size = 4

[Makefile]
indent_style = tab
3 changes: 3 additions & 0 deletions .gitattributes
@@ -0,0 +1,3 @@
.* export-ignore
*.md export-ignore
Tests/* export-ignore
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE.md
@@ -0,0 +1,43 @@
<!--
Before you open an issue, make sure this one does not already exist.
Please also read the "guidelines for contributing" link above before posting.
-->

<!--
If you are reporting a bug, please try to fill in the following.
Otherwise remove it.
-->

### Environment

#### Symfony packages

```
$ composer show --latest 'symfony/*'
```

#### Symfony CMF packages

```
$ composer show --latest 'symfony-cmf/*'
```

## Subject

<!--
Give here as many details as possible.
Next sections are for ERRORS only.
-->

## Steps to reproduce

## Expected results

## Actual results

<!--
If it's an error message or piece of code, use code block tags,
and make sure you provide the whole stack trace(s),
not just the first error message you can see.
More details here: https://github.com/symfony-cmf/Routing/blob/master/CONTRIBUTING.md#issues
-->
10 changes: 10 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,10 @@
| Q | A
| ------------- | ---
| Branch? | "master" for new features / the branch of the current release for fixes
| Bug fix? | yes/no
| New feature? | yes/no
| BC breaks? | yes/no
| Deprecations? | yes/no
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
| License | MIT
| Doc PR | reference to the documentation PR, if any
26 changes: 24 additions & 2 deletions .styleci.yml
@@ -1,7 +1,29 @@
#######################################################
# DO NOT EDIT THIS FILE! #
# #
# It's auto-generated by symfony-cmf/dev-kit package. #
#######################################################

############################################################################
# This file is part of the Symfony CMF package. #
# #
# (c) 2011-2017 Symfony CMF #
# #
# For the full copyright and license information, please view the LICENSE #
# file that was distributed with this source code. #
############################################################################


preset: symfony

enabled:
- alpha_ordered_imports
- combine_consecutive_unsets
- short_array_syntax

- newline_after_open_tag
- no_php4_constructor
- no_useless_else
- ordered_use
- strict
- php_unit_construct

disabled: [single_line_class_definition]
53 changes: 38 additions & 15 deletions .travis.yml
@@ -1,45 +1,68 @@
#######################################################
# DO NOT EDIT THIS FILE! #
# #
# It's auto-generated by symfony-cmf/dev-kit package. #
#######################################################

############################################################################
# This file is part of the Symfony CMF package. #
# #
# (c) 2011-2017 Symfony CMF #
# #
# For the full copyright and license information, please view the LICENSE #
# file that was distributed with this source code. #
############################################################################

language: php

php:
- 7.0
- 7.1

sudo: false

cache:
directories:
- .phpunit
- $HOME/.composer/cache/files

env:
matrix:
- SYMFONY_VERSION=3.2.*
matrix: SYMFONY_VERSION=3.4
global:
- SYMFONY_PHPUNIT_DIR=.phpunit
- SYMFONY_PHPUNIT_REMOVE="symfony/yaml"
- SYMFONY_PHPUNIT_VERSION=5.6
- SYMFONY_DEPRECATIONS_HELPER=48
- SYMFONY_PHPUNIT_DIR=.phpunit SYMFONY_PHPUNIT_REMOVE="symfony/yaml" SYMFONY_PHPUNIT_VERSION=5.7
- TEST_INSTALLATION=false

matrix:
include:
- php: 7.1
env: SYMFONY_VERSION=3.3.* DEPS=dev
- php: 5.6
env: SYMFONY_VERSION=2.8.* COMPOSER_FLAGS="--prefer-lowest"
env: SYMFONY_VERSION=3.4.*
- php: 7.1
env: DEPS=dev SYMFONY_VERSION=3.3.*
- php: 5.6
env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_VERSION=2.8.* SYMFONY_DEPRECATIONS_HELPER=weak
- php: 7.0
env: SYMFONY_VERSION=3.1.*
- php: hhvm
dist: trusty
finish_fast: true
- php: 7.0
env: SYMFONY_VERSION=3.2.*

fast_finish: true
allow_failures:
- php: 7.1
env: SYMFONY_VERSION=3.4.*


before_install:
- if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then echo "memory_limit = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi
- phpenv config-rm xdebug.ini || true
- composer self-update
- if [ "$DEPS" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi
- if [ "$SYMFONY_VERSION" != "" ]; then composer require symfony/symfony:${SYMFONY_VERSION} --no-update; fi
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)

install: composer update --prefer-dist $COMPOSER_FLAGS
install: travis_wait composer update --prefer-dist $COMPOSER_FLAGS

script: vendor/bin/simple-phpunit
script:
- if [ "${TEST_INSTALLATION}" == true ]; then make test_installation; else make test; fi

notifications:
irc: "irc.freenode.org#symfony-cmf"
email: "symfony-cmf-devs@googlegroups.com"
2 changes: 2 additions & 0 deletions CHANGELOG.md
@@ -1,6 +1,8 @@
Changelog
=========

* **2017-10-23**: Dropped php hhvm support

2.0.0
-----

Expand Down
32 changes: 32 additions & 0 deletions Makefile
@@ -0,0 +1,32 @@
#######################################################
# DO NOT EDIT THIS FILE! #
# #
# It's auto-generated by symfony-cmf/dev-kit package. #
#######################################################

############################################################################
# This file is part of the Symfony CMF package. #
# #
# (c) 2011-2017 Symfony CMF #
# #
# For the full copyright and license information, please view the LICENSE #
# file that was distributed with this source code. #
############################################################################

TESTING_SCRIPTS_DIR=vendor/symfony-cmf/testing/bin
CONSOLE=${TESTING_SCRIPTS_DIR}/console
VERSION=dev-master
ifdef BRANCH
VERSION=dev-${BRANCH}
endif
PACKAGE=symfony-cmf/routing

list:
@echo 'test: will run all tests'
@echo 'unit_tests: will run unit tests only'



include ${TESTING_SCRIPTS_DIR}/make/unit_tests.mk

test: unit_tests
54 changes: 41 additions & 13 deletions README.md
@@ -1,8 +1,19 @@
# Symfony CMF Routing Component
# Symfony CMF Routing

[![Build Status](https://travis-ci.org/symfony-cmf/routing.svg?branch=master)](https://travis-ci.org/symfony-cmf/routing)
[![Latest Stable Version](https://poser.pugx.org/symfony-cmf/routing/version.png)](https://packagist.org/packages/symfony-cmf/routing)
[![Total Downloads](https://poser.pugx.org/symfony-cmf/routing/d/total.png)](https://packagist.org/packages/symfony-cmf/routing)
[![Latest Stable Version](https://poser.pugx.org/symfony-cmf/routing/v/stable)](https://packagist.org/packages/symfony-cmf/routing)
[![Latest Unstable Version](https://poser.pugx.org/symfony-cmf/routing/v/unstable)](https://packagist.org/packages/symfony-cmf/routing)
[![License](https://poser.pugx.org/symfony-cmf/routing/license)](https://packagist.org/packages/symfony-cmf/routing)

[![Total Downloads](https://poser.pugx.org/symfony-cmf/routing/downloads)](https://packagist.org/packages/symfony-cmf/routing)
[![Monthly Downloads](https://poser.pugx.org/symfony-cmf/routing/d/monthly)](https://packagist.org/packages/symfony-cmf/routing)
[![Daily Downloads](https://poser.pugx.org/symfony-cmf/routing/d/daily)](https://packagist.org/packages/symfony-cmf/routing)

Branch | Travis | Coveralls |
------ | ------ | --------- |
master | [![Build Status][travis_unstable_badge]][travis_unstable_link] | [![Coverage Status][coveralls_unstable_badge]][coveralls_unstable_link] |

This package is part of the [Symfony Content Management Framework (CMF)](http://cmf.symfony.com/) and licensed
under the [MIT License](LICENSE).

The Symfony CMF Routing component extends the Symfony routing component with additional features:

Expand All @@ -17,38 +28,55 @@ For the best integration into the Symfony full stack framework, it is
recommended to use the [RoutingBundle](https://github.com/symfony-cmf/RoutingBundle)
when building Symfony full stack applications.

This library is provided by the [Symfony Content Management Framework (CMF) project](http://cmf.symfony.com/)
and licensed under the [MIT License](LICENSE).


## Requirements

* PHP 5.6 / 7
* The Symfony Routing component (2.8 - 3.\*)
* PHP 5.6 / 7.0 / 7.1
* Symfony 2.8 / 3.1 / 3.2 / 3.3
* See also the `require` section of [composer.json](composer.json)


## Documentation

For the install guide and reference, see:

* [Routing component documentation](http://symfony.com/doc/master/cmf/components/routing/index.html)
* [symfony-cmf/routing Documentation](http://symfony.com/doc/master/cmf/components/routing/index.html)

See also:

* [All Symfony CMF documentation](http://symfony.com/doc/master/cmf/index.html) - complete Symfony CMF reference
* [Symfony CMF Website](http://cmf.symfony.com/) - introduction, live demo, support and community links

## Support

For general support and questions, please use [StackOverflow](http://stackoverflow.com/questions/tagged/symfony-cmf).

## Contributing

Pull requests are welcome. Please see our
[CONTRIBUTING](https://github.com/symfony-cmf/symfony-cmf/blob/master/CONTRIBUTING.md)
guide.

Unit and/or functional tests exist for this component. See the
Unit and/or functional tests exist for this package. See the
[Testing documentation](http://symfony.com/doc/master/cmf/components/testing.html)
for a guide to running the tests.

Thanks to
[everyone who has contributed](https://github.com/symfony-cmf/Routing/contributors) already.
[everyone who has contributed](contributors) already.

## License

This package is available under the [MIT license](src/Resources/meta/LICENSE).

[travis_legacy_badge]: https://travis-ci.org/symfony-cmf/Routing.svg?branch=master
[travis_legacy_link]: https://travis-ci.org/symfony-cmf/Routing
[travis_stable_badge]: https://travis-ci.org/symfony-cmf/Routing.svg?branch=master
[travis_stable_link]: https://travis-ci.org/symfony-cmf/Routing
[travis_unstable_badge]: https://travis-ci.org/symfony-cmf/Routing.svg?branch=master
[travis_unstable_link]: https://travis-ci.org/symfony-cmf/Routing

[coveralls_legacy_badge]: https://coveralls.io/repos/github/symfony-cmf/Routing/badge.svg?branch=master
[coveralls_legacy_link]: https://coveralls.io/github/symfony-cmf/Routing?branch=master
[coveralls_stable_badge]: https://coveralls.io/repos/github/symfony-cmf/Routing/badge.svg?branch=master
[coveralls_stable_link]: https://coveralls.io/github/symfony-cmf/Routing?branch=master
[coveralls_unstable_badge]: https://coveralls.io/repos/github/symfony-cmf/Routing/badge.svg?branch=master
[coveralls_unstable_link]: https://coveralls.io/github/symfony-cmf/Routing?branch=master
6 changes: 3 additions & 3 deletions composer.json
Expand Up @@ -18,12 +18,12 @@
"psr/log": "^1.0"
},
"require-dev": {
"symfony-cmf/testing": "^2.0",
"symfony/phpunit-bridge": "^3.2",
"symfony/dependency-injection": "^2.8|^3.0",
"symfony/config": "^2.8|^3.0",
"symfony/event-dispatcher": "^2.8|^3.0",
"friendsofsymfony/jsrouting-bundle": "^1.1"
"friendsofsymfony/jsrouting-bundle": "^1.1",
"symfony-cmf/testing": "^2.1@dev"
},
"suggest": {
"symfony/event-dispatcher": "DynamicRouter can optionally trigger an event at the start of matching. Minimal version (~2.1)"
Expand All @@ -36,7 +36,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
"dev-master": "2.1-dev"
}
}
}
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Expand Up @@ -7,7 +7,7 @@
>

<testsuites>
<testsuite name="Symfony Cmf Routing Test Suite">
<testsuite name="unit tests">
<directory>./tests</directory>
</testsuite>
</testsuites>
Expand Down
2 changes: 1 addition & 1 deletion src/ContentAwareGenerator.php
Expand Up @@ -315,7 +315,7 @@ protected function unsetLocaleIfNotNeeded(SymfonyRoute $route, array &$parameter
$locale = $this->getLocale($parameters);
if (null !== $locale
&& preg_match('/'.$route->getRequirement('_locale').'/', $locale)
&& $locale == $route->getDefault('_locale')
&& $locale === $route->getDefault('_locale')
) {
$compiledRoute = $route->compile();
if (!in_array('_locale', $compiledRoute->getVariables())) {
Expand Down
23 changes: 23 additions & 0 deletions src/Resources/meta/LICENSE
@@ -0,0 +1,23 @@
Symfony Cmf Routing

The MIT License

Copyright (c) 2011-2017 Symfony CMF

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

0 comments on commit f683e81

Please sign in to comment.