Giter Club home page Giter Club logo

pug-symfony's People

Contributors

carusogabriel avatar kylekatarnls avatar onefivefournine 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

Watchers

 avatar  avatar  avatar  avatar

pug-symfony's Issues

Using conditionals triggers undefined offset

extends /admin/components/AdminBase.pug

block content
    .d-flex.align-items-start
        a(href="/link").card.dashboard-card
            span(data-feather="phone").card-image-top.card-icon
            .card-body
                h4.card-title Lorem ipsum
                if pc === '0'
                p.card-text lorem ipsum
                else
                p.card-text #{pActive} ...

I don't think I screw up something in this point...

Allow twig file imports

  • Allow include view.twig to render Twig file from within a Pug template file
  • Allow {% include 'view.pug' %} to render Pug file from within a Twig template file

Global template variables not defined

First, thank you for this very handy bundle.

Testing pug template with symfony we've found that the app variable is not defined when rendering (http://symfony.com/doc/current/book/templating.html#global-template-variables).

The error appends there:
each flash_message in app.session.flashbag.get('error')

And here is the complied version:
<?php foreach (\Jade\Compiler::getPropertyFromAnything(\Jade\Compiler::getPropertyFromAnything(\Jade\Compiler::getPropertyFromAnything($app, 'session'), 'flashbag'), 'get')('error') as $flash_message) { ?>

Do you know how we could globally define it? And if it's possible to have something like this also http://symfony.com/doc/current/cookbook/templating/global_variables.html ?

Thank you for your help

"extends" keyword throws Extends should be very first statement in file

I don't really know what causes it but here's my files

layout.pug

html
  head
    title My Site
  body
    block content
    footer
      p 
      | Some footer text

welcome.pug

extends layout

block content
    h1 Welcome #{name}

When I comment out if statement which throws the exception it works fine but I don't think it will catch unexpected "extends" keyword...

vendor\phug\parser\src\Phug\Parser\TokenHandler\ImportTokenHandler.php line 35

Facing autoload.php issue when installing on Symfony 2.8.26

Hi,
I started with a fresh symfony 2.8 setup and tried installing pug-symfony. I executed composer require pug-php/pug-symfony, and all the dependencies got installed. However, in the last section of installation, am getting this error, when autoload.php files are being generated,

[ErrorException]
include_once(C:\xampp\htdocs\demoSymfony\autoload.php): failed to
open stream: No such file or directory

Also, i tried composer dump-autoload -o and it provided me with the same error.

I also tried creating a blank autoload.php in the project root, and then tried composer update, and got this output,

Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
Package found added to be installed with npm: coffee-script@""
Package found added to be installed with npm: less@"
"
Package found added to be installed with npm: clean-css@""
Package found added to be installed with npm: babel-cli@"^6.10.1"
Package found added to be installed with npm: babel-plugin-transform-r
eact-jsx@"^6.8.0"
Package found added to be installed with npm: babel-preset-es2015@"^6.
8.0"
Package found added to be installed with npm: babel-preset-react@"^6.1
1.1"
Package found added to be installed with npm: stylus@"
"
Package found added to be installed with npm: uglify-js@""
Package found added to be installed with npm: clean-css@"
"
Package found added to be installed with npm: pug-cli@"^1.0.0-alpha6"
Packages installed.

[ErrorException]
call_user_func() expects parameter 1 to be a valid callback, clas
s 'Pug\PugSymfonyEngine' not found

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev
] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [
--no-progress] [--no-suggest] [--with-dependencies] [-v|vv|vvv|--verbo
se] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-a
utoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest
] [-i|--interactive] [--root-reqs] [--] []...

Can you please look into this and provide me a solution ?

Reference,
https://stackoverflow.com/questions/45582104/facing-issue-installing-pug-php-pug-symfony-on-symfony-2-8-26?sgp=2

Unable to load the "Symfony\Component\Form\FormRenderer" runtime issue

Hello,

I encountered an issue when:

Tried to use csrf validation in symfony with pug-php

Pug-Symfony version: 3.1

PHP version: 7.2.14

I expected to get:

Normal and working login validation

But I actually get:

