Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Commit

Permalink
PHP 5.6 deprecated the iconv_* methods
Browse files Browse the repository at this point in the history
  • Loading branch information
malkusch committed Oct 11, 2014
1 parent f99757c commit f25a63a
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 30 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ nbproject
.settings
.buildpath
.project
.idea
vendor
composer.lock
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
language: php

php:
- 5.6
- 5.5
- 5.4
- 5.3
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,8 @@ You may have:

* **CURL**: If you provide `bav/data/banklist.txt` you don't need CURL.

* **mbstring or iconv**: BAV works with unicode encoding. Your PHP must have support compiled
in to either the `mb_*` or the `iconv_*` functions. If these functions are
missing BAV works only with the ISO-8859-15 encoding.
* **mbstring**: BAV works with unicode encoding. Your PHP must have support compiled
in the `mb_*` functions. If these functions are missing BAV works only with the ISO-8859-15 encoding.

* **PDO**: If you intend to use a DBS you need to use
[`PDODataBackendContainer`](http://bav-php.github.io/bav/class-malkusch.bav.PDODataBackendContainer.html).
Expand Down
29 changes: 3 additions & 26 deletions classes/encoding/Encoding.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,11 @@
namespace malkusch\bav;

/**
* This class provides methods for any encoded strings
* This class provides methods for any encoded strings.
*
*
* Copyright (C) 2006 Markus Malkusch <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*
* @package classes
* @subpackage dataBackend
* @author Markus Malkusch <[email protected]>
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
* @copyright Copyright (C) 2006 Markus Malkusch
* @license WTFPL
*/
abstract class Encoding
{
Expand Down Expand Up @@ -87,10 +67,7 @@ public static function isSupported($encoding)
*/
public static function getInstance($encoding)
{
if (IconvEncoding::isSupported($encoding)) {
return new IconvEncoding($encoding);

} elseif (MBEncoding::isSupported($encoding)) {
if (MBEncoding::isSupported($encoding)) {
return new MBEncoding($encoding);

} elseif (ISO8859Encoding::isSupported($encoding)) {
Expand Down
1 change: 1 addition & 0 deletions classes/encoding/IconvEncoding.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
* @author Markus Malkusch <[email protected]>
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
* @copyright Copyright (C) 2006 Markus Malkusch
* @deprecated 1.0.1 PHP 5.6.0 deprecated the iconv_* methods
*/
class IconvEncoding extends Encoding
{
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"ext-mbstring": "Enables UTF-8 support",
"ext-dom": "Enables picking the download URI by xpath",
"lib-curl": "Enables API for downloading the bank file",
"lib-iconv": "Enables UTF-8 support",
"doctrine/orm": "Support for Doctrine ORM data backend"
},
"require-dev": {
Expand Down

0 comments on commit f25a63a

Please sign in to comment.