Skip to content

Commit

Permalink
Merge pull request #292 from mike42/development
Browse files Browse the repository at this point in the history
Changes for release 1.5
  • Loading branch information
mike42 authored Feb 10, 2017
2 parents b3665b9 + b03b99e commit 56e0640
Show file tree
Hide file tree
Showing 20 changed files with 940 additions and 124 deletions.
4 changes: 4 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
service_name: travis-ci
coverage_clover: build/logs/clover.xml
json_path: build/logs/coveralls-upload.json

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ doc/doxygen_sqlite3.db
# composer files
vendor/

# other build files
build/*
*.phar
16 changes: 15 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ php:
- 5.5
- 5.6
- 7.0
- 7.1
- hhvm
- nightly

Expand All @@ -17,7 +18,20 @@ matrix:
install:
- composer install

before_script:
# Install 'imagick' plugin (pecl will not install it on 5.3, hhvm does not use pecl)
- sh -c "if [ $TRAVIS_PHP_VERSION != 'hhvm' ] && [ $TRAVIS_PHP_VERSION != '5.3' ]; then printf "\n" | pecl install imagick; fi"
# Directory for coverage report
- mkdir -p build/logs/

script:
# Check code style
- php vendor/bin/phpcs --standard=psr2 src/ -n
- php vendor/bin/phpunit --configuration test/phpunit.xml --coverage-text
# Run tests
- php vendor/bin/phpunit --coverage-clover build/logs/clover.xml

after_success:
# Upload coverage statistics to coveralls service after test
- wget -c -nc https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar
- php coveralls.phar -v
...
65 changes: 65 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# How to contribute

This project is open to many different types of contribution. You can help with improving the documentation and examples, sharing your insights on the issue tracker, adding fixes to the code, providing test cases, or just [writing about your hardware setup that you use](https://github.com/mike42/escpos-php/issues/new).

## Issue tracker

Open issues of all sorts are tracked on the [issue tracker](https://github.com/mike42/escpos-php/issues). Please check [the FAQ](https://github.com/mike42/escpos-php/blob/development/doc/FAQ.md) before you post, and practice good [bug tracker etiquette](https://bugzilla.mozilla.org/page.cgi?id=etiquette.html) to keep it running smoothly.

Issues are [loosely categorised](https://github.com/mike42/escpos-php/labels), and will stay open while there is still something that can be resolved.

Anybody may add to the discussion on the bug tracker. Just be sure to add new questions as separate issues, and to avoid commenting on closed issues.

## Submitting changes

Code changes may be submitted as a "[pull request](https://help.github.com/articles/about-pull-requests/)" at [mike42/escpos-php](https://github.com/mike42/escpos-php). The description should include some information about how the change improves the library.

The project is MIT-licensed (see [LICENSE.md](https://github.com/mike42/escpos-php/blob/development/LICENSE.md) for details). You are not required to assign copyright in order to submit changes, but you do need to agree for your code to be distributed under this license in order for it to be accepted.

### Documentation changes

The official documentaton is also located in the main repository, under the [doc/](https://github.com/mike42/escpos-php/tree/development/doc) folder.

You are welcome to post any suggested improvements as pull requests.

### Release process

Once a pull request is accepted, it usually appears in a release a few days later.

Branches:

- "development" is the most recent code, possibly containing unreleased fixes
- "master" contains the most recently released code (old versions are not maintained).

The release process for your changes is:

- Changes are submitted via pull request to the shared "development" branch.
- A new release is staged on the "master" branch via another pull request, and then tagged.

## Code style

This project uses the [PSR-2 standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) for all PHP source code.

## Testing and CI

The tests are executed on [Travis CI](https://travis-ci.org/mike42/escpos-php) over PHP 5.3, 5.4, 5.5, 5.7, 7, and HHVM. Earlier versions of PHP are not supported.

For development, it's suggested that you load `imagick`, `gd` and `Xdebug` PHP exensions, and install `composer`.

Fetch a copy of this code and load dependencies with composer:

git clone https://github.com/mike42/escpos-php
cd escpos-php/
composer install

Execute unit tests via `phpunit`:

php vendor/bin/phpunit --coverage-text

Code style can be checked via [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer):

php vendor/bin/phpcs --standard=psr2 src/ -n

The developer docs are built with [doxygen](https://github.com/doxygen/doxygen). Re-build them to check for documentation warnings:

make -C doc clean && make -C doc
11 changes: 5 additions & 6 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
escpos-php: PHP receipt printer library for use with ESC/POS-compatible
thermal and impact printers.
MIT License

Copyright (c) 2014-16 Michael Billington <[email protected]>,
incorporating modifications by others. See CONTRIBUTORS.md for a full list.
Copyright (c) 2014-2016 Michael Billington, incorporating modifications by others.
See CONTRIBUTORS.md for a full list.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Expand Down
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[![Build Status](https://travis-ci.org/mike42/escpos-php.svg?branch=master)](https://travis-ci.org/mike42/escpos-php) [![Latest Stable Version](https://poser.pugx.org/mike42/escpos-php/v/stable)](https://packagist.org/packages/mike42/escpos-php)
[![Total Downloads](https://poser.pugx.org/mike42/escpos-php/downloads)](https://packagist.org/packages/mike42/escpos-php)
[![License](https://poser.pugx.org/mike42/escpos-php/license)](https://packagist.org/packages/mike42/escpos-php)
[![Coverage Status](https://coveralls.io/repos/github/mike42/escpos-php/badge.svg?branch=development)](https://coveralls.io/github/mike42/escpos-php?branch=development)

This project implements a subset of Epson's ESC/POS protocol for thermal receipt printers. It allows you to generate and print receipts with basic formatting, cutting, and barcodes on a compatible printer.

Expand Down Expand Up @@ -74,24 +75,28 @@ Many thermal receipt printers support ESC/POS to some degree. This driver has be
- EPOS TEP 220M
- Epson TM-T88III
- Epson TM-T88IV
- Epson TM-T88V
- Epson TM-T70
- Epson TM-T82II
- Epson TM-T20
- Epson TM-T70II
- Epson TM-U220
- Epson FX-890 (requires `feedForm()` to release paper).
- Excelvan HOP-E58 (connect through powered hub)
- Excelvan HOP-E801 (as above)
- Excelvan HOP-E58
- Excelvan HOP-E200
- Excelvan HOP-E801
- Excelvan ZJ-8220
- Gainscha GP-5890x (Also marketed as EC Line 5890x)
- Gainscha GP-U80300I
- Hasar HTP 250
- Metapace T-1
- Okipos 80 Plus III
- P-822D
- P85A-401 (make unknown)
- Rongta RP326US
- SEYPOS PRP-300 (Also marketed as TYSSO PRP-300)
- Silicon SP-201 / RP80USE
- Star TSP100 ECO
- Star TSP-650
- Star TUP-592
- Xprinter XP-Q800
Expand Down Expand Up @@ -487,7 +492,7 @@ Posts I've written up for people who are learning how to use receipt printers:

* [What is ESC/POS, and how do I use it?](https://mike42.me/blog/what-is-escpos-and-how-do-i-use-it), which documents the output of `example/demo.php`.
* [Setting up an Epson receipt printer](https://mike42.me/blog/2014-20-26-setting-up-an-epson-receipt-printer)
* [Getting a USB receipt printer working on Linux](http:s//mike42.me/blog/2015-03-getting-a-usb-receipt-printer-working-on-linux)
* [Getting a USB receipt printer working on Linux](https://mike42.me/blog/2015-03-getting-a-usb-receipt-printer-working-on-linux)

# Development

Expand All @@ -505,7 +510,7 @@ Fetch a copy of this code and load dependencies with composer:

Execute unit tests via `phpunit`:

php vendor/bin/phpunit --configuration test/phpunit.xml --coverage-text
php vendor/bin/phpunit --coverage-text

This project uses the PSR-2 standard, which can be checked via [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer):

Expand Down
55 changes: 31 additions & 24 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
{
"name": "mike42/escpos-php",
"type": "library",
"description": "PHP receipt printer library for use with ESC/POS-compatible thermal and impact printers",
"homepage": "https://github.com/mike42/escpos-php",
"keywords": ["receipt", "print", "escpos", "ESC-POS", "driver"],
"license": "MIT",
"authors": [
{
"name": "Michael Billington",
"email": "[email protected]"
}
],
"require": {
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "4.5.*",
"squizlabs/php_codesniffer": "2.*"
},
"autoload": {
"psr-4": {
"Mike42\\": "src/Mike42"
}
}
"name": "mike42/escpos-php",
"type": "library",
"description": "PHP receipt printer library for use with ESC/POS-compatible thermal and impact printers",
"homepage": "https://github.com/mike42/escpos-php",
"keywords": ["receipt", "print", "escpos", "ESC-POS", "driver"],
"license": "MIT",
"authors": [
{
"name": "Michael Billington",
"email": "[email protected]"
}
],
"config": {
"platform": {
"php": "5.3.9"
}
},
"require": {
"php": ">=5.3.9",
"ext-mbstring": "*",
"guzzlehttp/guzzle": "^3.8"
},
"require-dev": {
"phpunit/phpunit": "4.8.*",
"squizlabs/php_codesniffer": "2.*"
},
"autoload": {
"psr-4": {
"Mike42\\": "src/Mike42"
}
}
}
Loading

0 comments on commit 56e0640

Please sign in to comment.