- Distribute static binaries
castor.darwin-arm64
automatically with the release - Add support for running Castor on Linux arm64 and distribute the binary
castor.linux-arm64.phar
automatically with the release - Add a bash installer to ease installation
- Add support for importing remote functions and tasks
- Add an option
ignoreValidationErrors
onAsTask
attribute to ignore parameters & options validation errors - Add support for dynamic autocomplete task arguments/options
- Add support for merging an application
box.json
config file used bycastor:repack
command - Find root directory by looking for a
.castor/castor.php
file - Allow stub file to be in
.castor/.castor.stub.php
- Deprecate loading all PHP files from
[ROOT_DIR]/castor
- Deprecate
Context::withPath()
in favor ofContext::withWorkingDirectory()
- Deprecate
path
argument incapture()
,exit_code()
,run()
,with()
in favor ofworkingDirectory
- Deprecate
Castor\TaskDescriptorCollection
in favor ofCastor\Descriptor\TaskDescriptorCollection
- Add a
yaml_dump()
function to dump any PHP value to a YAML string - Add a
yaml_parse()
function to parse a YAML string to a PHP value - Remove the default timeout of 60 seconds from the Context
- Add a
recursive
parameter to thewithData()
method ofContext
to allow recursive merging for nested arrays - Add an
open()
function to open a file or URL in the default application - Add
bool
return type tofingerprint()
function to indicate if the callable was run
- Fix instruction for downloading new castor version as a phar
- Add a
compile
command that puts together a customizable PHP binary with a repacked castor app into a static binary - Distribute static binaries
castor.linux.amd64
andcastor.darwin.amd64
automatically with the release - Compile watcher and phar for arm64 on macOS, and distribute them with the release
- Add
ProcessStartEvent
andProcessTerminateEvent
events - Allow to listen to the symfony console events
- Set the process title according to the current application name and task name
- Deprecates
add_context()
function, useAsContextGenerator
attribute instead - Allow to get null instead of throwing an exception when calling
task(true)
without a current task - Ignore some low level env vars in runnable command showed in logs
- Fix section output to work on Windows
- Fix issue with symfony console (color doesn't work in tmux or screen)
- Add a
debug
command - Add
guard_min_version()
function to ensure a minimum version of Castor is used - Add
wait_for_http_response()
function for a more generic response check - Add
wait_for_docker_container()
function to wait for a docker container to be ready - Add
AsSymfonyTask
attribute to map Symfony Command - Add
Context->name
property (automatically set by the application) - Add an error handler, and wire the logger to it so display deprecation notices
- Edited the duration of update check from
60 days
to24 hours
- Revise the usage of the terms
command
andtask
for consistency through code and docs. - [BC Break] Remove
callable $responseChecker
parameter fromwait_for_http_status()
- [BC Break] The event
AfterApplicationInitializationEvent
second arguments is now aTaskDescriptorCollection
, and the event is emitted after the context configuration
- Fix issue when using
ContextRegistry::getCurrentContext()
without setting first a context - Calling
ContextRegistry::getCurrentContext()
withoutsetCurrentContext()
is deprecated. Pass a$context
instead to the function, or set a current context before.
- Add
AsListener
attribute to register an event listener - Add
wait_for()
,wait_for_port()
,wait_for_url()
,wait_for_http_status()
functions - Allow to override
AsTask
andAsContext
attributes - Add
force
argument tofingerprint()
method to force run the callable, even if fingerprint is same - Fix directory for fingerprinted test
- [BC Break] Remove almost all setters in the GlobalHelper class
- Refactor the documentation
- Add
ssh_upload()
andssh_download()
functions to upload/download files via SSH - Rename
ssh()
tossh_run()
- Allow to set default context with an env variable
- Fix castor application version
- Fix typo in
run()
error message
- Add
fingerprint()
function to condition code execution based on some hash changes - Better handle default Symfony commands when no castor file exists yet
- Add
-c
option tocastor
command to specify a context
- Add
request()
andhttp_client()
functions to make HTTP requests - Add support for disabling task dynamically
- Add a
with
function to run logic with a specific context or parameters without passing them to eachrun
or other functions - Allow to get a context by its name using
$fooContext = context('foo')
- Experimental display with sections, allow better output when using parallel
function, enable it by by using
CASTOR_USE_SECTION=true castor [task]
- Display more information when running a process
- Rename
get_exit_code()
toexit_code()
- Rename
get_context()
tocontext()
- Rename
get_input()
toinput()
- Rename
get_output()
tooutput()
- Rename
get_application()
toapp()
- Rename
get_command()
totask()
- Fix parallel when one of the callback fails, wait for the others to finish to throw exception
- Fix the
castor --version
command when there is no.castor.php
file
- Add support for re-packing a castor application into a new phar file
- Fix the update command message to follow redirects with curl
- Add support for registering
Context
programmatically - Add
load_dot_env()
function for loading the context's environment from a dotenv file - Add support for multiple paths in
watch()
function - Add
get_exit_code()
function to get a process exit code, even if it failed
- Add documentation about installation in a Github Action
- Add more classes in stubs
- Fix curl download in installation instructions
- Fix code on initial castor.php creation
- Do not remove annotation from phar
- Add support for signals handling
- Add a way to type Context::$data
- Allow to use the cache in the context creator
- Add
onFailure
argument to thecapture()
function - Add
ExecutableFinder
in stubs
- [BC Break] replace specials helpers arguments by dedicated functions
- Add
capture()
function to easily run a process and returns the output - Add
cache()
andget_cache()
function to easily cache something - Add
ssh()
function to run commands on remote server via SSH - Display warning and update instructions when a new version is available
- Better error reporting when a call to
run()
fails or whenimport()
is not possible - Fix stubs generation
- Enhance the documentation
- Enhance the first run experience
- Add a way to get the
Command
instance in a task - Add support for better handling of option without value
- Fix the stubs generation when castor is installed via composer
- Fix the initial
castor.php
file generated for new projects - Fix
watch()
function
- Initial release