diff --git a/.gitattributes b/.gitattributes index 2df781e..16d8d29 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,9 +1,10 @@ -/test export-ignore -/vendor export-ignore -.coveralls.yml export-ignore -.gitattributes export-ignore -.gitignore export-ignore -.travis.yml export-ignore -.composer.lock export-ignore -.php_cs export-ignore -phpunit.xml.dist export-ignore +/.coveralls.yml export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore +/.travis.yml export-ignore +/composer.lock export-ignore +/docs/ export-ignore +/mkdocs.yml export-ignore +/phpcs.xml export-ignore +/phpunit.xml.dist export-ignore +/test/ export-ignore diff --git a/.gitignore b/.gitignore index 673fe32..245087a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,7 @@ -.buildpath -.DS_Store -.idea -.project -.settings/ -.*.sw* -.*.un~ -nbproject -doc/html/ -tmp/ -zf-mkdoc-theme/ - -clover.xml -coveralls-upload.json -phpunit.xml -vendor +/clover.xml +/coveralls-upload.json +/docs/html/ +/phpunit.xml +/vendor/ +/zf-mkdoc-theme.tgz +/zf-mkdoc-theme/ diff --git a/.travis.yml b/.travis.yml index 67cdec5..8f883f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -52,8 +52,6 @@ matrix: - php: 7.2 env: - DEPS=latest - allow_failures: - - php: 7.2 before_install: - if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi diff --git a/CHANGELOG.md b/CHANGELOG.md index c0572c6..25c6a3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to this project will be documented in this file, in reverse chronological order by release. -## 2.7.0 - TBD +## 2.7.0 - 2017-11-28 ### Added diff --git a/LICENSE.md b/LICENSE.md index dbb1b49..63df410 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,16 +1,15 @@ -Copyright (c) 2005-2015, Zend Technologies USA, Inc. - +Copyright (c) 2005-2017, Zend Technologies USA, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -- Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. +- Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. -- Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. +- Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. - Neither the name of Zend Technologies USA, Inc. nor the names of its contributors may be used to endorse or promote products derived from this diff --git a/README.md b/README.md index c500ff8..34e73cf 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # zend-mime [![Build Status](https://secure.travis-ci.org/zendframework/zend-mime.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-mime) -[![Coverage Status](https://coveralls.io/repos/zendframework/zend-mime/badge.svg?branch=master)](https://coveralls.io/r/zendframework/zend-mime?branch=master) +[![Coverage Status](https://coveralls.io/repos/github/zendframework/zend-mime/badge.svg?branch=master)](https://coveralls.io/github/zendframework/zend-mime?branch=master) `Zend\Mime` is a support class for handling multipart MIME messages. It is used by `Zend\Mail` and `Zend\Mime\Message` and may be used by applications requiring @@ -9,4 +9,4 @@ MIME support. - File issues at https://github.com/zendframework/zend-mime/issues -- Documentation is at https://zendframework.github.io/zend-mime/ +- Documentation is at https://docs.zendframework.com/zend-mime/ diff --git a/composer.json b/composer.json index 1694810..8bfed71 100644 --- a/composer.json +++ b/composer.json @@ -1,16 +1,19 @@ { "name": "zendframework/zend-mime", - "description": " ", + "description": "Create and parse MIME messages and parts", "license": "BSD-3-Clause", "keywords": [ - "zf2", + "zendframework", + "zf", "mime" ], - "homepage": "https://github.com/zendframework/zend-mime", - "autoload": { - "psr-4": { - "Zend\\Mime\\": "src/" - } + "support": { + "docs": "https://docs.zendframework.com/zend-mime/", + "issues": "https://github.com/zendframework/zend-mime/issues", + "source": "https://github.com/zendframework/zend-mime", + "rss": "https://github.com/zendframework/zend-mime/releases.atom", + "slack": "https://zendframework-slack.herokuapp.com", + "forum": "https://discourse.zendframework.com/c/questions/components" }, "require": { "php": "^5.6 || ^7.0", @@ -24,12 +27,9 @@ "suggest": { "zendframework/zend-mail": "Zend\\Mail component" }, - "minimum-stability": "dev", - "prefer-stable": true, - "extra": { - "branch-alias": { - "dev-master": "2.7-dev", - "dev-develop": "2.8-dev" + "autoload": { + "psr-4": { + "Zend\\Mime\\": "src/" } }, "autoload-dev": { @@ -37,6 +37,15 @@ "ZendTest\\Mime\\": "test/" } }, + "config": { + "sort-packages": true + }, + "extra": { + "branch-alias": { + "dev-master": "2.7-dev", + "dev-develop": "2.8-dev" + } + }, "scripts": { "check": [ "@cs-check", @@ -47,5 +56,6 @@ "test": "phpunit --colors=always", "test-coverage": "phpunit --colors=always --coverage-clover clover.xml", "upload-coverage": "coveralls -v" - } + }, + "homepage": "https://github.com/zendframework/zend-mime" } diff --git a/composer.lock b/composer.lock index 8b1288f..c757cd8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "c196710816e361fc24af5103c0c2d1c2", + "content-hash": "9238ebcc59bf0b5995894d83e3663451", "packages": [ { "name": "zendframework/zend-stdlib", @@ -1868,9 +1868,9 @@ } ], "aliases": [], - "minimum-stability": "dev", + "minimum-stability": "stable", "stability-flags": [], - "prefer-stable": true, + "prefer-stable": false, "prefer-lowest": false, "platform": { "php": "^5.6 || ^7.0" diff --git a/CONDUCT.md b/docs/CODE_OF_CONDUCT.md similarity index 96% rename from CONDUCT.md rename to docs/CODE_OF_CONDUCT.md index c663d2b..02fafcd 100644 --- a/CONDUCT.md +++ b/docs/CODE_OF_CONDUCT.md @@ -1,6 +1,6 @@ # Contributor Code of Conduct -The Zend Framework project adheres to [The Code Manifesto](http://codemanifesto.com) +This project adheres to [The Code Manifesto](http://codemanifesto.com) as its guidelines for contributor interactions. ## The Code Manifesto diff --git a/CONTRIBUTING.md b/docs/CONTRIBUTING.md similarity index 54% rename from CONTRIBUTING.md rename to docs/CONTRIBUTING.md index 8f6759f..83600c6 100644 --- a/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -2,73 +2,43 @@ ## RESOURCES -If you wish to contribute to Zend Framework, please be sure to +If you wish to contribute to this project, please be sure to read/subscribe to the following resources: - - [Coding Standards](https://github.com/zendframework/zf2/wiki/Coding-Standards) - - [Contributor's Guide](http://framework.zend.com/participate/contributor-guide) - - ZF Contributor's mailing list: - Archives: http://zend-framework-community.634137.n4.nabble.com/ZF-Contributor-f680267.html - Subscribe: zf-contributors-subscribe@lists.zend.com - - ZF Contributor's IRC channel: - #zftalk.dev on Freenode.net + - [Coding Standards](https://github.com/zendframework/zend-coding-standard) + - [Forums](https://discourse.zendframework.com/c/contributors) + - [Slack](https://zendframework-slack.herokuapp.com) + - [Code of Conduct](CODE_OF_CONDUCT.md) -If you are working on new features or refactoring [create a proposal](https://github.com/zendframework/zend-mime/issues/new). - -## Reporting Potential Security Issues - -If you have encountered a potential security vulnerability, please **DO NOT** report it on the public -issue tracker: send it to us at [zf-security@zend.com](mailto:zf-security@zend.com) instead. -We will work with you to verify the vulnerability and patch it as soon as possible. - -When reporting issues, please provide the following information: - -- Component(s) affected -- A description indicating how to reproduce the issue -- A summary of the security vulnerability and impact - -We request that you contact us via the email address above and give the project -contributors a chance to resolve the vulnerability and issue a new release prior -to any public exposure; this helps protect users and provides them with a chance -to upgrade and/or update in order to protect their applications. - -For sensitive email communications, please use [our PGP key](http://framework.zend.com/zf-security-pgp-key.asc). +If you are working on new features or refactoring +[create a proposal](https://github.com/zendframework/zend-mime/issues/new). ## RUNNING TESTS -> ### Note: testing versions prior to 2.4 -> -> This component originates with Zend Framework 2. During the lifetime of ZF2, -> testing infrastructure migrated from PHPUnit 3 to PHPUnit 4. In most cases, no -> changes were necessary. However, due to the migration, tests may not run on -> versions < 2.4. As such, you may need to change the PHPUnit dependency if -> attempting a fix on such a version. - To run tests: - Clone the repository: ```console - $ git clone git@github.com:zendframework/zend-mime.git - $ cd + $ git clone git://github.com/zendframework/zend-mime.git + $ cd zend-mime ``` - Install dependencies via composer: ```console - $ curl -sS https://getcomposer.org/installer | php -- - $ ./composer.phar install + $ composer install ``` - If you don't have `curl` installed, you can also download `composer.phar` from https://getcomposer.org/ + If you don't have `composer` installed, please download it from https://getcomposer.org/download/ -- Run the tests via `phpunit` and the provided PHPUnit config, like in this example: +- Run the tests using the "test" command shipped in the `composer.json`: ```console - $ ./vendor/bin/phpunit + $ composer test ``` -You can turn on conditional tests with the phpunit.xml file. +You can turn on conditional tests with the `phpunit.xml` file. To do so: - Copy `phpunit.xml.dist` file to `phpunit.xml` @@ -77,24 +47,22 @@ To do so: ## Running Coding Standards Checks -This component uses [phpcs](https://github.com/squizlabs/PHP_CodeSniffer) for coding -standards checks, and provides configuration for our selected checks. -`phpcs` is installed by default via Composer. +First, ensure you've installed dependencies via composer, per the previous +section on running tests. -To run checks only: +To run CS checks only: ```console $ composer cs-check ``` -`phpcs` also includes a tool for fixing most CS violations, `phpcbf`: - +To attempt to automatically fix common CS issues: ```console $ composer cs-fix ``` -If you allow `phpcbf` to fix CS issues, please re-run the tests to ensure +If the above fixes any CS issues, please re-run the tests to ensure they pass, and make sure you add and commit the changes after verification. ## Recommended Workflow for Contributions @@ -103,12 +71,12 @@ Your first step is to establish a public repository from which we can pull your work into the master repository. We recommend using [GitHub](https://github.com), as that is where the component is already hosted. -1. Setup a [GitHub account](http://github.com/), if you haven't yet -2. Fork the repository (http://github.com/zendframework/zend-mime) +1. Setup a [GitHub account](https://github.com/), if you haven't yet +2. Fork the repository (https://github.com/zendframework/zend-mime) 3. Clone the canonical repository locally and enter it. ```console - $ git clone git://github.com:zendframework/zend-mime.git + $ git clone git://github.com/zendframework/zend-mime.git $ cd zend-mime ``` @@ -188,15 +156,7 @@ To send a pull request, you have two options. If using GitHub, you can do the pull request from there. Navigate to your repository, select the branch you just created, and then select the "Pull Request" button in the upper right. Select the user/organization -"zendframework" as the recipient. - -If using your own repository - or even if using GitHub - you can use `git -format-patch` to create a patchset for us to apply; in fact, this is -**recommended** for security-related patches. If you use `format-patch`, please -send the patches as attachments to: - -- zf-devteam@zend.com for patches without security implications -- zf-security@zend.com for security patches +"zendframework" (or whatever the upstream organization is) as the recipient. #### What branch to issue the pull request against? @@ -227,8 +187,3 @@ repository, we suggest doing some cleanup of these branches. ```console $ git push {username} : ``` - - -## Conduct - -Please see our [CONDUCT.md](CONDUCT.md) to understand expected behavior when interacting with others in the project. diff --git a/docs/ISSUE_TEMPLATE.md b/docs/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..7b4d3b3 --- /dev/null +++ b/docs/ISSUE_TEMPLATE.md @@ -0,0 +1,19 @@ + - [ ] I was not able to find an [open](https://github.com/zendframework/zend-mime/issues?q=is%3Aopen) or [closed](https://github.com/zendframework/zend-mime/issues?q=is%3Aclosed) issue matching what I'm seeing. + - [ ] This is not a question. (Questions should be asked on [slack](https://zendframework.slack.com/) ([Signup for Slack here](https://zendframework-slack.herokuapp.com/)) or our [forums](https://discourse.zendframework.com/).) + +Provide a narrative description of what you are trying to accomplish. + +### Code to reproduce the issue + + + +```php +``` + +### Expected results + + + +### Actual results + + diff --git a/docs/PULL_REQUEST_TEMPLATE.md b/docs/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..f00d90c --- /dev/null +++ b/docs/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,25 @@ +Provide a narrative description of what you are trying to accomplish: + +- [ ] Are you fixing a bug? + - [ ] Detail how the bug is invoked currently. + - [ ] Detail the original, incorrect behavior. + - [ ] Detail the new, expected behavior. + - [ ] Base your feature on the `master` branch, and submit against that branch. + - [ ] Add a regression test that demonstrates the bug, and proves the fix. + - [ ] Add a `CHANGELOG.md` entry for the fix. + +- [ ] Are you creating a new feature? + - [ ] Why is the new feature needed? What purpose does it serve? + - [ ] How will users use the new feature? + - [ ] Base your feature on the `develop` branch, and submit against that branch. + - [ ] Add only one feature per pull request; split multiple features over multiple pull requests + - [ ] Add tests for the new feature. + - [ ] Add documentation for the new feature. + - [ ] Add a `CHANGELOG.md` entry for the new feature. + +- [ ] Is this related to quality assurance? + + +- [ ] Is this related to documentation? + + diff --git a/docs/SUPPORT.md b/docs/SUPPORT.md new file mode 100644 index 0000000..a65dc05 --- /dev/null +++ b/docs/SUPPORT.md @@ -0,0 +1,25 @@ +# Getting Support + +Zend Framework offers three support channels: + +- For real-time questions, use our + [Slack](https://zendframework-slack.herokuapp.com) +- For detailed questions (e.g., those requiring examples) use our + [forums](https://discourse.zendframework.com/c/questions/components) +- To report issues, use this repository's + [issue tracker](https://github.com/zendframework/zend-mime/issues/new) + +**DO NOT** use the issue tracker to ask questions; use Slack or the forums for +that. Questions posed to the issue tracker will be closed. + +When reporting an issue, please include the following details: + +- A narrative description of what you are trying to accomplish. +- The minimum code necessary to reproduce the issue. +- The expected results of exercising that code. +- The actual results received. + +We may ask for additional details: what version of the library you are using, +and what PHP version was used to reproduce the issue. + +You may also submit a failing test case as a pull request. diff --git a/doc/book/index.html b/docs/book/index.html similarity index 97% rename from doc/book/index.html rename to docs/book/index.html index 78ef175..cf02af5 100644 --- a/doc/book/index.html +++ b/docs/book/index.html @@ -1,7 +1,7 @@

zend-mime

- +

Create and parse MIME messages and parts.

$ composer require zendframework/zend-mime
diff --git a/doc/book/index.md b/docs/book/index.md similarity index 100% rename from doc/book/index.md rename to docs/book/index.md diff --git a/doc/book/intro.md b/docs/book/intro.md similarity index 100% rename from doc/book/intro.md rename to docs/book/intro.md diff --git a/doc/book/message.md b/docs/book/message.md similarity index 100% rename from doc/book/message.md rename to docs/book/message.md diff --git a/doc/book/part.md b/docs/book/part.md similarity index 100% rename from doc/book/part.md rename to docs/book/part.md diff --git a/mkdocs.yml b/mkdocs.yml index 907153b..a635543 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,5 +1,5 @@ -docs_dir: doc/book -site_dir: doc/html +docs_dir: docs/book +site_dir: docs/html pages: - index.md - Intro: intro.md @@ -9,4 +9,4 @@ pages: site_name: zend-mime site_description: zend-mime repo_url: 'https://github.com/zendframework/zend-mime' -copyright: 'Copyright (c) 2016 Zend Technologies USA Inc.' +copyright: 'Copyright (c) 2005-2017 Zend Technologies USA Inc.'