Skip to content

Commit

Permalink
Merge branch 'refs/heads/v0.x' into logger-stack-trace-optional
Browse files Browse the repository at this point in the history
  • Loading branch information
onairmarc committed Jul 26, 2024
2 parents ac7dfe4 + 9058194 commit 23b9e37
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 42 deletions.
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ f63680a770f865a55fc8b204d9fb3854341f881f
d1feb1300ad4b8237b2e41a8439a5bfa3915cf8f
eb2793b4c08a4aae2ff7cefc61c336778a33d6a8
5809f46c02bbe25c9799a6a4cd93c6f6ee395ece
0c213c750e950f6e9ee4e8f2632ec41ac29a70e0
27 changes: 0 additions & 27 deletions .github/workflows/directorySync.yml

This file was deleted.

8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
"encoredigitalgroup/stdlib": "^1.3",
"encoredigitalgroup/tachyon": "^2.0",
"guzzlehttp/guzzle": "6.x|7.x",
"illuminate/console": "^11",
"illuminate/filesystem": "^11",
"illuminate/http": "^11",
"illuminate/support": "^11",
"illuminate/console": "^10|^11",
"illuminate/filesystem": "^10|^11",
"illuminate/http": "^10|^11",
"illuminate/support": "^10|^11",
"laravel/prompts": "^0.1",
"monolog/monolog": "^3.6",
"rector/rector": "^1.0",
Expand Down
6 changes: 3 additions & 3 deletions src/CLI/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"require": {
"php": "^8.3",
"phpgenesis/common": "self.version",
"illuminate/console": "^11",
"illuminate/filesystem": "^11",
"illuminate/support": "^11",
"illuminate/console": "^10|^11",
"illuminate/filesystem": "^10|^11",
"illuminate/support": "^10|^11",
"laravel/prompts": "^0.1",
"rector/rector": "^1.0",
"symfony/console": "^6.2|^7.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Common/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"composer-runtime-api": "^2.0",
"composer/composer": "^2.0",
"encoredigitalgroup/stdlib": "^1.3",
"illuminate/support": "^11"
"illuminate/support": "^10|^11"
},
"scripts": {
"post-autoload-dump": [
Expand Down
20 changes: 14 additions & 6 deletions src/Common/src/Container/PhpGenesisContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,26 @@
/** @experimental */
class PhpGenesisContainer extends IlluminateContainer
{
public function __construct()
public static function getInstance(): IlluminateContainer|PhpGenesisContainer
{
if (!$this->isLaravel()) {
// Create a new instance of the Illuminate container
$container = new IlluminateContainer();
static::setInstance($container);
if (static::isLaravelApplication()) {
return parent::getInstance();
}

if (is_null(static::$instance)) {
static::$instance = new static(); //@phpstan-ignore-line
}

return static::$instance;
}

public function isLaravel(): bool
protected static function isLaravelApplication(): bool
{
return class_exists(Application::class);
}

public function isLaravel(): bool
{
return static::isLaravelApplication();
}
}
22 changes: 22 additions & 0 deletions src/Common/src/Repositories/IsRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

namespace PHPGenesis\Common\Repositories;

use EncoreDigitalGroup\StdLib\Exceptions\NotImplementedException;

trait IsRepository
{
protected function arrayMapAttribute(string $property, string $attribute, array $attributes): void
Expand All @@ -14,4 +16,24 @@ protected function arrayMapAttribute(string $property, string $attribute, array
$this->$property = $attributes[$attribute];
}
}

protected function map(): static
{
throw new NotImplementedException();
}

protected function mapModel(): static
{
throw new NotImplementedException();
}

protected function arrayMap(array $attributes): void
{
throw new NotImplementedException();
}

protected function fieldArray(): array
{
throw new NotImplementedException();
}
}
2 changes: 1 addition & 1 deletion src/Http/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "proprietary",
"require": {
"php": "^8.3",
"illuminate/http": "^11"
"illuminate/http": "^10|^11"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 23b9e37

Please sign in to comment.