Skip to content
This repository has been archived by the owner on Sep 20, 2021. It is now read-only.

Ci #45

Open
wants to merge 35 commits into
base: master
Choose a base branch
from
Open

Ci #45

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
c2e7672
CI: Set up Travis.
vonglasow Mar 15, 2017
900ce05
fixup! CI: Set up Travis.
vonglasow Oct 27, 2017
726362e
debuging travis
Pierozi Nov 24, 2017
6d4714d
rebuild intl.so
Pierozi Nov 24, 2017
d902477
move workdir intl compilation on travis home
Pierozi Nov 24, 2017
614c779
working dir travis
Pierozi Nov 24, 2017
5322bfa
debug travis
Pierozi Nov 24, 2017
0af2d53
debug travis
Pierozi Nov 24, 2017
236dab8
debug travis
Pierozi Nov 26, 2017
2016b06
debug travis
Pierozi Nov 26, 2017
7ebfc05
remove intl as extension
Pierozi Nov 26, 2017
98b72a1
debug travis
Pierozi Nov 26, 2017
59260b2
debug travis
Pierozi Nov 26, 2017
8a67713
debug travis
Pierozi Nov 26, 2017
dac9721
debug travis
Pierozi Nov 26, 2017
849e540
debug travis
Pierozi Nov 26, 2017
a4e2119
debug travis
Pierozi Nov 26, 2017
9711f8b
debug travis
Pierozi Nov 26, 2017
2649730
debug travis
Pierozi Nov 26, 2017
082ea77
debug travis
Pierozi Nov 26, 2017
7ea4743
debug travis
Pierozi Dec 2, 2017
5719bda
Fix test related to Translit ASCII
Pierozi Dec 2, 2017
0de8be2
debug travis
Pierozi Dec 2, 2017
2324518
debug travis
Pierozi Dec 2, 2017
ab086dc
cache compilation intl.so
Pierozi Dec 3, 2017
b4b6846
debug travis
Pierozi Dec 3, 2017
82b54a2
debug travis
Pierozi Dec 3, 2017
fa94160
debug travis
Pierozi Dec 3, 2017
c32799d
debug travis
Pierozi Dec 3, 2017
427d0df
debug travis
Pierozi Dec 3, 2017
88eac76
debug travis
Pierozi Dec 3, 2017
c21ec71
adapt locale test to two format
Pierozi Dec 3, 2017
a8903b7
Travis-CI php ver 7.0 7.2
Pierozi Dec 3, 2017
e1bddb7
debug travis
Pierozi Dec 3, 2017
2da4699
php7.2 allow faillure on travis
Pierozi Dec 3, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
language: php

matrix:
include:
- php: 7.0
env:
- PHP_SRC_VERSION=7.0.26
- php: 7.1
env:
- ENABLE_XDEBUG=true
- PHP_SRC_VERSION=7.1.11
- php: 7.2
env:
- PHP_SRC_VERSION=7.2.0
- php: nightly
env:
- PHP_SRC_VERSION=7.2.0
allow_failures:
- php: nightly
- php: 7.2
fast_finish: true

os:
- linux

notifications:
irc: "chat.freenode.net#hoaproject"

sudo: false

env:
global:
- secure: "AAAAB3NzaC1yc2EAAAADAQABAAAAgQCecwgg2D4ihDiYD9Af7hU7oroL108l1BJaxZ9N0GXmoaJj3JOHKjXgUjizhma5nftXRBJOcIhT4GsLAnFeNKgJv/97cAvm7miHeTLYPOiOpkrf/Zl7UIQ0MKSX91YKdneAGRDFaY0Tq5B9KjK68vu0Cof35h+cf59Ld3hTzrGPZw=="

cache:
directories:
- vendor/
- /home/travis/php-src

before_script:
- export PATH="$PATH:$HOME/.composer/vendor/bin"
- if [[ ! $ENABLE_XDEBUG ]]; then
phpenv config-rm xdebug.ini || echo "ext-xdebug is not available, cannot remove it.";
fi
- if [[ `ls /home/travis/php-src | wc -l` -eq 0 ]]; then
curl -Ss "http://ie1.php.net/distributions/php-${PHP_SRC_VERSION}.tar.bz2" -o /home/travis/php-src.tar.bz2;
cd /home/travis/;
mkdir php-src;
tar xjf php-src.tar.bz2 -C php-src --strip-components=1;
cd php-src/ext/intl;
phpize;
./configure;
make;
fi
- cd /home/travis/php-src/ext/intl && make install
- cd $TRAVIS_BUILD_DIR
- locale

script:
- composer install
- vendor/bin/hoa test:run
- if [[ $ENABLE_DEVTOOLS ]]; then
composer global require friendsofphp/php-cs-fixer;
vendor/bin/hoa devtools:cs --diff --dry-run .;
fi

addons:
apt:
packages:
- libicu-dev
- unicode
- unicode-data
- ttf-ancient-fonts
- xfonts-efont-unicode
- unifont
- ttf-unifont
- locales
- language-pack-en
- language-pack-fr
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
---

<p align="center">
<a href="https://travis-ci.org/hoaproject/ustring"><img src="https://img.shields.io/travis/hoaproject/ustring/master.svg" alt="Build status" /></a>
<a href="https://coveralls.io/github/hoaproject/ustring?branch=master"><img src="https://img.shields.io/coveralls/hoaproject/ustring/master.svg" alt="Code coverage" /></a>
<a href="https://travis-ci.org/hoaproject/Ustring"><img src="https://img.shields.io/travis/hoaproject/Ustring/master.svg" alt="Build status" /></a>
<a href="https://coveralls.io/github/hoaproject/Ustring?branch=master"><img src="https://img.shields.io/coveralls/hoaproject/Ustring/master.svg" alt="Code coverage" /></a>
<a href="https://packagist.org/packages/hoa/ustring"><img src="https://img.shields.io/packagist/dt/hoa/ustring.svg" alt="Packagist" /></a>
<a href="https://hoa-project.net/LICENSE"><img src="https://img.shields.io/packagist/l/hoa/ustring.svg" alt="License" /></a>
</p>
Expand Down
4 changes: 2 additions & 2 deletions Source/Ustring.php
Original file line number Diff line number Diff line change
Expand Up @@ -423,15 +423,15 @@ function (array $matches) {
);
}

$string = static::transcode($string, 'UTF-8', 'ASCII//IGNORE//TRANSLIT');
$string = static::transcode($string, 'UTF-8', 'ASCII//TRANSLIT');
$this->_string = preg_replace('#(?:[\'"`^](\w))#u', '\1', $string);

return $this;
}

$string = \Normalizer::normalize($string, \Normalizer::NFKD);
$string = preg_replace('#\p{Mn}+#u', '', $string);
$this->_string = static::transcode($string, 'UTF-8', 'ASCII//IGNORE//TRANSLIT');
$this->_string = static::transcode($string, 'UTF-8', 'ASCII//TRANSLIT');

return $this;
}
Expand Down
4 changes: 2 additions & 2 deletions Test/Unit/Ustring.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ public function case_collator(): void
)
->when($result = $collator->getLocale(\Locale::VALID_LOCALE))
->then
->string($result)
->isEqualTo('fr');
->boolean(in_array($result, ['fr', 'fr_FR']))
->isTrue();
}

public function case_safe_unsafe_pattern(): void
Expand Down