GuzzleBundle icon indicating copy to clipboard operation
GuzzleBundle copied to clipboard

Update maximum version of symfony to 2.3

Open luigimassa opened this issue 13 years ago • 8 comments

luigimassa avatar Apr 11 '13 11:04 luigimassa

+1

ricbra avatar Apr 12 '13 08:04 ricbra

I'm actively working on this; I'll submit a pull request once I've got things working.

matmar10 avatar Apr 18 '13 07:04 matmar10

Looks like a change to the way plugins are registered is causing a problem; I got the Bundle working again by removing the offending bits. Any idea how to call addSubscriber and register the plugins the new way? That seems to be the only bit missing to be fully compatible with 3.*.

<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

    <parameters>
        <parameter key="guzzle.service_builder.class">Guzzle\Service\Builder\ServiceBuilder</parameter>
        <parameter key="guzzle.service_builder_factory.class">Guzzle\Service\Builder\ServiceBuilder</parameter>

        <!-- parameter key="guzzle.plugin.service_builder.class">Guzzle\Service\Plugin\PluginCollectionPlugin</parameter -->
        <parameter key="guzzle.plugin.data_collector.class">Ddeboer\GuzzleBundle\Guzzle\Http\Plugin\DataCollectorPlugin</parameter>
        <parameter key="guzzle.plugin.log.class">Guzzle\Http\Plugin\LogPlugin</parameter>
        <parameter key="guzzle.plugin.log.monolog.adapter.class">Guzzle\Log\MonologLogAdapter</parameter>
        <parameter key="guzzle.plugin.log.array.adapter.class">Guzzle\Log\ArrayLogAdapter</parameter>
        <parameter key="guzzle.data_collector.class">Ddeboer\GuzzleBundle\DataCollector\HttpDataCollector</parameter>

        <parameter key="guzzle.cache_adapter.class"></parameter>
        <parameter key="guzzle.cache.adapter.doctrine.class">Guzzle\Cache\DoctrineCacheAdapter</parameter>
        <parameter key="guzzle.cache.adapter.zend.class">Guzzle\Cache\Zf1CacheAdapter</parameter>
        <parameter key="guzzle.cache.driver.apc.class">Doctrine\Cache\ApcCache</parameter>
        <parameter key="guzzle.cache.driver.array.class">Doctrine\Cache\ArrayCache</parameter>
    </parameters>

    <services>
        <service id="guzzle.service_builder" class="%guzzle.service_builder.class%" factory-class="%guzzle.service_builder_factory.class%" factory-method="factory">
            <argument type="string" id="guzzle.service_builder.configuration_file">%guzzle.service_builder.configuration_file%</argument>

            <!-- call method="addSubscriber">
                <argument type="service" id="guzzle.plugin.service_builder" />
            </call -->
        </service>

        <!-- service id="guzzle.plugin.service_builder" class="%guzzle.plugin.service_builder.class%" public="false">
            <argument type="collection">
                <argument type="service" id="guzzle.plugin.log.array" />
                <argument type="service" id="guzzle.plugin.log.monolog" />
            </argument>
        </service -->

        <service id="guzzle.plugin.log.monolog" class="%guzzle.plugin.log.class%" public="false">
            <argument type="service" id="guzzle.plugin.log.monolog.adapter" />
        </service>

        <service id="guzzle.plugin.log.array" class="%guzzle.plugin.log.class%" public="false">
            <argument type="service" id="guzzle.plugin.log.array.adapter" />
        </service>

        <service id="guzzle.plugin.log.array.adapter" class="%guzzle.plugin.log.array.adapter.class%" public="false">
        </service>

        <service id="guzzle.plugin.log.monolog.adapter" class="%guzzle.plugin.log.monolog.adapter.class%" public="false">
            <argument type="service" id="logger" on-invalid="null" />
            <tag name="monolog.logger" channel="guzzle" />
        </service>

        <service id="guzzle.data_collector" class="%guzzle.data_collector.class%" public="false">
            <argument type="service" id="guzzle.plugin.log.array.adapter" />
        </service>
    </services>

</container>

matmar10 avatar Apr 18 '13 07:04 matmar10

Just to be clear: my goal is not only to use Symfony 2.3 but also Guzzle 3.x. Sorry I didn't read your original request clearly. Were you hoping to use Guzzle 2.x? I'm digging what I've read in the docs about Guzzle 3.x so I'm stoked to upgrade to get the new sauce.

matmar10 avatar Apr 18 '13 07:04 matmar10

My bad, the answer is here: https://github.com/ddeboer/GuzzleBundle/pull/14/files It's late here :)

matmar10 avatar Apr 18 '13 07:04 matmar10

Just wondering if there is any news on this. Is this bundle planning on supporting symfony >2.2?

oste avatar Jun 01 '13 23:06 oste

nay way to install this bundle on 2.3.x?

ITOmauricioherran avatar Jun 05 '13 17:06 ITOmauricioherran

@oste and @mauricioherran -- check this one out: https://github.com/ddeboer/GuzzleBundle/pull/14/files

matmar10 avatar Jun 05 '13 18:06 matmar10