-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed singleton configuration (#92)
* Added namespace for tests. * Added missing @php to reference same php bin. * Specify returned type. * Added FileParser class to parse config file. * Added bootstrap.php file to bootstrap test. * Added property-access component. * Added NonSingletonConfiguration to replace existing configuration based on singleton pattern. * Added Task Collection. * Make config directory path OS-independent. * Rename Crunz\Console\CommandKernel to Crunz\Application. * Put envvar CRUNZ_BASE_DIR in test env. * Use non static configuration. * Added var-dumper. * Use task collection in ScheduleRun command, * Cache composer's files in CI. * Disable xdebug in CI. * Use NonSingleton configuration in schedule:run command. * Removed finder dependency from schedule:run command. * Do not use singleton configuration in TaskGenerator command. * Use functions from global namespace. * Added some tests to Invoker. * Register Invoker service. * Use injected EventRunner instead of created in-place. * Remove configurable trait. * Make logger factory non static and remove trait with configuration. * Removed singleton configuration. * Rename configuration class. * Rename and CS fix. * Removed Singleton class. * Make setting answer portable. * Replace symfony polyfills for PHP below 5.6.
- Loading branch information
1 parent
a399306
commit 8ac4170
Showing
34 changed files
with
967 additions
and
482 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
require_once __DIR__ . '/vendor/autoload.php'; | ||
|
||
$testCrunzRoot = \implode( | ||
DIRECTORY_SEPARATOR, | ||
[ | ||
__DIR__, | ||
'tests' | ||
] | ||
); | ||
|
||
\define('CRUNZ_ROOT', $testCrunzRoot); | ||
\putenv('CRUNZ_BASE_DIR=' . $testCrunzRoot); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
namespace Crunz\Configuration; | ||
|
||
use Crunz\Exception\CrunzException; | ||
|
||
class ConfigFileNotExistsExtension extends CrunzException | ||
{ | ||
/** | ||
* @param string $filePath | ||
* | ||
* @return ConfigFileNotExistsExtension | ||
*/ | ||
public static function fromFilePath($filePath) | ||
{ | ||
return new self("Configuration file '{$filePath}' not exists."); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
namespace Crunz\Configuration; | ||
|
||
use Crunz\Exception\CrunzException; | ||
|
||
class ConfigFileNotReadableException extends CrunzException | ||
{ | ||
/** | ||
* @param string $filePath | ||
* | ||
* @return ConfigFileNotReadableException | ||
*/ | ||
public static function fromFilePath($filePath) | ||
{ | ||
return new self("Config file '{$filePath}' is not readable."); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.