Skip to content

Commit

Permalink
Merge pull request #249 from owncloud/patchwork-workarounds
Browse files Browse the repository at this point in the history
Patchwork workarounds
  • Loading branch information
DeepDiver1975 committed Feb 17, 2016
2 parents 495e415 + 4bb2ab5 commit b65fc86
Show file tree
Hide file tree
Showing 10 changed files with 86 additions and 83 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"natxet/CssMin": "dev-master",
"punic/punic": "1.6.3",
"pear/archive_tar": "1.4.1",
"patchwork/utf8": "1.2.5",
"patchwork/utf8": "1.2.6",
"symfony/console": "2.8.1",
"symfony/event-dispatcher": "2.8.1",
"symfony/routing": "2.8.1",
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

122 changes: 61 additions & 61 deletions composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -1222,67 +1222,6 @@
"web service"
]
},
{
"name": "patchwork/utf8",
"version": "v1.2.5",
"version_normalized": "1.2.5.0",
"source": {
"type": "git",
"url": "https://github.com/tchwork/utf8.git",
"reference": "25a55c6c668de61cc3b97aab4237ebf6dadabe17"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tchwork/utf8/zipball/25a55c6c668de61cc3b97aab4237ebf6dadabe17",
"reference": "25a55c6c668de61cc3b97aab4237ebf6dadabe17",
"shasum": ""
},
"require": {
"lib-pcre": ">=7.3",
"php": ">=5.3.0"
},
"suggest": {
"ext-iconv": "Use iconv for best performance",
"ext-intl": "Use Intl for best performance",
"ext-mbstring": "Use Mbstring for best performance",
"ext-wfio": "Use WFIO for UTF-8 filesystem access on Windows"
},
"time": "2015-10-14 08:58:12",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.2-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"Patchwork\\": "src/Patchwork/"
},
"classmap": [
"src/Normalizer.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"(Apache-2.0 or GPL-2.0)"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
}
],
"description": "Portable and performant UTF-8, Unicode and Grapheme Clusters for PHP",
"homepage": "https://github.com/tchwork/utf8",
"keywords": [
"grapheme",
"i18n",
"unicode",
"utf-8",
"utf8"
]
},
{
"name": "phpseclib/phpseclib",
"version": "2.0.0",
Expand Down Expand Up @@ -3237,5 +3176,66 @@
"stream",
"tar"
]
},
{
"name": "patchwork/utf8",
"version": "v1.2.6",
"version_normalized": "1.2.6.0",
"source": {
"type": "git",
"url": "https://github.com/tchwork/utf8.git",
"reference": "f986d18f4e37ab70b792e977c7d85970cf84f164"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tchwork/utf8/zipball/f986d18f4e37ab70b792e977c7d85970cf84f164",
"reference": "f986d18f4e37ab70b792e977c7d85970cf84f164",
"shasum": ""
},
"require": {
"lib-pcre": ">=7.3",
"php": ">=5.3.0"
},
"suggest": {
"ext-iconv": "Use iconv for best performance",
"ext-intl": "Use Intl for best performance",
"ext-mbstring": "Use Mbstring for best performance",
"ext-wfio": "Use WFIO for UTF-8 filesystem access on Windows"
},
"time": "2015-12-15 15:33:41",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.2-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"Patchwork\\": "src/Patchwork/"
},
"classmap": [
"src/Normalizer.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"(Apache-2.0 or GPL-2.0)"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
}
],
"description": "Portable and performant UTF-8, Unicode and Grapheme Clusters for PHP",
"homepage": "https://github.com/tchwork/utf8",
"keywords": [
"grapheme",
"i18n",
"unicode",
"utf-8",
"utf8"
]
}
]
3 changes: 1 addition & 2 deletions patches.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Patches:

- remove dompdf from phpdocx, because we already ship dompdf in the 3rdparty's root folder (see 3ae4904 and e1e3207)
- some external entity patches from https://github.com/owncloud/3rdparty/pull/74 - they should get superseeded by updating the affected libraries.
- Doctrine: fix postgres column escaping when using reserved keyword: https://github.com/doctrine/dbal/pull/627
- patchwork/utf8: Remove trigger_error() that spammed the error log
12 changes: 12 additions & 0 deletions patchwork/utf8/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v1.2.6 (2015-12-15)

- fix compat with symfony-polyfill

## v1.2.5 (2015-10-14)

- handle the third argument of mb_convert_encoding() being an array
Expand Down Expand Up @@ -41,6 +45,14 @@
- add best-fit mappings for UTF-8 to Code Page approximations
- add portable Unicode filesystem access under Windows and other OSes

