profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/enumag/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Jáchym Toušek enumag Parkers s. r. o. Prague http://enumag.cz

contributte/codeception 27

:arrow_forward: Integration of Nette Framework to Codeception.

deprecated-packages/ActionAutowire 9

[DEPRECATED, READ-ONLY] Use:

07th-mod/higurashi-patch-compiler 5

Compiler for Higurashi patches. It's still under development.

07th-mod/robomi-chan 2

Script to add most of the voice lines automatically.

enumag/AdminLTE 1

AdminLTE - Free Premium Admin control Panel Theme That Is Based On Bootstrap 3.x

enumag/bunny 1

Performant pure-PHP AMQP (RabbitMQ) sync/async (ReactPHP) library

enumag/ace 0

Ace (Ajax.org Cloud9 Editor)

enumag/adminer 0

:whale: Tiniest boxed dockerized Adminer (MySQL/PostgreSQL,SQLite,Mongo,Oracle) Dockerfiles

enumag/adminer-1 0

Database management in a single PHP file

issue commentphp-ds/ext-ds

What are the maintainers' opinions on using php-ds as a basis for new data structures in php-src(core)?

@TysonAndre Could you add \Ds\Vector to the benchmark? Considering the extension is mentioned in the RFC I think it would make sense to have it in the comparison as well. I'm quite surprised that arrays are so fast. Also I noticed that in the benchmark for the new Vector class you're using array access instead of methods. I wonder if methods would be faster.

TysonAndre

comment created time in 8 hours

issue commentnelmio/NelmioApiDocBundle

The service "nelmio_api_doc.render_docs.html.asset" has a dependency on a non-existent service "twig.extension.assets"

After upgrading from v4.5 to v4.6 I'm getting this error. A bit different but probably related?

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: The service "twig.extension.assets" has a dependency on a non-existent service "assets.packages".
BafS

comment created time in 15 hours

push eventenumag/phpstorm-settings

Jáchym Toušek

commit sha 10e01bc5193c69a5e852e961c109b7d413754994

PS-2021.2 <enumag@enumag-HP-ProBook-450-G5 Update filetypes.xml

view details

push time in 17 hours

push eventenumag/phpstorm-settings

Jáchym Toušek

commit sha 095ef4d816c7b79ac70b45ca7a8ee87ecd54f5b5

PS-2021.2 <enumag@enumag-HP-ProBook-450-G5 Update filetypes.xml

view details

push time in 17 hours

issue commentphpstan/phpstan

False positive with conditional yield

Possibly a duplicate of https://github.com/phpstan/phpstan/issues/4100? :thinking:

enumag

comment created time in 2 days

issue openedphpstan/phpstan

False positive with conditional yield

Bug report

The code snippet reports an error about missing return but there doesn't need to be one when yield is used. Doesn't matter that the yield is inside a condition.

Also if you check the "Strict rules" checkbox it seems that PHPStan outright crashed.

Code snippet that reproduces the problem

https://phpstan.org/r/c233a97e-89b9-4476-8c6f-6cf588b03ed0

Expected output

No error.

created time in 2 days

push eventenumag/phpstorm-settings

Jáchym Toušek

commit sha 5c7c30095aea56cbc54df4ad1e06a84d5180d9d2

PS-2021.2 <enumag@enumag-HP-ProBook-450-G5 Update filetypes.xml

view details

push time in 2 days

push eventenumag/phpstorm-settings

Jáchym Toušek

commit sha 12213427ca0935abc769a153b9581da86d7a910f

PS-2021.2 <enumag@enumag-HP-ProBook-450-G5 Update filetypes.xml

view details

Jáchym Toušek

commit sha 813feca25d5fd586ab0d1b7050d07aa6300279dc

PS-2021.2 <enumag@enumag-HP-ProBook-450-G5 Merge branch 'master'

view details

push time in 3 days

issue commentvimeo/psalm

false positive with non-empty-string and sprintf

It's a very minor thing for me, only encountered it once. So I don't wanna add a separate plugin for that. Any plans to have this fixed in psalm itself?

ppdeblieck

comment created time in 4 days

issue commentrosmanov/pecl-eio

Extension hangs without eio_init(), PHP 8 completely broken

Thanks a lot @rosmanov!

enumag

comment created time in 4 days

issue commentrosmanov/pecl-eio

Extension hangs without eio_init(), PHP 8 completely broken

Can't say I know what the MINIT phase is so I can hardly complain about it. :-D Good job! Thanks for fast solution!

enumag

comment created time in 4 days

issue commentrosmanov/pecl-eio

Extension hangs without eio_init(), PHP 8 completely broken

Yup, I can confirm that this works. I only noticed some warnings during compilation but it didn't fail and I my script doesn't hang anymore.

