what is the equiv. of loading system libraries for 2025? ty
namespace PHPMaker2023\xxx;
use PHPMaker2023\xxx\{UserProfile, Language, AdvancedSecurity, Timer, HttpErrorHandler, RouteAttributes};
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Container\ContainerInterface;
use DI\Container as Container;
use DI\ContainerBuilder;
use Selective\SameSiteCookie\SameSiteCookieConfiguration;
use Selective\SameSiteCookie\SameSiteCookieMiddleware;
use Selective\SameSiteCookie\SameSiteSessionMiddleware;
use Slim\Factory\AppFactory;
use Slim\Factory\ServerRequestCreatorFactory;
use Slim\Exception\HttpInternalServerErrorException;
use Middlewares\Whoops;
use Dflydev\DotAccessData\Data;
global $RELATIVE_PATH;
// Autoload
require_once "../../vendor/autoload.php";
// Require files
require_once "../../src/constants.php";
require_once "../../src/config.php";
require_once "../../src/phpfn.php";
$ConfigData = new Data($CONFIG); // Ensure that $ConfigData is accessible by Global Codes
require_once "../../src/userfn.php";
<?php
namespace PHPMaker2025\KOMODO;
use DI\ContainerBuilder;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Container\ContainerInterface;
use Psr\Cache\CacheItemPoolInterface;
use Doctrine\DBAL\ParameterType;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Result;
use Doctrine\DBAL\Query\QueryBuilder;
use Doctrine\DBAL\Cache\QueryCacheProfile;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Validator\Validator\ValidatorInterface;
use Dflydev\FigCookies\FigRequestCookies;
use Dflydev\FigCookies\FigResponseCookies;
use Dflydev\FigCookies\SetCookie;
use Slim\Interfaces\RouteCollectorProxyInterface;
use Slim\App;
use League\Flysystem\DirectoryListing;
use League\Flysystem\FilesystemException;
use Closure;
use DateTime;
use DateTimeImmutable;
use DateInterval;
use Exception;
use InvalidArgumentException;
// Autoload
require_once "../vendor/autoload.php";
// Require files
require_once "../src/constants.php";
require_once "../src/config.php";
require_once "../src/phpfn.php";
require_once "../src/userfn.php";
$conn = Conn();
?>
what I want is DBAL access to custom file
The following error was returned:
Fatal error : Uncaught TypeError: PHPMaker2025\KOMODO\Conn(): Return value must be of type Doctrine\DBAL\Connection, null returned in /var/www/komodocodes.com/public_html/src/phpfn.php:1974 Stack trace: #0 /var/www/komodocodes.com/public_html/shop/shop_inner.php(42): PHPMaker2025\KOMODO\Conn() #1 /var/www/komodocodes.com/public_html/shop/index.php(5): include(‘…’) #2 {main} thrown in /var/www/komodocodes.com/public_html/src/phpfn.php on line 1974
This old approach should be avoided, with that you need to include the required files manually and you may update the code for every new version, it is recommended to use Route_Action server event instead.