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

Commit e6696e9

Browse files
committed
init project structure
0 parents  commit e6696e9

16 files changed

+604
-0
lines changed

.github/FUNDING.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: [Haehnchen]
2+
custom: https://www.paypal.me/DanielEspendiller

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
out/
2+
/.idea
3+
/php-annotation.jar
4+
/build
5+
/.gradle

.travis.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
sudo: false
2+
language: java
3+
jdk:
4+
- openjdk8
5+
6+
before_cache:
7+
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
8+
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
9+
- rm -fr $HOME/.gradle/caches/*/fileHashes/fileHashes.bin
10+
- rm -fr $HOME/.gradle/caches/*/fileHashes/fileHashes.lock
11+
12+
cache:
13+
directories:
14+
- $HOME/.gradle/caches/
15+
- $HOME/.gradle/wrapper/
16+
17+
before_install:
18+
- "export ORG_GRADLE_PROJECT_ideaVersion=${IDEA_VERSION}"
19+
- "export ORG_GRADLE_PROJECT_phpPluginVersion=${PHP_PLUGIN_VERSION}"
20+
- "export ORG_GRADLE_PROJECT_annotationPluginVersion=${ANNOTATION_PLUGIN_VERSION}"
21+
22+
env:
23+
- IDEA_VERSION="IU-2019.1.2" PHP_PLUGIN_VERSION="191.7141.52" ANNOTATION_PLUGIN_VERSION="5.3"
24+
25+
26+
script:
27+
- "./gradlew check verifyPlugin buildPlugin"

CHANGELOG.md

Whitespace-only changes.

CODE_OF_CONDUCT.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment include:
10+
11+
* Using welcoming and inclusive language
12+
* Being respectful of differing viewpoints and experiences
13+
* Gracefully accepting constructive criticism
14+
* Focusing on what is best for the community
15+
* Showing empathy towards other community members
16+
17+
Examples of unacceptable behavior by participants include:
18+
19+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
* Trolling, insulting/derogatory comments, and personal or political attacks
21+
* Public or private harassment
22+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
* Other conduct which could reasonably be considered inappropriate in a professional setting
24+
25+
## Our Responsibilities
26+
27+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28+
29+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
## Scope
32+
33+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34+
35+
## Enforcement
36+
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38+
39+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40+
41+
## Attribution
42+
43+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44+
45+
[homepage]: http://contributor-covenant.org
46+
[version]: http://contributor-covenant.org/version/1/4/

MAINTENANCE.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Maintaining the plugin
2+
3+
## Forging a new release
4+
5+
The plugin is released manually, based on a git tag.
6+
7+
A gradle plugin automatically determines the current tag and / or if this
8+
is a snapshot release.
9+
10+
To build the plugin, execute the gradle task `buildPlugin`.
11+
12+
```bash
13+
./gradlew clean buildPlugin
14+
```
15+
16+
The artifact zip can then be found in `build/distrubutions`. This is the
17+
final result which can be uploaded to the JetBrains repository.
18+
19+
The checklist for a new release should be the following:
20+
21+
* ensure the project is currently on the latest commit on the `master` branch
22+
You can enforce this by pulling and resetting with the `--hard` flag
23+
* make sure there are no staged changes
24+
* prepare the changelog:
25+
* execute `./prepare-release.sh` to write the changelog to disk
26+
* manually copy the relevant parts to `CHANGELOG.md`
27+
* commit the changed files (preferrable with a meaningful commit message
28+
`Prepare release 0.16.xxx`)
29+
* tag a release (`git tag 0.x.xxx`)
30+
* push the changed code and the tag to the remote (`git push && git push --tags`)
31+
* build the plugin on the tag (`./gradlew clean buildPlugin`)
32+
33+
## Upload to JetBrain Plugin repository
34+
35+
The plugin can be updated in two different ways.
36+
37+
### Manual upload
38+
39+
Upload the produced ZIP file to the JetBrains repository manually
40+
41+
### Semi-automatic upload through gradle
42+
43+
The IntelliJ gradle plugin ships a task to upload the release
44+
automatically. This will include the changelog generated earlier.
45+
46+
Execute the following gradle task:
47+
48+
```bash
49+
IJ_REPO_USERNAME=youruser IJ_REPO_PASSWORD=yourpassword ./gradlew clean buildPlugin publishPlugin
50+
```

