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

[Router] Route priority is not global #54

Closed
jcheron opened this issue Jul 1, 2019 · 0 comments
Closed

[Router] Route priority is not global #54

jcheron opened this issue Jul 1, 2019 · 0 comments
Assignees
Labels
bug Fixed Fixed bug

Comments

@jcheron
Copy link
Contributor

jcheron commented Jul 1, 2019

Steps

Either the following 2 controllers defining the routes bar1, bar2 and bar3:

namespace controllers;
/**
 * Controller AController
 */
class AController extends ControllerBase {
	public function index() {}
	/**
	 * @route("bar3")
	 */
	public function bar3() {
		echo "bar3";
	}
}
namespace controllers;
/**
 * Controller BController
 */
class BController extends ControllerBase {
	public function index() {}
	/**
	 * @route("bar1","priority"=>500)
	 */
	public function bar1() {
		echo "bar1";
	}
	/**
	 * @route("bar2","priority"=>1000)
	 */
	public function bar2() {
		echo "bar2";
	}
}

Expected Result

Taking into account the prority, these routes must be registered in order:

  1. bar2
  2. bar1
  3. bar3

Actual Result

  1. bar3
  2. bar2
  3. bar1

The priority applies only within each controller.

Versions

  • Ubiquity framework 2.1.4
  • php 7.3
@jcheron jcheron self-assigned this Jul 1, 2019
@jcheron jcheron added the bug label Jul 1, 2019
@jcheron jcheron closed this as completed in 5c03cc9 Jul 1, 2019
@jcheron jcheron added the Fixed Fixed bug label Jul 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixed Fixed bug
Projects
None yet
Development

No branches or pull requests

1 participant