From 2e7a9995db874575f132664598c80049f6afce66 Mon Sep 17 00:00:00 2001 From: Christoph Kappestein Date: Tue, 20 Aug 2024 23:00:06 +0200 Subject: [PATCH] remove bin api --- bin/api | 54 --------------------------------------------------- composer.json | 1 - 2 files changed, 55 deletions(-) delete mode 100644 bin/api diff --git a/bin/api b/bin/api deleted file mode 100644 index c1f0c4a..0000000 --- a/bin/api +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env php - - * - * Copyright (c) Christoph Kappestein - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -$files = array( - __DIR__ . '/../vendor/autoload.php', - __DIR__ . '/../../../autoload.php', -); - -$autoloadFile = null; - -foreach ($files as $file) { - if (file_exists($file)) { - $autoloadFile = $file; - break; - } -} - -if (!empty($autoloadFile)) { - $loader = require_once($autoloadFile); - - $schemaManager = new \PSX\Schema\SchemaManager(); - $apiManager = new \PSX\Api\ApiManager($schemaManager); - - $scanner = new \PSX\Api\Scanner\Memory(); - $factory = \PSX\Api\GeneratorFactory::fromLocal('http://localhost/'); - $filterFactory = new \PSX\Api\Scanner\FilterFactory(); - - $application = new Symfony\Component\Console\Application('PSX API'); - $application->add(new \PSX\Schema\Console\ParseCommand($schemaManager)); - $application->add(new \PSX\Api\Console\GenerateCommand($scanner, $factory)); - $application->add(new \PSX\Api\Console\ParseCommand($apiManager, $factory)); - $application->add(new \PSX\Api\Console\PushCommand($scanner, $factory, $filterFactory)); - $application->run(); -} else { - die('You need to set up the project dependencies through composer'); -} diff --git a/composer.json b/composer.json index 77e3153..4bb41df 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,6 @@ "phpunit/phpunit": "^9.0", "vimeo/psalm": "^5.0" }, - "bin": ["bin/api"], "autoload": { "psr-4": { "PSX\\Api\\": "src/"