Skip to content

Commit a5b817e

Browse files
committed
Use new directory structure and remove deprecated features
1 parent 3253755 commit a5b817e

File tree

8 files changed

+19
-68
lines changed

8 files changed

+19
-68
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
language: php
22

33
php:
4-
- 5.3
5-
- 5.4
64
- 5.5
75
- 5.6
86
- 7.0
7+
- 7.1
98
- hhvm
109

1110
sudo: false

CoreBundle/CallbackSlugifier.php

Lines changed: 0 additions & 31 deletions
This file was deleted.

CoreBundle/SlugifierInterface.php

Lines changed: 0 additions & 18 deletions
This file was deleted.

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@
1111
}
1212
],
1313
"require": {
14-
"php": "^5.3.9|^7.0"
14+
"php": "^5.5.9|^7.0"
1515
},
1616
"autoload": {
17-
"psr-4": {
18-
"Symfony\\Cmf\\Api\\Slugifier\\": "",
19-
"Symfony\\Cmf\\Bundle\\CoreBundle\\Slugifier\\": "CoreBundle"
20-
}
17+
"psr-4": { "Symfony\\Cmf\\Api\\Slugifier\\": "src/" }
18+
},
19+
"autoload-dev": {
20+
"psr-4": { "Symfony\\Cmf\\Api\\Slugifier\\Tests\\": "tests/" }
2121
},
2222
"extra": {
2323
"branch-alias": {
24-
"dev-master": "1.0-dev"
24+
"dev-master": "2.0-dev"
2525
}
2626
}
2727
}

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<testsuites>
1010
<testsuite name="Symfony Slugifier Api Test Suite">
11-
<directory>./Tests/</directory>
11+
<directory>./tests/</directory>
1212
</testsuite>
1313
</testsuites>
1414

File renamed without changes.

SlugifierInterface.php renamed to src/SlugifierInterface.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616
*
1717
* @author Daniel Leech <[email protected]>
1818
*/
19-
interface SlugifierInterface extends \Symfony\Cmf\Bundle\CoreBundle\Slugifier\SlugifierInterface
19+
interface SlugifierInterface
2020
{
21+
/**
22+
* Return a slugified (or urlized) representation of a given string.
23+
*
24+
* @param string $string
25+
*
26+
* @return string
27+
*/
28+
public function slugify($string);
2129
}

Tests/CallbackSlugifierTest.php renamed to tests/CallbackSlugifierTest.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* This file is part of the Symfony CMF package.
55
*
6-
* (c) 2011-2015 Symfony CMF
6+
* (c) 2017 Symfony CMF
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.
@@ -19,21 +19,14 @@ class CallbackSlugifierTest extends \PHPUnit_Framework_TestCase
1919

2020
protected function setUp()
2121
{
22-
$this->slugifier = new CallbackSlugifier(
23-
'Symfony\Cmf\Api\Slugifier\Tests\CallbackSlugifierTest::slugify'
24-
);
22+
$this->slugifier = new CallbackSlugifier(__CLASS__.'::slugify');
2523
}
2624

2725
public function testSlugify()
2826
{
2927
$this->assertEquals('this-is-slugified', $this->slugifier->slugify('this is slugified'));
3028
}
3129

32-
public function testLegacyInterface()
33-
{
34-
$this->assertInstanceOf('Symfony\Cmf\Bundle\CoreBundle\Slugifier\SlugifierInterface', $this->slugifier);
35-
}
36-
3730
public static function slugify($val)
3831
{
3932
return str_replace(' ', '-', $val);

0 commit comments

Comments
 (0)