Skip to content

Commit

Permalink
Rename package
Browse files Browse the repository at this point in the history
  • Loading branch information
endroid committed Jan 2, 2018
1 parent 8439a25 commit 4764d80
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

*By [endroid](https://endroid.nl/)*

[![Latest Stable Version](http://img.shields.io/packagist/v/endroid/qrcode.svg)](https://packagist.org/packages/endroid/qrcode)
[![Build Status](http://img.shields.io/travis/endroid/qrcode.svg)](http://travis-ci.org/endroid/qrcode)
[![Total Downloads](http://img.shields.io/packagist/dt/endroid/qrcode.svg)](https://packagist.org/packages/endroid/qrcode)
[![Monthly Downloads](http://img.shields.io/packagist/dm/endroid/qrcode.svg)](https://packagist.org/packages/endroid/qrcode)
[![License](http://img.shields.io/packagist/l/endroid/qrcode.svg)](https://packagist.org/packages/endroid/qrcode)
[![Latest Stable Version](http://img.shields.io/packagist/v/endroid/qr-code.svg)](https://packagist.org/packages/endroid/qr-code)
[![Build Status](http://img.shields.io/travis/endroid/qr-code.svg)](http://travis-ci.org/endroid/qr-code)
[![Total Downloads](http://img.shields.io/packagist/dt/endroid/qr-code.svg)](https://packagist.org/packages/endroid/qr-code)
[![Monthly Downloads](http://img.shields.io/packagist/dm/endroid/qr-code.svg)](https://packagist.org/packages/endroid/qr-code)
[![License](http://img.shields.io/packagist/l/endroid/qr-code.svg)](https://packagist.org/packages/endroid/qr-code)
[![Donate](https://img.shields.io/badge/donate-paypal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RGH86QN825TWN)

This library helps you generate QR codes in a jiffy.
Expand All @@ -16,7 +16,7 @@ This library helps you generate QR codes in a jiffy.
Use [Composer](https://getcomposer.org/) to install the library.

``` bash
$ composer require endroid/qrcode
$ composer require endroid/qr-code
```

## Basic usage
Expand Down Expand Up @@ -65,7 +65,7 @@ $qrCode->writeFile(__DIR__.'/qrcode.png');
$response = new Response($qrCode->writeString(), Response::HTTP_OK, ['Content-Type' => $qrCode->getContentType()]);
```

![QR Code](https://endroid.nl/qrcode/Life%20is%20too%20short%20to%20be%20generating%20QR%20codes.png)
![QR Code](https://endroid.nl/qr-code/Life%20is%20too%20short%20to%20be%20generating%20QR%20codes.png)

## Built-in validation reader

Expand All @@ -81,15 +81,15 @@ that the validator can consume quite amount of additional resources.

## Symfony integration

The [endroid/qrcode-bundle](https://github.com/endroid/qrcode-bundle)
The [endroid/qr-code-bundle](https://github.com/endroid/qr-code-bundle)
integrates the QR code library in Symfony for an even better experience.

* Configure your defaults (like image size, default writer etc.)
* Generate QR codes quickly from anywhere via the factory service
* Generate QR codes directly by typing an URL like /qrcode/\<text>.png?size=300
* Generate QR codes directly by typing an URL like /qr-code/\<text>.png?size=300
* Generate QR codes or URLs directly from Twig using dedicated functions

Read the [bundle documentation](https://github.com/endroid/qrcode-bundle)
Read the [bundle documentation](https://github.com/endroid/qr-code-bundle)
for more information.

## Versioning
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "endroid/qrcode",
"name": "endroid/qr-code",
"description": "Endroid QR Code",
"keywords": ["endroid", "qrcode", "qr", "code", "bundle", "php"],
"homepage": "https://github.com/endroid/qr-code",
Expand Down
8 changes: 4 additions & 4 deletions src/Twig/Extension/QrCodeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ public function __construct(QrCodeFactoryInterface $qrCodeFactory, RouterInterfa
public function getFunctions(): array
{
return [
new Twig_SimpleFunction('qrcode_path', [$this, 'qrCodePathFunction']),
new Twig_SimpleFunction('qrcode_url', [$this, 'qrCodeUrlFunction']),
new Twig_SimpleFunction('qrcode_data_uri', [$this, 'qrCodeDataUriFunction']),
new Twig_SimpleFunction('qr_code_path', [$this, 'qrCodePathFunction']),
new Twig_SimpleFunction('qr_code_url', [$this, 'qrCodeUrlFunction']),
new Twig_SimpleFunction('qr_code_data_uri', [$this, 'qrCodeDataUriFunction']),
];
}

Expand All @@ -60,7 +60,7 @@ public function getQrCodeReference(string $text, array $options = [], int $refer
$options['text'] = $text;
$options['extension'] = current($supportedExtensions);

return $this->router->generate('endroid_qrcode_generate', $options, $referenceType);
return $this->router->generate('endroid_qr_code_generate', $options, $referenceType);
}

public function qrCodeDataUriFunction(string $text, array $options = []): string
Expand Down
4 changes: 2 additions & 2 deletions tests/Twig/Extension/QrCodeExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function testQrCodePathFunction()
$extension = new QrCodeExtension(new QrCodeFactory(), $router->reveal());

$router
->generate('endroid_qrcode_generate', ['extension' => 'png', 'text' => 'Foobar'], UrlGeneratorInterface::ABSOLUTE_PATH)
->generate('endroid_qr_code_generate', ['extension' => 'png', 'text' => 'Foobar'], UrlGeneratorInterface::ABSOLUTE_PATH)
->willReturn('/some-qr-code-path');

$this->assertSame('/some-qr-code-path', $extension->qrCodePathFunction('Foobar'));
Expand All @@ -54,7 +54,7 @@ public function testQrCodeUrlFunction()
$extension = new QrCodeExtension(new QrCodeFactory(), $router->reveal());

$router
->generate('endroid_qrcode_generate', ['extension' => 'png', 'text' => 'Foobar'], UrlGeneratorInterface::ABSOLUTE_URL)
->generate('endroid_qr_code_generate', ['extension' => 'png', 'text' => 'Foobar'], UrlGeneratorInterface::ABSOLUTE_URL)
->willReturn('https://some-qr-code-url');

$this->assertSame('https://some-qr-code-url', $extension->qrCodeUrlFunction('Foobar'));
Expand Down

0 comments on commit 4764d80

Please sign in to comment.