Unable to load the "Symfony\Component\Form\FormRenderer" runtime.

Steps to reproduce:

  • install newest symfony
  • install newest pug-php
  • some addons like Route
  • make user entity with php bin/console make:user
  • make auth controller with php bin/console make:auth, with Login form authenticator style choosed
  • convert manually login.html.twig to login.pug

This is code from login.pug:

extends ../base.pug

block 
	title Login in!

block body
	form(method="post")
		if error
			if error.messageKey !== undefined
				div.alert.alert-danger #{error.messageKey}
			else
				div.alert.alert-danger #{trans(error.messageData, 'security')}

		if app.user
			div.mb-3 You are logged in as #{ app.user.username },
				a(href=path('app_logout')) Log Out

		h1.h3.mb-3.font-weight-normal Please sign in
		label(for="inputUsername") Username
		input#inputUsername.form-control(type="text", value=last_username, name="username", required, autofocus)
		label(for="inputPassword") Password
		input#inputPassword.form-control(type="password", name="password", required)

		div.alert.alert-danger 

		.checkbox.mb-3
		    label
		        input(type="checkbox", name="_remember_me")
		        |  Remember me


		button.btn.btn-lg.btn-primary(type="submit", value=csrf_token('authenticate')) Sign in

		//- See https://symfony.com/doc/current/security/remember_me.html

The line, that is causing trouble is

button.btn.btn-lg.btn-primary(type="submit", value=csrf_token('authenticate')) Sign in

When I try to use (normally working with twig) function csrf_token('authenticate') there comes given error.

Thanks!

Improve performances (pug engine lazy load)

Breaking change of the version 3.0 will allow to remove some methods from the public API and to load the pug engine only on need so rendering a cached file would be way faster.

style attribute url value error

.slide(style="background-image: url(" + image + ");")
rendered like
<div class="slide" style="background-image:$view[route]->url(image.jpg);"></div>
I tried css_url, but error:
undefined variable: css_url

P.S. pug-symfony: 2.2.1

Drop Symfony < 5

Dropping Symfony < 5 for Pug-symfony 3.0.0 will allow us to remove a lot of code, improve performances and jump to PHP level 7.2.

Js-phpize conditional class declaration is forbidden inside template cache class

Environment: PHP 7.4 / Symfony 5 / pug-symfony 3.0.1 (but I believe the issue is quite universal)

I have encountered an error while trying to use dot operator in js-style expression mode. The error was: Compile Error: Class declarations may not be nested. Apparently it is Symfony specific and comes from the fact that a piece of code from js-phpize (where it is executed globally) ends up in another class' context because Twig caches templates as classes. And since class declaration nesting is a forbidden behaviour in PHP, it fails at compilation time.

More specifically, it occurs in this cache template: PugTemplateTemplate, inside doDisplay method.

And this is the class declaration mentioned above: Dot.h (of course just an example, it is present in the entire family of dot-related helpers).

This is the relevant part from my stack trace:

Symfony\Component\ErrorHandler\Error\FatalError:
Compile Error: Class declarations may not be nested
at path\var\cache\dev\twig\a0\a02227c14d62658903dcfe0bfefc5866bf418ffd0fbf867fce437411ea660efb.php:232
  at Twig\Cache\FilesystemCache->load()
     (path\vendor\twig\twig\src\Environment.php:350)
  at Pug\Twig\Environment->loadTemplate()
     (path\vendor\pug-php\pug-symfony\src\Pug\Twig\Environment.php:181)
  at Pug\Twig\Environment->loadTemplate()
     (path\vendor\twig\twig\src\Template.php:324)
  at __TwigTemplate_92cd03e475ea182c4e0fa520682577fcc1b561bcdf27ee46878d7e020e0b8ac2->loadTemplate()
     (path\var\cache\dev\twig\02\02fac23e7c032670a706e291cc42e3bbe51e0b5bcd2edd6a5201059c3f843e83.php:109)

Styles with asset()

I tried

.parallax-quote.parallaxBg(style={'background-position': "50% -402px", 'background-image': 'url("' + asset('assets/img/patterns/5.png') + ')"'})

but

{'background-position': "50% -402px", 'background-image': 'url("'
Missing closing: }

