Skip to content

fix(console): scope the bin entry point and type the container correctly - #64

Merged
tyrsson merged 1 commit into
1.0.xfrom
tyrsson-fix-bin-webware-entry-point
Nov 9, 2026
Merged

tyrsson merged 1 commit into
1.0.xfrom
tyrsson-fix-bin-webware-entry-point

Conversation

@tyrsson

@tyrsson tyrsson commented Nov 9, 2026

Copy link
Copy Markdown
Member

What changed

bin/webware no longer runs at file top level. The entry point body is wrapped in a self-called closure, so requiring config/container.php can no longer leak $config, $dependencies, and the other locals into the global namespace.

The container annotation is corrected from @var ContainerInterface to @var ContainerInterface&ServiceManager. config/container.php returns a Laminas\ServiceManager\ServiceManager, and the old annotation described a PSR-11 container the file never produced.

Two mojibake dashes in the comments were replaced with plain punctuation, so the file is ASCII-only.

Why

This is the same defect found in phpiidoc/bin/phpiidoc at line 54: the annotation described something the call does not return, and the config files executed in global scope.

Scope

One file. No behaviour change to command resolution or dispatch.

Wrap the entry point body in a self-called closure so requiring the config
files no longer leaks their internals into the global namespace, narrow the
container to a ContainerInterface and ServiceManager intersection, and replace
the two mojibake dashes with plain punctuation so the file is ASCII-only.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@codecov

codecov Bot commented Nov 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@tyrsson
tyrsson merged commit 028e151 into 1.0.x Nov 9, 2026
12 checks passed
@tyrsson
tyrsson deleted the tyrsson-fix-bin-webware-entry-point branch November 9, 2026 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant