From f66c5ae0a682c35cb71cf8fbc73f18ad0a9a182a Mon Sep 17 00:00:00 2001 From: Johannes Findeisen Date: Sun, 21 Feb 2021 00:26:56 +0100 Subject: [PATCH] Update for PHP8 compatibility; README update. --- README.md | 33 ++++++++++----------------------- package.xml | 10 +++++----- php_pcsc.h | 2 +- 3 files changed, 16 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 419fbf2..43ab2d3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

About

-

This is the only extension for using PC/SC based smart cards with PHP. It is a wrapper to the wonderful and free project by Ludovic Rousseau, PCSC-Lite, which is the middleware to access a smart card using SCard API (PC/SC). Since PCSC-Lite is compatible to the winscard API it should be possible to compile this extension using a Windows(R) operating system. Currently I only take focus on Linux environments.

+

This is the only extension for using PC/SC based smart cards with PHP. It is a wrapper to the wonderful and free project by Ludovic Rousseau, PCSC-Lite, which is the middleware to access a smart card using SCard API (PC/SC). Since PCSC-Lite is compatible to the winscard API it should be possible to compile this extension using a Windows or macOS operating system.

Thanks are going to Johann Dantant! He provides a PC/SC extension for PHP since 2005 and I reused some of his code. He allowed me to relicense these parts under the terms of the PHP license so I could integrate PCSC-Lite natively into PHP.

@@ -8,13 +8,12 @@

I recommend to install the PECL extension the "PHP" way:

-
pecl install pcsc-alpha
+
pecl install pcsc-beta
-

You can install the latest version by downloading the sources and compile yourself too... :)

+

You can install the latest code by downloading the sources and compile yourself too.

-
wget http://pecl.php.net/get/pcsc-0.3.1.tgz
-tar -xvf pcsc-0.3.1.tgz
-cd pcsc-0.3.1
+
git clone https://github.com/pcsc-for-php/pcsc.git
+cd pcsc
 phpize
 ./configure
 make
@@ -76,19 +75,6 @@ make install

scard_cancel($context);

-

Code

- -

The code has successful been released to the official code repository pecl.php.net... ;) - -

- -

You could get the code using the following command:

- -
svn checkout http://svn.php.net/repository/pecl/pcsc/trunk pcsc
-

License

This code is licensed under the terms of the PHP License version 3.01. PCSC-Lite is licensed in a way where it is possible to integrate it native in the PHP environment.

@@ -96,8 +82,9 @@ make install
diff --git a/package.xml b/package.xml index c258f20..0596307 100644 --- a/package.xml +++ b/package.xml @@ -6,7 +6,7 @@ http://pear.php.net/dtd/package-2.0.xsd"> pcsc pecl.php.net winscard PC/SC API support for PHP - This is an extension for using PC/SC based smart cards with PHP. It is a wrapper to the winscard API which provides a native interface to smart cards using the PC/SC standard. Both Linux and Windows are supported. + This is an extension for using PC/SC based smart cards with PHP. It is a wrapper to the winscard API which provides a native interface to smart cards using the PC/SC standard. Linux/UNIX and Windows are supported. Johannes Findeisen @@ -20,10 +20,10 @@ http://pear.php.net/dtd/package-2.0.xsd"> calvin@cmpct.info yes - 2021-02-08 - + 2021-02-20 + - 0.4.0 + 0.5.0 0.3.1 @@ -31,7 +31,7 @@ http://pear.php.net/dtd/package-2.0.xsd"> stable PHP - Updated for PHP 7 compatibility. + Updated for PHP 8 compatibility. diff --git a/php_pcsc.h b/php_pcsc.h index fb2002c..bf607f5 100644 --- a/php_pcsc.h +++ b/php_pcsc.h @@ -4,7 +4,7 @@ extern zend_module_entry pcsc_module_entry; #define phpext_pcsc_ptr &pcsc_module_entry -#define PHP_PCSC_VERSION "0.4.0" +#define PHP_PCSC_VERSION "0.5.0" #ifdef PHP_WIN32 #define PHP_PCSC_API __declspec(dllexport)