Git Product home page Git Product logo

Comments (19)

schmunk42 avatar schmunk42 commented on September 27, 2024 1

Try adding patch to the dev image.

See also:

from yii2-docker.

kohanax avatar kohanax commented on September 27, 2024 1

musl - current state

https://wiki.musl-libc.org/open-issues
Locale limitations
Locale support is very limited, and barely works. Translation of LC_TIME is not possible because the key strings for ABMON_5 and MON_5 (“May”) are identical. Custom collation orders (LC_COLLATE) are not implemented at all, despite there always having been an intent to support them. LC_NUMERIC and LC_MONETARY also admit no variation by locale. Solving these problems requires a major overhaul, but the main missing prerequisite is involvement from users who want the functionality.

firefly-iii/firefly-iii#2298

from yii2-docker.

schmunk42 avatar schmunk42 commented on September 27, 2024

See https://github.com/yiisoft/yii2-docker#faq

If you can come up with a PR where all (basic) framework tests pass we might reconsider it. We had very esoteric issues with timezone, AFAIR.

Related:

from yii2-docker.

ferronsw avatar ferronsw commented on September 27, 2024

Okay, I can give it a try. Any specific package Yii depends on for timezones?

from yii2-docker.

schmunk42 avatar schmunk42 commented on September 27, 2024

php-intl was a problem, see also #25

from yii2-docker.

ferronsw avatar ferronsw commented on September 27, 2024

docker-compose run --rm php php /tests/requirements.php doesn't work.

docker-compose run --rm php php /tests/requirements.php
WARN[0000] The "GITHUB_API_TOKEN" variable is not set. Defaulting to a blank string. 
no such service: php

php-min works, but then you get:

/usr/local/bin/docker-php-entrypoint: exec: line 20: ph-minp: not found

from yii2-docker.

schmunk42 avatar schmunk42 commented on September 27, 2024

@ferronsw Did you recreate the Alpine flavor on a fork of yours? Where can I find it?

ph-minp: not found looks like a typo?!

from yii2-docker.

ferronsw avatar ferronsw commented on September 27, 2024

Yes, you can find it here: https://github.com/ferronsw/yii2-docker
For a quick test I've edited docker-php-entrypoint at the moment (Changed first line).

from yii2-docker.

schmunk42 avatar schmunk42 commented on September 27, 2024

There is no Alpine-Apache image for PHP, AFAIK.
d775289#diff-69b55ecece009a14040cc4d99160ccdd73011ec45c16484a40758c107b5a0e03R87

You need to move ahead with fpm-nginx I think.

from yii2-docker.

ferronsw avatar ferronsw commented on September 27, 2024

I've installed apache in the alpine php container myself. But this doesn't explain the problem right?

from yii2-docker.

schmunk42 avatar schmunk42 commented on September 27, 2024

The error occurs because Alpine does not have bash installed by default and our entry-scripts are using that.

You can try working based on: https://github.com/yiisoft/yii2-docker/tree/feature/alpine-2022 - with php-dev images...

But beware, there are many failing tests:

> docker-compose run --rm -w /yii2 php-dev php -d error_reporting="E_ALL ^ E_DEPRECATED" vendor/bin/phpunit tests/framework/ --exclude db
Creating yii2fpm_php-dev_run ... done
PHPUnit 4.8.34 by Sebastian Bergmann and contributors.

