Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Database schema management, for CodeIgniter 4

## Quick Start

1. Install with Composer: `> composer require tatter/schemas`
1. Install with Composer: `> composer require mkuettel/codeigniter4-schemas`
2. Generate a new schema: `> php spark schemas`

## Features
Expand Down
9 changes: 7 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "tatter/schemas",
"name": "mkuettel/codeigniter4-schemas",
"description": "Database schema management, for CodeIgniter 4",
"license": "MIT",
"type": "library",
Expand All @@ -17,9 +17,14 @@
"email": "mgatner@tattersoftware.com",
"homepage": "https://tattersoftware.com",
"role": "Developer"
},
{
"name": "Moritz Küttel",
"email": "moritz_kuettel+composer_ci4schemas@tattersoftware.com",
"role": "Developer"
}
],
"homepage": "https://github.com/tattersoftware/codeigniter4-schemas",
"homepage": "https://github.com/mkuettel/codeigniter4-schemas",
"require": {
"php": "^7.4 || ^8.0"
},
Expand Down
1 change: 0 additions & 1 deletion src/Config/Schemas.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class Schemas extends BaseConfig

// Namespaces to ignore (mostly for ModelHandler)
public $ignoredNamespaces = [
'Tests\Support',
'CodeIgniter\Commands\Generators',
];

Expand Down
4 changes: 4 additions & 0 deletions src/Drafter/Handlers/ModelHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ protected function getModels(): array
continue;
}

if (!(new \ReflectionClass($class))->isInstantiable()) {
continue;
}

// Try to instantiate
try {
$instance = new $class();
Expand Down