mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
[更新]ComposerUpdate
This commit is contained in:
parent
86ad22c3f6
commit
978e3bdfb3
@ -17,7 +17,7 @@
|
|||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.6.0",
|
"php": ">=5.6.0",
|
||||||
"endroid/qrcode": "^1.9",
|
"endroid/qr-code": "^1.9",
|
||||||
"topthink/framework": "5.1.*",
|
"topthink/framework": "5.1.*",
|
||||||
"zoujingli/ip2region": "dev-master",
|
"zoujingli/ip2region": "dev-master",
|
||||||
"aliyuncs/oss-sdk-php": "^2.2",
|
"aliyuncs/oss-sdk-php": "^2.2",
|
||||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -4,4 +4,4 @@
|
|||||||
|
|
||||||
require_once __DIR__ . '/composer/autoload_real.php';
|
require_once __DIR__ . '/composer/autoload_real.php';
|
||||||
|
|
||||||
return ComposerAutoloaderInitf07d580970472dfef64242680e38e822::getLoader();
|
return ComposerAutoloaderInite980cfbc9dbf3868b9caa1c3e01234e7::getLoader();
|
||||||
|
28
vendor/composer/autoload_classmap.php
vendored
28
vendor/composer/autoload_classmap.php
vendored
@ -6,20 +6,20 @@ $vendorDir = dirname(dirname(__FILE__));
|
|||||||
$baseDir = dirname($vendorDir);
|
$baseDir = dirname($vendorDir);
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'Endroid\\QrCode\\Bundle\\Controller\\QrCodeController' => $vendorDir . '/endroid/qrcode/src/Bundle/Controller/QrCodeController.php',
|
'Endroid\\QrCode\\Bundle\\Controller\\QrCodeController' => $vendorDir . '/endroid/qr-code/src/Bundle/Controller/QrCodeController.php',
|
||||||
'Endroid\\QrCode\\Bundle\\DependencyInjection\\Configuration' => $vendorDir . '/endroid/qrcode/src/Bundle/DependencyInjection/Configuration.php',
|
'Endroid\\QrCode\\Bundle\\DependencyInjection\\Configuration' => $vendorDir . '/endroid/qr-code/src/Bundle/DependencyInjection/Configuration.php',
|
||||||
'Endroid\\QrCode\\Bundle\\DependencyInjection\\EndroidQrCodeExtension' => $vendorDir . '/endroid/qrcode/src/Bundle/DependencyInjection/EndroidQrCodeExtension.php',
|
'Endroid\\QrCode\\Bundle\\DependencyInjection\\EndroidQrCodeExtension' => $vendorDir . '/endroid/qr-code/src/Bundle/DependencyInjection/EndroidQrCodeExtension.php',
|
||||||
'Endroid\\QrCode\\Bundle\\EndroidQrCodeBundle' => $vendorDir . '/endroid/qrcode/src/Bundle/EndroidQrCodeBundle.php',
|
'Endroid\\QrCode\\Bundle\\EndroidQrCodeBundle' => $vendorDir . '/endroid/qr-code/src/Bundle/EndroidQrCodeBundle.php',
|
||||||
'Endroid\\QrCode\\Bundle\\Twig\\Extension\\QrCodeExtension' => $vendorDir . '/endroid/qrcode/src/Bundle/Twig/Extension/QrCodeExtension.php',
|
'Endroid\\QrCode\\Bundle\\Twig\\Extension\\QrCodeExtension' => $vendorDir . '/endroid/qr-code/src/Bundle/Twig/Extension/QrCodeExtension.php',
|
||||||
'Endroid\\QrCode\\Exceptions\\DataDoesntExistsException' => $vendorDir . '/endroid/qrcode/src/Exceptions/DataDoesntExistsException.php',
|
'Endroid\\QrCode\\Exceptions\\DataDoesntExistsException' => $vendorDir . '/endroid/qr-code/src/Exceptions/DataDoesntExistsException.php',
|
||||||
'Endroid\\QrCode\\Exceptions\\FreeTypeLibraryMissingException' => $vendorDir . '/endroid/qrcode/src/Exceptions/FreeTypeLibraryMissingException.php',
|
'Endroid\\QrCode\\Exceptions\\FreeTypeLibraryMissingException' => $vendorDir . '/endroid/qr-code/src/Exceptions/FreeTypeLibraryMissingException.php',
|
||||||
'Endroid\\QrCode\\Exceptions\\ImageFunctionFailedException' => $vendorDir . '/endroid/qrcode/src/Exceptions/ImageFunctionFailedException.php',
|
'Endroid\\QrCode\\Exceptions\\ImageFunctionFailedException' => $vendorDir . '/endroid/qr-code/src/Exceptions/ImageFunctionFailedException.php',
|
||||||
'Endroid\\QrCode\\Exceptions\\ImageFunctionUnknownException' => $vendorDir . '/endroid/qrcode/src/Exceptions/ImageFunctionUnknownException.php',
|
'Endroid\\QrCode\\Exceptions\\ImageFunctionUnknownException' => $vendorDir . '/endroid/qr-code/src/Exceptions/ImageFunctionUnknownException.php',
|
||||||
'Endroid\\QrCode\\Exceptions\\ImageSizeTooLargeException' => $vendorDir . '/endroid/qrcode/src/Exceptions/ImageSizeTooLargeException.php',
|
'Endroid\\QrCode\\Exceptions\\ImageSizeTooLargeException' => $vendorDir . '/endroid/qr-code/src/Exceptions/ImageSizeTooLargeException.php',
|
||||||
'Endroid\\QrCode\\Exceptions\\ImageTypeInvalidException' => $vendorDir . '/endroid/qrcode/src/Exceptions/ImageTypeInvalidException.php',
|
'Endroid\\QrCode\\Exceptions\\ImageTypeInvalidException' => $vendorDir . '/endroid/qr-code/src/Exceptions/ImageTypeInvalidException.php',
|
||||||
'Endroid\\QrCode\\Exceptions\\VersionTooLargeException' => $vendorDir . '/endroid/qrcode/src/Exceptions/VersionTooLargeException.php',
|
'Endroid\\QrCode\\Exceptions\\VersionTooLargeException' => $vendorDir . '/endroid/qr-code/src/Exceptions/VersionTooLargeException.php',
|
||||||
'Endroid\\QrCode\\Factory\\QrCodeFactory' => $vendorDir . '/endroid/qrcode/src/Factory/QrCodeFactory.php',
|
'Endroid\\QrCode\\Factory\\QrCodeFactory' => $vendorDir . '/endroid/qr-code/src/Factory/QrCodeFactory.php',
|
||||||
'Endroid\\QrCode\\QrCode' => $vendorDir . '/endroid/qrcode/src/QrCode.php',
|
'Endroid\\QrCode\\QrCode' => $vendorDir . '/endroid/qr-code/src/QrCode.php',
|
||||||
'Ip2Region' => $vendorDir . '/zoujingli/ip2region/Ip2Region.php',
|
'Ip2Region' => $vendorDir . '/zoujingli/ip2region/Ip2Region.php',
|
||||||
'OSS\\Core\\MimeTypes' => $vendorDir . '/aliyuncs/oss-sdk-php/src/OSS/Core/MimeTypes.php',
|
'OSS\\Core\\MimeTypes' => $vendorDir . '/aliyuncs/oss-sdk-php/src/OSS/Core/MimeTypes.php',
|
||||||
'OSS\\Core\\OssException' => $vendorDir . '/aliyuncs/oss-sdk-php/src/OSS/Core/OssException.php',
|
'OSS\\Core\\OssException' => $vendorDir . '/aliyuncs/oss-sdk-php/src/OSS/Core/OssException.php',
|
||||||
|
2
vendor/composer/autoload_psr4.php
vendored
2
vendor/composer/autoload_psr4.php
vendored
@ -14,5 +14,5 @@ return array(
|
|||||||
'Symfony\\Component\\OptionsResolver\\' => array($vendorDir . '/symfony/options-resolver'),
|
'Symfony\\Component\\OptionsResolver\\' => array($vendorDir . '/symfony/options-resolver'),
|
||||||
'Qiniu\\' => array($vendorDir . '/qiniu/php-sdk/src/Qiniu'),
|
'Qiniu\\' => array($vendorDir . '/qiniu/php-sdk/src/Qiniu'),
|
||||||
'OSS\\' => array($vendorDir . '/aliyuncs/oss-sdk-php/src/OSS'),
|
'OSS\\' => array($vendorDir . '/aliyuncs/oss-sdk-php/src/OSS'),
|
||||||
'Endroid\\QrCode\\' => array($vendorDir . '/endroid/qrcode/src'),
|
'Endroid\\QrCode\\' => array($vendorDir . '/endroid/qr-code/src'),
|
||||||
);
|
);
|
||||||
|
14
vendor/composer/autoload_real.php
vendored
14
vendor/composer/autoload_real.php
vendored
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
// autoload_real.php @generated by Composer
|
// autoload_real.php @generated by Composer
|
||||||
|
|
||||||
class ComposerAutoloaderInitf07d580970472dfef64242680e38e822
|
class ComposerAutoloaderInite980cfbc9dbf3868b9caa1c3e01234e7
|
||||||
{
|
{
|
||||||
private static $loader;
|
private static $loader;
|
||||||
|
|
||||||
@ -19,15 +19,15 @@ class ComposerAutoloaderInitf07d580970472dfef64242680e38e822
|
|||||||
return self::$loader;
|
return self::$loader;
|
||||||
}
|
}
|
||||||
|
|
||||||
spl_autoload_register(array('ComposerAutoloaderInitf07d580970472dfef64242680e38e822', 'loadClassLoader'), true, true);
|
spl_autoload_register(array('ComposerAutoloaderInite980cfbc9dbf3868b9caa1c3e01234e7', 'loadClassLoader'), true, true);
|
||||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
||||||
spl_autoload_unregister(array('ComposerAutoloaderInitf07d580970472dfef64242680e38e822', 'loadClassLoader'));
|
spl_autoload_unregister(array('ComposerAutoloaderInite980cfbc9dbf3868b9caa1c3e01234e7', 'loadClassLoader'));
|
||||||
|
|
||||||
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
||||||
if ($useStaticLoader) {
|
if ($useStaticLoader) {
|
||||||
require_once __DIR__ . '/autoload_static.php';
|
require_once __DIR__ . '/autoload_static.php';
|
||||||
|
|
||||||
call_user_func(\Composer\Autoload\ComposerStaticInitf07d580970472dfef64242680e38e822::getInitializer($loader));
|
call_user_func(\Composer\Autoload\ComposerStaticInite980cfbc9dbf3868b9caa1c3e01234e7::getInitializer($loader));
|
||||||
} else {
|
} else {
|
||||||
$map = require __DIR__ . '/autoload_namespaces.php';
|
$map = require __DIR__ . '/autoload_namespaces.php';
|
||||||
foreach ($map as $namespace => $path) {
|
foreach ($map as $namespace => $path) {
|
||||||
@ -48,19 +48,19 @@ class ComposerAutoloaderInitf07d580970472dfef64242680e38e822
|
|||||||
$loader->register(true);
|
$loader->register(true);
|
||||||
|
|
||||||
if ($useStaticLoader) {
|
if ($useStaticLoader) {
|
||||||
$includeFiles = Composer\Autoload\ComposerStaticInitf07d580970472dfef64242680e38e822::$files;
|
$includeFiles = Composer\Autoload\ComposerStaticInite980cfbc9dbf3868b9caa1c3e01234e7::$files;
|
||||||
} else {
|
} else {
|
||||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||||
}
|
}
|
||||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||||
composerRequiref07d580970472dfef64242680e38e822($fileIdentifier, $file);
|
composerRequiree980cfbc9dbf3868b9caa1c3e01234e7($fileIdentifier, $file);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $loader;
|
return $loader;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function composerRequiref07d580970472dfef64242680e38e822($fileIdentifier, $file)
|
function composerRequiree980cfbc9dbf3868b9caa1c3e01234e7($fileIdentifier, $file)
|
||||||
{
|
{
|
||||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||||
require $file;
|
require $file;
|
||||||
|
38
vendor/composer/autoload_static.php
vendored
38
vendor/composer/autoload_static.php
vendored
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
namespace Composer\Autoload;
|
namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInitf07d580970472dfef64242680e38e822
|
class ComposerStaticInite980cfbc9dbf3868b9caa1c3e01234e7
|
||||||
{
|
{
|
||||||
public static $files = array (
|
public static $files = array (
|
||||||
'1cfd2761b63b0a29ed23657ea394cb2d' => __DIR__ . '/..' . '/topthink/think-captcha/src/helper.php',
|
'1cfd2761b63b0a29ed23657ea394cb2d' => __DIR__ . '/..' . '/topthink/think-captcha/src/helper.php',
|
||||||
@ -79,25 +79,25 @@ class ComposerStaticInitf07d580970472dfef64242680e38e822
|
|||||||
),
|
),
|
||||||
'Endroid\\QrCode\\' =>
|
'Endroid\\QrCode\\' =>
|
||||||
array (
|
array (
|
||||||
0 => __DIR__ . '/..' . '/endroid/qrcode/src',
|
0 => __DIR__ . '/..' . '/endroid/qr-code/src',
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
public static $classMap = array (
|
public static $classMap = array (
|
||||||
'Endroid\\QrCode\\Bundle\\Controller\\QrCodeController' => __DIR__ . '/..' . '/endroid/qrcode/src/Bundle/Controller/QrCodeController.php',
|
'Endroid\\QrCode\\Bundle\\Controller\\QrCodeController' => __DIR__ . '/..' . '/endroid/qr-code/src/Bundle/Controller/QrCodeController.php',
|
||||||
'Endroid\\QrCode\\Bundle\\DependencyInjection\\Configuration' => __DIR__ . '/..' . '/endroid/qrcode/src/Bundle/DependencyInjection/Configuration.php',
|
'Endroid\\QrCode\\Bundle\\DependencyInjection\\Configuration' => __DIR__ . '/..' . '/endroid/qr-code/src/Bundle/DependencyInjection/Configuration.php',
|
||||||
'Endroid\\QrCode\\Bundle\\DependencyInjection\\EndroidQrCodeExtension' => __DIR__ . '/..' . '/endroid/qrcode/src/Bundle/DependencyInjection/EndroidQrCodeExtension.php',
|
'Endroid\\QrCode\\Bundle\\DependencyInjection\\EndroidQrCodeExtension' => __DIR__ . '/..' . '/endroid/qr-code/src/Bundle/DependencyInjection/EndroidQrCodeExtension.php',
|
||||||
'Endroid\\QrCode\\Bundle\\EndroidQrCodeBundle' => __DIR__ . '/..' . '/endroid/qrcode/src/Bundle/EndroidQrCodeBundle.php',
|
'Endroid\\QrCode\\Bundle\\EndroidQrCodeBundle' => __DIR__ . '/..' . '/endroid/qr-code/src/Bundle/EndroidQrCodeBundle.php',
|
||||||
'Endroid\\QrCode\\Bundle\\Twig\\Extension\\QrCodeExtension' => __DIR__ . '/..' . '/endroid/qrcode/src/Bundle/Twig/Extension/QrCodeExtension.php',
|
'Endroid\\QrCode\\Bundle\\Twig\\Extension\\QrCodeExtension' => __DIR__ . '/..' . '/endroid/qr-code/src/Bundle/Twig/Extension/QrCodeExtension.php',
|
||||||
'Endroid\\QrCode\\Exceptions\\DataDoesntExistsException' => __DIR__ . '/..' . '/endroid/qrcode/src/Exceptions/DataDoesntExistsException.php',
|
'Endroid\\QrCode\\Exceptions\\DataDoesntExistsException' => __DIR__ . '/..' . '/endroid/qr-code/src/Exceptions/DataDoesntExistsException.php',
|
||||||
'Endroid\\QrCode\\Exceptions\\FreeTypeLibraryMissingException' => __DIR__ . '/..' . '/endroid/qrcode/src/Exceptions/FreeTypeLibraryMissingException.php',
|
'Endroid\\QrCode\\Exceptions\\FreeTypeLibraryMissingException' => __DIR__ . '/..' . '/endroid/qr-code/src/Exceptions/FreeTypeLibraryMissingException.php',
|
||||||
'Endroid\\QrCode\\Exceptions\\ImageFunctionFailedException' => __DIR__ . '/..' . '/endroid/qrcode/src/Exceptions/ImageFunctionFailedException.php',
|
'Endroid\\QrCode\\Exceptions\\ImageFunctionFailedException' => __DIR__ . '/..' . '/endroid/qr-code/src/Exceptions/ImageFunctionFailedException.php',
|
||||||
'Endroid\\QrCode\\Exceptions\\ImageFunctionUnknownException' => __DIR__ . '/..' . '/endroid/qrcode/src/Exceptions/ImageFunctionUnknownException.php',
|
'Endroid\\QrCode\\Exceptions\\ImageFunctionUnknownException' => __DIR__ . '/..' . '/endroid/qr-code/src/Exceptions/ImageFunctionUnknownException.php',
|
||||||
'Endroid\\QrCode\\Exceptions\\ImageSizeTooLargeException' => __DIR__ . '/..' . '/endroid/qrcode/src/Exceptions/ImageSizeTooLargeException.php',
|
'Endroid\\QrCode\\Exceptions\\ImageSizeTooLargeException' => __DIR__ . '/..' . '/endroid/qr-code/src/Exceptions/ImageSizeTooLargeException.php',
|
||||||
'Endroid\\QrCode\\Exceptions\\ImageTypeInvalidException' => __DIR__ . '/..' . '/endroid/qrcode/src/Exceptions/ImageTypeInvalidException.php',
|
'Endroid\\QrCode\\Exceptions\\ImageTypeInvalidException' => __DIR__ . '/..' . '/endroid/qr-code/src/Exceptions/ImageTypeInvalidException.php',
|
||||||
'Endroid\\QrCode\\Exceptions\\VersionTooLargeException' => __DIR__ . '/..' . '/endroid/qrcode/src/Exceptions/VersionTooLargeException.php',
|
'Endroid\\QrCode\\Exceptions\\VersionTooLargeException' => __DIR__ . '/..' . '/endroid/qr-code/src/Exceptions/VersionTooLargeException.php',
|
||||||
'Endroid\\QrCode\\Factory\\QrCodeFactory' => __DIR__ . '/..' . '/endroid/qrcode/src/Factory/QrCodeFactory.php',
|
'Endroid\\QrCode\\Factory\\QrCodeFactory' => __DIR__ . '/..' . '/endroid/qr-code/src/Factory/QrCodeFactory.php',
|
||||||
'Endroid\\QrCode\\QrCode' => __DIR__ . '/..' . '/endroid/qrcode/src/QrCode.php',
|
'Endroid\\QrCode\\QrCode' => __DIR__ . '/..' . '/endroid/qr-code/src/QrCode.php',
|
||||||
'Ip2Region' => __DIR__ . '/..' . '/zoujingli/ip2region/Ip2Region.php',
|
'Ip2Region' => __DIR__ . '/..' . '/zoujingli/ip2region/Ip2Region.php',
|
||||||
'OSS\\Core\\MimeTypes' => __DIR__ . '/..' . '/aliyuncs/oss-sdk-php/src/OSS/Core/MimeTypes.php',
|
'OSS\\Core\\MimeTypes' => __DIR__ . '/..' . '/aliyuncs/oss-sdk-php/src/OSS/Core/MimeTypes.php',
|
||||||
'OSS\\Core\\OssException' => __DIR__ . '/..' . '/aliyuncs/oss-sdk-php/src/OSS/Core/OssException.php',
|
'OSS\\Core\\OssException' => __DIR__ . '/..' . '/aliyuncs/oss-sdk-php/src/OSS/Core/OssException.php',
|
||||||
@ -257,9 +257,9 @@ class ComposerStaticInitf07d580970472dfef64242680e38e822
|
|||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInitf07d580970472dfef64242680e38e822::$prefixLengthsPsr4;
|
$loader->prefixLengthsPsr4 = ComposerStaticInite980cfbc9dbf3868b9caa1c3e01234e7::$prefixLengthsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInitf07d580970472dfef64242680e38e822::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInite980cfbc9dbf3868b9caa1c3e01234e7::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInitf07d580970472dfef64242680e38e822::$classMap;
|
$loader->classMap = ComposerStaticInite980cfbc9dbf3868b9caa1c3e01234e7::$classMap;
|
||||||
|
|
||||||
}, null, ClassLoader::class);
|
}, null, ClassLoader::class);
|
||||||
}
|
}
|
||||||
|
5
vendor/composer/installed.json
vendored
5
vendor/composer/installed.json
vendored
@ -324,7 +324,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "endroid/qrcode",
|
"name": "endroid/qr-code",
|
||||||
"version": "1.9.3",
|
"version": "1.9.3",
|
||||||
"version_normalized": "1.9.3.0",
|
"version_normalized": "1.9.3.0",
|
||||||
"source": {
|
"source": {
|
||||||
@ -383,8 +383,7 @@
|
|||||||
"qr",
|
"qr",
|
||||||
"qrcode",
|
"qrcode",
|
||||||
"symfony"
|
"symfony"
|
||||||
],
|
]
|
||||||
"abandoned": "endroid/qr-code"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "aliyuncs/oss-sdk-php",
|
"name": "aliyuncs/oss-sdk-php",
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
language: php
|
language: php
|
||||||
|
|
||||||
php:
|
php:
|
||||||
- 5.4
|
- 5.4
|
||||||
- 5.5
|
- 5.5
|
||||||
- 5.6
|
- 5.6
|
||||||
- 7.0
|
- 7.0
|
||||||
- 7.1
|
- 7.1
|
||||||
- hhvm
|
- hhvm
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then phpenv config-rm xdebug.ini; fi;
|
- if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then phpenv config-rm xdebug.ini; fi;
|
||||||
- composer self-update && composer install --no-interaction
|
- composer self-update && composer install --no-interaction
|
||||||
|
|
||||||
script: bin/phpunit
|
script: bin/phpunit
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email: info@endroid.nl
|
email: info@endroid.nl
|
@ -1,132 +1,132 @@
|
|||||||
QR Code
|
QR Code
|
||||||
=======
|
=======
|
||||||
|
|
||||||
*By [endroid](http://endroid.nl/)*
|
*By [endroid](http://endroid.nl/)*
|
||||||
|
|
||||||
[](https://packagist.org/packages/endroid/qrcode)
|
[](https://packagist.org/packages/endroid/qrcode)
|
||||||
[](http://travis-ci.org/endroid/QrCode)
|
[](http://travis-ci.org/endroid/QrCode)
|
||||||
[](https://packagist.org/packages/endroid/qrcode)
|
[](https://packagist.org/packages/endroid/qrcode)
|
||||||
[](https://packagist.org/packages/endroid/qrcode)
|
[](https://packagist.org/packages/endroid/qrcode)
|
||||||
[](https://packagist.org/packages/endroid/qrcode)
|
[](https://packagist.org/packages/endroid/qrcode)
|
||||||
|
|
||||||
This library based on QRcode Perl CGI & PHP scripts by Y. Swetake helps you generate images containing a QR code.
|
This library based on QRcode Perl CGI & PHP scripts by Y. Swetake helps you generate images containing a QR code.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Use [Composer](https://getcomposer.org/) to install the library.
|
Use [Composer](https://getcomposer.org/) to install the library.
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
$ composer require endroid/qrcode
|
$ composer require endroid/qrcode
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```php
|
```php
|
||||||
use Endroid\QrCode\QrCode;
|
use Endroid\QrCode\QrCode;
|
||||||
|
|
||||||
$qrCode = new QrCode();
|
$qrCode = new QrCode();
|
||||||
$qrCode
|
$qrCode
|
||||||
->setText('Life is too short to be generating QR codes')
|
->setText('Life is too short to be generating QR codes')
|
||||||
->setSize(300)
|
->setSize(300)
|
||||||
->setPadding(10)
|
->setPadding(10)
|
||||||
->setErrorCorrection('high')
|
->setErrorCorrection('high')
|
||||||
->setForegroundColor(['r' => 0, 'g' => 0, 'b' => 0, 'a' => 0])
|
->setForegroundColor(['r' => 0, 'g' => 0, 'b' => 0, 'a' => 0])
|
||||||
->setBackgroundColor(['r' => 255, 'g' => 255, 'b' => 255, 'a' => 0])
|
->setBackgroundColor(['r' => 255, 'g' => 255, 'b' => 255, 'a' => 0])
|
||||||
->setLabel('Scan the code')
|
->setLabel('Scan the code')
|
||||||
->setLabelFontSize(16)
|
->setLabelFontSize(16)
|
||||||
->setImageType(QrCode::IMAGE_TYPE_PNG)
|
->setImageType(QrCode::IMAGE_TYPE_PNG)
|
||||||
;
|
;
|
||||||
|
|
||||||
// now we can directly output the qrcode
|
// now we can directly output the qrcode
|
||||||
header('Content-Type: '.$qrCode->getContentType());
|
header('Content-Type: '.$qrCode->getContentType());
|
||||||
$qrCode->render();
|
$qrCode->render();
|
||||||
|
|
||||||
// save it to a file
|
// save it to a file
|
||||||
$qrCode->save('qrcode.png');
|
$qrCode->save('qrcode.png');
|
||||||
|
|
||||||
// or create a response object
|
// or create a response object
|
||||||
$response = new Response($qrCode->get(), 200, ['Content-Type' => $qrCode->getContentType()]);
|
$response = new Response($qrCode->get(), 200, ['Content-Type' => $qrCode->getContentType()]);
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Symfony integration
|
## Symfony integration
|
||||||
|
|
||||||
Register the Symfony bundle in the kernel.
|
Register the Symfony bundle in the kernel.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
// app/AppKernel.php
|
// app/AppKernel.php
|
||||||
|
|
||||||
public function registerBundles()
|
public function registerBundles()
|
||||||
{
|
{
|
||||||
$bundles = [
|
$bundles = [
|
||||||
// ...
|
// ...
|
||||||
new Endroid\QrCode\Bundle\EndroidQrCodeBundle(),
|
new Endroid\QrCode\Bundle\EndroidQrCodeBundle(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The default parameters can be overridden via the configuration.
|
The default parameters can be overridden via the configuration.
|
||||||
Alpha channel available range is [0, 127] in foreground and background colors.
|
Alpha channel available range is [0, 127] in foreground and background colors.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
endroid_qr_code:
|
endroid_qr_code:
|
||||||
size: 100
|
size: 100
|
||||||
padding: 10
|
padding: 10
|
||||||
extension: gif
|
extension: gif
|
||||||
error_correction_level: high
|
error_correction_level: high
|
||||||
foreground_color: { r: 0, g: 0, b: 0, a: 0 }
|
foreground_color: { r: 0, g: 0, b: 0, a: 0 }
|
||||||
background_color: { r: 255, g: 255, b: 255, a: 0 }
|
background_color: { r: 255, g: 255, b: 255, a: 0 }
|
||||||
label: 'My label'
|
label: 'My label'
|
||||||
label_font_size: 16
|
label_font_size: 16
|
||||||
```
|
```
|
||||||
|
|
||||||
Now you can retrieve the factory as follows.
|
Now you can retrieve the factory as follows.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
$factory = $this->get('endroid.qrcode.factory');
|
$factory = $this->get('endroid.qrcode.factory');
|
||||||
$factory->createQrCode();
|
$factory->createQrCode();
|
||||||
```
|
```
|
||||||
|
|
||||||
Add the following section to your routing to be able to handle QR code URLs.
|
Add the following section to your routing to be able to handle QR code URLs.
|
||||||
This step can be skipped when you only use data URIs to display your images.
|
This step can be skipped when you only use data URIs to display your images.
|
||||||
|
|
||||||
``` yml
|
``` yml
|
||||||
EndroidQrCodeBundle:
|
EndroidQrCodeBundle:
|
||||||
resource: "@EndroidQrCodeBundle/Controller/"
|
resource: "@EndroidQrCodeBundle/Controller/"
|
||||||
type: annotation
|
type: annotation
|
||||||
prefix: /qrcode
|
prefix: /qrcode
|
||||||
```
|
```
|
||||||
|
|
||||||
After installation and configuration, QR codes can be generated by appending
|
After installation and configuration, QR codes can be generated by appending
|
||||||
the QR code text to the url as mounted, followed by .png, .jpg or .gif.
|
the QR code text to the url as mounted, followed by .png, .jpg or .gif.
|
||||||
|
|
||||||
## Twig extension
|
## Twig extension
|
||||||
|
|
||||||
The bundle also provides a Twig extension for quickly generating QR code urls.
|
The bundle also provides a Twig extension for quickly generating QR code urls.
|
||||||
Optional parameters are extension, size, padding and errorCorrectionLevel. When
|
Optional parameters are extension, size, padding and errorCorrectionLevel. When
|
||||||
a parameter is omitted, the value in the bundle configuration is used.
|
a parameter is omitted, the value in the bundle configuration is used.
|
||||||
|
|
||||||
``` twig
|
``` twig
|
||||||
<img src="{{ qrcode_url(message) }}" />
|
<img src="{{ qrcode_url(message) }}" />
|
||||||
<img src="{{ qrcode_url(message, { extension: 'png' }) }}" />
|
<img src="{{ qrcode_url(message, { extension: 'png' }) }}" />
|
||||||
<img src="{{ qrcode_url(message, { size: 150 }) }}" />
|
<img src="{{ qrcode_url(message, { size: 150 }) }}" />
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also use the data URI helper to embed the QR code within your HTML
|
You can also use the data URI helper to embed the QR code within your HTML
|
||||||
instead of requiring a separate HTTP request to load your image.
|
instead of requiring a separate HTTP request to load your image.
|
||||||
|
|
||||||
``` twig
|
``` twig
|
||||||
<img src="{{ qrcode_data_uri(message, { size: 200, padding: 10 }) }}" />
|
<img src="{{ qrcode_data_uri(message, { size: 200, padding: 10 }) }}" />
|
||||||
```
|
```
|
||||||
|
|
||||||
## Versioning
|
## Versioning
|
||||||
|
|
||||||
Version numbers follow the MAJOR.MINOR.PATCH scheme. Backwards compatibility
|
Version numbers follow the MAJOR.MINOR.PATCH scheme. Backwards compatibility
|
||||||
breaking changes will be kept to a minimum but be aware that these can occur.
|
breaking changes will be kept to a minimum but be aware that these can occur.
|
||||||
Lock your dependencies for production and test your code when upgrading.
|
Lock your dependencies for production and test your code when upgrading.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
This bundle is under the MIT license. For the full copyright and license
|
This bundle is under the MIT license. For the full copyright and license
|
||||||
information please view the LICENSE file that was distributed with this source code.
|
information please view the LICENSE file that was distributed with this source code.
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user