.............................................................   61 / 4259 (  1%)
.............................................................  122 / 4259 (  2%)
.............................................................  183 / 4259 (  4%)
.............................................................  244 / 4259 (  5%)
.............................................................  305 / 4259 (  7%)
.............................................................  366 / 4259 (  8%)
.............................................................  427 / 4259 ( 10%)
.............................................................  488 / 4259 ( 11%)
.............................................................  549 / 4259 ( 12%)
.............................................................  610 / 4259 ( 14%)
.............................................................  671 / 4259 ( 15%)
.............................................................  732 / 4259 ( 17%)
.............................................................  793 / 4259 ( 18%)
.............................................................  854 / 4259 ( 20%)
.............................................................  915 / 4259 ( 21%)
.............................................................  976 / 4259 ( 22%)
...........S................................................. 1037 / 4259 ( 24%)
..........S.................................................. 1098 / 4259 ( 25%)
............................................................. 1159 / 4259 ( 27%)
............................................................. 1220 / 4259 ( 28%)
..........SSSSSSSSSSSSSSSSSS.............................S... 1281 / 4259 ( 30%)
.............SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS.SSSSSSSSSSS 1342 / 4259 ( 31%)
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS.................. 1403 / 4259 ( 32%)
............................................................. 1464 / 4259 ( 34%)
............................................................. 1525 / 4259 ( 35%)
............................................................. 1586 / 4259 ( 37%)
............................................................. 1647 / 4259 ( 38%)
............................................................. 1708 / 4259 ( 40%)
............................................................. 1769 / 4259 ( 41%)
............................................................. 1830 / 4259 ( 42%)
............................................................. 1891 / 4259 ( 44%)
............................................................. 1952 / 4259 ( 45%)
............................................................. 2013 / 4259 ( 47%)
.................................FF.......................... 2074 / 4259 ( 48%)
............................................................. 2135 / 4259 ( 50%)
.................FF.......................................... 2196 / 4259 ( 51%)
............................................................. 2257 / 4259 ( 52%)
............................................................. 2318 / 4259 ( 54%)
............................................................. 2379 / 4259 ( 55%)
............................................................. 2440 / 4259 ( 57%)
............................................................. 2501 / 4259 ( 58%)
........................................FF................... 2562 / 4259 ( 60%)
............................................................. 2623 / 4259 ( 61%)
............................................................. 2684 / 4259 ( 63%)
............................................................. 2745 / 4259 ( 64%)
......................F.F.................................... 2806 / 4259 ( 65%)
............................................................. 2867 / 4259 ( 67%)
............................................................. 2928 / 4259 ( 68%)
...............................S............................. 2989 / 4259 ( 70%)
............................................................. 3050 / 4259 ( 71%)
........I.................................................... 3111 / 4259 ( 73%)
............................................................. 3172 / 4259 ( 74%)
............................................................. 3233 / 4259 ( 75%)
............................................................. 3294 / 4259 ( 77%)
............................................................. 3355 / 4259 ( 78%)
............................................................. 3416 / 4259 ( 80%)
............................................................. 3477 / 4259 ( 81%)
............................................................. 3538 / 4259 ( 83%)
............................................................. 3599 / 4259 ( 84%)
.......................FF.................................... 3660 / 4259 ( 85%)
................................S............................ 3721 / 4259 ( 87%)
............................................................. 3782 / 4259 ( 88%)
............................................................. 3843 / 4259 ( 90%)
............................................................. 3904 / 4259 ( 91%)
............................................................I 3965 / 4259 ( 93%)
............................................................. 4026 / 4259 ( 94%)
............................................................. 4087 / 4259 ( 95%)
............................................................. 4148 / 4259 ( 97%)
............................................................. 4209 / 4259 ( 98%)
..................................................

You should really fix these slow tests (>500ms)...
 1. 1005ms to run yiiunit\framework\mutex\FileMutexTest:testTimeout
 2. 1004ms to run yiiunit\framework\mutex\RetryAcquireTraitTest:testRetryAcquire


Time: 4.72 seconds, Memory: 36.00MB

There were 10 failures:

1) yiiunit\framework\helpers\FormatConverterTest::testIntlIcuToPhpShortFormTime
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'g:i A'
+'g:i A'

/yii2/tests/framework/helpers/FormatConverterTest.php:56
/yii2/vendor/phpunit/phpunit/phpunit:52
/yii2/vendor/bin/phpunit:120

2) yiiunit\framework\helpers\FormatConverterTest::testIntlIcuToPhpShortFormDateTime
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'n/j/y, g:i A'
+'n/j/y, g:i A'

/yii2/tests/framework/helpers/FormatConverterTest.php:62
/yii2/vendor/phpunit/phpunit/phpunit:52
/yii2/vendor/bin/phpunit:120

3) yiiunit\framework\helpers\FormatConverterTest::testIntlIcuToJuiShortFormTime
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-': '
+': '

/yii2/tests/framework/helpers/FormatConverterTest.php:211
/yii2/vendor/phpunit/phpunit/phpunit:52
/yii2/vendor/bin/phpunit:120

4) yiiunit\framework\helpers\FormatConverterTest::testIntlIcuToJuiShortFormDateTime
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'m/d/y, : '
+'m/d/y, : '

/yii2/tests/framework/helpers/FormatConverterTest.php:217
/yii2/vendor/phpunit/phpunit/phpunit:52
/yii2/vendor/bin/phpunit:120

5) yiiunit\framework\helpers\InflectorTest::testTransliterateMedium
Failed asserting that '?Espanol?' is one of '¿Espanol?'.

/yii2/tests/TestCase.php:218
/yii2/tests/framework/helpers/InflectorTest.php:331
/yii2/vendor/phpunit/phpunit/phpunit:52
/yii2/vendor/bin/phpunit:120

6) yiiunit\framework\helpers\InflectorTest::testTransliterateLoose
Failed asserting that '?Espanol?' is one of 'Espanol?'.

/yii2/tests/TestCase.php:218
/yii2/tests/framework/helpers/InflectorTest.php:374
/yii2/vendor/phpunit/phpunit/phpunit:52
/yii2/vendor/bin/phpunit:120

7) yiiunit\framework\i18n\FormatterDateTest::testIntlAsTime
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-12:13:59 PM
+12:13:59 PM

/yii2/tests/framework/i18n/FormatterDateTest.php:146
/yii2/tests/framework/i18n/FormatterDateTest.php:134
/yii2/vendor/phpunit/phpunit/phpunit:52
/yii2/vendor/bin/phpunit:120

