The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
4.2 Beta Released - Final Version is coming soon
#20
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>
Code:
{
  "autoload": {
        "classmap" : [
            "users/classes"
        ],
        "files" : [
             "users/helpers/helpers.php"
        ]
    }
}
</pre>


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
file will just be

<pre>
Code:
// Load Composer's PSR-4 autoloader
require_once __DIR__.'/../vendor/autoload.php';
</pre>


cleaning it up from all the require_once list of files

I hope this helps the new updates
Regards

  Reply


Messages In This Thread
4.2 Beta Released - Final Version is coming soon - by gabisajr - 02-04-2017, 09:59 AM

Forum Jump:


Users browsing this thread: 4 Guest(s)