Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/all defaults #1

Open
wants to merge 118 commits into
base: feature/all-defaults
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
fd2e1a5
Fix for new way of handling scheme in Symfony 3.0
tobias-93 Jul 2, 2016
8e01507
Merge pull request #254 from tobias-93/fix-symfony3
GuilhemN Aug 9, 2017
1f0d91c
Fix tests
GuilhemN Aug 9, 2017
c2d83e1
Fix js test suite
willdurand Apr 21, 2016
71b915c
Drop hhvm support
GuilhemN Aug 9, 2017
f8d65b9
Reduce number of tests
GuilhemN Aug 9, 2017
f3c71a4
Bump dependencies
GuilhemN Aug 9, 2017
30c08e7
Merge pull request #285 from FriendsOfSymfony/tests
GuilhemN Aug 9, 2017
0090956
Merge branch '1.x'
GuilhemN Aug 9, 2017
79bfd64
Fix for new way of handling scheme in Symfony 3.0
tobias-93 Jul 2, 2016
f91e652
Merge pull request #286 from tobias-93/fix-symfony3-1.x
GuilhemN Aug 9, 2017
fc6562e
Merge branch '1.x'
GuilhemN Aug 9, 2017
11424b4
Fix regression introduced by fix for Symfony 3, check for undefined s…
tobias-93 Aug 10, 2017
65cae87
Merge branch '1.x'
willdurand Aug 10, 2017
27d424e
Update composer branch alias
guilliamxavier Aug 25, 2017
5c098e1
Protection against rosetta flash attacks
Jul 15, 2015
0f44e3d
[insight] Fix "A route should always have a valid HTTP method"
Minishlink Aug 28, 2015
49c1069
Fix prefix based on locale
akovalyov Oct 27, 2016
c0e600b
Merge branch '1.x'
tobias-93 Aug 25, 2017
9b6bd36
Fix tests
tobias-93 Nov 8, 2017
1c8b3e4
Merge branch '1.x'
tobias-93 Nov 8, 2017
100b8bf
Fix tests
tobias-93 Nov 8, 2017
0be0c79
Merge branch '1.x'
tobias-93 Nov 8, 2017
70ed446
Prepare 2.0 release
tobias-93 Nov 8, 2017
4068ac9
Update documentation about Symfony 3 command (#273)
DRaineri Nov 18, 2017
5c011e6
JSON dump (#302), add format option
Nov 18, 2017
a072d48
Refs #270, allow denormalization of empty array
tobias-93 Nov 29, 2017
9334e8f
Symfony 4 support (#300)
weaverryan Dec 13, 2017
e6be9fb
Prepare 2.1.0 release
tobias-93 Dec 13, 2017
3719b78
Fix command service visibility for compatibility with SF <4
tobias-93 Dec 13, 2017
1811298
Prepare 2.1.1 release
tobias-93 Dec 13, 2017
2e87528
Add Gitter badge
tobias-93 Dec 17, 2017
6aa4356
JavaScript refactoring (#303)
Feb 7, 2018
0f74f4f
Use assertCount (#305)
carusogabriel Feb 7, 2018
5f2f625
Updated the docs to dump routes into "public" directory in Flex (#310)
EliuTimana Feb 12, 2018
6376aac
Fix "Parse error. IE8 (and below) will parse trailing commas in array…
BoShurik Feb 22, 2018
a388a28
Merge pull request #313 from BoShurik/fix-trailing-commas
stof Feb 22, 2018
21eafab
Add HTTP non standard port support for route with specific host
chandon Jan 26, 2015
13708a0
Gulp sources
emulienfou Apr 26, 2018
f61c519
Fixing JS, missing call to `setPortExtension()`
emulienfou Apr 26, 2018
254f896
Fixing test failure
emulienfou Apr 27, 2018
aff914d
Add default value to absolute param (#308)
aminebenhariz Jun 10, 2018
cbe7ba6
Check whether a request has a session to prevent deprecation notice
Jun 10, 2018
5972e15
Merge branch 'master' into master
emulienfou Jun 11, 2018
80ff420
Update code to undefined `portextension`
Jun 20, 2018
793bcdd
Fixing code, adding missing colon separator
Jun 20, 2018
9677c2f
Adding `portextension` tests
Jun 20, 2018
42fd6a7
Update sources and gulped version
Jun 20, 2018
5e24c18
Fixing issue reported by @dmaicher in: https://github.com/FriendsOfSy…
Jul 30, 2018
59acf34
Fixing issue about `portextension`.
Aug 1, 2018
1d1becb
Fixing condition
Aug 1, 2018
18a9219
Renaming `portExtension` to `port`
Aug 3, 2018
2ccdbb5
Remove deprecated PHP `5.3` to `5.6`
emulienfou Aug 7, 2018
fce90c6
Merge pull request #320 from emulienfou/master
lsmith77 Sep 29, 2018
e682b9d
Correct require of fos_js_routes.json
Blancowicz Oct 19, 2018
c8dbdc7
Update .travis.yml
andreybolonin Oct 27, 2018
b3227f7
Fix Travis PHP 7.3 testing
tobias-93 Nov 28, 2018
07d4210
Fix deprecation for Symfony 4.2
tobias-93 Nov 28, 2018
c91edcf
Merge pull request #340 from andreybolonin/patch-1
tobias-93 Nov 28, 2018
6e6137e
Prepare 2.2.2 release
tobias-93 Nov 28, 2018
40711b0
Added `Router.setRoutingData` to typescript definition
zerkms Jul 5, 2018
5eb48fc
Merge pull request #331 from zerkms/ISSUE-330_setRoutingData_TS
tobias-93 Nov 28, 2018
be6c7ec
Prepare 2.2.2 release
tobias-93 Nov 28, 2018
80fae19
Exclude tests from classmap
samnela Dec 27, 2018
ce74151
expose domains feature
tugrul Jan 28, 2019
34f7c6c
Merge pull request #347 from tugrul/expose_domains
tobias-93 Feb 3, 2019
8955bbc
Merge pull request #336 from OscarBNO/patch-1
tobias-93 Feb 3, 2019
4d06153
Merge pull request #343 from samnela/excluded-from-classmap
tobias-93 Feb 3, 2019
80999fd
Add routing-sf4.xml to remove Symfony >4.1 deprecation
tobias-93 Feb 3, 2019
c24d182
Prepare 2.3.0 release
tobias-93 Feb 3, 2019
edb3075
Update installation.rst
beamop Feb 6, 2019
552c00c
Merge pull request #348 from beamop/patch-1
tobias-93 Feb 6, 2019
eb1b80a
fix regex pattern
tugrul Feb 11, 2019
bf86a2c
Inform about JMSI18nRoutingBundle compatibility
benjamintoussaint Feb 15, 2019
6c08487
Merge pull request #350 from tugrul/expose_domains
tobias-93 Jun 8, 2019
f6c9ee6
Prepare 2.3.1 release
tobias-93 Jun 17, 2019
b654bf6
adapt for symfony 4.1 i18n routes
alexanza Oct 10, 2018
b9451d7
Merge pull request #334 from alexanza/symfony-4.1-i18n
tobias-93 Aug 10, 2019
6220f4f
Merge pull request #352 from benjamintoussaint/patch-1
tobias-93 Aug 10, 2019
e42ed45
Prepare 2.4.0 release
tobias-93 Aug 10, 2019
3bf453f
add port to absolute url generation
Sep 24, 2019
dcfde60
Bypass cache for exposed routes in debug mode
nesk Sep 26, 2019
5dfca90
Add support for Symfony 5, drop support for PHP5, drop support for Sy…
Nov 28, 2019
01a4684
Merge pull request #366 from rachel-fizz/symfony-5
tobias-93 Dec 1, 2019
47554a9
Merge pull request #361 from rakelley/absolute-urls-should-include-port
tobias-93 Dec 1, 2019
6793326
Merge pull request #362 from nesk/patch-1
tobias-93 Dec 1, 2019
4c6eb91
Prepare 2.5.0 release
tobias-93 Dec 1, 2019
85ce28a
Fix root dir deprecation in Symfony 5
tobias-93 Dec 2, 2019
c926956
Add PHP 7.4 to Travis tests
tobias-93 Dec 2, 2019
cb5c7ac
Fix wrong implode argument order
tobias-93 Dec 2, 2019
52503b7
Merge pull request #369 from FriendsOfSymfony/fix-root-dir-deprecation
tobias-93 Dec 2, 2019
81cf14b
Update CHANGELOG.md
tobias-93 Dec 2, 2019
00ccca3
Upgrade gulp to version 4
Jan 10, 2020
0fcdc2e
Merge pull request #372 from Ousret/upgrade-gulp
tobias-93 Jan 12, 2020
3c70635
Bugfix when baseurl is missing or empty in json (#371)
Ousret Jan 12, 2020
ce486b6
Prepare 2.5.2 release
tobias-93 Jan 12, 2020
a826e03
Revert "Bugfix when baseurl is missing or empty in json (#371)" (#374)
tobias-93 Jan 13, 2020
165b3f4
Prepare 2.5.3 release
tobias-93 Jan 13, 2020
c16a9a6
Fix duplicated port in absolute path (#381)
dew326 Apr 15, 2020
7dfd216
Prepare 2.5.4 release
tobias-93 Apr 15, 2020
d9aecdc
Fixed issue with creating absolute instead of relative path (#391)
dew326 May 20, 2020
7742a05
Fix URL encoding to mimic Symfony URL Generator (#387)
ajgarlag May 20, 2020
aa41885
Fix typos (#388)
pgrimaud May 20, 2020
9deaf91
Prepare 2.6.0 release
tobias-93 May 20, 2020
0f9126b
Add support for php 8.
derrabus Nov 16, 2020
19a9f40
Merge pull request #399 from derrabus/improvement/php-8
lsmith77 Nov 19, 2020
0caad0d
Fix branch alias.
derrabus Nov 20, 2020
d566005
Merge pull request #400 from derrabus/patch-1
tobias-93 Nov 20, 2020
ca27239
expose false route option test
tugrul Apr 4, 2021
6b29b97
route expose false option
tugrul Apr 4, 2021
d446b38
Fixed dump using domains
tikoflano Aug 24, 2021
bba27df
Fix docs link & format docs for correct display on Github
jmsche Aug 26, 2021
5cd9c7b
replace Travis with GitHub actions and bump dependencies (#414)
Chris53897 Dec 14, 2021
a1f194d
Merge pull request #412 from jmsche/docs
tobias-93 Dec 14, 2021
86e2b61
Merge pull request #410 from tikoflano/patch-1
tobias-93 Dec 14, 2021
6c9ce16
Merge pull request #404 from tugrul/route_expose_false
tobias-93 Dec 15, 2021
c978fab
Prepare 2.8.0 release
Dec 15, 2021
5bc7135
get all defaults for routes, even if they are not defined as variable
Feb 13, 2023
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
97 changes: 97 additions & 0 deletions .github/workflows/code_checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# .github/workflows/code_checks.yaml
name: Code_Checks

on: ["push", "pull_request"]

jobs:
js-tests:
name: "JS Tests"
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install JS dependencies
run: |
cd Resources && npm install

- name: Run JS tests
run: |
cd Resources && npm run test
phpunit:
name: "PHP ${{ matrix.php }} + ${{ matrix.dependencies }} dependencies + Symfony ${{ matrix.symfony }}"
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
php: ['7.1', '7.2', '7.3', '7.4', '8.0']
dependencies: [highest]
symfony: ['*']
include:
# Minimum supported dependencies with the oldest supported PHP version
- php: '7.1'
dependencies: lowest
symfony: '*'

# Minimum supported dependencies with the latest supported PHP version
- php: '8.0'
dependencies: lowest
symfony: '*'

- php: '8.0'
dependencies: highest
symfony: '*'

# Test each supported Symfony version with lowest supported PHP version
- php: '7.1'
dependencies: highest
symfony: '3.4.*'

- php: '7.1'
dependencies: highest
symfony: '4.4.*'

- php: '7.2'
dependencies: highest
symfony: '5.4.*'

- php: '7.3'
dependencies: highest
symfony: '5.4.*'

- php: '7.4'
dependencies: highest
symfony: '5.4.*'
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}

- name: Require Symfony version
if: matrix.symfony != '*'
run: |
composer global require --no-interaction --no-progress symfony/flex:^1.11
composer config extra.symfony.require ${{ matrix.symfony }}

- name: Update project dependencies
uses: ramsey/composer-install@v1
with:
dependency-versions: ${{ matrix.dependencies }}

- name: Cache PHPUnit
uses: actions/cache@v2
with:
path: vendor/bin/.phpunit
key: ${{ runner.os }}-phpunit-${{ matrix.php }}

- name: Install PHPUnit
run: vendor/bin/simple-phpunit install

- name: Run PHPUnit tests
env:
SYMFONY_DEPRECATIONS_HELPER: max[self]=0
run: vendor/bin/simple-phpunit -v
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
/composer.phar
/vendor/
/node_modules/
/.phpunit/
/.phpunit.result.cache
40 changes: 0 additions & 40 deletions .travis.yml

This file was deleted.

72 changes: 72 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Changelog

## v2.8.0 - 2021-12-15
- Fix expose: false behavior ([#404](https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/pull/404))
- Fix dump using domains ([#410](https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/pull/410))
- Fix docs links ([#412](https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/pull/412))
- Replace Travis with Github actions ([#414](https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/pull/414))

## v2.7.0 - 2020-11-22
- Add support for PHP 8 ([#399](https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/pull/399))

## v2.6.0 - 2020-05-20
- [BC break] Fix URL encoding to mimic Symfony URL Generator (this might change behavior for special characters, it should be in line with Symfony Router though) ([#387](https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/pull/387))
- Fixed issue with creating absolute instead of relative path on hosts with differing ports ([#391](https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/pull/391))

## v2.5.4 - 2020-04-15
- Fix duplicated port in absolute path ([#381](https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/pull/381))

## v2.5.3 - 2020-01-13
- Rervert fall back to current domain when baseurl is missing or empty in json ([#374](https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/pull/374))

## v2.5.2 - 2020-01-12
- Fall back to current domain when baseurl is missing or empty in json ([#371](https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/pull/371))
- Upgrade gulp to version 4 ([#372](https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/pull/372))

## v2.5.1 - 2019-12-02
- [BC break] Fix root dir deprecation and fix PHP 7.4 deprecation (drops Symfony < 3.3 support) ([#369](https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/pull/369))

## v2.5.0 - 2019-12-01
- [BC break] Add support for Symfony 5, drop support for PHP5, drop support for Symfony 2 ([#366](https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/pull/366))
- Fix absolute url generation including ports ([#361](https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/pull/361))
- Fix cache for exposed routes in debug mode ([#362](https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/pull/362))

## v2.4.0 - 2019-08-10
- Add Symfony 4.1 localized routes support ([#334](https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/pull/334))
- Add documentation remarks on JMSI18nRoutingBundle compatibility ([#352](https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/pull/352))

## v2.3.1 - 2019-06-17
- Fix regex pattern to match whole url pattern ([#350](https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/pull/350))
- Small documentation update

## v2.3.0 - 2019-02-03
- Add routing-sf4.xml to move towards Symfony >4.1 syntax
- Add functionality to granularly expose routes based on domains ([#346](https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/issues/346))
- Small cleanup and textual fix

## v2.2.2 - 2018-11-28
- Fix Symfony 4.2 deprecation
- Add setRoutingData to typescript definition

## v2.2.1 - 2018-09-29
- Add support for a different port

## v2.2.0 - 2018-02-07
- Refactor JavaScript code to improve webpack compatibility

## v2.1.1 - 2017-12-13
- Fix SF <4 compatibility ([#306](https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/issues/306))

## v2.1.0 - 2017-12-13
- Add Symfony 4 compatibility ([#300](https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/pull/300))
- Add JSON dump functionality ([#302](https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/pull/302))
- Fix bug denormalizing empty routing collections from cache
- Update documentation for Symfony 3 ([#273](https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/pull/273))

## v2.0.0 - 2017-11-08
- Add Symfony 3.* compatibility
- Added `--pretty-print` option to `fos:js-routing:dump`-command, making the resulting javascript pretty-printed
- Removed SF 2.1 backwards compatibility code
- Add automatic injection of `locale` parameter
- Added functionality to change the used router service
- Added normalizer classes
48 changes: 32 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,42 @@ Before running the test suite, execute the following Composer command to install
the dependencies used by the bundle:

```bash
$ composer install --dev
$ composer update
```

Then, execute the tests executing:

```bash
$ phpunit
$ ./phpunit
```

### JavaScript Test Suite

First, install [PhantomJS](http://phantomjs.org/) and [Google Closure
Library](https://github.com/google/closure-library):
First, install [PhantomJS](http://phantomjs.org/) (see the website for further
details or simply use your favourite package manager) and the development dependencies using:

```bash
$ npm install google-closure-library
$ cd Resources
$ npm install
```

Run the JS test suite with:
then run the JS test suite with:

```bash
$ phantomjs Resources/js/run_jsunit.js Resources/js/router_test.html
$ npm run test
```

Because the current test suite runs against the built javascript a build is automatically
run first (see 'Compiling the JavaScript files' below for further details). You can
explicitly run only the test suite with:

```bash
$ phantomjs js/run_jsunit.js js/router_test.html
```

Alternatively you can open `Resources/js/router_test.html` in your browser which
runs the same test suite with a graphical output.

Compiling the JavaScript files
------------------------------

Expand All @@ -67,19 +79,23 @@ Compiling the JavaScript files
> We already provide a compiled version of the JavaScript; this section is only
> relevant if you want to make changes to this script.

In order to re-compile the JavaScript source files that we ship with this
bundle, you need the Google Closure Tools. You need the
[plovr](http://plovr.com/download.html) tool, which is a Java ARchive, so you
also need a working Java environment. You can re-compile the JavaScript with the
following command:
This project is using [Gulp](https://gulpjs.com/) to compile JavaScript files.
In order to use Gulp you must install both [node](https://nodejs.org/en/) and
[npm](https://www.npmjs.com/).

If you are not familiar with using Gulp, it is recommended that you review this
[An Introduction to Gulp.js](https://www.sitepoint.com/introduction-gulp-js/)
tutorial which will guide you through the process of getting node and npm installed.

Once you have node and npm installed:

```bash
$ java -jar plovr.jar build Resources/config/plovr/compile.js
$ cd Resources
$ npm install
```

Alternatively, you can use the JMSGoogleClosureBundle. If you install this
bundle, you can re-compile the JavaScript with the following command:
Then to perform a build

```bash
$ php app/console plovr:build @FOSJsRoutingBundle/compile.js
$ npm run build
```
Loading