Skip to content

Commit

Permalink
Cleanups.
Browse files Browse the repository at this point in the history
  • Loading branch information
tkhamez committed Feb 4, 2024
1 parent 4230484 commit e628778
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions backend/bin/doctrine
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use Neucore\Application;
require __DIR__ . '/../vendor/autoload.php';

/** @noinspection PhpUnhandledExceptionInspection */
/* @var EntityManagerInterface $entityManager */
$entityManager = (new Application())->buildContainer()->get(EntityManagerInterface::class);
$entityManager->getConnection()->setAutoCommit(false); // Fixes "There is no active transaction" error during
// DB migrations with PHP 8.
Expand Down
1 change: 1 addition & 0 deletions backend/config/cli-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
require __DIR__ . '/../vendor/autoload.php';

/** @noinspection PhpUnhandledExceptionInspection */
/* @var EntityManagerInterface $em */
$em = (new Application())->buildContainer()->get(EntityManagerInterface::class);
//$em->getConnection()->setAutoCommit(false);

Expand Down
4 changes: 2 additions & 2 deletions backend/src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ class Application

public function __construct()
{
// set timezone - also used by Doctrine for dates/times in the database
// Set timezone - also used by Doctrine for dates/times in the database.
date_default_timezone_set('UTC');

// allow group to change files
// Allow group to change files created by this application.
umask(0002);
}

Expand Down
4 changes: 1 addition & 3 deletions web/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

// For the built-in PHP dev server, check for requests to be served as static files
if (PHP_SAPI == 'cli-server') {
$url = parse_url($_SERVER['REQUEST_URI']);
$file = __DIR__ . $url['path'];
if (is_file($file)) {
if (is_file(__DIR__ . parse_url($_SERVER['REQUEST_URI'])['path'])) {
return false;
}
}
Expand Down

0 comments on commit e628778

Please sign in to comment.