-
Notifications
You must be signed in to change notification settings - Fork 0
/
.castor.stub.php
3972 lines (3899 loc) · 124 KB
/
.castor.stub.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
// castor version: v0.17.1
// This file has been generated by castor. Do not edit it manually.
// It helps IDEs to provide better autocompletion and analysis.
// You can safely ignore this file in your VCS.
// ".castor.stub.php" by default is in the same location of "castor.php".
// You can also move this file at the root of your project or to ".castor/.castor.stub.php".
namespace Castor\Attribute;
#[\Attribute(\Attribute::TARGET_PARAMETER)]
class AsArgument extends AsCommandArgument
{
/**
* @param array<string> $suggestedValues
* @param mixed|callable(CompletionInput): array<string> $autocomplete
*/
public function __construct(?string $name = null, public readonly string $description = '', public readonly array $suggestedValues = [], public readonly mixed $autocomplete = null)
{
}
}
namespace Castor\Attribute;
abstract class AsCommandArgument
{
public function __construct(public readonly ?string $name = null)
{
}
}
namespace Castor\Attribute;
#[\Attribute(\Attribute::TARGET_FUNCTION)]
class AsContext
{
public function __construct(public string $name = '', public bool $default = false)
{
}
}
namespace Castor\Attribute;
#[\Attribute(\Attribute::TARGET_FUNCTION)]
class AsContextGenerator
{
}
namespace Castor\Attribute;
#[\Attribute(\Attribute::TARGET_FUNCTION | \Attribute::IS_REPEATABLE)]
class AsListener
{
public function __construct(public readonly string $event, public readonly int $priority = 0)
{
}
}
namespace Castor\Attribute;
#[\Attribute(\Attribute::TARGET_PARAMETER)]
class AsOption extends AsCommandArgument
{
/**
* @param string|array<string>|null $shortcut
* @param array<string> $suggestedValues
* @param mixed|callable(CompletionInput): array<string> $autocomplete
*/
public function __construct(?string $name = null, public readonly string|array|null $shortcut = null, public readonly ?int $mode = null, public readonly string $description = '', public readonly array $suggestedValues = [], public readonly mixed $autocomplete = null)
{
}
}
namespace Castor\Attribute;
#[\Attribute(\Attribute::TARGET_PARAMETER)]
class AsRawTokens
{
}
namespace Castor\Attribute;
#[\Attribute(\Attribute::TARGET_CLASS)]
class AsSymfonyTask
{
/**
* @param string[] $console How to start the Symfony application
*/
public function __construct(public ?string $name = null, public ?string $originalName = null, public readonly array $console = [\PHP_BINARY, 'bin/console'])
{
}
}
namespace Castor\Attribute;
#[\Attribute(\Attribute::TARGET_FUNCTION)]
class AsTask
{
/**
* @param array<string> $aliases
* @param array<int, callable(int): (int|false)> $onSignals
*/
public function __construct(public string $name = '', public ?string $namespace = null, public string $description = '', public array $aliases = [], public array $onSignals = [], public string|bool $enabled = true, public bool $ignoreValidationErrors = false)
{
}
}
namespace Castor\Console\Output;
class SectionDetails
{
public function __construct(public \Symfony\Component\Console\Output\ConsoleSectionOutput $section, public \Symfony\Component\Console\Output\ConsoleSectionOutput $progressBarSection, public float $start, public string $index)
{
}
}
namespace Castor\Console\Output;
enum VerbosityLevel : int
{
case NOT_CONFIGURED = -1;
case QUIET = 0;
case NORMAL = 1;
case VERBOSE = 2;
case VERY_VERBOSE = 3;
case DEBUG = 4;
public static function fromSymfonyOutput(\Symfony\Component\Console\Output\OutputInterface $output) : self
{
}
public function isNotConfigured() : bool
{
}
public function isQuiet() : bool
{
}
public function isVerbose() : bool
{
}
public function isVeryVerbose() : bool
{
}
public function isDebug() : bool
{
}
}
namespace Castor;
#[\Symfony\Component\DependencyInjection\Attribute\Exclude]
class Context implements \ArrayAccess
{
public readonly string $workingDirectory;
/**
* @phpstan-param ContextData $data The input parameter accepts an array or an Object
*
* @param array<string, string|\Stringable|int> $environment A list of environment variables to add to the task
*/
public function __construct(public readonly array $data = [], public readonly array $environment = [], ?string $workingDirectory = null, public readonly bool $tty = false, public readonly bool $pty = true, public readonly ?float $timeout = null, public readonly bool $quiet = false, public readonly bool $allowFailure = false, public readonly ?bool $notify = null, public readonly \Castor\Console\Output\VerbosityLevel|\Castor\VerbosityLevel $verbosityLevel = \Castor\Console\Output\VerbosityLevel::NOT_CONFIGURED, public readonly string $name = '', public readonly string $notificationTitle = '')
{
}
public function __debugInfo()
{
}
/**
* @param array<(int|string), mixed> $data
*
* @throws \Exception
*/
public function withData(array $data, bool $keepExisting = true, bool $recursive = true) : self
{
}
/** @param array<string, string|\Stringable|int> $environment */
public function withEnvironment(array $environment, bool $keepExisting = true) : self
{
}
public function withPath(string $path) : self
{
}
public function withWorkingDirectory(string $workingDirectory) : self
{
}
public function withTty(bool $tty = true) : self
{
}
public function withPty(bool $pty = true) : self
{
}
public function withTimeout(?float $timeout) : self
{
}
public function withQuiet(bool $quiet = true) : self
{
}
public function withAllowFailure(bool $allowFailure = true) : self
{
}
public function withNotify(?bool $notify = true) : self
{
}
public function withVerbosityLevel(\Castor\Console\Output\VerbosityLevel|\Castor\VerbosityLevel $verbosityLevel) : self
{
}
public function withName(string $name) : self
{
}
public function withNotificationTitle(string $notificationTitle) : self
{
}
public function offsetExists(mixed $offset) : bool
{
}
public function offsetGet(mixed $offset) : mixed
{
}
public function offsetSet(mixed $offset, mixed $value) : void
{
}
public function offsetUnset(mixed $offset) : void
{
}
/**
* @param array<(int|string), mixed> $array1
* @param array<(int|string), mixed> $array2
*
* @return array<(int|string), mixed>
*/
private function arrayMergeRecursiveDistinct(array $array1, array $array2) : array
{
}
}
namespace Castor\Descriptor;
final class DescriptorsCollection
{
/**
* @param list<ContextDescriptor> $contextDescriptors
* @param list<ContextGeneratorDescriptor> $contextGeneratorDescriptors
* @param list<ListenerDescriptor> $listenerDescriptors
* @param list<TaskDescriptor> $taskDescriptors
* @param list<SymfonyTaskDescriptor> $symfonyTaskDescriptors
*/
public function __construct(public readonly array $contextDescriptors, public readonly array $contextGeneratorDescriptors, public readonly array $listenerDescriptors, public readonly array $taskDescriptors, public readonly array $symfonyTaskDescriptors)
{
}
}
namespace Castor\Descriptor;
class SymfonyTaskDescriptor
{
/**
* @param mixed[] $definition
*/
public function __construct(public readonly \Castor\Attribute\AsSymfonyTask $taskAttribute, public readonly \ReflectionClass $function, public readonly array $definition)
{
}
}
namespace Castor\Descriptor;
class TaskDescriptor
{
public function __construct(public readonly \Castor\Attribute\AsTask $taskAttribute, public readonly \ReflectionFunction $function, public ?string $workingDirectory = null)
{
}
}
namespace Castor\Descriptor;
trigger_deprecation('castor', '0.16', 'The "%s" class is deprecated, use "%s" instead.', TaskDescriptorCollection::class, DescriptorsCollection::class);
/**
* @deprecated since Castor 0.16, use DescriptorsCollection instead
*/
class TaskDescriptorCollection
{
/**
* @param list<TaskDescriptor> $taskDescriptors
* @param list<SymfonyTaskDescriptor> $symfonyTaskDescriptors
*/
public function __construct(public readonly array $taskDescriptors = [], public readonly array $symfonyTaskDescriptors = [])
{
}
}
namespace Castor\Event;
/**
* @deprecated since Castor 0.16, use FunctionsResolvedEvent instead
*/
class AfterApplicationInitializationEvent extends \Symfony\Contracts\EventDispatcher\Event
{
public function __construct(public readonly \Castor\Console\Application $application, public \Castor\Descriptor\TaskDescriptorCollection $taskDescriptorCollection)
{
}
}
namespace Castor\Event;
class AfterBootEvent extends \Symfony\Contracts\EventDispatcher\Event
{
public function __construct(public readonly \Castor\Console\Application $application)
{
}
}
namespace Castor\Event;
class AfterExecuteTaskEvent extends \Symfony\Contracts\EventDispatcher\Event
{
public function __construct(public readonly \Castor\Console\Command\TaskCommand $task, public readonly mixed $result)
{
}
}
namespace Castor\Event;
class BeforeExecuteTaskEvent extends \Symfony\Contracts\EventDispatcher\Event
{
public function __construct(public readonly \Castor\Console\Command\TaskCommand $task)
{
}
}
namespace Castor\Event;
class FunctionsResolvedEvent extends \Symfony\Contracts\EventDispatcher\Event
{
/**
* @param list<TaskDescriptor> $taskDescriptors
* @param list<SymfonyTaskDescriptor> $symfonyTaskDescriptors
*/
public function __construct(public array $taskDescriptors, public array $symfonyTaskDescriptors)
{
}
}
namespace Castor\Event;
class ProcessCreatedEvent extends \Symfony\Contracts\EventDispatcher\Event
{
public function __construct(public readonly \Symfony\Component\Process\Process $process)
{
}
}
namespace Castor\Event;
class ProcessStartEvent extends \Symfony\Contracts\EventDispatcher\Event
{
public function __construct(public readonly \Symfony\Component\Process\Process $process)
{
}
}
namespace Castor\Event;
class ProcessTerminateEvent extends \Symfony\Contracts\EventDispatcher\Event
{
public function __construct(public readonly \Symfony\Component\Process\Process $process)
{
}
}
namespace Castor;
#[\Symfony\Component\DependencyInjection\Attribute\AsDecorator(\Symfony\Component\EventDispatcher\EventDispatcherInterface::class)]
class EventDispatcher implements \Symfony\Component\EventDispatcher\EventDispatcherInterface
{
public function __construct(private \Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher = new \Symfony\Component\EventDispatcher\EventDispatcher(), private \Psr\Log\LoggerInterface $logger = new \Psr\Log\NullLogger())
{
}
public function dispatch(object $event, ?string $eventName = null) : object
{
}
/**
* @param callable $listener
*/
public function addListener(string $eventName, $listener, int $priority = 0) : void
{
}
public function removeListener(string $eventName, callable $listener) : void
{
}
public function addSubscriber(\Symfony\Component\EventDispatcher\EventSubscriberInterface $subscriber) : void
{
}
public function removeSubscriber(\Symfony\Component\EventDispatcher\EventSubscriberInterface $subscriber) : void
{
}
public function getListeners(?string $eventName = null) : array
{
}
public function getListenerPriority(string $eventName, callable $listener) : ?int
{
}
public function hasListeners(?string $eventName = null) : bool
{
}
}
namespace Castor\Exception;
class CouldNotFindEntrypointException extends \RuntimeException
{
public function __construct(string $message = 'Could not find root "castor.php" or ".castor/castor.php" file.', ?\Throwable $previous = null)
{
}
}
namespace Castor\Exception;
class ExecutableNotFoundException extends \RuntimeException
{
public function __construct(readonly string $executableName)
{
}
}
namespace Castor\Exception;
class FunctionConfigurationException extends \InvalidArgumentException
{
public function __construct(string $message, \ReflectionFunction|\ReflectionClass $function, ?\Throwable $e = null)
{
}
}
namespace Castor\Exception;
class MinimumVersionRequirementNotMetException extends \RuntimeException
{
public function __construct(readonly string $requiredVersion, readonly string $currentVersion)
{
}
}
namespace Castor\Exception\WaitFor;
class DockerContainerStateException extends \RuntimeException
{
public function __construct(readonly string $containerName, readonly string $state)
{
}
}
namespace Castor\Exception\WaitFor;
class ExitedBeforeTimeoutException extends \RuntimeException
{
public function __construct(string $message = 'Callback check returned null, exiting before timeout.')
{
}
}
namespace Castor\Exception\WaitFor;
class TimeoutReachedException extends \Exception
{
public function __construct(int $timeout)
{
}
}
namespace Castor;
class ExpressionLanguage extends \Symfony\Component\ExpressionLanguage\ExpressionLanguage
{
public function __construct(private readonly ContextRegistry $contextRegistry)
{
}
}
namespace Castor\Factory;
class TaskCommandFactory
{
public function __construct(private readonly \Castor\ExpressionLanguage $expressionLanguage, private readonly \Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher, private readonly \Castor\ContextRegistry $contextRegistry, private readonly \Castor\Helper\Slugger $slugger)
{
}
public function createTask(\Castor\Descriptor\TaskDescriptor $taskDescriptor) : \Castor\Console\Command\TaskCommand
{
}
}
namespace Castor\Fingerprint;
enum FileHashStrategy
{
case Content;
case MTimes;
}
namespace Castor;
trigger_deprecation('castor/castor', '0.16', 'The "%s" class is deprecated and will be removed in castor 1.0. Use the "%s::getContainer()" instead.', __CLASS__, \Castor\Console\Application::class);
#[\Symfony\Component\DependencyInjection\Attribute\Exclude]
class GlobalHelper
{
public static function setApplication(\Castor\Console\Application $application) : void
{
}
public static function getApplication() : \Castor\Console\Application
{
}
public static function getContextRegistry() : ContextRegistry
{
}
public static function getEventDispatcher() : \Symfony\Component\EventDispatcher\EventDispatcherInterface
{
}
public static function getFilesystem() : \Symfony\Component\Filesystem\Filesystem
{
}
public static function getHttpClient() : \Symfony\Contracts\HttpClient\HttpClientInterface
{
}
public static function getCache() : \Psr\Cache\CacheItemPoolInterface&\Symfony\Contracts\Cache\CacheInterface
{
}
public static function getLogger() : \Psr\Log\LoggerInterface
{
}
public static function getInput() : \Symfony\Component\Console\Input\InputInterface
{
}
public static function getSectionOutput() : \Castor\Console\Output\SectionOutput
{
}
public static function getOutput() : \Symfony\Component\Console\Output\OutputInterface
{
}
public static function getSymfonyStyle() : \Symfony\Component\Console\Style\SymfonyStyle
{
}
/**
* @return ($allowNull is true ? ?Command : Command)
*/
public static function getCommand(bool $allowNull = false) : ?\Symfony\Component\Console\Command\Command
{
}
public static function getContext(?string $name = null) : Context
{
}
public static function getVariable(string $key, mixed $default = null) : mixed
{
}
}
namespace Castor;
trigger_deprecation('castor', '0.15', 'The "%s" class is deprecated, use "%s" instead.', HasherHelper::class, \Castor\Helper\HasherHelper::class);
/**
* @deprecated since castor/castor 0.15, use Castor\Helper\HasherHelper instead.
*/
#[\Symfony\Component\DependencyInjection\Attribute\Exclude]
class HasherHelper extends \Castor\Helper\HasherHelper
{
}
namespace Castor\Helper;
/** @final */
#[\Symfony\Component\DependencyInjection\Attribute\Exclude]
class HasherHelper
{
private readonly \HashContext $hashContext;
/**
* @see https://www.php.net/manual/en/function.hash-algos.php
*/
public function __construct(private readonly \Symfony\Component\Console\Command\Command $command, private readonly \Symfony\Component\Console\Input\InputInterface $input, private readonly \Psr\Log\LoggerInterface $logger = new \Psr\Log\NullLogger(), string $algo = 'xxh128')
{
}
public function write(string $value) : self
{
}
public function writeFile(string $path, \Castor\Fingerprint\FileHashStrategy $strategy = \Castor\Fingerprint\FileHashStrategy::MTimes) : self
{
}
public function writeWithFinder(\Symfony\Component\Finder\Finder $finder, \Castor\Fingerprint\FileHashStrategy $strategy = \Castor\Fingerprint\FileHashStrategy::MTimes) : self
{
}
public function writeGlob(string $pattern, \Castor\Fingerprint\FileHashStrategy $strategy = \Castor\Fingerprint\FileHashStrategy::MTimes) : self
{
}
public function writeTaskName() : self
{
}
public function writeTaskArgs(string ...$args) : self
{
}
public function writeTask(string ...$args) : self
{
}
public function finish() : string
{
}
}
namespace Castor\Helper;
class Notifier
{
public function __construct(private \Joli\JoliNotif\DefaultNotifier $notifier, private \Psr\Log\LoggerInterface $logger, private \Castor\ContextRegistry $contextRegistry)
{
}
public function send(string $message, ?string $title = null) : void
{
}
private function getNotifyTitle() : string
{
}
}
namespace Castor\Helper;
/** @final */
#[\Symfony\Component\DependencyInjection\Attribute\Exclude]
class PathHelper
{
public static function getCastorVendorDir() : string
{
}
public static function getRoot() : string
{
}
public static function realpath(string $path) : string
{
}
public static function makeRelative(string $path) : string
{
}
}
namespace Castor\Import\Exception;
class ComposerError extends ImportError
{
}
namespace Castor\Import\Exception;
class ImportError extends \RuntimeException
{
}
namespace Castor\Import\Exception;
class InvalidImportFormat extends ImportError
{
}
namespace Castor\Import\Exception;
class RemoteNotAllowed extends \RuntimeException
{
}
namespace Castor\Listener;
class ConfigureCastorListener
{
public function __construct(private readonly \Symfony\Component\ErrorHandler\ErrorHandler $errorHandler, private readonly \Symfony\Component\Console\Output\OutputInterface $output, private readonly \Psr\Log\LoggerInterface $logger = new \Psr\Log\NullLogger())
{
}
#[\Symfony\Component\EventDispatcher\Attribute\AsEventListener]
public function configureCastor(\Castor\Event\BeforeBootEvent $event) : void
{
}
}
namespace Castor\Listener;
class GenerateStubsListener
{
public function __construct(private readonly \Castor\Stub\StubsGenerator $stubsGenerator, #[\Symfony\Component\DependencyInjection\Attribute\Autowire('%repacked%')] private readonly bool $repacked)
{
}
#[\Symfony\Component\EventDispatcher\Attribute\AsEventListener]
public function generateStubs(\Symfony\Component\Console\Event\ConsoleCommandEvent $event) : void
{
}
}
namespace Castor\Listener;
class UpdateCastorListener
{
public function __construct(private readonly \Psr\Cache\CacheItemPoolInterface&\Symfony\Contracts\Cache\CacheInterface $cache, private readonly \Symfony\Contracts\HttpClient\HttpClientInterface $httpClient, #[\Symfony\Component\DependencyInjection\Attribute\Autowire('%repacked%')] private readonly bool $repacked, private readonly \Psr\Log\LoggerInterface $logger = new \Psr\Log\NullLogger())
{
}
#[\Symfony\Component\EventDispatcher\Attribute\AsEventListener]
public function checkUpdate(\Symfony\Component\Console\Event\ConsoleCommandEvent $event) : void
{
}
private function displayUpdateWarningIfNeeded(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output) : void
{
}
}
namespace Castor\Monolog\Processor;
class ProcessProcessor implements \Monolog\Processor\ProcessorInterface
{
public function __invoke(\Monolog\LogRecord $record) : \Monolog\LogRecord
{
}
/**
* @return array{cwd: ?string, env: array<string, string>, runnable: string}
*/
private function formatProcess(\Symfony\Component\Process\Process $process) : array
{
}
}
namespace Castor;
trigger_deprecation('castor', '0.15', 'The "%s" class is deprecated, use "%s" instead.', PathHelper::class, \Castor\Helper\PathHelper::class);
/**
* @deprecated since castor/castor 0.15, use Castor\Helper\PathHelper instead.
*/
#[\Symfony\Component\DependencyInjection\Attribute\Exclude]
class PathHelper extends \Castor\Helper\PathHelper
{
}
namespace Castor\Runner;
class ProcessRunner
{
public function __construct(private readonly \Castor\ContextRegistry $contextRegistry, private readonly \Castor\Console\Output\SectionOutput $sectionOutput, private readonly \Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher, private readonly \Castor\Helper\Notifier $notifier, private readonly \Psr\Log\LoggerInterface $logger = new \Psr\Log\NullLogger())
{
}
/**
* @param string|array<string|\Stringable|int> $command
* @param array<string, string|\Stringable|int>|null $environment
* @param (callable(string, string, Process) :void)|null $callback
*/
public function run(string|array $command, ?array $environment = null, ?string $workingDirectory = null, ?bool $tty = null, ?bool $pty = null, ?float $timeout = null, ?bool $quiet = null, ?bool $allowFailure = null, ?bool $notify = null, ?callable $callback = null, ?\Castor\Context $context = null) : \Symfony\Component\Process\Process
{
}
/**
* @param string|array<string|\Stringable|int> $command
* @param array<string, string|\Stringable|int>|null $environment
*/
public function capture(string|array $command, ?array $environment = null, ?string $workingDirectory = null, ?float $timeout = null, ?bool $allowFailure = null, ?string $onFailure = null, ?\Castor\Context $context = null) : string
{
}
/**
* @param string|array<string|\Stringable|int> $command
* @param array<string, string|\Stringable|int>|null $environment
*/
public function exitCode(string|array $command, ?array $environment = null, ?string $workingDirectory = null, ?float $timeout = null, ?bool $quiet = null, ?\Castor\Context $context = null) : int
{
}
}
namespace Castor;
trigger_deprecation('castor', '0.15.0', 'The "%s" class is deprecated, use "%s" instead.', TaskDescriptorCollection::class, \Castor\Descriptor\TaskDescriptorCollection::class);
/**
* @deprecated since Castor 0.15.0, use Castor\Descriptor\TaskDescriptorCollection instead
*/
#[\Symfony\Component\DependencyInjection\Attribute\Exclude]
class TaskDescriptorCollection extends \Castor\Descriptor\TaskDescriptorCollection
{
}
namespace Castor;
trigger_deprecation('castor/console', '0.15', 'The "%s" enum is deprecated and will be removed in 1.0. Use "%s" instead.', VerbosityLevel::class, Console\Output\VerbosityLevel::class);
/**
* @deprecated since castor/console 0.15, to be removed in 1.0. Use \Castor\Console\Output\VerbosityLevel instead.
*/
enum VerbosityLevel : int
{
case NOT_CONFIGURED = -1;
case QUIET = 0;
case NORMAL = 1;
case VERBOSE = 2;
case VERY_VERBOSE = 3;
case DEBUG = 4;
public static function fromSymfonyOutput(\Symfony\Component\Console\Output\OutputInterface $output) : self
{
}
public function isNotConfigured() : bool
{
}
public function isQuiet() : bool
{
}
public function isVerbose() : bool
{
}
public function isVeryVerbose() : bool
{
}
public function isDebug() : bool
{
}
}
namespace Castor;
/**
* @return array<mixed>
*/
function parallel(callable ...$callbacks) : array
{
}
/**
* @param string|array<string|\Stringable|int> $command
* @param array<string, string|\Stringable|int>|null $environment
* @param (callable(string, string, Process) :void)|null $callback
*/
function run(string|array $command, ?array $environment = null, ?string $workingDirectory = null, ?bool $tty = null, ?bool $pty = null, ?float $timeout = null, ?bool $quiet = null, ?bool $allowFailure = null, ?bool $notify = null, ?callable $callback = null, ?Context $context = null, ?string $path = null) : \Symfony\Component\Process\Process
{
}
/**
* @param string|array<string|\Stringable|int> $command
* @param array<string, string|\Stringable|int>|null $environment
*/
function capture(string|array $command, ?array $environment = null, ?string $workingDirectory = null, ?float $timeout = null, ?bool $allowFailure = null, ?string $onFailure = null, ?Context $context = null, ?string $path = null) : string
{
}
/**
* @param string|array<string|\Stringable|int> $command
* @param array<string, string|\Stringable|int>|null $environment
*/
function exit_code(string|array $command, ?array $environment = null, ?string $workingDirectory = null, ?float $timeout = null, ?bool $quiet = null, ?Context $context = null, ?string $path = null) : int
{
}
/**
* @deprecated Since castor/castor 0.8. Use Castor\exit_code() instead
*/
function get_exit_code(...$args) : int
{
}
/**
* @param array{
* 'port'?: int,
* 'path_private_key'?: string,
* 'jump_host'?: string,
* 'multiplexing_control_path'?: string,
* 'multiplexing_control_persist'?: string,
* 'enable_strict_check'?: bool,
* 'password_authentication'?: bool,
* } $sshOptions
*/
function ssh_run(string $command, string $host, ?string $user = null, array $sshOptions = [], ?string $path = null, ?bool $quiet = null, ?bool $allowFailure = null, ?bool $notify = null, ?float $timeout = null, ?callable $callback = null) : \Symfony\Component\Process\Process
{
}
/**
* @deprecated Since castor/castor 0.10. Use Castor\ssh_run() instead
*/
function ssh(...$args) : \Symfony\Component\Process\Process
{
}
/**
* @param array{
* 'port'?: int,
* 'path_private_key'?: string,
* 'jump_host'?: string,
* 'multiplexing_control_path'?: string,
* 'multiplexing_control_persist'?: string,
* 'enable_strict_check'?: bool,
* 'password_authentication'?: bool,
* } $sshOptions
*/
function ssh_upload(string $sourcePath, string $destinationPath, string $host, ?string $user = null, array $sshOptions = [], ?bool $quiet = null, ?bool $allowFailure = null, ?bool $notify = null, ?float $timeout = null) : \Symfony\Component\Process\Process
{
}
/**
* @param array{
* 'port'?: int,
* 'path_private_key'?: string,
* 'jump_host'?: string,
* 'multiplexing_control_path'?: string,
* 'multiplexing_control_persist'?: string,
* 'enable_strict_check'?: bool,
* 'password_authentication'?: bool,
* } $sshOptions
*/
function ssh_download(string $sourcePath, string $destinationPath, string $host, ?string $user = null, array $sshOptions = [], ?bool $quiet = null, ?bool $allowFailure = null, ?bool $notify = null, ?float $timeout = null) : \Symfony\Component\Process\Process
{
}
function notify(string $message, ?string $title = null) : void
{
}
/**
* @param string|non-empty-array<string> $path
* @param (callable(string, string) : (false|void|null)) $function
*/
function watch(string|array $path, callable $function, ?Context $context = null) : void
{
}
/**
* @param array<string, mixed> $context
*
* @phpstan-param \Monolog\Level|\Psr\Log\LogLevel::* $level
*/
function log(string|\Stringable $message, mixed $level = 'info', array $context = []) : void
{
}
function logger() : \Psr\Log\LoggerInterface
{
}
function app() : \Castor\Console\Application
{
}
/**
* @deprecated Since castor/castor 0.8. Use Castor\app() instead
*/
function get_application() : \Castor\Console\Application
{
}
function input() : \Symfony\Component\Console\Input\InputInterface
{
}
/**
* @deprecated Since castor/castor 0.8. Use Castor\input() instead
*/
function get_input() : \Symfony\Component\Console\Input\InputInterface
{
}
function output() : \Symfony\Component\Console\Output\OutputInterface
{
}
/**
* @deprecated Since castor/castor 0.8. Use Castor\output() instead
*/
function get_output() : \Symfony\Component\Console\Output\OutputInterface
{
}
function io() : \Symfony\Component\Console\Style\SymfonyStyle
{
}
/**
* @deprecated Since castor/castor 0.13. Use "Castor\Attributes\AsContextGenerator()" instead.
*/
function add_context(string $name, \Closure $callable, bool $default = false) : void
{
}
function context(?string $name = null) : Context
{
}
/**
* @deprecated Since castor/castor 0.8. Use Castor\context() instead
*/
function get_context() : Context
{
}
/**
* @template TKey of key-of<ContextData>
* @template TDefault
*
* @param TKey|string $key
* @param TDefault $default
*
* @phpstan-return ($key is TKey ? ContextData[TKey] : TDefault)
*/
function variable(string $key, mixed $default = null) : mixed
{
}
/**
* @return ($allowNull is true ? ?Command : Command)
*/
function task(bool $allowNull = false) : ?\Symfony\Component\Console\Command\Command
{
}
/**
* @deprecated Since castor/castor 0.8. Use Castor\task() instead
*/
function get_command() : \Symfony\Component\Console\Command\Command
{
}
function fs() : \Symfony\Component\Filesystem\Filesystem
{
}
function finder() : \Symfony\Component\Finder\Finder
{
}
/**
* @param string $key The key of the item to retrieve from the cache
* @param (callable(CacheItemInterface,bool):T)|(callable(ItemInterface,bool):T)|CallbackInterface<T> $or Use this callback to compute the value
*
* @return T
*
* @see CacheInterface::get()
*
* @template T
*/
function cache(string $key, callable $or) : mixed
{
}
function get_cache() : \Psr\Cache\CacheItemPoolInterface&\Symfony\Contracts\Cache\CacheInterface
{
}
/**
* @deprecated Since castor/castor 0.16. Use Castor\http_request() instead
*/
function request(...$args) : \Symfony\Contracts\HttpClient\ResponseInterface
{
}
/**
* @param array<string, mixed> $options default values at {@see HttpClientInterface::OPTIONS_DEFAULTS}
*/
function http_request(string $method, string $url, array $options = []) : \Symfony\Contracts\HttpClient\ResponseInterface
{
}
/**
* @param array<string, mixed> $options default values at {@see HttpClientInterface::OPTIONS_DEFAULTS}
*/
function http_download(string $url, ?string $filePath = null, string $method = 'GET', array $options = [], bool $stream = true) : \Symfony\Contracts\HttpClient\ResponseInterface
{
}
function http_client() : \Symfony\Contracts\HttpClient\HttpClientInterface
{
}
/**
* @param ?array{
* url?: string,
* type?: "git" | "svn",
* reference?: string,
* } $source
*/
function import(string $path, ?string $file = null, ?string $version = null, ?string $vcs = null, ?array $source = null) : void
{
}
function mount(string $path, ?string $namespacePrefix = null) : void
{
}
/**
* @return array<string, mixed>
*/
function load_dot_env(?string $path = null) : array
{
}
/**
* @template T
*
* @param (callable(Context) :T) $callback
* @param array<string, string|\Stringable|int>|null $data
* @param array<string, string|\Stringable|int>|null $environment
*/
function with(callable $callback, ?array $data = null, ?array $environment = null, ?string $workingDirectory = null, ?bool $tty = null, ?bool $pty = null, ?float $timeout = null, ?bool $quiet = null, ?bool $allowFailure = null, ?bool $notify = null, Context|string|null $context = null, ?string $path = null) : mixed
{
}
/**
* @see https://www.php.net/manual/en/function.hash-algos.php
*/