Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Psl Laravel Package

azjezz/psl

PSL (PHP Standard Library) offers a consistent, well-typed set of safer, async-ready APIs to replace PHP primitives. Covers async, collections, networking, I/O, cryptography, terminal UI, and type-safe data validation with predictable errors.

View on GitHub
Deep Wiki
Context7

Shell

The Shell component provides a single function, Shell\execute(), for running external commands and capturing their output. It handles argument escaping, error output management, and proper exception handling for failed commands.

For more advanced process management (streaming I/O, signals, non-blocking operation), see the Process component. Shell is the simpler choice when you just need to run a command and get the result.

Basic Usage

@example('io/shell-execute.php')

Handling Error Output

By default, stderr is discarded. The ErrorOutputBehavior enum controls how stderr is handled relative to stdout:

@example('io/shell-error-output.php')

Cancellation

Pass a CancellationTokenInterface to cancel a running command. Use TimeoutCancellationToken to enforce a time limit:

@example('io/shell-timeout.php')

Error Handling

execute() throws specific exceptions depending on what went wrong:

  • FailedExecutionException -- the command exited with a non-zero status. Provides getCommand(), getOutput(), and getErrorOutput() for inspection.
  • PossibleAttackException -- the command or an argument contains a NULL byte, indicating a potential injection attack.
  • CancelledException -- the command was cancelled via the cancellation token.
  • RuntimeException -- the working directory does not exist, or the process could not be created.

@example('io/shell-error-handling.php')

See src/Psl/Shell/ for the full API.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle