Skip to content

Commit

Permalink
Merge branch 'master' of github.com:cocur/slugify
Browse files Browse the repository at this point in the history
* 'master' of github.com:cocur/slugify:
  Fix dependencies
  Fix dependencies
  Update dependencies
  Use singleton instead of bindShared
  Add rules for norwegian language and corresponding tests
  • Loading branch information
Florian Eckerstorfer committed Feb 11, 2016
2 parents 9949d20 + ac7b073 commit 5b9c427
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Expand Up @@ -4,8 +4,6 @@ sudo: false

matrix:
include:
- php: 5.5.9
- php: 5.5
- php: 5.6
- php: 5.6
env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'
Expand Down
8 changes: 8 additions & 0 deletions Resources/rules/norwegian.json
@@ -0,0 +1,8 @@
{
"Æ": "AE",
"Ø": "OE",
"Å": "AA",
"æ": "ae",
"ø": "oe",
"å": "aa"
}
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -16,10 +16,10 @@
}
],
"require": {
"php": ">=5.5.9"
"php": ">=5.6"
},
"require-dev": {
"phpunit/phpunit": "~4.8",
"phpunit/phpunit": "~5.1.3",
"mockery/mockery": "~0.9",
"mikey179/vfsStream": "~1.6",
"symfony/http-kernel": "~2.4|~3.0",
Expand Down
9 changes: 9 additions & 0 deletions src/RuleProvider/DefaultRuleProvider.php
Expand Up @@ -443,6 +443,15 @@ class DefaultRuleProvider implements RuleProviderInterface
'ჯ' => 'j',
'ჰ' => 'h',
),
'norwegian' =>
array (
'Æ' => 'AE',
'Ø' => 'OE',
'Å' => 'AA',
'æ' => 'ae',
'ø' => 'oe',
'å' => 'aa'
),
'german' =>
array (
'Ä' => 'AE',
Expand Down
1 change: 1 addition & 0 deletions src/Slugify.php
Expand Up @@ -52,6 +52,7 @@ class Slugify implements SlugifyInterface
'burmese',
'hindi',
'georgian',
'norwegian',
'vietnamese',
'ukrainian',
'latvian',
Expand Down
1 change: 1 addition & 0 deletions tests/SlugifyTest.php
Expand Up @@ -170,6 +170,7 @@ public function defaultRuleProvider()
['Mężny bądź chroń pułk twój i sześć flag', 'mezny-badz-chron-pulk-twoj-i-szesc-flag'],
['ერთი ორი სამი ოთხი ხუთი', 'erti-ori-sami-otkhi-khuti'],
['अ ऒ न द', 'a-oii-na-tha'],
['Æ Ø Å æ ø å', 'ae-oe-aa-ae-oe-aa'],
[str_repeat('Übergrößenträger', 1000), str_repeat('uebergroessentraeger', 1000)],
[str_repeat('my🎉', 5000), substr(str_repeat('my-', 5000), 0, -1)],
[str_repeat('hi🇦🇹', 5000), substr(str_repeat('hi-', 5000), 0, -1)],
Expand Down

0 comments on commit 5b9c427

Please sign in to comment.