From dfd8519eda6a98adfa7f5e29b64654a4d08b8e00 Mon Sep 17 00:00:00 2001 From: huangzhhui Date: Wed, 29 May 2019 20:18:55 +0800 Subject: [PATCH 01/17] Optimzied abstract command --- src/command/src/Command.php | 44 ++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/src/command/src/Command.php b/src/command/src/Command.php index 550ac7547..cd3dfd610 100644 --- a/src/command/src/Command.php +++ b/src/command/src/Command.php @@ -17,6 +17,7 @@ use Hyperf\Utils\Str; use Symfony\Component\Console\Command\Command as SymfonyCommand; use Symfony\Component\Console\Formatter\OutputFormatterStyle; use Symfony\Component\Console\Helper\Table; +use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Question\ChoiceQuestion; @@ -250,6 +251,19 @@ abstract class Command extends SymfonyCommand $this->output->newLine(); } + /** + * Call another console command. + */ + public function call(string $command, array $arguments = []): int + { + $arguments['command'] = $command; + + return $this->getApplication()->find($command)->run( + $this->createInputFromArguments($arguments), + $this->output + ); + } + /** * Set the verbosity level. * @param mixed $level @@ -273,6 +287,34 @@ abstract class Command extends SymfonyCommand return $level; } + /** + * Create an input instance from the given arguments. + */ + protected function createInputFromArguments(array $arguments): ArrayInput + { + return tap(new ArrayInput(array_merge($this->context(), $arguments)), function (InputInterface $input) { + if ($input->hasParameterOption(['--no-interaction'], true)) { + $input->setInteractive(false); + } + }); + } + + /** + * Get all of the context passed to the command. + */ + protected function context(): array + { + return collect($this->input->getOptions())->only([ + 'ansi', + 'no-ansi', + 'no-interaction', + 'quiet', + 'verbose', + ])->filter()->mapWithKeys(function ($value, $key) { + return ["--{$key}" => $value]; + })->all(); + } + /** * Specify the arguments and options on the command. */ @@ -308,5 +350,5 @@ abstract class Command extends SymfonyCommand /** * Handle the current command. */ - abstract protected function handle(); + abstract public function handle(); } From 08e8d6ce537465d84f2eb313e789aaee1073b3d9 Mon Sep 17 00:00:00 2001 From: huangzhhui Date: Wed, 29 May 2019 20:19:04 +0800 Subject: [PATCH 02/17] Update ConfirmableTrait.php --- src/command/src/ConfirmableTrait.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command/src/ConfirmableTrait.php b/src/command/src/ConfirmableTrait.php index dc3b9c39a..9407cd423 100644 --- a/src/command/src/ConfirmableTrait.php +++ b/src/command/src/ConfirmableTrait.php @@ -15,7 +15,7 @@ trait ConfirmableTrait * @param \Closure|bool|null $callback * @return bool */ - public function confirmToProceed($warning = 'Application In Production!', $callback) + public function confirmToProceed($warning = 'Application In Production!', $callback = false) { $shouldConfirm = $callback instanceof Closure ? call_user_func($callback) : $callback; From 6d1556129a716133b9b2f8fd71809cd4b7f7f09a Mon Sep 17 00:00:00 2001 From: huangzhhui Date: Wed, 29 May 2019 20:19:32 +0800 Subject: [PATCH 03/17] Removed useless switch case --- src/database/src/Connectors/ConnectionFactory.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/database/src/Connectors/ConnectionFactory.php b/src/database/src/Connectors/ConnectionFactory.php index 7a4f85d58..abe92d7b8 100755 --- a/src/database/src/Connectors/ConnectionFactory.php +++ b/src/database/src/Connectors/ConnectionFactory.php @@ -76,12 +76,6 @@ class ConnectionFactory switch ($config['driver']) { case 'mysql': return new MySqlConnector(); - case 'pgsql': - return new PostgresConnector(); - case 'sqlite': - return new SQLiteConnector(); - case 'sqlsrv': - return new SqlServerConnector(); } throw new InvalidArgumentException("Unsupported driver [{$config['driver']}]"); @@ -268,12 +262,6 @@ class ConnectionFactory switch ($driver) { case 'mysql': return new MySqlConnection($connection, $database, $prefix, $config); - case 'pgsql': - return new PostgresConnection($connection, $database, $prefix, $config); - case 'sqlite': - return new SQLiteConnection($connection, $database, $prefix, $config); - case 'sqlsrv': - return new SqlServerConnection($connection, $database, $prefix, $config); } throw new InvalidArgumentException("Unsupported driver [{$driver}]"); From 59e3ae9ec0c31823beff08ff2985878bb1e18d8a Mon Sep 17 00:00:00 2001 From: huangzhhui Date: Wed, 29 May 2019 20:20:30 +0800 Subject: [PATCH 04/17] Added a Schema proxy class to instead of Facade --- src/database/src/Migrations/stubs/blank.stub | 2 +- src/database/src/Migrations/stubs/create.stub | 2 +- src/database/src/Migrations/stubs/update.stub | 2 +- src/database/src/Schema/Schema.php | 43 +++++++++++++++++++ 4 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 src/database/src/Schema/Schema.php diff --git a/src/database/src/Migrations/stubs/blank.stub b/src/database/src/Migrations/stubs/blank.stub index 08247829c..43b39d2b3 100755 --- a/src/database/src/Migrations/stubs/blank.stub +++ b/src/database/src/Migrations/stubs/blank.stub @@ -1,6 +1,6 @@ get(ConnectionResolverInterface::class); + $connection = $resolver->connection(); + return $connection->getSchemaBuilder()->{$name}(...$arguments); + } + + public function __call($name, $arguments) + { + return self::__callStatic($name, $arguments); + } + + /** + * Create a connection by ConnectionResolver. + */ + public function connection(string $name = 'default'): ConnectionInterface + { + $container = ApplicationContext::getContainer(); + $resolver = $container->get(ConnectionResolverInterface::class); + return $resolver->connection($name); + } +} From f8940514cf476ee44133e1d724f55c3639eb7978 Mon Sep 17 00:00:00 2001 From: huangzhhui Date: Wed, 29 May 2019 20:21:25 +0800 Subject: [PATCH 05/17] Set default value of $connection as default --- src/database/src/Migrations/Migration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/database/src/Migrations/Migration.php b/src/database/src/Migrations/Migration.php index c90618d34..37d5f01d0 100755 --- a/src/database/src/Migrations/Migration.php +++ b/src/database/src/Migrations/Migration.php @@ -9,7 +9,7 @@ abstract class Migration * * @var string */ - protected $connection; + protected $connection = 'default'; /** * Enables, if supported, wrapping the migration within a transaction. From 8f626f08e701bd29c34c8110834d98f47fcef681 Mon Sep 17 00:00:00 2001 From: huangzhhui Date: Wed, 29 May 2019 20:21:45 +0800 Subject: [PATCH 06/17] Fixed non-exist method --- src/database/src/Commands/Migrations/BaseCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/database/src/Commands/Migrations/BaseCommand.php b/src/database/src/Commands/Migrations/BaseCommand.php index 5f4bdd690..973f3a44d 100755 --- a/src/database/src/Commands/Migrations/BaseCommand.php +++ b/src/database/src/Commands/Migrations/BaseCommand.php @@ -45,7 +45,7 @@ abstract class BaseCommand extends Command */ protected function usingRealPath() { - return $this->input->hasOption('realpath') && $this->option('realpath'); + return $this->input->hasOption('realpath') && $this->input->getOption('realpath'); } /** From 0e72406bb9ff3c17d86aba4ae88ad2f89bfc443c Mon Sep 17 00:00:00 2001 From: huangzhhui Date: Wed, 29 May 2019 20:23:43 +0800 Subject: [PATCH 07/17] Added migrate and migrate:install commands --- .../Commands/Migrations/InstallCommand.php | 70 +-- .../Commands/Migrations/MigrateCommand.php | 105 ++++ src/database/src/Migrations/Migrator.php | 550 ++++++++---------- 3 files changed, 373 insertions(+), 352 deletions(-) create mode 100755 src/database/src/Commands/Migrations/MigrateCommand.php diff --git a/src/database/src/Commands/Migrations/InstallCommand.php b/src/database/src/Commands/Migrations/InstallCommand.php index 52d31f469..7aeed6392 100755 --- a/src/database/src/Commands/Migrations/InstallCommand.php +++ b/src/database/src/Commands/Migrations/InstallCommand.php @@ -1,14 +1,21 @@ specifyParameters(); $this->repository = $repository; } - /** - * Execute the console command. - * - * @return void - */ - public function execute(InputInterface $input, OutputInterface $output) - { - $this->repository->setSource($input->getOption('database')); - - $this->repository->createRepository(); - - $output->writeln('Migration table created successfully.'); - } - /** * Get the console command options. * @@ -86,23 +63,14 @@ class InstallCommand extends Command } /** - * Specify the arguments and options on the command. + * Handle the current command. */ - protected function specifyParameters(): void + public function handle() { - // We will loop through all of the arguments and options for the command and - // set them all on the base command instance. This specifies what can get - // passed into these commands as "parameters" to control the execution. - if (method_exists($this, 'getArguments')) { - foreach ($this->getArguments() ?? [] as $arguments) { - call_user_func_array([$this, 'addArgument'], $arguments); - } - } + $this->repository->setSource($this->input->getOption('database')); - if (method_exists($this, 'getOptions')) { - foreach ($this->getOptions() ?? [] as $options) { - call_user_func_array([$this, 'addOption'], $options); - } - } + $this->repository->createRepository(); + + $this->output->writeln('[INFO] Migration table created successfully.'); } } diff --git a/src/database/src/Commands/Migrations/MigrateCommand.php b/src/database/src/Commands/Migrations/MigrateCommand.php new file mode 100755 index 000000000..12b3d2b37 --- /dev/null +++ b/src/database/src/Commands/Migrations/MigrateCommand.php @@ -0,0 +1,105 @@ +migrator = $migrator; + } + + /** + * Execute the console command. + */ + public function handle() + { + if (! $this->confirmToProceed()) { + return; + } + + $this->prepareDatabase(); + + // Next, we will check to see if a path option has been defined. If it has + // we will use the path relative to the root of this installation folder + // so that migrations may be run for any path within the applications. + $this->migrator->setOutput($this->output) + ->run($this->getMigrationPaths(), [ + 'pretend' => $this->input->getOption('pretend'), + 'step' => $this->input->getOption('step'), + ]); + + // Finally, if the "seed" option has been given, we will re-run the database + // seed task to re-populate the database, which is convenient when adding + // a migration and a seed at the same time, as it is only this command. + if ($this->input->getOption('seed') && ! $this->input->getOption('pretend')) { + $this->call('db:seed', ['--force' => true]); + } + } + + protected function getOptions(): array + { + return [ + ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'], + ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production'], + ['path', null, InputOption::VALUE_OPTIONAL, 'The path to the migrations files to be executed'], + ['realpath', null, InputOption::VALUE_NONE, 'Indicate any provided migration file paths are pre-resolved absolute paths'], + ['pretend', null, InputOption::VALUE_NONE, 'Dump the SQL queries that would be run'], + ['seed', null, InputOption::VALUE_NONE, 'Indicates if the seed task should be re-run'], + ['step', null, InputOption::VALUE_NONE, 'Force the migrations to be run so they can be rolled back individually'], + ]; + } + + /** + * Prepare the migration database for running. + */ + protected function prepareDatabase() + { + $this->migrator->setConnection($this->input->getOption('database') ?? 'default'); + + if (! $this->migrator->repositoryExists()) { + $this->call('migrate:install', array_filter([ + '--database' => $this->input->getOption('database'), + ])); + } + } +} diff --git a/src/database/src/Migrations/Migrator.php b/src/database/src/Migrations/Migrator.php index 13813435d..a06384b1e 100755 --- a/src/database/src/Migrations/Migrator.php +++ b/src/database/src/Migrations/Migrator.php @@ -1,13 +1,25 @@ files = $files; $this->resolver = $resolver; $this->repository = $repository; @@ -73,11 +81,10 @@ class Migrator /** * Run the pending migrations at a given path. * - * @param array|string $paths - * @param array $options - * @return array + * @param array|string $paths + * @throws \Throwable */ - public function run($paths = [], array $options = []) + public function run($paths = [], array $options = []): array { $this->notes = []; @@ -87,7 +94,8 @@ class Migrator $files = $this->getMigrationFiles($paths); $this->requireFiles($migrations = $this->pendingMigrations( - $files, $this->repository->getRan() + $files, + $this->repository->getRan() )); // Once we have all these migrations that are outstanding we are ready to run @@ -98,29 +106,12 @@ class Migrator return $migrations; } - /** - * Get the migration files that have not yet run. - * - * @param array $files - * @param array $ran - * @return array - */ - protected function pendingMigrations($files, $ran) - { - return Collection::make($files) - ->reject(function ($file) use ($ran) { - return in_array($this->getMigrationName($file), $ran); - })->values()->all(); - } - /** * Run an array of migrations. * - * @param array $migrations - * @param array $options - * @return void + * @throws \Throwable */ - public function runPending(array $migrations, array $options = []) + public function runPending(array $migrations, array $options = []): void { // First we will just make sure that there are any migrations to run. If there // aren't, we will just make a note of it to the developer so they're aware @@ -147,52 +138,18 @@ class Migrator $this->runUp($file, $batch, $pretend); if ($step) { - $batch++; + ++$batch; } } } - /** - * Run "up" a migration instance. - * - * @param string $file - * @param int $batch - * @param bool $pretend - * @return void - */ - protected function runUp($file, $batch, $pretend) - { - // First we will resolve a "real" instance of the migration class from this - // migration file name. Once we have the instances we can run the actual - // command such as "up" or "down", or we can just simulate the action. - $migration = $this->resolve( - $name = $this->getMigrationName($file) - ); - - if ($pretend) { - return $this->pretendToRun($migration, 'up'); - } - - $this->note("Migrating: {$name}"); - - $this->runMigration($migration, 'up'); - - // Once we have run a migrations class, we will log that it was run in this - // repository so that we don't try to run it next time we do a migration - // in the application. A migration repository keeps the migrate order. - $this->repository->log($name, $batch); - - $this->note("Migrated: {$name}"); - } - /** * Rollback the last migration operation. * - * @param array|string $paths - * @param array $options - * @return array + * @param array|string $paths + * @throws \Throwable */ - public function rollback($paths = [], array $options = []) + public function rollback($paths = [], array $options = []): array { $this->notes = []; @@ -211,12 +168,202 @@ class Migrator } /** - * Get the migrations for a rollback operation. + * Rolls all of the currently applied migrations back. * - * @param array $options - * @return array + * @param array|string $paths */ - protected function getMigrationsForRollback(array $options) + public function reset($paths = [], bool $pretend = false): array + { + $this->notes = []; + + // Next, we will reverse the migration list so we can run them back in the + // correct order for resetting this database. This will allow us to get + // the database back into its "empty" state ready for the migrations. + $migrations = array_reverse($this->repository->getRan()); + + if (count($migrations) === 0) { + $this->note('Nothing to rollback.'); + + return []; + } + + return $this->resetMigrations($migrations, $paths, $pretend); + } + + /** + * Resolve a migration instance from a file. + */ + public function resolve(string $file): object + { + $class = Str::studly(implode('_', array_slice(explode('_', $file), 4))); + + return new $class(); + } + + /** + * Get all of the migration files in a given path. + * + * @param array|string $paths + */ + public function getMigrationFiles($paths): array + { + return Collection::make($paths)->flatMap(function ($path) { + return Str::endsWith($path, '.php') ? [$path] : $this->files->glob($path . '/*_*.php'); + })->filter()->sortBy(function ($file) { + return $this->getMigrationName($file); + })->values()->keyBy(function ($file) { + return $this->getMigrationName($file); + })->all(); + } + + /** + * Require in all the migration files in a given path. + */ + public function requireFiles(array $files): void + { + foreach ($files as $file) { + $this->files->requireOnce($file); + } + } + + /** + * Get the name of the migration. + */ + public function getMigrationName(string $path): string + { + return str_replace('.php', '', basename($path)); + } + + /** + * Register a custom migration path. + */ + public function path(string $path): void + { + $this->paths = array_unique(array_merge($this->paths, [$path])); + } + + /** + * Get all of the custom migration paths. + */ + public function paths(): array + { + return $this->paths; + } + + /** + * Get the default connection name. + */ + public function getConnection(): string + { + return $this->connection; + } + + /** + * Set the default connection name. + */ + public function setConnection(string $name): void + { + if (! is_null($name)) { + $this->resolver->setDefaultConnection($name); + } + + $this->repository->setSource($name); + + $this->connection = $name; + } + + /** + * Resolve the database connection instance. + * + * @return Connection The return object maybe is a non-extends proxy class, so DONOT define the return type. + */ + public function resolveConnection(string $connection) + { + return $this->resolver->connection($connection ?: $this->connection); + } + + /** + * Get the migration repository instance. + */ + public function getRepository(): MigrationRepositoryInterface + { + return $this->repository; + } + + /** + * Determine if the migration repository exists. + */ + public function repositoryExists(): bool + { + return $this->repository->repositoryExists(); + } + + /** + * Get the file system instance. + */ + public function getFilesystem(): Filesystem + { + return $this->files; + } + + /** + * Set the output implementation that should be used by the console. + * + * @return $this + */ + public function setOutput(OutputInterface $output) + { + $this->output = $output; + + return $this; + } + + /** + * Get the migration files that have not yet run. + */ + protected function pendingMigrations(array $files, array $ran): array + { + return Collection::make($files) + ->reject(function ($file) use ($ran) { + return in_array($this->getMigrationName($file), $ran); + })->values()->all(); + } + + /** + * Run "up" a migration instance. + * + * @throws \Throwable + */ + protected function runUp(string $file, int $batch, bool $pretend): void + { + // First we will resolve a "real" instance of the migration class from this + // migration file name. Once we have the instances we can run the actual + // command such as "up" or "down", or we can just simulate the action. + $migration = $this->resolve( + $name = $this->getMigrationName($file) + ); + + if ($pretend) { + $this->pretendToRun($migration, 'up'); + return; + } + + $this->note("Migrating: {$name}"); + + $this->runMigration($migration, 'up'); + + // Once we have run a migrations class, we will log that it was run in this + // repository so that we don't try to run it next time we do a migration + // in the application. A migration repository keeps the migrate order. + $this->repository->log($name, $batch); + + $this->note("Migrated: {$name}"); + } + + /** + * Get the migrations for a rollback operation. + */ + protected function getMigrationsForRollback(array $options): array { if (($steps = $options['step'] ?? 0) > 0) { return $this->repository->getMigrations($steps); @@ -228,12 +375,10 @@ class Migrator /** * Rollback the given migrations. * - * @param array $migrations - * @param array|string $paths - * @param array $options - * @return array + * @param array|string $paths + * @throws \Throwable */ - protected function rollbackMigrations(array $migrations, $paths, array $options) + protected function rollbackMigrations(array $migrations, $paths, array $options): array { $rolledBack = []; @@ -254,7 +399,8 @@ class Migrator $rolledBack[] = $file; $this->runDown( - $file, $migration, + (string) $file, + $migration, $options['pretend'] ?? false ); } @@ -262,40 +408,10 @@ class Migrator return $rolledBack; } - /** - * Rolls all of the currently applied migrations back. - * - * @param array|string $paths - * @param bool $pretend - * @return array - */ - public function reset($paths = [], $pretend = false) - { - $this->notes = []; - - // Next, we will reverse the migration list so we can run them back in the - // correct order for resetting this database. This will allow us to get - // the database back into its "empty" state ready for the migrations. - $migrations = array_reverse($this->repository->getRan()); - - if (count($migrations) === 0) { - $this->note('Nothing to rollback.'); - - return []; - } - - return $this->resetMigrations($migrations, $paths, $pretend); - } - /** * Reset the given migrations. - * - * @param array $migrations - * @param array $paths - * @param bool $pretend - * @return array */ - protected function resetMigrations(array $migrations, array $paths, $pretend = false) + protected function resetMigrations(array $migrations, array $paths, bool $pretend = false): array { // Since the getRan method that retrieves the migration name just gives us the // migration name, we will format the names into objects with the name as a @@ -305,19 +421,18 @@ class Migrator })->all(); return $this->rollbackMigrations( - $migrations, $paths, compact('pretend') + $migrations, + $paths, + compact('pretend') ); } /** * Run "down" a migration instance. * - * @param string $file - * @param object $migration - * @param bool $pretend - * @return void + * @throws \Throwable */ - protected function runDown($file, $migration, $pretend) + protected function runDown(string $file, object $migration, bool $pretend): void { // First we will get the file name of the migration so we can resolve out an // instance of the migration. Once we get an instance we can either run a @@ -329,7 +444,8 @@ class Migrator $this->note("Rolling back: {$name}"); if ($pretend) { - return $this->pretendToRun($instance, 'down'); + $this->pretendToRun($instance, 'down'); + return; } $this->runMigration($instance, 'down'); @@ -345,11 +461,9 @@ class Migrator /** * Run a migration inside a transaction if the database supports it. * - * @param object $migration - * @param string $method - * @return void + * @throws \Throwable */ - protected function runMigration($migration, $method) + protected function runMigration(object $migration, string $method): void { $connection = $this->resolveConnection( $migration->getConnection() @@ -369,12 +483,8 @@ class Migrator /** * Pretend to run the migrations. - * - * @param object $migration - * @param string $method - * @return void */ - protected function pretendToRun($migration, $method) + protected function pretendToRun(object $migration, string $method): void { foreach ($this->getQueries($migration, $method) as $query) { $name = get_class($migration); @@ -385,12 +495,8 @@ class Migrator /** * Get all of the queries that would be run for a migration. - * - * @param object $migration - * @param string $method - * @return array */ - protected function getQueries($migration, $method) + protected function getQueries(object $migration, string $method): array { // Now that we have the connections we can resolve it and pretend to run the // queries against the database returning the array of raw SQL statements @@ -406,126 +512,12 @@ class Migrator }); } - /** - * Resolve a migration instance from a file. - * - * @param string $file - * @return object - */ - public function resolve($file) - { - $class = Str::studly(implode('_', array_slice(explode('_', $file), 4))); - - return new $class; - } - - /** - * Get all of the migration files in a given path. - * - * @param string|array $paths - * @return array - */ - public function getMigrationFiles($paths) - { - return Collection::make($paths)->flatMap(function ($path) { - return Str::endsWith($path, '.php') ? [$path] : $this->files->glob($path.'/*_*.php'); - })->filter()->sortBy(function ($file) { - return $this->getMigrationName($file); - })->values()->keyBy(function ($file) { - return $this->getMigrationName($file); - })->all(); - } - - /** - * Require in all the migration files in a given path. - * - * @param array $files - * @return void - */ - public function requireFiles(array $files) - { - foreach ($files as $file) { - $this->files->requireOnce($file); - } - } - - /** - * Get the name of the migration. - * - * @param string $path - * @return string - */ - public function getMigrationName($path) - { - return str_replace('.php', '', basename($path)); - } - - /** - * Register a custom migration path. - * - * @param string $path - * @return void - */ - public function path($path) - { - $this->paths = array_unique(array_merge($this->paths, [$path])); - } - - /** - * Get all of the custom migration paths. - * - * @return array - */ - public function paths() - { - return $this->paths; - } - - /** - * Get the default connection name. - * - * @return string - */ - public function getConnection() - { - return $this->connection; - } - - /** - * Set the default connection name. - * - * @param string $name - * @return void - */ - public function setConnection($name) - { - if (! is_null($name)) { - $this->resolver->setDefaultConnection($name); - } - - $this->repository->setSource($name); - - $this->connection = $name; - } - - /** - * Resolve the database connection instance. - * - * @param string $connection - * @return \Hyperf\Database\Connection - */ - public function resolveConnection($connection) - { - return $this->resolver->connection($connection ?: $this->connection); - } - /** * Get the schema grammar out of a migration connection. * - * @param \Hyperf\Database\Connection $connection - * @return \Hyperf\Database\Schema\Grammars\Grammar + * @param Connection $connection The return object maybe is a non-extends proxy class, so DONOT define the return type. */ - protected function getSchemaGrammar($connection) + protected function getSchemaGrammar($connection): Grammar { if (is_null($grammar = $connection->getSchemaGrammar())) { $connection->useDefaultSchemaGrammar(); @@ -536,54 +528,10 @@ class Migrator return $grammar; } - /** - * Get the migration repository instance. - * - * @return \Hyperf\Database\Migrations\MigrationRepositoryInterface - */ - public function getRepository() - { - return $this->repository; - } - - /** - * Determine if the migration repository exists. - * - * @return bool - */ - public function repositoryExists() - { - return $this->repository->repositoryExists(); - } - - /** - * Get the file system instance. - * - * @return \Hyperf\Filesystem\Filesystem - */ - public function getFilesystem() - { - return $this->files; - } - - /** - * Set the output implementation that should be used by the console. - * - * @param \Hyperf\Console\OutputStyle $output - * @return $this - */ - public function setOutput(OutputStyle $output) - { - $this->output = $output; - - return $this; - } - /** * Write a note to the conosle's output. * - * @param string $message - * @return void + * @param string $message */ protected function note($message) { From 1b63d27833acf009595619244a292ce0fc503d5f Mon Sep 17 00:00:00 2001 From: huangzhhui Date: Wed, 29 May 2019 20:23:58 +0800 Subject: [PATCH 08/17] Added migrate:fresh and migrate:refresh commands --- .../src/Commands/Migrations/FreshCommand.php | 159 ++++++++++++++++++ .../Commands/Migrations/RefreshCommand.php | 149 ++++++++++++++++ 2 files changed, 308 insertions(+) create mode 100644 src/database/src/Commands/Migrations/FreshCommand.php create mode 100755 src/database/src/Commands/Migrations/RefreshCommand.php diff --git a/src/database/src/Commands/Migrations/FreshCommand.php b/src/database/src/Commands/Migrations/FreshCommand.php new file mode 100644 index 000000000..6c28b25d3 --- /dev/null +++ b/src/database/src/Commands/Migrations/FreshCommand.php @@ -0,0 +1,159 @@ +container = $container; + } + + /** + * Execute the console command. + */ + public function handle() + { + if (! $this->confirmToProceed()) { + return; + } + + $connection = $this->input->getOption('database') ?? 'default'; + + if ($this->input->getOption('drop-views')) { + $this->dropAllViews($connection); + + $this->info('Dropped all views successfully.'); + } + + $this->dropAllTables($connection); + + $this->info('Dropped all tables successfully.'); + + $this->call('migrate', array_filter([ + '--database' => $connection, + '--path' => $this->input->getOption('path'), + '--realpath' => $this->input->getOption('realpath'), + '--force' => true, + '--step' => $this->input->getOption('step'), + ])); + + if ($this->needsSeeding()) { + $this->runSeeder($connection); + } + } + + /** + * Drop all of the database tables. + */ + protected function dropAllTables(string $connection) + { + $this->container->get(ConnectionResolverInterface::class) + ->connection($connection) + ->getSchemaBuilder() + ->dropAllTables(); + } + + /** + * Drop all of the database views. + */ + protected function dropAllViews(string $connection) + { + $this->container->get(ConnectionResolverInterface::class) + ->connection($connection) + ->getSchemaBuilder() + ->dropAllViews(); + } + + /** + * Determine if the developer has requested database seeding. + */ + protected function needsSeeding(): bool + { + return $this->input->getOption('seed') || $this->input->getOption('seeder'); + } + + /** + * Run the database seeder command. + */ + protected function runSeeder(string $database) + { + $this->call('db:seed', array_filter([ + '--database' => $database, + '--class' => $this->input->getOption('seeder') ?: 'DatabaseSeeder', + '--force' => true, + ])); + } + + /** + * Get the console command options. + */ + protected function getOptions(): array + { + return [ + ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'], + + ['drop-views', null, InputOption::VALUE_NONE, 'Drop all tables and views'], + + ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production'], + + ['path', null, InputOption::VALUE_OPTIONAL, 'The path to the migrations files to be executed'], + + [ + 'realpath', + null, + InputOption::VALUE_NONE, + 'Indicate any provided migration file paths are pre-resolved absolute paths', + ], + + ['seed', null, InputOption::VALUE_NONE, 'Indicates if the seed task should be re-run'], + + ['seeder', null, InputOption::VALUE_OPTIONAL, 'The class name of the root seeder'], + + [ + 'step', + null, + InputOption::VALUE_NONE, + 'Force the migrations to be run so they can be rolled back individually', + ], + ]; + } +} diff --git a/src/database/src/Commands/Migrations/RefreshCommand.php b/src/database/src/Commands/Migrations/RefreshCommand.php new file mode 100755 index 000000000..4586f0308 --- /dev/null +++ b/src/database/src/Commands/Migrations/RefreshCommand.php @@ -0,0 +1,149 @@ +confirmToProceed()) { + return; + } + + // Next we'll gather some of the options so that we can have the right options + // to pass to the commands. This includes options such as which database to + // use and the path to use for the migration. Then we'll run the command. + $connection = $this->input->getOption('database') ?? 'default'; + + $path = $this->input->getOption('path'); + + // If the "step" option is specified it means we only want to rollback a small + // number of migrations before migrating again. For example, the user might + // only rollback and remigrate the latest four migrations instead of all. + $step = $this->input->getOption('step') ?: 0; + + if ($step > 0) { + $this->runRollback($connection, $path, $step); + } else { + $this->runReset($connection, $path); + } + + // The refresh command is essentially just a brief aggregate of a few other of + // the migration commands and just provides a convenient wrapper to execute + // them in succession. We'll also see if we need to re-seed the database. + $this->call('migrate', array_filter([ + '--database' => $connection, + '--path' => $path, + '--realpath' => $this->input->getOption('realpath'), + '--force' => true, + ])); + + if ($this->needsSeeding()) { + $this->runSeeder($connection); + } + } + + /** + * Run the rollback command. + */ + protected function runRollback(string $database, string $path, int $step): void + { + $this->call('migrate:rollback', array_filter([ + '--database' => $database, + '--path' => $path, + '--realpath' => $this->input->getOption('realpath'), + '--step' => $step, + '--force' => true, + ])); + } + + /** + * Run the reset command. + */ + protected function runReset(string $database, string $path): void + { + $this->call('migrate:reset', array_filter([ + '--database' => $database, + '--path' => $path, + '--realpath' => $this->input->getOption('realpath'), + '--force' => true, + ])); + } + + /** + * Determine if the developer has requested database seeding. + */ + protected function needsSeeding(): bool + { + return $this->input->getOption('seed') || $this->input->getOption('seeder'); + } + + /** + * Run the database seeder command. + */ + protected function runSeeder(string $database): void + { + $this->call('db:seed', array_filter([ + '--database' => $database, + '--class' => $this->input->getOption('seeder') ?: 'DatabaseSeeder', + '--force' => true, + ])); + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'], + + ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production'], + + ['path', null, InputOption::VALUE_OPTIONAL, 'The path to the migrations files to be executed'], + + ['realpath', null, InputOption::VALUE_NONE, 'Indicate any provided migration file paths are pre-resolved absolute paths'], + + ['seed', null, InputOption::VALUE_NONE, 'Indicates if the seed task should be re-run'], + + ['seeder', null, InputOption::VALUE_OPTIONAL, 'The class name of the root seeder'], + + ['step', null, InputOption::VALUE_OPTIONAL, 'The number of migrations to be reverted & re-run'], + ]; + } +} From 07df6b0955c3e64398db7b4beac21ffbee3f41c6 Mon Sep 17 00:00:00 2001 From: huangzhhui Date: Wed, 29 May 2019 20:24:14 +0800 Subject: [PATCH 09/17] Added migrate:reset command --- .../src/Commands/Migrations/ResetCommand.php | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100755 src/database/src/Commands/Migrations/ResetCommand.php diff --git a/src/database/src/Commands/Migrations/ResetCommand.php b/src/database/src/Commands/Migrations/ResetCommand.php new file mode 100755 index 000000000..35f058f91 --- /dev/null +++ b/src/database/src/Commands/Migrations/ResetCommand.php @@ -0,0 +1,97 @@ +migrator = $migrator; + } + + /** + * Execute the console command. + */ + public function handle() + { + if (! $this->confirmToProceed()) { + return; + } + + $this->migrator->setConnection($this->input->getOption('database') ?? 'default'); + + // First, we'll make sure that the migration table actually exists before we + // start trying to rollback and re-run all of the migrations. If it's not + // present we'll just bail out with an info message for the developers. + if (! $this->migrator->repositoryExists()) { + return $this->comment('Migration table not found.'); + } + + $this->migrator->setOutput($this->output)->reset( + $this->getMigrationPaths(), + $this->input->getOption('pretend') + ); + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'], + + ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production'], + + ['path', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'The path(s) to the migrations files to be executed'], + + ['realpath', null, InputOption::VALUE_NONE, 'Indicate any provided migration file paths are pre-resolved absolute paths'], + + ['pretend', null, InputOption::VALUE_NONE, 'Dump the SQL queries that would be run'], + ]; + } +} From 2f2997989674221c5da094fffe9cfd0e23cab58c Mon Sep 17 00:00:00 2001 From: huangzhhui Date: Wed, 29 May 2019 20:24:23 +0800 Subject: [PATCH 10/17] Added migrate:rollback command --- .../Commands/Migrations/RollbackCommand.php | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100755 src/database/src/Commands/Migrations/RollbackCommand.php diff --git a/src/database/src/Commands/Migrations/RollbackCommand.php b/src/database/src/Commands/Migrations/RollbackCommand.php new file mode 100755 index 000000000..e1240760e --- /dev/null +++ b/src/database/src/Commands/Migrations/RollbackCommand.php @@ -0,0 +1,95 @@ +migrator = $migrator; + } + + /** + * Execute the console command. + */ + public function handle() + { + if (! $this->confirmToProceed()) { + return; + } + + $this->migrator->setConnection($this->input->getOption('database') ?? 'default'); + + $this->migrator->setOutput($this->output)->rollback( + $this->getMigrationPaths(), + [ + 'pretend' => $this->input->getOption('pretend'), + 'step' => (int) $this->input->getOption('step'), + ] + ); + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'], + + ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production'], + + ['path', null, InputOption::VALUE_OPTIONAL, 'The path to the migrations files to be executed'], + + ['realpath', null, InputOption::VALUE_NONE, 'Indicate any provided migration file paths are pre-resolved absolute paths'], + + ['pretend', null, InputOption::VALUE_NONE, 'Dump the SQL queries that would be run'], + + ['step', null, InputOption::VALUE_OPTIONAL, 'The number of migrations to be reverted'], + ]; + } +} From 64d649e0687f68e18497b7f52b9d8c9289588772 Mon Sep 17 00:00:00 2001 From: huangzhhui Date: Wed, 29 May 2019 20:24:50 +0800 Subject: [PATCH 11/17] Added dependencies and registered commands --- src/db-connection/src/ConfigProvider.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/db-connection/src/ConfigProvider.php b/src/db-connection/src/ConfigProvider.php index 9b53701b5..b066d0ef9 100644 --- a/src/db-connection/src/ConfigProvider.php +++ b/src/db-connection/src/ConfigProvider.php @@ -12,11 +12,18 @@ declare(strict_types=1); namespace Hyperf\DbConnection; +use Hyperf\Database\Commands\Migrations\FreshCommand; +use Hyperf\Database\Commands\Migrations\GenMigrateCommand; +use Hyperf\Database\Commands\Migrations\InstallCommand; +use Hyperf\Database\Commands\Migrations\MigrateCommand; +use Hyperf\Database\Commands\Migrations\RefreshCommand; +use Hyperf\Database\Commands\Migrations\ResetCommand; +use Hyperf\Database\Commands\Migrations\RollbackCommand; use Hyperf\Database\Commands\ModelCommand; use Hyperf\Database\ConnectionResolverInterface; use Hyperf\Database\Connectors\ConnectionFactory; use Hyperf\Database\Connectors\MySqlConnector; -use Hyperf\Database\Commands\Migrations\GenMigrateCommand; +use Hyperf\Database\Migrations\MigrationRepositoryInterface; use Hyperf\DbConnection\Pool\PoolFactory; class ConfigProvider @@ -29,10 +36,17 @@ class ConfigProvider ConnectionFactory::class => ConnectionFactory::class, ConnectionResolverInterface::class => ConnectionResolver::class, 'db.connector.mysql' => MySqlConnector::class, + MigrationRepositoryInterface::class => DatabaseMigrationRepositoryFactory::class, ], 'commands' => [ ModelCommand::class, GenMigrateCommand::class, + InstallCommand::class, + MigrateCommand::class, + FreshCommand::class, + RefreshCommand::class, + ResetCommand::class, + RollbackCommand::class, ], 'scan' => [ 'paths' => [ From ec20ea45fe6e5a2d1229be123858337fb8d5a180 Mon Sep 17 00:00:00 2001 From: huangzhhui Date: Wed, 29 May 2019 20:25:12 +0800 Subject: [PATCH 12/17] Added a factory to create DatabaseMigrationRepository object --- .../DatabaseMigrationRepositoryFactory.php | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/db-connection/src/DatabaseMigrationRepositoryFactory.php diff --git a/src/db-connection/src/DatabaseMigrationRepositoryFactory.php b/src/db-connection/src/DatabaseMigrationRepositoryFactory.php new file mode 100644 index 000000000..02b2e9fa0 --- /dev/null +++ b/src/db-connection/src/DatabaseMigrationRepositoryFactory.php @@ -0,0 +1,24 @@ +get(ConnectionResolverInterface::class); + $config = $container->get(ConfigInterface::class); + $table = $config->get('databases.migrations', 'migrations'); + return make(DatabaseMigrationRepository::class, [ + 'resolver' => $reslover, + 'table' => $table + ]); + } + +} \ No newline at end of file From 819a410138579367b82e652435e8534aa61c9221 Mon Sep 17 00:00:00 2001 From: huangzhhui Date: Wed, 29 May 2019 20:26:39 +0800 Subject: [PATCH 13/17] Added migrate:status command --- .../src/Commands/Migrations/StatusCommand.php | 118 ++++++++++++++++++ src/db-connection/src/ConfigProvider.php | 2 + 2 files changed, 120 insertions(+) create mode 100644 src/database/src/Commands/Migrations/StatusCommand.php diff --git a/src/database/src/Commands/Migrations/StatusCommand.php b/src/database/src/Commands/Migrations/StatusCommand.php new file mode 100644 index 000000000..7e63ff583 --- /dev/null +++ b/src/database/src/Commands/Migrations/StatusCommand.php @@ -0,0 +1,118 @@ +migrator = $migrator; + } + + /** + * Execute the console command. + */ + public function handle() + { + $this->migrator->setConnection($this->input->getOption('database') ?? 'default'); + + if (! $this->migrator->repositoryExists()) { + return $this->error('Migration table not found.'); + } + + $ran = $this->migrator->getRepository()->getRan(); + + $batches = $this->migrator->getRepository()->getMigrationBatches(); + + if (count($migrations = $this->getStatusFor($ran, $batches)) > 0) { + $this->table(['Ran?', 'Migration', 'Batch'], $migrations); + } else { + $this->error('No migrations found'); + } + } + + /** + * Get the status for the given ran migrations. + * + * @param array $ran + * @param array $batches + * @return \Hyperf\Support\Collection + */ + protected function getStatusFor(array $ran, array $batches) + { + return Collection::make($this->getAllMigrationFiles()) + ->map(function ($migration) use ($ran, $batches) { + $migrationName = $this->migrator->getMigrationName($migration); + + return in_array($migrationName, $ran) + ? ['Yes', $migrationName, $batches[$migrationName]] + : ['No', $migrationName]; + }); + } + + /** + * Get an array of all of the migration files. + * + * @return array + */ + protected function getAllMigrationFiles() + { + return $this->migrator->getMigrationFiles($this->getMigrationPaths()); + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'], + + ['path', null, InputOption::VALUE_OPTIONAL, 'The path to the migrations files to use'], + + ['realpath', null, InputOption::VALUE_NONE, 'Indicate any provided migration file paths are pre-resolved absolute paths'], + ]; + } +} diff --git a/src/db-connection/src/ConfigProvider.php b/src/db-connection/src/ConfigProvider.php index b066d0ef9..4c2aef4d6 100644 --- a/src/db-connection/src/ConfigProvider.php +++ b/src/db-connection/src/ConfigProvider.php @@ -19,6 +19,7 @@ use Hyperf\Database\Commands\Migrations\MigrateCommand; use Hyperf\Database\Commands\Migrations\RefreshCommand; use Hyperf\Database\Commands\Migrations\ResetCommand; use Hyperf\Database\Commands\Migrations\RollbackCommand; +use Hyperf\Database\Commands\Migrations\StatusCommand; use Hyperf\Database\Commands\ModelCommand; use Hyperf\Database\ConnectionResolverInterface; use Hyperf\Database\Connectors\ConnectionFactory; @@ -47,6 +48,7 @@ class ConfigProvider RefreshCommand::class, ResetCommand::class, RollbackCommand::class, + StatusCommand::class, ], 'scan' => [ 'paths' => [ From bab358df70258243c5e6ee445c5f10dad585b290 Mon Sep 17 00:00:00 2001 From: huangzhhui Date: Wed, 29 May 2019 20:30:46 +0800 Subject: [PATCH 14/17] Format code style --- .../Commands/Migrations/InstallCommand.php | 24 ++++---- .../src/Commands/Migrations/StatusCommand.php | 6 +- .../src/Commands/Migrations/TableGuesser.php | 10 +++ src/database/src/Connection.php | 6 +- .../src/Connectors/ConnectionFactory.php | 3 - src/database/src/Grammar.php | 2 +- .../DatabaseMigrationRepository.php | 61 ++++++++++--------- src/database/src/Migrations/Migration.php | 24 +++++--- .../MigrationRepositoryInterface.php | 25 +++++--- src/database/src/Migrations/Migrator.php | 8 +-- src/database/src/Model/Builder.php | 4 +- src/database/src/Model/Concerns/HasEvents.php | 1 - src/database/src/Model/Model.php | 8 ++- src/database/src/Query/Builder.php | 4 +- src/database/src/Query/Grammars/Grammar.php | 10 +-- .../src/Query/Grammars/MySqlGrammar.php | 2 +- .../src/Schema/Grammars/MySqlGrammar.php | 4 +- 17 files changed, 118 insertions(+), 84 deletions(-) diff --git a/src/database/src/Commands/Migrations/InstallCommand.php b/src/database/src/Commands/Migrations/InstallCommand.php index 7aeed6392..7831a56e9 100755 --- a/src/database/src/Commands/Migrations/InstallCommand.php +++ b/src/database/src/Commands/Migrations/InstallCommand.php @@ -50,18 +50,6 @@ class InstallCommand extends BaseCommand $this->repository = $repository; } - /** - * Get the console command options. - * - * @return array - */ - protected function getOptions() - { - return [ - ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'], - ]; - } - /** * Handle the current command. */ @@ -73,4 +61,16 @@ class InstallCommand extends BaseCommand $this->output->writeln('[INFO] Migration table created successfully.'); } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'], + ]; + } } diff --git a/src/database/src/Commands/Migrations/StatusCommand.php b/src/database/src/Commands/Migrations/StatusCommand.php index 7e63ff583..655e47452 100644 --- a/src/database/src/Commands/Migrations/StatusCommand.php +++ b/src/database/src/Commands/Migrations/StatusCommand.php @@ -82,12 +82,12 @@ class StatusCommand extends BaseCommand { return Collection::make($this->getAllMigrationFiles()) ->map(function ($migration) use ($ran, $batches) { - $migrationName = $this->migrator->getMigrationName($migration); + $migrationName = $this->migrator->getMigrationName($migration); - return in_array($migrationName, $ran) + return in_array($migrationName, $ran) ? ['Yes', $migrationName, $batches[$migrationName]] : ['No', $migrationName]; - }); + }); } /** diff --git a/src/database/src/Commands/Migrations/TableGuesser.php b/src/database/src/Commands/Migrations/TableGuesser.php index 1c49364de..736749c6b 100644 --- a/src/database/src/Commands/Migrations/TableGuesser.php +++ b/src/database/src/Commands/Migrations/TableGuesser.php @@ -1,5 +1,15 @@ table() - ->orderBy('batch', 'asc') - ->orderBy('migration', 'asc') - ->pluck('migration')->all(); + ->orderBy('batch', 'asc') + ->orderBy('migration', 'asc') + ->pluck('migration')->all(); } /** * Get list of migrations. * - * @param int $steps + * @param int $steps * @return array */ public function getMigrations($steps) @@ -60,8 +70,8 @@ class DatabaseMigrationRepository implements MigrationRepositoryInterface $query = $this->table()->where('batch', '>=', '1'); return $query->orderBy('batch', 'desc') - ->orderBy('migration', 'desc') - ->take($steps)->get()->all(); + ->orderBy('migration', 'desc') + ->take($steps)->get()->all(); } /** @@ -84,17 +94,16 @@ class DatabaseMigrationRepository implements MigrationRepositoryInterface public function getMigrationBatches() { return $this->table() - ->orderBy('batch', 'asc') - ->orderBy('migration', 'asc') - ->pluck('batch', 'migration')->all(); + ->orderBy('batch', 'asc') + ->orderBy('migration', 'asc') + ->pluck('batch', 'migration')->all(); } /** * Log that a migration was run. * - * @param string $file - * @param int $batch - * @return void + * @param string $file + * @param int $batch */ public function log($file, $batch) { @@ -106,8 +115,7 @@ class DatabaseMigrationRepository implements MigrationRepositoryInterface /** * Remove a migration from the log. * - * @param object $migration - * @return void + * @param object $migration */ public function delete($migration) { @@ -136,8 +144,6 @@ class DatabaseMigrationRepository implements MigrationRepositoryInterface /** * Create the migration repository data store. - * - * @return void */ public function createRepository() { @@ -165,16 +171,6 @@ class DatabaseMigrationRepository implements MigrationRepositoryInterface return $schema->hasTable($this->table); } - /** - * Get a query builder for the migration table. - * - * @return \Hyperf\Database\Query\Builder - */ - protected function table() - { - return $this->getConnection()->table($this->table)->useWritePdo(); - } - /** * Get the connection resolver instance. * @@ -198,11 +194,20 @@ class DatabaseMigrationRepository implements MigrationRepositoryInterface /** * Set the information source to gather data. * - * @param string $name - * @return void + * @param string $name */ public function setSource($name) { $this->connection = $name; } + + /** + * Get a query builder for the migration table. + * + * @return \Hyperf\Database\Query\Builder + */ + protected function table() + { + return $this->getConnection()->table($this->table)->useWritePdo(); + } } diff --git a/src/database/src/Migrations/Migration.php b/src/database/src/Migrations/Migration.php index 37d5f01d0..e5871d799 100755 --- a/src/database/src/Migrations/Migration.php +++ b/src/database/src/Migrations/Migration.php @@ -1,16 +1,19 @@ reject(function ($file) use ($ran) { - return in_array($this->getMigrationName($file), $ran); - })->values()->all(); + return in_array($this->getMigrationName($file), $ran); + })->values()->all(); } /** @@ -515,7 +515,7 @@ class Migrator /** * Get the schema grammar out of a migration connection. * - * @param Connection $connection The return object maybe is a non-extends proxy class, so DONOT define the return type. + * @param Connection $connection the return object maybe is a non-extends proxy class, so DONOT define the return type */ protected function getSchemaGrammar($connection): Grammar { diff --git a/src/database/src/Model/Builder.php b/src/database/src/Model/Builder.php index 38c1719d9..ebea36f53 100755 --- a/src/database/src/Model/Builder.php +++ b/src/database/src/Model/Builder.php @@ -29,7 +29,9 @@ use Hyperf\Utils\Traits\ForwardsCalls; */ class Builder { - use BuildsQueries, ForwardsCalls, Concerns\QueriesRelationships; + use BuildsQueries; + use ForwardsCalls; + use Concerns\QueriesRelationships; /** * The base query builder instance. diff --git a/src/database/src/Model/Concerns/HasEvents.php b/src/database/src/Model/Concerns/HasEvents.php index be58efa57..b43767539 100644 --- a/src/database/src/Model/Concerns/HasEvents.php +++ b/src/database/src/Model/Concerns/HasEvents.php @@ -19,7 +19,6 @@ use Hyperf\Database\Model\Events\Creating; use Hyperf\Database\Model\Events\Deleted; use Hyperf\Database\Model\Events\Deleting; use Hyperf\Database\Model\Events\ForceDeleted; -use Hyperf\Database\Model\Events\Nothing; use Hyperf\Database\Model\Events\Restored; use Hyperf\Database\Model\Events\Restoring; use Hyperf\Database\Model\Events\Retrieved; diff --git a/src/database/src/Model/Model.php b/src/database/src/Model/Model.php index 18e944c85..f1c86913e 100644 --- a/src/database/src/Model/Model.php +++ b/src/database/src/Model/Model.php @@ -29,7 +29,13 @@ use Psr\EventDispatcher\StoppableEventInterface; abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializable { - use Concerns\HasAttributes, Concerns\HasEvents, Concerns\HasGlobalScopes, Concerns\HasRelationships, Concerns\HasTimestamps, Concerns\HidesAttributes, Concerns\GuardsAttributes; + use Concerns\HasAttributes; + use Concerns\HasEvents; + use Concerns\HasGlobalScopes; + use Concerns\HasRelationships; + use Concerns\HasTimestamps; + use Concerns\HidesAttributes; + use Concerns\GuardsAttributes; /** * The name of the "created at" column. diff --git a/src/database/src/Query/Builder.php b/src/database/src/Query/Builder.php index c74be4178..48db5cecf 100755 --- a/src/database/src/Query/Builder.php +++ b/src/database/src/Query/Builder.php @@ -2228,7 +2228,7 @@ class Builder $wrapped = $this->grammar->wrap($column); - $columns = array_merge([$column => $this->raw("${wrapped} + ${amount}")], $extra); + $columns = array_merge([$column => $this->raw("{$wrapped} + {$amount}")], $extra); return $this->update($columns); } @@ -2248,7 +2248,7 @@ class Builder $wrapped = $this->grammar->wrap($column); - $columns = array_merge([$column => $this->raw("${wrapped} - ${amount}")], $extra); + $columns = array_merge([$column => $this->raw("{$wrapped} - {$amount}")], $extra); return $this->update($columns); } diff --git a/src/database/src/Query/Grammars/Grammar.php b/src/database/src/Query/Grammars/Grammar.php index f0d15993e..66bfa9cbf 100755 --- a/src/database/src/Query/Grammars/Grammar.php +++ b/src/database/src/Query/Grammars/Grammar.php @@ -141,7 +141,7 @@ class Grammar extends BaseGrammar return '(' . $this->parameterize($record) . ')'; })->implode(', '); - return "insert into ${table} (${columns}) values ${parameters}"; + return "insert into {$table} ({$columns}) values {$parameters}"; } /** @@ -163,7 +163,7 @@ class Grammar extends BaseGrammar */ public function compileInsertUsing(Builder $query, array $columns, string $sql) { - return "insert into {$this->wrapTable($query->from)} ({$this->columnize($columns)}) ${sql}"; + return "insert into {$this->wrapTable($query->from)} ({$this->columnize($columns)}) {$sql}"; } /** @@ -197,7 +197,7 @@ class Grammar extends BaseGrammar // intended records are updated by the SQL statements we generate to run. $wheres = $this->compileWheres($query); - return trim("update {$table}{$joins} set ${columns} ${wheres}"); + return trim("update {$table}{$joins} set {$columns} {$wheres}"); } /** @@ -223,7 +223,7 @@ class Grammar extends BaseGrammar { $wheres = is_array($query->wheres) ? $this->compileWheres($query) : ''; - return trim("delete from {$this->wrapTable($query->from)} ${wheres}"); + return trim("delete from {$this->wrapTable($query->from)} {$wheres}"); } /** @@ -717,7 +717,7 @@ class Grammar extends BaseGrammar { $select = $this->compileSelect($where['query']); - return $this->wrap($where['column']) . ' ' . $where['operator'] . " (${select})"; + return $this->wrap($where['column']) . ' ' . $where['operator'] . " ({$select})"; } /** diff --git a/src/database/src/Query/Grammars/MySqlGrammar.php b/src/database/src/Query/Grammars/MySqlGrammar.php index fa2a966ed..dd3faafda 100755 --- a/src/database/src/Query/Grammars/MySqlGrammar.php +++ b/src/database/src/Query/Grammars/MySqlGrammar.php @@ -104,7 +104,7 @@ class MySqlGrammar extends Grammar // intended records are updated by the SQL statements we generate to run. $where = $this->compileWheres($query); - $sql = rtrim("update {$table}{$joins} set ${columns} ${where}"); + $sql = rtrim("update {$table}{$joins} set {$columns} {$where}"); // If the query has an order by clause we will compile it since MySQL supports // order bys on update statements. We'll compile them using the typical way diff --git a/src/database/src/Schema/Grammars/MySqlGrammar.php b/src/database/src/Schema/Grammars/MySqlGrammar.php index 6f3798393..6f7fa408d 100755 --- a/src/database/src/Schema/Grammars/MySqlGrammar.php +++ b/src/database/src/Schema/Grammars/MySqlGrammar.php @@ -674,7 +674,7 @@ class MySqlGrammar extends Grammar { $columnType = $column->precision ? "datetime({$column->precision})" : 'datetime'; - return $column->useCurrent ? "${columnType} default CURRENT_TIMESTAMP" : $columnType; + return $column->useCurrent ? "{$columnType} default CURRENT_TIMESTAMP" : $columnType; } /** @@ -716,7 +716,7 @@ class MySqlGrammar extends Grammar { $columnType = $column->precision ? "timestamp({$column->precision})" : 'timestamp'; - return $column->useCurrent ? "${columnType} default CURRENT_TIMESTAMP" : $columnType; + return $column->useCurrent ? "{$columnType} default CURRENT_TIMESTAMP" : $columnType; } /** From 144d8cc3197e5b01434cd309da4ed69e844db4d8 Mon Sep 17 00:00:00 2001 From: huangzhhui Date: Wed, 29 May 2019 20:33:59 +0800 Subject: [PATCH 15/17] Format code style --- src/database/src/Commands/Migrations/FreshCommand.php | 7 ------- src/database/src/Commands/Migrations/RefreshCommand.php | 6 ------ src/database/src/Commands/Migrations/ResetCommand.php | 4 ---- src/database/src/Commands/Migrations/RollbackCommand.php | 5 ----- src/database/src/Commands/Migrations/StatusCommand.php | 2 -- 5 files changed, 24 deletions(-) diff --git a/src/database/src/Commands/Migrations/FreshCommand.php b/src/database/src/Commands/Migrations/FreshCommand.php index 6c28b25d3..0a8886c54 100644 --- a/src/database/src/Commands/Migrations/FreshCommand.php +++ b/src/database/src/Commands/Migrations/FreshCommand.php @@ -130,24 +130,17 @@ class FreshCommand extends Command { return [ ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'], - ['drop-views', null, InputOption::VALUE_NONE, 'Drop all tables and views'], - ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production'], - ['path', null, InputOption::VALUE_OPTIONAL, 'The path to the migrations files to be executed'], - [ 'realpath', null, InputOption::VALUE_NONE, 'Indicate any provided migration file paths are pre-resolved absolute paths', ], - ['seed', null, InputOption::VALUE_NONE, 'Indicates if the seed task should be re-run'], - ['seeder', null, InputOption::VALUE_OPTIONAL, 'The class name of the root seeder'], - [ 'step', null, diff --git a/src/database/src/Commands/Migrations/RefreshCommand.php b/src/database/src/Commands/Migrations/RefreshCommand.php index 4586f0308..65c043014 100755 --- a/src/database/src/Commands/Migrations/RefreshCommand.php +++ b/src/database/src/Commands/Migrations/RefreshCommand.php @@ -132,17 +132,11 @@ class RefreshCommand extends Command { return [ ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'], - ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production'], - ['path', null, InputOption::VALUE_OPTIONAL, 'The path to the migrations files to be executed'], - ['realpath', null, InputOption::VALUE_NONE, 'Indicate any provided migration file paths are pre-resolved absolute paths'], - ['seed', null, InputOption::VALUE_NONE, 'Indicates if the seed task should be re-run'], - ['seeder', null, InputOption::VALUE_OPTIONAL, 'The class name of the root seeder'], - ['step', null, InputOption::VALUE_OPTIONAL, 'The number of migrations to be reverted & re-run'], ]; } diff --git a/src/database/src/Commands/Migrations/ResetCommand.php b/src/database/src/Commands/Migrations/ResetCommand.php index 35f058f91..a7fe119dd 100755 --- a/src/database/src/Commands/Migrations/ResetCommand.php +++ b/src/database/src/Commands/Migrations/ResetCommand.php @@ -84,13 +84,9 @@ class ResetCommand extends BaseCommand { return [ ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'], - ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production'], - ['path', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'The path(s) to the migrations files to be executed'], - ['realpath', null, InputOption::VALUE_NONE, 'Indicate any provided migration file paths are pre-resolved absolute paths'], - ['pretend', null, InputOption::VALUE_NONE, 'Dump the SQL queries that would be run'], ]; } diff --git a/src/database/src/Commands/Migrations/RollbackCommand.php b/src/database/src/Commands/Migrations/RollbackCommand.php index e1240760e..8ef6cb246 100755 --- a/src/database/src/Commands/Migrations/RollbackCommand.php +++ b/src/database/src/Commands/Migrations/RollbackCommand.php @@ -80,15 +80,10 @@ class RollbackCommand extends BaseCommand { return [ ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'], - ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production'], - ['path', null, InputOption::VALUE_OPTIONAL, 'The path to the migrations files to be executed'], - ['realpath', null, InputOption::VALUE_NONE, 'Indicate any provided migration file paths are pre-resolved absolute paths'], - ['pretend', null, InputOption::VALUE_NONE, 'Dump the SQL queries that would be run'], - ['step', null, InputOption::VALUE_OPTIONAL, 'The number of migrations to be reverted'], ]; } diff --git a/src/database/src/Commands/Migrations/StatusCommand.php b/src/database/src/Commands/Migrations/StatusCommand.php index 655e47452..a0d47c80d 100644 --- a/src/database/src/Commands/Migrations/StatusCommand.php +++ b/src/database/src/Commands/Migrations/StatusCommand.php @@ -109,9 +109,7 @@ class StatusCommand extends BaseCommand { return [ ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'], - ['path', null, InputOption::VALUE_OPTIONAL, 'The path to the migrations files to use'], - ['realpath', null, InputOption::VALUE_NONE, 'Indicate any provided migration file paths are pre-resolved absolute paths'], ]; } From 035b974a870e907ddfdc2ba6df9599929b72de92 Mon Sep 17 00:00:00 2001 From: huangzhhui Date: Wed, 29 May 2019 20:38:01 +0800 Subject: [PATCH 16/17] Use MIT license --- LICENSE.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 LICENSE.md diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file From bad4c0e19ad12870457321ae4c77667ea82f2af2 Mon Sep 17 00:00:00 2001 From: huangzhhui Date: Wed, 29 May 2019 20:39:59 +0800 Subject: [PATCH 17/17] Use MIT license --- src/amqp/LICENSE.md | 9 +++++++++ src/async-queue/LICENSE.md | 9 +++++++++ src/cache/LICENSE.md | 9 +++++++++ src/circuit-breaker/LICENSE.md | 9 +++++++++ src/command/LICENSE.md | 9 +++++++++ src/config-apollo/LICENSE.md | 9 +++++++++ src/config/LICENSE.md | 9 +++++++++ src/constants/LICENSE.md | 9 +++++++++ src/consul/LICENSE.md | 9 +++++++++ src/contract/LICENSE.md | 9 +++++++++ src/database/LICENSE.md | 9 +++++++++ src/db-connection/LICENSE.md | 9 +++++++++ src/devtool/LICENSE.md | 9 +++++++++ src/di/LICENSE.md | 9 +++++++++ src/dispatcher/LICENSE.md | 9 +++++++++ src/elasticsearch/LICENSE.md | 9 +++++++++ src/event/LICENSE.md | 9 +++++++++ src/framework/LICENSE.md | 9 +++++++++ src/grpc-client/LICENSE.md | 9 +++++++++ src/grpc-server/LICENSE.md | 9 +++++++++ src/grpc/LICENSE.md | 9 +++++++++ src/guzzle/LICENSE.md | 9 +++++++++ src/http-message/LICENSE.md | 9 +++++++++ src/http-server/LICENSE.md | 9 +++++++++ src/json-rpc/LICENSE.md | 9 +++++++++ src/load-balancer/LICENSE.md | 9 +++++++++ src/logger/LICENSE.md | 9 +++++++++ src/memory/LICENSE.md | 9 +++++++++ src/model-cache/LICENSE.md | 9 +++++++++ src/paginator/LICENSE.md | 9 +++++++++ src/pool/LICENSE.md | 9 +++++++++ src/process/LICENSE.md | 9 +++++++++ src/rate-limit/LICENSE.md | 9 +++++++++ src/redis/LICENSE.md | 9 +++++++++ src/rpc-client/LICENSE.md | 9 +++++++++ src/rpc-server/LICENSE.md | 9 +++++++++ src/rpc/LICENSE.md | 9 +++++++++ src/server/LICENSE.md | 9 +++++++++ src/service-governance/LICENSE.md | 9 +++++++++ src/swagger/LICENSE.md | 9 +++++++++ src/tracer/LICENSE.md | 9 +++++++++ src/utils/LICENSE.md | 9 +++++++++ 42 files changed, 378 insertions(+) create mode 100644 src/amqp/LICENSE.md create mode 100644 src/async-queue/LICENSE.md create mode 100644 src/cache/LICENSE.md create mode 100644 src/circuit-breaker/LICENSE.md create mode 100644 src/command/LICENSE.md create mode 100644 src/config-apollo/LICENSE.md create mode 100644 src/config/LICENSE.md create mode 100644 src/constants/LICENSE.md create mode 100644 src/consul/LICENSE.md create mode 100644 src/contract/LICENSE.md create mode 100644 src/database/LICENSE.md create mode 100644 src/db-connection/LICENSE.md create mode 100644 src/devtool/LICENSE.md create mode 100644 src/di/LICENSE.md create mode 100644 src/dispatcher/LICENSE.md create mode 100644 src/elasticsearch/LICENSE.md create mode 100644 src/event/LICENSE.md create mode 100644 src/framework/LICENSE.md create mode 100644 src/grpc-client/LICENSE.md create mode 100644 src/grpc-server/LICENSE.md create mode 100644 src/grpc/LICENSE.md create mode 100644 src/guzzle/LICENSE.md create mode 100644 src/http-message/LICENSE.md create mode 100644 src/http-server/LICENSE.md create mode 100644 src/json-rpc/LICENSE.md create mode 100644 src/load-balancer/LICENSE.md create mode 100644 src/logger/LICENSE.md create mode 100644 src/memory/LICENSE.md create mode 100644 src/model-cache/LICENSE.md create mode 100644 src/paginator/LICENSE.md create mode 100644 src/pool/LICENSE.md create mode 100644 src/process/LICENSE.md create mode 100644 src/rate-limit/LICENSE.md create mode 100644 src/redis/LICENSE.md create mode 100644 src/rpc-client/LICENSE.md create mode 100644 src/rpc-server/LICENSE.md create mode 100644 src/rpc/LICENSE.md create mode 100644 src/server/LICENSE.md create mode 100644 src/service-governance/LICENSE.md create mode 100644 src/swagger/LICENSE.md create mode 100644 src/tracer/LICENSE.md create mode 100644 src/utils/LICENSE.md diff --git a/src/amqp/LICENSE.md b/src/amqp/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/amqp/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/async-queue/LICENSE.md b/src/async-queue/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/async-queue/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/cache/LICENSE.md b/src/cache/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/cache/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/circuit-breaker/LICENSE.md b/src/circuit-breaker/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/circuit-breaker/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/command/LICENSE.md b/src/command/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/command/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/config-apollo/LICENSE.md b/src/config-apollo/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/config-apollo/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/config/LICENSE.md b/src/config/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/config/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/constants/LICENSE.md b/src/constants/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/constants/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/consul/LICENSE.md b/src/consul/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/consul/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/contract/LICENSE.md b/src/contract/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/contract/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/database/LICENSE.md b/src/database/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/database/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/db-connection/LICENSE.md b/src/db-connection/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/db-connection/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/devtool/LICENSE.md b/src/devtool/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/devtool/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/di/LICENSE.md b/src/di/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/di/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/dispatcher/LICENSE.md b/src/dispatcher/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/dispatcher/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/elasticsearch/LICENSE.md b/src/elasticsearch/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/elasticsearch/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/event/LICENSE.md b/src/event/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/event/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/framework/LICENSE.md b/src/framework/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/framework/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/grpc-client/LICENSE.md b/src/grpc-client/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/grpc-client/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/grpc-server/LICENSE.md b/src/grpc-server/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/grpc-server/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/grpc/LICENSE.md b/src/grpc/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/grpc/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/guzzle/LICENSE.md b/src/guzzle/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/guzzle/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/http-message/LICENSE.md b/src/http-message/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/http-message/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/http-server/LICENSE.md b/src/http-server/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/http-server/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/json-rpc/LICENSE.md b/src/json-rpc/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/json-rpc/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/load-balancer/LICENSE.md b/src/load-balancer/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/load-balancer/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/logger/LICENSE.md b/src/logger/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/logger/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/memory/LICENSE.md b/src/memory/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/memory/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/model-cache/LICENSE.md b/src/model-cache/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/model-cache/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/paginator/LICENSE.md b/src/paginator/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/paginator/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/pool/LICENSE.md b/src/pool/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/pool/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/process/LICENSE.md b/src/process/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/process/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/rate-limit/LICENSE.md b/src/rate-limit/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/rate-limit/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/redis/LICENSE.md b/src/redis/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/redis/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/rpc-client/LICENSE.md b/src/rpc-client/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/rpc-client/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/rpc-server/LICENSE.md b/src/rpc-server/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/rpc-server/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/rpc/LICENSE.md b/src/rpc/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/rpc/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/server/LICENSE.md b/src/server/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/server/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/service-governance/LICENSE.md b/src/service-governance/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/service-governance/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/swagger/LICENSE.md b/src/swagger/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/swagger/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/tracer/LICENSE.md b/src/tracer/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/tracer/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/utils/LICENSE.md b/src/utils/LICENSE.md new file mode 100644 index 000000000..eb14702a3 --- /dev/null +++ b/src/utils/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Hyperf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file