Skip to content
This repository was archived by the owner on Apr 4, 2020. It is now read-only.

Commit c35dd4a

Browse files
committed
Prepare to release 0.3.0
1 parent 66ba8a9 commit c35dd4a

File tree

5 files changed

+21
-26
lines changed

5 files changed

+21
-26
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased][unreleased]
99

10+
## [0.3.0] - 2019-04-10
11+
12+
### Changed
13+
14+
- Made extension compatible with `league/commonmark` 0.19
15+
1016
## [0.2.1] - 2019-03-28
1117

1218
### Changed
@@ -35,7 +41,8 @@ This release brings the email and URL autolink processors into alignment with th
3541

3642
Initial release!
3743

38-
[unreleased]: https://github.com/thephpleague/commonmark-ext-autolink/compare/v0.2.1...HEAD
44+
[unreleased]: https://github.com/thephpleague/commonmark-ext-autolink/compare/v0.3.0...HEAD
45+
[0.3.0]: https://github.com/thephpleague/commonmark-ext-autolink/compare/v0.2.1...v0.3.0
3946
[0.2.1]: https://github.com/thephpleague/commonmark-ext-autolink/compare/v0.2.0...v0.2.1
4047
[0.2.0]: https://github.com/thephpleague/commonmark-ext-autolink/compare/v0.1.0...v0.2.0
4148
[0.1.0]: https://github.com/thephpleague/commonmark-ext-autolink/commits/v0.1.0

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
}
1515
],
1616
"require": {
17-
"php" : "^5.6||^7.0",
18-
"league/commonmark": "^0.18.5"
17+
"php" : "^7.1",
18+
"league/commonmark": "^0.19"
1919
},
2020
"require-dev": {
21-
"phpunit/phpunit": "^5.7.27"
21+
"phpunit/phpunit": "^7.5"
2222
},
2323
"autoload": {
2424
"psr-4": {
@@ -35,7 +35,7 @@
3535
},
3636
"extra": {
3737
"branch-alias": {
38-
"dev-master": "0.3-dev"
38+
"dev-master": "0.4-dev"
3939
}
4040
}
4141
}

phpunit.xml.dist

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@
2020
</whitelist>
2121
</filter>
2222
<logging>
23-
<log type="tap" target="build/report.tap"/>
24-
<log type="junit" target="build/report.junit.xml"/>
25-
<log type="coverage-html" target="build/coverage" charset="UTF-8" yui="true" highlight="true"/>
23+
<log type="coverage-html" target="build/coverage"/>
2624
<log type="coverage-text" target="build/coverage.txt"/>
27-
<log type="coverage-clover" target="build/logs/clover.xml"/>
2825
</logging>
2926
</phpunit>

src/AutolinkExtension.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,14 @@
1111

1212
namespace League\CommonMark\Ext\Autolink;
1313

14-
use League\CommonMark\Extension\Extension;
14+
use League\CommonMark\ConfigurableEnvironmentInterface;
15+
use League\CommonMark\Extension\ExtensionInterface;
1516

16-
final class AutolinkExtension extends Extension
17+
final class AutolinkExtension implements ExtensionInterface
1718
{
18-
public function getDocumentProcessors()
19+
public function register(ConfigurableEnvironmentInterface $environment)
1920
{
20-
return [
21-
new EmailAutolinkProcessor(),
22-
new UrlAutolinkProcessor(),
23-
];
21+
$environment->addDocumentProcessor(new EmailAutolinkProcessor());
22+
$environment->addDocumentProcessor(new UrlAutolinkProcessor());
2423
}
2524
}

src/InlineMentionParser.php

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,15 @@ public function __construct($linkPattern, $handleRegex = '/^[A-Za-z0-9_]+(?!\w)/
3636
/**
3737
* {@inheritdoc}
3838
*/
39-
public function getName()
40-
{
41-
return 'mention';
42-
}
43-
44-
/**
45-
* {@inheritdoc}
46-
*/
47-
public function getCharacters()
39+
public function getCharacters(): array
4840
{
4941
return ['@'];
5042
}
5143

5244
/**
5345
* {@inheritdoc}
5446
*/
55-
public function parse(InlineParserContext $inlineContext)
47+
public function parse(InlineParserContext $inlineContext): bool
5648
{
5749
$cursor = $inlineContext->getCursor();
5850

0 commit comments

Comments
 (0)