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

Add a request router #15377

Merged
merged 9 commits into from Jul 12, 2019
Merged

Add a request router #15377

merged 9 commits into from Jul 12, 2019

Conversation

MauricioFauth
Copy link
Member

@MauricioFauth MauricioFauth commented Jul 7, 2019

This pull request introduces a router to help with the request management.

For example, we can use http://localhost/index.php?route=/server/databases instead of use http://localhost/server_databases.php.

The objective is to reduce the number of entry points and to use the index.php as a front controller redirecting all the requests to it.

The idea of using the route parameter is to help with the transition, as it does not require URL rewriting, however, once the transition is complete, it will be possible to use URL rewrite to have pretty URLs like: http://localhost/server/databases.

Other objective is to fix the issue that happens when opening some links in a new window, by creating unique routes without the problem of having an SQL query in the URL.

For now, it only maps 1:1 the entry points with the routes.
For example: /server/databases => server_databases.php

Once this is done, the next step will be to improve the routes by refactoring the libraries/entry_points files and adding more routes.

@codecov
Copy link

codecov bot commented Jul 7, 2019

Codecov Report

Merging #15377 into master will decrease coverage by 0.01%.
The diff coverage is 15%.

@@             Coverage Diff              @@
##             master   #15377      +/-   ##
============================================
- Coverage     52.99%   52.98%   -0.02%     
  Complexity    14047    14047              
============================================
  Files           481      481              
  Lines         62011    62027      +16     
============================================
  Hits          32862    32862              
- Misses        29149    29165      +16

@codecov
Copy link

codecov bot commented Jul 7, 2019

Codecov Report

Merging #15377 into master will decrease coverage by 0.01%.
The diff coverage is 22.52%.

@@             Coverage Diff              @@
##             master   #15377      +/-   ##
============================================
- Coverage     52.99%   52.97%   -0.02%     
- Complexity    14047    14051       +4     
============================================
  Files           481      482       +1     
  Lines         62011    62043      +32     
============================================
+ Hits          32862    32867       +5     
- Misses        29149    29176      +27

@MauricioFauth MauricioFauth added this to the 5.1.0 milestone Jul 8, 2019
@MauricioFauth MauricioFauth self-assigned this Jul 8, 2019
@MauricioFauth MauricioFauth marked this pull request as ready for review July 9, 2019 16:23
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Uses the router instead

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
@MauricioFauth MauricioFauth changed the title Add support for a router Add a request router Jul 10, 2019
@MauricioFauth MauricioFauth merged commit 34251fe into phpmyadmin:master Jul 12, 2019
@MauricioFauth MauricioFauth deleted the router branch July 12, 2019 06:19
MauricioFauth added a commit to MauricioFauth/phpmyadmin that referenced this pull request Jul 13, 2019
Add a request router

[ci skip]

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
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.

None yet

2 participants