Code Monkey home page Code Monkey logo

eightpointsguzzlebundle's People

Contributors

b-vadym avatar coil avatar doncallisto avatar grahamcampbell avatar gregurco avatar khrapeichuk avatar marcj avatar mathielen avatar matthieucutin avatar mihaileu avatar mshavliuk avatar mtamazlicaru avatar neirda24 avatar pwalkow avatar rafaelgfirmino avatar ragezbla avatar rpkamp avatar rrajkomar avatar ruudk avatar rvanlaak avatar rvitaliy avatar samvdb avatar slash3b avatar soullivaneuh avatar thelevti avatar thomasjohansen avatar tjveldhuizen avatar trongrg avatar varci-bot avatar wimme002 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eightpointsguzzlebundle's Issues

Overwritting WssePlugin

Lieber Florian,

ich bin so frei und schreibe direkt auf Deutsch. Aktuell stehe ich vor der Herausforderung, dass eine API, die ich mit WsseToken ansprechen möchte, nur einen MD5 Nonce erlaubt.

Gar kein Problem, dachte ich zumindest, einfach die Klasse WsseAuthMiddleware (https://github.com/8p/guzzle-wsse-middleware/blob/master/src/EightPoints/Guzzle/WsseAuthMiddleware.php) vererben, Methode generateNonce überschreiben und in der Konfiguration meine überschriebene Klasse als Parameter guzzle_bundle.middleware.wsse.class einfügen.

Nur leider funktioniert es nicht wie erwartet, und ich glaube, das Problem liegt genau hier:

$wsse = new Definition($container->getParameter('guzzle_bundle.middleware.wsse.class'));

https://github.com/8p/GuzzleBundle/blob/master/DependencyInjection/GuzzleExtension.php#L229

Hier wird in meinen Augen der Klassenname direkt aus der Konfiguration eingefügt, nämlich dieser Wert:

parameter key="guzzle_bundle.middleware.wsse.class">EightPoints\Guzzle\WsseAuthMiddleware</parameter>

https://github.com/8p/GuzzleBundle/blob/master/Resources/config/services.xml#L20

So wie ich das verstehe, müsste hier doch der Parameter weiterhin eingefügt bleiben, damit der noch überschrieben werden kann und erst bei der Erzeugung der Instanzen müssten der Klassenname festgelegt werden oder?

Habe ich einen Denkfehler drin?

vielen Dank für deine Unterstützung,
Sebastian

Query option breaks BC if one doesn't use it

Apparently commit d79f2fc (in version 4.5.0) indirectly broke a simple use case when not using this option at all.

If you try to pass a $uri to the Client#request() method (or any of the request family for that matter) which contains query, Guzzle will disregard it and instead it will use query from the $options array. Even though we didn't put query in the $options array, GuzzleBundle put it in the default options array (or default config - Client constructor's first argument) as an empty array() (because symfony configuration component provides default value if one is not present) and after guzzle merges $options with $this->config it now has a query element.

Should be easy to fix in GuzzleExtension by unsetting query from $options array after line 54 if it is an empty array.

Serialization of 'Symfony\Component\HttpFoundation\File\UploadedFile' is not allowed

Hi, when I enabe your bundle in AppKernel I get this error when I submit form with UploadedFile. thanks for help

    in DataCollector.php line 35
    at serialize(array('requests' => array(array('request' => object(Request), 'response' => object(Response))), 'logs' => array())) in DataCollector.php line 35
    at DataCollector->serialize()
    at serialize(array('token' => 'adb901', 'parent' => null, 'children' => array(), 'data' => array('config' => object(ConfigDataCollector), 'request' => object(RequestDataCollector), 'ajax' => object(AjaxDataCollector), 'exception' => object(ExceptionDataCollector), 'events' => object(EventDataCollector), 'logger' => object(LoggerDataCollector), 'time' => object(TimeDataCollector), 'memory' => object(MemoryDataCollector), 'router' => object(RouterDataCollector), 'form' => object(FormDataCollector), 'security' => object(SecurityDataCollector), 'swiftmailer' => object(MessageDataCollector), 'db' => object(DoctrineDataCollector), 'memcache' => object(MemcacheDataCollector), 'guzzle' => object(HttpDataCollector), 'ladybug' => object(LadybugDataCollector), 'container' => object(ContainerDataCollector), 'assetic' => object(AsseticDataCollector), 'twig' => object(TwigDataCollector), 'templating' => object(TemplatingDataCollector)), 'ip' => '172.16.11.3', 'method' => 'POST', 'url' => 'http://admin.exemple.com/fr/profile', 'time' => '1418215993')) in FileProfilerStorage.php line 153
    at FileProfilerStorage->write(object(Profile)) in Profiler.php line 119
    at Profiler->saveProfile(object(Profile)) in ProfilerListener.php line 139
    at ProfilerListener->onKernelTerminate(object(PostResponseEvent), 'kernel.terminate', object(ContainerAwareEventDispatcher))
    at call_user_func(array(object(ProfilerListener), 'onKernelTerminate'), object(PostResponseEvent), 'kernel.terminate', object(ContainerAwareEventDispatcher)) in WrappedListener.php line 59
    at WrappedListener->__invoke(object(PostResponseEvent), 'kernel.terminate', object(ContainerAwareEventDispatcher))
    at call_user_func(object(WrappedListener), object(PostResponseEvent), 'kernel.terminate', object(ContainerAwareEventDispatcher)) in classes.php line 1776
    at EventDispatcher->doDispatch(array(object(WrappedListener), object(WrappedListener)), 'kernel.terminate', object(PostResponseEvent)) in classes.php line 1709
    at EventDispatcher->dispatch('kernel.terminate', object(PostResponseEvent)) in classes.php line 1870
    at ContainerAwareEventDispatcher->dispatch('kernel.terminate', object(PostResponseEvent)) in TraceableEventDispatcher.php line 112
    at TraceableEventDispatcher->dispatch('kernel.terminate', object(PostResponseEvent)) in bootstrap.php.cache line 2929
    at HttpKernel->terminate(object(Request), object(Response)) in bootstrap.php.cache line 2297
    at Kernel->terminate(object(Request), object(Response)) in app_dev.php line 44

Following the readme, this does not work.

Having followed the readme, and having put the neccesary info in app/config/config.yml by the instructions, i'm getting a "missing service" when trying to use $this->get()

The instructions are very unclear and could use a more in depth explanation and a step by step guide on how to use this bundle....

No matching accepted Response format could be determined

When I call an oAuth v2 end point with CURL it works:

$handle = curl_init();
        curl_setopt($handle, CURLOPT_URL, $url);
        curl_setopt($handle, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($handle, CURLOPT_POST, count($parameters));
        curl_setopt($handle, CURLOPT_POSTFIELDS, http_build_query($parameters));
        $result = curl_exec($handle);

        curl_close($handle);

        return json_decode($result, true);

When I use the Guzzle client:

try {
            $headers = [
                'Accept' => 'application/json',
                'Content-Type' => 'application/json',
            ];
            $options = [
                'form_params' => [
                    'grant_type' => 'client_credentials',
                    'client_id' => $this->connectClientId,
                    'client_secret' => $this->connectClientSecret,
                ],
                'set_headers' => $headers,
            ];
            $response = $this->client->post('/oauth/v2/token', $options);
        } catch (BadResponseException $e) {
            $response = $e->getResponse();
            $body = $response->getBody();
            die($body->getContents());
        }

I get this error (from the end point which is also a Symfony application):

No matching accepted Response format could be determined
in vendor/friendsofsymfony/rest-bundle/EventListener/FormatListener.php at line 76

Why does it work in CURL and not in Guzzle?
I'am using "eightpoints/guzzle-bundle": "^5.2", with this config #77

Logging

Hi,

In configuration is possible to disable logging...
But you never use this configuration and still logging all output...

My script call in cycle cca 16milions reqests - but after 16000 request it takes cca 250 MB of memory!

when I override Logger and set

parameters:
guzzle_bundle.logger.class: Tsm\ServerBundle\Service\DevNullGuzzleLogger

then memory is still in same value (+-)

Is possible to fix logging? THX!

Logs are cleared when Exception is shown in development

When an exception occurs in development, a subrequest is made to twig.controller.exception:showAction to show the symfony exception page.

This means that a second call is made to HttpDataCollector::collect, this function contains the lines:

        // clear log to have only messages related to symfony request context
        $this->logger->clear();

This means that on the second call, all message will be cleared, and none will show up in in the profiler.

Fixing this might be as simple as removing this line, but I'm not sure how many side-effects it will have.

EDIT: on second thought, it might be better change setMessages to addMessages.

I'm on Symfony 3.1.4

Headers: form_input post overrides given header "content-type"

As mentioned in #82, Guzzle overrides header "Content-Type" if option 'form_params' is given.
This should be fixed, cause already existing content type headers should not be overridden.

https://github.com/guzzle/guzzle/blob/master/src/Client.php#L303

private function applyOptions(RequestInterface $request, array &$options)
{
        ...
        if (isset($options['form_params'])) {
            ...
            $options['body'] = http_build_query($options['form_params'], '', '&');
            unset($options['form_params']);
            $options['_conditional']['Content-Type'] = 'application/x-www-form-urlencoded';
        }
        ...

Query strings cause serialising issues

If I run:

$response = $client->get('hello');

Everything works correctly, but if I add a query string:

$response = $client->get('hello?a=1');
// or
$response = $client->get('hello', ['query' => ['a' => '1']]);

Everything works correctly but the Symfony profiler chokes and throws:

Exception in DataCollector.php line 35: Serialization of 'Closure' is not allowed.

I'm having comment out $this->addLogs($messages); in \EightPoints\Bundle\GuzzleBundle\DataCollector\HttpDataCollector to avoid this.

Response problem

I do something like this:
$client = $this->get('guzzle.client.xxx');
$response = $client->post('some_url');
echo $response->getBody()->getContents(); // returns empty string, why?

I do request to http://xxx.yyy/api/test and in ma browser I get correct reponse in json {"zzz":111}
what is wrong?

Request with cookie

Hello,

I'm trying to send a request with a cookie but it seems I can't quite figure it out:

$cookie = new SetCookie();
$cookie->setName('SESSIONID');
$cookie->setValue($token);
$cookie->setDomain('/');
$jar = new CookieJar();
$jar->setCookie($cookie);

$response = $client->request('POST', 'path', ['form_params' => $send, 'cookies' => $jar]);

Log: Hostname x.x.x.x was found in DNS cache * Trying x.x.x.x... * Connected to x.x.x.x port 88 (#1) > POST /path HTTP/1.1 Host: x.x.x.x User-Agent: GuzzleHttp/6.2.0 curl/7.43.0 PHP/5.6.20 Content-Type: application/x-www-form-urlencoded Accept: application/json Content-Length: 156 * upload completely sent off: 156 out of 156 bytes < HTTP/1.1 401 Unauthorized < Date: Thu, 23 Jun 2016 21:56:46 GMT < Server: NetTalk-WebServer/9.11 < Content-Length: 496 < Content-Type: text/html < Cache-Control: no-store, no-cache, must-revalidate, private,post-check=0, pre-check=0, max-age=0 < Pragma: no-cache < Connection: close < * Closing connection 1

I can't find the cookie in the log.
Also, $client->getConfig returns 'cookies' => boolean false

I tried adding in config.yml the option cookies: true under my client, and also under options, but I get an error.

What am I doing wrong? Thanks

Build error

Hey man.

How can we solve the test that are failing ?

Will we could not remove the 5.5 version of php travis CI , put the composer version > = 5.4 phpunit and replace the deprecated versions of phpunit? .

WSSE does not work

hello Florian,

Thank you very much for your support, the last issue with the Content-Type-Header is working now.

At the moment, the wsse token is ignored, this is my configuration:

  guzzle:
    emarsys:
      base_url: %terrafinanz_email.export.uri%
      headers:
        'Content-Type': "application/json"
      plugin:
         wsse:
           username: %terrafinanz_email.export.username%
           password: %terrafinanz_email.export.secret%

In the console, I don't see the X-WSSE header:

bildschirmfoto 2015-07-31 um 10 33 43

Thank you very much and greetings from munich, Sebastian

Plugins

I can't seem to find a way to addl handlers, plugins, Middleware or even add additional events to the guzzle package. I have a use-case where in I need to be able to change an authentication header, and I'd like to provide a plugin that can handle the work. However; I don't see how to make it work currently.

My initial thought was to try and add the plugin but I don't see how that is loaded. Then I tried to add it through a compiler pass; but since I don't have access to the options being set on the client I can't do that. My second thought was to create a handler on the guzzle stack, that would emit events, and then bind to handlers/listeners using tags.

Would this be something you where interested in?

Header Content-Type in options doesn't work

i try to setup a handler in config.yml, but the "Content-Type" doesn't work in request.
config.yml:

guzzle:
  clients:
    test:
      base_url: "testurl"
      options:
        auth:
          - "username"
          - "passwort"
        verify: false
        debug: true
        headers:
          Content-Type: "application/x-www-form-urlencoded; charset=utf-8"

Now when i call:

$client = $this->get('guzzle.client.test');
$request = $client->post(url, ['form_params'=> $body]);

the charset is not set.
But when i set the headers in post-call:

$request = $client->post(url, ['form_params'=> $body, 'headers' => [
                'Content-Type' => 'application/x-www-form-urlencoded; charset=utf-8'
            ]]);

The Charset is correct set

Documentation for HandlerStack

Is there any possibility in updating the documentation to advise how to add Handlers. I can see the functionality has been added via #21 but I am not understanding how we can integrate this in.

I am trying to use the GuzzleHttp\Subscriber\Oauth\Oauth1 middleware which can be added onto the HandlerStack, not sure how to do this via this bundle.

Hope you can help

Paul

Can't get Content of the Body using this Bundle

    $client = $this->get('guzzle.client.api');
    $response = $client->get('/api/users);
    var_dump($response->getBody()->getContents()); //empty

    $client = new \GuzzleHttp\Client();
    $res = $client->request('GET', 'http://local.project/api/users');
    var_dump($res->getBody()->getContents()); //gives content

If I do request using Guzzle Client it works, but when I use the bundle request it does not work, hoewever in the profiler it works.. what could be the problem?

Introduce versioning and align with guzzle bundle.

Hey Florian,

I used your convenient bundle to integrate the guzzle library into my project. After doing a composer update it lead to an application error, caused through incompatible changes in the guzzle library, as you only provide dev-master as version and change the dependency on the underlying guzzle bundle in this version. Thus there is no way, as I see it, to work with a fixed version of guzzle when I use your bundle.

Would it be an option to create releases of your repository, according to the versions of guzzle?
This is just meant as a feature request and improvement suggestion!

Kind regards,
Marco

Improve Profiler Layout

Some textareas are pretty small by default. This should be improved. Also some new screenshots should be created and inserted into README.md.

typo

See DependencyInjection/GuzzleExtension.php:119

$password = $$wsseConfig['password'];

Integrate guzzle-oauth2-plugin

Hi again ;)

Would be great to see https://github.com/Sainsburys/guzzle-oauth2-plugin integrated. Its the only OA2 plugin for Guzzle 6 afaik.
For now, I had to do it the old way, but having all configuration regarding guzzle in one place would be awesome.

Its pretty simple:

$handlerStack = HandlerStack::create();
$client = new Client(['handler'=> $handlerStack, 'base_uri' => $base_uri, 'auth' => 'oauth2']);

$config = [
    PasswordCredentials::CONFIG_USERNAME => $username,
    PasswordCredentials::CONFIG_PASSWORD => $password,
    PasswordCredentials::CONFIG_CLIENT_ID => $clientId,
    PasswordCredentials::CONFIG_CLIENT_SECRET => $clientSecret,
    PasswordCredentials::CONFIG_TOKEN_URL => $tokenUrl,
    'scope' => $scope,
];

$token = new PasswordCredentials($client, $config);
$refreshToken = new RefreshToken($client, $config);
$middleware = new OAuthMiddleware($client, $token, $refreshToken);

$handlerStack->push($middleware->onBefore());
$handlerStack->push($middleware->onFailure(5));

Best regards
Markus

LogMiddleware doesn't rewind the stream?

I noticed that the LogMiddleware doesn't rewind the stream after logging, so you have to do a seek(0) on the stream before you can read the body.

I guess this is done intentionally but I couldn't find any documentation on whether Guzzle handlers should handle resetting the stream after reading the body.

Current dev-master don't work with symfony 2.3

Hello,
I tried to use dev-master in symfony 2.3 but unfortunately composer update gived me this error :
(same error using ~3.0)

[Symfony\Component\DependencyInjection\Exception InvalidArgumentException]
Unable to parse file "/var/www/apmystorage/vendor/eightpoints/guzzle-bundle/EightPoints/Bundle/GuzzleBundle/DependencyInjection/../Resources/config/services.xml".

Is there any known issue ? or anything wrong I did ?

Impossible to access an attribute ("statusPhrase") on a null variable

On some Guzzle exception, like a connection refused, the response is empty.

It causes this error on the profiler:

Impossible to access an attribute ("statusPhrase") on a null variable.

From this template part:

<span class="response">{{ message.response.statusPhrase }} ({{ message.response.statusCode }})</span>

Related exception:

ConnectException {#2378 ▼
  -request: Request {#2363 ▶}
  -response: null
  -handlerContext: array:28 [▶]
  #message: "cURL error 7: Failed to connect to slack port 80: Connection refused (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)"
  #code: 0
  #file: "/code/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php"
  #line: 186
  -trace: {▶}
}

We should check if the response exists before trying to get any property of it.

UndefinedMethodException: getEventDispatcher

UndefinedMethodException: Attempted to call method "getEventDispatcher" on class "GuzzleHttp\Client" being thrown after adding the bundle to AppKernel.php and simply calling $client = $this->get('guzzle.client');

Headers set in config.yml not overridden by passed options

I've set the header in config.yml as following, using anonymous OAuth authentication

guzzle:
    clients:
        imgur_api:
            base_url: "https://api.imgur.com/3/"
            headers:
                Accept: "application/json"
                Authorization: "Client-ID %imgur_client_id%"

Later, when a user is authenticated, i replace the header in the code:

$parameters = [
    "json" => [
        "image" => $image,
        "type" => "base64",
    ],
    "headers" => [
        "Authorization" => "Bearer {$userEntity->getAccessToken()}"
    ],
];

And when i check on the logs, i find this:

* Hostname in DNS cache was stale, zapped
*   Trying 185.31.19.193...
* Connected to api.imgur.com (185.31.19.193) port 443 (#0)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use http/1.1
* Server certificate:
*    subject: C=US; ST=California; L=San Francisco; O=Imgur, Inc.; CN=*.imgur.com
*    start date: 2013-10-22 12:00:00 GMT
*    expire date: 2016-11-10 12:00:00 GMT
*    subjectAltName: api.imgur.com matched
*    issuer: C=US; O=DigiCert Inc; CN=DigiCert SHA2 Secure Server CA
*    SSL certificate verify ok.
> POST /3/image HTTP/1.1
Host: api.imgur.com
User-Agent: GuzzleHttp/6.2.0 curl/7.43.0 PHP/7.0.7-4+deb.sury.org~wily+1
Content-Type: application/json
Accept: application/json
Authorization: Client-ID XXX
Content-Length: 67534

As you can see, the Authorization header is not being replaced :(

What's going wrong here?

$response->getBody()->getContents() returns always empty content

$ composer show --installed | grep guzzle
eightpoints/guzzle-bundle            v4.5.1             Integrates Guzzle into Symfony2, comes with WSSE Plugin for RESTful Interfaces
eightpoints/guzzle-wsse-middleware   v4.2.0             WSSE Middleware for Guzzle, a PHP HTTP client library and framework for building RESTful web service clients
guzzlehttp/guzzle                    6.2.0              Guzzle is a PHP HTTP client library
guzzlehttp/promises                  1.2.0              Guzzle promises library
guzzlehttp/psr7                      1.3.0              PSR-7 message implementation

My code:

$response = $this->githubClient->post('access_token', ['form_params' => $params]);
$response = $response->getBody()->getContents(); //empty string ''

$this->githubClient is a \GuzzleHttp\Client instance configured through the guzzle bundle.

This whole stuff works, when I run $response->getBody()->rewind(); before getContents call.

$response = $this->githubClient->post('access_token', ['form_params' => $params]);
$response->getBody()->rewind();
$response = $response->getBody()->getContents(); //string '{blaa}'

I guess it has something todo with this bundle, as it reads already the body for the profiler tab. I guess you should call rewind() when you read the body for your purposes. However, I'm not sure about it yet as I haven't looked into the code.

wsse not working?

Plugin attached by guzzle.emitter in GuzzleExtension.php. Is it still available in Guzzle6?

How to set Header with dash

Hello!

I want to add the header "Content-Type" and tried this configuration:

guzzle:
  clients:
    emailApi:
      base_url: %email_api.uri%
      headers:
        'Content-Type': "application/json"
      plugin:
         wsse:
           username: %username%

The debug toolbar tells me, that the header is Content_Typpe (with underscore).

How can I send a header with dash?

Several clients

Hello!

I like your bundle and want ask, if you can add support for several clients.

like this:

guzzle:
    apiClient:
        plugin:
           wsse:
               username: acme
               password: pa55w0rd
    legacyClient:
        base_url: /old/api/without/wsse

Or has anyone a better idea for several clients in one application?

Thank you very much

Add custom middleware in the BundleExtension

Hi,

I want to have a middleware which will be used on every request. That's why I want to set the definition for that in my BundleExtension class. However, I don't seem to get it working.

In the issue #21 you said to call $stack = $this->get('guzzle.handler_stack.NAME_OF_CLIENT_BY_CONFIG'); to get the handler and then add the middleware by using the push method, or in my case, using addMethodCall to add the push.

However, the handler_stack doesn't seem to exist anymore and if I saw that correctly you are adding the middlewares to the handler and to the client when creating it, since the option to add handlers to a client is only present in the constructor. But how would I add a custom middleware? Or would I need to write a Client which extends your Client and do my configuration there?

Oauth authentication

Hi.
I'm trying to figure out how to request an API which require oauth 2 Authentication.

  • /v2/oauth/token has to be used with basic Auth to get a Bearer token
  • every requests must contain the token
  • after 3600s, the token is expired and a new /v2/oauth/token call is needed

Any recommended way to implement this ? Are events the place to do this ?
Thanks

Cannot set headers (results in 406 Not Acceptable response)

I'm using the bundle inside a service but cannot set the headers using settings:
config.yml:

# EightPoints GuzzleBundle
guzzle:
    clients:
        8p_guzzle_client:
            base_url: '%some_uri_1%'

        my_x_client:
            base_url: '%some_uri_2%'
            headers:
                Accept: 'application/json'

services.yml

services:
    crv.my_connect_api:
        class: AppBundle\My\MyConnect
        arguments:
            - "@guzzle.client.my_x_client"

MyConnect.php

   public function __construct(GuzzleClient $client) {
        $this->client = $client;
    }
   public function login()
    {
        // Call the API
        $response = $this->client->get('/oauth/v2/token');
        dump($client); // client exists and is directing to corret URL
        dump($response); // Client error: `GET http:\/\/some-url.dev\/oauth\/v2\/token` resulted in a `406 Not Acceptable` response:\n\n\n \n \n
        die('It does not work :/');
    }
...

The strange thing is that my IDE (PhpStorm) does not detect the service "@guzzle.client.my_x_client" but detects "@guzzle.client.8p_guzzle_client" inside the services.yml

Assetic error in Symfony 2.7

When warming up the cache, assetic is throwing the following error:
assetic.ERROR: The template "GuzzleBundle::profiler.html.twig" contains an error: The function "dump" does not exist in "GuzzleBundle::profiler.html.twig" at line 47

This is because dump was introduced in added in Twig 1.5 and Symfony 2.7 seems to be using Twig 1.2.

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.