Here are the warnings in case you wanna fix them.

In file included from /usr/app/pecl-eio-master/php8/php_eio.c:72:
./libeio/eio.c: In function 'eio__mtouch':
./libeio/eio.c:1324:8: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
 1324 |     if (addr < end)
      |        ^
./libeio/eio.c: In function 'eio__scandir':
./libeio/eio.c:1806:19: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
 1806 |           else if (flags & EIO_READDIR_DIRS_FIRST)
      |                   ^
In file included from /usr/app/pecl-eio-master/php8/php_eio.c:72:
./libeio/eio.c: In function 'etp_proc':
./libeio/eio.c:2197:1: warning: no return statement in function returning non-void [-Wreturn-type]
 2197 | }
      | ^
enumag

comment created time in 4 days

push eventenumag/phpstorm-settings

Jáchym Toušek

commit sha 84ce531856fe6212c188dca4c3052e9a53778722

PS-2021.2.1 <tousek@NUC6I7-JACHYM Update find.xml, filetypes.xml

view details

Jáchym Toušek

commit sha f39ac57a79bc1947ce1d59890993f8431625018c

PS-2021.2.1 <tousek@NUC6I7-JACHYM Update find.xml

view details

push time in 4 days

issue openedrosmanov/pecl-eio

Extension hangs without eio_init(), PHP 8 completely broken

After upgrading to PHP 8 and ext-eio 3.0.0RC2, I encountered an issue where the script hanged. Since it was very odd and I couldn't be sure if it's Amphp's problem or Eio's problem, I left it be until I had more time to figure it out. Now I finally managed to get to it.

After analysis the same thing actually happens on PHP 7.4 as well with both ext-eio 2.0 and ext-eio 3.0.0RC2. However it can be fixed by manually calling the eio_init() function.

On the PHP 8's version of the extension this function no longer exists and therefore the bug is impossible to fix in userland code.

To reproduce the problem create a directory and inside it a Dockerfile with this content:

ARG PHP_VERSION=8.0

FROM php:${PHP_VERSION}

COPY --from=composer:2 /usr/bin/composer /usr/bin/composer

WORKDIR /usr/app

RUN apt-get update && \
    apt-get install -qq git unzip ${PHPIZE_DEPS} && \
    pecl install eio-beta && \
    docker-php-ext-enable eio && \
    git clone https://github.com/amphp/file.git . && \
    composer install --ignore-platform-reqs

RUN echo '<?php\n\
use Amp\File\Driver\EioDriver;\n\
use Amp\Loop;\n\
require __DIR__ . "/vendor/autoload.php";\n\
echo phpversion() . PHP_EOL;\n\
echo phpversion("eio") . PHP_EOL;\n\
Loop::run(\n\
    function (): Generator {\n\
        $driver = new EioDriver(Loop::get());\n\
        $list = yield $driver->listFiles(__DIR__);\n\
        echo count($list);\n\
    }\n\
);\n\
' >> ./test.php

Then run:

docker build . --tag eio-bug
docker run -it eio-bug sh -c "php test.php"

The script will hang but will continue if you press enter.

Running it like this instead also fixes it:

docker run -it eio-bug sh -c "echo '\n' | php test.php"

The exact same issue can be reproduced on PHP 7 after hacking amphp/file to not call the eio_init() regardless of ext-eio version.

created time in 4 days

push eventenumag/amp

Jáchym Toušek

commit sha 61038971e19203014de61029b40b33f7fa79ff82

Update ci.yml

view details

push time in 5 days

PR opened amphp/amp

Fix ci.yml

This is the reason why https://github.com/amphp/amp/pull/360 seems to be "hanging". It's because your CI configuration is kinda wrong - starting checks on both PRs and all branches means it's triggered twice. Which works on your own PRs (you just see double the checks) but breaks for cross-fork PRs. I think it expects the push checks to happen for the branch but they don't because it's on another fork.

I'm sadly not an expert on this matter but I saw it several times in the past already. Basically no cross-fork PR can ever get a success with this setup

The common setup I see around is this:

on:
  pull_request:
  push:
    branches:
      - "master"

Basically run checks only on PRs and master. In your case I think it would be master, v3, and v3-revolt - basically all branches that are expected to be merged into.

+4 -2

0 comment

1 changed file

pr created time in 5 days

push eventenumag/amp

Jáchym Toušek

commit sha 85633dcd8141aed6621853144a7f9ff42fd4ca66

Fix ci.yml

view details

push time in 5 days

push eventenumag/amp

Jáchym Toušek

commit sha 66fc48e20becaa768a9deeeab6f9d484d9b8d190

Fix windows support

view details

push time in 5 days

push eventenumag/phpstorm-settings

Jáchym Toušek

