mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-09-01 13:08:14 +00:00
:octocat: v5.0.x branch adjustments
This commit is contained in:
@@ -1,2 +0,0 @@
|
||||
ko_fi: codemasher
|
||||
custom: "https://www.paypal.com/donate?hosted_button_id=WLYUNAT9ZTJZ4"
|
||||
@@ -1,51 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: You have found a bug? Does the library not behave as expected? That's great (ok, not that great)! Please help us to improve!
|
||||
title: '[BUG]'
|
||||
labels: 'bug'
|
||||
---
|
||||
|
||||
<!--
|
||||
Please FOLLOW THE ISSUE TEMPLATE unless you have a good reason not to.
|
||||
If you have a question or an issue that is not a bug,
|
||||
please use the Q&A section under discussions instead. Thanks!
|
||||
-->
|
||||
|
||||
**Describe the bug or unexpected behaviour**
|
||||
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
|
||||
**Steps to reproduce the behavior**
|
||||
|
||||
- When i do ...
|
||||
- The code below ...
|
||||
- Error message: ...
|
||||
|
||||
|
||||
**Code sample** (if applicable)
|
||||
|
||||
```php
|
||||
// your code here
|
||||
```
|
||||
|
||||
|
||||
**Expected behavior**
|
||||
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
|
||||
**Screenshots**
|
||||
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
|
||||
**Environment (please complete the following information):**
|
||||
|
||||
- PHP version/OS: [e.g. 7.4.12, Ubuntu 20.04]
|
||||
- Library version: [e.g. 4.3.1]
|
||||
|
||||
|
||||
**Additional context**
|
||||
|
||||
Add any other context about the problem here.
|
||||
@@ -1,5 +0,0 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: "You have a question or an issue that is not a bug?"
|
||||
about: "Please use the Q&A section under discussions. Thanks!"
|
||||
url: https://github.com/chillerlan/php-qrcode/discussions
|
||||
@@ -1,26 +0,0 @@
|
||||
---
|
||||
name: Documentation
|
||||
about: There's an issue with the documentation or you have a proposal for an addition?
|
||||
title: '[DOCS]'
|
||||
labels: 'docs'
|
||||
---
|
||||
|
||||
<!--
|
||||
Please FOLLOW THE ISSUE TEMPLATE unless you have a good reason not to.
|
||||
If you have a question or an issue that has nothing to do with the documentation,
|
||||
please use the Q&A section under discussions instead. Thanks!
|
||||
-->
|
||||
|
||||
**Describe the documentation issue or addition**
|
||||
|
||||
A clear and concise description of the issue or addition.
|
||||
|
||||
|
||||
**Proposed change/addition** (if applicable)
|
||||
|
||||
The new or changed documentation text.
|
||||
|
||||
|
||||
**Additional context**
|
||||
|
||||
Add any other context here (if applicable), for example a link to the current documentation or an issue/discussion.
|
||||
@@ -1,33 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: You have an idea for a new feature (or improve an existing one)? Great!
|
||||
title: '[ENHANCEMENT]'
|
||||
labels: 'enhancement'
|
||||
---
|
||||
|
||||
<!--
|
||||
Please FOLLOW THE ISSUE TEMPLATE unless you have a good reason not to.
|
||||
If you have a question or an issue that is not a feature request,
|
||||
please use the Q&A section under discussions instead. Thanks!
|
||||
-->
|
||||
|
||||
**Describe the feature**
|
||||
|
||||
A clear and concise description of the requested feature.
|
||||
|
||||
|
||||
**Code sample** (if applicable)
|
||||
|
||||
```php
|
||||
// your code here
|
||||
```
|
||||
|
||||
|
||||
**Additional context**
|
||||
|
||||
Add any other context here (if applicable).
|
||||
|
||||
|
||||
**Are you (the requester) willing to submit a pull request for that feature?**
|
||||
|
||||
[YES|NO] (A yes will greatly increase the chance that the feature will be added)
|
||||
@@ -1,31 +0,0 @@
|
||||
<!-- You can erase any parts of this template not applicable to your Pull Request. -->
|
||||
|
||||
## Proposed changes
|
||||
|
||||
<!-- Describe your changes here to communicate to the maintainers why you'd like to include this pull request.
|
||||
If it fixes a bug or resolves a feature request, be sure to link to that issue. -->
|
||||
|
||||
|
||||
## Types of changes
|
||||
|
||||
<!-- Put an `x` in the boxes that apply -->
|
||||
|
||||
What types of changes does your code introduce?
|
||||
|
||||
- [ ] Bugfix (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 not work as expected)
|
||||
|
||||
|
||||
## Checklist:
|
||||
|
||||
- [ ] I have checked to ensure there aren't other open [Issues](../../../issues) or [Pull Requests](../../../pulls) for the same update/change
|
||||
- [ ] I have added tests that prove my fix is effective or that my feature works
|
||||
- [ ] I have added necessary documentation (if appropriate)
|
||||
- [ ] Any dependent changes have been merged and published in downstream modules
|
||||
- [ ] Lint and unit tests pass locally with my changes
|
||||
|
||||
|
||||
## Further comments
|
||||
|
||||
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...
|
||||
@@ -4,10 +4,10 @@
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- v5.0.x
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- v5.0.x
|
||||
|
||||
name: "Continuous Integration"
|
||||
|
||||
@@ -96,68 +96,3 @@ jobs:
|
||||
with:
|
||||
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
||||
coverage-reports: .build/coverage/clover.xml
|
||||
|
||||
|
||||
build-docs:
|
||||
name: "Build and publish API docs"
|
||||
if: github.ref_name == 'main'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: "Checkout sources"
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: "Install PHP"
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: "8.1"
|
||||
coverage: none
|
||||
tools: phpDocumentor
|
||||
extensions: fileinfo, gd, imagick, json, mbstring
|
||||
|
||||
- name: "Build API docs"
|
||||
run: phpdoc --config=phpdoc.xml.dist
|
||||
|
||||
- name: "Publish API docs to branch gh-pages"
|
||||
uses: JamesIves/github-pages-deploy-action@v4
|
||||
with:
|
||||
branch: gh-pages
|
||||
folder: .build/phpdocs
|
||||
clean: true
|
||||
|
||||
|
||||
build-manual:
|
||||
name: "Build and publish user manual"
|
||||
if: github.ref_name == 'main'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: "Checkout sources"
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: "Install PHP"
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: "8.1"
|
||||
coverage: none
|
||||
|
||||
- name: "Install Sphinx"
|
||||
run: pip install sphinx myst-parser sphinx-rtd-theme
|
||||
|
||||
- name: "Install dependencies with composer"
|
||||
uses: ramsey/composer-install@v2
|
||||
|
||||
- name: "Build QROptions doc"
|
||||
run: php docs/qroptions-doc.php
|
||||
|
||||
- name: "Build manual"
|
||||
run: |
|
||||
cd docs
|
||||
make html
|
||||
|
||||
- name: "Publish user manual to branch readthedocs"
|
||||
uses: JamesIves/github-pages-deploy-action@v4
|
||||
with:
|
||||
branch: readthedocs
|
||||
folder: .build/sphinx/html
|
||||
clean: true
|
||||
|
||||
@@ -17,16 +17,16 @@ It also features a QR Code reader based on a [PHP port](https://github.com/khana
|
||||
[php]: https://www.php.net/supported-versions.php
|
||||
[packagist-badge]: https://img.shields.io/packagist/v/chillerlan/php-qrcode.svg?logo=packagist
|
||||
[packagist]: https://packagist.org/packages/chillerlan/php-qrcode
|
||||
[gh-action-badge]: https://img.shields.io/github/actions/workflow/status/chillerlan/php-qrcode/ci.yml?branch=main&logo=github
|
||||
[gh-action-badge]: https://img.shields.io/github/actions/workflow/status/chillerlan/php-qrcode/ci.yml?branch=v5.0.x&logo=github
|
||||
[gh-action]: https://github.com/chillerlan/php-qrcode/actions/workflows/ci.yml?query=branch%3Amain
|
||||
[coverage-badge]: https://img.shields.io/codecov/c/github/chillerlan/php-qrcode/main?logo=codecov
|
||||
[coverage]: https://app.codecov.io/gh/chillerlan/php-qrcode/tree/main
|
||||
[codacy-badge]: https://img.shields.io/codacy/grade/edccfc4fe5a34b74b1c53ee03f097b8d/main?logo=codacy
|
||||
[codacy]: https://app.codacy.com/gh/chillerlan/php-qrcode/dashboard?branch=main
|
||||
[coverage-badge]: https://img.shields.io/codecov/c/github/chillerlan/php-qrcode/v5.0.x?logo=codecov
|
||||
[coverage]: https://app.codecov.io/gh/chillerlan/php-qrcode/tree/v5.0.x
|
||||
[codacy-badge]: https://img.shields.io/codacy/grade/edccfc4fe5a34b74b1c53ee03f097b8d/v5.0.x?logo=codacy
|
||||
[codacy]: https://app.codacy.com/gh/chillerlan/php-qrcode/dashboard?branch=v5.0.x
|
||||
[downloads-badge]: https://img.shields.io/packagist/dt/chillerlan/php-qrcode?logo=packagist
|
||||
[downloads]: https://packagist.org/packages/chillerlan/php-qrcode/stats
|
||||
[readthedocs-badge]: https://img.shields.io/readthedocs/php-qrcode/main?logo=readthedocs
|
||||
[readthedocs]: https://php-qrcode.readthedocs.io/en/main/
|
||||
[readthedocs-badge]: https://img.shields.io/readthedocs/php-qrcode/v5.0.x?logo=readthedocs
|
||||
[readthedocs]: https://php-qrcode.readthedocs.io/en/v5.0.x/
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -66,14 +66,14 @@ For the QRCode reader, either `ext-gd` or `ext-imagick` is required!
|
||||
|
||||
## Documentation
|
||||
|
||||
- The user manual is at https://php-qrcode.readthedocs.io/ ([sources](https://github.com/chillerlan/php-qrcode/tree/main/docs))
|
||||
- The user manual is at https://php-qrcode.readthedocs.io/ ([sources](https://github.com/chillerlan/php-qrcode/tree/v5.0.x/docs))
|
||||
- An API documentation created with [phpDocumentor](https://www.phpdoc.org/) can be found at https://chillerlan.github.io/php-qrcode/
|
||||
- The documentation for the `QROptions` container can be found here: [chillerlan/php-settings-container](https://github.com/chillerlan/php-settings-container#readme)
|
||||
|
||||
|
||||
## Installation with [composer](https://getcomposer.org)
|
||||
|
||||
See [the installation guide](https://php-qrcode.readthedocs.io/en/main/Usage-Installation.html) for more info!
|
||||
See [the installation guide](https://php-qrcode.readthedocs.io/en/v5.0.x/Usage-Installation.html) for more info!
|
||||
|
||||
|
||||
### Terminal
|
||||
@@ -89,12 +89,12 @@ composer require chillerlan/php-qrcode
|
||||
{
|
||||
"require": {
|
||||
"php": "^7.4 || ^8.0",
|
||||
"chillerlan/php-qrcode": "dev-main#<commit_hash>"
|
||||
"chillerlan/php-qrcode": "v5.0.x-dev#<commit_hash>"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Note: replace `dev-main` with a [version constraint](https://getcomposer.org/doc/articles/versions.md#writing-version-constraints), e.g. `^4.3` - see [releases](https://github.com/chillerlan/php-qrcode/releases) for valid versions.
|
||||
Note: replace `v5.0.x-dev` with a [version constraint](https://getcomposer.org/doc/articles/versions.md#writing-version-constraints), e.g. `^4.3` - see [releases](https://github.com/chillerlan/php-qrcode/releases) for valid versions.
|
||||
|
||||
|
||||
## Quickstart
|
||||
@@ -108,11 +108,11 @@ $data = 'otpauth://totp/test?secret=B3JX4VCVJDVNXNZ5&issuer=chillerlan.net';
|
||||
echo '<img src="'.(new QRCode)->render($data).'" alt="QR Code" />';
|
||||
```
|
||||
|
||||
Wait, what was that? Please again, slower! See [Advanced usage](https://php-qrcode.readthedocs.io/en/main/Usage/Advanced-usage.html) in the manual.
|
||||
Also, have a look [in the examples folder](https://github.com/chillerlan/php-qrcode/tree/main/examples) for some more usage examples.
|
||||
Wait, what was that? Please again, slower! See [Advanced usage](https://php-qrcode.readthedocs.io/en/v5.0.x/Usage/Advanced-usage.html) in the manual.
|
||||
Also, have a look [in the examples folder](https://github.com/chillerlan/php-qrcode/tree/v5.0.x/examples) for some more usage examples.
|
||||
|
||||
<p align="center">
|
||||
<img alt="QR codes are awesome!" style="width: auto; height: 530px;" src="https://raw.githubusercontent.com/chillerlan/php-qrcode/main/.github/images/example.svg">
|
||||
<img alt="QR codes are awesome!" style="width: auto; height: 530px;" src="https://raw.githubusercontent.com/chillerlan/php-qrcode/v5.0.x/.github/images/example.svg">
|
||||
</p>
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ catch(Throwable $e){
|
||||
Hi, please check out some of my other projects that are way cooler than qrcodes!
|
||||
|
||||
- [js-qrcode](https://github.com/chillerlan/js-qrcode) - a javascript port of this library
|
||||
- [php-authenticator](https://github.com/chillerlan/php-authenticator) - a Google Authenticator implementation (see [authenticator example](https://github.com/chillerlan/php-qrcode/blob/main/examples/authenticator.php))
|
||||
- [php-authenticator](https://github.com/chillerlan/php-authenticator) - a Google Authenticator implementation (see [authenticator example](https://github.com/chillerlan/php-qrcode/blob/v5.0.x/examples/authenticator.php))
|
||||
- [php-httpinterface](https://github.com/chillerlan/php-httpinterface) - a PSR-7/15/17/18 implemetation
|
||||
- [php-oauth-core](https://github.com/chillerlan/php-oauth-core) - an OAuth 1/2 client library along with a bunch of [providers](https://github.com/chillerlan/php-oauth-providers)
|
||||
- [php-database](https://github.com/chillerlan/php-database) - a database client & querybuilder for MySQL, Postgres, SQLite, MSSQL, Firebird
|
||||
@@ -158,7 +158,7 @@ I don't take responsibility for molten CPUs, misled applications, failed log-ins
|
||||
### License notice
|
||||
|
||||
- Parts of this code are [ported to PHP](https://github.com/codemasher/php-qrcode-decoder) from the [ZXing project](https://github.com/zxing/zxing) and licensed under the [Apache License, Version 2.0](./NOTICE).
|
||||
- [The documentation](https://github.com/chillerlan/php-qrcode/tree/main/docs) is licensed under the [Creative Commons Attribution 4.0 International (CC BY 4.0) License](https://creativecommons.org/licenses/by/4.0/).
|
||||
- [The documentation](https://github.com/chillerlan/php-qrcode/tree/v5.0.x/docs) is licensed under the [Creative Commons Attribution 4.0 International (CC BY 4.0) License](https://creativecommons.org/licenses/by/4.0/).
|
||||
|
||||
|
||||
### Trademark Notice
|
||||
|
||||
@@ -54,7 +54,7 @@ You want to contribute code to fix something or add a feature? Hey that's cool!
|
||||
|
||||
- Please add a description of what the PR does or fixes and why it should be merged. If you're unsure, [open an issue](https://github.com/chillerlan/php-qrcode/issues/new?assignees=&labels=enhancement&projects=&template=feature_request.md&title=%5BENHANCEMENT%5D) before to gather feedback.
|
||||
- Make sure your branch is up-to-date/even with the upstream branch you're submitting your PR to.
|
||||
- Please try to adhere to the [*loosely outlined* coding standards](https://github.com/chillerlan/php-qrcode/discussions/60), or, in case you're using [PHPStorm](https://www.jetbrains.com/phpstorm/), make sure you're using [the supplied IDE profile](https://github.com/chillerlan/php-qrcode/tree/main/.idea).
|
||||
- Please try to adhere to the [*loosely outlined* coding standards](https://github.com/chillerlan/php-qrcode/discussions/60), or, in case you're using [PHPStorm](https://www.jetbrains.com/phpstorm/), make sure you're using [the supplied IDE profile](https://github.com/chillerlan/php-qrcode/tree/v5.0.x/.idea).
|
||||
|
||||
|
||||
## Documentation
|
||||
@@ -63,5 +63,5 @@ The documentation is a work in progress - any suggestion and contribution is ver
|
||||
If you have an addition or correction, feel fre to open a [documentation issue](https://github.com/chillerlan/php-qrcode/issues/new?assignees=&labels=docs&projects=&template=documentation.md&title=%5BDOCS%5D).
|
||||
|
||||
|
||||
The API documentation is auto generated with [phpDocumentor](https://www.phpdoc.org/) from the docblocks [in the PHP sources](https://github.com/chillerlan/php-qrcode/tree/main/src).
|
||||
The markdown sources for the [Read the Docs online manual](https://php-qrcode.readthedocs.io) are located in the [/docs directory](https://github.com/chillerlan/php-qrcode/tree/main/docs)
|
||||
The API documentation is auto generated with [phpDocumentor](https://www.phpdoc.org/) from the docblocks [in the PHP sources](https://github.com/chillerlan/php-qrcode/tree/v5.0.x/src).
|
||||
The markdown sources for the [Read the Docs online manual](https://php-qrcode.readthedocs.io) are located in the [/docs directory](https://github.com/chillerlan/php-qrcode/tree/v5.0.x/docs)
|
||||
|
||||
@@ -147,7 +147,7 @@ The parameters `algorithm`, `digits` and `period` may not be supported by some d
|
||||
- [RFC 6238 - Time-Based One-Time Password Algorithm](https://datatracker.ietf.org/doc/html/rfc6238)
|
||||
- [Google Authenticator (Wikipedia)](https://en.wikipedia.org/wiki/Google_Authenticator)
|
||||
- [google-authenticator: Key Uri Format (GitHub)](https://github.com/google/google-authenticator/wiki/Key-Uri-Format)
|
||||
- [php-qrcode: Authenticator example (GitHub)](https://github.com/chillerlan/php-qrcode/blob/main/examples/authenticator.php)
|
||||
- [php-qrcode: Authenticator example (GitHub)](https://github.com/chillerlan/php-qrcode/blob/v5.0.x/examples/authenticator.php)
|
||||
|
||||
|
||||
## Wireless Network configuration
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# QREps
|
||||
|
||||
[Class `QREps`](https://github.com/chillerlan/php-qrcode/blob/main/src/Output/QREps.php): [Encapsulated Postscript](https://en.wikipedia.org/wiki/Encapsulated_PostScript) (EPS) output.
|
||||
[Class `QREps`](https://github.com/chillerlan/php-qrcode/blob/v5.0.x/src/Output/QREps.php): [Encapsulated Postscript](https://en.wikipedia.org/wiki/Encapsulated_PostScript) (EPS) output.
|
||||
|
||||
|
||||
## Example
|
||||
|
||||
See: [EPS example](https://github.com/chillerlan/php-qrcode/blob/main/examples/eps.php)
|
||||
See: [EPS example](https://github.com/chillerlan/php-qrcode/blob/v5.0.x/examples/eps.php)
|
||||
|
||||
Set the options:
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# QRFpdf
|
||||
|
||||
[Class `QRFpdf`](https://github.com/chillerlan/php-qrcode/blob/main/src/Output/QRFpdf.php): [Portable Document Format](https://en.wikipedia.org/wiki/PDF) (PDF) output via [FPDF](https://github.com/setasign/fpdf)
|
||||
[Class `QRFpdf`](https://github.com/chillerlan/php-qrcode/blob/v5.0.x/src/Output/QRFpdf.php): [Portable Document Format](https://en.wikipedia.org/wiki/PDF) (PDF) output via [FPDF](https://github.com/setasign/fpdf)
|
||||
|
||||
|
||||
## Example
|
||||
|
||||
See: [FPDF example](https://github.com/chillerlan/php-qrcode/blob/main/examples/fpdf.php)
|
||||
See: [FPDF example](https://github.com/chillerlan/php-qrcode/blob/v5.0.x/examples/fpdf.php)
|
||||
|
||||
Set the options:
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# QRGdImage
|
||||
|
||||
[Class `QRGdImage`](https://github.com/chillerlan/php-qrcode/blob/main/src/Output/QRGdImage.php): [GdImage](https://www.php.net/manual/book.image) raster graphic output (GIF, JPG, PNG)
|
||||
[Class `QRGdImage`](https://github.com/chillerlan/php-qrcode/blob/v5.0.x/src/Output/QRGdImage.php): [GdImage](https://www.php.net/manual/book.image) raster graphic output (GIF, JPG, PNG)
|
||||
|
||||
|
||||
## Example
|
||||
|
||||
See: [GdImage example](https://github.com/chillerlan/php-qrcode/blob/main/examples/image.php)
|
||||
See: [GdImage example](https://github.com/chillerlan/php-qrcode/blob/v5.0.x/examples/image.php)
|
||||
|
||||
Set the options:
|
||||
```php
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# QRImagick
|
||||
|
||||
[Class `QRImagick`](https://github.com/chillerlan/php-qrcode/blob/main/src/Output/QRImagick.php): [ImageMagick](https://www.php.net/manual/book.imagick) output, [multiple supported image formats](https://imagemagick.org/script/formats.php)
|
||||
[Class `QRImagick`](https://github.com/chillerlan/php-qrcode/blob/v5.0.x/src/Output/QRImagick.php): [ImageMagick](https://www.php.net/manual/book.imagick) output, [multiple supported image formats](https://imagemagick.org/script/formats.php)
|
||||
|
||||
Please follow the installation guides for your operating system:
|
||||
|
||||
@@ -11,7 +11,7 @@ Please follow the installation guides for your operating system:
|
||||
|
||||
## Example
|
||||
|
||||
See: [ImageMagick example](https://github.com/chillerlan/php-qrcode/blob/main/examples/imagick.php)
|
||||
See: [ImageMagick example](https://github.com/chillerlan/php-qrcode/blob/v5.0.x/examples/imagick.php)
|
||||
|
||||
Set the options:
|
||||
```php
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# QRMarkupHTML
|
||||
|
||||
[Class `QRMarkupHTML`](https://github.com/chillerlan/php-qrcode/blob/main/src/Output/QRMarkupHTML.php): HTML output
|
||||
[Class `QRMarkupHTML`](https://github.com/chillerlan/php-qrcode/blob/v5.0.x/src/Output/QRMarkupHTML.php): HTML output
|
||||
|
||||
This class is a cheap markup substitute for when SVG is not available or not an option (which was an issue before ca 2012).
|
||||
As a general rule: if you plan to display the QR Code in a web browser, you should be using the [SVG output](../Built-In-Output/QRMarkupSVG.md).
|
||||
@@ -8,7 +8,7 @@ As a general rule: if you plan to display the QR Code in a web browser, you shou
|
||||
|
||||
## Example
|
||||
|
||||
See: [HTML example](https://github.com/chillerlan/php-qrcode/blob/main/examples/html.php)
|
||||
See: [HTML example](https://github.com/chillerlan/php-qrcode/blob/v5.0.x/examples/html.php)
|
||||
|
||||
Set the options:
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# QRMarkupSVG
|
||||
|
||||
[Class `QRMarkupSVG`](https://github.com/chillerlan/php-qrcode/blob/main/src/Output/QRMarkupSVG.php): [Scalable Vector Graphics](https://developer.mozilla.org/en-US/docs/Glossary/SVG) (SVG) output
|
||||
[Class `QRMarkupSVG`](https://github.com/chillerlan/php-qrcode/blob/v5.0.x/src/Output/QRMarkupSVG.php): [Scalable Vector Graphics](https://developer.mozilla.org/en-US/docs/Glossary/SVG) (SVG) output
|
||||
|
||||
## Example
|
||||
|
||||
See: [ImageMagick example](https://github.com/chillerlan/php-qrcode/blob/main/examples/imagick.php)
|
||||
See: [ImageMagick example](https://github.com/chillerlan/php-qrcode/blob/v5.0.x/examples/imagick.php)
|
||||
|
||||
Set the options:
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# QRString
|
||||
|
||||
[Class `QRString`](https://github.com/chillerlan/php-qrcode/blob/main/src/Output/QRString.php): String output: plain text, [JSON](https://developer.mozilla.org/en-US/docs/Glossary/JSON)
|
||||
[Class `QRString`](https://github.com/chillerlan/php-qrcode/blob/v5.0.x/src/Output/QRString.php): String output: plain text, [JSON](https://developer.mozilla.org/en-US/docs/Glossary/JSON)
|
||||
|
||||
## Plain text
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ $options->moduleValues = [
|
||||
];
|
||||
```
|
||||
|
||||
The several output classes may need different substitute values (you can find examples [in the test `moduleValueProvider()` for each output class](https://github.com/chillerlan/php-qrcode/tree/main/tests/Output)):
|
||||
The several output classes may need different substitute values (you can find examples [in the test `moduleValueProvider()` for each output class](https://github.com/chillerlan/php-qrcode/tree/v5.0.x/tests/Output)):
|
||||
|
||||
```php
|
||||
// for HTML, SVG and ImageMagick
|
||||
|
||||
@@ -224,7 +224,7 @@ class MyOutput extends QROutputAbstract{
|
||||
}
|
||||
```
|
||||
|
||||
Sometimes it can be necessary to override `collectModules()` in order to apply special effects such as random colors - you can find some implementations in [the SVG examples](https://github.com/chillerlan/php-qrcode/tree/main/examples).
|
||||
Sometimes it can be necessary to override `collectModules()` in order to apply special effects such as random colors - you can find some implementations in [the SVG examples](https://github.com/chillerlan/php-qrcode/tree/v5.0.x/examples).
|
||||
|
||||
|
||||
### `saveToFile()` and `toBase64DataURI()`
|
||||
|
||||
+2
-2
@@ -4,10 +4,10 @@
|
||||
|
||||
### User manual via Sphinx
|
||||
|
||||
[](https://php-qrcode.readthedocs.io/en/main/?badge=main)
|
||||
[](https://php-qrcode.readthedocs.io/en/v5.0.x/)
|
||||
|
||||
The user manual can be auto generated with [Sphinx](https://www.sphinx-doc.org) from the markdown sources contained in this directory, in order to upload it to [Read the Docs](https://readthedocs.org).
|
||||
The online documentation can be found at [php-qrcode.readthedocs.io](https://php-qrcode.readthedocs.io/en/main/) ([project page](https://readthedocs.org/projects/php-qrcode/)), a local copy is built during CI and stored in the [`readthedocs` branch](https://github.com/chillerlan/php-qrcode/tree/readthedocs).
|
||||
The online documentation can be found at [php-qrcode.readthedocs.io](https://php-qrcode.readthedocs.io/en/v5.0.x/) ([project page](https://readthedocs.org/projects/php-qrcode/)), a local copy is built during CI and stored in the [`readthedocs` branch](https://github.com/chillerlan/php-qrcode/tree/readthedocs).
|
||||
|
||||
|
||||
#### Run Sphinx locally
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## Configuration via `QROptions`
|
||||
|
||||
The [`QROptions`](https://github.com/chillerlan/php-qrcode/blob/main/src/QROptions.php) class is a container based on [chillerlan/php-settings-container](https://github.com/chillerlan/php-settings-container) that behaves similar to a [`\stdClass`](https://www.php.net/manual/class.stdclass) object, but with fixed properties.
|
||||
The [`QROptions`](https://github.com/chillerlan/php-qrcode/blob/v5.0.x/src/QROptions.php) class is a container based on [chillerlan/php-settings-container](https://github.com/chillerlan/php-settings-container) that behaves similar to a [`\stdClass`](https://www.php.net/manual/class.stdclass) object, but with fixed properties.
|
||||
A list with all available `QROptions` can be found under [configuration settings](../Usage/Configuration-settings.md).
|
||||
|
||||
```php
|
||||
@@ -124,7 +124,7 @@ $qrcode->setOptions($options);
|
||||
|
||||
### Render a `QRMatrix` instance
|
||||
|
||||
You can render a [`QRMatrix`](https://github.com/chillerlan/php-qrcode/blob/main/src/Data/QRMatrix.php) instance directly:
|
||||
You can render a [`QRMatrix`](https://github.com/chillerlan/php-qrcode/blob/v5.0.x/src/Data/QRMatrix.php) instance directly:
|
||||
|
||||
```php
|
||||
// a matrix from the current data segments
|
||||
@@ -167,7 +167,7 @@ $output = $qrcode->render();
|
||||
$qrcode->render(null, '/path/to/qrcode.svg');
|
||||
```
|
||||
|
||||
The [`QRDataModeInterface`](https://github.com/chillerlan/php-qrcode/blob/main/src/Data/QRDataModeInterface.php) offers the `validateString()` method (implemended for `AlphaNum`, `Byte`, `Hanzi`, `Kanji` and `Number`).
|
||||
The [`QRDataModeInterface`](https://github.com/chillerlan/php-qrcode/blob/v5.0.x/src/Data/QRDataModeInterface.php) offers the `validateString()` method (implemended for `AlphaNum`, `Byte`, `Hanzi`, `Kanji` and `Number`).
|
||||
This method is used internally when a data mode is invoked, but it can come in handy if you need to check input data beforehand.
|
||||
|
||||
```php
|
||||
@@ -194,7 +194,7 @@ $result = $qrcode->readFromFile('path/to/qrcode.png');
|
||||
$result = $qrcode->readFromBlob($imagedata);
|
||||
```
|
||||
|
||||
The `QRMatrix` object from the [`DecoderResult`](https://github.com/chillerlan/php-qrcode/blob/main/src/Decoder/DecoderResult.php) can be reused:
|
||||
The `QRMatrix` object from the [`DecoderResult`](https://github.com/chillerlan/php-qrcode/blob/v5.0.x/src/Decoder/DecoderResult.php) can be reused:
|
||||
|
||||
```php
|
||||
$matrix = $result->getQRMatrix();
|
||||
|
||||
@@ -13,13 +13,13 @@ Installation via [`composer.json`](https://getcomposer.org/doc/04-schema.md):
|
||||
{
|
||||
"require": {
|
||||
"php": "^7.4",
|
||||
"chillerlan/php-qrcode": "dev-main"
|
||||
"chillerlan/php-qrcode": "v5.0.x-dev"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Note: replace `dev-main` with a [version constraint](https://getcomposer.org/doc/articles/versions.md#writing-version-constraints), e.g. `^4.3` - see [releases](https://github.com/chillerlan/php-qrcode/releases) for valid versions.
|
||||
In case you want to keep using `dev-main`, specify the hash of a commit to avoid running into unforseen issues, like so: `dev-main#cb69751c3bc090a7fdd2f2601bbe10f28d225f10`
|
||||
Note: replace `v5.0.x-dev` with a [version constraint](https://getcomposer.org/doc/articles/versions.md#writing-version-constraints), e.g. `^4.3` - see [releases](https://github.com/chillerlan/php-qrcode/releases) for valid versions.
|
||||
In case you want to keep using `v5.0.x-dev`, specify the hash of a commit to avoid running into unforseen issues, like so: `v5.0.x-dev#cb69751c3bc090a7fdd2f2601bbe10f28d225f10`
|
||||
|
||||
|
||||
#### Version switch
|
||||
@@ -50,13 +50,13 @@ If you want to install the package from a specific tag or commit, do as follows:
|
||||
|
||||
```shell
|
||||
composer require chillerlan/php-qrcode:4.3.4
|
||||
composer require chillerlan/php-qrcode:dev-main#f15b0afe9d4128bf734c3bf1bcffae72bf7b3e53
|
||||
composer require chillerlan/php-qrcode:v5.0.x-dev#f15b0afe9d4128bf734c3bf1bcffae72bf7b3e53
|
||||
```
|
||||
|
||||
|
||||
## Manual installation
|
||||
|
||||
Download the desired version of the package from [main](https://github.com/chillerlan/php-qrcode/archive/refs/heads/main.zip) or
|
||||
Download the desired version of the package from [v5.0.x](https://github.com/chillerlan/php-qrcode/archive/refs/heads/v5.0.x.zip) or
|
||||
[release](https://github.com/chillerlan/php-qrcode/releases) and extract the contents to your project folder.
|
||||
After that, run `composer install` in the package root directory to install the required dependencies and generate `./vendor/autoload.php`.
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ For the QR Code reader, either `ext-gd` or `ext-imagick` is required!
|
||||
Hi, please check out some of my other projects that are way cooler than qrcodes!
|
||||
|
||||
- [js-qrcode](https://github.com/chillerlan/js-qrcode) - a javascript port of this library
|
||||
- [php-authenticator](https://github.com/chillerlan/php-authenticator) - a Google Authenticator implementation (see [authenticator example](https://github.com/chillerlan/php-qrcode/blob/main/examples/authenticator.php))
|
||||
- [php-authenticator](https://github.com/chillerlan/php-authenticator) - a Google Authenticator implementation (see [authenticator example](https://github.com/chillerlan/php-qrcode/blob/v5.0.x/examples/authenticator.php))
|
||||
- [php-httpinterface](https://github.com/chillerlan/php-httpinterface) - a PSR-7/15/17/18 implemetation
|
||||
- [php-oauth-core](https://github.com/chillerlan/php-oauth-core) - an OAuth 1/2 client library along with a bunch of [providers](https://github.com/chillerlan/php-oauth-providers)
|
||||
- [php-database](https://github.com/chillerlan/php-database) - a database client & querybuilder for MySQL, Postgres, SQLite, MSSQL, Firebird
|
||||
|
||||
@@ -38,7 +38,7 @@ echo (new QRCode($options))->render($data);
|
||||
|
||||
See [Advanced usage](../Usage/Advanced-usage.md) for a more in-depth usage guide
|
||||
and [configuration settings](../Usage/Configuration-settings.md) for a list of available options.
|
||||
Also, have a look [in the examples folder](https://github.com/chillerlan/php-qrcode/tree/main/examples) for some more usage examples.
|
||||
Also, have a look [in the examples folder](https://github.com/chillerlan/php-qrcode/tree/v5.0.x/examples) for some more usage examples.
|
||||
|
||||
|
||||
## Reading QR Codes
|
||||
|
||||
Reference in New Issue
Block a user