Comments (4)
Could you paste code to reproduce issue?
from crunz.
Apologies, the following should reproduce the issue.
$schedule = new Schedule();
$schedule->run(
'/some/path/to/a/command',
['--someflag' => true]
)
...
The fatal error occurs when a boolean is passed instead of an expected string value. A solution would be to pass the boolean as a string (e.g. 'true'
) for the parameter, however this doesn't solve the problem of ambiguous typecasting in ProcessUtils if a non-string value is passed ... which now throws a fatal error in PHP 8.x. In ProcessUtils you may wish to add more type checking before passing parameters to native functions like str_replace.
from crunz.
Looks like Crunz tried to support ['--option' => 'value']
, but it doesn't work like that in Process (https://symfony.com/doc/current/components/process.html) and this behavior (non-list array) should be deprecated, also \Crunz\Schedule::run
method has docblock with @param string[] $parameters
which clearly expects list of string values.
If you really want (do you?) I can convert boolean values to string 1
and 0
for now, but v3.3
will deprecate passing non-list arrays.
from crunz.
OK, thanks for the information. I will close the issue since the behavior is being deprecated.
from crunz.
Related Issues (20)
- Running task in sequence HOT 2
- [BUG] everyTwoMinutes always run HOT 2
- Non-numeric identifier for run individual task HOT 10
- Documentation: RetryTillSaveStore has been removed from Symfony/lock HOT 1
- New Feature: onOneServer HOT 9
- Provide information about the file events were sourced from in schedule:list HOT 1
- Allow adding of an error callback to a Task HOT 1
- Any way to delete a php script task file after its execution HOT 2
- Multiple Schedule objects from one task-file HOT 5
- Is it possible to execute crunz within PHP? HOT 4
- Configure the temporary directory instead of using \sys_get_temp_dir()
- Getter for from, to task's parameters HOT 1
- New log format
- Task Life Time functions don't respect the timezone HOT 3
- Task activity status HOT 6
- how to set errors_log_file and output_log_file to save relative to the project. HOT 2
- Support for Symfony 7 HOT 4
- Tasks do not run after upgrade to latest version HOT 1
- Realtime output HOT 2
- Source calculation issues when running CLI commands from code HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crunz.