and also tried

.parallax-quote.parallaxBg(style='background-position: "50% -402px", background-image: url("' + asset('assets/img/patterns/5.png') + ')"')

but

Parse error: syntax error, unexpected 'router' (T_STRING)

Incomplete installation on Symfony 4

Hello,

When installed on a Symfony 4 project, the installation script (v 2.4) will end with the following warnings:

Would you like us to add automatically needed settings in your config.yml? [Y/N] y
Would you like us to add automatically the pug bundle in your AppKernel.php? [Y/N] y
framework entry not found in config.yml.
Sorry, AppKernel.php has a format we can't handle automatically.

What should I do to to make the changes that could not be done automatically ?
I tried to add the following line to /config/bundles.php:

Pug\PugSymfonyBundle\PugSymfonyBundle::class => ['all' => true]

but this won't work: the bundle does not seem to be registered, since the "assets:publish" doesn't show in the list of available CLI commands.

Error Pug\Symfony\CssExtension

Hello,

I encountered an issue when:

php bin/console c:c

Result :
In ExtensionSet.php line 120:
Unable to register extension "Pug\Symfony\CssExtension" as extensions have already been initialized.

Thanks!

Unable to generate route

I installed pug-symfony in Symfony 4 with no issues but routes are not working for me:

The following route works in twig:

<a href="{{ path('some_route') }}">Home</a>

In pug:

a(href=path('some_route')) Home

It throws this error: Function name must be a string

extends can find files, but include can't

At the top of my home.pug I have:

extends _layout
include mixins/_global-mixins
include mixins/_project-mixins
include mixins/_project-vars

It can find _layout.pug, but it can't find mixins/_gobal-mixins.pug. After some debugging on my part it seems like include is using twig functions, but extends isn't. Maybe that's why? Because Twig doesn't know how to find a pug-file without the extension after it?

Pug with Symfony is not working at all

After following instructions with following steps:

  1. Installing Symfony
  2. Installing pug-symfony
  3. Installing annotations
  4. Copying template and controller content to my project

Still, even with .pug extension, Symfony is translating template using Twig, not Pug.

image

I seem to have tried every possible way, but with no effect.

What am I doing wrong? isn't it a bug?

Mixins with arguments seem to break on Twig functions' interpolation

Environment

  • PHP 7.4.4
  • Symfony 5
  • Pug-symfony 3.0.0
  • All optional node dependencies installed via Composer
  • Configured expression language is javascript, but it also applies to php-style expressions

Description

When I write a mixin and make it take some arguments, I see the following error: "Notice: Undefined offset: 1". It derives from line 199 of trait HelpersHandler, inside a method interpolateTwigFunctions.

There are some cases when it does not occur, for example:

mixin withoutParentheses
    p foo

mixin withParentheses()
    p bar

However, it occurs if an argument is defined โ€“ even if the mixin was not actually called or the argument was not used inside the mixin body. For example, this snippet from the documentation does not work:

mixin pet(name)
  li.pet= name
ul
  +pet('cat')
  +pet('dog')
  +pet('pig')

Using form functions

Hello & sorry, if an issue is the wrong format, but I just can't get this working.

Switched to pug-symfony in a dev project. So far so good. Using the following in my Controller, coming from plain old Twig.

/**
 * @Route("/", name="homepage", methods={"GET", "POST"})
 */
public function index(Request $request)
{
    $example = new Example();
    $form = $this->createForm(ExampleType::class, $example);

    $form->handleRequest($request);
    if ($form->isSubmitted() && $form->isValid()) {
        // ...
        return $this->redirectToRoute('example_goal', [
        ]);
    }

    return $this->render('foo/index.pug', [
        'form' => $form->createView(),
    ]);
}

How can I display the form in Pug? Tried all of the following

h1 hi
.content
=form_start(form)

h1 hi
.content
= form_start(form)

h1 hi
.content
    =form_start(form)

h1 hi
.content
    = form_start(form)

h1 hi
.content
    =form_start(=form)

How do I get form_start(), form_widget() and form_end() to work in pug-symfony?

Symfony 4.4 support

