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

Documentation fixes #2221

Merged
merged 16 commits into from
Sep 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
43873f6
Documentation - Fix Static Pages code sample spacing
najdanovicivan Sep 15, 2019
942b3dd
Documentation - Fix News Section Exception
najdanovicivan Sep 15, 2019
4864122
Documentation - Fix Managing your applications link
najdanovicivan Sep 15, 2019
1de2077
Documentation - Fix URI Routing Controller Filters Link
najdanovicivan Sep 15, 2019
e340506
Documentation - Fix URI Routing Filter link
najdanovicivan Sep 15, 2019
449a4ed
Documentation - Fix URI Routing Resource link
najdanovicivan Sep 15, 2019
92c5555
Documentation - Fix Encription Library - Duplicated Message Length
najdanovicivan Sep 15, 2019
d4ce7e2
Documentation - Fix Time Library - Fit Sampe for TimeDifference human…
najdanovicivan Sep 15, 2019
e86f286
Documentation - Fix Testing Overview - Fixed CIDatabaseTestClass Link
najdanovicivan Sep 15, 2019
33bfeb5
Documentation - Fix Testing Overview - Fixed Dectription of assertHea…
najdanovicivan Sep 15, 2019
4939c25
Documentation - Fix Testing Feature - Fixed Code Sample for assertSee…
najdanovicivan Sep 15, 2019
b6e180f
Documentation - Fix Testing Debugging - Fixed Kint Link
najdanovicivan Sep 15, 2019
01f1924
Documentation - Fix General Errros - Fixed Configuration text
najdanovicivan Sep 15, 2019
9be0852
Documentation - Fix Extending Contributing - Fixed Changelog Link
najdanovicivan Sep 15, 2019
d50fb4f
Documentation - Fix Testing Controller - Fixed Feature Testing tools…
najdanovicivan Sep 15, 2019
44d741d
Documentation - Fix Testing Feature - Fixed CIDatabaseTestCase Link
najdanovicivan Sep 15, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion user_guide_src/source/concepts/structure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ Modifying Directory Locations
If you've relocated any of the main directories, you can change the configuration
settings inside ``app/Config/Paths``.

Please read `Managing your Applications <../general/managing.html>`_
Please read `Managing your Applications <../general/managing_apps.html>`_
2 changes: 1 addition & 1 deletion user_guide_src/source/extending/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Please *don't* disclose it publicly, but e-mail us at [email protected],
or report it via our page on `HackerOne <https://hackerone.com/codeigniter>`_.

If you've found a critical vulnerability, we'd be happy to credit you in our
`ChangeLog <https://codeigniter4.github.io/userguide/changelog.html>`_.
`ChangeLog <../changelogs/index.html>`_.

****************************
Tips for a Good Issue Report
Expand Down
4 changes: 2 additions & 2 deletions user_guide_src/source/general/errors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ Configuration
=============

By default, CodeIgniter will display all errors in the ``development`` and ``testing`` environments, and will not
display any errors in the ``production`` environment. You can change this by locating the environment configuration
portion at the top of the main ``index.php`` file.
display any errors in the ``production`` environment. You can change this by setting the ``CI_ENVIRONMENT`` variable
in the ``.env`` file.

.. important:: Disabling error reporting DOES NOT stop logs from being written if there are errors.

