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

[make:crud] Fix templates path use in include #870

Merged
merged 1 commit into from
Aug 19, 2021

Conversation

leblanc-simon
Copy link
Contributor

The maker CRUD allow to set a namespace in the controller name (example : Admin\ArticleController). In this case, maker create namespace and folders for the templates.

s.leblanc@cronos $ symfony console make:crud Article

 Choose a name for your controller class (e.g. ArticleController) [ArticleController]:
 > Admin\ArticleController

 created: src/Controller/Admin/ArticleController.php
 created: src/Form/ArticleType.php
 created: templates/admin/article/_delete_form.html.twig
 created: templates/admin/article/_form.html.twig
 created: templates/admin/article/edit.html.twig
 created: templates/admin/article/index.html.twig
 created: templates/admin/article/new.html.twig
 created: templates/admin/article/show.html.twig

The controller is OK, the render function is call with the good path : admin/article/index.html.twig

But in the template, when we include the form or the delete form, the path is build with route name (admin_article) instead of path (admin/article)

This path fix this issue

@jrushlow jrushlow changed the title [CRUD] Fix templates path use in include [make:crud] Fix templates path use in include May 6, 2021
@jrushlow
Copy link
Collaborator

@leblanc-simon can you rebase PR?

@jrushlow jrushlow added the Status: Waiting Feedback Needs feedback from the author label Jul 30, 2021
@leblanc-simon leblanc-simon force-pushed the fix/crud-include-twig-path branch from 06c1c49 to 0ebb463 Compare July 31, 2021 22:28
@leblanc-simon
Copy link
Contributor Author

@jrushlow it's done.

@jrushlow jrushlow added the Status: Reviewed Has been reviewed by a maintainer label Jul 31, 2021
Copy link
Collaborator

@jrushlow jrushlow left a comment

Choose a reason for hiding this comment

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

Thanks @leblanc-simon for the PR!

@jrushlow jrushlow removed the Status: Waiting Feedback Needs feedback from the author label Jul 31, 2021
@weaverryan
Copy link
Member

Thank you @leblanc-simon!

@weaverryan weaverryan merged commit 9862577 into symfony:main Aug 19, 2021
@jrushlow jrushlow mentioned this pull request Sep 24, 2021
weaverryan added a commit that referenced this pull request Sep 27, 2021
This PR was merged into the 1.0-dev branch.

Discussion
----------

[release] prep 1.34.0

# Release
Hi Makers!

This release contains a few new features, fixes, and improvements under the hood! Most notably, this release introduces PHP Attribute support for `make:entity` including entities using API Platform, support for the new Symfony Password Hasher in `make:reset-password`, & `make:registration`, and implements stronger return types where possible.

Diff: v1.33.0...v1.34.0

Happy making!

# Changelog

## [v1.34.0](https://github.com/symfony/maker-bundle/releases/tag/v1.34.0)

*September 27th, 2021*

### Feature

- [#978](#978) - Adding Entity attribute support - *`@simonmarx`*, *`@geekimo`*, *`@adlpz`*, *`@weaverryan`*, *`@jrushlow`*
- [#970](#970) - make PhpCompatUtil::getPhpVersion() public - *`@nikophil`*
- [#968](#968) - [make:entity] APIP: use new attribute if exists - *`@nikophil`*
- [#963](#963) - add return types for symfony 6 - *`@jrushlow`*
- [#925](#925) - [templates] Add void return types - *`@seb`-jean*
- [#923](#923) - use password hasher for make:registration & make:reset-password, includes other improvements - *`@jrushlow`*

### Bug Fix

- [#974](#974) - Fix method call definition - *`@ajgarlag`*
- [#973](#973) - Fix we we typo - *`@karser`*
- [#933](#933) - [make:entity] Remove deprecated json_array type from available list types. - *`@bdaler`*
- [#930](#930) - Add all missed dependencies to make:reset-password - *`@upyx`*
- [#870](#870) - [make:crud] Fix templates path use in include - *`@leblanc`-simon*

Commits
-------

2ba83b3 [release] prep 1.34.0
@leblanc-simon leblanc-simon deleted the fix/crud-include-twig-path branch October 5, 2021 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Reviewed Has been reviewed by a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants