phpmultithreadingsymfonyamphp

PHP framework AMPHP/THREAD used with SYMFONY - Where does it have to be installed?


I am looking to implement the framework amphp/thread, with Symfony3, which I ve read about in this article (https://www.mullie.eu/parallel-processing-multi-tasking-php/).

I'd looked at the setting process on the git page: https://github.com/amphp/thread.

I've followed the checklist:

Now, 3rd task on the checklist, I have the installation of the framework itself (amphp/thread) left to do.

I am a bit confuse, because it is not an "official" Symfony bundle. So I don't think I can put it under [my_symfony_project]/vendor/ and refer to it in the file [my_symfony_project]/app/AppKernel.php. So how do one do in this case:


Solution

  • You can simply install the library with composer, as example launching this command from the root of your project:

    >php composer.phar require amphp/thread
    

    And use it in your code directly: the composer process generate the correct autoloader for you. No necessary add to the list of the Symfony2 bundle (is not a bundle).

    Hope this help