Skip to content

Commit

Permalink
Merge branch '10.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
freost committed Jan 7, 2024
2 parents fdce5d7 + 7a694a4 commit 27e12d2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
### 10.0.6 <small>(2024-01-07)</small>

#### Bugfixes

* Fixed request bug that would occur if `PATH_INFO` was set but empty.

#### Improvements

* The framework now uses `mako\env` instead of `getenv`.

--------------------------------------------------------

### 10.0.5 <small>(2023-12-07)</small>

#### Bugfixes
Expand Down
4 changes: 2 additions & 2 deletions src/mako/application/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

use function basename;
use function date_default_timezone_set;
use function getenv;
use function mako\env;
use function mb_internal_encoding;
use function mb_language;
use function mb_regex_encoding;
Expand Down Expand Up @@ -221,7 +221,7 @@ public function isCommandLine(): bool
*/
public function getEnvironment(): ?string
{
return getenv('MAKO_ENV') ?: null;
return env('MAKO_ENV') ?: null;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/mako/cli/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

use function current;
use function exec;
use function getenv;
use function mako\env;
use function preg_match;

/**
Expand Down Expand Up @@ -51,7 +51,7 @@ protected function getDimensionsForUnixLike(): ?array
{
// Attempt to get dimensions from environment

if (($width = getenv('COLUMNS')) !== false && ($height = getenv('LINES')) !== false) {
if (($width = env('COLUMNS')) !== false && ($height = env('LINES')) !== false) {
return ['width' => (int) $width, 'height' => (int) $height];
}

Expand Down Expand Up @@ -100,7 +100,7 @@ public function getHeight(): int
public function hasAnsiSupport(): bool
{
if ($this->hasAnsiSupport === null) {
$this->hasAnsiSupport = PHP_OS_FAMILY !== 'Windows' || (getenv('ANSICON') !== false || getenv('ConEmuANSI') === 'ON');
$this->hasAnsiSupport = PHP_OS_FAMILY !== 'Windows' || (env('ANSICON') !== false || env('ConEmuANSI') === 'ON');
}

return $this->hasAnsiSupport;
Expand Down
2 changes: 1 addition & 1 deletion src/mako/database/midgard/ORM.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public static function setConnectionManager(ConnectionManager $connectionManager
public function getConnection(): Connection
{
if (empty(static::$connectionManager)) {
static::$connectionManager = Application::instance()->getContainer()->get('database');
static::$connectionManager = Application::instance()->getContainer()->get(ConnectionManager::class);
}

return static::$connectionManager->getConnection($this->connectionName);
Expand Down

0 comments on commit 27e12d2

Please sign in to comment.