Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Templating] [Twig] Sf3.0 support : Changing render from tag to function #154

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Resources/views/CRUD/edit_mongo_one.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ file that was distributed with this source code.
{% if sonata_admin.edit == 'list' %}
<span id="field_widget_{{ id }}" class="field-short-description">
{% if sonata_admin.admin.id(sonata_admin.value) %}
{% render url('sonata_admin_short_object_information', {
{{ render(url('sonata_admin_short_object_information', {
'code': sonata_admin.field_description.associationadmin.code,
'objectId': sonata_admin.field_description.associationadmin.id(sonata_admin.value),
'uniqid': sonata_admin.field_description.associationadmin.uniqid
}
)%}
))}}
{% elseif sonata_admin.field_description.options.placeholder is defined and sonata_admin.field_description.options.placeholder %}
<span class="inner-field-short-description">
{{ sonata_admin.field_description.options.placeholder|trans({}, 'SonataAdminBundle') }}
Expand Down
4 changes: 2 additions & 2 deletions Resources/views/Form/form_admin_fields.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ file that was distributed with this source code.
<span id="field_actions_{{ id }}" class="field-actions">
<span id="field_widget_{{ id }}" class="field-short-description">
{% if sonata_admin.field_description.associationadmin.id(sonata_admin.value) %}
{% render url('sonata_admin_short_object_information', {
{{ render(url('sonata_admin_short_object_information', {
'code': sonata_admin.field_description.associationadmin.code,
'objectId': sonata_admin.field_description.associationadmin.id(sonata_admin.value),
'uniqid': sonata_admin.field_description.associationadmin.uniqid
}
)%}
))}}
{% elseif sonata_admin.field_description.options.placeholder is defined and sonata_admin.field_description.options.placeholder %}
<span class="inner-field-short-description">
{{ sonata_admin.field_description.options.placeholder|trans({}, 'SonataAdminBundle') }}
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
],
"require": {
"doctrine/mongodb-odm-bundle": "~3.0",
"doctrine/mongodb-odm": "~1.0",
"sonata-project/admin-bundle": "~2.3"
"sonata-project/admin-bundle": "~2.3.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~2.3 ?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well this will fail with symfony3, I would expect that master branch will support symfony3.
Also this template change should break symfony <2.6

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~2.3 will result in fetching dev-master or 2.4.x-dev which are the same.

Anyway, if not fetching 2.4.x-dev travis tests on 3.0 result in an error because SonataAdmin still uses Symfony\Component\Validator\ValidatorInterface; in 2.3.x instead of Symfony\Component\Validator\Validator\ValidatorInterface;.

So either we target a dev version of SonataAdminBundle or we wait for 2.4.x-dev to release a stable version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO the best option is to wait for a new stable release of SonataAdminBundle.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😓

"symfony/security-acl": "~2.2|~3.0"
},
"require-dev": {
"jmikola/geojson": "~1.0",
Expand Down