symfony / recipes-contrib

Symfony Contrib Recipes Repositories

Home Page:https://github.com/symfony/recipes-contrib/blob/flex/main/RECIPES.md

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HttpPlug missed logger dependency

Koc opened this issue · comments

dev@dev:~/vhosts/gleb-migrator$ cat composer.json
{
    "type": "project",
    "license": "proprietary",
    "require": {
        "php": "^7.1.3",
       "php-http/guzzle6-adapter": "^1.1",
        "php-http/httplug-bundle": "^1.7",
        "symfony/console": "^3.3",
        "symfony/flex": "^1.0",
        "symfony/framework-bundle": "^3.3",
        "symfony/orm-pack": "^1.0",
        "symfony/var-dumper": "^3.3",
        "symfony/yaml": "^3.3"
    },
    "require-dev": {
        "symfony/dotenv": "^3.3"
    },
    "config": {
        "preferred-install": {
            "*": "dist"
        },
        "sort-packages": true
    },
    "autoload": {
        "psr-4": {
            "App\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "App\\Tests\\": "tests/"
        }
    },
    "scripts": {
        "auto-scripts": {
            "make cache-warmup": "script",
            "assets:install --symlink --relative %PUBLIC_DIR%": "symfony-cmd"
        },
        "post-install-cmd": [
            "@auto-scripts"
        ],
        "post-update-cmd": [
            "@auto-scripts"
        ]
    },
    "conflict": {
        "symfony/symfony": "*",
        "symfony/twig-bundle": "<3.3",
        "symfony/debug": "<3.3"
    },
    "extra": {
        "symfony": {
            "id": "xxx",
            "allow-contrib": false
        }
    }
}
dev@dev:~/vhosts/gleb-migrator$ cat config/bundles.php
<?php

return [
    'Symfony\Bundle\FrameworkBundle\FrameworkBundle' => ['all' => true],
    'Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle' => ['all' => true],
    'Doctrine\Bundle\DoctrineBundle\DoctrineBundle' => ['all' => true],
    'Http\HttplugBundle\HttplugBundle' => ['all' => true],
];

There is no httpplug config inside packages https://github.com/symfony/recipes-contrib/blob/master/php-http/httplug-bundle/1.6/config/packages/httplug.yaml

dev@dev:~/vhosts/gleb-migrator$ ll config/
total 28
drwxrwxr-x 4 dev dev 4096 Aug  4 13:46 ./
drwxrwxr-x 8 dev dev 4096 Aug  4 12:43 ../
-rw-rw-r-- 1 dev dev  305 Aug  4 12:34 bundles.php
drwxrwxr-x 5 dev dev 4096 Aug  4 13:39 packages/
drwxrwxr-x 2 dev dev 4096 Aug  4 12:29 routes/
-rw-rw-r-- 1 dev dev  317 Aug  4 12:20 routes.yaml
-rw-rw-r-- 1 dev dev 1291 Aug  4 12:20 services.yaml
dev@dev:~/vhosts/gleb-migrator$ ll config/packages/
total 32
drwxrwxr-x 5 dev dev 4096 Aug  4 13:39 ./
drwxrwxr-x 4 dev dev 4096 Aug  4 13:46 ../
drwxrwxr-x 2 dev dev 4096 Aug  4 13:39 dev/
-rw-rw-r-- 1 dev dev  431 Aug  4 12:27 doctrine.yaml
-rw-rw-r-- 1 dev dev  437 Aug  4 12:20 framework.yaml
drwxrwxr-x 2 dev dev 4096 Aug  4 12:29 prod/
-rw-rw-r-- 1 dev dev   54 Aug  4 12:20 routing.yaml
drwxrwxr-x 2 dev dev 4096 Aug  4 12:29 test/

Have you enable the possibility to install contrib recipes?

Whoops, sorry. Have changed "allow-contrib": false to true. But got another error

Executing script make cache-warmup [KO]
 [KO]
Script make cache-warmup returned with error code 2
!!  PHP Fatal error:  Uncaught Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: The service "httplug.client" has a dependency on a non-existent service "logger". in /home/dev/vhosts/gleb-migrator/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php:31
!!  Stack trace:
!!  #0 /home/dev/vhosts/gleb-migrator/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php(57): Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->processValue(Object(Symfony\Component\DependencyInjection\Reference), false)
!!  #1 /home/dev/vhosts/gleb-migrator/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php(35): Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass->processValue(Array, false)
!!  #2 /home/dev/vhosts/gleb-migrator/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php(64): Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->pr in /home/dev/vhosts/gleb-migrator/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php on line 31
!!
!!  make: *** [cache-clear] Error 255
!!
!!

//cc @Nyholm

after composer req log all ok, but looks like some hard dependency is missed

Thank you. We (or @fbourigault) have just added some missing hard dependencies to the HTTPlug bundle. We were about to release them today. But we probably missed the logger.

We should make the logger optional. Thank you.

@fabpot should we notify user when he installed contrib recipe if "allow-contrib": false? Maybe add bold warning or prompt with possibility change flag to true on runtime.

@Koc If you are using a recent version of Flex, then you should have had a warning about that. Can you paste the output of the composer require command you ran?