8) yiiunit\framework\i18n\FormatterDateTest::testIntlAsDatetime
Failed asserting that 'Dec 21, 2022, 12:13:59 PM' matches PCRE pattern "~Dec 21, 2022,? 12:13:59 PM~".

/yii2/tests/framework/i18n/FormatterDateTest.php:181
/yii2/tests/framework/i18n/FormatterDateTest.php:169
/yii2/vendor/phpunit/phpunit/phpunit:52
/yii2/vendor/bin/phpunit:120

9) yiiunit\framework\validators\NumberValidatorTest::testValidateValueSimple
Failed asserting that false is true.

/yii2/tests/framework/validators/NumberValidatorTest.php:86
/yii2/vendor/phpunit/phpunit/phpunit:52
/yii2/vendor/bin/phpunit:120

10) yiiunit\framework\validators\NumberValidatorTest::testValidateValueArraySimple
Failed asserting that false is true.

/yii2/tests/framework/validators/NumberValidatorTest.php:127
/yii2/vendor/phpunit/phpunit/phpunit:52
/yii2/vendor/bin/phpunit:120

FAILURES!
Tests: 4259, Assertions: 16044, Failures: 10, Skipped: 113, Incomplete: 2.

from yii2-docker.

ferronsw avatar ferronsw commented on September 27, 2024

Thx! Any reason why composer is commented in the example file?

I get these warnings in both PHP 7.4 and 8.1:

Gathering patches for dependencies. This might take a minute.
  - Installing phpunit/phpunit-mock-objects (2.3.8): Extracting archive
  - Installing phpunit/php-file-iterator (1.4.5): Extracting archive
  - Installing phpunit/phpunit (4.8.34): Extracting archive
  - Applying patches for phpunit/phpunit-mock-objects
    https://yiisoft.github.io/phpunit-patches/phpunit_mock_objects.patch (Fix PHP 7 and 8 compatibility)
   Could not apply patch! Skipping. The error was: Cannot apply patch https://yiisoft.github.io/phpunit-patches/phpunit_mock_objects.patch

In Patches.php line 326:
                                                                                                                            
  Cannot apply patch Fix PHP 7 and 8 compatibility (https://yiisoft.github.io/phpunit-patches/phpunit_mock_objects.patch)!  
                                                                                                                            

from yii2-docker.

schmunk42 avatar schmunk42 commented on September 27, 2024

Thx! Any reason why composer is commented in the example file?

Was also due to missing bash - I've updated the fork.

from yii2-docker.

schmunk42 avatar schmunk42 commented on September 27, 2024

FYI - even with

            tzdata \
            icu-data-full \
            icu-libs \

test results are the same :(

from yii2-docker.

ferronsw avatar ferronsw commented on September 27, 2024

Because I still can't run the tests myself. Because of the error when running composer install.

from yii2-docker.

ferronsw avatar ferronsw commented on September 27, 2024

@schmunk42 Can you help me why I can't run the tests?

PHP version: 8.1.13
529e853ea7e9:/yii2# composer install
Gathering patches for root package.
Removing package phpunit/php-file-iterator so that it can be re-installed and re-patched.
  - Removing phpunit/php-file-iterator (1.4.5)
Removing package phpunit/phpunit so that it can be re-installed and re-patched.
  - Removing phpunit/phpunit (4.8.34)
Removing package phpunit/phpunit-mock-objects so that it can be re-installed and re-patched.
  - Removing phpunit/phpunit-mock-objects (2.3.8)
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Package operations: 3 installs, 0 updates, 0 removals
Gathering patches for root package.
Gathering patches for dependencies. This might take a minute.
  - Installing phpunit/phpunit-mock-objects (2.3.8): Extracting archive
  - Installing phpunit/php-file-iterator (1.4.5): Extracting archive
  - Installing phpunit/phpunit (4.8.34): Extracting archive
  - Applying patches for phpunit/phpunit-mock-objects
    https://yiisoft.github.io/phpunit-patches/phpunit_mock_objects.patch (Fix PHP 7 and 8 compatibility)
   Could not apply patch! Skipping. The error was: Cannot apply patch https://yiisoft.github.io/phpunit-patches/phpunit_mock_objects.patch

In Patches.php line 326:
                                                                                                                            
  Cannot apply patch Fix PHP 7 and 8 compatibility (https://yiisoft.github.io/phpunit-patches/phpunit_mock_objects.patch)!  
                                                                                                                            

from yii2-docker.

ferronsw avatar ferronsw commented on September 27, 2024

Thanks, that works :) The strange thing is everyone says adding icu-data-full should work, but it doesn't. This also worked for other images I build.

from yii2-docker.

schmunk42 avatar schmunk42 commented on September 27, 2024

Yeah, I recall that you had to recompile or patch some libs for Alpine.

See also #25

from yii2-docker.

samdark avatar samdark commented on September 27, 2024

Alpine images aren't that great because of musl. Quite significant performance drop compared to glibc. Up to 30%.

from yii2-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.