From 20fdf81711b1dae10e595f9e9d6b02fd36c13dc0 Mon Sep 17 00:00:00 2001 From: Pavel Ivanov Date: Fri, 23 Mar 2018 23:24:52 +0200 Subject: [PATCH] Issue #15957: drop HHVM remains (#15965) See also #14178 --- .travis.yml | 2 +- docs/guide-es/start-installation.md | 4 +--- docs/guide-id/start-installation.md | 4 +--- docs/guide-it/start-installation.md | 4 +--- docs/guide-ja/start-installation.md | 2 -- docs/guide-pl/start-installation.md | 3 --- docs/guide-pt-BR/start-installation.md | 5 +---- docs/guide-ru/start-installation.md | 4 +--- docs/guide-uk/start-installation.md | 4 +--- docs/guide-vi/start-installation.md | 4 +--- docs/guide-zh-CN/start-installation.md | 2 +- tests/framework/caching/PgSQLCacheTest.php | 3 --- tests/framework/db/CommandTest.php | 8 +------- tests/framework/db/mysql/connection/DeadLockTest.php | 1 - tests/framework/db/pgsql/CommandTest.php | 4 ---- tests/framework/di/ContainerTest.php | 8 -------- tests/framework/filters/auth/AuthTest.php | 4 ---- tests/framework/i18n/FormatterTest.php | 4 ---- tests/framework/mail/TemplateTest.php | 2 +- tests/framework/web/session/pgsql/DbSessionTest.php | 4 ---- 20 files changed, 11 insertions(+), 65 deletions(-) diff --git a/.travis.yml b/.travis.yml index fc8b693..62e3074 100644 --- a/.travis.yml +++ b/.travis.yml @@ -71,7 +71,7 @@ matrix: install: - | - if [[ $TASK_TESTS_COVERAGE != 1 && $TRAVIS_PHP_VERSION != hhv* ]]; then + if [[ $TASK_TESTS_COVERAGE != 1]]; then # disable xdebug for performance reasons when code coverage is not needed phpenv config-rm xdebug.ini || echo "xdebug is not installed" fi diff --git a/docs/guide-es/start-installation.md b/docs/guide-es/start-installation.md index 70a57e4..ec1c874 100644 --- a/docs/guide-es/start-installation.md +++ b/docs/guide-es/start-installation.md @@ -143,9 +143,7 @@ Configurar Servidores Web La aplicación instalada siguiendo las instrucciones mencionadas debería estar lista para usar tanto con un [servidor HTTP Apache](http://httpd.apache.org/) como con un [servidor HTTP Nginx](http://nginx.org/), -en Windows, Mac OS X, o Linux utilizando PHP 5.4 o mayor. Yii 2.0 también es compatible con [HHVM](http://hhvm.com/) -de Facebook. De todos modos, hay algunos casos donde HHVM se comporta diferente del -PHP oficial, por lo que tendrás que tener cuidados extra al utilizarlo. +en Windows, Mac OS X, o Linux utilizando PHP 5.4 o mayor. En un servidor de producción, podrías querer configurar el servidor Web para que la aplicación sea accedida a través de la URL `http://www.example.com/index.php` en vez de `http://www.example.com/basic/web/index.php`. Tal configuración diff --git a/docs/guide-id/start-installation.md b/docs/guide-id/start-installation.md index 54fb407..be7321e 100644 --- a/docs/guide-id/start-installation.md +++ b/docs/guide-id/start-installation.md @@ -143,9 +143,7 @@ Konfigurasi Web Server Aplikasi yang diinstal sesuai dengan petunjuk di atas seharusnya bekerja dengan baik pada [Apache HTTP server](http://httpd.apache.org/) atau [Nginx HTTP server](http://nginx.org/), pada -Windows, Mac OS X, atau Linux yang menjalankan PHP 5.4 atau lebih tinggi. Yii 2.0 juga kompatibel dengan facebook -[HHVM](http://hhvm.com/). Namun, ada beberapa kasus di mana HHVM berperilaku berbeda dari PHP asli, -sehingga Anda harus mengambil beberapa perlakuan ekstra ketika menggunakan HHVM. +Windows, Mac OS X, atau Linux yang menjalankan PHP 5.4 atau lebih tinggi. Pada server produksi, Anda mungkin ingin mengkonfigurasi server Web Anda sehingga aplikasi dapat diakses melalui URL `http://www.example.com/index.php` bukannya `http://www.example.com/dasar/web/index.php`. konfigurasi seperti itu diff --git a/docs/guide-it/start-installation.md b/docs/guide-it/start-installation.md index 7315f29..8b0a492 100644 --- a/docs/guide-it/start-installation.md +++ b/docs/guide-it/start-installation.md @@ -116,9 +116,7 @@ Configurazione del webserver > Informazione: puoi saltare questa parte per ora se stai solo provando Yii e non hai intenzione di installarlo su un server di produzione. L'applicazione installata secondo le istruzioni sopra dovrebbe funzionare senza problemi su un server -[Apache](http://httpd.apache.org/) o [Nginx](http://nginx.org/), su Windows, Mac OS X, or Linux equipaggiati con PHP 5.4 o successivo. -Yii 2.0 è anche compatibile con le librerie [HHVM](http://hhvm.com/) di Facebook, tuttavia ci sono alcuni casi limite dove HHVM si -comporta diversamente dal PHP nativo, quindi devi avere maggiore cura se intendi usare HHVM. +[Apache](http://httpd.apache.org/) o [Nginx](http://nginx.org/), su Windows, Mac OS X, or Linux equipaggiati con PHP 5.4 o successivo. Su un server di produzione vorrai probabilmente che la tua applicazione sia accessibile tramite l'url `http://www.example.com/index.php` invece di `http://www.example.com/basic/web/index.php`. Questo risultato richiede che punti la diff --git a/docs/guide-ja/start-installation.md b/docs/guide-ja/start-installation.md index f9a07d6..fabb80d 100644 --- a/docs/guide-ja/start-installation.md +++ b/docs/guide-ja/start-installation.md @@ -160,8 +160,6 @@ Yii の最低必要条件を満たすように PHP のインストールを構 > Info: もし Yii の試運転をしているだけで、本番サーバに配備する意図がないのであれば、当面、この項は飛ばしても構いません。 上記の説明に従ってインストールされたアプリケーションは、[Apache HTTP サーバ](http://httpd.apache.org/) と [Nginx HTTP サーバ](http://nginx.org/) のどちらでも、また、Windows、Mac OS X、Linux のどれでも、PHP 5.4 以上を走らせている環境であれば、そのままの状態で動作するはずです。 -Yii 2.0 は、また、facebook の [HHVM](http://hhvm.com/) とも互換性があります。 -ただし HHVM がネイティブの PHP とは異なる振舞いをする特殊なケースもいくつかありますので、HHVM を使うときはいくらか余分に注意を払う必要があります。 本番用のサーバでは、`http://www.example.com/basic/web/index.php` の代りに `http://www.example.com/index.php` という URL でアプリケーションにアクセス出来るようにウェブサーバを設定したいでしょう。 そういう設定をするためには、ウェブサーバのドキュメントルートを `basic/web` フォルダに向けることが必要になります。 diff --git a/docs/guide-pl/start-installation.md b/docs/guide-pl/start-installation.md index c11aac4..15fe1cd 100644 --- a/docs/guide-pl/start-installation.md +++ b/docs/guide-pl/start-installation.md @@ -158,9 +158,6 @@ Konfigurowanie serwerów WWW Aplikacja zainstalowana według powyższych instrukcji powinna działać bezproblemowo zarówno na [serwerze HTTP Apache](http://httpd.apache.org) jak i [serwerze HTTP Nginx](http://nginx.org), na systemie operacyjnym Windows, Mac OS X oraz Linux, posiadającym zainstalowane PHP 5.4 lub wyższe. -Yii 2.0 jest również kompatybilne z [facebookowym HHVM](http://hhvm.com). -Są jednak przypadki, gdzie Yii zachowuje się inaczej w HHVM niż w natywnym PHP, dlatego powinieneś zachować -szczególną ostrożność używając HHVM. Na serwerze produkcyjnym możesz skonfigurować swój host tak, aby aplikacja była dostępna pod adresem `http://www.example.com/index.php` zamiast `http://www.example.com/basic/web/index.php`. diff --git a/docs/guide-pt-BR/start-installation.md b/docs/guide-pt-BR/start-installation.md index e210981..3b9c08c 100644 --- a/docs/guide-pt-BR/start-installation.md +++ b/docs/guide-pt-BR/start-installation.md @@ -148,10 +148,7 @@ Configurando os Servidores Web A aplicação instalada de acordo com as instruções acima deve funcionar imediatamente com um [Servidor HTTP Apache](http://httpd.apache.org/) ou um [Servidor HTTP Nginx](http://nginx.org/), -no Windows, Mac OS X ou Linux usando PHP 5.4 ou superior. O Yii 2.0 também é compatível -com o [HHVM](http://hhvm.com/) do Facebook, no entanto, existem alguns casos extremos -que o HHVM se comporta diferente no PHP nativo, então, terá que tomar um cuidado -extra quando usar o HHVM. +no Windows, Mac OS X ou Linux usando PHP 5.4 ou superior. Em um servidor de produção, você pode querer configurar o seu servidor Web de modo que a aplicação possa ser acessada pela URL `http://www.example.com/index.php` diff --git a/docs/guide-ru/start-installation.md b/docs/guide-ru/start-installation.md index d9eccdc..c624c06 100644 --- a/docs/guide-ru/start-installation.md +++ b/docs/guide-ru/start-installation.md @@ -133,9 +133,7 @@ php requirements.php его на рабочем сервере. Приложение, установленное по инструкциям, приведённым выше, будет работать сразу как с [Apache](http://httpd.apache.org/), -так и с [Nginx](http://nginx.org/) под Windows и Linux с установленным PHP 5.4 и выше. Yii 2.0 также совместим с -[HHVM](http://hhvm.com/). Тем не менее, в некоторых случаях поведение при работе с HHVM отличается от обычного PHP. -Будьте внимательны. +так и с [Nginx](http://nginx.org/) под Windows и Linux с установленным PHP 5.4 и выше. На рабочем сервере вам наверняка захочется изменить URL приложения с `http://www.example.com/basic/web/index.php` на `http://www.example.com/index.php`. Для этого необходимо изменить корневую директорию в настройках веб сервера так, diff --git a/docs/guide-uk/start-installation.md b/docs/guide-uk/start-installation.md index 24db366..0598b4b 100644 --- a/docs/guide-uk/start-installation.md +++ b/docs/guide-uk/start-installation.md @@ -148,9 +148,7 @@ http://localhost:8080/ Додаток, встановлений за інструкціями, наведеними вище, буде працювати одразу як з [Apache HTTP server](http://httpd.apache.org/), так і з [Nginx HTTP server](http://nginx.org/) на -Windows, Mac OS X чи Linux із встановленим PHP 5.4 або вище. Yii 2.0 також сумісний із віртуальною машиною Фейсбука -[HHVM](http://hhvm.com/), однак є деякі крайні випадки, де HHVM поводиться інакше, -ніж рідний PHP, тому ви повинні бути дуже уважними при використанні HHVM. +Windows, Mac OS X чи Linux із встановленим PHP 5.4 або вище. На робочому сервері вам напевно захочеться змінити URL додатку з `http://www.example.com/basic/web/index.php` на `http://www.example.com/index.php`. Для цього необхідно змінити кореневу директорію в налаштуваннях веб-сервера на `basic/web`. diff --git a/docs/guide-vi/start-installation.md b/docs/guide-vi/start-installation.md index 091bc33..9e8fe5e 100644 --- a/docs/guide-vi/start-installation.md +++ b/docs/guide-vi/start-installation.md @@ -121,9 +121,7 @@ Cấu hình máy chủ Web bạn có thể bỏ qua phần này. Các ứng dụng được cài đặt theo phương pháp trên, được chạy trong Windows, Max OS X, Linux hoặc máy chủ [Apache HTTP](http://httpd.apache.org/) -hoặc [Nginx HTTP server](http://nginx.org/) và PHP phiên bản 5.4 hoặc cao hơn đều có thể được chạy trực tiếp. Yii 2.0 cũng tương thích với HHVM, -do [HHVM](http://hhvm.com/)của Facebook và PHP tiêu chuẩn trên các khía cạnh trong một vài nơi một với trường hợp hơi khác nhau, -khi sử dụng HHVM đòi hỏi ít thay đổi. +hoặc [Nginx HTTP server](http://nginx.org/) và PHP phiên bản 5.4 hoặc cao hơn đều có thể được chạy trực tiếp. Trong môi trường máy chủ sản xuất, bạn có thể cấu hình máy chủ để ứng dụng có thể truy cập thông qua URL http://www.example.com/index.php thay vì http://www.example.com/basic/web/index.php. Cấu hình này đòi hỏi các thư mục gốc tài liệu của máy chủ Web vào thư mục basic/web. Bạn cũng có thể ẩn index.php trên URL, diff --git a/docs/guide-zh-CN/start-installation.md b/docs/guide-zh-CN/start-installation.md index 9d2044f..5b04bdd 100644 --- a/docs/guide-zh-CN/start-installation.md +++ b/docs/guide-zh-CN/start-installation.md @@ -99,7 +99,7 @@ http://localhost/basic/web/index.php > Info: 如果你现在只是要试用 Yii 而不是将其部署到生产环境中,本小节可以跳过。 -通过上述方法安装的应用程序在 Windows,Max OS X,Linux 中的 [Apache HTTP 服务器](http://httpd.apache.org/)或 [Nginx HTTP 服务器](http://nginx.org/)且PHP版本为5.4或更高都可以直接运行。Yii 2.0 也兼容 Facebook 公司的 [HHVM](http://hhvm.com/),由于 HHVM 和标准 PHP 在边界案例上有些地方略有不同,在使用 HHVM 时需稍作处理。 +通过上述方法安装的应用程序在 Windows,Max OS X,Linux 中的 [Apache HTTP 服务器](http://httpd.apache.org/)或 [Nginx HTTP 服务器](http://nginx.org/)且PHP版本为5.4或更高都可以直接运行。 在生产环境的服务器上,你可能会想配置服务器让应用程序可以通过 URL `http://www.example.com/index.php` 访问而不是 `http://www.example.com/basic/web/index.php`。这种配置需要将 Web 服务器的文档根目录指向 `basic/web` 目录。可能你还会想隐藏掉 URL 中的 `index.php`,具体细节在 [URL 解析和生成](runtime-url-handling.md)一章中有介绍,你将学到如何配置 Apache 或 Nginx 服务器实现这些目标。 diff --git a/tests/framework/caching/PgSQLCacheTest.php b/tests/framework/caching/PgSQLCacheTest.php index 193f971..ef56e10 100644 --- a/tests/framework/caching/PgSQLCacheTest.php +++ b/tests/framework/caching/PgSQLCacheTest.php @@ -25,9 +25,6 @@ class PgSQLCacheTest extends DbCacheTest if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) { $this->markTestSkipped('pdo and pdo_pgsql extensions are required.'); } - if (defined('HHVM_VERSION')) { - $this->markTestSkipped('HHVMs PgSQL implementation does not seem to support blob colums in the way they are used here.'); - } $this->getConnection()->createCommand(' CREATE TABLE IF NOT EXISTS "cache" diff --git a/tests/framework/db/CommandTest.php b/tests/framework/db/CommandTest.php index 133cf46..addb7f0 100644 --- a/tests/framework/db/CommandTest.php +++ b/tests/framework/db/CommandTest.php @@ -150,10 +150,6 @@ abstract class CommandTest extends DatabaseTestCase public function testBindParamValue() { - if (\defined('HHVM_VERSION') && $this->driverName === 'pgsql') { - $this->markTestSkipped('HHVMs PgSQL implementation has some specific behavior that breaks some parts of this test.'); - } - $db = $this->getConnection(); // bindParam @@ -211,14 +207,12 @@ SQL; $this->assertEquals($floatCol, $row['float_col']); if ($this->driverName === 'mysql' || $this->driverName === 'sqlite' || $this->driverName === 'oci') { $this->assertEquals($blobCol, $row['blob_col']); - } elseif (\defined('HHVM_VERSION') && $this->driverName === 'pgsql') { - // HHVMs pgsql implementation does not seem to support blob columns correctly. } else { $this->assertInternalType('resource', $row['blob_col']); $this->assertEquals($blobCol, stream_get_contents($row['blob_col'])); } $this->assertEquals($numericCol, $row['numeric_col']); - if ($this->driverName === 'mysql' || $this->driverName === 'oci' || (\defined('HHVM_VERSION') && \in_array($this->driverName, ['sqlite', 'pgsql']))) { + if ($this->driverName === 'mysql' || $this->driverName === 'oci') { $this->assertEquals($boolCol, (int) $row['bool_col']); } else { $this->assertEquals($boolCol, $row['bool_col']); diff --git a/tests/framework/db/mysql/connection/DeadLockTest.php b/tests/framework/db/mysql/connection/DeadLockTest.php index 07b5ef9..d20321f 100644 --- a/tests/framework/db/mysql/connection/DeadLockTest.php +++ b/tests/framework/db/mysql/connection/DeadLockTest.php @@ -41,7 +41,6 @@ class DeadLockTest extends \yiiunit\framework\db\mysql\ConnectionTest if (!\function_exists('posix_kill')) { $this->markTestSkipped('posix_kill() is not available'); } - // HHVM does not support this (?) if (!\function_exists('pcntl_sigtimedwait')) { $this->markTestSkipped('pcntl_sigtimedwait() is not available'); } diff --git a/tests/framework/db/pgsql/CommandTest.php b/tests/framework/db/pgsql/CommandTest.php index 8f6ec9d..2eebf73 100644 --- a/tests/framework/db/pgsql/CommandTest.php +++ b/tests/framework/db/pgsql/CommandTest.php @@ -82,10 +82,6 @@ class CommandTest extends \yiiunit\framework\db\CommandTest */ public function testSaveSerializedObject() { - if (\defined('HHVM_VERSION')) { - $this->markTestSkipped('HHVMs PgSQL implementation does not seem to support blob colums in the way they are used here.'); - } - $db = $this->getConnection(); $command = $db->createCommand()->insert('type', [ diff --git a/tests/framework/di/ContainerTest.php b/tests/framework/di/ContainerTest.php index 63c2327..e2f6a3d 100644 --- a/tests/framework/di/ContainerTest.php +++ b/tests/framework/di/ContainerTest.php @@ -303,10 +303,6 @@ class ContainerTest extends TestCase public function testVariadicConstructor() { - if (\defined('HHVM_VERSION')) { - static::markTestSkipped('Can not test on HHVM because it does not support variadics.'); - } - $container = new Container(); $container->get('yiiunit\framework\di\stubs\Variadic'); @@ -315,10 +311,6 @@ class ContainerTest extends TestCase public function testVariadicCallable() { - if (\defined('HHVM_VERSION')) { - static::markTestSkipped('Can not test on HHVM because it does not support variadics.'); - } - $container = new Container(); $func = function (QuxInterface ...$quxes) { return "That's a whole lot of quxes!"; diff --git a/tests/framework/filters/auth/AuthTest.php b/tests/framework/filters/auth/AuthTest.php index efbda31..295efb4 100644 --- a/tests/framework/filters/auth/AuthTest.php +++ b/tests/framework/filters/auth/AuthTest.php @@ -30,10 +30,6 @@ class AuthTest extends \yiiunit\TestCase { parent::setUp(); - if (defined('HHVM_VERSION') && getenv('TRAVIS') == 'true') { - $this->markTestSkipped('Can not test reliably with HHVM on travis-ci.'); - } - $_SERVER['SCRIPT_FILENAME'] = '/index.php'; $_SERVER['SCRIPT_NAME'] = '/index.php'; diff --git a/tests/framework/i18n/FormatterTest.php b/tests/framework/i18n/FormatterTest.php index a4adb45..7bc41c2 100644 --- a/tests/framework/i18n/FormatterTest.php +++ b/tests/framework/i18n/FormatterTest.php @@ -449,10 +449,6 @@ class FormatterTest extends TestCase $this->markTestSkipped('ICU data does not contain measure units information.'); }; - if (defined('HHVM_VERSION')) { - return $skip(); - } - try { $bundle = new \ResourceBundle($this->formatter->locale, 'ICUDATA-unit'); $massUnits = $bundle['units']['mass']; diff --git a/tests/framework/mail/TemplateTest.php b/tests/framework/mail/TemplateTest.php index 8515eee..67e93d0 100644 --- a/tests/framework/mail/TemplateTest.php +++ b/tests/framework/mail/TemplateTest.php @@ -200,7 +200,7 @@ TEXT { $template = $this->createTemplate(); - $htmlViewName = 'test_html_view' . sha1($htmlViewFileContent); // hash is needed to generate different view files to ensure it works on HHVM + $htmlViewName = 'test_html_view'; $htmlViewFileName = $this->getTestFilePath() . DIRECTORY_SEPARATOR . $htmlViewName . '.php'; file_put_contents($htmlViewFileName, $htmlViewFileContent); diff --git a/tests/framework/web/session/pgsql/DbSessionTest.php b/tests/framework/web/session/pgsql/DbSessionTest.php index 2512f33..b23028a 100644 --- a/tests/framework/web/session/pgsql/DbSessionTest.php +++ b/tests/framework/web/session/pgsql/DbSessionTest.php @@ -19,10 +19,6 @@ class DbSessionTest extends \yiiunit\framework\web\session\AbstractDbSessionTest { protected function setUp() { - if (defined('HHVM_VERSION')) { - $this->markTestSkipped('HHVMs PgSQL implementation does not seem to support blob columns in the way they are used here.'); - } - parent::setUp(); }