jenssegers / jenssegers/lean

Middleware not working properly, autowiring issue?

Open
#10 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
31
Forks
5
PR merge metrics
No merged PRs in 30d

Description

I seen one of the latest tickets is related to the getAttributes() request method however my issue is related to using the ip-addr-middleware package to grab the client ip from the request and since it uses ->getAttributes, perhaps my problem is semi-related.

So I added the ip-addr-middleware package exactly as described in the docs (https://github.com/akrabat/ip-address-middleware) and while I can retrieve the ip address using the example route shown in that doc, getAttributes() is empty on my auto-wired controllers. Im curious if this is because when the route is __invoke’d it is instantiating a new request object or if theres some other configuration issue that I completely screwed up, any ideas what could cause this?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.