Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

Commit

Permalink
Add initial version 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Samson committed Aug 30, 2018
1 parent ad3b13f commit c3f7717
Show file tree
Hide file tree
Showing 249 changed files with 31,881 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
## How to contribute to Pimap

### **Code of Conduct**

This project and all community members are expected to uphold the [Pimap Code of Conduct.](CODE_OF_CONDUCT.md)

#### **Bug Reporting**

- **Please do not open a GitHub issue if the bug is a security vulnerability**, and instead email us at [email protected]. This will be delivered to the product team who handle security issues. Please don't disclose security bugs publicly until they have been handled by the security team.
- Your email will be acknowledged within 24 hours during the business week (Mon Fri), and you’ll receive a more detailed response to your email within 72 hours during the business week (Mon Fri) indicating the next steps in handling your report.
- **Ensure the bug was not already reported** - by searching on GitHub under [Issues.](https://github.com/salesagility/Pimap/issues)
- If you're unable to find an open issue that relates to your problem, [open a new one.](https://github.com/salesagility/Pimap/issues/new) Please be sure to follow the issue template as much as possible.
- **Ensure that the bug you are reporting is a core Pimap issue** - and not specific to your individual setup.

#### **Did you fix a bug?**

- To provide a code contribution for an issue you will need to set up your own fork of the Pimap repository, make your code changes, commit the changes and make a Pull Request to the appropriate branch on the Pimap repository.
- Determine which base branch your bug fix should use. Branches are named based on the next minor release version, eg v0.1.x, v0.2.x etc...
- When committing to your individual fix branch, please try and use the following as your commit message
```Fixed #1234 <the subject of the issue>```. E.g. ```Fixed #1436 inline attachments```.

- If you are new to Writing Commit Messages in git follow the guide [here](https://chris.beams.io/posts/git-commit/)
- After you have made your commits and pushed them up to your forked repository you then create a [Pull Request](https://help.github.com/articles/about-pull-requests/) to be reviewed and merged into the Pimap repository. Make a new Pull Request for each issue you fix – do not combine multiple bugfixes into one Pull Request.
Ensure that in your Pull Request that the base fork is salesagility/Pimap and base branch is v0.1.x. and the head fork is your repository and the base branch is your unique bugfix branch e.g. fix_1234
We will automatically reject any Pull Requests made to the wrong branch!
- If you have not signed our CLA [Contributor License Agreement](https://www.clahub.com/agreements/salesagility/Pimap) then your pull request will fail a check and we will be unable to merge it into the project. You will only be required to sign this once.
- When a new Pull Request is opened, Travis CI will test the merging of the origin and upstream branch and update the Pull Request. If this check fails you can review the test results and resolve accordingly. To test prior to making a Pull Request install Codeception via composer into your development environment then cd into the tests directory and run: ```$./vendor/bin/codecept run unit -vvv -d```
- Ensure that you follow the pull request [template](https://github.com/salesagility/Pimap/blob/master/.github/PULL_REQUEST_TEMPLATE.md) as much as possible.
- When committing to your individual feature branch, please try and use the following as your commit message
```Fixed #1234 <the subject of the issue>```. E.g. ```Fixed #1436 Reports with nested Parentheses are removing parameters```.


#### **Did you create a new feature or enhancement?**

- Changes that can be considered a new feature or enhancement should be made to the **v0.1.x**.
- To contribute a feature to Pimap, similar to providing a Bug Fix, you must create a forked repository of SuiteCRM and set up your git and development environment.
Once done, create a new branch from **v0.1.x** - and name it relevant to the feature's purpose e.g feature_sort_extension.
Make sure your commit messages are relevant and descriptive. When ready to submit for review make a Pull Request detailing your feature's functionality.
Ensure that in your Pull Request that the base fork is **salesagility/Pimap** - and base branch is **v0.1.x** - and the head fork is your repository and the base branch is your feature branch.
Add any new automated tests to the new feature branch if required e.g new modules or classes.
- We will review the code and provide feedback within the Pull Request and issues relating to your feature. If the feature is to be included in the core product we will request for the forked repo to have an Issues tab so we can raise any bugs from our testing. This will also allow you to fix those issues using the below commit message format similar to how to submit bug fixes to the v0.1.x branch.
```$ git commit m "Feature #1436 Sort Extension"```. You can add an Issues tab to your forked repository via the 'Settings' tab.

Thanks!

SalesAgility Team
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!--- Provide a general summary of the issue in the **Title** above -->
<!--- Before you open an issue, please check if a similar issue already exists or has been closed before. --->
<!--- If you have discovered a security risk please report it by emailing [email protected]. This will be delivered to the product team who handle security issues. Please don't disclose security bugs publicly until they have been handled by the security team. --->

#### Issue
<!--- Provide a more detailed introduction to the issue itself, and why you consider it to be a bug -->

#### Expected Behavior
<!--- Tell us what should happen -->

#### Actual Behavior
<!--- Tell us what happens instead -->
<!--- Also please check relevant logs (php error log etc.) -->

#### Possible Fix
<!--- Not obligatory, but suggest a fix or reason for the bug -->

#### Steps to Reproduce
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug include code to reproduce, if relevant -->
1.
2.
3.
4.

#### Context
<!--- How has this bug affected you? What were you trying to accomplish? -->
<!--- If you feel this should be a low/medium/high priority then please state so -->

#### Your Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
* Pimap Version used:
* Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)):
* Environment name and version (e.g. MySQL, PHP 7):
* Operating System and version (e.g Ubuntu 16.04):

27 changes: 27 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!--- Provide a general summary of your changes in the Title above -->

## Description
<!--- Describe your changes in detail -->
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!--- Please link to the issue here unless your commit contains the issue number -->

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->

## How To Test This
<!--- Please describe in detail how to test your changes. -->

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

### Final checklist
<!--- Go over all the following points and check all the boxes that apply. --->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --->
- [ ] My change requires a change to the documentation.

<!--- Your pull request will be tested via Travis CI to automatically indicate that your changes do not prevent compilation. --->

<!--- If it reports back that there are problems, you can log into the Travis system and check the log report for your pull request to see what the problem was. --->
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.idea/
*.lock
*.ignore
vendor/
nbproject/
.buildpath
.project
.settings
.ignore/
tags
static/
29 changes: 29 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
language: php
php:
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2

matrix:
fast_finish: true
jobs:
include:
- stage: codecoverage
if: type IN (pull_request) OR branch in (master)
php: 7.0
script: ./vendor/bin/codecept run unit -f --steps -v -d --coverage-xml;bash < (curl -s https://codecov.io/bash) -f tests/_output/coverage.xml;
sudo: false
dist: trusty

install:
- composer self-update && composer --version

script:
# Run the unit tests
- ./vendor/bin/codecept run -f unit

branches:
only:
- master
35 changes: 35 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Code of Conduct #

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.

Examples of behaviour that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community in a professional manner
* Showing empathy towards other community members

Examples of unacceptable behaviour by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

The Pimap project maintainers are responsible for clarifying the standards of acceptable behaviour and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behaviour. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.

The Pimap 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 behaviours that they deem inappropriate, threatening, offensive, or harmful.

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, within project forums, posting via an official social media account, or acting as an appointed representative at an online or offline event.

Instances of abusive, harassing, or otherwise unacceptable behaviour may be reported by contacting the project team at [[email protected]][community_email]. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and 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.

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[community_email]: mailto:[email protected]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
17 changes: 17 additions & 0 deletions COPYRIGHT
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*********************************************************************************
* Pimap is a PHP IMAP library developed by SalesAgility Ltd.
* Copyright (C) 2018 SalesAgility Ltd.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************************/
82 changes: 82 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# PHP Internet Message Access Protocol (Pimap)
A PHP Library for communication with IMAP Servers.

[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)

### Rationale
When communication with an IMAP email server involves a high amount of latency,
it helps to be able to hand craft commands, so that we can reduce the quantity of commands being sent to the server. The PHP IMAP extension
does not offer such control of over the transport layer of the IMAP protocol. This library replaces the PHP IMAP extension
and provides full control over the entire process.

### Features
- Fewer combined calls
- Decrease latency
- Command builder
- IMAP Connection Manager
- IMAP Response Interpreters
- Pipeline for caching commands and responses
- PSR 3 logger aware
- Mock objects for automated testing

### Compliant
- [RFC 3501](https://tools.ietf.org/html/rfc3501) IMAP version 4rev1
- [RFC 2822](https://tools.ietf.org/html/rfc2822) Internet Message Format
- [RFC 2045](https://tools.ietf.org/html/rfc2045) Multipurpose Internet Mail Extensions


### Dependencies
Dependencies are managed by [composer](https://getcomposer.org/). Please see the composer.json file for a complete list of dependencies.

### Contributing to the Pimap project
Please read and sign the following [contributor agreement][cont_agrmt]

[cont_agrmt]: https://www.clahub.com/agreements/salesagility/Pimap

The Contributor Agreement only needs to be signed once for all pull requests and contributions.

Once signed and confirmed, any pull requests will be considered for inclusion in the Pimap project.

#### Security

We take security seriously here at SalesAgility so if you have discovered a security risk report it by
emailing [email protected]. This will be delivered to the product team who handle security issues.
Please don't disclose security bugs publicly until they have been handled by the security team.

Your email will be acknowledged within 24 hours during the business week (Mon - Fri), and you’ll receive a more
detailed response to your email within 72 hours during the business week (Mon - Fri) indicating the next steps in
handling your report.

### Add to your project (Composer)

```bash
composer require "SalesAgility/pimap"
```

### Getting Help
All the documentation is situated in the docs directory. The documentation in this project is written in mark down and generated using [Daux.io](https://daux.io/).

#### Generate Documentation
To build the documentation

```bash
cd /path/to/pimap/
./vendor/bin/daux
```

open the generated _static/index.html_ file.

#### Host Documentation
When updating the documentation, it helps to be able to see a live copy of your changes. Daux.io provides a built in web server.

```bash
cd /path/to/pimap/
./vendor/bin/daux serve
```

this command will output something similar to:
```bash
Daux development server started on http://localhost:8085/
```

in this case you can access **http://localhost:8085/** in your web browser.
Loading

0 comments on commit c3f7717

Please sign in to comment.