README.md

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# IntelliJ IDEA / PhpStorm PHP Generics
2+
3+
[![Build Status](https://travis-ci.org/Haehnchen/idea-php-generics-plugin.svg?branch=master)](https://travis-ci.org/Haehnchen/idea-php-annotation-plugin)
4+
[![Version](http://phpstorm.espend.de/badge/xxxx/version)](https://plugins.jetbrains.com/plugin/7320)
5+
[![Downloads](http://phpstorm.espend.de/badge/xxxx/downloads)](https://plugins.jetbrains.com/plugin/7320)
6+
[![Downloads last month](http://phpstorm.espend.de/badge/xxxx/last-month)](https://plugins.jetbrains.com/plugin/7320)
7+
[![Donate to this project using Paypal](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.me/DanielEspendiller)
8+
9+
10+
Key | Value
11+
----------- | -----------
12+
Plugin url | https://plugins.jetbrains.com/plugin/xxx
13+
Id | de.espend.idea.php.generic
14+
Changelog | [CHANGELOG](CHANGELOG.md)
15+
16+
17+
!!! Work in progress !!!
18+
19+
## Support
20+
21+
https://youtrack.jetbrains.com/issue/WI-47158
22+
23+
```php
24+
/**
25+
* @template T
26+
*/
27+
class Map
28+
{
29+
/**
30+
* @param array<string, T>
31+
*/
32+
public function __construct(array $data = []) {}
33+
/**
34+
* @return T
35+
*/
36+
public function get(string $key) {}
37+
/**
38+
* @param T $value
39+
*/
40+
public function set(string $key, $value): void {}
41+
}
42+
// Automatically inferred as Map<string>
43+
$map = new Map([0 => 'Foo', 1 => 'Bar']);
44+
$map->set(2, true); // Expected string
45+
```
46+
47+
48+
https://youtrack.jetbrains.com/issue/WI-45248
49+
50+
51+
```php
52+
class Assert
53+
{
54+
/**
55+
* @psalm-template ExpectedType of object
56+
* @psalm-param class-string<ExpectedType> $class
57+
* @psalm-assert ExpectedType $value
58+
*/
59+
public static function isInstanceOf($value, $class, $message = '')
60+
{
61+
}
62+
}
63+
```

build.gradle

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
2+
3+
buildscript {
4+
repositories {
5+
mavenCentral()
6+
maven {
7+
url "https://oss.sonatype.org/content/repositories/snapshots/"
8+
}
9+
maven {
10+
url 'https://dl.bintray.com/jetbrains/intellij-plugin-service'
11+
}
12+
13+
}
14+
dependencies {
15+
classpath "org.jetbrains.intellij.plugins:gradle-intellij-plugin:0.5.0-SNAPSHOT"
16+
}
17+
}
18+
19+
plugins {
20+
id "org.jetbrains.intellij" version "0.4.8"
21+
id 'com.palantir.git-version' version "0.11.0"
22+
}
23+
24+
def htmlFixer = { htmlFile -> file(htmlFile).text.replace('<html>', '').replace('</html>', '') }
25+
26+
apply plugin: 'idea'
27+
28+
apply plugin: 'java'
29+
sourceCompatibility = 1.8
30+
targetCompatibility = 1.8
31+
32+
apply plugin: 'org.jetbrains.intellij'
33+
intellij {
34+
version ideaVersion
35+
updateSinceUntilBuild false
36+
plugins = [
37+
"com.jetbrains.php:${phpPluginVersion}",
38+
"de.espend.idea.php.annotation:${annotationPluginVersion}",
39+
'coverage',
40+
'CSS',
41+
'java-i18n',
42+
'properties',
43+
'xpath'
44+
]
45+
pluginName 'PHP Generics'
46+
}
47+
48+
patchPluginXml {
49+
sinceBuild '191'
50+
changeNotes = htmlFixer('src/main/resources/META-INF/change-notes.html')
51+
}
52+
53+
publishPlugin {
54+
username System.getenv('IJ_REPO_USERNAME')
55+
password System.getenv('IJ_REPO_PASSWORD')
56+
}
57+
58+
group 'de.espend.idea.php.generics'
59+
60+
def details = versionDetails()
61+
if (details.isCleanTag) {
62+
version = "${details.lastTag}"
63+
} else {
64+
version = "${details.lastTag}.${details.gitHash}-SNAPSHOT"
65+
}
66+
67+
wrapper {
68+
gradleVersion '5.4.1'
69+
}
70+
71+
test.testLogging.exceptionFormat = TestExceptionFormat.FULL

gradle.properties

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ideaVersion = IU-2019.1
2+
phpPluginVersion = 191.6183.95
3+
annotationPluginVersion = 5.3

gradle/wrapper/gradle-wrapper.jar

54.3 KB
Binary file not shown.
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Sun Apr 28 18:02:14 CEST 2019
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip

0 commit comments

Comments
 (0)