Skip to content

Commit

Permalink
build 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Haehnchen committed Apr 18, 2020
1 parent fe2e12c commit 3f14c92
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 7 deletions.
21 changes: 19 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
# Changelog

## Versions
* 3.x: PhpStorm 2017.3+
* 2.x: PhpStorm 2017.1+
* 4.x: PhpStorm 2020.1+
* 3.x: PhpStorm 2017.3+ (no support)
* 2.x: PhpStorm 2017.1+ (no support)
* 1.x: PhpStorm 2016.1+ (no support)

## 4.0
* Allow all PhpUnit mock instance in chaining for finding createMock [#39](https://github.com/Haehnchen/idea-php-phpunit-plugin/issues/39) (Daniel Espendiller)
* Provide support for "PHPUnit\\Framework\\MockObject\\Stub::method" [#42](https://github.com/Haehnchen/idea-php-phpunit-plugin/issues/42) [#39](https://github.com/Haehnchen/idea-php-phpunit-plugin/issues/39) (Daniel Espendiller)
* Dropping feature support for build < 2020.1; api is still valid so by now no build-since highering needed (Daniel Espendiller)
* Support also Behat tests file structure (Daniel Espendiller)
* Fix isPrimitiveType checking for constructor creation intention (Daniel Espendiller)
* Remove deprecated code (Daniel Espendiller)
* Remove runner linemarker in favor of already provide by PhpStorm (Daniel Espendiller)
* Add plugin icon (Daniel Espendiller)
* Allow "setUpBeforeTest" to be a valid "setUp" method for checking property types #35 (Daniel Espendiller)
* Allow some more use cases for checking test context eg for Behat [#37](https://github.com/Haehnchen/idea-php-phpunit-plugin/issues/37) (Daniel Espendiller)
* Add support for phpspec/prophecy-phpunit where "prophesize" method is provided as a trait [#46](https://github.com/Haehnchen/idea-php-phpunit-plugin/issues/46) (Daniel Espendiller)
* Move to gradle build (Daniel Espendiller)
* Fix for build on travis ([#45](https://github.com/Haehnchen/idea-php-phpunit-plugin/issues/45)) (Roman Tymoshyk)
* Add missing namespaces PhpUnit mock instances (Daniel Espendiller)

## 3.8
* Fix performance issue: migrate test linemarker runner to leaf elements

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
public class PhpUnitCompletionContributor extends CompletionContributor {
public PhpUnitCompletionContributor() {
extend(CompletionType.BASIC, PatternUtil.getMethodReferenceWithParameterInsideTokenStringPattern(), new CompletionProvider<>() {
extend(CompletionType.BASIC, PatternUtil.getMethodReferenceWithParameterInsideTokenStringPattern(), new CompletionProvider<CompletionParameters>() {
@Override
protected void addCompletions(@NotNull CompletionParameters completionParameters, @NotNull ProcessingContext processingContext, @NotNull CompletionResultSet resultSet) {
PsiElement psiElement = completionParameters.getPosition();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ public class MockProphecyTypeProvider implements PhpTypeProvider3 {
public static final char CHAR = '元';
public static char TRIM_KEY = '\u0192';

private static final Collection<String> PHPUNIT_CLASSES = new HashSet<>() {{
private static final Collection<String> PHPUNIT_CLASSES = new HashSet<String>() {{
add("\\PHPUnit\\Framework\\TestCase");
add("\\PHPUnit_Framework_TestCase");
}};

private static final Collection<String> PROPHESIZE_CLASSES = new HashSet<>(PHPUNIT_CLASSES) {{
private static final Collection<String> PROPHESIZE_CLASSES = new HashSet<String>(PHPUNIT_CLASSES) {{
add("\\Prophecy\\Prophet");
add("\\Prophecy\\PhpUnit\\ProphecyTrait");
}};

private static final Map<String, Collection<String>> METHODS = new HashMap<>() {{
private static final Map<String, Collection<String>> METHODS = new HashMap<String, Collection<String>>() {{
put("getMock", PHPUNIT_CLASSES);
put("getMockClass", PHPUNIT_CLASSES);
put("getMockForAbstractClass", PHPUNIT_CLASSES);
Expand Down
18 changes: 18 additions & 0 deletions src/main/resources/META-INF/change-notes.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<html>
<ul>
<li>Allow all PhpUnit mock instance in chaining for finding createMock <a href="https://github.com/Haehnchen/idea-php-phpunit-plugin/issues/39">#39</a> (Daniel Espendiller)</li>
<li>Provide support for "PHPUnit\Framework\MockObject\Stub::method" <a href="https://github.com/Haehnchen/idea-php-phpunit-plugin/issues/42">#42</a> <a href="https://github.com/Haehnchen/idea-php-phpunit-plugin/issues/39">#39</a> (Daniel Espendiller)</li>
<li>Dropping feature support for build < 2020.1; api is still valid so by now no build-since highering needed (Daniel Espendiller)</li>
<li>Support also Behat tests file structure (Daniel Espendiller)</li>
<li>Fix isPrimitiveType checking for constructor creation intention (Daniel Espendiller)</li>
<li>Remove deprecated code (Daniel Espendiller)</li>
<li>Remove runner linemarker in favor of already provide by PhpStorm (Daniel Espendiller)</li>
<li>Add plugin icon (Daniel Espendiller)</li>
<li>Allow "setUpBeforeTest" to be a valid "setUp" method for checking property types #35 (Daniel Espendiller)</li>
<li>Allow some more use cases for checking test context eg for Behat <a href="https://github.com/Haehnchen/idea-php-phpunit-plugin/issues/37">#37</a> (Daniel Espendiller)</li>
<li>Add support for phpspec/prophecy-phpunit where "prophesize" method is provided as a trait <a href="https://github.com/Haehnchen/idea-php-phpunit-plugin/issues/46">#46</a> (Daniel Espendiller)</li>
<li>Move to gradle build (Daniel Espendiller)</li>
<li>Fix for build on travis (<a href="https://github.com/Haehnchen/idea-php-phpunit-plugin/issues/45">#45</a>) (Roman Tymoshyk)</li>
<li>Add missing namespaces PhpUnit mock instances (Daniel Espendiller)</li>
</ul>
</html>
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<idea-plugin url="https://github.com/Haehnchen/idea-php-phpunit-plugin">
<id>de.espend.idea.php.phpunit</id>
<name>PHPUnit Enhancement</name>
<version>3.8</version>
<version>4.0</version>
<vendor email="daniel@espendiller.net" url="http://espend.de">espend_de</vendor>

<description><![CDATA[
Expand Down

0 comments on commit 3f14c92

Please sign in to comment.