Skip to content

Commit 1518ec8

Browse files
committed
Fix bin/schema when using Composer.
1 parent 0d88e10 commit 1518ec8

File tree

2 files changed

+24
-22
lines changed

2 files changed

+24
-22
lines changed

bin/schema

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
11
#!/usr/bin/env php
22
<?php
33

4-
include('schema.php');
4+
/*
5+
* (c) Kévin Dunglas <[email protected]>
6+
*
7+
* This source file is subject to the MIT license that is bundled
8+
* with this source code in the file LICENSE.
9+
*/
10+
11+
// installed via composer?
12+
if (file_exists(__DIR__ . '/../../../autoload.php')) {
13+
require_once __DIR__ . '/../../../autoload.php';
14+
} else {
15+
require_once __DIR__.'/../vendor/autoload.php';
16+
}
17+
18+
use Symfony\Component\Console\Application;
19+
use SchemaOrgModel\Command\ExtractCardinalitiesCommand;
20+
use SchemaOrgModel\Command\DumpConfigurationCommand;
21+
use SchemaOrgModel\Command\GenerateTypesCommand;
22+
23+
$application = new Application();
24+
$application->add(new ExtractCardinalitiesCommand());
25+
$application->add(new DumpConfigurationCommand());
26+
$application->add(new GenerateTypesCommand());
27+
$application->run();

bin/schema.php

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)