Skip to content
This repository has been archived by the owner on Jan 16, 2020. It is now read-only.

Add composer template #15

Merged
merged 12 commits into from
Nov 7, 2017
55 changes: 55 additions & 0 deletions template/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"name": "zendframework/<project-name>",
"description": "<project-description>",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My suggestion:

"description": "<project description, the same like the repository description>",

"homepage": "https://docs.zendframework.com/<project-name>/",
"type": "library",
"license": "BSD-3-Clause",
"keywords": [
"http",
Copy link
Member

@froschdesign froschdesign Jul 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would replace these lines with a short description like:

"keywords" : [
    "<individual keywords for current project>"
],

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should have here also zf or zendframework keyword?

"middleware",
"psr",
"psr-7",
"psr-11"
],
"support": {
"docs": "https://docs.zendframework.com/<project-name>/",
"issues": "https://github.com/zendframework/<project-name>/issues",
"source": "https://github.com/zendframework/<project-name>",
"slack": "https://zendframework-slack.herokuapp.com",
"forum": "https://discourse.zendframework.com"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have here link to the main page of forum or maybe specific category there?
https://github.com/zendframework/zend-expressive/blob/master/composer.json#L19

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a category exists, then we should use it.

},
"extra": {
"branch-alias": {
"dev-master": "1.0-dev",
"dev-develop": "2.0-dev"
}
},
"require": {
"php": "^5.6 || ^7.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we change order also here, to have first 7.0?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know. I think in every project it's the lowest PHP first at the moment.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For new packages, this will be simply ^7.1, in which case, we can change the PHPUnit constraint to simply ^6.2.

},
"require-dev": {
"phpunit/phpunit": "^6.0.8 || ^5.7.15",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would update these version to the latest: ^6.2.3 || ^5.7.21

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, however PHP Unit updates twice a month or so. It should not be the goal of this template to keep track of PHP Unit releases.

"zendframework/zend-coding-standard": "~1.0.0"
},
"autoload": {
"psr-4": {
"Zend\\<project-name>\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"ZendTest\\<project-name>\\": "test/"
}
},
"scripts": {
"check": [
"@cs-check",
"@test"
],
"upload-coverage": "coveralls -v",
"cs-check": "phpcs",
"cs-fix": "phpcbf",
"test": "phpunit --colors=always",
"test-coverage": "phpunit --coverage-clover clover.xml"
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add empty line at the end of the file.