Welcome Guest, Not a member yet? Register   Sign In
Documentation could be more newbie-friendly
#1

Hi,

I've used CodeIgniter in the past (version 2.1.3) and have recently started a project in CI 4 (4.11).
I really like it and it allows me code much cleaner.

But the documentation could use a bit more examples for people who are new to CI 4 (and new to PHP 7 and namespaces, if I'm honest).
For example, when I tried to configure the encryption key for the Encryption Library, it took me a while to understand that where it said :


PHP Code:
// $key will be assigned a 32-byte (256-bit) random key
$key Encryption::createKey(); 

it should actually have said :

PHP Code:
// $key will be assigned a 32-byte (256-bit) random key
$key = \CodeIgniter\Encryption\Encryption::createKey(); 

When I did what the documentation said, I got an error saying PHP couldn't find the Encryption class. It only worked when I fully typed out the namespaced class name.
So in the strictest sense, the documentation is wrong, or at least incomplete.

The above is just one example of several situations I've encountered so far, where I needed to do some guessing and trial-and-error to get the (incomplete) examples in the documentations to actually work.

Still, overall the documentation is pretty good.

Thanks,
Fluffy
Reply


Messages In This Thread
Documentation could be more newbie-friendly - by Fluffy - 02-21-2021, 08:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB