welpdev / mailchimp-bundle

MailChimp integration with Symfony and MailChimp API V3
https://welpdev.github.io/mailchimp-bundle/
MIT License
44 stars 36 forks source link

Not working installation Symfony 2.7.8 with mailchimp-bundle 1.2.2 #19

Closed ghost closed 5 years ago

ghost commented 6 years ago

Hi after installing version 1.2.2 via composer i update Appkernel and config.yml with minimal requirements and i get this error ReflectionException in AddConsoleCommandPass.php line 40: Class does not exist http://prntscr.com/jaa3la I am using Symfony 2.7.9 After downgrading to 1.2.1 it is running ok If i can help with anything else please let me know here.

jeroendk commented 6 years ago

Hi! Can you post a stack trace?

ghost commented 6 years ago

i posted it. in that link is all i get nothing else. I know pretty much useless it was driving me crazy

jeroendk commented 6 years ago

Ok, do you have a composer file I can use to replicate the problem ?

ghost commented 6 years ago

here is composer json

{
    "name": "book/.checkout",
    "license": "proprietary",
    "type": "project",
    "autoload": {
        "psr-4": {
            "": "src/"
        }
    },
    "require": {
        "php": ">=5.3.9",
        "symfony/symfony": "2.7.*",
        "doctrine/orm": "^2.4.8",
        "doctrine/doctrine-bundle": "~1.4",
        "symfony/assetic-bundle": "~2.3",
        "symfony/swiftmailer-bundle": "~2.3",
        "symfony/monolog-bundle": "~2.4",
        "sensio/distribution-bundle": "~4.0",
        "sensio/framework-extra-bundle": "^3.0.2",
        "incenteev/composer-parameter-handler": "~2.0",
        "oyejorge/less.php": "v1.7.0.9",
        "javiereguiluz/easyadmin-bundle": "v1.10.2",
        "sonata-project/doctrine-orm-admin-bundle": "2.3.3",
        "sonata-project/admin-bundle": "2.4.x-dev",
        "sonata-project/easy-extends-bundle": "2.1.10",
        "sonata-project/user-bundle": "2.2.5",
        "jaybizzle/crawler-detect": "2.*",
        "beberlei/DoctrineExtensions": "v1.0.17",
        "hampe/zurb-ink-bundle": "2.2.5",
        "excelwebzone/recaptcha-bundle": "2.6.x-dev",
        "dragonmantank/cron-expression": "^2.1",
        "stof/doctrine-extensions-bundle": "1.3.x-dev",
        "welp/mailchimp-bundle": "1.2.1"
    },
    "require-dev": {
        "sensio/generator-bundle": "~2.3",
        "symfony/phpunit-bridge": "~2.7" 
    },
    "scripts": {
        "post-install-cmd": [
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap"
        ],
        "post-update-cmd": [
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap"
        ]
    },
    "config": {
        "bin-dir": "bin"
    },
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web",
        "symfony-assets-install": "relative",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}

as i said before i only changed your bundle to 1.2.1 and it was ok after that :)

nicolasricci commented 6 years ago

@jeroendk the problem is coming from the following changes https://github.com/welpdev/mailchimp-bundle/commit/70ceab35a372068e28f4007a1ceffed58ae1cf89#diff-24d25eb5e07008bbf94172e9c1049950R55 which is not compatible with symfony 2.x as a class parameter is expected when declaring a service (cf.http://symfony.com/doc/2.8/console/commands_as_services.html)

The best thing I believe would be to tag a new branch 1.3 with this commit and set the minimum compatibility to symfony 3.x

Nightbr commented 5 years ago

Hey, can you make a PR for this? (Update readme, composer.json, ...) and I will create the releases.

In fact since symfony 2.8 is end of bug fix now, and will be end of security fix in nov2019 https://symfony.com/roadmap/2.8 it is recommanded to upgrade to symfony 3.

emgiezet commented 5 years ago

The problem trace:

[Symfony\Component\DependencyInjection\Exception\RuntimeException]                                                                                                                                              
  The definition for "welp\mailchimpbundle\command\synchronizemergefieldscommand" has no class. If you intend to inject this service dynamically at runtime, please mark it as synthetic=true. If this is an abs  
  tract definition solely used by child definitions, please add abstract=true, otherwise specify a class to get rid of this error.                                                                                

Exception trace:
 () at /home/mgz/workspace/shuttout/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckDefinitionValidityPass.php:63
 Symfony\Component\DependencyInjection\Compiler\CheckDefinitionValidityPass->process() at /home/mgz/workspace/shuttout/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php:117
 Symfony\Component\DependencyInjection\Compiler\Compiler->compile() at /home/mgz/workspace/shuttout/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:614
 Symfony\Component\DependencyInjection\ContainerBuilder->compile() at /home/mgz/workspace/shuttout/app/bootstrap.php.cache:2618
 Symfony\Component\HttpKernel\Kernel->initializeContainer() at /home/mgz/workspace/shuttout/app/bootstrap.php.cache:2396
 Symfony\Component\HttpKernel\Kernel->boot() at /home/mgz/workspace/shuttout/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:70
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /home/mgz/workspace/shuttout/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:126
 Symfony\Component\Console\Application->run() at /home/mgz/workspace/shuttout/app/console:29
Nightbr commented 5 years ago

Hey, try our latest release where we change how we declare services (thanks to @jeroendk) and let us know if this issue can be closed.

Nightbr commented 5 years ago

I will close this, feel free to reopen if the bug persist 👌