## v1.1.31 (2015-12-15)

- fix compat with symfony-polyfill

## v1.1.30 (2015-06-29)

- fix mb_strrpos shim with negative offset

## v1.1.29 (2015-04-26)

- fix ucwords to be functionally the same as in-built PHP version
Expand Down
8 changes: 4 additions & 4 deletions patchwork/utf8/src/Patchwork/Utf8/Bootup.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (C) 2013 Nicolas Grekas - p@tchwork.com
* Copyright (C) 2016 Nicolas Grekas - p@tchwork.com
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the (at your option):
Expand Down Expand Up @@ -66,7 +66,7 @@ public static function initMbstring()
if (!in_array(strtolower(mb_language()), array('uni', 'neutral'))) {
mb_language('uni');
}
} elseif (!defined('MB_OVERLOAD_MAIL')) {
} elseif (!function_exists('mb_strlen')) {
extension_loaded('iconv') or static::initIconv();

require __DIR__.'/Bootup/mbstring.php';
Expand All @@ -87,7 +87,7 @@ public static function initIconv()
if ('UTF-8' !== strtoupper(iconv_get_encoding('output_encoding'))) {
iconv_set_encoding('output_encoding', 'UTF-8');
}
} elseif (!defined('ICONV_IMPL')) {
} elseif (!function_exists('iconv')) {
require __DIR__.'/Bootup/iconv.php';
}
}
Expand All @@ -113,7 +113,7 @@ public static function initIntl()

define('GRAPHEME_CLUSTER_RX', PCRE_VERSION >= '8.32' ? '\X' : s\Intl::GRAPHEME_CLUSTER_RX);

if (!extension_loaded('intl')) {
if (!function_exists('grapheme_strlen')) {
extension_loaded('iconv') or static::initIconv();
extension_loaded('mbstring') or static::initMbstring();

Expand Down
2 changes: 0 additions & 2 deletions patchwork/utf8/src/Patchwork/Utf8/Bootup/iconv.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
const ICONV_MIME_DECODE_STRICT = 1;
const ICONV_MIME_DECODE_CONTINUE_ON_ERROR = 2;

@trigger_error('You are using a fallback implementation of the iconv extension. Installing the native one is highly recommended instead.', E_USER_DEPRECATED);

function iconv($from, $to, $s) {return s\Iconv::iconv($from, $to, $s);};
function iconv_get_encoding($type = 'all') {return s\Iconv::iconv_get_encoding($type);};
function iconv_set_encoding($type, $charset) {return s\Iconv::iconv_set_encoding($type, $charset);};
Expand Down
2 changes: 0 additions & 2 deletions patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
const GRAPHEME_EXTR_MAXBYTES = 1;
const GRAPHEME_EXTR_MAXCHARS = 2;

@trigger_error('You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead.', E_USER_DEPRECATED);

function normalizer_is_normalized($s, $form = s\Normalizer::NFC) {return s\Normalizer::isNormalized($s, $form);};
function normalizer_normalize($s, $form = s\Normalizer::NFC) {return s\Normalizer::normalize($s, $form);};

Expand Down
2 changes: 0 additions & 2 deletions patchwork/utf8/src/Patchwork/Utf8/Bootup/mbstring.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
const MB_CASE_LOWER = 1;
const MB_CASE_TITLE = 2;

@trigger_error('You are using a fallback implementation of the mbstring extension. Installing the native one is highly recommended instead.', E_USER_DEPRECATED);

function mb_convert_encoding($s, $to, $from = INF) {return s\Mbstring::mb_convert_encoding($s, $to, $from);};
function mb_decode_mimeheader($s) {return s\Mbstring::mb_decode_mimeheader($s);};
function mb_encode_mimeheader($s, $charset = INF, $transfer_enc = INF, $lf = INF, $indent = INF) {return s\Mbstring::mb_encode_mimeheader($s, $charset, $transfer_enc, $lf, $indent);};
Expand Down
2 changes: 0 additions & 2 deletions patchwork/utf8/src/Patchwork/Utf8/Bootup/utf8_encode.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,5 @@

use Patchwork\PHP\Shim as s;

@trigger_error('You are using a fallback implementation of the xml extension. Installing the native one is highly recommended instead.', E_USER_DEPRECATED);

function utf8_encode($s) {return s\Xml::utf8_encode($s);};
function utf8_decode($s) {return s\Xml::utf8_decode($s);};

0 comments on commit b65fc86

Please sign in to comment.