commit sha e2c9e1a73c81627dd784c7073ea811856efd85aa

PS-2021.2.1 <tousek@NUC6I7-JACHYM Update filetypes.xml

view details

push time in 5 days

push eventenumag/phpstorm-settings

Jáchym Toušek

commit sha 0b33889ee0bbc07d743ee147b0d0c0a0c4523ff2

PS-2021.2.1 <tousek@NUC6I7-JACHYM Update filetypes.xml

view details

Jáchym Toušek

commit sha 600562c0b520d2e3e5ce2ce02a7a970bf67402bc

PS-2021.2.1 <tousek@NUC6I7-JACHYM Update find.xml

view details

Jáchym Toušek

commit sha 2d71e5c6e4b5d990852d2c21d26d7185e0a9936c

PS-2021.2.1 <tousek@NUC6I7-JACHYM Merge branch 'master'

view details

push time in 5 days

pull request commentrectorphp/rector-src

[PHP 8.0] Remove NullsafeOperatorRector, as often breaking and promoting non-early returns and losen types

@TomasVotruba @samsonasik Understandable decision. The one case which I'm confident can be done reliably and which I'd very much appreciate if a rule existed would be changing this:

$variable !== null ? $variable->method() : null
$variable?->method()
TomasVotruba

comment created time in 5 days

push eventenumag/amp

Jáchym Toušek

commit sha 6ad2c86d10d4293a75841e3609d309b8f8f81d2a

Fix windows support

view details

push time in 6 days

push eventenumag/file

Jáchym Toušek

commit sha 2eff0819f971f56a98c235fd92f58b72cf07bdcb

Fix EioDriver

view details

push time in 7 days

pull request commentamphp/file

Fix EioDriver

If you wanna try it yourself you can easily reproduce the issue like this:

  1. Create Dockerfile with this content:
ARG PHP_VERSION=7.4

FROM php:${PHP_VERSION}

COPY --from=composer:2 /usr/bin/composer /usr/bin/composer

WORKDIR /usr/app

RUN apt-get update && \
    apt-get install -qq git unzip ${PHPIZE_DEPS} && \
    pecl install eio && \
    docker-php-ext-enable eio && \
    git clone https://github.com/amphp/file.git . && \
    composer install --ignore-platform-reqs

RUN echo '<?php\n\
use Amp\File\Driver\EioDriver;\n\
use Amp\Loop;\n\
require __DIR__ . "/vendor/autoload.php";\n\
Loop::run(\n\
    function (): Generator {\n\
        $driver = new EioDriver(Loop::get());\n\
        $list = yield $driver->listFiles(__DIR__);\n\
        echo count($list);\n\
    }\n\
);\n\
' >> ./test.php

Then run:

docker build . --tag eio-bug
docker run -it eio-bug sh -c "php test.php"

The script will hang unless you add the eio_init() call but it will continue if you press enter.

Running it like this instead also fixes it (even without eio_init()):

docker run -it eio-bug sh -c "echo '\n' | php test.php"
enumag

comment created time in 7 days

PR opened amphp/file

Fix EioDriver

Closes #59

You removed the call to eio_init() here, however this completely breaks the EioDriver. When I try to use it, the script will hang until I press enter and then continues. Calling eio_init() fixes the problem.

What's more you claim that it was deprecated in eio v2 and removed in eio v3. However I can confirm that it still exists in eio 3.0.0RC2 and even this version breaks when it isn't called.

In my opinion we should still call it but perhaps wrap it with function exists. Hopefully if eio does remove it in the future the bug should be fixed.

+3 -0

0 comment

1 changed file

pr created time in 7 days

create barnchenumag/file

branch : fix-eio

created branch time in 7 days

push eventenumag/phpstorm-settings

Jáchym Toušek

commit sha dfceaeecc2eeb25dcb357f090291fef0b928b88e

PS-2021.2 <enumag@enumag-HP-ProBook-450-G5 Update php.xml

view details

push time in 7 days

push eventenumag/phpstorm-settings

Jáchym Toušek

commit sha 428b4b46cb21063339908d54c5b1591a756ecc92

PS-2021.2 <enumag@enumag-HP-ProBook-450-G5 Update lightEdit.xml

view details

push time in 7 days

push eventenumag/phpstorm-settings

Jáchym Toušek

commit sha 90ffa656431d0606b12bb08ada40b47b151b35ed

PS-2021.2 <enumag@enumag-HP-ProBook-450-G5 Update filetypes.xml

view details

push time in 8 days

issue commentrectorphp/rector

NullsafeOperatorRector PHP warnings

@TomasVotruba Suggestion: when the code ends up with en error like in this case, I think it would be nice to have the "create test" button shown.

enumag

comment created time in 8 days