Giter Club home page Giter Club logo

mjml-twig's People

Contributors

fd6130 avatar qferr avatar sranavela avatar

Stargazers

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

Watchers

 avatar

mjml-twig's Issues

Not working w/ Symfony 5

Sadly, it is not working w/ symfony 5.

Using version ^1.0 for qferr/mjml-twig
./composer.json has been updated
Running composer update qferr/mjml-twig
Loading composer repositories with package information
Restricting packages listed in "symfony/symfony" to "5.2.*"
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires qferr/mjml-twig ^1.0 -> satisfiable by qferr/mjml-twig[1.0.0].
    - qferr/mjml-twig 1.0.0 requires twig/twig ~2.0 -> found twig/twig[v2.0.0, ..., 2.x-dev] but the package is fixed to v3.3.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

affected composer settings:

...
    "twig/extra-bundle": "^2.12|^3.0",
    "twig/twig": "^2.12|^3.0"
...

Qferrer\Mjml\Twig\MjmlExtension::__construct() argument issue

I just upgrade my project from Symfony 5.4 to Symfony 6 and i encounter this issue.

Qferrer\Mjml\Twig\MjmlExtension::__construct():

Argument #1 ($renderer) must be of type Qferrer\Mjml\Renderer\RendererInterface, 

Qferrer\Mjml\Renderer\BinaryRenderer given

My services.yaml:

mjml_renderer:
        class: Qferrer\Mjml\Renderer\BinaryRenderer
        arguments:
            - '%kernel.project_dir%/node_modules/.bin/mjml'

    Qferrer\Mjml\Twig\MjmlExtension:
        arguments: ['@mjml_renderer']
        tags: ['twig.extension']

UPDATE:
But fresh new Symfony 6 project have no issue at all, not sure what is the culprit causing argument type error. Any clue?

It is because the current code using Qferrer\Mjml\Renderer\RendererInterface but the real namespace is Qferrer\Mjml\RendererInterface. PR will be create shortly.

Install Issues / Broken Script

This script initially looked promising; however, it appears to be broken / non-functional. I'm using the instructions in the Medium article: https://medium.com/@qferrer/using-mjml-with-twig-cccea9af0086

When you try to install it, you'll get this error:
Screen Shot 2020-06-22 at 12 31 05 PM

The ONLY way I could install it was downgrade to Twig 2.0 and add minimum-stability: dev to my composer.json file.

And if you try to run it, you get this error:
Screen Shot 2020-06-22 at 12 31 37 PM

No matter what I tried, I couldn't get this script to function at all. Even tried switching to your "https://github.com/qferr/mjml-php" extension -- but ran into the exact same issue.

Technology Stack

Twig: 2.12.5
PHP: 7.4.6

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.