Expand Down
6 changes: 3 additions & 3 deletions user_guide_src/source/incoming/routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ If you need to assign options to a group, like a `namespace <#assigning-namespac

This would handle a resource route to the ``App\API\v1\Users`` controller with the ``/api/users`` URI.

You can also use a specific `filter </incoming/filters.html>`_ for a group of routes. This will always
You can also use a specific `filter <filters.html>`_ for a group of routes. This will always
run the filter before or after the controller. This is especially handy during authentication or api logging::

$routes->group('api', ['filter' => 'api-auth'], function($routes)
Expand Down Expand Up @@ -309,7 +309,7 @@ available from the command line::
Global Options
==============

All of the methods for creating a route (add, get, post, `resource </incoming/resources.html>`_ etc) can take an array of options that
All of the methods for creating a route (add, get, post, `resource <restful.html>`_ etc) can take an array of options that
can modify the generated routes, or further restrict them. The ``$options`` array is always the last parameter::

$routes->add('from', 'to', $options);
Expand All @@ -336,7 +336,7 @@ The value for the filter must match one of the aliases defined within ``app/Conf

$routes->add('users/delete/(:segment)', 'AdminController::index', ['filter' => 'admin-auth:dual,noreturn']);

See `Controller filters </incoming/filters.html>`_ for more information on setting up filters.
See `Controller filters <filters.html>`_ for more information on setting up filters.

Assigning Namespace
-------------------
Expand Down
13 changes: 0 additions & 13 deletions user_guide_src/source/libraries/encryption.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,19 +138,6 @@ of encryption::
// Encrypt some text & make the results text
$encoded = base64_encode($encrypter->encrypt($plaintext));

Message Length
--------------

An encrypted string is usually
longer than the original plain-text string.

This is influenced by the cipher algorithm itself, the initialization vector (IV)
prepended to the
cipher-text and the HMAC authentication message that is also prepended.

Keep this information in mind when selecting your data storage mechanism.
Cookies, for example, can only hold 4K of information.

Encryption Handler Notes
========================

Expand Down
8 changes: 5 additions & 3 deletions user_guide_src/source/libraries/time.rst
Original file line number Diff line number Diff line change
Expand Up @@ -498,10 +498,12 @@ Much like Time's humanize() method, this returns a string that displays the diff
human readable format that is geared towards being easily understood. It can create strings like '3 hours ago',
'in 1 month', etc. The biggest differences are in how very recent dates are handled::

// Assume current time is: March 10, 2017 (America/Chicago)
$time = Time::parse('March 9, 2016 12:00:00', 'America/Chicago');
$current = Time::parse('March 10, 2017', 'America/Chicago')
$test = Time::parse('March 9, 2016 12:00:00', 'America/Chicago');

echo $time->humanize(); // 1 year ago
$diff = $current->difference($test)

echo $diff->humanize(); // 1 year ago

The exact time displayed is determined in the following manner:

Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/testing/controllers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Testing Controllers

Testing your controllers is made convenient with a couple of new helper classes and traits. When testing controllers,
you can execute the code within a controller, without first running through the entire application bootstrap process.
Often times, using the `Feature Testing tools </testing/feature>`_ will be simpler, but this functionality is here in
Often times, using the `Feature Testing tools <feature.html>`_ will be simpler, but this functionality is here in
case you need it.

.. note:: Because the entire framework has not been bootstrapped, there will be times when you cannot test a controller
Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/testing/debugging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Replace var_dump
================

While using XDebug and a good IDE can be indispensable to debug your application, sometimes a quick ``var_dump()`` is
all you need. CodeIgniter makes that even better by bundling in the excellent `Kint <https://raveren.github.io/kint/>`_
all you need. CodeIgniter makes that even better by bundling in the excellent `Kint <https://kint-php.github.io/kint/>`_
debugging tool for PHP. This goes way beyond your usual tool, providing many alternate pieces of data, like formatting
timestamps into recognizable dates, showing you hexcodes as colors, display array data like a table for easy reading,
and much, much more.
Expand Down
8 changes: 4 additions & 4 deletions user_guide_src/source/testing/feature.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The Test Class
==============

Feature testing requires that all of your test classes extend the ``CodeIgniter\Test\FeatureTestCase`` class. Since this
extends `CIDatabaseTestCase </testing/database>`_ you must always ensure that ``parent::setUp()`` and ``parent::tearDown()``
extends `CIDatabaseTestCase <database.html>`_ you must always ensure that ``parent::setUp()`` and ``parent::tearDown()``
are called before you take your actions.
::

Expand Down Expand Up @@ -243,11 +243,11 @@ a tag, as specified by type, class, or id::
// Check that "Hello World" is on the page
$this->assertSee('Hello World');
// Check that "Hello World" is within an h1 tag
$this->assertS('Hello World', 'h1');
$this->assertSee('Hello World', 'h1');
// Check that "Hello World" is within an element with the "notice" class
$this->assertS('Hello World', '.notice');
$this->assertSee('Hello World', '.notice');
// Check that "Hello World" is within an element with id of "title"
$this->assertS('Hellow World', '#title');
$this->assertSee('Hellow World', '#title');


**assertDontSee(string $search = null, string $element = null)**
Expand Down
4 changes: 2 additions & 2 deletions user_guide_src/source/testing/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ have the correct namespace relative to ``App``.

.. note:: Namespaces are not strictly required for test classes, but they are helpful to ensure no class names collide.

When testing database results, you must use the `CIDatabaseTestClass </testing/database>`_ class.
When testing database results, you must use the `CIDatabaseTestClass <database.html>`_ class.

Additional Assertions
---------------------
Expand Down Expand Up @@ -143,7 +143,7 @@ in PHPunit <https://phpunit.readthedocs.io/en/7.4/annotations.html#runinseparate

**assertHeaderNotEmitted($header, $ignoreCase=false)**

Ensure that a header or cookie was actually emitted::
Ensure that a header or cookie was not emitted::

$response->setCookie('foo', 'bar');

Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/tutorial/news_section.rst
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ add some code to the controller and create a new view. Go back to the

if (empty($data['news']))
{
throw new \CodeIgniter\PageNotFoundException('Cannot find the news item: '. $slug);
throw new \CodeIgniter\Exceptions\PageNotFoundException('Cannot find the news item: '. $slug);
}

$data['title'] = $data['news']['title'];
Expand Down
6 changes: 3 additions & 3 deletions user_guide_src/source/tutorial/static_pages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ code.
return view('welcome_message');
}

public function showme($page = 'home')
{
}
public function showme($page = 'home')
{
}
}

You have created a class named ``Pages``, with a ``showme`` method that accepts
Expand Down