Is it possible to add symfony 4.4 support again (as it was for the 2.8 release)?

In CheckExceptionOnInvalidReferenceBehaviorPass.php line 86 Symfony 4.2.8

After a clean installation of Symfony, I've installed the pug-symfony extension by running the command

$ composer require pug-php/pug-symfony

at the end of the installation I'm getting the following error

Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 1
!!  
!!  In CheckExceptionOnInvalidReferenceBehaviorPass.php line 86:
!!                                                                                 
!!    The service "templating" has a dependency on a non-existent service "templa  
!!    ting.engine.twig".                                                           
!!                                                                                 
!!  
!!  

Undefined ofset when using csrf_token

Hi,
I was following guide from symfony's website to create a login form.

Everthing works fine with twig, but when I try to write login template with pug it just gives me undefined offset.

I'm actually newbie to pug and php so I may write it wrong

extends ../../base.pug

block content
   .container.login-container
       .col-8.login-form
           form(method="post")
               .form-group
                   input(type="text", name="user").form-control
                   input(type="password" name="password")
               .form-group
                   input(type="hidden" name="_csrf_token" value=csrf_token('authenticate'))
               .form-group
               button(type="submit")

image

When I remove csrf_token('authenticate') it renders fine but due to not having value in csrf I could not log in. Again I must say, it maybe me write it wrong but I don't know how to fix it either if its me.

Array parameters in hellpers

I want to use path() with second parameter (associative array).

Twig Code (works):

{{ path('web.index', {'_locale': 'en'}) }}

