SShortSingh.
Back to feed

WP-CLI PHP Deprecated warnings persist on shebang-launched phar binaries, fix released

0
·1 views

Developers found that setting WP_CLI_PHP_ARGS to suppress PHP 8.2 Deprecated warnings failed on Xserver because WP-CLI is deployed there as a shebang-launched phar binary, preventing the environment variable from ever reaching PHP's startup options. An agency first reported the issue when plugin list retrieval across multiple sites produced hundreds of Deprecated messages despite the standard configuration being in place. Tracing the execution path confirmed that when PHP is invoked via a shebang line, WP-CLI has no opportunity to inject the -d error_reporting flag into PHP's invocation. Version 1.6.8 of the tool introduces a function that inspects the WP-CLI path and, if the leading binary is a php variant, inserts the suppression flag directly after the binary name. A second helper was also added to extract only valid JSON from command output, guarding against residual notices or warnings that may still appear in stdout.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingHacker News ·

Alibaba Releases Qwen-Image-3.0 with Enhanced Visual Understanding

Alibaba's Qwen team has launched Qwen-Image-3.0, the latest iteration of its image-focused AI model. The release emphasizes richer content processing, more authentic detail recognition, and deeper knowledge integration. The announcement was shared via the official Qwen blog and drew early attention on Hacker News. The update appears aimed at advancing multimodal AI capabilities within the Qwen model family.

0
ProgrammingDEV Community ·

Swift Classes Use Reference Types, Meaning Copies Share the Same Data

In Swift, classes are reference types, so assigning a class instance to a new variable does not create an independent copy of the data. Both variables point to the same memory location, meaning a change made through one variable is reflected in the other. This contrasts with structs, which are value types that produce fully independent copies when assigned. The reference-type behavior is intentional and useful for managing shared state across multiple parts of an app, such as a user profile displayed on several screens. Developers who need a true independent copy of a class instance must manually implement a copy method that initializes a new instance with the same values.

0
ProgrammingDEV Community ·

Popular JSON minifiers silently corrupt large integers above JavaScript's safe limit

A flaw in widely used JSON minifiers causes large integers — such as database or Snowflake IDs — to be silently altered when processed through JavaScript's JSON.parse and JSON.stringify methods. Any integer exceeding Number.MAX_SAFE_INTEGER (9007199254740991) can lose precision without triggering an error, producing output that is syntactically valid but numerically incorrect. This can cause hard-to-trace bugs when corrupted IDs are used in database lookups, API calls, or foreign key references downstream. The root cause is the parse-then-stringify round-trip approach most minifiers rely on, which converts JSON numbers into JavaScript floating-point values. The recommended fix is to minify JSON at the character level — stripping only whitespace — so number literals are preserved exactly as written in the original input.

0
ProgrammingDEV Community ·

DeepShrink lets users compress video to an exact file size with one command

DeepShrink is an open-source command-line tool written in Rust that compresses video and audio files to a user-specified size limit without uploading files to external servers. The tool works by driving ffmpeg under the hood, automatically calculating the required bitrate and running a two-pass H.264/H.265 encode to guarantee the output meets the target size. Users simply specify a file and a size limit, such as 8 MB for Discord, and DeepShrink handles all technical parameters including codec selection and audio bitrate. It also supports an optional VMAF quality floor to prevent over-compression, and the original file is never modified unless the user explicitly requests it. DeepShrink is available via Homebrew on macOS or through Rust's cargo package manager, with cross-platform ffmpeg installation required for the latter.

WP-CLI PHP Deprecated warnings persist on shebang-launched phar binaries, fix released · ShortSingh