- Removed unused exception InvalidBuildConfigurationException
in \ncc\Exceptions
(not used)
- Removed unused exception `InvalidPropertyValue` in `\ncc\Exceptions` in favor of `ConfigurationException` - Removed unused exception `InvalidVersionConfiguration` in `\ncc\Exceptions` (not used) - Removed unused exception `InvalidDependencyConfiguraiton` in `\ncc\Exceptions` (not used) - Removed unused exception `ProjectConfigurationNotFoundException` in `\ncc\Exceptions` in favor of `ConfigurationException` - Removed unused exception `UndefinedExecutionPolicyExpection` in `\ncc\Exceptions` in favor of `ConfigurationException` - Removed unused exception `InvalidExecutionPolicyName` in `\ncc\Exceptions` (not used)
This commit is contained in:
parent
59dc4bb9cb
commit
b685d66b77
20 changed files with 103 additions and 477 deletions
|
@ -140,6 +140,13 @@ features.
|
||||||
- Removed unused exception `InvalidProjectException` in `\ncc\Exceptions` in favor of `ConfigurationException`
|
- Removed unused exception `InvalidProjectException` in `\ncc\Exceptions` in favor of `ConfigurationException`
|
||||||
- Removed unused exception `InvalidProjectNameException` in `\ncc\Exceptions` in favor of `ConfigurationException`
|
- Removed unused exception `InvalidProjectNameException` in `\ncc\Exceptions` in favor of `ConfigurationException`
|
||||||
- Removed unused exception `BuildConfigurationNotFoundException` in `\ncc\Exceptions` in favor of `ConfigurationException`
|
- Removed unused exception `BuildConfigurationNotFoundException` in `\ncc\Exceptions` in favor of `ConfigurationException`
|
||||||
|
- Removed unused exception `InvalidBuildConfigurationException` in `\ncc\Exceptions` (not used)
|
||||||
|
- Removed unused exception `InvalidPropertyValue` in `\ncc\Exceptions` in favor of `ConfigurationException`
|
||||||
|
- Removed unused exception `InvalidVersionConfiguration` in `\ncc\Exceptions` (not used)
|
||||||
|
- Removed unused exception `InvalidDependencyConfiguraiton` in `\ncc\Exceptions` (not used)
|
||||||
|
- Removed unused exception `ProjectConfigurationNotFoundException` in `\ncc\Exceptions` in favor of `ConfigurationException`
|
||||||
|
- Removed unused exception `UndefinedExecutionPolicyExpection` in `\ncc\Exceptions` in favor of `ConfigurationException`
|
||||||
|
- Removed unused exception `InvalidExecutionPolicyName` in `\ncc\Exceptions` (not used)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,15 +6,15 @@ ConfigurationException
|
||||||
* INVALID_PACKAGE_NAME
|
* INVALID_PACKAGE_NAME
|
||||||
* INVALID_VERSION_NUMBER
|
* INVALID_VERSION_NUMBER
|
||||||
* INVALID_PROJECT_NAME
|
* INVALID_PROJECT_NAME
|
||||||
BUILD_CONFIGURATION_NOT_FOUND
|
* BUILD_CONFIGURATION_NOT_FOUND
|
||||||
INVALID_PROJECT_BUILD_CONFIGURATION
|
* INVALID_PROJECT_BUILD_CONFIGURATION
|
||||||
INVALID_PROPERTY_VALUE
|
* INVALID_PROPERTY_VALUE
|
||||||
INVALID_VERSION_CONFIGURATION
|
* INVALID_VERSION_CONFIGURATION
|
||||||
INVALID_BUILD_CONFIGURATION
|
* INVALID_BUILD_CONFIGURATION
|
||||||
INVALID_DEPENDENCY_CONFIGURATION
|
* INVALID_DEPENDENCY_CONFIGURATION
|
||||||
PROJECT_CONFIGURATION_NOT_FOUND
|
* PROJECT_CONFIGURATION_NOT_FOUND
|
||||||
UNDEFINED_EXECUTION_POLICY
|
* UNDEFINED_EXECUTION_POLICY
|
||||||
INVALID_EXECUTION_POLICY_NAME
|
* INVALID_EXECUTION_POLICY_NAME
|
||||||
|
|
||||||
AuthenticationException
|
AuthenticationException
|
||||||
ACCESS_DENIED
|
ACCESS_DENIED
|
||||||
|
@ -80,7 +80,7 @@ IntegrityException
|
||||||
CONSTANT_READ_ONLY
|
CONSTANT_READ_ONLY
|
||||||
INVALID_CONSTANT_NAME
|
INVALID_CONSTANT_NAME
|
||||||
COMPONENT_DECODE_EXCEPTION
|
COMPONENT_DECODE_EXCEPTION
|
||||||
* RESOURCE_CHECKSUM_EXCEPTION
|
RESOURCE_CHECKSUM_EXCEPTION
|
||||||
|
|
||||||
AutoLoadException
|
AutoLoadException
|
||||||
AUTOLOAD_GENERATOR
|
AUTOLOAD_GENERATOR
|
|
@ -31,7 +31,6 @@
|
||||||
use ncc\Exceptions\MalformedJsonException;
|
use ncc\Exceptions\MalformedJsonException;
|
||||||
use ncc\Exceptions\PathNotFoundException;
|
use ncc\Exceptions\PathNotFoundException;
|
||||||
use ncc\Exceptions\ProjectAlreadyExistsException;
|
use ncc\Exceptions\ProjectAlreadyExistsException;
|
||||||
use ncc\Exceptions\ProjectConfigurationNotFoundException;
|
|
||||||
use ncc\Managers\ProjectManager;
|
use ncc\Managers\ProjectManager;
|
||||||
use ncc\Objects\CliHelpSection;
|
use ncc\Objects\CliHelpSection;
|
||||||
use ncc\Objects\ProjectConfiguration\Compiler;
|
use ncc\Objects\ProjectConfiguration\Compiler;
|
||||||
|
@ -45,10 +44,10 @@
|
||||||
*
|
*
|
||||||
* @param $args
|
* @param $args
|
||||||
* @return void
|
* @return void
|
||||||
|
* @throws ConfigurationException
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* @throws MalformedJsonException
|
* @throws MalformedJsonException
|
||||||
* @throws PathNotFoundException
|
* @throws PathNotFoundException
|
||||||
* @throws ProjectConfigurationNotFoundException
|
|
||||||
*/
|
*/
|
||||||
public static function start($args): void
|
public static function start($args): void
|
||||||
{
|
{
|
||||||
|
@ -65,10 +64,10 @@
|
||||||
*
|
*
|
||||||
* @param $args
|
* @param $args
|
||||||
* @return void
|
* @return void
|
||||||
|
* @throws ConfigurationException
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* @throws MalformedJsonException
|
* @throws MalformedJsonException
|
||||||
* @throws PathNotFoundException
|
* @throws PathNotFoundException
|
||||||
* @throws ProjectConfigurationNotFoundException
|
|
||||||
*/
|
*/
|
||||||
public static function createProject($args): void
|
public static function createProject($args): void
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Nosial 2022-2023, all rights reserved.
|
* Copyright (c) Nosial 2022-2023, all rights reserved.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ncc\Classes\ComposerExtension;
|
namespace ncc\Classes\ComposerExtension;
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use FilesystemIterator;
|
use FilesystemIterator;
|
||||||
|
@ -33,18 +33,18 @@ namespace ncc\Classes\ComposerExtension;
|
||||||
use ncc\Enums\Scopes;
|
use ncc\Enums\Scopes;
|
||||||
use ncc\CLI\Main;
|
use ncc\CLI\Main;
|
||||||
use ncc\Exceptions\AccessDeniedException;
|
use ncc\Exceptions\AccessDeniedException;
|
||||||
use ncc\Exceptions\BuildConfigurationNotFoundException;
|
|
||||||
use ncc\Exceptions\BuildException;
|
use ncc\Exceptions\BuildException;
|
||||||
use ncc\Exceptions\ComposerDisabledException;
|
use ncc\Exceptions\ComposerDisabledException;
|
||||||
use ncc\Exceptions\ComposerException;
|
use ncc\Exceptions\ComposerException;
|
||||||
use ncc\Exceptions\ComposerNotAvailableException;
|
use ncc\Exceptions\ComposerNotAvailableException;
|
||||||
|
use ncc\Exceptions\ConfigurationException;
|
||||||
|
use ncc\Exceptions\NotSupportedException;
|
||||||
use ncc\Exceptions\PathNotFoundException;
|
use ncc\Exceptions\PathNotFoundException;
|
||||||
use ncc\Exceptions\InternalComposerNotAvailableException;
|
use ncc\Exceptions\InternalComposerNotAvailableException;
|
||||||
use ncc\Exceptions\IOException;
|
use ncc\Exceptions\IOException;
|
||||||
use ncc\Exceptions\MalformedJsonException;
|
use ncc\Exceptions\MalformedJsonException;
|
||||||
use ncc\Exceptions\PackageNotFoundException;
|
use ncc\Exceptions\PackageNotFoundException;
|
||||||
use ncc\Exceptions\PackagePreparationFailedException;
|
use ncc\Exceptions\PackagePreparationFailedException;
|
||||||
use ncc\Exceptions\ProjectConfigurationNotFoundException;
|
|
||||||
use ncc\Exceptions\RuntimeException;
|
use ncc\Exceptions\RuntimeException;
|
||||||
use ncc\Exceptions\UserAbortedOperationException;
|
use ncc\Exceptions\UserAbortedOperationException;
|
||||||
use ncc\Interfaces\ServiceSourceInterface;
|
use ncc\Interfaces\ServiceSourceInterface;
|
||||||
|
@ -80,18 +80,18 @@ namespace ncc\Classes\ComposerExtension;
|
||||||
* @param RemotePackageInput $packageInput
|
* @param RemotePackageInput $packageInput
|
||||||
* @return string
|
* @return string
|
||||||
* @throws AccessDeniedException
|
* @throws AccessDeniedException
|
||||||
* @throws BuildConfigurationNotFoundException
|
|
||||||
* @throws BuildException
|
* @throws BuildException
|
||||||
* @throws ComposerDisabledException
|
* @throws ComposerDisabledException
|
||||||
* @throws ComposerException
|
* @throws ComposerException
|
||||||
* @throws ComposerNotAvailableException
|
* @throws ComposerNotAvailableException
|
||||||
|
* @throws ConfigurationException
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* @throws InternalComposerNotAvailableException
|
* @throws InternalComposerNotAvailableException
|
||||||
* @throws MalformedJsonException
|
* @throws MalformedJsonException
|
||||||
|
* @throws NotSupportedException
|
||||||
* @throws PackageNotFoundException
|
* @throws PackageNotFoundException
|
||||||
* @throws PackagePreparationFailedException
|
* @throws PackagePreparationFailedException
|
||||||
* @throws PathNotFoundException
|
* @throws PathNotFoundException
|
||||||
* @throws ProjectConfigurationNotFoundException
|
|
||||||
* @throws RuntimeException
|
* @throws RuntimeException
|
||||||
* @throws UserAbortedOperationException
|
* @throws UserAbortedOperationException
|
||||||
*/
|
*/
|
||||||
|
@ -120,18 +120,18 @@ namespace ncc\Classes\ComposerExtension;
|
||||||
* @param string $path
|
* @param string $path
|
||||||
* @return string
|
* @return string
|
||||||
* @throws AccessDeniedException
|
* @throws AccessDeniedException
|
||||||
* @throws BuildConfigurationNotFoundException
|
|
||||||
* @throws BuildException
|
* @throws BuildException
|
||||||
* @throws ComposerDisabledException
|
* @throws ComposerDisabledException
|
||||||
* @throws ComposerException
|
* @throws ComposerException
|
||||||
* @throws ComposerNotAvailableException
|
* @throws ComposerNotAvailableException
|
||||||
|
* @throws ConfigurationException
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* @throws InternalComposerNotAvailableException
|
* @throws InternalComposerNotAvailableException
|
||||||
* @throws MalformedJsonException
|
* @throws MalformedJsonException
|
||||||
|
* @throws NotSupportedException
|
||||||
* @throws PackageNotFoundException
|
* @throws PackageNotFoundException
|
||||||
* @throws PackagePreparationFailedException
|
* @throws PackagePreparationFailedException
|
||||||
* @throws PathNotFoundException
|
* @throws PathNotFoundException
|
||||||
* @throws ProjectConfigurationNotFoundException
|
|
||||||
* @throws UserAbortedOperationException
|
* @throws UserAbortedOperationException
|
||||||
*/
|
*/
|
||||||
public static function fromLocal(string $path): string
|
public static function fromLocal(string $path): string
|
||||||
|
@ -195,14 +195,14 @@ namespace ncc\Classes\ComposerExtension;
|
||||||
* @param string $composer_lock_path
|
* @param string $composer_lock_path
|
||||||
* @return array
|
* @return array
|
||||||
* @throws AccessDeniedException
|
* @throws AccessDeniedException
|
||||||
* @throws BuildConfigurationNotFoundException
|
|
||||||
* @throws BuildException
|
* @throws BuildException
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* @throws MalformedJsonException
|
* @throws MalformedJsonException
|
||||||
* @throws PackageNotFoundException
|
* @throws PackageNotFoundException
|
||||||
* @throws PackagePreparationFailedException
|
* @throws PackagePreparationFailedException
|
||||||
* @throws PathNotFoundException
|
* @throws PathNotFoundException
|
||||||
* @throws ProjectConfigurationNotFoundException
|
* @throws ConfigurationException
|
||||||
|
* @throws NotSupportedException
|
||||||
*/
|
*/
|
||||||
private static function compilePackages(string $composer_lock_path): array
|
private static function compilePackages(string $composer_lock_path): array
|
||||||
{
|
{
|
||||||
|
@ -822,7 +822,7 @@ namespace ncc\Classes\ComposerExtension;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Functions::cbool(Functions::getConfigurationProperty('composer.extension.display_authors')) && !is_null($composer_package->Authors) && count($composer_package->Authors) > 0)
|
if(Functions::cbool(!is_null($composer_package->Authors) && count($composer_package->Authors) > 0 && Functions::getConfigurationProperty('composer.extension.display_authors')))
|
||||||
{
|
{
|
||||||
Console::out(sprintf('Authors for package %s:', $composer_package->Name));
|
Console::out(sprintf('Authors for package %s:', $composer_package->Name));
|
||||||
foreach($composer_package->Authors as $author)
|
foreach($composer_package->Authors as $author)
|
||||||
|
|
|
@ -32,13 +32,12 @@
|
||||||
use ncc\Classes\PhpExtension\PhpCompiler;
|
use ncc\Classes\PhpExtension\PhpCompiler;
|
||||||
use ncc\CLI\Main;
|
use ncc\CLI\Main;
|
||||||
use ncc\Exceptions\AccessDeniedException;
|
use ncc\Exceptions\AccessDeniedException;
|
||||||
use ncc\Exceptions\BuildConfigurationNotFoundException;
|
|
||||||
use ncc\Exceptions\BuildException;
|
use ncc\Exceptions\BuildException;
|
||||||
|
use ncc\Exceptions\ConfigurationException;
|
||||||
use ncc\Exceptions\IOException;
|
use ncc\Exceptions\IOException;
|
||||||
use ncc\Exceptions\MalformedJsonException;
|
use ncc\Exceptions\MalformedJsonException;
|
||||||
use ncc\Exceptions\NotSupportedException;
|
use ncc\Exceptions\NotSupportedException;
|
||||||
use ncc\Exceptions\PathNotFoundException;
|
use ncc\Exceptions\PathNotFoundException;
|
||||||
use ncc\Exceptions\ProjectConfigurationNotFoundException;
|
|
||||||
use ncc\Exceptions\RunnerExecutionException;
|
use ncc\Exceptions\RunnerExecutionException;
|
||||||
use ncc\Interfaces\CompilerInterface;
|
use ncc\Interfaces\CompilerInterface;
|
||||||
use ncc\Managers\ProjectManager;
|
use ncc\Managers\ProjectManager;
|
||||||
|
@ -60,13 +59,12 @@
|
||||||
* @param string $build_configuration
|
* @param string $build_configuration
|
||||||
* @return string
|
* @return string
|
||||||
* @throws AccessDeniedException
|
* @throws AccessDeniedException
|
||||||
* @throws BuildConfigurationNotFoundException
|
|
||||||
* @throws BuildException
|
* @throws BuildException
|
||||||
|
* @throws ConfigurationException
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* @throws MalformedJsonException
|
* @throws MalformedJsonException
|
||||||
* @throws NotSupportedException
|
* @throws NotSupportedException
|
||||||
* @throws PathNotFoundException
|
* @throws PathNotFoundException
|
||||||
* @throws ProjectConfigurationNotFoundException
|
|
||||||
*/
|
*/
|
||||||
public static function compile(ProjectManager $manager, string $build_configuration=BuildConfigurationValues::DEFAULT): string
|
public static function compile(ProjectManager $manager, string $build_configuration=BuildConfigurationValues::DEFAULT): string
|
||||||
{
|
{
|
||||||
|
@ -205,8 +203,8 @@
|
||||||
* @param ProjectConfiguration $configuration
|
* @param ProjectConfiguration $configuration
|
||||||
* @param string $build_configuration
|
* @param string $build_configuration
|
||||||
* @return string
|
* @return string
|
||||||
* @throws BuildConfigurationNotFoundException
|
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
|
* @throws ConfigurationException
|
||||||
*/
|
*/
|
||||||
public static function writePackage(string $path, Package $package, ProjectConfiguration $configuration, string $build_configuration=BuildConfigurationValues::DEFAULT): string
|
public static function writePackage(string $path, Package $package, ProjectConfiguration $configuration, string $build_configuration=BuildConfigurationValues::DEFAULT): string
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Nosial 2022-2023, all rights reserved.
|
* Copyright (c) Nosial 2022-2023, all rights reserved.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||||
|
@ -33,8 +33,8 @@
|
||||||
use ncc\Enums\Options\BuildConfigurationValues;
|
use ncc\Enums\Options\BuildConfigurationValues;
|
||||||
use ncc\Classes\NccExtension\PackageCompiler;
|
use ncc\Classes\NccExtension\PackageCompiler;
|
||||||
use ncc\Exceptions\AccessDeniedException;
|
use ncc\Exceptions\AccessDeniedException;
|
||||||
use ncc\Exceptions\BuildConfigurationNotFoundException;
|
|
||||||
use ncc\Exceptions\BuildException;
|
use ncc\Exceptions\BuildException;
|
||||||
|
use ncc\Exceptions\ConfigurationException;
|
||||||
use ncc\Exceptions\IOException;
|
use ncc\Exceptions\IOException;
|
||||||
use ncc\Exceptions\PackageLockException;
|
use ncc\Exceptions\PackageLockException;
|
||||||
use ncc\Exceptions\PackagePreparationFailedException;
|
use ncc\Exceptions\PackagePreparationFailedException;
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
* @param string $build_configuration
|
* @param string $build_configuration
|
||||||
* @return void
|
* @return void
|
||||||
* @throws PackagePreparationFailedException
|
* @throws PackagePreparationFailedException
|
||||||
* @throws BuildConfigurationNotFoundException
|
* @throws ConfigurationException
|
||||||
*/
|
*/
|
||||||
public function prepare(string $build_configuration=BuildConfigurationValues::DEFAULT): void
|
public function prepare(string $build_configuration=BuildConfigurationValues::DEFAULT): void
|
||||||
{
|
{
|
||||||
|
@ -355,7 +355,6 @@
|
||||||
* Compiles the resources of the package
|
* Compiles the resources of the package
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
* @throws AccessDeniedException
|
|
||||||
* @throws BuildException
|
* @throws BuildException
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* @throws PathNotFoundException
|
* @throws PathNotFoundException
|
||||||
|
@ -408,7 +407,6 @@
|
||||||
* Compiles the components of the package
|
* Compiles the components of the package
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
* @throws AccessDeniedException
|
|
||||||
* @throws BuildException
|
* @throws BuildException
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* @throws PathNotFoundException
|
* @throws PathNotFoundException
|
||||||
|
|
|
@ -48,11 +48,6 @@
|
||||||
*/
|
*/
|
||||||
public const CONSTANT_READ_ONLY = -1709;
|
public const CONSTANT_READ_ONLY = -1709;
|
||||||
|
|
||||||
/**
|
|
||||||
* @see InvalidVersionNumberException
|
|
||||||
*/
|
|
||||||
public const INVALID_VERSION_NUMBER = -1711;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see ProjectAlreadyExistsException
|
* @see ProjectAlreadyExistsException
|
||||||
*/
|
*/
|
||||||
|
@ -78,21 +73,6 @@
|
||||||
*/
|
*/
|
||||||
public const PACKAGE_PREPARATION_FAILED = -1720;
|
public const PACKAGE_PREPARATION_FAILED = -1720;
|
||||||
|
|
||||||
/**
|
|
||||||
* @see BuildConfigurationNotFoundException
|
|
||||||
*/
|
|
||||||
public const BUILD_CONFIGURATION_NOT_FOUND = -1721;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see InvalidProjectBuildConfiguration
|
|
||||||
*/
|
|
||||||
public const INVALID_PROJECT_BUILD_CONFIGURATION = -1722;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see InvalidPropertyValueException
|
|
||||||
*/
|
|
||||||
public const INVALID_PROPERTY_VALUE = -1724;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see BuildException
|
* @see BuildException
|
||||||
*/
|
*/
|
||||||
|
@ -128,21 +108,6 @@
|
||||||
*/
|
*/
|
||||||
public const VERSION_NOT_FOUND = -1737;
|
public const VERSION_NOT_FOUND = -1737;
|
||||||
|
|
||||||
/**
|
|
||||||
* @see UndefinedExecutionPolicyException
|
|
||||||
*/
|
|
||||||
public const UNDEFINED_EXECUTION_POLICY = -1738;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see InvalidExecutionPolicyName
|
|
||||||
*/
|
|
||||||
public const INVALID_EXECUTION_POLICY_NAME = -1739;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see ProjectConfigurationNotFoundException
|
|
||||||
*/
|
|
||||||
public const PROJECT_CONFIGURATION_NOT_FOUND = -1740;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see RunnerExecutionException
|
* @see RunnerExecutionException
|
||||||
*/
|
*/
|
||||||
|
@ -223,11 +188,6 @@
|
||||||
*/
|
*/
|
||||||
public const PACKAGE_FETCH_EXCEPTION = -1765;
|
public const PACKAGE_FETCH_EXCEPTION = -1765;
|
||||||
|
|
||||||
/**
|
|
||||||
* @see InvalidDependencyConfiguration
|
|
||||||
*/
|
|
||||||
public const INVALID_DEPENDENCY_CONFIGURATION = -1767;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see SymlinkException
|
* @see SymlinkException
|
||||||
*/
|
*/
|
||||||
|
@ -256,15 +216,11 @@
|
||||||
self::MALFORMED_JSON,
|
self::MALFORMED_JSON,
|
||||||
self::RUNTIME,
|
self::RUNTIME,
|
||||||
self::CONSTANT_READ_ONLY,
|
self::CONSTANT_READ_ONLY,
|
||||||
self::INVALID_VERSION_NUMBER,
|
|
||||||
self::PROJECT_ALREADY_EXISTS,
|
self::PROJECT_ALREADY_EXISTS,
|
||||||
self::AUTOLOAD_GENERATOR,
|
self::AUTOLOAD_GENERATOR,
|
||||||
self::NO_UNITS_FOUND,
|
self::NO_UNITS_FOUND,
|
||||||
self::INVALID_CONSTANT_NAME,
|
self::INVALID_CONSTANT_NAME,
|
||||||
self::PACKAGE_PREPARATION_FAILED,
|
self::PACKAGE_PREPARATION_FAILED,
|
||||||
self::BUILD_CONFIGURATION_NOT_FOUND,
|
|
||||||
self::INVALID_PROJECT_BUILD_CONFIGURATION,
|
|
||||||
self::INVALID_PROPERTY_VALUE,
|
|
||||||
self::BUILD_EXCEPTION,
|
self::BUILD_EXCEPTION,
|
||||||
self::PACKAGE_PARSING_EXCEPTION,
|
self::PACKAGE_PARSING_EXCEPTION,
|
||||||
self::PACKAGE_LOCK_EXCEPTION,
|
self::PACKAGE_LOCK_EXCEPTION,
|
||||||
|
@ -272,9 +228,6 @@
|
||||||
self::COMPONENT_DECODE_EXCEPTION,
|
self::COMPONENT_DECODE_EXCEPTION,
|
||||||
self::IO_EXCEPTION,
|
self::IO_EXCEPTION,
|
||||||
self::VERSION_NOT_FOUND,
|
self::VERSION_NOT_FOUND,
|
||||||
self::UNDEFINED_EXECUTION_POLICY,
|
|
||||||
self::INVALID_EXECUTION_POLICY_NAME,
|
|
||||||
self::PROJECT_CONFIGURATION_NOT_FOUND,
|
|
||||||
self::RUNNER_EXECUTION_EXCEPTION,
|
self::RUNNER_EXECUTION_EXCEPTION,
|
||||||
self::NO_AVAILABLE_UNITS,
|
self::NO_AVAILABLE_UNITS,
|
||||||
self::PACKAGE_ALREADY_INSTALLED,
|
self::PACKAGE_ALREADY_INSTALLED,
|
||||||
|
@ -290,7 +243,6 @@
|
||||||
self::NOT_SUPPORTED_EXCEPTION,
|
self::NOT_SUPPORTED_EXCEPTION,
|
||||||
self::ARCHIVE_EXCEPTION,
|
self::ARCHIVE_EXCEPTION,
|
||||||
self::PACKAGE_FETCH_EXCEPTION,
|
self::PACKAGE_FETCH_EXCEPTION,
|
||||||
self::INVALID_DEPENDENCY_CONFIGURATION,
|
|
||||||
self::SYMLINK_EXCEPTION,
|
self::SYMLINK_EXCEPTION,
|
||||||
self::PATH_NOT_FOUND,
|
self::PATH_NOT_FOUND,
|
||||||
self::GIT_EXCEPTION,
|
self::GIT_EXCEPTION,
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
<?php
|
|
||||||
/*
|
|
||||||
* Copyright (c) Nosial 2022-2023, all rights reserved.
|
|
||||||
*
|
|
||||||
* 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 NON-INFRINGEMENT. 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.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace ncc\Exceptions;
|
|
||||||
|
|
||||||
use Exception;
|
|
||||||
use ncc\Enums\ExceptionCodes;
|
|
||||||
use Throwable;
|
|
||||||
|
|
||||||
class BuildConfigurationNotFoundException extends Exception
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @param string $message
|
|
||||||
* @param Throwable|null $previous
|
|
||||||
*/
|
|
||||||
public function __construct(string $message = "", ?Throwable $previous = null)
|
|
||||||
{
|
|
||||||
parent::__construct($message, ExceptionCodes::BUILD_CONFIGURATION_NOT_FOUND, $previous);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
<?php
|
|
||||||
/*
|
|
||||||
* Copyright (c) Nosial 2022-2023, all rights reserved.
|
|
||||||
*
|
|
||||||
* 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 NON-INFRINGEMENT. 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.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace ncc\Exceptions;
|
|
||||||
|
|
||||||
use Exception;
|
|
||||||
use ncc\Enums\ExceptionCodes;
|
|
||||||
use Throwable;
|
|
||||||
|
|
||||||
class InvalidDependencyConfiguration extends Exception
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @param string $message
|
|
||||||
* @param Throwable|null $previous
|
|
||||||
*/
|
|
||||||
public function __construct(string $message = "", ?Throwable $previous = null)
|
|
||||||
{
|
|
||||||
parent::__construct($message, ExceptionCodes::INVALID_DEPENDENCY_CONFIGURATION, $previous);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
<?php
|
|
||||||
/*
|
|
||||||
* Copyright (c) Nosial 2022-2023, all rights reserved.
|
|
||||||
*
|
|
||||||
* 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 NON-INFRINGEMENT. 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.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace ncc\Exceptions;
|
|
||||||
|
|
||||||
use Exception;
|
|
||||||
use ncc\Enums\ExceptionCodes;
|
|
||||||
use Throwable;
|
|
||||||
|
|
||||||
class InvalidExecutionPolicyName extends Exception
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @param string $message
|
|
||||||
* @param Throwable|null $previous
|
|
||||||
*/
|
|
||||||
public function __construct(string $message = "", ?Throwable $previous = null)
|
|
||||||
{
|
|
||||||
parent::__construct($message, ExceptionCodes::INVALID_EXECUTION_POLICY_NAME, $previous);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
<?php
|
|
||||||
/*
|
|
||||||
* Copyright (c) Nosial 2022-2023, all rights reserved.
|
|
||||||
*
|
|
||||||
* 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 NON-INFRINGEMENT. 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.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace ncc\Exceptions;
|
|
||||||
|
|
||||||
use Exception;
|
|
||||||
use ncc\Enums\ExceptionCodes;
|
|
||||||
use Throwable;
|
|
||||||
|
|
||||||
class InvalidProjectBuildConfiguration extends Exception
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @param string $message
|
|
||||||
* @param Throwable|null $previous
|
|
||||||
*/
|
|
||||||
public function __construct(string $message = "", ?Throwable $previous = null)
|
|
||||||
{
|
|
||||||
parent::__construct($message, ExceptionCodes::INVALID_PROJECT_BUILD_CONFIGURATION, $previous);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
<?php
|
|
||||||
/*
|
|
||||||
* Copyright (c) Nosial 2022-2023, all rights reserved.
|
|
||||||
*
|
|
||||||
* 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 NON-INFRINGEMENT. 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.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace ncc\Exceptions;
|
|
||||||
|
|
||||||
use Exception;
|
|
||||||
use ncc\Enums\ExceptionCodes;
|
|
||||||
use Throwable;
|
|
||||||
|
|
||||||
class InvalidPropertyValueException extends Exception
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @param string $message
|
|
||||||
* @param Throwable|null $previous
|
|
||||||
*/
|
|
||||||
public function __construct(string $message = "", ?Throwable $previous = null)
|
|
||||||
{
|
|
||||||
parent::__construct($message, ExceptionCodes::INVALID_PROPERTY_VALUE, $previous);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
<?php
|
|
||||||
/*
|
|
||||||
* Copyright (c) Nosial 2022-2023, all rights reserved.
|
|
||||||
*
|
|
||||||
* 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 NON-INFRINGEMENT. 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.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace ncc\Exceptions;
|
|
||||||
|
|
||||||
use Exception;
|
|
||||||
use ncc\Enums\ExceptionCodes;
|
|
||||||
use Throwable;
|
|
||||||
|
|
||||||
class InvalidVersionNumberException extends Exception
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @param string $message
|
|
||||||
* @param Throwable|null $previous
|
|
||||||
*/
|
|
||||||
public function __construct(string $message = "", ?Throwable $previous = null)
|
|
||||||
{
|
|
||||||
parent::__construct($message, ExceptionCodes::INVALID_VERSION_NUMBER, $previous);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
<?php
|
|
||||||
/*
|
|
||||||
* Copyright (c) Nosial 2022-2023, all rights reserved.
|
|
||||||
*
|
|
||||||
* 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 NON-INFRINGEMENT. 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.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace ncc\Exceptions;
|
|
||||||
|
|
||||||
use Exception;
|
|
||||||
use ncc\Enums\ExceptionCodes;
|
|
||||||
use Throwable;
|
|
||||||
|
|
||||||
class ProjectConfigurationNotFoundException extends Exception
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @param string $message
|
|
||||||
* @param Throwable|null $previous
|
|
||||||
*/
|
|
||||||
public function __construct(string $message = "", ?Throwable $previous = null)
|
|
||||||
{
|
|
||||||
parent::__construct($message, ExceptionCodes::PROJECT_CONFIGURATION_NOT_FOUND, $previous);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
<?php
|
|
||||||
/*
|
|
||||||
* Copyright (c) Nosial 2022-2023, all rights reserved.
|
|
||||||
*
|
|
||||||
* 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 NON-INFRINGEMENT. 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.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace ncc\Exceptions;
|
|
||||||
|
|
||||||
use Exception;
|
|
||||||
use ncc\Enums\ExceptionCodes;
|
|
||||||
use Throwable;
|
|
||||||
|
|
||||||
class UndefinedExecutionPolicyException extends Exception
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @param string $message
|
|
||||||
* @param Throwable|null $previous
|
|
||||||
*/
|
|
||||||
public function __construct(string $message = "", ?Throwable $previous = null)
|
|
||||||
{
|
|
||||||
parent::__construct($message, ExceptionCodes::UNDEFINED_EXECUTION_POLICY, $previous);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -29,7 +29,6 @@
|
||||||
use ncc\Enums\Options\InitializeProjectOptions;
|
use ncc\Enums\Options\InitializeProjectOptions;
|
||||||
use ncc\Classes\NccExtension\PackageCompiler;
|
use ncc\Classes\NccExtension\PackageCompiler;
|
||||||
use ncc\Exceptions\AccessDeniedException;
|
use ncc\Exceptions\AccessDeniedException;
|
||||||
use ncc\Exceptions\BuildConfigurationNotFoundException;
|
|
||||||
use ncc\Exceptions\BuildException;
|
use ncc\Exceptions\BuildException;
|
||||||
use ncc\Exceptions\ConfigurationException;
|
use ncc\Exceptions\ConfigurationException;
|
||||||
use ncc\Exceptions\IOException;
|
use ncc\Exceptions\IOException;
|
||||||
|
@ -37,7 +36,6 @@
|
||||||
use ncc\Exceptions\NotSupportedException;
|
use ncc\Exceptions\NotSupportedException;
|
||||||
use ncc\Exceptions\PathNotFoundException;
|
use ncc\Exceptions\PathNotFoundException;
|
||||||
use ncc\Exceptions\ProjectAlreadyExistsException;
|
use ncc\Exceptions\ProjectAlreadyExistsException;
|
||||||
use ncc\Exceptions\ProjectConfigurationNotFoundException;
|
|
||||||
use ncc\Objects\ProjectConfiguration;
|
use ncc\Objects\ProjectConfiguration;
|
||||||
use ncc\Objects\ProjectConfiguration\Compiler;
|
use ncc\Objects\ProjectConfiguration\Compiler;
|
||||||
use ncc\ThirdParty\Symfony\Uid\Uuid;
|
use ncc\ThirdParty\Symfony\Uid\Uuid;
|
||||||
|
@ -71,10 +69,10 @@
|
||||||
* Public Constructor
|
* Public Constructor
|
||||||
*
|
*
|
||||||
* @param string $path
|
* @param string $path
|
||||||
|
* @throws ConfigurationException
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* @throws MalformedJsonException
|
* @throws MalformedJsonException
|
||||||
* @throws PathNotFoundException
|
* @throws PathNotFoundException
|
||||||
* @throws ProjectConfigurationNotFoundException
|
|
||||||
*/
|
*/
|
||||||
public function __construct(string $path)
|
public function __construct(string $path)
|
||||||
{
|
{
|
||||||
|
@ -215,16 +213,16 @@
|
||||||
* Attempts to load the project configuration
|
* Attempts to load the project configuration
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
|
* @throws ConfigurationException
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* @throws MalformedJsonException
|
* @throws MalformedJsonException
|
||||||
* @throws PathNotFoundException
|
* @throws PathNotFoundException
|
||||||
* @throws ProjectConfigurationNotFoundException
|
|
||||||
*/
|
*/
|
||||||
public function load(): void
|
public function load(): void
|
||||||
{
|
{
|
||||||
if(!file_exists($this->project_file_path) && !is_file($this->project_file_path))
|
if(!file_exists($this->project_file_path) && !is_file($this->project_file_path))
|
||||||
{
|
{
|
||||||
throw new ProjectConfigurationNotFoundException('The project configuration file \'' . $this->project_file_path . '\' was not found');
|
throw new ConfigurationException('The project configuration file \'' . $this->project_file_path . '\' was not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->project_configuration = ProjectConfiguration::fromFile($this->project_file_path);
|
$this->project_configuration = ProjectConfiguration::fromFile($this->project_file_path);
|
||||||
|
@ -250,10 +248,10 @@
|
||||||
* Returns the ProjectConfiguration object
|
* Returns the ProjectConfiguration object
|
||||||
*
|
*
|
||||||
* @return ProjectConfiguration
|
* @return ProjectConfiguration
|
||||||
|
* @throws ConfigurationException
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* @throws MalformedJsonException
|
* @throws MalformedJsonException
|
||||||
* @throws PathNotFoundException
|
* @throws PathNotFoundException
|
||||||
* @throws ProjectConfigurationNotFoundException
|
|
||||||
*/
|
*/
|
||||||
public function getProjectConfiguration(): ProjectConfiguration
|
public function getProjectConfiguration(): ProjectConfiguration
|
||||||
{
|
{
|
||||||
|
@ -282,13 +280,12 @@
|
||||||
* @param string $build_configuration
|
* @param string $build_configuration
|
||||||
* @return string
|
* @return string
|
||||||
* @throws AccessDeniedException
|
* @throws AccessDeniedException
|
||||||
* @throws BuildConfigurationNotFoundException
|
|
||||||
* @throws BuildException
|
* @throws BuildException
|
||||||
|
* @throws ConfigurationException
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* @throws MalformedJsonException
|
* @throws MalformedJsonException
|
||||||
* @throws PathNotFoundException
|
|
||||||
* @throws ProjectConfigurationNotFoundException
|
|
||||||
* @throws NotSupportedException
|
* @throws NotSupportedException
|
||||||
|
* @throws PathNotFoundException
|
||||||
*/
|
*/
|
||||||
public function build(string $build_configuration=BuildConfigurationValues::DEFAULT): string
|
public function build(string $build_configuration=BuildConfigurationValues::DEFAULT): string
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,16 +26,11 @@
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use ncc\Enums\Options\BuildConfigurationValues;
|
use ncc\Enums\Options\BuildConfigurationValues;
|
||||||
use ncc\Exceptions\BuildConfigurationNotFoundException;
|
|
||||||
use ncc\Exceptions\ConfigurationException;
|
use ncc\Exceptions\ConfigurationException;
|
||||||
use ncc\Exceptions\InvalidConstantNameException;
|
|
||||||
use ncc\Exceptions\InvalidProjectBuildConfiguration;
|
|
||||||
use ncc\Exceptions\InvalidPropertyValueException;
|
|
||||||
use ncc\Exceptions\IOException;
|
use ncc\Exceptions\IOException;
|
||||||
use ncc\Exceptions\MalformedJsonException;
|
use ncc\Exceptions\MalformedJsonException;
|
||||||
|
use ncc\Exceptions\NotSupportedException;
|
||||||
use ncc\Exceptions\PathNotFoundException;
|
use ncc\Exceptions\PathNotFoundException;
|
||||||
use ncc\Exceptions\RuntimeException;
|
|
||||||
use ncc\Exceptions\UndefinedExecutionPolicyException;
|
|
||||||
use ncc\Interfaces\BytecodeObjectInterface;
|
use ncc\Interfaces\BytecodeObjectInterface;
|
||||||
use ncc\Objects\ProjectConfiguration\Assembly;
|
use ncc\Objects\ProjectConfiguration\Assembly;
|
||||||
use ncc\Objects\ProjectConfiguration\Build;
|
use ncc\Objects\ProjectConfiguration\Build;
|
||||||
|
@ -102,11 +97,8 @@
|
||||||
*
|
*
|
||||||
* @param bool $throw_exception
|
* @param bool $throw_exception
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws BuildConfigurationNotFoundException
|
|
||||||
* @throws ConfigurationException
|
* @throws ConfigurationException
|
||||||
* @throws InvalidPropertyValueException
|
* @throws NotSupportedException
|
||||||
* @throws RuntimeException
|
|
||||||
* @throws UndefinedExecutionPolicyException
|
|
||||||
*/
|
*/
|
||||||
public function validate(bool $throw_exception=True): bool
|
public function validate(bool $throw_exception=True): bool
|
||||||
{
|
{
|
||||||
|
@ -146,7 +138,7 @@
|
||||||
{
|
{
|
||||||
if($throw_exception)
|
if($throw_exception)
|
||||||
{
|
{
|
||||||
throw new UndefinedExecutionPolicyException(sprintf('Build configuration build.main uses an execution policy "%s" but no policies are defined', $this->build->main));
|
throw new ConfigurationException(sprintf('Build configuration build.main uses an execution policy "%s" but no policies are defined', $this->build->main));
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -167,7 +159,7 @@
|
||||||
{
|
{
|
||||||
if($throw_exception)
|
if($throw_exception)
|
||||||
{
|
{
|
||||||
throw new UndefinedExecutionPolicyException(sprintf('Build configuration build.main points to a undefined execution policy "%s"', $this->build->main));
|
throw new ConfigurationException(sprintf('Build configuration build.main points to a undefined execution policy "%s"', $this->build->main));
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -208,8 +200,7 @@
|
||||||
*
|
*
|
||||||
* @param string $build_configuration
|
* @param string $build_configuration
|
||||||
* @return array
|
* @return array
|
||||||
* @throws BuildConfigurationNotFoundException
|
* @throws ConfigurationException
|
||||||
* @throws UndefinedExecutionPolicyException
|
|
||||||
*/
|
*/
|
||||||
public function getRequiredExecutionPolicies(string $build_configuration=BuildConfigurationValues::DEFAULT): array
|
public function getRequiredExecutionPolicies(string $build_configuration=BuildConfigurationValues::DEFAULT): array
|
||||||
{
|
{
|
||||||
|
@ -244,7 +235,7 @@
|
||||||
{
|
{
|
||||||
if(!in_array($unit, $defined_polices, true))
|
if(!in_array($unit, $defined_polices, true))
|
||||||
{
|
{
|
||||||
throw new UndefinedExecutionPolicyException('The property \'' . $key . '\' in the project configuration calls for an undefined execution policy \'' . $unit . '\'');
|
throw new ConfigurationException('The property \'' . $key . '\' in the project configuration calls for an undefined execution policy \'' . $unit . '\'');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!in_array($unit, $required_policies, true))
|
if(!in_array($unit, $required_policies, true))
|
||||||
|
@ -261,7 +252,7 @@
|
||||||
{
|
{
|
||||||
if(!in_array($unit, $defined_polices, true))
|
if(!in_array($unit, $defined_polices, true))
|
||||||
{
|
{
|
||||||
throw new UndefinedExecutionPolicyException('The property \'build.pre_build\' in the project configuration calls for an undefined execution policy \'' . $unit . '\'');
|
throw new ConfigurationException('The property \'build.pre_build\' in the project configuration calls for an undefined execution policy \'' . $unit . '\'');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!in_array($unit, $required_policies, true))
|
if(!in_array($unit, $required_policies, true))
|
||||||
|
@ -277,7 +268,7 @@
|
||||||
{
|
{
|
||||||
if(!in_array($unit, $defined_polices, true))
|
if(!in_array($unit, $defined_polices, true))
|
||||||
{
|
{
|
||||||
throw new UndefinedExecutionPolicyException('The property \'build.pre_build\' in the project configuration calls for an undefined execution policy \'' . $unit . '\'');
|
throw new ConfigurationException('The property \'build.pre_build\' in the project configuration calls for an undefined execution policy \'' . $unit . '\'');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!in_array($unit, $required_policies, true))
|
if(!in_array($unit, $required_policies, true))
|
||||||
|
@ -328,7 +319,7 @@
|
||||||
{
|
{
|
||||||
if(!in_array($execution_policy?->exit_handlers->success->run, $defined_polices, true))
|
if(!in_array($execution_policy?->exit_handlers->success->run, $defined_polices, true))
|
||||||
{
|
{
|
||||||
throw new UndefinedExecutionPolicyException('The execution policy \'' . $execution_policy?->name . '\' Success exit handler points to a undefined execution policy \'' . $execution_policy?->exit_handlers->success->run . '\'');
|
throw new ConfigurationException('The execution policy \'' . $execution_policy?->name . '\' Success exit handler points to a undefined execution policy \'' . $execution_policy?->exit_handlers->success->run . '\'');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!in_array($execution_policy?->exit_handlers->success->run, $required_policies, true))
|
if(!in_array($execution_policy?->exit_handlers->success->run, $required_policies, true))
|
||||||
|
@ -341,7 +332,7 @@
|
||||||
{
|
{
|
||||||
if(!in_array($execution_policy?->exit_handlers->warning->run, $defined_polices, true))
|
if(!in_array($execution_policy?->exit_handlers->warning->run, $defined_polices, true))
|
||||||
{
|
{
|
||||||
throw new UndefinedExecutionPolicyException('The execution policy \'' . $execution_policy?->name . '\' Warning exit handler points to a undefined execution policy \'' . $execution_policy?->exit_handlers->warning->run . '\'');
|
throw new ConfigurationException('The execution policy \'' . $execution_policy?->name . '\' Warning exit handler points to a undefined execution policy \'' . $execution_policy?->exit_handlers->warning->run . '\'');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!in_array($execution_policy?->exit_handlers->warning->run, $required_policies, true))
|
if(!in_array($execution_policy?->exit_handlers->warning->run, $required_policies, true))
|
||||||
|
@ -354,7 +345,7 @@
|
||||||
{
|
{
|
||||||
if(!in_array($execution_policy?->exit_handlers->error->run, $defined_polices, true))
|
if(!in_array($execution_policy?->exit_handlers->error->run, $defined_polices, true))
|
||||||
{
|
{
|
||||||
throw new UndefinedExecutionPolicyException('The execution policy \'' . $execution_policy?->name . '\' Error exit handler points to a undefined execution policy \'' . $execution_policy?->exit_handlers->error->run . '\'');
|
throw new ConfigurationException('The execution policy \'' . $execution_policy?->name . '\' Error exit handler points to a undefined execution policy \'' . $execution_policy?->exit_handlers->error->run . '\'');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!in_array($execution_policy?->exit_handlers->error->run, $required_policies, true))
|
if(!in_array($execution_policy?->exit_handlers->error->run, $required_policies, true))
|
||||||
|
@ -407,7 +398,7 @@
|
||||||
* @param BuildConfiguration $configuration
|
* @param BuildConfiguration $configuration
|
||||||
* @param array $defined_polices
|
* @param array $defined_polices
|
||||||
* @return array
|
* @return array
|
||||||
* @throws UndefinedExecutionPolicyException
|
* @throws ConfigurationException
|
||||||
*/
|
*/
|
||||||
private function processBuildPolicies(BuildConfiguration $configuration, array $defined_polices): array
|
private function processBuildPolicies(BuildConfiguration $configuration, array $defined_polices): array
|
||||||
{
|
{
|
||||||
|
@ -419,7 +410,7 @@
|
||||||
{
|
{
|
||||||
if (!in_array($unit, $defined_polices, true))
|
if (!in_array($unit, $defined_polices, true))
|
||||||
{
|
{
|
||||||
throw new UndefinedExecutionPolicyException('The property \'pre_build\' in the build configuration \'' . $configuration->name . '\' calls for an undefined execution policy \'' . $unit . '\'');
|
throw new ConfigurationException(sprintf("The property 'pre_build' in the build configuration '%s' calls for an undefined execution policy '%s'", $configuration->name, $unit));
|
||||||
}
|
}
|
||||||
|
|
||||||
$required_policies[] = $unit;
|
$required_policies[] = $unit;
|
||||||
|
@ -432,7 +423,7 @@
|
||||||
{
|
{
|
||||||
if (!in_array($unit, $defined_polices, true))
|
if (!in_array($unit, $defined_polices, true))
|
||||||
{
|
{
|
||||||
throw new UndefinedExecutionPolicyException('The property \'pre_build\' in the build configuration \'' . $configuration->name . '\' calls for an undefined execution policy \'' . $unit . '\'');
|
throw new ConfigurationException(sprintf("The property 'post_build' in the build configuration '%s' calls for an undefined execution policy '%s'", $configuration->name, $unit));
|
||||||
}
|
}
|
||||||
|
|
||||||
$required_policies[] = $unit;
|
$required_policies[] = $unit;
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
namespace ncc\Objects\ProjectConfiguration;
|
namespace ncc\Objects\ProjectConfiguration;
|
||||||
|
|
||||||
use ncc\Enums\Options\BuildConfigurationValues;
|
use ncc\Enums\Options\BuildConfigurationValues;
|
||||||
use ncc\Exceptions\BuildConfigurationNotFoundException;
|
|
||||||
use ncc\Exceptions\ConfigurationException;
|
use ncc\Exceptions\ConfigurationException;
|
||||||
use ncc\Interfaces\BytecodeObjectInterface;
|
use ncc\Interfaces\BytecodeObjectInterface;
|
||||||
use ncc\Objects\ProjectConfiguration\Build\BuildConfiguration;
|
use ncc\Objects\ProjectConfiguration\Build\BuildConfiguration;
|
||||||
|
@ -170,7 +169,6 @@
|
||||||
*
|
*
|
||||||
* @param bool $throw_exception
|
* @param bool $throw_exception
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws BuildConfigurationNotFoundException
|
|
||||||
* @throws ConfigurationException
|
* @throws ConfigurationException
|
||||||
*/
|
*/
|
||||||
public function validate(bool $throw_exception=True): bool
|
public function validate(bool $throw_exception=True): bool
|
||||||
|
@ -256,7 +254,7 @@
|
||||||
*
|
*
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @return BuildConfiguration
|
* @return BuildConfiguration
|
||||||
* @throws BuildConfigurationNotFoundException
|
* @throws ConfigurationException
|
||||||
*/
|
*/
|
||||||
public function getBuildConfiguration(string $name): BuildConfiguration
|
public function getBuildConfiguration(string $name): BuildConfiguration
|
||||||
{
|
{
|
||||||
|
@ -273,7 +271,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new BuildConfigurationNotFoundException('The build configuration ' . $name . ' does not exist');
|
throw new ConfigurationException(sprintf('The build configuration "%s" does not exist', $name));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
use ncc\Enums\CompilerExtensions;
|
use ncc\Enums\CompilerExtensions;
|
||||||
use ncc\Enums\CompilerExtensionSupportedVersions;
|
use ncc\Enums\CompilerExtensionSupportedVersions;
|
||||||
use ncc\Exceptions\ConfigurationException;
|
use ncc\Exceptions\ConfigurationException;
|
||||||
use ncc\Exceptions\InvalidPropertyValueException;
|
|
||||||
use ncc\Exceptions\NotSupportedException;
|
use ncc\Exceptions\NotSupportedException;
|
||||||
use ncc\Interfaces\BytecodeObjectInterface;
|
use ncc\Interfaces\BytecodeObjectInterface;
|
||||||
use ncc\ThirdParty\jelix\Version\VersionComparator;
|
use ncc\ThirdParty\jelix\Version\VersionComparator;
|
||||||
|
@ -67,7 +66,6 @@
|
||||||
* @param bool $throw_exception
|
* @param bool $throw_exception
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws ConfigurationException
|
* @throws ConfigurationException
|
||||||
* @throws InvalidPropertyValueException
|
|
||||||
* @throws NotSupportedException
|
* @throws NotSupportedException
|
||||||
*/
|
*/
|
||||||
public function validate(bool $throw_exception=True): bool
|
public function validate(bool $throw_exception=True): bool
|
||||||
|
@ -76,7 +74,7 @@
|
||||||
{
|
{
|
||||||
if($throw_exception)
|
if($throw_exception)
|
||||||
{
|
{
|
||||||
throw new InvalidPropertyValueException('The property \'extension\' must not be null.');
|
throw new ConfigurationException('The property \'extension\' must not be null.');
|
||||||
}
|
}
|
||||||
|
|
||||||
return False;
|
return False;
|
||||||
|
@ -86,7 +84,7 @@
|
||||||
{
|
{
|
||||||
if($throw_exception)
|
if($throw_exception)
|
||||||
{
|
{
|
||||||
throw new InvalidPropertyValueException('The property \'minimum_version\' must not be null.');
|
throw new ConfigurationException('The property \'minimum_version\' must not be null.');
|
||||||
}
|
}
|
||||||
|
|
||||||
return False;
|
return False;
|
||||||
|
@ -96,7 +94,7 @@
|
||||||
{
|
{
|
||||||
if($throw_exception)
|
if($throw_exception)
|
||||||
{
|
{
|
||||||
throw new InvalidPropertyValueException('The property \'maximum_version\' must not be null.');
|
throw new ConfigurationException('The property \'maximum_version\' must not be null.');
|
||||||
}
|
}
|
||||||
|
|
||||||
return False;
|
return False;
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
|
|
||||||
namespace ncc\Objects\ProjectConfiguration;
|
namespace ncc\Objects\ProjectConfiguration;
|
||||||
|
|
||||||
use ncc\Exceptions\InvalidPropertyValueException;
|
use ncc\Exceptions\ConfigurationException;
|
||||||
use ncc\Exceptions\RuntimeException;
|
use ncc\Exceptions\NotSupportedException;
|
||||||
use ncc\Interfaces\BytecodeObjectInterface;
|
use ncc\Interfaces\BytecodeObjectInterface;
|
||||||
use ncc\Utilities\Functions;
|
use ncc\Utilities\Functions;
|
||||||
|
|
||||||
|
@ -64,8 +64,8 @@
|
||||||
*
|
*
|
||||||
* @param bool $throw_exception
|
* @param bool $throw_exception
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws InvalidPropertyValueException
|
* @throws ConfigurationException
|
||||||
* @throws RuntimeException
|
* @throws NotSupportedException
|
||||||
*/
|
*/
|
||||||
public function validate(bool $throw_exception=True): bool
|
public function validate(bool $throw_exception=True): bool
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue