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

Routing enhancements #1676

Merged
15 commits merged into from
Jun 9, 2014
Merged

Routing enhancements #1676

15 commits merged into from
Jun 9, 2014

Conversation

cmfcmf
Copy link
Contributor

@cmfcmf cmfcmf commented Apr 22, 2014

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? ---
Fixed tickets ---
Refs tickets #1552
License MIT
Doc PR ---

This PR removes the previously added CmfRoutingBundle (which is not needed anymore) and adds the I18nRoutingBundle for multilingual routing. See the PR's files for further written documentation.
Additionally I wrote a MOST-based ZikulaRoutesModule beeing a new system module managing routing, which is added in #1721.

Instructions:

  • git pull
  • composer update
  • go to the Extensions module
  • install the ZikulaRoutesModule

Todo

@cmfcmf cmfcmf added this to the 1.4.0 milestone Apr 22, 2014
@cmfcmf cmfcmf added the Symfony label Apr 22, 2014
@craigh
Copy link
Member

craigh commented Apr 22, 2014

will this require changes to modules utilizing the previous version of routing - like ExtensionLibrary for example?

@cmfcmf
Copy link
Contributor Author

cmfcmf commented Apr 22, 2014

No, only the 'el' prefix should be removed, as this is added automatically now.
https://github.com/craigh/ExtensionLibrary/blob/master/Zikula/Module/ExtensionLibraryModule/Resources/config/routing.yml#L3

@craigh
Copy link
Member

craigh commented Apr 22, 2014

do the docs require adjustment?

@craigh
Copy link
Member

craigh commented Apr 22, 2014

should the routes module be moved to /system then?

@cmfcmf
Copy link
Contributor Author

cmfcmf commented Apr 22, 2014

should the routes module be moved to /system then?

In the end, yes, but I had it in modules for now to be able to install / uninstall it.

@craigh
Copy link
Member

craigh commented Apr 22, 2014

i say throw caution to the wind and put it in. 😀

@cmfcmf cmfcmf added Feature and removed Feature labels Apr 23, 2014
@cmfcmf
Copy link
Contributor Author

cmfcmf commented Apr 24, 2014

I just wanna mention that I won't be able to answer for the next few days

@rallek
Copy link
Contributor

rallek commented Apr 24, 2014

good luck!

@shefik
Copy link
Contributor

shefik commented Apr 25, 2014

Under a clean install of Zikula, the Routes module needs to be installed before you restore the contents of the "routing.yml" file. Otherwise, you will experience the following error:

FileLoaderLoadException: Cannot import resource "." from "/app/config/routing.yml". (An exception occurred while executing 'SELECT t0.id AS id1, t0.workflowState AS workflowState2, t0.route_path AS route_path3, t0.host AS host4, t0.schemes AS schemes5, t0.methods AS methods6, t0.route_defaults AS route_defaults7, t0.requirements AS requirements8, t0.options AS options9, t0.route_condition AS route_condition10, t0.description AS description11, t0.bundle AS bundle12, t0.userRoute AS userRoute13, t0.sort AS sort14, t0.createdUserId AS createdUserId15, t0.updatedUserId AS updatedUserId16, t0.createdDate AS createdDate17, t0.updatedDate AS updatedDate18 FROM zikula_routes_route t0 WHERE t0.workflowState = ? ORDER BY t0.sort ASC' with params ["approved"]:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'example.zikula_routes_route' doesn't exist)

@shefik
Copy link
Contributor

shefik commented May 8, 2014

@Drak @cmfcmf What is the status of this pull request?

@cmfcmf
Copy link
Contributor Author

cmfcmf commented May 8, 2014

I will work on this in a few days when I have more time.

@craigh
Copy link
Member

craigh commented Jun 4, 2014

this may need to be rebased.

@cmfcmf cmfcmf changed the title [WIP] Routing enhancements Routing enhancements Jun 4, 2014
@cmfcmf
Copy link
Contributor Author

cmfcmf commented Jun 4, 2014

This is ready to be merged. Important: Right after this one is merged, #1721 needs to be merged, as the core won't work otherwise. I decided to split the PRs to make it possible to distinguish between Core changes and the new module.

@ghost
Copy link

ghost commented Jun 4, 2014

Give me a day to review the code. Looks interesting :)

@craigh
Copy link
Member

craigh commented Jun 4, 2014

@cmfcmf
Copy link
Contributor Author

cmfcmf commented Jun 4, 2014

are these fixes no longer required?

Without these, the sorting of the routes will not work properly, however this is not that important and can be fixed later on.

@craigh
Copy link
Member

craigh commented Jun 4, 2014

looks like Travis doesn't like your version of Composer...

@craigh
Copy link
Member

craigh commented Jun 4, 2014

fix for #1704 pending 😄

```
2. `ModUtil::url()` will try to generate a new-styled Symfony url if possible. However, This function is deprecated,
for url generation in PHP and Twig take a look at [the Symfony docs](http://symfony.com/doc/current/book/routing.html#generating-urls).
There is no way to generate new-styled urls in Smarty other than using the deprecated `{modurl}`.
Copy link
Member

Choose a reason for hiding this comment

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

what about writing a new smarty plugin?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could be done, but not as part of this PR - added to the Routing task list at #1552.

@cmfcmf
Copy link
Contributor Author

cmfcmf commented Jun 5, 2014

looks like Travis doesn't like your version of Composer...

It's because the RoutingModule part of this PR is moved into the other PR.

@ghost
Copy link

ghost commented Jun 7, 2014

Can you rebase this, I'm ready to merge it,

@cmfcmf
Copy link
Contributor Author

cmfcmf commented Jun 9, 2014

Rebased now.

ghost pushed a commit that referenced this pull request Jun 9, 2014
@ghost ghost merged commit 5d11ec3 into zikula:1.4 Jun 9, 2014
ghost pushed a commit that referenced this pull request Jun 9, 2014
[TO BE MERGED RIGHT AFTER #1676] Added the ZikulaRoutesmodule
@cmfcmf cmfcmf deleted the routing-2 branch June 11, 2014 12:29
ghost pushed a commit that referenced this pull request Jun 11, 2014
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants