Skip to content

Commit cad3378

Browse files
committed
Merge branch 'clean-router-config' of github.com:codeigniter4/CodeIgniter4 into clean-router-config
2 parents e9a8fca + c1d01ba commit cad3378

File tree

5 files changed

+10
-23
lines changed

5 files changed

+10
-23
lines changed

system/Router/RouteCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ public function __construct(FileLocator $locator, Modules $moduleConfig, Routing
273273
*
274274
* @return $this
275275
*/
276-
public function loadRoutes(string $routesFile = APPPATH . 'Routes.php')
276+
public function loadRoutes(string $routesFile = APPPATH . 'Config/Routes.php')
277277
{
278278
if ($this->didDiscover) {
279279
return $this;

user_guide_src/source/changelogs/v4.3.3.rst

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,6 @@ SECURITY
1616
- **Text Helper:** The :php:func:`random_string()` type **alpha**, **alnum**,
1717
**numeric** and **nozero** are now cryptographically secure.
1818

19-
BREAKING
20-
********
21-
22-
Message Changes
23-
***************
24-
25-
Changes
26-
*******
27-
28-
Deprecations
29-
************
30-
3119
Bugs Fixed
3220
**********
3321

user_guide_src/source/incoming/routing.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ First, let's look at Defined Route Routing. If you want to use Auto Routing, see
2222
Setting Routing Rules
2323
*********************
2424

25-
Routing rules are defined in the **app/Routes.php** file. In it you'll see that
25+
Routing rules are defined in the **app/Config/Routes.php** file. In it you'll see that
2626
it creates an instance of the RouteCollection class (``$routes``) that permits you to specify your own routing criteria.
2727
Routes can be specified using placeholders or Regular Expressions.
2828

@@ -408,7 +408,7 @@ The value for the filter can be a string or an array of strings:
408408

409409
See :doc:`Controller Filters <filters>` for more information on setting up filters.
410410

411-
.. Warning:: If you set filters to routes in **app/Routes.php**
411+
.. Warning:: If you set filters to routes in **app/Config/Routes.php**
412412
(not in **app/Config/Filters.php**), it is recommended to disable Auto Routing (Legacy).
413413
When :ref:`auto-routing-legacy` is enabled, it may be possible that a controller can be accessed
414414
via a different URL than the configured route,
@@ -584,7 +584,7 @@ When no defined route is found that matches the URI, the system will attempt to
584584
controllers and methods when Auto Routing is enabled.
585585

586586
You can disable this automatic matching, and restrict routes
587-
to only those defined by you, by setting the ``$autoRoute`` option to false:
587+
to only those defined by you, by setting the ``$autoRoute`` property to false:
588588

589589
.. literalinclude:: routing/050.php
590590

@@ -600,7 +600,7 @@ a valid class/method pair, just like you would show in any route, or a Closure:
600600

601601
.. literalinclude:: routing/051.php
602602

603-
Using the ``set404Override`` method within the routes file, you can use closures. Defining the override in the Routing file is restricted to class/method pairs.
603+
Using the ``$override404`` property within the routing config file, you can use closures. Defining the override in the Routing file is restricted to class/method pairs.
604604

605605
.. note:: The ``set404Override()`` method does not change the Response status code to ``404``.
606606
If you don't set the status code in the controller you set, the default status code ``200``
@@ -677,7 +677,7 @@ See :ref:`Auto Routing in Controllers <controller-auto-routing-improved>` for mo
677677
Configuration Options
678678
=====================
679679

680-
These options are available at the top of **app/Routes.php**.
680+
These options are available at the top of **app/Config/Routes.php**.
681681

682682
Default Controller
683683
------------------
@@ -720,7 +720,7 @@ Auto Routing (Legacy)
720720
Auto Routing (Legacy) is a routing system from CodeIgniter 3.
721721
It can automatically route HTTP requests based on conventions and execute the corresponding controller methods.
722722

723-
It is recommended that all routes are defined in the **app/Routes.php** file,
723+
It is recommended that all routes are defined in the **app/Config/Routes.php** file,
724724
or to use :ref:`auto-routing-improved`,
725725

726726
.. warning:: To prevent misconfiguration and miscoding, we recommend that you do not use
@@ -734,7 +734,7 @@ Enable Auto Routing (Legacy)
734734

735735
Since v4.2.0, the auto-routing is disabled by default.
736736

737-
To use it, you need to change the setting ``setAutoRoute()`` option to true in **app/Routes.php**::
737+
To use it, you need to change the setting ``$autoRoute`` option to true in **app/Config/Routing.php**::
738738

739739
$routes->setAutoRoute(true);
740740

@@ -761,7 +761,7 @@ See :ref:`Auto Routing (Legacy) in Controllers <controller-auto-routing-legacy>`
761761
Configuration Options (Legacy)
762762
==============================
763763

764-
These options are available at the top of **app/Routes.php**.
764+
These options are available at the top of **app/Config/Routes.php**.
765765

766766
Default Controller (Legacy)
767767
---------------------------

user_guide_src/source/installation/upgrade_440.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ Routing
6868
To clean up the routing system, the following changes were made:
6969
- New ``app/Config/Routing.php`` file that holds the settings that used to be in the Routes file.
7070
- The ``app/Config/Routes.php`` file was simplified so that it only contains the routes without settings and verbiage to clutter the file.
71-
- The ``app/Config/Routes.php`` file was moved to ``app/Routes.php`` to make it easier to find. When upgrading, you can change the ``app/Config/Routing.php` file, ``$routeFiles`` property to point to the old location if you prefer.
7271
- The environment-specific routes files are no longer loaded automatically. To load those, you must add them to the ``$routeFiles`` property in ``app/Config/Routing.php``.
7372

7473
Config

user_guide_src/source/tutorial/static_pages.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ We have made the controller. The next thing is to set routing rules.
136136
Routing associates a URI with a controller's method.
137137

138138
Let's do that. Open the routing file located at
139-
**app/Routes.php**.
139+
**app/Config/Routes.php**.
140140

141141
The only line there to start with should be:
142142

0 commit comments

Comments
 (0)