You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Changes
#190 Update quality stack: use Rector withComposerBased() sets (removed SYMFONY_64 / PHPUNIT_100 sets), declare used Symfony packages and PHPUnit range in composer.json, apply quality tools fixes
#145 Add missing documentations: reference pages for every Task & Transformer, ConditionTrait & GenericTransformer, complete guides and cookbooks. Harmonize and fix existing documentation.
#229 StatCounterTask and AdvancedStatCounterTask pass their input to their output on every execution (they used to output null, and AdvancedStatCounterTask was skipped when not logging), so they can be placed anywhere in a branch. Update documentation, add tests.
#236 TransformerTrait: document that any non-empty #suffix is accepted on transformer codes (callback#1, callback#reverse), and anchor the matching regex (an empty suffix is no longer accepted). Update documentation, add tests.
Fixes
#192 Fix CommandRunnerTask: only pass the options option to Process::setOptions(), support string commandline through Process::fromShellCommandline(), validate option types. Update documentation, add tests.
#194 Fix ProcessLauncherTask: the process_options normalizer returned an array despite its scalar return type, so the task always failed with a TypeError. Update documentation, add tests.
#189 Fix EventDispatcherTask: dispatch the event under the event_name option (regression since v4.0). event_name is now optional: when null (default), the event is dispatched under its class name. Update documentation, add tests.
#198 Fix DateParserTransformer: a \DateTimeImmutable input is converted to a \DateTime instead of throwing a TypeError. Update documentation, add tests.
#199 Fix PregFilterTransformer: an array replacement is no longer cast to the string "Array", and requires an array pattern. Update documentation, add tests.
#200 Fix GenericTransformer: a contextual option declared with required: false and no default can now be used; its placeholders are replaced by null when omitted. Update documentation, add tests.
#202 Fix XmlReaderTask: throw an explicit \UnexpectedValueException on an empty file or invalid XML (with the libxml error messages) instead of a ValueError or a silent empty \DOMDocument. Update documentation, add tests.
#203 Fix ProcessState::addErrorContextValue(): accept any value type, so that iterable tasks on an empty iterable are skipped and PropertySetterTask reports the original exception instead of a TypeError. Update documentation, add tests.
#204 Fix CachedTransformer, SlugifyTransformer and TypeSetterTransformer edge cases: accept a non-string input in cached (key built after key_transformers), reject an invalid transliterator in slugify with an InvalidOptionsException, remove the unreachable error branch of type_setter. Update documentation, add tests.
#205 Fix FileSplitterTask: produced files lost the first line, doubled line breaks and ended with an empty file; each file now contains exactly max_lines lines of the source. Update documentation, add tests.
#206 Fix AdvancedStatCounterTask, IterableBatchTask, ConditionTrait and ColumnAggregatorTask edge cases: log the first counted execution with correct counts, accept a nullbatch_count (only flush at the end), allow scalar inputs in conditions ('' path on the whole value), aggregate null column values. Update documentation, add tests.
#207 Fix JsonStreamReaderTask / JsonStreamWriterTask: throw an explicit \UnexpectedValueException when a line decodes to a scalar, create the missing parent directory when writing. Update documentation, add tests.
#208 Fix FolderBrowserTask, InputFolderBrowserTask, CsvReaderTask and LineReaderTask (and their Input* variants): reset the state at the end of the iteration, so that a following input is read from its beginning. Update documentation, add tests.
#201 Fix minor defects: error messages of TransformerTrait, RulesTransformer and ExpressionLanguageMapTransformer, useless setRequired() in ImplodeTransformer and SprintfTransformer, stray namespace in TrimTransformer, wrong or missing docblocks. Add tests.
#220 Fix the stop error strategy: throw a ProcessFailedException (with the original exception as previous) instead of a FatalError, so that the command exits with a non-zero code when a process fails and ProcessLauncherTask detects failed sub-processes. Update documentation, add tests.
#221 Fix CsvSplitterTask: each produced file contains max_lines data lines (instead of max_lines - 2), no infinite loop with max_lines <= 2 (max_lines must now be an integer greater than 0), no header-only file at the end. Update documentation, add tests.
#223 Fix CounterTask: the final count is outputted once, as flush() may be called several times. Document that flush() implementations must be idempotent. Update documentation, add tests.
#228 Add the missing setAllowedTypes() on HashTransformer (raw_output), SimpleBatchTask (batch_count), ConditionTrait (empty, not_empty), NormalizerTask / SerializerTask / DeserializerTask (context) and ObjectUpdaterTask (property_path): a wrong type is now reported when the options are resolved. Add tests.
#232 Fix edge cases looping forever or failing with a TypeError: validate FileSplitterTask max_lines (greater than 0, also when given as input), catch any \Throwable in PropertySetterTask, type SlugifyTransformer options, explicit exceptions in InputFolderBrowserTask (no folder path) and XmlFile::write() (saveXML() failure). Update documentation, add tests.
Deprecated
#189 EventDispatcherTask: when event_name is set, listening to CleverAge\ProcessBundle\Event\EventDispatcherTaskEvent is deprecated (the event is still dispatched under its class name, with an E_USER_DEPRECATED error, if it has listeners). Listen to the configured event_name instead: the BC layer will be removed in v6.0.
#222 ProcessManager: going on with the process after an exception thrown by a task initialize() is deprecated (an E_USER_DEPRECATED error is triggered). In v6.0, the process will fail before executing any task.