Git Product home page Git Product logo

Comments (8)

ohader avatar ohader commented on June 23, 2024

Interesting! Can you please share the Phar archive and it's source code that you're using, as well as how to execute it (I assume it's a CLI application). Thx

from phar-stream-wrapper.

ohader avatar ohader commented on June 23, 2024

stream_select seems to be related to #8 (which could not be verified, yet)

from phar-stream-wrapper.

cumuru avatar cumuru commented on June 23, 2024

Sure. That‘s my composer scripts packing the phar archive:

"scripts": {
      "extension-create-libs": [
        "mkdir -p Libraries/temp Libraries/build",
        "if [ ! -f Libraries/build/vendor/bin/phar-composer ]; then cd Libraries/build && composer require clue/phar-composer; fi",
        "if [ ! -f Libraries/php-iban.phar ]; then cd Libraries/temp && composer require globalcitizen/php-iban && composer config classmap-authoritative true && composer config prepend-autoloader false && composer dump-autoload; fi",
        "[ -f Libraries/php-iban.phar ] || Libraries/build/vendor/bin/phar-composer build Libraries/temp/ Libraries/php-iban.phar",
        "chmod -x Libraries/*.phar",
        "rm -rf Libraries/temp Libraries/build"
      ],
      "extension-build": [
        "@extension-create-libs"
      ],
      "extension-clean": [
        "rm -rf Libraries"
      ]
    }

It‘s not strictly a CLI application but a TYPO3 eID script call. I attached the phar for reference.
See the phar source code here: https://github.com/globalcitizen/php-iban

php-iban.phar.zip

from phar-stream-wrapper.

ohader avatar ohader commented on June 23, 2024

I could not reproduce using include('phar://php-iban.phar/vendor/autoload.php');. The initial report mentioned symfony-process.phar, could you please attach that file as well in case you've just shared the wrong bundle?

My isolated test scenario just looked like this:

<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';

call_user_func(function () {
    \TYPO3\PharStreamWrapper\Manager::initialize(
        (new \TYPO3\PharStreamWrapper\Behavior())
            ->withAssertion(new \TYPO3\PharStreamWrapper\Interceptor\PharExtensionInterceptor())
    );
    if (in_array('phar', stream_get_wrappers())) {
        stream_wrapper_unregister('phar');
        stream_wrapper_register('phar', \TYPO3\PharStreamWrapper\PharStreamWrapper::class);
    }

    include('phar://php-iban.pharx/vendor/autoload.php');
});

from phar-stream-wrapper.

mbrodala avatar mbrodala commented on June 23, 2024

I just got a similar report in pagemachine/typo3-formlog#23 apparently affecting stream_open. Any idea what I can do?

from phar-stream-wrapper.

ohader avatar ohader commented on June 23, 2024

@mbrodala stream_open seems to be unrelated to this issue here... Reading the issue you referenced it's for sure the interceptor (https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/core/Classes/IO/PharStreamWrapperInterceptor.php#L50-L59) that blocks the request. I guess(!) it might be related to PATH_site and using a couple of symbolic links there...

from phar-stream-wrapper.

ohader avatar ohader commented on June 23, 2024

The issue mentioned in pagemachine/typo3-formlog#23 was a different one.

Back to this very issue, invocation of stream_select within the wrapper is still a mystery. Looking forward to a locally reproducible scenario (Docker, DDEV, Vagrant, ...)

from phar-stream-wrapper.

ohader avatar ohader commented on June 23, 2024

There haven't been much more details on this topic during the last two years. I guess it's fine to close this issue.

from phar-stream-wrapper.

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.