Pug Code (doesn't work, but with path('web.index') works):

a(href=path('web.index', {_locale: 'en'}))

Error:

Parse error: syntax error, unexpected '{'
500 Internal Server Error - FatalThrowableError 

pug-symfony and Symfony 4

Hi guys!
When i run composer require pug-php/pug-symfonyin my symfony 4 project, I get error

Using version ^2.4 for pug-php/pug-symfony
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for __root__ dev-master -> satisfiable by __root__[dev-master].
    - pug-php/pug-symfony 2.4.0 requires symfony/symfony ^2.7 || ^3.0 || ^4.0 -> satisfiable by symfony/symfony[v2.7.0, v2.7.1, v2.7.10, v2.7.11, v2.7.12, v2.7.13, v2.7.14, v2.7.15, v2.7.16, v2.7.17, v2.7.18, v2.7.19, v2.7.2, v2.7.20, v2.7.21, v2.7.22, v2.7.23, v2.7.24, v2.7.25, v2.7.26, v2.7.27, v2.7.28, v2.7.29, v2.7.3, v2.7.30, v2.7.31, v2.7.32, v2.7.33, v2.7.34, v2.7.35, v2.7.36, v2.7.37, v2.7.38, v2.7.39, v2.7.4, v2.7.40, v2.7.5, v2.7.6, v2.7.7, v2.7.8, v2.7.9, v2.8.0, v2.8.1, v2.8.10, v2.8.11, v2.8.12, v2.8.13, v2.8.14, v2.8.15, v2.8.16, v2.8.17, v2.8.18, v2.8.19, v2.8.2, v2.8.20, v2.8.21, v2.8.22, v2.8.23, v2.8.24, v2.8.25, v2.8.26, v2.8.27, v2.8.28, v2.8.29, v2.8.3, v2.8.30, v2.8.31, v2.8.32, v2.8.33, v2.8.4, v2.8.5, v2.8.6, v2.8.7, v2.8.8, v2.8.9, v3.0.0, v3.0.1, v3.0.2, v3.0.3, v3.0.4, v3.0.5, v3.0.6, v3.0.7, v3.0.8, v3.0.9, v3.1.0, v3.1.1, v3.1.10, v3.1.2, v3.1.3, v3.1.4, v3.1.5, v3.1.6, v3.1.7, v3.1.8, v3.1.9, v3.2.0, v3.2.1, v3.2.10, v3.2.11, v3.2.12, v3.2.13, v3.2.14, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6, v3.2.7, v3.2.8, v3.2.9, v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.2, v3.4.3, v4.0.0, v4.0.1, v4.0.2, v4.0.3].
    - symfony/symfony v2.7.0 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.1 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.10 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.11 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.12 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.13 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.14 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.15 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.16 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.17 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.18 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.19 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.2 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.20 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.21 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.22 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.23 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.24 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.25 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.26 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.27 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.28 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.29 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.3 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.30 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.31 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.32 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.33 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.34 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.35 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.36 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.37 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.38 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.39 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.4 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.40 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.5 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.6 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.7 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.8 conflicts with __root__[dev-master].
    - symfony/symfony v2.7.9 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.0 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.1 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.10 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.11 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.12 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.13 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.14 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.15 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.16 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.17 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.18 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.19 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.2 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.20 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.21 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.22 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.23 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.24 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.25 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.26 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.27 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.28 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.29 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.3 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.30 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.31 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.32 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.33 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.4 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.5 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.6 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.7 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.8 conflicts with __root__[dev-master].
    - symfony/symfony v2.8.9 conflicts with __root__[dev-master].
    - symfony/symfony v3.0.0 conflicts with __root__[dev-master].
    - symfony/symfony v3.0.1 conflicts with __root__[dev-master].
    - symfony/symfony v3.0.2 conflicts with __root__[dev-master].
    - symfony/symfony v3.0.3 conflicts with __root__[dev-master].
    - symfony/symfony v3.0.4 conflicts with __root__[dev-master].
    - symfony/symfony v3.0.5 conflicts with __root__[dev-master].
    - symfony/symfony v3.0.6 conflicts with __root__[dev-master].
    - symfony/symfony v3.0.7 conflicts with __root__[dev-master].
    - symfony/symfony v3.0.8 conflicts with __root__[dev-master].
    - symfony/symfony v3.0.9 conflicts with __root__[dev-master].
    - symfony/symfony v3.1.0 conflicts with __root__[dev-master].
    - symfony/symfony v3.1.1 conflicts with __root__[dev-master].
    - symfony/symfony v3.1.10 conflicts with __root__[dev-master].
    - symfony/symfony v3.1.2 conflicts with __root__[dev-master].
    - symfony/symfony v3.1.3 conflicts with __root__[dev-master].
    - symfony/symfony v3.1.4 conflicts with __root__[dev-master].
    - symfony/symfony v3.1.5 conflicts with __root__[dev-master].
    - symfony/symfony v3.1.6 conflicts with __root__[dev-master].
    - symfony/symfony v3.1.7 conflicts with __root__[dev-master].
    - symfony/symfony v3.1.8 conflicts with __root__[dev-master].
    - symfony/symfony v3.1.9 conflicts with __root__[dev-master].
    - symfony/symfony v3.2.0 conflicts with __root__[dev-master].
    - symfony/symfony v3.2.1 conflicts with __root__[dev-master].
    - symfony/symfony v3.2.10 conflicts with __root__[dev-master].
    - symfony/symfony v3.2.11 conflicts with __root__[dev-master].
    - symfony/symfony v3.2.12 conflicts with __root__[dev-master].
    - symfony/symfony v3.2.13 conflicts with __root__[dev-master].
    - symfony/symfony v3.2.14 conflicts with __root__[dev-master].
    - symfony/symfony v3.2.2 conflicts with __root__[dev-master].
    - symfony/symfony v3.2.3 conflicts with __root__[dev-master].                                                                                                                                                                          00:04
    - symfony/symfony v3.2.4 conflicts with __root__[dev-master].
    - symfony/symfony v3.2.5 conflicts with __root__[dev-master].
    - symfony/symfony v3.2.6 conflicts with __root__[dev-master].
    - symfony/symfony v3.2.7 conflicts with __root__[dev-master].
    - symfony/symfony v3.2.8 conflicts with __root__[dev-master].
    - symfony/symfony v3.2.9 conflicts with __root__[dev-master].
    - symfony/symfony v3.3.0 conflicts with __root__[dev-master].
    - symfony/symfony v3.3.1 conflicts with __root__[dev-master].
    - symfony/symfony v3.3.10 conflicts with __root__[dev-master].
    - symfony/symfony v3.3.11 conflicts with __root__[dev-master].
    - symfony/symfony v3.3.12 conflicts with __root__[dev-master].
    - symfony/symfony v3.3.13 conflicts with __root__[dev-master].
    - symfony/symfony v3.3.14 conflicts with __root__[dev-master].
    - symfony/symfony v3.3.15 conflicts with __root__[dev-master].
    - symfony/symfony v3.3.2 conflicts with __root__[dev-master].
    - symfony/symfony v3.3.3 conflicts with __root__[dev-master].
    - symfony/symfony v3.3.4 conflicts with __root__[dev-master].
    - symfony/symfony v3.3.5 conflicts with __root__[dev-master].
    - symfony/symfony v3.3.6 conflicts with __root__[dev-master].
    - symfony/symfony v3.3.7 conflicts with __root__[dev-master].
    - symfony/symfony v3.3.8 conflicts with __root__[dev-master].
    - symfony/symfony v3.3.9 conflicts with __root__[dev-master].
    - symfony/symfony v3.4.0 conflicts with __root__[dev-master].
    - symfony/symfony v3.4.1 conflicts with __root__[dev-master].
    - symfony/symfony v3.4.2 conflicts with __root__[dev-master].
    - symfony/symfony v3.4.3 conflicts with __root__[dev-master].
    - symfony/symfony v4.0.0 conflicts with __root__[dev-master].
    - symfony/symfony v4.0.1 conflicts with __root__[dev-master].
    - symfony/symfony v4.0.2 conflicts with __root__[dev-master].
    - symfony/symfony v4.0.3 conflicts with __root__[dev-master].
    - Installation request for pug-php/pug-symfony ^2.4 -> satisfiable by pug-php/pug-symfony[2.4.0].

Installation failed, reverting ./composer.json to its original content.

I create my application use composer create-project symfony/skeleton my-project from symfony docs

My composer.json

{
    "type": "project",
    "require": {
        "php": "^7.1.3",
        "ext-iconv": "*",
        "sensio/framework-extra-bundle": "^5.1",
        "symfony/console": "^4.0",
        "symfony/dependency-injection": "^4.0",
        "symfony/flex": "^1.0",
        "symfony/form": "^4.0",
        "symfony/framework-bundle": "^4.0",
        "symfony/lts": "^4@dev",
        "symfony/orm-pack": "^1.0",
        "symfony/translation": "^4.0",
        "symfony/twig-bundle": "^4.0",
        "symfony/validator": "^4.0",
        "symfony/yaml": "^4.0"
    },
    "require-dev": {
        "symfony/debug": "^4.0",
        "symfony/dotenv": "^4.0",
        "symfony/profiler-pack": "^1.0",
        "symfony/maker-bundle": "^1.0",
        "symfony/web-profiler-bundle": "^4.0"
    },
    "config": {
        "preferred-install": {
            "*": "dist"
        },
        "sort-packages": true
    },
    "autoload": {
        "psr-4": {
            "App\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "App\\Tests\\": "tests/"
        }
    },
    "replace": {
        "symfony/polyfill-iconv": "*",
        "symfony/polyfill-php71": "*",
        "symfony/polyfill-php70": "*",
        "symfony/polyfill-php56": "*"
    },
    "scripts": {
        "auto-scripts": {
            "cache:clear": "symfony-cmd",
            "assets:install --symlink --relative %PUBLIC_DIR%": "symfony-cmd"
        },
        "post-install-cmd": [
            "@auto-scripts"
        ],
        "post-update-cmd": [
            "@auto-scripts"
        ]
    },
    "conflict": {
        "symfony/symfony": "*"
    },
    "extra": {
        "symfony": {
            "id": "01C330YXSR663BC31PR409BGSM",
            "allow-contrib": false
        }
    }
}

Add entity private properties access

Hello! Thank you for you good bundle, but i have small problem.
In twig templates I can get access to doctrine entites without using entity methods, like article.title (not article.getTitle()). It is a very useful feature, because I can use the same pug templates in two environments -- with gulp and with symfony.
http://twig.sensiolabs.org/doc/templates.html#variables
Will you add this feature in pug-symfony in future?

Allow Symfony 5

Pug-symfony should allow Symfony 5 and documentation should be improved for an easy start with this last version.

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.