Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Twig Template Engine Laravel Package

memio/twig-template-engine

Twig template engine integration for Memio: render Memio documents using Twig, enabling customizable code generation and templated output. Provides a bridge between Memio’s model-driven generators and Twig’s flexible templating system.

View on GitHub
Deep Wiki
Context7
4.0.0:
  • dropped support for PHP < 8.0
  • dropped support for twig < 3.0
3.0.2:
  • setup Github Actions
  • changed tooling from scripts to Makefile
  • installed phpstan as a dev depdendency
  • installed swiss-knife as a dev depdendency
  • installed rector as a dev depdendency
  • upgraded PHP CS fixer to v2.19.3
  • dockerized for local development
3.0.1:
  • fixed templates
3.0.0:
  • dropped support for PHP < 7.2
  • added support for PHP 8
  • added support for phpspec 7
2.0.0-alpha3:
  • added support for Twig 2
2.0.0-alpha2:
  • fixed method opening curly brace
  • fixed property collection
2.0.0-alpha1:
  • dropped support for PHP < 7
  • added scalar type hints
  • added return type hints

BC breaks:

  • changed maximum method argument line length from 120 to 80
  • changed opening curly brace to be on the same line as the method closing parenthesis, when arguments are on many lines
  • changed properties to not have empty lines between them, except if they have PHPdoc

Example

Code generated before:

<?php

namespace Vendor\Project;

class MyClass
{
    private $variableNamesWouldNotBeVeryLong;
    
    private $imagineCodeWithVariableNamesThatNeverEnd;

    /**
     * [@var](https://github.com/var) string
     */
    private $number;

    public funtion myMethod($variableNamesWouldNotBeVeryLong, $isFirst, $thisIsTheLongestVariableNameEver)
    {
        return 42;
    }

    public function myOtherMethod()
    {
        return [];
    }
}

Code generated after:

<?php

namespace Vendor\Project;

class MyClass
{
    private $variableNamesWouldNotBeVeryLong;
    private $imagineCodeWithVariableNamesThatNeverEnd;

    /**
     * [@var](https://github.com/var) string
     */
    private $number;

    public funtion myMethod(
        bool $variableNamesWouldNotBeVeryLong,
        string $isFirst,
        float $thisIsTheLongestVariableNameEver
    ) : int {
        return 42;
    }

    public function myOtherMethod() : array
    {
        return [];
    }
}
1.2.7:
  • added support for Twig 2
1.2.6:
  • fixed missing empty line abovr namespace
1.2.5:
  • added support for PHP 7
1.2.4:
  • custom templates now have a higher priority
1.2.3:
  • do not generate namespace statement if not set
1.2.1:
  • fixed return tag
1.2.0:
  • updated dependency on memio/model to v1.3
1.1.1:
  • actually merged the PR about the new PHPdoc tags
1.1.0:
  • added abstract class
  • added return PHPdoc tag
  • added throws PHPdoc tag
1.0.2:
  • fixed Locate namespace
1.0.1:
  • fixed version in README
1.0.0:
  • updated documentation
1.0.0-rc1:
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui