02-04-2017, 09:59 AM
Hi,
I been looking at ways to improve some stated issue as for PSR-4 by using composer,
I would to suggest this composer.json file on the root DIR
<pre></pre>
that will handly all classes and helpers using the composer command
with that a vendor folder will be created on the root DIR - then after that all we will need to include on the file will just be
<pre></pre>
cleaning it up from all the require_once list of files
I hope this helps the new updates
Regards
I been looking at ways to improve some stated issue as for PSR-4 by using composer,
I would to suggest this composer.json file on the root DIR
<pre>
Code:
{
"autoload": {
"classmap" : [
"users/classes"
],
"files" : [
"users/helpers/helpers.php"
]
}
}
that will handly all classes and helpers using the composer command
Code:
composer dump-autoload -o
with that a vendor folder will be created on the root DIR - then after that all we will need to include on the
Code:
init.php
<pre>
Code:
// Load Composer's PSR-4 autoloader
require_once __DIR__.'/../vendor/autoload.php';
cleaning it up from all the require_once list of files
I hope this helps the new updates
Regards